diff --git a/src/views/modules/case/item-detail.vue b/src/views/modules/case/item-detail.vue index 7d0c127e..b97c5d89 100644 --- a/src/views/modules/case/item-detail.vue +++ b/src/views/modules/case/item-detail.vue @@ -6,10 +6,9 @@ width="80%">
-
-
-
议题详情
- +
+
议题详情
+
{{dataForm.itemContent}}
@@ -48,62 +47,60 @@ 支持 {{dataForm.approveNum}}   不支持 {{dataForm.opposeNum}}
-
-
上报位置: {{dataForm.issueAddress}}
-
-
+
+
+
上报位置: {{dataForm.issueAddress}}
+
-
-
处理进展
- - -
-
- {{item.type === 'project' ? '项目': item.type === 'issue' || item.type === 'issue-project' ? '议题' : ''}} -
-
[{{item | formatState}}] {{item.createdTime}}
-
-
来源社群:{{item.groupName}}
-
处理人:{{item.handlerDept}}
-
处理人电话:{{item.mobile}}
-
-
-
处理部门:{{item.handlerDept}}
-
-
-
被吹哨部门:
-
+
+
+
处理进展
+ + +
+
+ {{item.type === 'project' ? '项目': item.type === 'issue' || item.type === 'issue-project' ? '议题' : ''}} +
+
[{{item | formatState}}] {{item.createdTime}}
+
+
来源社群:{{item.groupName}}
+
处理人:{{item.handlerDept}}
+
处理人电话:{{item.mobile}}
+
+
+
处理部门:{{item.handlerDept}}
+
+
+
被吹哨部门:
+
{{ csDept.deptName }}
-
-
-
处理意见: {{item.advice}}
-
- -
-
-
-
- - 返回 - +
处理意见: {{item.advice}}
+
+ + +
+
+ + +
+
+ 返回
@@ -322,56 +319,99 @@ export default { diff --git a/src/views/modules/case/typicalcase-add-or-update.vue b/src/views/modules/case/typicalcase-add-or-update.vue index 1d999c06..63b301f1 100644 --- a/src/views/modules/case/typicalcase-add-or-update.vue +++ b/src/views/modules/case/typicalcase-add-or-update.vue @@ -233,7 +233,6 @@ export default { this.dataForm.dynamicItem[connectResponse.caseIndex].expressingAttitude = connectResponse.participantsNum this.requiredFlag = true - this.dataForm.caseNumber = this.dataForm.caseNumber + 1 }, addConnect(index){ this.connectListVisible = true @@ -315,7 +314,11 @@ export default { alert("请关联案例!") return false } - + for(let item of this.dataForm.dynamicItem) { + if(item.associatedId != '') { + this.dataForm.caseNumber = this.dataForm.caseNumber + 1 + } + } this.$http[!this.dataForm.id ? 'post' : 'put']('/cloudAnalysis/typicalcase', this.dataForm).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) @@ -325,8 +328,7 @@ export default { type: 'success', duration: 500, onClose: () => { - this.visible = false - this.$emit('refreshDataList') + this.back() } }) }).catch(() => {}) diff --git a/src/views/modules/case/typicalcase-list.vue b/src/views/modules/case/typicalcase-list.vue index f047b903..595b275c 100644 --- a/src/views/modules/case/typicalcase-list.vue +++ b/src/views/modules/case/typicalcase-list.vue @@ -5,12 +5,27 @@ - - - - - - + + + + + + + + {{ $t('query') }} @@ -27,12 +42,14 @@ + @@ -59,6 +76,7 @@ import mixinViewModule from '@/mixins/view-module' import AddOrUpdate from './typicalcase-add-or-update' import CaseInfoDetailView from './typicalcase-detail' +import {debounce} from 'lodash' export default { mixins: [mixinViewModule], name: 'CaseInfoList', @@ -72,7 +90,23 @@ export default { caseTitle: '', startTime: '', endTime: '' - } + }, + pickerBeginDateBefore: { + disabledDate: (time) => { + let beginDateVal = this.dataForm.startTime + if (beginDateVal) { + return time.getTime() > new Date(beginDateVal).getTime() + } + } + }, + pickerBeginDateAfter: { + disabledDate: (time) => { + let EndDateVal = this.dataForm.endTime + if (EndDateVal) { + return time.getTime() < new Date(EndDateVal).getTime() + } + } + } } }, components: { @@ -83,22 +117,59 @@ export default { this.getDataList() }, methods: { - UpdateStateOn (id) { - this.mixinViewModuleOptions.getDataListURL = '/cloudAnalysis/typicalcase/on' + '/' + id - this.getDataList() - }, - UpdateStateOff (id) { - this.mixinViewModuleOptions.getDataListURL = '/cloudAnalysis/typicalcase/off' + '/' + id - this.getDataList() - }, + // UpdateStateOn (id) { + // this.mixinViewModuleOptions.getDataListURL = '/cloudAnalysis/typicalcase/on' + '/' + id + // this.getDataList() + // }, + // UpdateStateOff (id) { + // this.mixinViewModuleOptions.getDataListURL = '/cloudAnalysis/typicalcase/off' + '/' + id + // this.getDataList() + // }, detailHandle (id) { this.$parent.selectComponent = 'CaseInfoDetailView' this.$router.push({ path: '/case-typicalcase', query: { id: id } }) }, + formatState: function (row, column) { + let state = row.state + if (state == 1) { + return '上架' + } else if (state == 0) { + return '下架' + } + }, + changeGroundingText(state){ + let status = state + if (status == 1) { + return '下架' + } else if (status == 0) { + return '上架' + } + }, addHandle () { this.$parent.selectComponent = 'CaseInfoAdd' this.$router.push({ path: '/case-typicalcase' }) - } + }, + changeGroundingHandle: debounce(function (row) { + this.$confirm(this.$t('prompt.info', { 'handle': this.changeGroundingText(row.state) }), this.$t('prompt.title'), { + confirmButtonText: this.$t('confirm'), + cancelButtonText: this.$t('cancel'), + type: 'warning' + }).then(() => { + this.$http.get(`/cloudAnalysis/typicalcase/updateState/${row.id}`).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.getDataList() + } + }) + }).catch(() => {}) + }).catch(() => {}) + }, 1000, { 'leading': true, 'trailing': false }) } }