From 0377083bd7d5ed00de2db3798f799cd7e651e9e9 Mon Sep 17 00:00:00 2001 From: TiaStars Date: Wed, 20 Nov 2024 16:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assetsManagement/assetsAuth.vue | 21 +++++++++++++------ .../auditPages/assetsManagement/index.vue | 14 ++++++------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/views/auditPages/assetsManagement/assetsAuth.vue b/src/views/auditPages/assetsManagement/assetsAuth.vue index 1be40e3..b4def81 100644 --- a/src/views/auditPages/assetsManagement/assetsAuth.vue +++ b/src/views/auditPages/assetsManagement/assetsAuth.vue @@ -2865,12 +2865,21 @@ export default { this.xjgywxt.remark = this.radio; } this.loading = true; - assetUnitData('post',this.ruleForm).then(res=>{ - console.log(res,"res"); - this.loading = false; - this.$modal.msgSuccess("新增成功"); - this.$router.go(-1); - }) + if(this.$route.query.pageType == 'change') { + assetUnitData('put',this.ruleForm).then(res=>{ + console.log(res,"res"); + this.loading = false; + this.$modal.msgSuccess("修改成功"); + this.$router.go(-1); + }) + } else { + assetUnitData('post',this.ruleForm).then(res=>{ + console.log(res,"res"); + this.loading = false; + this.$modal.msgSuccess("新增成功"); + this.$router.go(-1); + }) + } }, }, } diff --git a/src/views/auditPages/assetsManagement/index.vue b/src/views/auditPages/assetsManagement/index.vue index 4007d84..dafea29 100644 --- a/src/views/auditPages/assetsManagement/index.vue +++ b/src/views/auditPages/assetsManagement/index.vue @@ -112,7 +112,7 @@ --> - +