From 6e55926994f80099bbe5c47953ca466c3278c5dd Mon Sep 17 00:00:00 2001 From: GaoF Date: Fri, 2 Aug 2024 09:25:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E8=B5=84=E6=96=99=EF=BC=8C?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=88=B7=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DynamicTree/index.vue | 12 ++++++++---- src/layout/components/userbar.vue | 2 +- src/views/basicData/client/index.vue | 6 ++++++ src/views/basicData/materiel/index.vue | 6 ++++++ src/views/basicData/stash/index.vue | 6 ++++++ src/views/basicData/tissue/index.vue | 6 ++++++ src/views/biz/extendedField/detail/form.vue | 16 +++++----------- src/views/biz/extendedField/index.vue | 4 ++-- 8 files changed, 40 insertions(+), 18 deletions(-) diff --git a/src/components/DynamicTree/index.vue b/src/components/DynamicTree/index.vue index 3beae41..9414a05 100644 --- a/src/components/DynamicTree/index.vue +++ b/src/components/DynamicTree/index.vue @@ -25,7 +25,7 @@ class="s-tool-item" v-if="item.name === 'refresh' && props.toolConfig.refresh" > - + @@ -91,7 +91,7 @@ } }) - const emit = defineEmits(['selectTree', 'delTree']) + const emit = defineEmits(['selectTree', 'delTree', 'treeRefresh']) const tool = [ { @@ -154,11 +154,15 @@ }) } + const handleRefresh = () => { + loadTreeData() + emit('treeRefresh') + } + const loadTreeData = async () => { try { localLoading.value = true const treeRes = await props.apiModel.getTree() - console.log(treeRes, 'treeRes') if (Array.isArray(treeRes)) { treeData.value[0].children = treeRes } else { @@ -168,7 +172,7 @@ if (selectedKeys.value.length > 0) { selectedKeys.value = [] - props.tableRef.refresh() + // props.tableRef.refresh() } if (treeRow.id) { diff --git a/src/layout/components/userbar.vue b/src/layout/components/userbar.vue index 2ae8562..d9ffec0 100644 --- a/src/layout/components/userbar.vue +++ b/src/layout/components/userbar.vue @@ -42,7 +42,7 @@ -
+
diff --git a/src/views/basicData/client/index.vue b/src/views/basicData/client/index.vue index c85db22..1166d72 100644 --- a/src/views/basicData/client/index.vue +++ b/src/views/basicData/client/index.vue @@ -43,6 +43,7 @@ }" @selectTree="selectTree" @delTree="delTree" + @treeRefresh="treeRefresh" > @@ -228,6 +229,11 @@ tableRef.value.refresh() } + const treeRefresh = () => { + searchFormState.value.categoryId = null + tableRef.value.refresh() + } + const successful = () => { searchFormState.value.categoryId = null tableRef.value.refresh() diff --git a/src/views/basicData/materiel/index.vue b/src/views/basicData/materiel/index.vue index b4d4e17..32246f4 100644 --- a/src/views/basicData/materiel/index.vue +++ b/src/views/basicData/materiel/index.vue @@ -43,6 +43,7 @@ }" @selectTree="selectTree" @delTree="delTree" + @treeRefresh="treeRefresh" > @@ -178,6 +179,11 @@ tableRef.value.refresh() } + const treeRefresh = () => { + searchFormState.value.categoryId = null + tableRef.value.refresh() + } + const delTree = () => { searchFormState.value.categoryId = null tableRef.value.refresh() diff --git a/src/views/basicData/stash/index.vue b/src/views/basicData/stash/index.vue index 0305f9d..638c4cd 100644 --- a/src/views/basicData/stash/index.vue +++ b/src/views/basicData/stash/index.vue @@ -41,6 +41,7 @@ delTree: sysStoreApi.productionOrganizationDelete }" @selectTree="onSelectTree" + @treeRefresh="treeRefresh" :toolConfig="{ plus: false, edit: false, @@ -222,6 +223,11 @@ tableRef.value.refresh() } + const treeRefresh = () => { + searchFormState.value.parentId = null + tableRef.value.refresh() + } + onMounted(() => { dynamicTreeRef.value.loadTreeData() }) diff --git a/src/views/basicData/tissue/index.vue b/src/views/basicData/tissue/index.vue index 546d84b..acce6b1 100644 --- a/src/views/basicData/tissue/index.vue +++ b/src/views/basicData/tissue/index.vue @@ -56,6 +56,7 @@ }" @selectTree="onSelectTree" @delTree="delTree" + @treeRefresh="treeRefresh" :toolConfig="{ plus: false, edit: false, @@ -222,6 +223,11 @@ tableRef.value.refresh() } + const treeRefresh = () => { + searchFormState.value.parentId = null + tableRef.value.refresh() + } + const successful = () => { searchFormState.value.parentId = null tableRef.value.refresh() diff --git a/src/views/biz/extendedField/detail/form.vue b/src/views/biz/extendedField/detail/form.vue index c59b066..2eeda0f 100644 --- a/src/views/biz/extendedField/detail/form.vue +++ b/src/views/biz/extendedField/detail/form.vue @@ -23,11 +23,6 @@ /> - - - - -

扩展数据:

@@ -139,15 +134,14 @@ // 默认要校验的 const formRules = { name: [required('请输入名称')], - fieldType: [required('请输入类型')], model: [required('请输入模块')] } // 验证并提交数据 const onSubmit = () => { if ( - formData.value.showType === 'select' && - formData.value.showType === 'radio' && - formData.value.showType === 'checkbox' && + formData.value.showType === 'a-select' && + formData.value.showType === 'a-radio-group' && + formData.value.showType === 'a-checkbox-group' && selectableData.value.length === 0 ) { return message.error('请添加选项要展示的数据') @@ -156,7 +150,7 @@ formRef.value.validate().then(() => { submitLoading.value = true const formDataParam = cloneDeep(formData.value) - if (formDataParam.showType === 'input' || formDataParam.showType === 'inputNumber') { + if (formDataParam.showType === 'a-input' || formDataParam.showType === 'a-input-number') { formDataParam.showValues = '' } else { formDataParam.showValues = JSON.stringify(selectableData.value) diff --git a/src/views/biz/extendedField/index.vue b/src/views/biz/extendedField/index.vue index c9b4d70..2319da1 100644 --- a/src/views/biz/extendedField/index.vue +++ b/src/views/biz/extendedField/index.vue @@ -62,10 +62,10 @@