From 0bf60b46c6fa1c74dc60152c98a61992bd217805 Mon Sep 17 00:00:00 2001 From: JINGYJ <1458671527@qq.com> Date: Wed, 3 Jul 2024 10:38:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B5=81=E7=A8=8B=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=A4=9A=E9=80=89bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/createForm.vue | 31 ++++++++++--------- .../components/updateForm.vue | 30 +++++++++--------- .../processConfiguration/index.vue | 4 +-- .../compontents/accountDrawer.vue | 5 ++- .../sublibraryManagement/index.vue | 27 +++++++++------- 5 files changed, 54 insertions(+), 43 deletions(-) diff --git a/src/views/businessManagement/processConfiguration/components/createForm.vue b/src/views/businessManagement/processConfiguration/components/createForm.vue index ecaa633..f441181 100644 --- a/src/views/businessManagement/processConfiguration/components/createForm.vue +++ b/src/views/businessManagement/processConfiguration/components/createForm.vue @@ -47,7 +47,7 @@ const processForm = reactive({ }); const checkAll = ref(false); const indeterminate = ref(false); -const value = ref([]); +// const value = ref([]); const subLibraryIdList = ref([]); const roleNameList = ref([]); const userNameList = ref([]); @@ -85,22 +85,25 @@ const rules = reactive({ remark: [{ required: true, message: "请输入", trigger: "blur" }] }); -watch(value, val => { - if (val.length === 0) { - checkAll.value = false; - indeterminate.value = false; - } else if (val.length === subLibraryIdList.value.length) { - checkAll.value = true; - indeterminate.value = false; - } else { - indeterminate.value = true; +watch( + () => processForm.baseIdList, + val => { + if (val.length === 0) { + checkAll.value = false; + indeterminate.value = false; + } else if (val.length === subLibraryIdList.value.length) { + checkAll.value = true; + indeterminate.value = false; + } else { + indeterminate.value = true; + } } -}); +); const handleCheckAll = (val: CheckboxValueType) => { indeterminate.value = false; if (val) { - processForm.baseIdList = subLibraryIdList.value.map(_ => _.value); + processForm.baseIdList = subLibraryIdList.value.map(_ => _.baseId); } else { processForm.baseIdList = []; } @@ -267,8 +270,8 @@ onMounted(() => { 知识报送 - 知识删除 - 知识撤回 + 知识删除 + 知识撤回
流程设计
diff --git a/src/views/businessManagement/processConfiguration/components/updateForm.vue b/src/views/businessManagement/processConfiguration/components/updateForm.vue index 3db8986..0a81de1 100644 --- a/src/views/businessManagement/processConfiguration/components/updateForm.vue +++ b/src/views/businessManagement/processConfiguration/components/updateForm.vue @@ -55,7 +55,6 @@ const processForm = reactive({ }); const checkAll = ref(false); const indeterminate = ref(false); -const value = ref([]); const subLibraryIdList = ref([]); const roleNameList = ref([]); const userNameList = ref([]); @@ -93,22 +92,25 @@ const rules = reactive({ remark: [{ required: true, message: "请输入", trigger: "blur" }] }); -watch(value, val => { - if (val.length === 0) { - checkAll.value = false; - indeterminate.value = false; - } else if (val.length === subLibraryIdList.value.length) { - checkAll.value = true; - indeterminate.value = false; - } else { - indeterminate.value = true; +watch( + () => processForm.baseIdList, + val => { + if (val.length === 0) { + checkAll.value = false; + indeterminate.value = false; + } else if (val.length === subLibraryIdList.value.length) { + checkAll.value = true; + indeterminate.value = false; + } else { + indeterminate.value = true; + } } -}); +); const handleCheckAll = (val: CheckboxValueType) => { indeterminate.value = false; if (val) { - processForm.baseIdList = subLibraryIdList.value.map(_ => _.value); + processForm.baseIdList = subLibraryIdList.value.map(_ => _.baseId); } else { processForm.baseIdList = []; } @@ -292,8 +294,8 @@ onMounted(() => { 知识报送 - 知识删除 - 知识撤回 + 知识删除 + 知识撤回
流程设计
diff --git a/src/views/businessManagement/processConfiguration/index.vue b/src/views/businessManagement/processConfiguration/index.vue index 9751e33..2c6a0ca 100644 --- a/src/views/businessManagement/processConfiguration/index.vue +++ b/src/views/businessManagement/processConfiguration/index.vue @@ -1,7 +1,7 @@