|
@@ -89,6 +89,7 @@
|
|
|
methods: {
|
|
|
init (id) {
|
|
|
this.dataForm.id = id || 0
|
|
|
+ console.log('tree')
|
|
|
this.$http({
|
|
|
url: this.$http.adornUrl('/user-service/menu/tree'),
|
|
|
method: 'get',
|
|
@@ -98,6 +99,7 @@
|
|
|
this.menuList = data.data
|
|
|
}
|
|
|
}).then(() => {
|
|
|
+ console.log('queryTree')
|
|
|
this.$http({
|
|
|
url: this.$http.adornUrl('/user-service/org/queryTree'),
|
|
|
method: 'get',
|
|
@@ -128,7 +130,7 @@
|
|
|
if (data.data.menuIdList) {
|
|
|
data.data.menuIdList.forEach(i => {
|
|
|
const node = this.$refs.menuListTree.getNode(i)
|
|
|
- if (node.isLeaf) {
|
|
|
+ if (node && node.isLeaf) {
|
|
|
this.$refs.menuListTree.setChecked(node, true)
|
|
|
}
|
|
|
})
|
|
@@ -136,7 +138,7 @@
|
|
|
if (data.data.orgIdList) {
|
|
|
data.data.orgIdList.forEach(i => {
|
|
|
const node = this.$refs.orgListData.getNode(i)
|
|
|
- if (node.isLeaf) {
|
|
|
+ if (node && node.isLeaf) {
|
|
|
this.$refs.orgListData.setChecked(node, true, false)
|
|
|
}
|
|
|
})
|