diff --git a/src/views/modules/case/typicalcase.vue b/src/views/modules/case/typicalcase.vue index b639e63b..bb569152 100644 --- a/src/views/modules/case/typicalcase.vue +++ b/src/views/modules/case/typicalcase.vue @@ -6,10 +6,10 @@ - + - + @@ -19,7 +19,7 @@ - {{"新增典型案例"}} + {{"新增典型案例"}} @@ -32,9 +32,9 @@ @@ -61,10 +61,11 @@ import mixinViewModule from '@/mixins/view-module' import AddOrUpdate from './typicalcase-add-or-update' export default { mixins: [mixinViewModule], + name: 'CaseInfoList', data () { return { mixinViewModuleOptions: { - getDataListURL: '/cloudAnalysis/typicalcase/export', + getDataListURL: '/cloudAnalysis/typicalcase/page', getDataListIsPage: true }, dataForm: { @@ -78,32 +79,18 @@ export default { 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(() => {}) + UpdateStateOn (id) { + this.mixinViewModuleOptions.getDataListURL = '/cloudAnalysis/typicalcase/on' + '/' + id + this.getDataList() }, - 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(() => {}) + UpdateStateOff (id) { + this.mixinViewModuleOptions.getDataListURL = '/cloudAnalysis/typicalcase/off' + '/' + id + this.getDataList() }, - getDataOne () { - this.$router.push({ - name: 'AddOrUpdate', - params: { - id: this.id, - add: false - } - }) + detailHandle (id) { + this.$parent.selectComponent = 'CaseInfoDetailView' + this.$router.push({ path: '/case-typicalcasedetail', query: { id: id } }) } - } }