|
@ -88,7 +88,6 @@ export default { |
|
|
assignDeptNames: [] |
|
|
assignDeptNames: [] |
|
|
}, |
|
|
}, |
|
|
orgOptions: [], |
|
|
orgOptions: [], |
|
|
orgOptionsCopy: [], |
|
|
|
|
|
orgOptionProps: { |
|
|
orgOptionProps: { |
|
|
multiple: true, |
|
|
multiple: true, |
|
|
value: 'agencyId', |
|
|
value: 'agencyId', |
|
@ -189,12 +188,12 @@ export default { |
|
|
}, |
|
|
}, |
|
|
//获取组织前面的东西 |
|
|
//获取组织前面的东西 |
|
|
findParentPath(data, agencyIds) { |
|
|
findParentPath(data, agencyIds) { |
|
|
let paths = []; |
|
|
let obj = {paths:[],arr:[]}; |
|
|
function findPathRecursive(agencyId, node, path) { |
|
|
function findPathRecursive(agencyId, node, path) { |
|
|
; |
|
|
|
|
|
if (node.agencyId === agencyId) { |
|
|
if (node.agencyId === agencyId) { |
|
|
path.push(agencyId); |
|
|
path.push(agencyId); |
|
|
paths.push(path.slice()); // Make a copy of the path array before pushing |
|
|
obj.paths.push(path.slice()); |
|
|
|
|
|
obj.arr.push({value:node.agencyId,label:node.agencyName,level:node.level}) // Make a copy of the path array before pushing |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
if (node.subAgencyList) { |
|
|
if (node.subAgencyList) { |
|
@ -210,8 +209,7 @@ export default { |
|
|
agencyIds.forEach(agencyId => { |
|
|
agencyIds.forEach(agencyId => { |
|
|
findPathRecursive(agencyId, data, []); |
|
|
findPathRecursive(agencyId, data, []); |
|
|
}); |
|
|
}); |
|
|
console.log(paths,"paths"); |
|
|
return obj; |
|
|
return paths; |
|
|
|
|
|
}, |
|
|
}, |
|
|
handelInputContent(val) { |
|
|
handelInputContent(val) { |
|
|
this.$EventBus.$emit('handelInputEventContent', { type: 'opinion', value: val }) |
|
|
this.$EventBus.$emit('handelInputEventContent', { type: 'opinion', value: val }) |
|
@ -229,13 +227,13 @@ export default { |
|
|
} |
|
|
} |
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
console.log(data,"sdfljsldf"); |
|
|
|
|
|
this.orgOptions = [] |
|
|
this.orgOptions = [] |
|
|
this.orgOptions.push(data) |
|
|
this.orgOptions.push(data) |
|
|
this.orgOptionsCopy.push(data) |
|
|
|
|
|
var paths1 = this.findParentPath(this.orgOptions[0],this.eventDetailCopy.currentProcessDeptIds); |
|
|
var paths1 = this.findParentPath(this.orgOptions[0],this.eventDetailCopy.currentProcessDeptIds); |
|
|
console.log(paths1,"dslsdfjlsd"); |
|
|
this.agencyIdArray = paths1.paths; |
|
|
this.agencyIdArray=paths1 |
|
|
this.formData.assignDeptIds = paths1.arr.map(item=>item.value); |
|
|
|
|
|
this.formData.assignDeptNames = paths1.arr.map(item=>item.label); |
|
|
|
|
|
this.formData.levels = paths1.arr.map(item=>item.level) |
|
|
} else { |
|
|
} else { |
|
|
this.$message.error(msg) |
|
|
this.$message.error(msg) |
|
|
} |
|
|
} |
|
@ -324,6 +322,21 @@ export default { |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
resetData() { |
|
|
resetData() { |
|
|
|
|
|
this.formData = { |
|
|
|
|
|
operationType: "5", //处理方式[0:已回复 5、指派 6、完成并回复] |
|
|
|
|
|
handlingReq:'',//办理要求 |
|
|
|
|
|
transferAdvice:'',//转办意见 |
|
|
|
|
|
createdTime: '', |
|
|
|
|
|
contactTime:'', |
|
|
|
|
|
timeLimit:'',//办结时限 |
|
|
|
|
|
deptId:'', //指派部门 |
|
|
|
|
|
deptName:'', |
|
|
|
|
|
sendMsg:1, |
|
|
|
|
|
status:'assigned', |
|
|
|
|
|
levels: [], |
|
|
|
|
|
assignDeptIds: [], |
|
|
|
|
|
assignDeptNames: [] |
|
|
|
|
|
} |
|
|
this.agencyIdArray = [] |
|
|
this.agencyIdArray = [] |
|
|
}, |
|
|
}, |
|
|
beforeUpload(file) { |
|
|
beforeUpload(file) { |
|
|