| | |
| | | <el-table-column label="操作" width="130"> |
| | | <template slot-scope="scope"> |
| | | <span class="table_do" @click="upContent(scope.row)">编辑 </span> |
| | | <span class="table_do" @click="deleteRow(scope.$index, tableData)">删除</span> |
| | | <span class="table_do" @click="deleteRow(scope.$index, scope.row)">删除</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;">类型:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select v-model="edit.techFathe" placeholder="请选择类型" style="width: 310px;"> |
| | | <el-select v-model="edit.type" placeholder="请选择类型" style="width: 310px;"> |
| | | <el-option label="橡胶连接器" :value="0"></el-option> |
| | | <el-option label="金属连接器" :value="1"></el-option> |
| | | <el-option label="湿插拔电连接器" :value="2"></el-option> |
| | |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select v-model="edit.techFather" |
| | | placeholder="请选择类型" style="width: 310px;"> |
| | | placeholder="请选择类型" |
| | | @change="workevent" |
| | | style="width: 310px;"> |
| | | <el-option |
| | | v-for="item in process" |
| | | :key="item.name" |
| | |
| | | <el-col :span="4" style="font-size: 14px;text-align: right;">工艺:</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <template> |
| | | <el-select v-model="edit.techFathe" placeholder="请选择类型" style="width: 310px;"> |
| | | <el-select v-model="edit.techName" placeholder="请选择类型" style="width: 310px;"> |
| | | <el-option |
| | | v-for="item in craftapi" |
| | | :key="item.id" |
| | |
| | | tableData: [], |
| | | upIndex: 0, |
| | | selects: [], |
| | | delete:[], |
| | | typeselect:0, |
| | | upDia: false, |
| | | checkTreeNode:[], |
| | | checkTreeNode:{ |
| | | id:2, |
| | | }, |
| | | upData:{}, |
| | | edit:{ |
| | | name:'', |
| | | note:'', |
| | |
| | | }, |
| | | mounted() { |
| | | this.selectAllleft() |
| | | this.selectjilu() |
| | | }, |
| | | methods: { |
| | | delQueById() { |
| | | this.$axios.get(this.$api.url.chooseTechFath) |
| | | this.$axios.get(this.$api.url.delQueById,) |
| | | }, |
| | | childrenClick() {}, |
| | | //新增 |
| | |
| | | id:this.upData.id |
| | | } |
| | | }).then(res => { |
| | | this.edit = res.data |
| | | console.log(this.edit); |
| | | this.edit = res.data[0] |
| | | // console.log(this.edit); |
| | | }) |
| | | }, |
| | | TYpe(val) { |
| | |
| | | } |
| | | } |
| | | }) |
| | | let cc = this.selects.map(el => { |
| | | return el.id |
| | | }) |
| | | this.delete = cc.join(',') |
| | | console.log(this.delete); |
| | | this.delAllRecord() |
| | | this.$message.success('删除完成') |
| | | }, |
| | | deleteRow(index, rows) { |
| | | rows.splice(index, 1); |
| | | //批量删除 |
| | | delAllRecord() { |
| | | this.$axios.post(this.$api.url.delAllRecord,{ |
| | | ids:this.delete |
| | | }) |
| | | }, |
| | | |
| | | //删除 |
| | | delQueById() { |
| | | this.$axios.post(this.$api.url.delQueById,{ |
| | | id:this.upData.id |
| | | }) |
| | | }, |
| | | deleteRow(index, rows) { |
| | | this.tableData.splice(index,1) |
| | | this.upData.id = rows.id |
| | | this.delQueById() |
| | | }, |
| | | |
| | | upContent(ob) { |
| | | this.upData = ob |
| | | console.log(this.upData); |
| | | this.selecRecord() |
| | | this.chooseTechFath() |
| | | this.upDia = true |
| | | }, |
| | | submitUpData() { |