From 4d1e2c47116a44dfc72d6147f5943df6d7912902 Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Sun, 7 Jan 2024 17:11:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=87=A0=E4=B8=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Form/src/components/FormAction.vue | 12 +++--- .../Form/src/components/FormItem.vue | 6 +-- .../src/jeecg/components/JSearchSelect.vue | 39 ++++++++++++++++--- .../src/components/JVxeFileCell.vue | 2 +- .../src/components/JVxeImageCell.vue | 13 +++++-- .../Table/src/components/TableAction.vue | 17 ++++++++ .../Table/src/components/editable/index.ts | 6 +-- src/components/Table/src/types/tableAction.ts | 1 + .../jeecg/OnLine/hooks/usePopBiz.ts | 20 ++++++++++ src/design/ant/index.less | 13 +++++++ src/enums/CompTypeEnum.ts | 2 +- src/enums/httpEnum.ts | 6 +-- src/hooks/web/useSso.ts | 5 ++- src/store/modules/user.ts | 6 +++ src/views/system/appconfig/ThirdApp.api.ts | 2 +- .../system/dict/components/DictItemList.vue | 3 ++ .../role/components/RolePermissionDrawer.vue | 2 +- src/views/system/tenant/TenantUserList.vue | 19 ++++++++- src/views/system/user/UserQuitAgentModal.vue | 2 +- 19 files changed, 146 insertions(+), 30 deletions(-) diff --git a/src/components/Form/src/components/FormAction.vue b/src/components/Form/src/components/FormAction.vue index 85c43fc..8a3e774 100644 --- a/src/components/Form/src/components/FormAction.vue +++ b/src/components/Form/src/components/FormAction.vue @@ -75,16 +75,18 @@ const { showAdvancedButton, actionSpan: span, actionColOptions } = props; const actionSpan = 24 - span; const advancedSpanObj = showAdvancedButton ? { span: actionSpan < 6 ? 24 : actionSpan } : {}; + // update-begin--author:liaozhiyang---date:20240105---for:【QQYUN-6566】BasicForm支持一行显示(inline) + const defaultSpan = props.layout == 'inline' ? {} : { span: showAdvancedButton ? 6 : 4 }; + // update-end--author:liaozhiyang---date:20240105---for:【QQYUN-6566】BasicForm支持一行显示(inline) const actionColOpt: Partial = { style: { textAlign: 'right' }, + ...defaultSpan, ...advancedSpanObj, ...actionColOptions, }; - // update-begin--author:liaozhiyang---date:20231017---for:【QQYUN-6566】BasicForm支持一行显示(inline) - if (props.layout !== 'inline') { - actionColOpt['span'] = showAdvancedButton ? 6 : 4; - } - // update-end--author:liaozhiyang---date:20231017---for:【QQYUN-6566】BasicForm支持一行显示(inline) + + + return actionColOpt; }); diff --git a/src/components/Form/src/components/FormItem.vue b/src/components/Form/src/components/FormItem.vue index 646caa0..e6b4d69 100644 --- a/src/components/Form/src/components/FormItem.vue +++ b/src/components/Form/src/components/FormItem.vue @@ -391,10 +391,10 @@ // update-begin--author:liaozhiyang---date:20230803---for:【issues-641】调整表格搜索表单的span配置无效 const { getIsMobile } = useAppInject(); let realColProps; - if (colProps['span'] && !unref(getIsMobile)) { - ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach((name) => delete baseColProps[name]); - } realColProps = { ...baseColProps, ...colProps }; + if (colProps['span'] && !unref(getIsMobile)) { + ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach((name) => delete realColProps[name]); + } // update-end--author:liaozhiyang---date:20230803---for:【issues-641】调整表格搜索表单的span配置无效 const { isIfShow, isShow } = getShow(); const values = unref(getValues); diff --git a/src/components/Form/src/jeecg/components/JSearchSelect.vue b/src/components/Form/src/jeecg/components/JSearchSelect.vue index aab7c10..df6cf7d 100644 --- a/src/components/Form/src/jeecg/components/JSearchSelect.vue +++ b/src/components/Form/src/jeecg/components/JSearchSelect.vue @@ -9,7 +9,7 @@ allowClear :getPopupContainer="getParentContainer" :placeholder="placeholder" - :filterOption="false" + :filterOption="isDictTable ? false : filterOption" :notFoundContent="loading ? undefined : null" @search="loadData" @change="handleAsyncChange" @@ -91,12 +91,29 @@ const lastLoad = ref(0); // 是否根据value加载text const loadSelectText = ref(true); + + // 是否是字典表 + const isDictTable = computed(() => { + if (props.dict) { + return props.dict.split(',').length >= 2 + } + return false; + }) + /** * 监听字典code */ - watchEffect(() => { - props.dict && initDictData(); - }); + watch(() => props.dict, () => { + if (!props.dict) { + return + } + if (isDictTable.value) { + initDictTableData(); + } else { + initDictCodeData(); + } + }, {immediate: true}); + /** * 监听value */ @@ -128,6 +145,9 @@ * 异步查询数据 */ async function loadData(value) { + if (!isDictTable.value) { + return; + } lastLoad.value += 1; const currentLoad = unref(lastLoad); options.value = []; @@ -190,7 +210,7 @@ /** * 初始化字典下拉数据 */ - async function initDictData() { + async function initDictTableData() { let { dict, async, dictOptions, pageSize } = props; if (!async) { //如果字典项集合有数据 @@ -233,6 +253,14 @@ } } } + + /** + * 查询数据字典 + */ + async function initDictCodeData() { + options.value = await initDictOptions(props.dict); + } + /** * 同步改变事件 * */ @@ -316,6 +344,7 @@ attrs, options, loading, + isDictTable, selectedValue, selectedAsyncValue, loadData: useDebounceFn(loadData, 800), diff --git a/src/components/JVxeCustom/src/components/JVxeFileCell.vue b/src/components/JVxeCustom/src/components/JVxeFileCell.vue index c27602e..a4abd95 100644 --- a/src/components/JVxeCustom/src/components/JVxeFileCell.vue +++ b/src/components/JVxeCustom/src/components/JVxeFileCell.vue @@ -17,7 +17,7 @@ {{ ellipsisFileName }} - + diff --git a/src/components/JVxeCustom/src/components/JVxeImageCell.vue b/src/components/JVxeCustom/src/components/JVxeImageCell.vue index 0a7eb12..61c001b 100644 --- a/src/components/JVxeCustom/src/components/JVxeImageCell.vue +++ b/src/components/JVxeCustom/src/components/JVxeImageCell.vue @@ -9,10 +9,10 @@ - + @@ -38,7 +38,7 @@