| | |
| | | this.changtjNumber(val.tjNumber); |
| | | }, |
| | | changtjNumber(val) { |
| | | console.log(8989); |
| | | let tjNumber = val; |
| | | this.loading = true; |
| | | getYxJcXx(tjNumber).then((res) => { |
| | | this.tableList = res.data.map((item) => { |
| | | // 如果 imageUrl 存在且是纯 Base64 字符串,添加 data:image 前缀 |
| | | if (item.imageUrl && !item.imageUrl.startsWith("data:image")) { |
| | | // 假设图片类型为 png,如果接口提供类型,可以替换为动态值 |
| | | item.imageUrl = `data:image/png;base64,${item.imageUrl}`; |
| | | } |
| | | return item; |
| | | }); |
| | | // 检查 res.data 是否存在且为数组 |
| | | if (res && res.data && Array.isArray(res.data)) { |
| | | this.tableList = res.data.map((item) => { |
| | | // 如果 imageUrl 存在且是纯 Base64 字符串,添加 data:image 前缀 |
| | | if (item.imageUrl && !item.imageUrl.startsWith("data:image")) { |
| | | // 假设图片类型为 png,如果接口提供类型,可以替换为动态值 |
| | | item.imageUrl = `data:image/png;base64,${item.imageUrl}`; |
| | | } |
| | | return item; |
| | | }); |
| | | } else { |
| | | // 如果 res.data 不存在或不是数组,设置为空数组 |
| | | this.tableList = []; |
| | | // console.warn('API response data is not an array:', res); |
| | | } |
| | | this.loading = false; |
| | | this.$nextTick(() => { |
| | | const headerCheckbox = this.$refs.mu.$el.querySelector( |
| | |
| | | this.handleChange([firstRow]); |
| | | } |
| | | }); |
| | | }).catch((error) => { |
| | | console.error('获取影像检查信息失败:', error); |
| | | this.tableList = []; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | qijian(row) { |
| | |
| | | this.form.proResult = yxbx; |
| | | }, |
| | | submiepilog() { |
| | | if (!this.tableList || this.tableList.length === 0) { |
| | | this.$message.warning("表格中没有数据"); |
| | | return; |
| | | } |
| | | |
| | | // 检查 tableList 表格中是否有选中的项目 |
| | | const selectedRows = this.$refs.mu.selection; |
| | | if (!selectedRows || selectedRows.length === 0) { |
| | | this.$message.warning("请先选择表格中的项目"); |
| | | return; |
| | | } |
| | | this.$refs.aaa.open = true; |
| | | let proId = "1633660948860522585"; |
| | | this.$refs.aaa.getList(proId); |
| | | }, |
| | | submito() { |
| | | if (!this.selectedRow || !this.selectedRow.proId) { |
| | | this.$message.error("请选择提交项目"); |
| | | if (!this.tableList || this.tableList.length === 0) { |
| | | this.$message.warning("表格中没有数据"); |
| | | return; |
| | | } |
| | | |
| | | // 检查 tableList 表格中是否有选中的项目 |
| | | const selectedRows = this.$refs.mu.selection; |
| | | if (!selectedRows || selectedRows.length === 0) { |
| | | this.$message.warning("请先选择表格中的项目"); |
| | | return; |
| | | } |
| | | |
| | | /* if (!this.selectedRow || !this.selectedRow.proId) { |
| | | this.$message.error("请选择提交项目"); |
| | | return; |
| | | } */ |
| | | if (!this.form.proResult && !this.form.conclusion) { |
| | | this.$message.warning("请选择检查所见或检查结论!"); |
| | | } else { |