| | |
| | | |
| | | <div style="width: 100%; margin-left: 10px; display: flex"> |
| | | <div style="width: 36%; margin-right: 30px"> |
| | | <el-table v-loading="loading" ref="tb" :data="pictureList" highlight-current-row |
| | | <el-table v-loading="loading" ref="tb" :data="pictureList" highlight-current-row |
| | | :row-class-name="tableRowClassName" @current-change="handleCurrentChange" border height="520px"> |
| | | <!-- <el-table-column type="selection" width="55" /> --> |
| | | <!-- @selection-change="handleSelectionChange" --> |
| | | <el-table-column label="体检号" align="center" prop="tjNumber" min-width="160" /> |
| | | <el-table-column label="姓名" align="center" prop="cusName" min-width="80" /> |
| | |
| | | </el-table> |
| | | </div> |
| | | |
| | | <div id="table" style="width: 44%; height: 610px"> |
| | | <el-table v-loading="loading" ref="mu" :data="tableList" :row-class-name="tableRowClassName" @header-click="handleHeaderClick" |
| | | highlight-current-row @selection-change="handleChange" border style="height: 400px"> |
| | | <div id="table" style="width: 44%; height: 610px"> |
| | | <el-table v-loading="loading" ref="mu" :data="tableList" :row-class-name="tableRowClassName" |
| | | @header-click="handleHeaderClick" highlight-current-row @selection-change="handleChange" border |
| | | style="height: 400px"> |
| | | <el-table-column type="selection" width="50" align="center"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="科室" align="center" prop="deptName" min-width="100" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="项目" align="center" prop="proName" min-width="150" :show-overflow-tooltip="true" /> |
| | |
| | | this.queryParams.endTime = null; |
| | | } |
| | | /* getYxJcList(this.queryParams).then((response) => { |
| | | // console.log(response.data.customers, 666); |
| | | |
| | | if (response.data) { |
| | | this.pictureList = response.data.customers; |
| | |
| | | this.$refs.tb.clearSelection(); |
| | | } |
| | | this.total = response.data.total; |
| | | console.log(response.data.total, 88); |
| | | |
| | | this.loading = false; |
| | | }); */ |
| | | |
| | | getCompany(this.queryParams).then((response) => { |
| | | this.CompanyList = response.data; |
| | | // console.log(this.CompanyList, 555); |
| | | |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | |
| | | handleRowClick(row, column, event) { |
| | | // console.log(row, 2323); |
| | | this.name = row.proName; |
| | | // console.log(this.name, 99999); |
| | | }, |
| | | // 体检公司拼音搜索 |
| | | getRemoteData(query) { |
| | |
| | | |
| | | |
| | | getYxJcXx(tjNumber).then((res) => { |
| | | console.log(res, 222); |
| | | this.tableList = res.data; |
| | | this.loading = false; |
| | | }); */ |
| | |
| | | this.resetForm("form"); |
| | | }, |
| | | hb() { |
| | | // console.log(this.queryParams.tjNum); |
| | | if (this.queryParams.tjNumber != null) { |
| | | // this.handleQuery(); |
| | | this.submitForm(); |
| | |
| | | // 选框数据 |
| | | searchSelect(val) { |
| | | this.CheckBox = val; |
| | | // console.log(this.CheckBox, 9999); |
| | | }, |
| | | |
| | | handleHeaderClick(column, event) { |
| | | if (column.type === 'selection') { |
| | | if (column.type === "selection") { |
| | | // 查找全选框并隐藏 |
| | | const checkbox = event.target.closest('.el-checkbox'); |
| | | if (checkbox) checkbox.style.display = 'none'; |
| | | const checkbox = event.target.closest(".el-checkbox"); |
| | | if (checkbox) checkbox.style.display = "none"; |
| | | } |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | |
| | | this.tableList = []; |
| | | return; |
| | | } |
| | | |
| | | let tjNumber = val.tjNumber; |
| | | this.selectedTjNumber = val.tjNumber; |
| | | this.changtjNumber(val.tjNumber) |
| | | |
| | | }, |
| | | |
| | | changtjNumber(val) { |
| | | console.log(8989) |
| | | let tjNumber = val; |
| | | this.loading = true; |
| | | |
| | | getYxJcXx(tjNumber).then((res) => { |
| | | this.tableList = res.data; |
| | | this.loading = false; |
| | | this.$nextTick(() => { |
| | | const headerCheckbox = this.$refs.mu.$el.querySelector('.el-table__header .el-checkbox'); |
| | | if (headerCheckbox) headerCheckbox.style.display = 'none'; |
| | | |
| | | const headerCheckbox = this.$refs.mu.$el.querySelector( |
| | | ".el-table__header .el-checkbox" |
| | | ); |
| | | if (headerCheckbox) headerCheckbox.style.display = "none"; |
| | | |
| | | if (this.tableList.length > 0) { |
| | | const firstRow = this.tableList[0]; |
| | | this.$refs.mu.toggleRowSelection(firstRow, true); |
| | | this.handleChange([firstRow]); |
| | | this.tableList.forEach((item, index) =>{ |
| | | if (item.type == 0) { |
| | | const firstRow = item; |
| | | this.$refs.mu.toggleRowSelection(firstRow, true); |
| | | this.handleChange([firstRow]); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | }); |
| | | }); |
| | |
| | | const proId = selection[0].proId; |
| | | |
| | | // ✅ 确保 selectedRow 存在且有 tjNumber |
| | | if (this.selectedRow && this.selectedRow.tjNumber) { |
| | | const tjNumber = this.selectedRow.tjNumber; |
| | | getYxJcXxJg(tjNumber, proId).then((res) => { |
| | | this.form.proResult = res.data.jcsj; |
| | | this.form.conclusion = res.data.jcjl; |
| | | this.$refs.aaa.updateData(res.data.jcsj, res.data.jcjl); |
| | | }); |
| | | } else { |
| | | console.warn("selectedRow 未准备好,跳过接口调用"); |
| | | } |
| | | const tjNumber = this.selectedTjNumber; |
| | | getYxJcXxJg(tjNumber, proId).then((res) => { |
| | | this.form.proResult = res.data.jcsj; |
| | | this.form.conclusion = res.data.jcjl; |
| | | this.$refs.aaa.updateData(res.data.jcsj, res.data.jcjl); |
| | | }); |
| | | |
| | | // ✅ 同时更新 selectedRow |
| | | this.selectedRow = selection[0]; |
| | |
| | | }, |
| | | |
| | | /* handleChange(selection) { |
| | | // console.log(selection, 123); |
| | | if (selection && selection.length > 0) { |
| | | const proId = selection[0].proId; |
| | | const tjNumber = this.selectedRow.tjNumber; |
| | | this.selectedRow = selection[0]; |
| | | getYxJcXxJg(tjNumber, proId).then((res) => { |
| | | console.log(res, 333); |
| | | this.form.proResult = res.data.jcsj; |
| | | this.form.conclusion = res.data.jcjl; |
| | | }); |
| | |
| | | this.dialogVisible = true; |
| | | }, |
| | | |
| | | |
| | | // 确定按钮 |
| | | submito() { |
| | | console.log(111112225) |
| | | /* if (this.dataobj) { |
| | | if (this.form.proResult) { |
| | | this.dataobj.proResult = this.form.proResult; |
| | |
| | | jcjl: jcjl, // 传递检查结论 |
| | | }) |
| | | .then((response) => { |
| | | this.submitForm(); |
| | | |
| | | this.form.proResult = ""; |
| | | this.form.conclusion = ""; |
| | | if (this.tableList.length == 1) { |
| | | this.submitForm(); |
| | | } else { |
| | | this.tableList.forEach((item, index) =>{ |
| | | if (item.type == 0) { |
| | | this.changtjNumber(this.selectedTjNumber); |
| | | }else{ |
| | | this.submitForm(); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error("提交失败", error); |