guanqb
2023-12-06 5ef7b311052be3494bce5331db75b756cae2d6d5
社区感知tree懒加载去除async
1 files modified
12 ■■■■ changed files
src/views/house/index.vue 12 ●●●● patch | view | raw | blame | history
src/views/house/index.vue
@@ -1294,7 +1294,7 @@
        },
        // 警情统计中时间变化
        async caseTimeChange (e) {
        caseTimeChange (e) {
            const date = e.map((item) => {
                return this.dateFormat(item)
            })
@@ -1412,11 +1412,11 @@
         * @param {*} resolve
         * @return {*}
         */
        async loadNode (node, resolve) {
        loadNode (node, resolve) {
            if (this.userInfo.dept_id != "1123598813738675201") {
                let list = []
                let type = node.level + 1
                await getPoliceStationLazyTree(
                getPoliceStationLazyTree(
                    type,
                    node.level === 0 ? this.userInfo.dept_id : node.data.id
                ).then((res) => {
@@ -1431,12 +1431,12 @@
                    list.forEach((item) => {
                        item.leaf = !item.hasChildren
                    })
                    return resolve(list)
                })
                return resolve(list)
            } else {
                let list = []
                let type = node.level + 1
                await getPoliceStationLazyTree(
                getPoliceStationLazyTree(
                    type,
                    node.level === 0 ? "" : node.data.id
                ).then((res) => {
@@ -1451,8 +1451,8 @@
                    list.forEach((item) => {
                        item.leaf = !item.hasChildren
                    })
                    return resolve(list)
                })
                return resolve(list)
            }
        },