| | |
| | | :data="towTree" |
| | | ref="tree" |
| | | :props="{ children: 'children', label: 'father' }" |
| | | node-key="name" |
| | | node-key="father" |
| | | default-expand-all |
| | | @node-click="handleNodeClick" |
| | | :key="upIndex" |
| | |
| | | >元件:</el-col |
| | | > |
| | | <el-col :span="16" :offset="1"> |
| | | <el-select |
| | | <el-input v-model="cell" |
| | | placeholder="请输入元件名称" |
| | | style="width: 200px"> |
| | | </el-input> |
| | | <!-- <el-select |
| | | v-model="cell" |
| | | style="width: 310px" |
| | | disabled |
| | |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-select> --> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="line-height: 46px"> |
| | |
| | | allow-create |
| | | filterable |
| | | @create="" |
| | | |
| | | placeholder="请选择" |
| | | style="width: 480px" |
| | | > |
| | |
| | | this.$axios |
| | | .post( |
| | | this.$api.url.addTechTemp, |
| | | |
| | | { |
| | | deviceGroup: this.form.deviceGroup, |
| | | // elementId: JSON.stringify(this.form.elementId).replace("[","").replace("]",""), |
| | |
| | | // console.log(this.equipment); |
| | | }); |
| | | }, |
| | | |
| | | // onTypeBlur(e) { |
| | | // if (e.target.value) { |
| | | // this.type = e.target.value;}}, |
| | | //工序 |
| | | chooseTech() { |
| | | this.$axios.get(this.$api.url.chooseTech,{ |
| | |
| | | this.$api.url.writeTechById + `?id=${this.upData.id}`, |
| | | { |
| | | deviceGroup: this.upData.device_group, |
| | | elementId:this.cell.join(','), |
| | | element:JSON.stringify(this.cell.split(',')), |
| | | // element:JSON.stringify(this.form.elementId.split(',')) |
| | | father: this.edit.father, |
| | | name: this.edit.name, |
| | | type: this.edit.type |
| | |
| | | }) |
| | | .then((res) => { |
| | | this.edit = res.data[0]; |
| | | 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); |
| | | this.cell = this.edit.element |
| | | console.log(this.cell); |
| | | let cc = JSON.parse(this.cell).join(",") |
| | | console.log(cc); |
| | | this.cell = cc |
| | | console.log(this.cell); |
| | | // this.cell = this.edit.children.map(el => { |
| | | // return el.id |
| | | // }) |
| | | // this.cell = this.cell.join(',') |
| | | // this.cell = nn |
| | | // console.log(this.cell); |
| | | |
| | | |
| | | |
| | | // let cc = this.edit.element.join(", ") |
| | | // let str = cc.join(", "); |
| | | // let cc = JSON.parse(this.edit.element) |
| | | // console.log(cc); |
| | | // console.log(gg); |
| | | // console.log(json.parse(gg)); |
| | | |
| | | }); |
| | | }, |