From 9cdce928db2c8d664495864ee5cf85c229973fb8 Mon Sep 17 00:00:00 2001 From: danshihao Date: Wed, 13 Dec 2023 16:49:42 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=9D=83=E9=99=90=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PermissionApplicationProcess.vue | 61 +++++++------- .../modules/BaseInfoTable.vue | 80 ++++++++++--------- 2 files changed, 72 insertions(+), 69 deletions(-) diff --git a/src/views/workCenter/permissionApplicationProcess/PermissionApplicationProcess.vue b/src/views/workCenter/permissionApplicationProcess/PermissionApplicationProcess.vue index 16c9c404..741ca5be 100644 --- a/src/views/workCenter/permissionApplicationProcess/PermissionApplicationProcess.vue +++ b/src/views/workCenter/permissionApplicationProcess/PermissionApplicationProcess.vue @@ -57,22 +57,14 @@
{{ $t('basicServiceInformation') }}
- + - - - - - - - + + + + + + + - + { if (res.success) { const data = res.result || {} - if (this.isInitiate) { - // 节点一保存时回显表格 - this.$refs.baseInfoTable.setData(data.lawsEnterpriseStandardList || []) - } + const list = data.lawsEnterpriseStandardList || [] + // 发起节点的表格和审批节点的表格,哪个存在回显哪个的数据 + this.$refs.baseInfoTable && this.$refs.baseInfoTable.setData(list) + this.$refs.applyPermissionTable && this.$refs.applyPermissionTable.setData(list) // 保存并回显表单信息 + this.info = cloneDeep(data) this.formInfo = data this.baseInfoForm.setFieldsValue({ expirationDate: data.expirationDate, @@ -373,6 +363,10 @@ export default { if (this.isInitiate && this.$refs.baseInfoTable.dataSource.length === 0) { this.$message.warning(this.$t('addAtLeastOneRowOfData')) throw new Error('base') + } else if (!this.isInitiate && this.$refs.applyPermissionTable.dataSource.length === 0) { + // 其他节点判断表单中的表格是否有数据 + this.$message.warning(this.$t('addAtLeastOneRowOfData')) + throw new Error('base') } const params = {} // 收集所有表单信息 @@ -493,6 +487,7 @@ export default { this.$message.warn(res.message) } }).catch((err) => { + console.log(err) this.switchChange(err.message) }).finally(() => { this.loading = false diff --git a/src/views/workCenter/permissionApplicationProcess/modules/BaseInfoTable.vue b/src/views/workCenter/permissionApplicationProcess/modules/BaseInfoTable.vue index 30ceac65..83e8fdeb 100644 --- a/src/views/workCenter/permissionApplicationProcess/modules/BaseInfoTable.vue +++ b/src/views/workCenter/permissionApplicationProcess/modules/BaseInfoTable.vue @@ -1,6 +1,6 @@