From 32770d1116ae6396e19349435be6e0f25bbf5d69 Mon Sep 17 00:00:00 2001 From: yuejiayang <146344614+YangLei105@users.noreply.github.com> Date: Tue, 2 Jul 2024 09:22:01 +0800 Subject: [PATCH] =?UTF-8?q?2024.7.2=20=E4=BA=A7=E5=93=81=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E6=94=B6=E9=9B=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eam/eamBuDocumentListDefinition.vue | 82 ++++++++++++++----- 1 file changed, 63 insertions(+), 19 deletions(-) diff --git a/src/views/modules/eam/eamBuDocumentListDefinition.vue b/src/views/modules/eam/eamBuDocumentListDefinition.vue index cc05fa4..aaca8a6 100644 --- a/src/views/modules/eam/eamBuDocumentListDefinition.vue +++ b/src/views/modules/eam/eamBuDocumentListDefinition.vue @@ -130,7 +130,7 @@ - + - + { - if (data && data.code === '0') { - this.getDataList() - this.modalFlag=false - this.disableButton = false - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => {} - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) + if (this.modalCompareData.projectCategory !== this.modalData.projectCategory || this.modalCompareData.projectPhase !== this.modalData.projectPhase) { + // 用户进行了修改,可以继续保存数据 + // 向后端发送保存请求的逻辑 + eamBuDocumentEdit(this.modalData).then(({data}) => { + if (data && data.code === '0') { + this.getDataList() + this.modalFlag=false + this.disableButton = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + this.modalCompareData.projectPhase = '' + this.modalCompareData.projectCategory = '' + } else { + // 用户没有修改数据,不需要保存 + this.modalCompareData.projectPhase = '' + this.modalCompareData.projectCategory = '' + this.modalFlag = false; + this.disableButton = false; + } } }, @@ -929,6 +970,9 @@ this.authUpdate = !updateFlag this.authDelete = !deleteFlag }, + handleInput() { + this.isDataModified = true; + } } }