| | |
| | | <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 }"> |
| | |
| | | <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> |
| | |
| | | ids:this.delete |
| | | }) |
| | | }, |
| | | //编辑 |
| | | writeRecordById() { |
| | | |
| | | |
| | | |
| | | }, |
| | | //新增 |
| | | add() { |
| | | this.dialogVisible = false |
| | |
| | | console.log(this.typeselect); |
| | | this.selectAllleft() |
| | | }, |
| | | edittype(val) { |
| | | // this.typeselect = '' |
| | | this.typeselect = val |
| | | this.chooseTechFath() |
| | | }, |
| | | //主体左 |
| | | selectAllleft() { |
| | | this.$axios.get(this.$api.url.selectAllleft,{ |
| | |
| | | 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,{ |