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 + } + }) + } + } }