From 6d5f86db771e218beb1932bcca3a16995430b063 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Thu, 25 Jul 2024 16:25:17 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8E=A8=E9=80=81=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=8A=A0=E4=B8=A4=E4=B8=AA=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/communityService/fuwuzhaoren/personList.vue | 4 +++- src/views/modules/communityService/policy/personList.vue | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/modules/communityService/fuwuzhaoren/personList.vue b/src/views/modules/communityService/fuwuzhaoren/personList.vue index 0e37dd04d..531857f8b 100644 --- a/src/views/modules/communityService/fuwuzhaoren/personList.vue +++ b/src/views/modules/communityService/fuwuzhaoren/personList.vue @@ -451,7 +451,9 @@ sendFindPeopleMsg(){ categoryCode: this.selfObj.categoryCode, resiList: this.selectedPersonListIds, serviceTimeStart: this.selfObj.serviceTimeStart, - serviceTimeEnd: this.selfObj.serviceTimeEnd + serviceTimeEnd: this.selfObj.serviceTimeEnd, + serviceRecordId:this.selfObj.serviceRecordId, + serviceName:this.selfObj.serviceName } this.$http .post("/actual/base/communityPublicity/sendFindPeopleMsg",parm) diff --git a/src/views/modules/communityService/policy/personList.vue b/src/views/modules/communityService/policy/personList.vue index 0c404b7b9..2ab77460c 100644 --- a/src/views/modules/communityService/policy/personList.vue +++ b/src/views/modules/communityService/policy/personList.vue @@ -458,7 +458,9 @@ export default { categoryCode: this.selfObj.categoryCode, resiList: this.selectedPersonListIds, serviceTimeStart: this.selfObj.serviceTimeStart, - serviceTimeEnd: this.selfObj.serviceTimeEnd + serviceTimeEnd: this.selfObj.serviceTimeEnd, + serviceRecordId:this.selfObj.id, + serviceName:this.selfObj.title } this.$http .post("/actual/base/communityPublicity/sendFindPeopleMsg",parm) From 7d4a019a3e848997dd63a9a9dfc04ca94bdac445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?= <819653817@qq.com> Date: Fri, 26 Jul 2024 15:38:50 +0800 Subject: [PATCH 2/3] 12345 --- .../modules/shequzhili/Delivery/index.vue | 789 +++++++++- .../modules/shequzhili/analysis/index.vue | 1311 ++++++++++++++--- .../shequzhili/eventHandling/index.vue | 757 +++++++++- .../modules/shequzhili/timeOut/index.vue | 761 +++++++++- 4 files changed, 3263 insertions(+), 355 deletions(-) diff --git a/src/views/modules/shequzhili/Delivery/index.vue b/src/views/modules/shequzhili/Delivery/index.vue index 6f1d1bdea..bddfc1412 100644 --- a/src/views/modules/shequzhili/Delivery/index.vue +++ b/src/views/modules/shequzhili/Delivery/index.vue @@ -4,24 +4,24 @@ -
- -
+ + this.getOrgTreeList() + this.getGridList() + this.getTableData(); + this.getCateOptions(); + }, + methods: { + handleEventType(val) { + const nodes = this.$refs.cascaderEvent.getCheckedNodes(); + this.formData.firstIdList = []; + this.formData.secondIdList = []; + let level1 = nodes.filter((item) => item.level === 1); + let level2 = nodes.filter((item) => item.level === 2); + level1.forEach((item) => { + if (item.hasChildren) { + for (let i = level2.length - 1; i >= 0; i--) { + if (level2[i].parent.value === item.value) level2.splice(i, 1); + } + } + }); + this.formData.firstIdList = level1.map((item) => item.value); + this.formData.secondIdList = level2.map((item) => item.value); + }, + handleSelectionChange(val) { + this.multipleSelection = []; + val.forEach((element) => { + this.multipleSelection.push(element.icEventId); + }); + }, + async handleMarkDiffcult(command) { + const url = "/governance/icEvent/difficultpointevent"; + if (this.multipleSelection.length == 0) { + this.$message.warning('请选择需要标记的事件') + return + } + let params = { + icEventIdList: this.multipleSelection, + type: command, + }; + const { data, code, msg } = await requestPost(url, params); + if (code === 0) { + this.$message.success("标记成功"); + this.getTableData(); + } else { + this.$message.error(msg); + } + }, + async handleCancalDiffcult() { + const url = "/governance/icEvent/difficultpointevent"; + if (this.multipleSelection.length == 0) { + this.$message.warning('请选择取消标记的事件') + return + } + let params = { + icEventIdList: this.multipleSelection, + type: "0", + }; + const { data, code, msg } = await requestPost(url, params); + if (code === 0) { + this.$message.success("取消标记成功"); + this.getTableData(); + } else { + this.$message.error(msg); + } + }, + + handleSearch(val) { + console.log(val,"skjhfjbhjksdh"); + this.pageNo = 1; + this.getTableData(); + }, + + // 查看 + async handleLook(row) { + + let { agencyId, gridId, gridName, name, reportUserId } = row + const resiId = reportUserId; + this.$store.dispatch('saveData', { agencyId, gridId, gridName, name, resiId }); + this.$router.push({ name: 'jumin-huaxiang' }); + this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => { + if (item.name === "jumin-huaxiang") { + return {...item, title: name }; + } + return item; + }); + }, + + async handleExport() { + const url = "/governance/icEvent/export"; + const { pageSize, pageNo, formData } = this; + axios({ + url: window.SITE_CONFIG["apiURL"] + url, + method: "post", + data: { + pageSize, + pageNo, + ...formData, + }, + responseType: "blob", + }) + .then((res) => { + let fileName = window.decodeURI( + res.headers["content-disposition"].split(";")[1].split("=")[1] + ); + let blob = new Blob([res.data], { type: "application/vnd.ms-excel" }); + var url = window.URL.createObjectURL(blob); + var aLink = document.createElement("a"); + aLink.style.display = "none"; + aLink.href = url; + aLink.setAttribute("download", fileName); + document.body.appendChild(aLink); + aLink.click(); + document.body.removeChild(aLink); //下载完成移除元素 + window.URL.revokeObjectURL(url); //释放掉blob对象 + }) + .catch((err) => { + return this.$message.error("网络错误"); + }); + }, + + async handleAdd() { + this.pageType = "add"; + }, + + async handleWatch(row) { + this.eventId = row.icEventId; + const url = "/governance/icEvent/detail"; + const { data, code, msg } = await requestPost(url, { + icEventId: this.eventId, + }); + if (code === 0) { + this.eventDetailData = { ...data }; + this.pageType = "info"; + } else { + this.$message.error(msg); + } + }, + + //加载组织数据 + async handleDispose(row) { + this.eventId = row.icEventId; + const url = "/governance/icEvent/detail"; + const { data, code, msg } = await requestPost(url, { + icEventId: this.eventId, + }); + if (code === 0) { + this.eventDetailData = { ...data }; + this.pageType = "dispose"; + } else { + this.$message.error(msg); + } + }, + //下载模版 + async handleExportModule() { + let url = '/governance/icEvent/downloadTemplate'; + let params = {}; + await this.$http({ + method: 'POST', + url, + responseType: 'blob', + data: params + }) + .then(res => { + if (res.headers['content-disposition']) { + let fileName = window.decodeURI(res.headers['content-disposition'].split(';')[1].split('=')[1]); + let blob = new Blob([res.data], { + type: 'application/vnd.ms-excel' + }); + var url = window.URL.createObjectURL(blob); + var aLink = document.createElement('a'); + aLink.style.display = 'none'; + aLink.href = url; + aLink.setAttribute('download', fileName); + document.body.appendChild(aLink); + aLink.click(); + document.body.removeChild(aLink); //下载完成移除元素 + window.URL.revokeObjectURL(url); //释放掉blob对象 + } else this.$message.error('下载失败'); + }) + .catch(err => { + console.log('err', err); + return this.$message.error('网络错误'); + }); + }, + handleExcelSuccess(res, file) { + if (!res.code === 0 && !res.msg === 'success') { + this.$message.error(res.msg); + } + }, + handleProgress(event, file, fileList) { + + }, + beforeExcelUpload(file) { + const isType = file.type === 'application/vnd.ms-excel'; + const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; + const fileType = isType || isTypeComputer; + const isLt1M = file.size / 1024 / 1024 < 10; + if (!fileType) { + this.$message.error('上传文件只能是xls/xlsx格式!'); + } + if (!isLt1M) { + this.$message.error('上传文件大小不能超过 10MB!'); + } + return fileType && isLt1M; + }, + importTypeChange(val) { + this.importType = val + }, + async uploadHttpRequest(file) { + this.importLoading = true; + this.importBtnTitle = '正在上传中...'; + this.$message({ + showClose: true, + dangerouslyUseHTMLString: true, + message: "导入中,请到系统管理-导入记录中查看进度", + duration: 3000 + }); + let than = this; + document.getElementById('clickA').addEventListener('click', function () { + than.$router.replace('/main/importRecord-index'); + }); + const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 + formData.append('file', file.file); //添加文件对象 + formData.append('code', ''); //添加文件对象 + let url = '/governance/icEvent/importEvent' + if (this.importType == 2) { + url = '/governance/icEvent/importAwo' + } + console.log(url) + await this.$http + .post(url, formData) + .then(res => { + if (res.data.code == 0 && res.data.msg == 'success') { + const data = res.data.data; + this.dataList = [ + ...Object.keys(data.option.exist).map(k => { + return { + index: k, + srcField: data.option.exist[k], + exist: true, + field: data.option.exist[k] + }; + }), + ...Object.keys(data.option.notExist).map(k => { + return { + index: k, + srcField: data.option.notExist[k], + exist: false, + field: '' + }; + }) + ]; + this.importOption = data.option; + this.importCode = data.code; + this.fileData = file; + } else this.$message.error(res.data.msg); + }) + .catch(err => { + console.log('失败', err); + file.onError(); //上传失败的文件会从文件列表中删除 + }); + this.importLoading = false; + this.importBtnTitle = '导入'; + this.$refs.upload.clearFiles(); + this.getTableData(); + }, + + //显示语音窗口 + handleShowVoice(url) { + this.selVoiceUrl = url; + this.showVoice = true; + }, + + handleClose() { + this.pageType = "list"; + this.eventId = ""; + this.getTableData(); + }, + handleOk() { + this.pageType = "list"; + this.eventId = ""; + this.pageNo = 1; + this.getTableData(); + }, + + handleEditSuccess() { + this.handleClose(); + this.getTableData(); + }, + + async handleDel(rowData) { + let message = "确认删除?"; + this.$confirm(message, "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }).then(() => { + this.delEvent(rowData.icEventId); + }).catch((err) => { }); + }, + async delEvent(eventId) { + const url = "/governance/icEvent/delete"; + let idsArr = [eventId]; + const { data, code, msg } = await requestPost(url, idsArr); + if (code === 0) { + this.$message.success("删除成功!"); + this.getTableData(); + } else { + this.$message.error("操作失败!"); + } + }, + async getTableData() { + const url = "/governance/icEvent/list"; + // if (this.eventTypeCheck) { + // this.formData.secondIdList = this.eventTypeCheck + // } + console.log(this.formData); + const { pageSize, pageNo, formData } = this; + // 创建新的 formData 对象,保留原始值 + const newFormData = { ...formData }; + // // 处理 agencyId + // if (Array.isArray(newFormData.agencyId) && newFormData.agencyId.length) { + // if (this.level == "grid") { + // newFormData.gridId = newFormData.agencyId[newFormData.agencyId.length - 1]; + // newFormData.agencyId = ""; + // } else { + // newFormData.agencyId = newFormData.agencyId[newFormData.agencyId.length - 1]; + // newFormData.gridId = ""; + // } + // } else { + // newFormData.agencyId = ""; + // newFormData.gridId = ""; + // } + const { data, code, msg } = await requestPost(url, { + pageSize, + pageNo, + ...newFormData, + }); + if (code === 0) { + this.total = data.total || 0; + this.tableData = data.list ? data.list.map((item) => { return item; }) : []; + } else { + this.$message.error(msg); + } + }, + async getCateOptions() { + const url = "/governance/icEvent/getCategoryTree"; + const { data, code, msg } = await requestPost(url, {}); + if (code === 0) { + this.cateOptions = this.deepTree(data, "children"); + } else { + this.$message.error(msg); + } + }, + + handleSizeChange(val) { + this.pageSize = val; + window.localStorage.setItem("pageSize", val); + this.getTableData(); + }, + handleCurrentChange(val) { + this.pageNo = val; + this.getTableData(); + }, + + + getOrgTreeList() { + this.$http + .post('/gov/org/customeragency/agencygridtree', {}) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } else { + console.log('获取组织树成功', res.data) + this.orgOptions = [] + this.orgOptions.push(res.data) + } + }) + .catch(() => { + return this.$message.error('网络错误') + }) + }, + getGridList() { + this.$http + .post('/gov/org/customergrid/gridoption', { agencyId: this.agencyId, purpose: 'addorupdate' }) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } else { + console.log('获取查询详情成功', res.data) + this.optionsG = res.data + } + }) + .catch(() => { + return this.$message.error('网络错误') + }) + }, + + handleChangeAgency(val) { + + this.sarr = [] + const map = new Map(); + this.getLastItem( + this.orgOptions, + val, + "agencyId" + ); + this.level = this.sarr[this.sarr.length - 1].level + }, + getLastItem(list, vals, key) { + let LIST = list || []; + for (let item of LIST) { + // console.log(item[key]); + for (let i of vals) { + if (item[key] === i) { + this.sarr.push(item); + } else { + this.getLastItem(item.subAgencyList, vals, key); + } + } + } + }, + + resetSearch() { + this.formData = { + agencyId: "", + gridId: "", + sourceType: "", + eventContent: "", + name: "", + mobile: "", + startTime: "", + endTime: "", + limitStartTime: "", + limitEndTime: "", + status: "", + firstIdList: [], + secondIdList: [], + }; + this.eventTypeCheck = []; + this.pageNo = 1; + this.getTableData(); + // this.loadTable() + }, + deepTree(arr, children) { + if (Array.isArray(arr) && arr.length > 0) { + return arr.map((item) => { + return { + ...item, + [children]: + (item[children] && + item[children].length > 0 && + this.deepTree(item[children], children)) || + null, + }; + }); + } + }, + showAwoList(row) { + this.$refs.awoList.open(row) + } + }, +}; + + + \ No newline at end of file diff --git a/src/views/modules/shequzhili/eventHandling/index.vue b/src/views/modules/shequzhili/eventHandling/index.vue index 6f1d1bdea..9c751de30 100644 --- a/src/views/modules/shequzhili/eventHandling/index.vue +++ b/src/views/modules/shequzhili/eventHandling/index.vue @@ -4,24 +4,24 @@ -
- -
+ + this.getOrgTreeList() + this.getGridList() + this.getTableData(); + this.getCateOptions(); + }, + methods: { + handleEventType(val) { + const nodes = this.$refs.cascaderEvent.getCheckedNodes(); + this.formData.firstIdList = []; + this.formData.secondIdList = []; + let level1 = nodes.filter((item) => item.level === 1); + let level2 = nodes.filter((item) => item.level === 2); + level1.forEach((item) => { + if (item.hasChildren) { + for (let i = level2.length - 1; i >= 0; i--) { + if (level2[i].parent.value === item.value) level2.splice(i, 1); + } + } + }); + this.formData.firstIdList = level1.map((item) => item.value); + this.formData.secondIdList = level2.map((item) => item.value); + }, + handleSelectionChange(val) { + this.multipleSelection = []; + val.forEach((element) => { + this.multipleSelection.push(element.icEventId); + }); + }, + async handleMarkDiffcult(command) { + const url = "/governance/icEvent/difficultpointevent"; + if (this.multipleSelection.length == 0) { + this.$message.warning('请选择需要标记的事件') + return + } + let params = { + icEventIdList: this.multipleSelection, + type: command, + }; + const { data, code, msg } = await requestPost(url, params); + if (code === 0) { + this.$message.success("标记成功"); + this.getTableData(); + } else { + this.$message.error(msg); + } + }, + async handleCancalDiffcult() { + const url = "/governance/icEvent/difficultpointevent"; + if (this.multipleSelection.length == 0) { + this.$message.warning('请选择取消标记的事件') + return + } + let params = { + icEventIdList: this.multipleSelection, + type: "0", + }; + const { data, code, msg } = await requestPost(url, params); + if (code === 0) { + this.$message.success("取消标记成功"); + this.getTableData(); + } else { + this.$message.error(msg); + } + }, + + handleSearch(val) { + this.pageNo = 1; + this.getTableData(); + }, + // 查看 + async handleLook(row) { + + let { agencyId, gridId, gridName, name, reportUserId } = row + const resiId = reportUserId; + this.$store.dispatch('saveData', { agencyId, gridId, gridName, name, resiId }); + this.$router.push({ name: 'jumin-huaxiang' }); + this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => { + if (item.name === "jumin-huaxiang") { + return {...item, title: name }; + } + return item; + }); + }, + + async handleExport() { + const url = "/governance/icEvent/export"; + const { pageSize, pageNo, formData } = this; + axios({ + url: window.SITE_CONFIG["apiURL"] + url, + method: "post", + data: { + pageSize, + pageNo, + ...formData, + }, + responseType: "blob", + }) + .then((res) => { + let fileName = window.decodeURI( + res.headers["content-disposition"].split(";")[1].split("=")[1] + ); + let blob = new Blob([res.data], { type: "application/vnd.ms-excel" }); + var url = window.URL.createObjectURL(blob); + var aLink = document.createElement("a"); + aLink.style.display = "none"; + aLink.href = url; + aLink.setAttribute("download", fileName); + document.body.appendChild(aLink); + aLink.click(); + document.body.removeChild(aLink); //下载完成移除元素 + window.URL.revokeObjectURL(url); //释放掉blob对象 + }) + .catch((err) => { + return this.$message.error("网络错误"); + }); + }, + + async handleAdd() { + this.pageType = "add"; + }, + + async handleWatch(row) { + this.eventId = row.icEventId; + const url = "/governance/icEvent/detail"; + const { data, code, msg } = await requestPost(url, { + icEventId: this.eventId, + }); + if (code === 0) { + this.eventDetailData = { ...data }; + this.pageType = "info"; + } else { + this.$message.error(msg); + } + }, + + //加载组织数据 + async handleDispose(row) { + this.eventId = row.icEventId; + const url = "/governance/icEvent/detail"; + const { data, code, msg } = await requestPost(url, { + icEventId: this.eventId, + }); + if (code === 0) { + this.eventDetailData = { ...data }; + this.pageType = "dispose"; + } else { + this.$message.error(msg); + } + }, + //下载模版 + async handleExportModule() { + let url = '/governance/icEvent/downloadTemplate'; + let params = {}; + await this.$http({ + method: 'POST', + url, + responseType: 'blob', + data: params + }) + .then(res => { + if (res.headers['content-disposition']) { + let fileName = window.decodeURI(res.headers['content-disposition'].split(';')[1].split('=')[1]); + let blob = new Blob([res.data], { + type: 'application/vnd.ms-excel' + }); + var url = window.URL.createObjectURL(blob); + var aLink = document.createElement('a'); + aLink.style.display = 'none'; + aLink.href = url; + aLink.setAttribute('download', fileName); + document.body.appendChild(aLink); + aLink.click(); + document.body.removeChild(aLink); //下载完成移除元素 + window.URL.revokeObjectURL(url); //释放掉blob对象 + } else this.$message.error('下载失败'); + }) + .catch(err => { + console.log('err', err); + return this.$message.error('网络错误'); + }); + }, + handleExcelSuccess(res, file) { + if (!res.code === 0 && !res.msg === 'success') { + this.$message.error(res.msg); + } + }, + handleProgress(event, file, fileList) { + + }, + beforeExcelUpload(file) { + const isType = file.type === 'application/vnd.ms-excel'; + const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; + const fileType = isType || isTypeComputer; + const isLt1M = file.size / 1024 / 1024 < 10; + if (!fileType) { + this.$message.error('上传文件只能是xls/xlsx格式!'); + } + + if (!isLt1M) { + this.$message.error('上传文件大小不能超过 10MB!'); + } + return fileType && isLt1M; + }, + importTypeChange(val) { + this.importType = val + }, + async uploadHttpRequest(file) { + this.importLoading = true; + this.importBtnTitle = '正在上传中...'; + this.$message({ + showClose: true, + dangerouslyUseHTMLString: true, + message: "导入中,请到系统管理-导入记录中查看进度", + duration: 3000 + }); + let than = this; + document.getElementById('clickA').addEventListener('click', function () { + than.$router.replace('/main/importRecord-index'); + }); + const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 + formData.append('file', file.file); //添加文件对象 + formData.append('code', ''); //添加文件对象 + let url = '/governance/icEvent/importEvent' + if (this.importType == 2) { + url = '/governance/icEvent/importAwo' + } + console.log(url) + await this.$http + .post(url, formData) + .then(res => { + if (res.data.code == 0 && res.data.msg == 'success') { + const data = res.data.data; + this.dataList = [ + ...Object.keys(data.option.exist).map(k => { + return { + index: k, + srcField: data.option.exist[k], + exist: true, + field: data.option.exist[k] + }; + }), + ...Object.keys(data.option.notExist).map(k => { + return { + index: k, + srcField: data.option.notExist[k], + exist: false, + field: '' + }; + }) + ]; + this.importOption = data.option; + this.importCode = data.code; + this.fileData = file; + } else this.$message.error(res.data.msg); + }) + .catch(err => { + console.log('失败', err); + file.onError(); //上传失败的文件会从文件列表中删除 + }); + this.importLoading = false; + this.importBtnTitle = '导入'; + this.$refs.upload.clearFiles(); + this.getTableData(); + }, + + //显示语音窗口 + handleShowVoice(url) { + this.selVoiceUrl = url; + this.showVoice = true; + }, + + handleClose() { + this.pageType = "list"; + this.eventId = ""; + this.getTableData(); + }, + handleOk() { + this.pageType = "list"; + this.eventId = ""; + this.pageNo = 1; + this.getTableData(); + }, + + handleEditSuccess() { + this.handleClose(); + this.getTableData(); + }, + + async handleDel(rowData) { + let message = "确认删除?"; + this.$confirm(message, "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }).then(() => { + this.delEvent(rowData.icEventId); + }).catch((err) => { }); + }, + async delEvent(eventId) { + const url = "/governance/icEvent/delete"; + let idsArr = [eventId]; + const { data, code, msg } = await requestPost(url, idsArr); + if (code === 0) { + this.$message.success("删除成功!"); + this.getTableData(); + } else { + this.$message.error("操作失败!"); + } + }, + async getTableData() { + const url = "/governance/icEvent/list"; + if (this.eventTypeCheck) { + this.formData.secondIdList = this.eventTypeCheck + } + + const { pageSize, pageNo, formData } = this; + // 创建新的 formData 对象,保留原始值 + const newFormData = { ...formData }; + + // 处理 agencyId + if (Array.isArray(newFormData.agencyId) && newFormData.agencyId.length) { + if (this.level == "grid") { + newFormData.gridId = newFormData.agencyId[newFormData.agencyId.length - 1]; + newFormData.agencyId = ""; + } else { + newFormData.agencyId = newFormData.agencyId[newFormData.agencyId.length - 1]; + newFormData.gridId = ""; + } + } else { + newFormData.agencyId = ""; + newFormData.gridId = ""; + } + + const { data, code, msg } = await requestPost(url, { + pageSize, + pageNo, + ...newFormData, + }); + if (code === 0) { + this.total = data.total || 0; + // this.tableData = data.list ? data.list.map((item) => { return item; }) : []; + } else { + this.$message.error(msg); + } + }, + async getCateOptions() { + const url = "/governance/icEvent/getCategoryTree"; + const { data, code, msg } = await requestPost(url, {}); + if (code === 0) { + this.cateOptions = this.deepTree(data, "children"); + } else { + this.$message.error(msg); + } + }, + + handleSizeChange(val) { + this.pageSize = val; + window.localStorage.setItem("pageSize", val); + this.getTableData(); + }, + handleCurrentChange(val) { + this.pageNo = val; + this.getTableData(); + }, + + + getOrgTreeList() { + this.$http + .post('/gov/org/customeragency/agencygridtree', {}) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } else { + console.log('获取组织树成功', res.data) + this.orgOptions = [] + this.orgOptions.push(res.data) + } + }) + .catch(() => { + return this.$message.error('网络错误') + }) + }, + getGridList() { + this.$http + .post('/gov/org/customergrid/gridoption', { agencyId: this.agencyId, purpose: 'addorupdate' }) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } else { + console.log('获取查询详情成功', res.data) + this.optionsG = res.data + } + }) + .catch(() => { + return this.$message.error('网络错误') + }) + }, + + handleChangeAgency(val) { + + this.sarr = [] + const map = new Map(); + this.getLastItem( + this.orgOptions, + val, + "agencyId" + ); + this.level = this.sarr[this.sarr.length - 1].level + }, + getLastItem(list, vals, key) { + let LIST = list || []; + for (let item of LIST) { + // console.log(item[key]); + for (let i of vals) { + if (item[key] === i) { + this.sarr.push(item); + } else { + this.getLastItem(item.subAgencyList, vals, key); + } + } + } + }, + + resetSearch() { + this.formData = { + agencyId: "", + gridId: "", + sourceType: "", + eventContent: "", + name: "", + mobile: "", + startTime: "", + endTime: "", + limitStartTime: "", + limitEndTime: "", + status: "", + firstIdList: [], + secondIdList: [], + }; + this.eventTypeCheck = []; + this.pageNo = 1; + this.getTableData(); + // this.loadTable() + }, + deepTree(arr, children) { + if (Array.isArray(arr) && arr.length > 0) { + return arr.map((item) => { + return { + ...item, + [children]: + (item[children] && + item[children].length > 0 && + this.deepTree(item[children], children)) || + null, + }; + }); + } + }, + showAwoList(row) { + this.$refs.awoList.open(row) + } + }, +}; + \ No newline at end of file diff --git a/src/views/modules/shequzhili/timeOut/index.vue b/src/views/modules/shequzhili/timeOut/index.vue index 7f6f1a360..e0b00e49b 100644 --- a/src/views/modules/shequzhili/timeOut/index.vue +++ b/src/views/modules/shequzhili/timeOut/index.vue @@ -16,12 +16,12 @@ }" clearable class="u-item-width-normal" @change="handleEventType" /> - - @@ -31,17 +31,16 @@ - + - + @@ -51,7 +50,6 @@ v-model.trim="formData.Timeoutstatus" :options="timeoutList" :show-all-levels="false" - @change="handleChangeAgency" clearable> @@ -143,7 +141,7 @@ @@ -158,7 +156,15 @@ - + + + + + 取 消 + 确 定 + + @@ -167,6 +173,7 @@ import { requestPost } from "@/js/dai/request"; import nextTick from "dai-js/tools/nextTick"; import { mapGetters } from "vuex"; import axios from "axios"; +import Urging from "./Urging.vue" export default { @@ -229,12 +236,13 @@ export default { level: '', optionsG: [], sarr: [], + dialogVisible:false, tableData: [ { workOrder:"5131133113213213213", eventType:"城乡建设-住房", - eventContent:"王先生反映:市北区有一家换门及不好吃", + eventContent:"王先生反映:市北区有一家黄焖鸡不好吃", eventName:"王先生", phone:"15666628220", deliverystatus:0, @@ -246,7 +254,7 @@ export default { { workOrder:"5131133113213213213", eventType:"城乡建设-住房", - eventContent:"王先生反映:市北区有一家换门及不好吃", + eventContent:"王先生反映:市北区有一家黄焖鸡不好吃", eventName:"王先生", phone:"15666628220", deliverystatus:1, @@ -258,7 +266,7 @@ export default { { workOrder:"5131133113213213213", eventType:"城乡建设-住房", - eventContent:"王先生反映:市北区有一家换门及不好吃", + eventContent:"王先生反映:市北区有一家黄焖鸡不好吃", eventName:"王先生", phone:"15666628220", deliverystatus:1, @@ -327,6 +335,7 @@ export default { importType: "1" }; }, + components:{Urging}, computed: { maxTableHeight() { const h = this.clientHeight - this.searchH - 275 + this.iframeHeight; @@ -489,19 +498,10 @@ export default { } }, - //加载组织数据 - async handleDispose(row) { - this.eventId = row.icEventId; - const url = "/governance/icEvent/detail"; - const { data, code, msg } = await requestPost(url, { - icEventId: this.eventId, - }); - if (code === 0) { - this.eventDetailData = { ...data }; - this.pageType = "dispose"; - } else { - this.$message.error(msg); - } + async handleDispose(row) { + console.log(row,"row"); + this.dialogVisible=true + }, //下载模版 async handleExportModule() { @@ -752,17 +752,7 @@ export default { }) }, - handleChangeAgency(val) { - this.sarr = [] - const map = new Map(); - this.getLastItem( - this.orgOptions, - val, - "agencyId" - ); - this.level = this.sarr[this.sarr.length - 1].level - }, getLastItem(list, vals, key) { let LIST = list || []; for (let item of LIST) {