Browse Source

修复事件回复的异常提示

V1.0
luyan 2 years ago
parent
commit
f72543723a
  1. 8
      src/views/modules/communityParty/regionalParty/activitys.vue
  2. 25
      src/views/modules/shequzhili/event/cpts/process-form-designate.vue
  3. 27
      src/views/modules/shequzhili/event/cpts/process-form-replay-end.vue
  4. 35
      src/views/modules/shequzhili/event/cpts/process-form-replay.vue

8
src/views/modules/communityParty/regionalParty/activitys.vue

@ -366,28 +366,20 @@ export default {
async loadUnit () { async loadUnit () {
const url = "/actual/base/icpartyunit/option" const url = "/actual/base/icpartyunit/option"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option"
let params = { let params = {
agencyId: this.agencyId agencyId: this.agencyId
} }
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
this.unitList = data this.unitList = data
} else { } else {
this.$message.error(msg) this.$message.error(msg)
} }
}, },
// //
async loadService () { async loadService () {
const url = "/actual/base/serviceitem/dict-list" const url = "/actual/base/serviceitem/dict-list"
let params = { let params = {
// parentCategoryCode: '1010' // parentCategoryCode: '1010'
} }

25
src/views/modules/shequzhili/event/cpts/process-form-designate.vue

@ -177,6 +177,29 @@ export default {
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
if (this.eventDetailCopy.parentCategoryId) {
const pids = this.eventDetailCopy.parentCategoryId.split(',');
pids.push(this.eventDetailCopy.categoryId);
let nodes = this.casOptions;
for (let i = 0; i < pids.length; i++) {
nodes = this.buildNode(nodes, pids[i])
}
if (nodes) {
this.formData.categoryList.push(nodes)
this.selCateObj = nodes
}
}
},
buildNode(nodes, treeId) {
for (let i = 0; i < nodes.length; i++) {
if (nodes[i].id === treeId) {
if (nodes[i].children) {
return nodes[i].children
} else {
return nodes[i]
}
}
}
}, },
handleChangeAgency(val) { handleChangeAgency(val) {
let obj = this.$refs["agencyIdArray"].getCheckedNodes()[0].data let obj = this.$refs["agencyIdArray"].getCheckedNodes()[0].data
@ -223,7 +246,7 @@ export default {
this.$message.error("请选择事件分类"); this.$message.error("请选择事件分类");
return false; return false;
} }
if(this.fileList){ if (this.fileList) {
this.formData.files = this.fileList this.formData.files = this.fileList
} }
this.formData.status = "processing"; this.formData.status = "processing";

27
src/views/modules/shequzhili/event/cpts/process-form-replay-end.vue

@ -128,15 +128,28 @@ export default {
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
if (this.eventDetailCopy.parentCategoryId) {
const pids = this.eventDetailCopy.parentCategoryId.split(',');
pids.push(this.eventDetailCopy.categoryId);
let nodes = this.casOptions;
for (let i = 0; i < pids.length; i++) {
nodes = this.buildNode(nodes, pids[i])
}
if (nodes) {
this.formData.categoryList.push(nodes)
}
}
}, },
buildTree(nodes, treeId) { buildNode(nodes, treeId) {
nodes.forEach(item => { for (let i = 0; i < nodes.length; i++) {
if (treeId === item.id) { if (nodes[i].id === treeId) {
return item; if (nodes[i].children) {
} else { return nodes[i].children
this.buildTree(item.children, treeId) } else {
return nodes[i]
}
} }
}) }
}, },
handleChangeCate() { handleChangeCate() {
if (this.selCateObj = this.$refs['myCascader'].getCheckedNodes()[0]) { if (this.selCateObj = this.$refs['myCascader'].getCheckedNodes()[0]) {

35
src/views/modules/shequzhili/event/cpts/process-form-replay.vue

@ -122,24 +122,27 @@ export default {
this.$message.error(msg); this.$message.error(msg);
} }
if (this.eventDetailCopy.parentCategoryId) { if (this.eventDetailCopy.parentCategoryId) {
let pids = this.eventDetailCopy.parentCategoryId.split(','); const pids = this.eventDetailCopy.parentCategoryId.split(',');
pids.push(this.eventDetailCopy.categoryId) pids.push(this.eventDetailCopy.categoryId);
pids.forEach(id => { let nodes = this.casOptions;
let node = this.buildTree(this.casOptions, toString(id)); for (let i = 0; i < pids.length; i++) {
this.selCategoryArray.push(node) nodes = this.buildNode(nodes,pids[i])
}); }
let node = this.buildTree(this.casOptions, this.eventDetailCopy.categoryId); if(nodes){
this.selCategoryArray.push(node); this.formData.categoryList.push(nodes)
}
} }
}, },
buildTree(nodes, treeId) { buildNode(nodes, treeId) {
nodes.forEach(item => { for(let i = 0; i < nodes.length; i++){
if (treeId === item.id) { if (nodes[i].id === treeId) {
return item; if(nodes[i].children){
} else { return nodes[i].children
this.buildTree(item.children, treeId) }else {
return nodes[i]
}
} }
}) }
}, },
handleChangeCate(value) { handleChangeCate(value) {
if (this.selCateObj = this.$refs['myCascader'].getCheckedNodes()[0]) { if (this.selCateObj = this.$refs['myCascader'].getCheckedNodes()[0]) {
@ -148,7 +151,7 @@ export default {
} else { } else {
this.selCateObj = {} this.selCateObj = {}
} }
if(!value) return if (!value) return
this.selCategoryArray = value this.selCategoryArray = value
}, },
// //

Loading…
Cancel
Save