From a5cf21f0dd0852a4dc1cae5684410fd67fce37be Mon Sep 17 00:00:00 2001 From: "LAPTOP-7F135LL2\\jly" <48982819@qq.com> Date: Fri, 18 Aug 2023 15:17:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=82=E7=BA=A7=E5=A4=84=E7=90=86=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=86=8D=E6=AC=A1=E4=B8=8A=E6=8A=A5=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/events/appeal-cssb-list.vue | 762 +++++++++++------- 1 file changed, 465 insertions(+), 297 deletions(-) diff --git a/src/views/modules/events/appeal-cssb-list.vue b/src/views/modules/events/appeal-cssb-list.vue index 63305454..33adb481 100644 --- a/src/views/modules/events/appeal-cssb-list.vue +++ b/src/views/modules/events/appeal-cssb-list.vue @@ -1,303 +1,471 @@ \ No newline at end of file +import green from '@/assets/img/green_img.png' +import red from '@/assets/img/red_img.png' +import yellow from '@/assets/img/yellow_img.png' +import mixinViewModule from '@/mixins/view-module' +import AddOrUpdate from './appeal-cssb-add' +import CssbReason from './appeal-cssb-reason' +export default { + mixins: [mixinViewModule], + name: 'AppealList', + data() { + return { + green, + red, + yellow, + mixinViewModuleOptions: { + getDataListURL: '/events/item/epdcpage', + getDataListIsPage: true, + exportURL: '/events/item/unexport' + }, + dataForm: { + id: '', + startTime: '', + endTime: '', + streetId: '', + communityId: '', + gridId: '', + itemCode: '', + itemContent: '', + nickName: '', + mobile: '', + peopleFlag: '', + evaluationScore: '', + itemState: 0 + }, + ids: [], + options: [], + cssbReasonVisible: false, + addOrUpdateVisible: false, + pickerBeginDateBefore: { + disabledDate: (time) => { + let beginDateVal = this.dataForm.endTime + if (beginDateVal) { + return time.getTime() > new Date(beginDateVal + ' 00:00:00').getTime() + } + } + }, + pickerBeginDateAfter: { + disabledDate: (time) => { + let EndDateVal = this.dataForm.startTime + if (EndDateVal) { + return time.getTime() < new Date(EndDateVal + ' 00:00:00').getTime() + } + } + }, + ifShowCssbAction: false, + againEscalationId: null, + itemHandleDeptId: null + } + }, + components: { + AddOrUpdate, + CssbReason + }, + created: function () { + this.getPeoList() + this.getOptions() + }, + watch: { + ids: function (val) { + if (val.length === 0) { + this.dataForm.streetId = '' + this.dataForm.communityId = '' + this.dataForm.gridId = '' + } + if (val.length === 1) { + this.dataForm.streetId = this.ids[0] + this.dataForm.communityId = '' + this.dataForm.gridId = '' + } + if (val.length === 2) { + this.dataForm.streetId = this.ids[0] + this.dataForm.communityId = this.ids[1] + this.dataForm.gridId = '' + } + if (val.length === 3) { + this.dataForm.streetId = this.ids[0] + this.dataForm.communityId = this.ids[1] + this.dataForm.gridId = this.ids[2] + } + } + }, + methods: { + getOptions() { + this.$http.get(`/sys/user/deptOptions/getByLoginUser`).then(({ + data: res + }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.options = res.data.options + }).catch(() => { }) + }, + getPeoList() { + console.log(this.dataList) + }, + dealAction(id) { + this.$parent.selectComponent = 'AppealDetailView' + this.$router.push({ + path: '/events-appeal-cssb', + query: { + id: id + } + }) + }, + cssbAction() { + this.cssbReasonVisible = true + this.$nextTick(() => { + this.$refs.cssbReason.dataForm.id = this.againEscalationId; + this.$refs.cssbReason.init() + this.ifShowCssbAction = false + }) + }, + evaluationIssue(id) { + this.$confirm('确认要下发评价么?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + + this.$http['post']('events/item/evaluationIssue', { itemId: id }).then(({ + data: res + }) => { + console.log(res) + this.$message({ + type: 'success', + message: '下发评价成功' + }); + + + this.getDataList() + // if (res.code !== 0) { + // return this.$message.error(res.msg) + // } + // this.$message({ + // message: this.$t('prompt.success'), + // type: 'success', + // duration: 500, + // onClose: () => { + // this.visible = false + // this.$emit('refreshDataList') + // } + // }) + }).catch(() => { }) + + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消下发评价' + }); + }); + + }, + addAppealEnforcement() { + this.addOrUpdateVisible = true + this.$nextTick(() => { + this.$refs.addOrUpdate.init() + }) + }, + btKeyUpItemContent(e) { + e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, + '') + this.dataForm.itemContent = e.target.value + }, + goShowCssbActionPopup(id, itemHandleDeptId) { + this.ifShowCssbAction = true; + this.againEscalationId = id + this.itemHandleDeptId = itemHandleDeptId + }, + reportAgain() { + this.$confirm('确认要再次上报吗么?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + const condition = { + id: this.againEscalationId || null, + handleCategory: 3000, + handlerDept: this.itemHandleDeptId, + handlerDeptId: this.itemHandleDeptId + } + this.$http['post']('events/item/reportWGH', condition).then(({ + data: res + }) => { + if (res && res.code == 0) { + this.$message({ + type: 'success', + message: '再次上报成功' + }); + } else { + this.$message({ + type: 'success', + message: res.msg + }); + } + this.ifShowCssbAction = false + }).catch(() => { }) + + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消' + }); + }); + } + + } +} + + + \ No newline at end of file