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 () {
const url = "/actual/base/icpartyunit/option"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.unitList = data
} else {
this.$message.error(msg)
}
},
//
async loadService () {
const url = "/actual/base/serviceitem/dict-list"
let params = {
// parentCategoryCode: '1010'
}

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

@ -177,6 +177,29 @@ export default {
} else {
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) {
let obj = this.$refs["agencyIdArray"].getCheckedNodes()[0].data
@ -223,7 +246,7 @@ export default {
this.$message.error("请选择事件分类");
return false;
}
if(this.fileList){
if (this.fileList) {
this.formData.files = this.fileList
}
this.formData.status = "processing";

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

@ -128,15 +128,28 @@ export default {
} else {
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) {
nodes.forEach(item => {
if (treeId === item.id) {
return item;
} else {
this.buildTree(item.children, treeId)
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]
}
}
})
}
},
handleChangeCate() {
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);
}
if (this.eventDetailCopy.parentCategoryId) {
let pids = this.eventDetailCopy.parentCategoryId.split(',');
pids.push(this.eventDetailCopy.categoryId)
pids.forEach(id => {
let node = this.buildTree(this.casOptions, toString(id));
this.selCategoryArray.push(node)
});
let node = this.buildTree(this.casOptions, this.eventDetailCopy.categoryId);
this.selCategoryArray.push(node);
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) {
nodes.forEach(item => {
if (treeId === item.id) {
return item;
} else {
this.buildTree(item.children, treeId)
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]
}
}
})
}
},
handleChangeCate(value) {
if (this.selCateObj = this.$refs['myCascader'].getCheckedNodes()[0]) {
@ -148,7 +151,7 @@ export default {
} else {
this.selCateObj = {}
}
if(!value) return
if (!value) return
this.selCategoryArray = value
},
//

Loading…
Cancel
Save