| | |
| | | <el-tree :data="list" ref="tree" :props="{ children: 'children', label: 'name' }" 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" |
| | | :default-expanded-keys="expandedKeys"> |
| | | :default-expanded-keys="expandedKeys" |
| | | :default-checked-keys="[1]"> |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <el-row style="width: 100%;"> |
| | | <el-col :span="21" :class="{sort:node.level>3}"> |
| | | <span><i |
| | | :class="`node_i ${data.children != undefined&&data.children.length>0 ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i> |
| | | [{{ node.level-1 }}] {{ data.name }}</span> |
| | | {{ data.name }}</span> |
| | | </el-col> |
| | | <el-col :span="2" style="text-align: right;" v-if="delStandardTree"> |
| | | <el-col :span="2" style="text-align: right;" v-if="delStandardTree&&node.level>1"> |
| | | <el-button type="text" size="mini" @click.stop="remove(node, data)"> |
| | | <i class="el-icon-delete"></i> |
| | | </el-button> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row class="standard_table" v-loading="tableLoad"> |
| | | <ValueTable ref="ValueTable" :url="$api.capacityScope.selectItemParameterList" :componentData="componentData" /> |
| | | <ValueTable ref="ValueTable" :url="$api.department.showUserById" :componentData="componentData" /> |
| | | </el-row> |
| | | </div> |
| | | <el-dialog title="架构新增" :visible.sync="addDia" width="400px"> |
| | |
| | | addStandardProduct: false, |
| | | componentData: { |
| | | entity: { |
| | | name:'', |
| | | departId:'', |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | |
| | | }, |
| | | init:false, |
| | | isIndex: true, |
| | | showSelect: true, |
| | | select: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [], |
| | | isPage: false, |
| | | tagField: { |
| | |
| | | this.$refs.ValueTable.selectList() |
| | | }, |
| | | refresh() { |
| | | this.upIndex++ |
| | | this.upIndex++; |
| | | this.componentData.entity.departId = this.list[0].id; |
| | | this.refreshTable() |
| | | }, |
| | | handleNodeClick(val, node, el) { //树的值 |
| | |
| | | } |
| | | this.selectTree = data2.replace(' - ', '') |
| | | this.addOb.fatherId = val.id; |
| | | this.componentData.entity.departId = val.id; |
| | | this.refreshTable() |
| | | }, |
| | | getNodeParent(val) { |
| | | if (val.parent != null) { |
| | |
| | | this.list.forEach(a => { |
| | | a.children.forEach(b => { |
| | | b.children.forEach(c => { |
| | | this.expandedKeys.push(c.name) |
| | | this.expandedKeys.push(c.id) |
| | | }) |
| | | // this.expandedKeys.push(b.label) |
| | | }) |
| | | }) |
| | | this.treeLoad = false |
| | | this.componentData.entity.departId = this.list[0].id; |
| | | this.selectTree = '全部' |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | addStandardTree() { |