diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index 0fe1709a6..117a1f435 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -1066,6 +1066,7 @@ export default { val, "agencyId" ); + this.form.agencyId=this.sarr[this.sarr.length - 1].agencyId this.form.level = this.sarr[this.sarr.length - 1].level; this.getValiheList() }, diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index 64244cbff..2e207375b 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -1347,14 +1347,13 @@ export default { orgOptionProps :{ multiple: true, emitPath: true, - value: 'id', - label: 'label', - children: 'children', - checkStrictly: true, - lazy: true, - lazyLoad: (node, resolve) => { - this.loadOptions(node, resolve) - }, + value: 'agencyId', + label: 'agencyName', + children: 'subAgencyList', + checkStrictly: true + // lazyLoad: (node, resolve) => { + // this.loadOptions(node, resolve) + // }, }, dialogVisiblePeoAgency:false,//通过组织添加 @@ -1422,40 +1421,42 @@ export default { methods: { getOrgTreeList () { this.$http - .get('/actual/base/communityBuilding/tree/initTree', {}) + .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) + console.log(this.orgOptions,"sdkfhkjdfs"); } }) .catch(() => { return this.$message.error('网络错误') }) }, - async loadOptions(node, resolve) { - let data1 =node.data; - if (data1.level == 'district') { - resolve(this.orgOptions); - - } else { - if(data1.level !== "building"){ - const url = "/actual/base/communityBuilding/tree/nextTreeNode"; - let params = { - level:data1.level, - id:data1.id - }; - const { data, code, msg } =await requestGet(url, params); - data1.children=data - resolve(data); - }else{ - return resolve() - } - - } - }, + // async loadOptions(node, resolve) { + // let data1 =node.data; + // if (data1.level == 'district') { + // resolve(this.orgOptions); + + // } else { + // if(data1.level !== "building"){ + // const url = "/actual/base/communityBuilding/tree/nextTreeNode"; + // let params = { + // level:data1.level, + // id:data1.id + // }; + // const { data, code, msg } =await requestGet(url, params); + // data1.children=data + // resolve(data); + // }else{ + // return resolve() + // } + + // } + // }, // 点击后获取id handleChangeTransferCascader (e) { function findItem (valueArr, coll) { @@ -1752,6 +1753,7 @@ export default { // 调用递归函数提取 level 与 agencyId 组合成的字符串 this.extractLevelAndAgencyId(this.orgOptions[0], targetAgencyIds, result); // 将 Set 对象转换为数组 + const manageScopeArray = Array.from(result); const url = "/gov/org/staff/editstaff"; let params = { @@ -1786,13 +1788,12 @@ export default { // 递归函数,遍历 JSON 对象提取所有的 level 与 agencyId 组合成的字符串 extractLevelAndAgencyId(obj, agencyIds, result) { - if (obj && typeof obj === 'object') { - if (obj.level && obj.id && agencyIds.includes(obj.id)) { - result.add(`${obj.level}:${obj.id}`); + if (obj.level && obj.agencyId && agencyIds.includes(obj.agencyId)) { + result.add(`${obj.level}:${obj.agencyId}`); } - if (Array.isArray(obj.children)) { - obj.children.forEach(subObj => { + if (Array.isArray(obj.subAgencyList)) { + obj.subAgencyList.forEach(subObj => { this.extractLevelAndAgencyId(subObj, agencyIds, result); }); } @@ -2127,11 +2128,10 @@ export default { }, // 修改人员 async xiuPeo (row) { + console.log(row); this.modifyPeo = true; this.peoForm.orgType = "agency"; - this.userStaffId = row.staffId; - const url = "/gov/org/staff/editstaffinit"; let params = { staffId: row.staffId, @@ -2139,12 +2139,14 @@ export default { }; const { data, code, msg } = await requestPost(url, params); if (code === 0) { + console.log("修改人员", data); + this.peoForm.name = data.name; this.peoForm.mobile = data.mobile; this.peoForm.post = data.workType; - // this.peoForm.gender = data.gender === 1 ? '男' : '女' this.peoForm.gender = data.gender; this.peoForm.idCard = data.idCard; + this.peoForm.agencyName=data.agencyName; // 已有的权限(角色) let existedRoleArr = []; data.newRoleList.forEach(function (sysRole) { @@ -2160,15 +2162,14 @@ export default { } }, findParentPath(data,agencyIds) { + console.log(data,agencyIds,"dskck"); let paths = []; - - function findPathRecursive(agencyId, node, path) { + function findPathRecursive(agencyId, node, path) {; if (node.agencyId === agencyId) { path.push(agencyId); paths.push(path.slice()); // Make a copy of the path array before pushing return true; } - if (node.subAgencyList) { for (let i = 0; i < node.subAgencyList.length; i++) { if (findPathRecursive(agencyId, node.subAgencyList[i], path.concat(node.agencyId))) { @@ -2179,11 +2180,10 @@ export default { return false; } - agencyIds.forEach(agencyId => { findPathRecursive(agencyId, data, []); }); - + console.log(paths,"paths"); return paths; }, // 修改社区人员 diff --git a/src/views/modules/shequzhili/eventOld/cpts/add.vue b/src/views/modules/shequzhili/eventOld/cpts/add.vue index 8b56fbc0e..5597b20a3 100644 --- a/src/views/modules/shequzhili/eventOld/cpts/add.vue +++ b/src/views/modules/shequzhili/eventOld/cpts/add.vue @@ -13,7 +13,30 @@ @change="handleChangeAgency" clearable> - + + + 事件上报 + 城管事件 + + + + + + + + + + + + + + + + + + + +
@@ -21,7 +44,7 @@ @click="handleShowPersonList">居民信息中选择
- + @@ -132,6 +155,7 @@ var geocoder; // 新建一个正逆地址解析类 function iniFmData() { return { + demandType:"report",// 诉求类型 gridId: "", //所属网格 reportUserId: "", // 上报人ID name: "", // 上报人姓名 @@ -148,6 +172,7 @@ function iniFmData() { // operationType: '0',// 处理方式 // content: '',//回复内容 // status: '',// 处理中:processing;已办结:closed_case + responsibleUnit:"yes", }; } @@ -233,13 +258,25 @@ export default { components: {}, computed: { dataRule() { + const isReport = this.formData.demandType === "report"; + const isChengguan = this.formData.responsibleUnit === "yes"; return { gridId: [ { required: true, message: "所属网格不能为空", trigger: "blur" }, ], - name: [{ required: true, message: "上报人不能为空", trigger: "change" }], + demandType: [ + { required: true, message: "诉求类型不能为空", trigger: "blur" }, + ], + responsibleUnit: [ + { required: true, message: "有无责任单位不能为空", trigger: "blur" }, + ], + name: [{ required: isReport, message: "上报人不能为空", trigger: "change" }], mobile: [ - { required: true, message: "联系电话不能为空", trigger: "blur" }, + { required: isReport, message: "联系电话不能为空", trigger: "blur" }, + ], + responsibleName: [{ required: isChengguan, message: "责任人不能为空", trigger: "change" }], + responsibleMobile: [ + { required: isChengguan, message: "联系电话不能为空", trigger: "blur" }, ], // idCard: [ // { required: true, message: "证件号不能为空", trigger: "blur" }, @@ -311,6 +348,10 @@ export default { ); this.obj.level = this.sarr[this.sarr.length - 1].level }, + handleDemandTypeChange() { + this.$refs.ref_form1.clearValidate(); // 清除所有验证 + this.formData.demandType = this.formData.demandType; // 重新设置诉求类型 + }, getLastItem(list, vals, key) { let LIST = list || []; for (let item of LIST) { @@ -440,13 +481,22 @@ export default { app.util.validateRule(messageObj); return false; } else { - if (!formVltHelper.userOrMobile(this.formData.mobile)) { + if (this.formData.demandType === "report" && !formVltHelper.userOrMobile(this.formData.mobile)) { this.$message({ type: "error", message: "联系电话格式有误", }); return false; } + + if (this.formData.demandType === "chengguan" && this.formData.responsibleUnit === "yes" && !formVltHelper.userOrMobile(this.formData.responsibleMobile)) { + this.$message({ + type: "error", + message: "责任人电话格式有误", + }); + return false; + } + const regCard = /(^\d{15}$)|(^\d{17}(\d|X)$)/; //证件号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X if ( this.formData.idCard && diff --git a/src/views/modules/shequzhili/eventOld/cpts/event-detail.vue b/src/views/modules/shequzhili/eventOld/cpts/event-detail.vue index 08087a647..461c64778 100644 --- a/src/views/modules/shequzhili/eventOld/cpts/event-detail.vue +++ b/src/views/modules/shequzhili/eventOld/cpts/event-detail.vue @@ -79,6 +79,27 @@ 联系电话: {{ info.mobile }} +
+ 有无责任单位: + {{ info.responsibleUnit==="yes" ? "有": "无" }} +
+
+ 责任人: + {{ info.responsibleName }} +
+
+ 联系电话: + {{ info.responsibleMobile }} +
+
+ 短信通知部门负责人 +
+
@@ -63,6 +69,7 @@ export default { categoryId: "",//事件分类 deptId: "", //指派部门 deptName: "", + sendMsg:0, categoryList: [], files: [] //附件 }, @@ -203,11 +210,11 @@ export default { handleChangeAgency(val) { let obj = this.$refs["agencyIdArray"].getCheckedNodes()[0].data if (obj) { - this.formData.orgType = obj.level === 'grid' ? 'grid' : 'agency' + this.formData.level = obj.level === 'grid' ? 'grid' : 'agency' this.formData.deptId = obj.agencyId this.formData.deptName = obj.agencyName } else { - this.form.orgType = '' + this.form.level = '' this.form.orgId = '' } }, diff --git a/src/views/modules/shequzhili/eventOld/eventList.vue b/src/views/modules/shequzhili/eventOld/eventList.vue index 9a390ed1b..9c0672048 100644 --- a/src/views/modules/shequzhili/eventOld/eventList.vue +++ b/src/views/modules/shequzhili/eventOld/eventList.vue @@ -87,6 +87,15 @@
+ + + + + + + 取消标记 + 督办催办 + @selection-change="handleSelectionChange" :height="maxTableHeight" :row-class-name="tableRowClassName"> @@ -160,6 +170,12 @@ + + + + + + @@ -252,6 +268,19 @@ 取消 + + + + + + + + + @@ -357,6 +386,21 @@ export default { }, ], + overPeriodArray: [ + { + value: "0", + label: "2天以下", + }, + { + value: "1", + label: "3-4天", + }, + { + value: "2", + label: "4天以上", + }, + ], + qudaoArray: [ { value: "0", @@ -424,9 +468,14 @@ export default { eventDetailData: {}, showVoice: false, + showSupervise: false, selVoiceUrl: "", multipleSelection: [], + + superviseFrom:{ + content: "", + }, }; }, computed: { @@ -477,6 +526,19 @@ export default { }); }, + tableRowClassName({ row }) { + switch (row.overPeriod) { + case '0': + return 'row-over-period-0'; + case '1': + return 'row-over-period-1'; + case '2': + return 'row-over-period-2'; + default: + return 'row-default'; + } + }, + // 查看 handleLook(row) { let { name,reportUserId } = row @@ -527,6 +589,29 @@ export default { this.$message.error(msg); } }, + async handleSuperviseEvent(){ + this.showSupervise = true; + }, + + async doSuperviseEvent() { + const url = "/governance/icEventOld/doSuperviseEvent"; + if (this.multipleSelection.length == 0) { + this.$message.warning('请选择督办催办的事件') + return + } + let params = { + icEventIdList: this.multipleSelection, + content: this.superviseFrom.content, + }; + const { data, code, msg } = await requestPost(url, params); + if (code === 0) { + this.$message.success("督办催办成功"); + this.getTableData(); + } else { + this.$message.error(msg); + } + this.showSupervise = false; + }, handleSearch(val) { this.pageNo = 1; @@ -893,3 +978,18 @@ export default { color: #fff; } + +