| | |
| | | </div> |
| | | |
| | | <div class="contentTable" v-if="this.typeselect == 0"> |
| | | <technology @childData="getChildData" :tableType="tableType" :tableData="tableData"></technology> |
| | | <technology @childData="getChildData" @updateDevice="updateDevice" :tableType="tableType" :tableData="tableData"></technology> |
| | | </div> |
| | | <div class="contentTable" v-if="this.typeselect == 1"> |
| | | <target @childData="getChildData" :tableType="tableType" :tableData="tableData"></target> |
| | |
| | | return { |
| | | //子组件传的id列表 |
| | | childIds:[], |
| | | isUpdateDevice:false, |
| | | //工序列表 |
| | | fatherList:[], |
| | | deviceList:[], |
| | |
| | | this.selectVersion() |
| | | }, |
| | | methods: { |
| | | updateDevice(val){ |
| | | this.isUpdateDevice = val; |
| | | }, |
| | | changeLeftAdd(){ |
| | | if(this.leftAdd.type.length===2){ |
| | | this.leftAdd.father=null |
| | |
| | | this.materialVisible = false; |
| | | this.productVisible = false; |
| | | }, |
| | | //清空新增bom表单 |
| | | clearBomAddModel(){ |
| | | if(this.typeselect == 0){ |
| | | this.deviceList=[]; |
| | |
| | | this.$refs["targetForm"].resetFields(); |
| | | }else if(this.typeselect == 2){ |
| | | this.mIdList = []; |
| | | this.materialForm.tableList = []; |
| | | this.$refs["materialForm"].resetFields(); |
| | | }else{ |
| | | this.productDeviceList=[]; |
| | |
| | | let arr = res.data; |
| | | this.formatData(arr) |
| | | this.tableData = arr; |
| | | console.log("arr--",arr); |
| | | }) |
| | | }, |
| | | formatData(data){ |
| | |
| | | } |
| | | }, |
| | | watch:{ |
| | | isUpdateDevice(val){ |
| | | if(val){ |
| | | this.selectAll(); |
| | | } |
| | | }, |
| | | search(val) { |
| | | this.$refs.tree.filter(val); |
| | | }, |