zouyu
2024-03-15 3ad119ce8540ccd941f97c272d95180618ff0965
src/components/view/b2-standard.vue
@@ -97,9 +97,9 @@
               <el-button type="primary" icon="el-icon-plus" size="mini" circle @click="addDia = true"></el-button>
            </el-col>
         </el-row>
         <el-tree :data="list" ref="tree" default-expand-all :props="{ children: 'children', label: 'label' }"
            node-key="id" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current
            @node-expand="nodeOpen" @node-collapse="nodeClose" v-loading="treeLoad" :expand-on-click-node="false">
         <el-tree :data="list" ref="tree" :props="{ children: 'children', label: 'label' }"
            node-key="label" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current
            @node-expand="nodeOpen" @node-collapse="nodeClose" v-loading="treeLoad" :expand-on-click-node="false" :default-expanded-keys="expandedKeys">
            <div class="custom-tree-node" slot-scope="{ node, data }">
               <el-row>
                  <el-col :span="21">
@@ -325,7 +325,8 @@
                  deviceGroup:{select:[]}
               },
               selectField: {},
            }
            },
            expandedKeys:[]
         }
      },
      mounted() {
@@ -462,6 +463,13 @@
            this.treeLoad = true
            this.$axios.get(this.$api.standardTree.selectStandardTreeList).then(res => {
               this.list = res.data
               this.list.forEach(a=>{
                  a.children.forEach(b=>{
                     b.children.forEach(c=>{
                        this.expandedKeys.push(c.label)
                     })
                  })
               })
               this.treeLoad = false
            })
         },