zss
2023-09-14 4c5c20a7c03539104df74072b1b8a81b51c19ab8
src/components/view/self-inspection.vue
@@ -141,7 +141,7 @@
      <div class="thing">
         <div class="left">
            <el-input v-model="search.technology" suffix-icon="el-icon-search" placeholder="请输入搜索内容" size="small" clearable @input="(val)=>$refs.tree.filter(val)"></el-input>
            <el-tree :data="list" style="height: 500px;overflow-y: auto;" ref="tree" :props="{children: 'children',label: 'name'}" node-key="name" default-expand-all
            <el-tree :data="list" ref="tree" :props="{children: 'children',label: 'name'}" node-key="name" default-expand-all
               @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" @node-collapse="nodeClose" :filter-node-method="filterNode"
               :key="upIndex">
               <div class="custom-tree-node" slot-scope="{ node, data }">
@@ -382,7 +382,7 @@
            product: [],
            list: [],
            checkTreeNode: {
               id:1,
               id:'',
            },
            tableData: [],
            upIndex: 0,
@@ -506,10 +506,29 @@
            this.$nextTick(() => {
            this.$refs.tree.setCurrentKey(this.list[0].children[0].name) // 默认选中节点第一个
         })
         console.log("===========");
         console.log(this.list);
         let one=this.list.filter(item=>{
         return item.children.length>0
         })[0]
         console.log(one);
         let id =one.children[0].id
         console.log(id);
         this.selectAllSelfStart(id)
         this.selectDataList();
         console.log("===========");
         })
         },
         //selectAllSelf   checkTreeNode
         //默认
         selectAllSelfStart(id) {
         this.$axios.get(this.$api.url.selectAllSelf,{
            params:{id:id}
         }).then(res => {
            this.tableData = res.data;
                console.log(this.tableData);
         })
         },
         //右
         selectAllSelf() {
         this.$axios.get(this.$api.url.selectAllSelf,{
            params:{id:this.checkTreeNode.id}