修改禅道已知bug
This commit is contained in:
@@ -42,12 +42,15 @@
|
|||||||
isLeaf: 'leaf'
|
isLeaf: 'leaf'
|
||||||
}"
|
}"
|
||||||
:defaultCheckedKeys="defaultCheckedKeys"
|
:defaultCheckedKeys="defaultCheckedKeys"
|
||||||
|
:defaultExpandAll="defaultExpandAll"
|
||||||
:check-strictly="false"
|
:check-strictly="false"
|
||||||
node-key="id"
|
node-key="id"
|
||||||
@check-change="handleCheckChange"
|
@check-change="handleCheckChange"
|
||||||
:data.sync="gData">
|
:data.sync="gData">
|
||||||
<span slot-scope="{ data }">
|
<span slot-scope="{ data }">
|
||||||
<span>{{ data.title }}</span>
|
<span :class="{'active':data.color ? true:false}">
|
||||||
|
{{ data.title }}
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</virtualNodeTree>
|
</virtualNodeTree>
|
||||||
<!-- <a-tree-->
|
<!-- <a-tree-->
|
||||||
@@ -89,7 +92,7 @@
|
|||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
gData: [],
|
gData: [],
|
||||||
autoExpandParent: true,
|
autoExpandParent: false,
|
||||||
checkboxList: [],
|
checkboxList: [],
|
||||||
expandedKeys: [],
|
expandedKeys: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
@@ -103,7 +106,8 @@
|
|||||||
defaultCheckedKeys: [],
|
defaultCheckedKeys: [],
|
||||||
defaultCheckedKeysName: [],
|
defaultCheckedKeysName: [],
|
||||||
content: [],
|
content: [],
|
||||||
dataList: []
|
dataList: [],
|
||||||
|
defaultExpandAll: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -169,6 +173,7 @@
|
|||||||
}
|
}
|
||||||
this.defaultCheckedKeys = this.userIds
|
this.defaultCheckedKeys = this.userIds
|
||||||
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
||||||
|
this.defaultExpandAll = false
|
||||||
this.treeVisible = true
|
this.treeVisible = true
|
||||||
} else {
|
} else {
|
||||||
this.queryDepartUserTreeList(1)
|
this.queryDepartUserTreeList(1)
|
||||||
@@ -307,7 +312,7 @@
|
|||||||
},
|
},
|
||||||
onSearch(e) {
|
onSearch(e) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
// this.treeVisible = false
|
this.treeVisible = false
|
||||||
let p = new Promise((resolve, reject) => {
|
let p = new Promise((resolve, reject) => {
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
@@ -319,6 +324,7 @@
|
|||||||
JSON.parse(gData).forEach(res => {
|
JSON.parse(gData).forEach(res => {
|
||||||
if (res.type == 'User') {
|
if (res.type == 'User') {
|
||||||
if (res.name.includes(e)) {
|
if (res.name.includes(e)) {
|
||||||
|
res.color = true
|
||||||
content.push(res)
|
content.push(res)
|
||||||
}
|
}
|
||||||
} else if (res.type == 'Depart') {
|
} else if (res.type == 'Depart') {
|
||||||
@@ -328,6 +334,7 @@
|
|||||||
content.push(res)
|
content.push(res)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.defaultExpandAll = true
|
||||||
this.gData = this.toTree(content)
|
this.gData = this.toTree(content)
|
||||||
} else {
|
} else {
|
||||||
let content = JSON.parse(gData)
|
let content = JSON.parse(gData)
|
||||||
@@ -339,11 +346,12 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.gData = this.toTree(content)
|
this.gData = this.toTree(content)
|
||||||
|
this.defaultExpandAll = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.defaultCheckedKeys = this.userIds
|
this.defaultCheckedKeys = this.userIds
|
||||||
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
|
||||||
// this.treeVisible = true
|
this.treeVisible = true
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
// this.gData = []
|
// this.gData = []
|
||||||
@@ -444,6 +452,7 @@
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
this.defaultExpandAll = false
|
||||||
this.treeVisible = true
|
this.treeVisible = true
|
||||||
} else {
|
} else {
|
||||||
this.gData = []
|
this.gData = []
|
||||||
@@ -537,4 +546,8 @@
|
|||||||
.treeWrap {
|
.treeWrap {
|
||||||
height: calc(100vh - 240px);
|
height: calc(100vh - 240px);
|
||||||
}
|
}
|
||||||
|
.active{
|
||||||
|
color: #21c9cc;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user