From 0a5aa6d661792aff8334f8e3cd1f2bcc36afd417 Mon Sep 17 00:00:00 2001 From: maguoqiang <1098581467@qq.com> Date: Fri, 21 Feb 2020 18:39:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=8F=E5=85=B8=E6=A1=88=E4=BE=8B=E5=89=8D?= =?UTF-8?q?=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../case/typicalcase-add-or-update.vue | 2 +- src/views/modules/case/typicalcase.vue | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/views/modules/case/typicalcase-add-or-update.vue b/src/views/modules/case/typicalcase-add-or-update.vue index 0616e614..2952be65 100644 --- a/src/views/modules/case/typicalcase-add-or-update.vue +++ b/src/views/modules/case/typicalcase-add-or-update.vue @@ -152,7 +152,7 @@ export default { if (!valid) { return false } - this.$http[!this.dataForm.id ? 'post' : 'put']('/typicalcase/', this.dataForm).then(({ data: res }) => { + this.$http[!this.dataForm.id ? 'post' : 'put']('/typicalcase/addcase', this.dataForm).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } diff --git a/src/views/modules/case/typicalcase.vue b/src/views/modules/case/typicalcase.vue index 813e9ed9..2b4a30aa 100644 --- a/src/views/modules/case/typicalcase.vue +++ b/src/views/modules/case/typicalcase.vue @@ -76,6 +76,34 @@ export default { }, components: { AddOrUpdate + }, + methods: { + UpdateStateOn () { + return this.$http.get('/typicalcase/UpdateStateOn').then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + window.SITE_CONFIG['permissions'] = res.data + }).catch(() => {}) + }, + UpdateStateOff () { + return this.$http.get('/typicalcase/UpdateStateOff').then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + window.SITE_CONFIG['permissions'] = res.data + }).catch(() => {}) + }, + getDataList () { + this.$router.push({ + name: 'AddOrUpdate', + params: { + id: this.id, + add: false + } + }) + } + } }