调整tree的引入
This commit is contained in:
@@ -2,6 +2,7 @@ import dict from "./dict"
|
|||||||
import dayjs from './monent'
|
import dayjs from './monent'
|
||||||
import qs from 'query-string'
|
import qs from 'query-string'
|
||||||
import reg from "./regular";
|
import reg from "./regular";
|
||||||
|
import tree from "./tree";
|
||||||
|
|
||||||
const confirm = (content, title, config) => {
|
const confirm = (content, title, config) => {
|
||||||
let ops = {content}
|
let ops = {content}
|
||||||
@@ -334,5 +335,6 @@ export default {
|
|||||||
}
|
}
|
||||||
result.forEach(removeNullChildren)
|
result.forEach(removeNullChildren)
|
||||||
return result
|
return result
|
||||||
}
|
},
|
||||||
|
tree
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapState} from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
import Tree from "../../common/tree";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "selectDept",
|
name: "selectDept",
|
||||||
@@ -64,7 +63,7 @@ export default {
|
|||||||
this.$http.post(`/app/wxcp/wxdepartment/listAll?name=${this.name}`).then(res => {
|
this.$http.post(`/app/wxcp/wxdepartment/listAll?name=${this.name}`).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
res.data.forEach(e => e.isCheck = this.selected.includes(e[this.nodeKey]))
|
res.data.forEach(e => e.isCheck = this.selected.includes(e[this.nodeKey]))
|
||||||
this.depts = new Tree(res.data, {parent: 'parentid'})
|
this.depts = new this.$tree(res.data, {parent: 'parentid'})
|
||||||
this.list = this.depts.tree
|
this.list = this.depts.tree
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user