| | |
| | | 新增 |
| | | </el-button> |
| | | </div> |
| | | <el-table :data="bindTableData" style="width: 100%" height="70vh"> |
| | | <el-table :data="bindTableData" style="width: 100%" height="70vh" v-loading="bindTableDataLoading"> |
| | | <el-table-column prop="inspectionItemClass" label="检验项分类" width="150"> |
| | | </el-table-column> |
| | | <el-table-column prop="inspectionItem" label="检验项" width="150"> |
| | |
| | | InspectionKey: 1, |
| | | bindDialogVisible: false, |
| | | bindAddDialogVisible: false, |
| | | bindTableDataLoading: false, |
| | | bindTableData: [], |
| | | bindAddTableData: [], |
| | | chooseBindAddList: [], |
| | |
| | | if (obj) { |
| | | return this.insResultList.find((m) => m.value == params).label; |
| | | } else { |
| | | return '' |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | let obj = this.insResultList.find((m) => m.value == params) |
| | | if (obj) { |
| | | return this.insResultList.find((m) => m.value == params).type; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | }, |
| | |
| | | }) |
| | | .then((res) => { |
| | | this.loading = false; |
| | | if (res.code == 201) { |
| | | this.$message.error("绑定失败"); |
| | | return; |
| | | } |
| | | this.$message.success("绑定成功"); |
| | | this.bindAddDialogVisible = false; |
| | | this.getBinding(this.bindCurrentInfo); |
| | |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(async () => { |
| | | delProductTreeByProductId({ productId: row.id }) |
| | | .then((res) => { |
| | | if (res.coe == 201) { |
| | | // this.$message.error('未绑定检验项') |
| | | return; |
| | | } |
| | | this.getBinding(this.bindCurrentInfo); |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | this.bindTableDataLoading = true |
| | | delProductTreeByProductId({ productId: row.id }).then((res) => { |
| | | this.bindTableDataLoading = false |
| | | this.getBinding(this.bindCurrentInfo); |
| | | }).catch((error) => { |
| | | this.bindTableDataLoading = false |
| | | console.error(error); |
| | | }); |
| | | }); |
| | | }, |
| | | }, |