| | |
| | | <el-form-item label="工序"> |
| | | <template> |
| | | <el-select v-model="search.work" |
| | | placeholder="请选择类型" |
| | | placeholder="请选择" |
| | | allow-create |
| | | filterable |
| | | @change="workevent" |
| | |
| | | :props="{children: 'children',label: 'name'}" |
| | | node-key="id" default-expand-all @node-click="handleNodeClick" > |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span><i :class="`node_i ${data.code != '[3]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i> |
| | | <span><i :class="`node_i ${data.code != '[2]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i> |
| | | {{data.code}} {{ data.name }}</span> |
| | | <el-button type="text" size="mini" @click.stop="remove(node, data)"> |
| | | <!-- <el-button type="text" size="mini" @click.stop="remove(node, data)"> |
| | | <i class="el-icon-delete"></i> |
| | | </el-button> |
| | | </el-button> --> |
| | | </div> |
| | | </el-tree> |
| | | </div> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | search:{}, |
| | | search:{ |
| | | type: 0, |
| | | technology: null |
| | | }, |
| | | list:[], |
| | | process:{}, |
| | | // handleClose:[], |
| | |
| | | specifications:'', |
| | | unit:'', |
| | | }], |
| | | search:{ |
| | | type:'', |
| | | work:'', |
| | | craft:'', |
| | | |
| | | }, |
| | | addsearch:{}, |
| | | upData:{}, |
| | | form:{}, |
| | |
| | | this.selectAllMbom() |
| | | }, |
| | | methods:{ |
| | | selectDataList() { |
| | | this.list.forEach(a => { |
| | | a.code = '[1]' |
| | | if (a.children != undefined) { |
| | | a.children.forEach(b => { |
| | | b.code = '[2]' |
| | | if (b.children != undefined) { |
| | | b.children.forEach(c => { |
| | | c.code = '[3]' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | this.upIndex++ |
| | | }, |
| | | workevent(val){ |
| | | console.log(val); |
| | | let idx = this.process.findIndex(el => el.name === val) |
| | |
| | | }).then(res => { |
| | | this.list = res.data; |
| | | console.log(this.list); |
| | | this.selectDataList() |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |