From 75e523724e6c4aa0243018a24f34052a265cf4c3 Mon Sep 17 00:00:00 2001 From: e <2432808546@qq.com> Date: Fri, 29 Oct 2021 14:51:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 10 ++++++++++ package.json | 1 + src/views/customer/customer.vue | 2 +- src/views/user/User.vue | 24 +++++++++++++++--------- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2d5f464..675399b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1988,6 +1988,16 @@ "object.assign": "^4.1.0" } }, + "babel-plugin-import": { + "version": "1.13.3", + "resolved": "https://registry.nlark.com/babel-plugin-import/download/babel-plugin-import-1.13.3.tgz", + "integrity": "sha1-nbu6fRrHK9QSkXqDDUReAJQdJtc=", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/runtime": "^7.0.0" + } + }, "babel-plugin-module-resolver": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-3.2.0.tgz", diff --git a/package.json b/package.json index b3591f0..9cca2ce 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "devDependencies": { "@vue/cli-plugin-babel": "^3.9.0", "@vue/cli-service": "^3.9.0", + "babel-plugin-import": "^1.13.3", "element-theme-chalk": "^2.13.0", "sass-loader": "^8.0.0", "vue-template-compiler": "^2.6.10" diff --git a/src/views/customer/customer.vue b/src/views/customer/customer.vue index 89e904c..fb964cc 100644 --- a/src/views/customer/customer.vue +++ b/src/views/customer/customer.vue @@ -33,7 +33,7 @@ - + diff --git a/src/views/user/User.vue b/src/views/user/User.vue index d5ed012..81a1617 100644 --- a/src/views/user/User.vue +++ b/src/views/user/User.vue @@ -218,10 +218,6 @@ export default { value: 2, label: '数据平台' }, - { - value: 3, - label: '中台' - } ], page: 1, pageSize: 10, @@ -373,7 +369,11 @@ export default { id: row.userId, isEnable: val }).then(res => { - this.$message.success(val ? '启用成功' : '禁用成功') + if(res.code == '200') { + this.$message.success(val ? '启用成功' : '禁用成功') + }else{ + this.$message.success(res.message) + } }).catch(res => {}) }, handleSelectionChange(val) { @@ -386,10 +386,16 @@ export default { type: 'warning' }).then(() => { this.$post(this.api.delUserAccounts,delList).then(res => { - this.multipleSelection = []; - this.$message.success('删除成功') - this.getData() - }).catch(res => {}) + + }).catch(res => { + if(res.code == '200') { + this.multipleSelection = []; + this.$message.success('删除成功') + this.getData() + }else{ + this.$message.success(res.message) + } + }) }).catch(() => {}) }else{ this.$message.error('请先选择客户 !')