diff --git a/src/views/modules/shequzhili/event/cpts/process-form-assign.vue b/src/views/modules/shequzhili/event/cpts/process-form-assign.vue index 8f42034c9..95aa1c650 100644 --- a/src/views/modules/shequzhili/event/cpts/process-form-assign.vue +++ b/src/views/modules/shequzhili/event/cpts/process-form-assign.vue @@ -12,7 +12,7 @@ + :props="orgOptionProps" :show-all-levels="false" @change="handleChangeAgency" @clear="handClear"> @@ -153,26 +153,66 @@ export default { }, created() { this.formData.createdTime = this.$dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'); - - }, - async mounted() { const { user } = this.$store.state; this.agencyId = user.agencyId; this.getOrgTreeList(); + }, + async mounted() { + if (this.eventId) { + console.log(this.orgOptions); this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); + console.log(this.eventDetailCopy.currentProcessDeptIds,"dskfklsdn"); + this.formData.handlingReq = this.eventDetailCopy.handlingReq; this.formData.transferAdvice = this.eventDetailCopy.transferAdvice; - let dateTime = new Date(new Date(this.eventDetailCopy.timeLimit).getTime()- (1000 * 60 * 60 * 24)) let yesterday = `${dateTime.getFullYear()}-${(dateTime.getMonth() +1)}-${dateTime.getDate()}` - console.log('yesterday',yesterday) this.formData.timeLimit = yesterday + ' ' + '16:00:00' this.formData.contactTime = this.$dayjs(new Date(new Date().getTime() + (1000 * 60 * 60))).format('YYYY-MM-DD HH:mm:ss') } }, methods: { + //清楚带弹框 + handClear(){ + this.$confirm('你确定要清除所有选项吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + // 确认清除逻辑 + this.agencyIdArray = []; // 清空选项 + }).catch(() => { + // 取消操作,可以在这里添加恢复逻辑,或不需要处理 + }); + }, + //获取组织前面的东西 + findParentPath(data, agencyIds) { + let paths = []; + 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))) { + return true; + } + } + } + + return false; + } + agencyIds.forEach(agencyId => { + findPathRecursive(agencyId, data, []); + }); + console.log(paths,"paths"); + return paths; + }, handelInputContent(val) { this.$EventBus.$emit('handelInputEventContent', { type: 'opinion', value: val }) }, @@ -189,9 +229,13 @@ export default { } const { data, code, msg } = await requestPost(url, params) if (code === 0) { + console.log(data,"sdfljsldf"); this.orgOptions = [] this.orgOptions.push(data) this.orgOptionsCopy.push(data) + var paths1 = this.findParentPath(this.orgOptions[0],this.eventDetailCopy.currentProcessDeptIds); + console.log(paths1,"dslsdfjlsd"); + this.agencyIdArray=paths1 } else { this.$message.error(msg) } @@ -209,9 +253,12 @@ export default { } }, handleChangeAgency(val) { - this.$nextTick(() => { - - + // let parth =this.agencyIdArray + this.$confirm('你确定要清除所有选项吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { let obj = this.$refs["agencyIdArray"].getCheckedNodes() const assignDeptIds = [] const assignDeptNames = [] @@ -221,14 +268,10 @@ export default { assignDeptNames.push(obj[val].data.agencyName) levels.push(obj[val].data.level) } - console.log('assignDeptIds',assignDeptIds); console.log('assignDeptNames',assignDeptNames); console.log('levels',levels); - - if (obj) { - this.formData.levels = levels this.formData.assignDeptIds = assignDeptIds this.formData.assignDeptNames = assignDeptNames @@ -237,7 +280,14 @@ export default { this.form.orgId = '' } - }); + }).catch(()=>{ + var paths1 = this.findParentPath(this.orgOptions[0],this.eventDetailCopy.currentProcessDeptIds); + console.log(paths1,"dslsdfjlsd"); + this.agencyIdArray=paths1 + }) + + + }, handleChangeCate() { if (this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0]) { diff --git a/src/views/modules/shequzhili/eventOld/cpts/event-info.vue b/src/views/modules/shequzhili/eventOld/cpts/event-info.vue index 82b7a851b..5be3d723f 100644 --- a/src/views/modules/shequzhili/eventOld/cpts/event-info.vue +++ b/src/views/modules/shequzhili/eventOld/cpts/event-info.vue @@ -356,6 +356,8 @@ export default { created() { }, mounted() { this.pageTypeCopy = this.pageType; + + if (this.pageTypeCopy !== "add") { this.getProjectProcess(); } @@ -511,6 +513,12 @@ export default { this.grid = val.value; }, async handelDispose() { + console.log(this.grid,"DSFKDSFJDKS"); + if(!this.grid){ + console.log(this.grid,"DSFKDSFJDKS"); + this.$message.error("请选择网格"); + return + } this.$refs.ref_processinfo_dispose.getProcessInfo(); if (this.$refs.ref_processinfo_dispose.okflag) { this.formData.operationType = this.$refs.ref_processinfo_dispose.operationType; @@ -527,7 +535,7 @@ export default { this.replayInfo.openFlag = null; this.replayInfo.openId = this.eventDetailCopy.openId; this.replayInfo.gridId = this.grid; - //回复属性赋值 + //回复属性赋 let url = "/governance/icEventOld/reply"; await this.submitDispose(url, this.replayInfo); } else if (this.formData.operationType === "1") { diff --git a/src/views/modules/volunteer/activityArchive/index.vue b/src/views/modules/volunteer/activityArchive/index.vue index 09a2010a3..6185c9839 100644 --- a/src/views/modules/volunteer/activityArchive/index.vue +++ b/src/views/modules/volunteer/activityArchive/index.vue @@ -84,6 +84,7 @@ 修改 查看 + 删除活动 审核 下线