From 778748b417576257d939ea4967002aa37c24a472 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, 1 Nov 2024 15:42:10 +0800
Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E5=88=A0=E9=99=A4=E6=8C=89?=
=?UTF-8?q?=E9=94=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../event/cpts/process-form-assign.vue | 78 +++++++++++++++----
.../shequzhili/eventOld/cpts/event-info.vue | 10 ++-
.../volunteer/activityArchive/index.vue | 1 +
3 files changed, 74 insertions(+), 15 deletions(-)
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 @@
修改
查看
+ 删除活动
审核
下线