diff --git a/epdc-resident-mp-yushan/project.private.config.json b/epdc-resident-mp-yushan/project.private.config.json
index bfc0ccb..2ff7cd8 100644
--- a/epdc-resident-mp-yushan/project.private.config.json
+++ b/epdc-resident-mp-yushan/project.private.config.json
@@ -62,6 +62,12 @@
"pathName": "subpages/gridArmy/pages/index/index",
"query": "",
"scene": null
+ },
+ {
+ "name": "行程上报",
+ "pathName": "subpages/extend/pages/epidemicControl/epidemicControl",
+ "query": "",
+ "scene": null
}
]
}
diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js
index 0f86415..06ea8fa 100644
--- a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js
+++ b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js
@@ -117,23 +117,53 @@ Page({
}
// 如果不是第一层级,要往下加children
let options1 = this.data.options1
- this.recursionMethod(options1, this.data.pid, res.data)
+ let arr = this.recursionMethod(options1, this.data.pid, res.data)
+ this.setData({
+ options1: arr,
+ })
}
})
},
recursionMethod(arr, pid, children) {
arr.forEach((item) => {
- if (item.id === pid) {
- item.children = children
- wx.hideLoading()
- }
+ console.log('item.children', item.children)
if (item.children) {
+ console.log('掉children')
this.recursionMethod(item.children, this.data.pid, children)
+ } else {
+ if (item.id === pid) {
+ console.log('值相等')
+ item.children = children
+ wx.hideLoading()
+ }
}
+ // if (item.id === pid) {
+ // console.log('值相等')
+ // item.children = children
+ // wx.hideLoading()
+ // }
+ // else {
+ // item.children = [
+ // {
+ // label: '11',
+ // value: '1111',
+ // id: '11111111111111111',
+ // },
+ // ]
+ // }
+
+ // if (item.children) {
+ // console.log('掉children')
+ // this.recursionMethod(item.children, this.data.pid, children)
+ // }
+ // if (item.id === pid) {
+ // console.log('值相等')
+ // item.children = children
+ // wx.hideLoading()
+ // }
})
- this.setData({
- options1: arr,
- })
+ console.log('options1---', this.data.options1)
+ return arr
},
// 动态加载级联选择器
onLoadOptions(e) {
diff --git a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml
index f1fb608..1cf2684 100644
--- a/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml
+++ b/epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml
@@ -152,11 +152,11 @@
{{actContent}}
-
+
\ No newline at end of file