| | |
| | | selectAllMbom:"/mbomModel/selectAllMbom",//物料维护--》右边 |
| | | addMbom:"/mbomModel/addMbom",//物料--->新增 |
| | | material:"/mbomModel/delMbomById",//物料清单删除 |
| | | delAllMbom:"/mbom/delAllMbom",//批量删除 |
| | | delAllMbom:"/mbomModel/delAllMbom",//批量删除 |
| | | |
| | | selectAllTeque:"/techniqueModel/selectAllTeque",//生产工艺维护---。右边 |
| | | |
| | |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%;margin-bottom: 20px;height: 600px;overflow: auto;" |
| | | row-key="name" |
| | | row-key="rowId" |
| | | border |
| | | @select="selectTr" |
| | | @selection-change="handleSelectionChange" |
| | |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | console.log(this.tableData); |
| | | |
| | | this.formatData(res.data) |
| | | }) |
| | | }, |
| | | modify(){ |
| | | this.modifyevent = true |
| | | }, |
| | | formatData(data){ |
| | | let arr = data; |
| | | for(var i=0;i<arr.length;i++){ |
| | | arr[i].rowId = Math.random(); |
| | | if(arr[i].children != undefined){ |
| | | this.formatData(arr[i].children); |
| | | } |
| | | } |
| | | }, |
| | | //delQueById |
| | | delQueById() { |
| | | this.$axios.post(this.$api.url.delQueById,{ |
| | |
| | | } |
| | | }) |
| | | }, |
| | | addMbom(data) { |
| | | this.$axios.post(this.$api.url.addMbom,data,{ |
| | | // params:{ |
| | | // techTemId:this.craftapi.id, |
| | | // mbomModelDto2List:[{ |
| | | // name:this.tableapi.name, |
| | | // qualityTraceability:this.tableapi.qualityTraceability, |
| | | // specifications:this.tableapi.specifications, |
| | | // supplier:this.tableapi.supplier, |
| | | // unit:this.tableapi.unit, |
| | | // }] |
| | | // } |
| | | addMbom(data,cc) { |
| | | this.$axios.post(this.$api.url.addMbom,{ |
| | | mbomModelDto2List:data, |
| | | techTemId:cc, |
| | | |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res =>{ |
| | | console.log(res); |
| | | // console.log(res); |
| | | this.$message.success('添加完成') |
| | | this.selectAllMbom() |
| | | this.tableapi = [{}] |
| | |
| | | if (this.tableapi == undefined) { |
| | | this.tableapi = new Array(); |
| | | } |
| | | let obj = []; |
| | | let obj = {}; |
| | | this.tableapi.push(obj); |
| | | }, |
| | | skipshow() { |
| | | console.log('666'); |
| | | let data = this.tableapi.at(-1) |
| | | data.techTemId = this.search.craft |
| | | this.addMbom(data) |
| | | // let data = this.tableapi.at(-1) |
| | | // console.log(this.tableapi); |
| | | let cc = this.search.craft |
| | | this.addMbom(this.tableapi,cc) |
| | | this.dialogVisible = false |
| | | }, |
| | | //delAllMbom 批量删除 |
| | |
| | | console.log(one); |
| | | let name=one.children[0].id |
| | | console.log(name); |
| | | this.checkTreeNode.id = name |
| | | this.selectjiluStart(name) |
| | | this.selectDataList(); |
| | | }); |
| | |
| | | }, |
| | | //selectjilu checkTreeNode |
| | | selectjilu() { |
| | | console.log(this.checkTreeNode.id); |
| | | this.$axios.get(this.$api.url.selectjilu,{ |
| | | params:{id:this.checkTreeNode.id} |
| | | }).then(res => { |
| | |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <el-dialog title="编辑记录内容" :visible.sync="upDia" width="500px"> |
| | | <div class="body"> |
| | | <el-row style="line-height: 46px"> |
| | |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <el-select |
| | | v-model="edit.children" |
| | | v-model="cell" |
| | | style="width: 310px" |
| | | disabled |
| | | multiple |
| | |
| | | v-for="item in element" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | |
| | | <el-input v-model="edit.name" size="small" clearable></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row style="line-height: 46px"> |
| | | <el-col :span="4" style="font-size: 14px; text-align: right" |
| | | >设备组:</el-col |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input |
| | | <!-- <el-input |
| | | v-model="upData.device_group" |
| | | size="small" |
| | | clearable |
| | | ></el-input> |
| | | ></el-input> --> |
| | | <template> |
| | | <el-select |
| | | v-model="upData.device_group" |
| | | placeholder="请选择" |
| | | style="width: 306px" |
| | | > |
| | | <el-option |
| | | v-for="item in equipment" |
| | | :key="item.index" |
| | | :label="item.father" |
| | | :value="item.father" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitUpData">确 定</el-button> |
| | |
| | | upDia: false, |
| | | element: [], |
| | | equipment: [0], |
| | | cell:[], |
| | | AAA: [ |
| | | { |
| | | id: "", |
| | |
| | | }, |
| | | //编辑 |
| | | writeTechById() { |
| | | // console.log(JSON.stringify(this.edit.children)); |
| | | // console.log(JSON.stringify(this.edit.children)); |
| | | // var str = '' |
| | | // this.edit.children.forEach((a,ai)=>{ |
| | | // str += a.id |
| | | // if(ai!=this.edit.children.length-1) str+=',' |
| | | // }) |
| | | this.$axios |
| | | .post( |
| | | this.$api.url.writeTechById, |
| | | { |
| | | params: { |
| | | id: this.upData.id, |
| | | technologyTemplateDto: { |
| | | this.$api.url.writeTechById + `?id=${this.upData.id}`, |
| | | { |
| | | deviceGroup: this.upData.device_group, |
| | | elementId: this.edit.elementId, |
| | | elementId:this.cell.join(','), |
| | | father: this.edit.father, |
| | | name: this.edit.name, |
| | | type: this.edit.type, |
| | | }, |
| | | // id:this.upData.id, |
| | | }, |
| | | type: this.edit.type |
| | | }, |
| | | { |
| | | headers: { |
| | |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | console.log(res); |
| | | this.selectAllTechNam() |
| | | }); |
| | | }, |
| | | |
| | |
| | | }) |
| | | .then((res) => { |
| | | this.edit = res.data[0]; |
| | | console.log(this.edit); |
| | | console.log(this.edit.children); |
| | | this.cell = this.edit.children.map(el => { |
| | | return el.id |
| | | }) |
| | | // this.cell = this.cell.join(',') |
| | | // this.cell = nn |
| | | // console.log(this.cell); |
| | | |
| | | }); |
| | | }, |
| | | //编辑内容 |
| | |
| | | const javaApi = 'http://192.168.0.23:8001' |
| | | // localhost 127.0.0.1 |
| | | |
| | | // const javaApi = 'http://127.0.0.1' |
| | | // const javaApi = 'http://127.0.0.1:8001/' |
| | | |
| | | |
| | | |