修改
This commit is contained in:
parent
c1ecd8f4d9
commit
878415ad0a
@ -333,15 +333,10 @@ export default {
|
|||||||
e.messagePushSign = '' + e.messagePushSign
|
e.messagePushSign = '' + e.messagePushSign
|
||||||
e.officialPushSign = '' + e.officialPushSign
|
e.officialPushSign = '' + e.officialPushSign
|
||||||
e.appletPushSign = '' + e.appletPushSign
|
e.appletPushSign = '' + e.appletPushSign
|
||||||
this.changeTaskType(e.taskType, e.taskSubdivision)
|
|
||||||
let item = {
|
|
||||||
routeNodeName: e.routeNodeName,
|
|
||||||
routeNodeDay: e.routeNodeDay,
|
|
||||||
list: res.data.specialDiseaseNodeList
|
|
||||||
}
|
|
||||||
this.lists.push(item)
|
|
||||||
})
|
})
|
||||||
|
this.lists = this.handleData(res.data.specialDiseaseNodeList, 'routeNodeDay', 'routeNodeName')
|
||||||
this.form = this.lists[0].list[0]
|
this.form = this.lists[0].list[0]
|
||||||
|
this.changeTaskType(this.form.taskType, this.form.taskSubdivision)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.lists.push({
|
this.lists.push({
|
||||||
@ -378,6 +373,25 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleData(list, key, keytwo) {
|
||||||
|
//得到数据的主键列表
|
||||||
|
let keysArr = list.map(item => {
|
||||||
|
return {
|
||||||
|
routeNodeDay: item[key],
|
||||||
|
routeNodeName: item[keytwo],
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let keys = [...new Set(keysArr)]
|
||||||
|
let newList = keys.map(item => {
|
||||||
|
return {
|
||||||
|
//这里写新的 数据结构 如下是整体复制
|
||||||
|
routeNodeDay: item[key],
|
||||||
|
routeNodeName: item[keytwo],
|
||||||
|
list: list.filter(i => i[key] == item[key] && i[keytwo] == item[keytwo])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return newList;
|
||||||
|
},
|
||||||
//wangeditor传值
|
//wangeditor传值
|
||||||
onNodeContent(item) {
|
onNodeContent(item) {
|
||||||
this.form.nodeContent = item.nodeContent
|
this.form.nodeContent = item.nodeContent
|
||||||
@ -429,6 +443,7 @@ export default {
|
|||||||
},
|
},
|
||||||
bottomclickevent(uitem, index, uindex) {
|
bottomclickevent(uitem, index, uindex) {
|
||||||
this.form = uitem
|
this.form = uitem
|
||||||
|
this.changeTaskType(this.form.taskType, this.form.taskSubdivision)
|
||||||
this.listindex = index
|
this.listindex = index
|
||||||
this.itemindex = uindex
|
this.itemindex = uindex
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user