| | |
| | | <el-button type="primary" icon="el-icon-plus" style="background: #004EA2;" |
| | | @click="bomAddModelVisible = true">æ°å¢</el-button> |
| | | <el-button icon="el-icon-plus">æ°å¢çæ¬</el-button> |
| | | <el-button icon="el-icon-edit-outline">ä¿®æ¹</el-button> |
| | | <el-button icon="el-icon-delete">å é¤</el-button> |
| | | <el-button @click="bomRightUp=true" icon="el-icon-edit-outline">ä¿®æ¹</el-button> |
| | | <el-button @click="bomRightDl=true" icon="el-icon-delete">å é¤</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="thing"> |
| | | <div class="left"> |
| | | <el-input v-model="search" suffix-icon="el-icon-search" placeholder="请è¾å
¥æç´¢å
容" size="small" clearable></el-input> |
| | | |
| | | <el-row> |
| | | <el-col :span="21"> |
| | | <el-input v-model="search" suffix-icon="el-icon-search" placeholder="请è¾å
¥æç´¢å
容" size="small" clearable></el-input> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-button size="mini" icon="el-icon-plus" @click="bomLeftAdd=true"></el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-tree :data="list" ref="tree" default-expand-all :props="{ children: 'children', label: 'name' }" |
| | | node-key="id" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current> |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | |
| | | |
| | | <div class="bom-add-model"> |
| | | <el-dialog title="BOMæ°å¢" :visible.sync="bomAddModelVisible" width="30%"> |
| | | <el-form> |
| | | |
| | | </el-form> |
| | | <div> |
| | | <!-- ç©ææ¸
åæ°å¢ --> |
| | | <bomClickAdd v-if="typeselect===2"/> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="bomAddModelVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="bomAddModelVisible = false">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 左侧ç¹å»+æé® --> |
| | | <el-dialog title="BOMæ°å¢" :visible.sync="bomLeftAdd" width="29%"> |
| | | <el-form ref="leftAdd" :model="leftAdd"> |
| | | <el-form-item label="ç±»å"> |
| | | <el-cascader v-model="leftAdd.type" size="mini" style="width: 93%;" :options="formTypeOptions" :props="{ checkStrictly: true }" clearable></el-cascader> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="bomLeftAdd = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="bomLeftAdd = false">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- å³ä¸ä¾§ç¹å»ä¿®æ¹æé® --> |
| | | <el-dialog title="BOMä¿®æ¹" :visible.sync="bomRightUp" width="30%"> |
| | | <el-form> |
| | | ä¿®æ¹ |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="bomRightUp = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="bomRightUp = false">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- å³ä¸ä¾§ç¹å»å é¤æé® --> |
| | | <el-dialog title="BOMå é¤" :visible.sync="bomRightDl" width="30%"> |
| | | <el-form> |
| | | å é¤ |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="bomRightDl = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="bomRightDl = false">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | import technology from "./standard-table/technology.vue" |
| | | import material from "./standard-table/material.vue" |
| | | import bom from "./standard-table/bom.vue" |
| | | import bomClickAdd from '@/components/view/standard-box/bomClickAdd' |
| | | export default { |
| | | components: { technology,material,bom }, |
| | | components: { technology,material,bom,bomClickAdd }, |
| | | |
| | | data() { |
| | | return { |
| | |
| | | checkTreeNode: {},// ç¹å»é䏿 èç¹ |
| | | tableData: [], |
| | | bomAddModelVisible: false,// æ§å¶bomæ°å¢æ¨¡ææ¡æ¯å¦æ¾ç¤º |
| | | bomLeftAdd: false, |
| | | bomRightUp: false, |
| | | bomRightDl: false, |
| | | formTypeOptions: null, |
| | | typeselect: 0, |
| | | returntree: { |
| | | id:28, |
| | | }, |
| | | version: {}, |
| | | leftAdd:{ |
| | | type: null, |
| | | father: null, |
| | | standard: null, |
| | | name: null, |
| | | specifications: null |
| | | }, |
| | | VER: {}, |
| | | verdata: {}, |
| | | character: 0, |
| | | character: 0 |
| | | } |
| | | }, |
| | | // watch: { |
| | |
| | | this.selectVersion() |
| | | }, |
| | | methods: { |
| | | startLeftAdd(){ |
| | | |
| | | }, |
| | | selectDataList() { |
| | | this.list.forEach(a => { |
| | | a.code = '[1]' |
| | |
| | | }) |
| | | }, |
| | | getDefault(arr, index) { |
| | | console.log(arr); |
| | | for (const item of arr) { |
| | | if (item.children && item.children.length > 0) { |
| | | // æåèç¹ |
| | |
| | | this.tableData = productList |
| | | break; |
| | | } |
| | | }, |
| | | replaceProp(arr){ |
| | | for (let index = 0; index < arr.length; index++) { |
| | | let element = arr[index]; |
| | | element.label=element.name |
| | | element.value=element.name |
| | | // if() |
| | | } |
| | | } |
| | | }, |
| | | watch:{ |
| | | leftAdd: { |
| | | handler(newVal, oldVal) { |
| | | console.log("æ°ç",newVal); |
| | | console.log("æ§ç",oldVal); |
| | | }, |
| | | deep: true // 深度çå¬å¯¹è±¡å
é¨å±æ§çååï¼å¯éç |
| | | }, |
| | | bomLeftAdd:{ |
| | | handler(newval,oldVal){ |
| | | if(newval){ |
| | | let treeOptions = JSON.parse(JSON.stringify(this.list)); |
| | | console.log(treeOptions); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |