| | |
| | | size="small" |
| | | :inline="true" |
| | | label-width="68px" |
| | | @submit.native.prevent |
| | | > |
| | | <el-form-item label="体检号" prop="reportDoctorCode"> |
| | | <el-input |
| | |
| | | :data="exaLists" |
| | | v-loading="loading" |
| | | border |
| | | max-height="350" |
| | | @current-change="handleCurrentChange" |
| | | @selection-change="handleSelectionChange" |
| | | :row-class-name="tableRowClassName" |
| | | style="width: 100%" |
| | | height="350" |
| | | @selection-change="handleCurrentChange" |
| | | :header-cell-style="{ background: '#aad8df' }" |
| | | > |
| | | <!-- @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" --> |
| | | <el-table-column |
| | | fixed |
| | | type="selection" |
| | | align="center" |
| | | label="选择" |
| | | width="40" |
| | | :selectable="isSelectable" |
| | | > |
| | | <!-- :selectable="isSelectable" --> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="姓名" align="center" prop="name" width="80px" /> |
| | |
| | | align="center" |
| | | prop="examinationDate" |
| | | width="150px" |
| | | :formatter="formatDate" |
| | | /> |
| | | |
| | | <el-table-column label="门诊号" align="center" prop="mzh" width="140px" /> |
| | |
| | | |
| | | <script> |
| | | import { getlisList, getJyTjList, asyncPacs } from "@/api/doctor/pacsCheck"; |
| | | import moment from "moment"; |
| | | |
| | | export default { |
| | | dicts: ["dict_tj_status"], |
| | |
| | | }); |
| | | }, |
| | | methods: { |
| | | |
| | | handleDateChange(val){ |
| | | handleDateChange(val) { |
| | | if (val && val.length === 2) { |
| | | this.queryParams.start = val[0]; // 设置开始时间 |
| | | this.queryParams.end = val[1]; // 设置结束时间 |
| | | this.queryParams.end = val[1]; // 设置结束时间 |
| | | } else { |
| | | this.queryParams.start = null; |
| | | this.queryParams.end = null; |
| | | } |
| | | console.log('Query Params:', this.queryParams); |
| | | |
| | | console.log("Query Params:", this.queryParams); |
| | | }, |
| | | isSelectable(row) { |
| | | return !!row.mzh; |
| | | }, |
| | | // isSelectable(row) { |
| | | // return !!row.mzh; |
| | | // }, |
| | | tableRowClassName({ row }) { |
| | | return !row.mzh ? "row-disabled" : ""; |
| | | }, |
| | | |
| | | handleSelectionChange(val) { |
| | | console.log(val); |
| | | /* if (val.length > 1) { |
| | | let del_row = val.shift(); |
| | | this.$refs.tb.toggleRowSelection(del_row, false); //设置这一行取消选中 |
| | | } |
| | | console.log(val, 999); */ |
| | | |
| | | if (val.length > 0) { |
| | | // const selectedRow = val[0]; |
| | | // console.log(val[0], 555); |
| | | |
| | | this.selectedFirstTable = val; |
| | | console.log("当前选中的行数据:", this.selectedFirstTable); |
| | | // this.fetchRightTableData(selectedRow); |
| | | } else { |
| | | this.selectedFirstTable = null; |
| | | this.checkList = []; |
| | | } |
| | | }, |
| | | |
| | | handleSelectionChange(val) { |
| | |
| | | this.checkList = response.data; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | formatDate(row) { |
| | | if (!row.examinationDate) return ""; |
| | | |
| | | // 使用 moment 解析指定格式的日期字符串 |
| | | const date = moment(row.examinationDate, "MM DD YYYY hh:mmA"); |
| | | |
| | | if (!date.isValid()) return "无效日期"; |
| | | |
| | | // 格式化为所需格式 |
| | | return date.format("YYYY-MM-DD HH:mm"); |
| | | }, |
| | | |
| | | handleSelectionChangeSecond(selectedRows) { |
| | |
| | | clearInterval(this.clearTimeSet); |
| | | this.clearTimeSet = null; |
| | | this.$modal.closeLoading(); |
| | | }) |
| | | }); |
| | | }, |
| | | }, |
| | | }; |