| | |
| | | size="mini" |
| | | style="margin-right: 15px" |
| | | @click="tongbu" |
| | | :disabled="!selectedFirstTable" |
| | | >同步</el-button |
| | | > |
| | | </el-form-item> |
| | |
| | | label="检验项目" |
| | | align="center" |
| | | prop="checkParts" |
| | | width="150px" |
| | | width="350px" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | <el-table-column |
| | | label="项目编号" |
| | |
| | | } |
| | | console.log(val, 999); */ |
| | | |
| | | /* if (val.length > 0) { |
| | | const selectedRow = val[0]; |
| | | console.log(val[0], 555); |
| | | if (val.length > 0) { |
| | | // const selectedRow = val[0]; |
| | | // console.log(val[0], 555); |
| | | |
| | | this.selectedFirstTable = selectedRow; |
| | | this.selectedFirstTable = val; |
| | | console.log("当前选中的行数据:", this.selectedFirstTable); |
| | | // this.fetchRightTableData(selectedRow); |
| | | } else { |
| | | this.selectedFirstTable = null; |
| | | this.checkList = []; |
| | | } */ |
| | | } |
| | | }, |
| | | // 根据选中的行数据请求右边表格数据 |
| | | /* fetchRightTableData() { |
| | | const code = selectedRow.mzh; |
| | | if (!code) return; |
| | | fetchRightTableData() { |
| | | const code = queryParams.tjNum; |
| | | // if (!code) return; |
| | | |
| | | getJyTjList(code).then((response) => { |
| | | this.checkList = response.data; |
| | | this.loading = false; |
| | | }); |
| | | }, */ |
| | | }, |
| | | |
| | | handleSelectionChangeSecond(selectedRows) { |
| | | this.selectedSecondTable = selectedRows; |
| | | if (selectedRows.length > 1) { |
| | | let del_row = selectedRows.shift(); |
| | | this.$refs.tab1.toggleRowSelection(del_row, false); //设置这一行取消选中 |
| | | } |
| | | console.log("当前选中的行数据:", this.selectedSecondTable); |
| | | }, |
| | | getList() { |
| | |
| | | this.exaLists.length > 0 && |
| | | this.exaLists[0].mzh |
| | | ) { |
| | | const code = this.exaLists[0].mzh; |
| | | const code = this.queryParams.tjNum; |
| | | |
| | | getJyTjList(code).then((response) => { |
| | | this.checkList = response.data; |
| | | }); |
| | | } else { |
| | | this.$message.error("未找到有效的 mzh 值,无法获取相关数据"); |
| | | this.$message.error("查询失败,请稍后重试"); |
| | | } |
| | | /* getJyTjList(code).then((response) => { |
| | | this.checkList = response.data; |
| | | }); */ |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | |
| | | this.$modal.loading("正在同步,请稍候..."); |
| | | this.setTime(); |
| | | const requestData = { |
| | | lis: [this.selectedFirstTable], // 左侧表格选中数据 |
| | | lis: this.selectedFirstTable.map((item) => ({ |
| | | ...item, |
| | | tjNum: this.queryParams.tjNum, |
| | | })), |
| | | jcxmid: this.selectedFirstTable.jcxmid, |
| | | shys: this.selectedFirstTable.shys, |
| | | tj: this.selectedSecondTable[0], // 右侧表格选中数据 |
| | | }; |
| | | |
| | | if (!this.selectedSecondTable || this.selectedSecondTable.length === 0) { |
| | | /* if (!this.selectedSecondTable || this.selectedSecondTable.length === 0) { |
| | | this.$message.error("至少选一条数据!"); |
| | | return; |
| | | } |
| | | } */ |
| | | |
| | | asyncPacs(requestData) |
| | | .then((res) => { |
| | | if (res.code == 200) { |
| | | // this.fetchRightTableData(this.selectedFirstTable); |
| | | this.fetchRightTableData(this.selectedFirstTable); |
| | | clearInterval(this.clearTimeSet); |
| | | this.clearTimeSet = null; |
| | | this.$modal.closeLoading(); |