“dzb”
2022-10-21 5a66a6bea00940c40e71ee681c5b47466cdce3db
src/views/operate/baseSetting/illegalBuild/createUser/index.vue
@@ -171,22 +171,23 @@
            if (index === 1) {
                
            }else{
                this.parentList = this.addChildren(await this.getTypeThird(), await this.getTypeSecond());
                this.parentList = await this.getTypeThird()
                // this.parentList = this.addChildren(await this.getTypeThird(), await this.getTypeSecond());
            }
        },
        addChildren(parentArr, childArr) {
            // console.log(parentArr.length,childArr);
            parentArr.forEach(item => {
                item.children = [];
                childArr.forEach(child => {
                    if (item.id === child.parentId) {
                        item.children.push(child);
                    }
                })
            })
            console.log(parentArr);
            return parentArr;
        },
        // addChildren(parentArr, childArr) {
        //     // console.log(parentArr.length,childArr);
        //     parentArr.forEach(item => {
        //         item.children = [];
        //         childArr.forEach(child => {
        //             if (item.id === child.parentId) {
        //                 item.children.push(child);
        //             }
        //         })
        //     })
        //     console.log(parentArr);
        //     return parentArr;
        // },
        handleCheck(data, checked) {
            this.things.parentId = data.name;
            console.log(this.selectOrg.orgsid);
@@ -196,7 +197,7 @@
            if (indexs < 0 && this.selectOrg.orgsid.length === 1 && checked) {
                this.$message({
                    message: '只能选择一个区域!',
                    type: 'error',
                    type: 'warning',
                    showClose: true
                })
                // 设置已选择的节点为false 很重要