From b82206e6fdb0db38cc910a49172a27ad39f5508a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=BB=B6=E7=A6=8F?= <> Date: Mon, 3 Jul 2023 13:15:23 +0800 Subject: [PATCH] =?UTF-8?q?style:=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99?= =?UTF-8?q?=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/risk/assessment/work/work.component.html | 2 +- src/views/risk/assessment/work/work.component.vue | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/views/risk/assessment/work/work.component.html b/src/views/risk/assessment/work/work.component.html index 3166e05..549b357 100644 --- a/src/views/risk/assessment/work/work.component.html +++ b/src/views/risk/assessment/work/work.component.html @@ -44,7 +44,7 @@ - { public stepUpdateParams = {} as any; - public currentId = -1; - public treeData = [] as any; public formActions = [{ @@ -475,8 +473,8 @@ export default class WorkManagerComponent extends BaseRecordComponent { this.updateParams.safetyFactor = this.updateParams.safetyFactor.join(","); this.updateParams.stepNum = this.updateParams.steps.length; this.updateParams.postCode = this.updateParams.postCode.join(";") - this.tableService.addOrUpdate(this.updateParams, this.currentId === -1).then((res) => { - this.$message.success(this.currentId === -1 ? "新增成功!" : "编辑成功!"); + this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id).then((res) => { + this.$message.success(!this.updateParams.id? "新增成功!" : "编辑成功!"); this.updateParams = { postCode: [], safetyFactor: [] @@ -501,13 +499,11 @@ export default class WorkManagerComponent extends BaseRecordComponent { public showUpdateModel(row?, isRead?) { this.isReadonly = !!isRead; if (!row) { - this.currentId = -1; this.updateParams = { steps: [], identifyTime: moment().format('YYYY-MM-DD'), identifyUserId: this.account.userId, } as any; } else { - this.currentId = row.id; this.updateParams = JSON.parse(JSON.stringify(row)); if (!this.updateParams.steps) {