diff --git a/build/vite/plugin/index.ts b/build/vite/plugin/index.ts index 6ec4a1e..25df01e 100644 --- a/build/vite/plugin/index.ts +++ b/build/vite/plugin/index.ts @@ -5,6 +5,7 @@ import purgeIcons from 'vite-plugin-purge-icons'; import UnoCSS from 'unocss/vite'; import { presetTypography, presetUno } from 'unocss'; +// 本地调试https配置方法 import VitePluginCertificate from 'vite-plugin-mkcert'; //[issues/555]开发环境,vscode断点调试,文件或行数对不上 import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus'; diff --git a/mock/demo/select-demo.ts b/mock/demo/select-demo.ts index 337bc5b..cb77aec 100644 --- a/mock/demo/select-demo.ts +++ b/mock/demo/select-demo.ts @@ -6,10 +6,19 @@ const demoList = (keyword, count = 20) => { list: [] as any[], }; for (let index = 0; index < count; index++) { - result.list.push({ - name: `${keyword ?? ''}选项${index}`, - id: `${index}`, - }); + //根据搜索关键词做一下匹配 + let name = `选项${index}`; + if(keyword && name.indexOf(keyword)!=-1){ + result.list.push({ + name: `选项${index}`, + id: `${index}`, + }); + }else if(!keyword){ + result.list.push({ + name: `选项${index}`, + id: `${index}`, + }); + } } return result; }; diff --git a/src/api/sys/menu.ts b/src/api/sys/menu.ts index ea873df..1b905e5 100644 --- a/src/api/sys/menu.ts +++ b/src/api/sys/menu.ts @@ -23,6 +23,13 @@ export const getMenuList = () => { }); }; +/** + * @description: 获取后台菜单权限和按钮权限 + */ +export function getBackMenuAndPerms() { + return defHttp.get({ url: Api.GetMenuList }); +} + /** * 切换成vue3菜单 */ diff --git a/src/api/sys/user.ts b/src/api/sys/user.ts index 4866c94..a047e20 100644 --- a/src/api/sys/user.ts +++ b/src/api/sys/user.ts @@ -126,6 +126,9 @@ export function getCaptcha(params) { createErrorModal({ title: '错误提示', content: res.message || '未知问题' }); reject(); } + }).catch((res)=>{ + createErrorModal({ title: '错误提示', content: res.message || '未知问题' }); + reject(); }); }); } diff --git a/src/components/Form/src/componentMap.ts b/src/components/Form/src/componentMap.ts index 9f9e91b..fcfb645 100644 --- a/src/components/Form/src/componentMap.ts +++ b/src/components/Form/src/componentMap.ts @@ -44,6 +44,9 @@ import JCodeEditor from './jeecg/components/JCodeEditor.vue'; import JCategorySelect from './jeecg/components/JCategorySelect.vue'; import JSelectMultiple from './jeecg/components/JSelectMultiple.vue'; import JPopup from './jeecg/components/JPopup.vue'; +// update-begin--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典 +import JPopupDict from './jeecg/components/JPopupDict.vue'; +// update-end--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典 import JSwitch from './jeecg/components/JSwitch.vue'; import JTreeDict from './jeecg/components/JTreeDict.vue'; import JInputPop from './jeecg/components/JInputPop.vue'; @@ -116,6 +119,9 @@ componentMap.set('JCodeEditor', JCodeEditor); componentMap.set('JCategorySelect', JCategorySelect); componentMap.set('JSelectMultiple', JSelectMultiple); componentMap.set('JPopup', JPopup); +// update-begin--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典 +componentMap.set('JPopupDict', JPopupDict); +// update-end--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典 componentMap.set('JSwitch', JSwitch); componentMap.set('JTreeDict', JTreeDict); componentMap.set('JInputPop', JInputPop); diff --git a/src/components/Form/src/components/ApiTreeSelect.vue b/src/components/Form/src/components/ApiTreeSelect.vue index 31a1fbb..8d6cd20 100644 --- a/src/components/Form/src/components/ApiTreeSelect.vue +++ b/src/components/Form/src/components/ApiTreeSelect.vue @@ -44,7 +44,9 @@ watch( () => props.params, () => { - !unref(isFirstLoaded) && fetch(); + //update-begin---author:wangshuai---date:2024-02-28---for:【QQYUN-8346】 ApiTreeSelect组件入参变化时,不及时刷新数据 #1054--- + unref(isFirstLoaded) && fetch(); + //update-end---author:wangshuai---date:2024-02-28---for:【QQYUN-8346】 ApiTreeSelect组件入参变化时,不及时刷新数据 #1054--- }, { deep: true } ); diff --git a/src/components/Form/src/components/FormItem.vue b/src/components/Form/src/components/FormItem.vue index e6b4d69..ca124cf 100644 --- a/src/components/Form/src/components/FormItem.vue +++ b/src/components/Form/src/components/FormItem.vue @@ -183,9 +183,12 @@ rule.required = false; } if (component) { - if (!Reflect.has(rule, 'type')) { + //update-begin---author:wangshuai---date:2024-02-01---for:【QQYUN-8176】编辑表单中,校验必填时,如果组件是ApiSelect,打开编辑页面时,即使该字段有值,也会提示请选择--- + //https://github.com/vbenjs/vue-vben-admin/pull/3082 github修复原文 + /*if (!Reflect.has(rule, 'type')) { rule.type = component === 'InputNumber' ? 'number' : 'string'; - } + }*/ + //update-end---author:wangshuai---date:2024-02-01---for:【QQYUN-8176】编辑表单中,校验必填时,如果组件是ApiSelect,打开编辑页面时,即使该字段有值,也会提示请选择--- rule.message = rule.message || defaultMsg; diff --git a/src/components/Form/src/helper.ts b/src/components/Form/src/helper.ts index f65ea49..e6775da 100644 --- a/src/components/Form/src/helper.ts +++ b/src/components/Form/src/helper.ts @@ -36,6 +36,12 @@ function genType() { } export function setComponentRuleType(rule: ValidationRule, component: ComponentType, valueFormat: string) { + //update-begin---author:wangshuai---date:2024-02-01---for:【QQYUN-8176】编辑表单中,校验必填时,如果组件是ApiSelect,打开编辑页面时,即使该字段有值,也会提示请选择--- + //https://github.com/vbenjs/vue-vben-admin/pull/3082 github修复原文 + if (Reflect.has(rule, 'type')) { + return; + } + //update-end---author:wangshuai---date:2024-02-01---for:【QQYUN-8176】编辑表单中,校验必填时,如果组件是ApiSelect,打开编辑页面时,即使该字段有值,也会提示请选择--- if (['DatePicker', 'MonthPicker', 'WeekPicker', 'TimePicker'].includes(component)) { rule.type = valueFormat ? 'string' : 'object'; } else if (['RangePicker', 'Upload', 'CheckboxGroup', 'TimePicker'].includes(component)) { diff --git a/src/components/Form/src/jeecg/components/JCheckbox.vue b/src/components/Form/src/jeecg/components/JCheckbox.vue index b69ac4c..58d508d 100644 --- a/src/components/Form/src/jeecg/components/JCheckbox.vue +++ b/src/components/Form/src/jeecg/components/JCheckbox.vue @@ -1,5 +1,9 @@ + diff --git a/src/components/Form/src/jeecg/components/JDictSelectTag.vue b/src/components/Form/src/jeecg/components/JDictSelectTag.vue index 3c313c8..8ca4988 100644 --- a/src/components/Form/src/jeecg/components/JDictSelectTag.vue +++ b/src/components/Form/src/jeecg/components/JDictSelectTag.vue @@ -2,7 +2,9 @@ @@ -41,7 +43,11 @@ 请选择… @@ -68,6 +68,10 @@ type: Boolean, default: false, }, + useDicColor: { + type: Boolean, + default: false, + }, }, emits: ['options-change', 'change', 'input', 'update:value'], setup(props, { emit, refs }) { @@ -135,7 +139,7 @@ //update-end-author:taoyan date:2022-6-21 for: 字典数据请求前将参数编码处理,但是不能直接编码,因为可能之前已经编码过了 getDictItems(temp).then((res) => { if (res) { - dictOptions.value = res.map((item) => ({ value: item.value, label: item.text })); + dictOptions.value = res.map((item) => ({ value: item.value, label: item.text, color:item.color })); //console.info('res', dictOptions.value); } else { console.error('getDictItems error: : ', res); @@ -162,3 +166,15 @@ }, }); + \ No newline at end of file diff --git a/src/components/Form/src/jeecg/components/userSelect/UserList.vue b/src/components/Form/src/jeecg/components/userSelect/UserList.vue index 67710a6..16baa81 100644 --- a/src/components/Form/src/jeecg/components/userSelect/UserList.vue +++ b/src/components/Form/src/jeecg/components/userSelect/UserList.vue @@ -137,8 +137,8 @@ e.preventDefault(); e.stopPropagation(); } - - function records2DataList() { +//update-begin---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色,添加用户 返回2页数据,实际只显示一页--- +/* function records2DataList() { let arr:any[] = []; let excludeList = props.excludeUserIdList; let records = props.dataList; @@ -150,13 +150,14 @@ } } return arr; - } + }*/ const showDataList = computed(()=>{ - let excludeList = props.excludeUserIdList; +/* let excludeList = props.excludeUserIdList; if(excludeList && excludeList.length>0){ return records2DataList(); - } + }*/ +//update-end---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色,添加用户 返回2页数据,实际只显示一页--- return props.dataList; }); diff --git a/src/components/Form/src/jeecg/components/userSelect/UserListAndDepart.vue b/src/components/Form/src/jeecg/components/userSelect/UserListAndDepart.vue index 30f8e7f..6187d4b 100644 --- a/src/components/Form/src/jeecg/components/userSelect/UserListAndDepart.vue +++ b/src/components/Form/src/jeecg/components/userSelect/UserListAndDepart.vue @@ -141,7 +141,7 @@ const url = '/sys/user/selectUserList'; let params = { pageNo: 1, - pageSize: 10, + pageSize: 99, }; if (props.searchText) { params['keyword'] = props.searchText; @@ -149,6 +149,11 @@ if (selectedDepartId.value) { params['departId'] = selectedDepartId.value; } + //update-begin---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色,添加用户 返回2页数据,实际只显示一页--- + if(props.excludeUserIdList && props.excludeUserIdList.length>0){ + params['excludeUserIdList'] = props.excludeUserIdList.join(","); + } + //update-end---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色,添加用户 返回2页数据,实际只显示一页--- const data = await defHttp.get({ url, params }, { isTransformResponse: false }); if (data.success) { const { records } = data.result; diff --git a/src/components/Form/src/jeecg/components/userSelect/UserListAndRole.vue b/src/components/Form/src/jeecg/components/userSelect/UserListAndRole.vue index 7cfd37e..f095e49 100644 --- a/src/components/Form/src/jeecg/components/userSelect/UserListAndRole.vue +++ b/src/components/Form/src/jeecg/components/userSelect/UserListAndRole.vue @@ -90,7 +90,7 @@ const url = '/sys/user/selectUserList'; let params = { pageNo: 1, - pageSize: 10, + pageSize: 99, }; if (props.searchText) { params['keyword'] = props.searchText; @@ -98,6 +98,11 @@ if (selectedRoleId.value) { params['roleId'] = selectedRoleId.value; } + //update-begin---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色,添加用户 返回2页数据,实际只显示一页--- + if(props.excludeUserIdList && props.excludeUserIdList.length>0){ + params['excludeUserIdList'] = props.excludeUserIdList.join(","); + } + //update-end---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色,添加用户 返回2页数据,实际只显示一页--- const data = await defHttp.get({ url, params }, { isTransformResponse: false }); if (data.success) { const { records } = data.result; diff --git a/src/components/Form/src/jeecg/components/userSelect/UserSelectModal.vue b/src/components/Form/src/jeecg/components/userSelect/UserSelectModal.vue index 6008e1c..e9b9851 100644 --- a/src/components/Form/src/jeecg/components/userSelect/UserSelectModal.vue +++ b/src/components/Form/src/jeecg/components/userSelect/UserSelectModal.vue @@ -222,13 +222,16 @@ if (selectedDepart.value) { params['departId'] = selectedDepart.value; } + + //update-begin---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色,添加用户 返回2页数据,实际只显示一页--- + if(unref(excludeUserIdList) && unref(excludeUserIdList).length>0){ + params['excludeUserIdList'] = excludeUserIdList.value.join(","); + } + //update-end---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色,添加用户 返回2页数据,实际只显示一页--- + const data = await defHttp.get({ url, params }, { isTransformResponse: false }); if (data.success) { let { records, total } = data.result; - //如果排除的用户id的长度不为0,那么需要改变页数 - if(unref(excludeUserIdList) && unref(excludeUserIdList).length>0){ - total = total - unref(excludeUserIdList).length; - } totalRecord.value = total; initCurrentUserData(records); userDataList.value = records; diff --git a/src/components/Form/src/jeecg/hooks/useTreeBiz.ts b/src/components/Form/src/jeecg/hooks/useTreeBiz.ts index 5c6059f..8c4b9a1 100644 --- a/src/components/Form/src/jeecg/hooks/useTreeBiz.ts +++ b/src/components/Form/src/jeecg/hooks/useTreeBiz.ts @@ -199,7 +199,7 @@ export function useTreeBiz(treeRef, getList, props, realProps) { const options = []; optionData.forEach((item) => { //update-begin-author:taoyan date:2022-7-4 for: issues/I5F3P4 online配置部门选择后编辑,查看数据应该显示部门名称,不是部门代码 - options.push({ label: item[props.titleKey], value: item[props.rowKey] }); + options.push({ label: item[props.labelKey], value: item[props.rowKey] }); //update-end-author:taoyan date:2022-7-4 for: issues/I5F3P4 online配置部门选择后编辑,查看数据应该显示部门名称,不是部门代码 }); selectOptions.value = options; diff --git a/src/components/Form/src/types/index.ts b/src/components/Form/src/types/index.ts index fa5e4b6..5fd9d5e 100644 --- a/src/components/Form/src/types/index.ts +++ b/src/components/Form/src/types/index.ts @@ -128,6 +128,7 @@ export type ComponentType = | 'JCategorySelect' | 'JSelectMultiple' | 'JPopup' + | 'JPopupDict' | 'JSwitch' | 'JEasyCron' | 'JTreeDict' diff --git a/src/components/SimpleMenu/src/SimpleMenu.vue b/src/components/SimpleMenu/src/SimpleMenu.vue index d6699fa..9150907 100644 --- a/src/components/SimpleMenu/src/SimpleMenu.vue +++ b/src/components/SimpleMenu/src/SimpleMenu.vue @@ -127,6 +127,14 @@ // update-begin--author:sunjianlei---date:20220408---for: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下 return; } + // update-begin--author:liaozhiyang---date:20240227---for:【QQYUN-6366】内部路由也可以支持采用新浏览器tab打开 + const findItem = getMatchingMenu(props.items, key); + if (findItem?.internalOrExternal == true) { + window.open(location.origin + key); + return; + } + // update-end--author:liaozhiyang---date:20240227---for:【QQYUN-6366】内部路由也可以支持采用新浏览器tab打开 + const { beforeClickFn } = props; if (beforeClickFn && isFunction(beforeClickFn)) { const flag = await beforeClickFn(key); @@ -140,6 +148,26 @@ menuState.activeName = key; } + /** + * 2024-02-27 + * liaozhiyang + * 获取菜单中匹配的path所在的项 + */ + const getMatchingMenu = (menus, path) => { + for (let i = 0, len = menus.length; i < len; i++) { + const item = menus[i]; + if (item.path === path && !item.redirect && !item.paramPath) { + return item; + } else if (item.children?.length) { + const result = getMatchingMenu(item.children, path); + if (result) { + return result; + } + } + } + return ''; + } + return { prefixCls, getBindValues, diff --git a/src/components/Table/src/components/TableAction.vue b/src/components/Table/src/components/TableAction.vue index 7f1265f..9566a5a 100644 --- a/src/components/Table/src/components/TableAction.vue +++ b/src/components/Table/src/components/TableAction.vue @@ -251,6 +251,11 @@ &-popconfirm { .ant-popconfirm-buttons { min-width: 120px; + // update-begin--author:liaozhiyang---date:20240124---for:【issues/1019】popConfirm确认框待端后端返回过程中(处理中)样式错乱 + display: flex; + align-items: center; + justify-content: center; + // update-end--author:liaozhiyang---date:20240124---for:【issues/1019】popConfirm确认框待端后端返回过程中(处理中)样式错乱 } } } diff --git a/src/components/Table/src/components/TableFooter.vue b/src/components/Table/src/components/TableFooter.vue index c2b08c9..f20b11e 100644 --- a/src/components/Table/src/components/TableFooter.vue +++ b/src/components/Table/src/components/TableFooter.vue @@ -57,7 +57,9 @@ if (!isFunction(summaryFunc)) { return []; } - let dataSource = toRaw(unref(table.getDataSource())); + // update-begin--author:liaozhiyang---date:20230227---for:【QQYUN-8172】可编辑单元格编辑完以后不更新合计值 + let dataSource = cloneDeep(unref(table.getDataSource())); + // update-end--author:liaozhiyang---date:20230227---for:【QQYUN-8172】可编辑单元格编辑完以后不更新合计值 dataSource = summaryFunc(dataSource); dataSource.forEach((item, i) => { item[props.rowKey] = `${i}`; diff --git a/src/components/Table/src/components/settings/ColumnSetting.vue b/src/components/Table/src/components/settings/ColumnSetting.vue index c9ccabc..e10eb6f 100644 --- a/src/components/Table/src/components/settings/ColumnSetting.vue +++ b/src/components/Table/src/components/settings/ColumnSetting.vue @@ -1,5 +1,5 @@