XiaoRuby
2023-09-11 e0ff382cd71d451190021e3ed12af99b9a965ee9
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" ref="tree" :props="{children: 'children',label: 'name'}" node-key="id" default-expand-all
            <el-tree :data="list" style="height: 500px;overflow-y: auto;" 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 }">
@@ -216,7 +216,7 @@
            <el-form ref="form" :model="form" label-width="80px">
            <el-form-item label="类型">
               <template>
                        <el-select v-model="form.value" placeholder="请选择" style="width: 480px;">
                        <el-select v-model="form.value" placeholder="请选择" @change="edittype" style="width: 480px;">
                     <el-option label="橡胶连接器" :value="0"></el-option>
                     <el-option label="金属连接器" :value="1"></el-option>
                     <el-option label="湿插拔电连接器" :value="2"></el-option>
@@ -442,9 +442,10 @@
               ids:this.delete
            })
         },
         //编辑
         writeRecordById() {
         },
         //新增
         add() {
            this.dialogVisible = false
@@ -489,6 +490,11 @@
                console.log(this.typeselect);
                this.selectAllleft()
            },
         edittype(val) {
            // this.typeselect = ''
            this.typeselect = val
            this.chooseTechFath()
         },
            //主体左
            selectAllleft() {
         this.$axios.get(this.$api.url.selectAllleft,{
@@ -497,8 +503,12 @@
            this.list = res.data;
                console.log(this.list);
            this.selectDataList()
            this.$nextTick(() => {
            this.$refs.tree.setCurrentKey(this.list[0].children[0].name) // 默认选中节点第一个
         })
         })
         },
         //selectAllSelf   checkTreeNode
         selectAllSelf() {
         this.$axios.get(this.$api.url.selectAllSelf,{