| | |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="诊断" width="100" prop="name"> |
| | | <el-input |
| | | v-model="queryParams.diagname" |
| | | placeholder="请输入诊断" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="科室" width="100" prop="name"> |
| | | <el-input |
| | | v-model="queryParams.deptname" |
| | | placeholder="请输入科室名称" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="医生" width="100" prop="name"> |
| | | <el-input |
| | | v-model="queryParams.drname" |
| | | placeholder="请输入医生姓名" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="病案号" prop="outhospno"> |
| | | <el-input |
| | | v-model="queryParams.outhospno" |
| | |
| | | @change="handleChange" |
| | | ></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="就诊日期"> |
| | | <el-date-picker |
| | | v-model="dateRange" |
| | | style="width: 240px" |
| | | value-format="yyyy-MM-dd" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | ></el-date-picker> |
| | | <!-- <el-date-picker |
| | | v-model="dateRange" |
| | | type="datetimerange" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | :default-time="['12:00:00']" |
| | | > |
| | | </el-date-picker> --> |
| | | </el-form-item> |
| | | <el-row> |
| | | <!-- <el-form-item label=" 就诊日期 " prop="admitdate"> |
| | | <el-date-picker |
| | |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> --> |
| | | <el-form-item label="就诊日期"> |
| | | <el-date-picker |
| | | v-model="dateRange" |
| | | style="width: 240px" |
| | | value-format="yyyy-MM-dd" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | ></el-date-picker> |
| | | <!-- <el-date-picker |
| | | v-model="dateRange" |
| | | type="datetimerange" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | :default-time="['12:00:00']" |
| | | > |
| | | </el-date-picker> --> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | |
| | | @click="handleDelete" |
| | | v-hasPermi="['system:user:remove']" |
| | | >删除</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="medium" |
| | | :disabled="multiple" |
| | | @click="handleBatchAddTask" |
| | | > |
| | | 批量添加任务</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="19"> |
| | |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | @click="gettoken360(scope.row.idcardno,scope.row.drcode,scope.row.drname)" |
| | | @click=" |
| | | gettoken360( |
| | | scope.row.idcardno, |
| | | scope.row.drcode, |
| | | scope.row.drname |
| | | ) |
| | | " |
| | | ><span class="button-textsc">{{ |
| | | scope.row.patname |
| | | }}</span></el-button |
| | |
| | | prop="drname" |
| | | width="120" |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="是否存在任务" |
| | | align="center" |
| | | key="serverState" |
| | | prop="serverState" |
| | | width="100" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span |
| | | :style="{ |
| | | color: scope.row.serverState == 1 ? 'green' : 'gray', |
| | | }" |
| | | > |
| | | {{ scope.row.serverState == 1 ? "是" : "无" }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="操作" |
| | | fixed="right" |
| | |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | <el-dialog |
| | | title="批量添加任务" |
| | | :visible.sync="batchTaskVisible" |
| | | width="90%" |
| | | append-to-body |
| | | > |
| | | <el-row :gutter="20"> |
| | | <!-- 左侧:选中患者列表 --> |
| | | <el-col :span="12"> |
| | | <div class="batch-patient-section"> |
| | | <h4>选中患者({{ selectedPatients.length }}人)</h4> |
| | | <el-table |
| | | :data="selectedPatients" |
| | | border |
| | | style="width: 100%" |
| | | size="small" |
| | | > |
| | | <el-table-column prop="patname" label="姓名" width="100" /> |
| | | <el-table-column prop="sex" label="性别" width="80"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.sex === 1 ? "男" : "女" }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="就诊时间" |
| | | align="center" |
| | | key="admitdate" |
| | | prop="admitdate" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatTime(scope.row.admitdate) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="outhospno" label="病案号" /> |
| | | <el-table-column prop="deptname" label="科室" /> |
| | | </el-table> |
| | | </div> |
| | | </el-col> |
| | | |
| | | <!-- 右侧:任务列表 --> |
| | | <el-col :span="12"> |
| | | <div class="batch-task-section"> |
| | | <h4>任务列表(请选择1个任务)</h4> |
| | | <el-table |
| | | :data="taskList" |
| | | border |
| | | style="width: 100%" |
| | | size="small" |
| | | @current-change="handleTaskSelectionChange" |
| | | highlight-current-row |
| | | > |
| | | <el-table-column |
| | | label="任务名称" |
| | | fixed |
| | | align="center" |
| | | key="taskName" |
| | | prop="taskName" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="服务项目" |
| | | align="center" |
| | | key="templatename" |
| | | prop="templatename" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="创建人" |
| | | align="center" |
| | | key="createBy" |
| | | prop="createBy" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | <el-table-column |
| | | label="创建时间" |
| | | sortable |
| | | align="center" |
| | | prop="createTime" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatTime(scope.row.createTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <template #empty> |
| | | <div class="empty-message"> |
| | | <i class="el-icon-warning"></i> |
| | | <span>患者科室无匹配服务</span> |
| | | </div> |
| | | </template> |
| | | </el-table> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- 底部按钮 --> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="batchTaskVisible = false">取 消</el-button> |
| | | <el-button |
| | | type="primary" |
| | | :loading="batchLoading" |
| | | @click="submitBatchTask" |
| | | >创建任务</el-button |
| | | > |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 用户导入对话框 --> |
| | | <el-dialog |
| | | :title="upload.title" |
| | |
| | | </div> |
| | | </el-upload> |
| | | </div> |
| | | |
| | | <!-- 导入检查 --> |
| | | <div class="uploading" v-else-if="dractive == 2"> |
| | | <el-table :data="uploadingData" style="width: 100%"> |
| | |
| | | import { getToken } from "@/utils/auth"; |
| | | import Treeselect from "@riophae/vue-treeselect"; |
| | | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
| | | import { query360PatInfo } from "@/api/AiCentre/index"; |
| | | import { query360PatInfo, getTasklist, addSubtask } from "@/api/AiCentre/index"; |
| | | |
| | | import store from "@/store"; |
| | | |
| | |
| | | Labelchange: false, //修改新增弹窗 |
| | | propss: { multiple: true }, |
| | | optionstag: [], //标签列表 |
| | | batchTaskVisible: false, // 弹窗可见性 |
| | | selectedPatients: [], // 选中的患者列表 |
| | | taskList: [], // 任务列表 |
| | | selectedTask: null, // 选中的任务列表 |
| | | batchLoading: false, // 批量提交加载状态 |
| | | deptcode: "", |
| | | Patientrange: [ |
| | | { |
| | | name: "全部", |
| | |
| | | if (this.dateRange) { |
| | | this.queryParams.beginTime = this.dateRange[0]; |
| | | this.queryParams.endTime = this.dateRange[1]; |
| | | }else{ |
| | | this.queryParams.beginTime = ''; |
| | | this.queryParams.endTime = ''; |
| | | } else { |
| | | this.queryParams.beginTime = ""; |
| | | this.queryParams.endTime = ""; |
| | | } |
| | | listPatouthosp(this.queryParams).then((response) => { |
| | | this.userList = response.rows; |
| | |
| | | }); |
| | | }, |
| | | //患者360跳转 |
| | | gettoken360(sfzh,drcode,drname) { |
| | | gettoken360(sfzh, drcode, drname) { |
| | | this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh; |
| | | if (this.postData.XiaoXiTou.ZuHuMC=='丽水市中医院') { |
| | | this.postData.YeWuXX.YongHuXX.YongHuID = '1400398571877961728'; |
| | | this.postData.YeWuXX.YongHuXX.YongHuXM = 'LSZYY'; |
| | | if (this.postData.XiaoXiTou.ZuHuMC == "丽水市中医院") { |
| | | this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728"; |
| | | this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY"; |
| | | } |
| | | |
| | | query360PatInfo(this.postData).then((res) => { |
| | |
| | | leaveldeptcodes: [], |
| | | leavehospitaldistrictcodes: [], |
| | | }; |
| | | this.handleQuery(); |
| | | this.handleQuery(); |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | |
| | | this.upload.open = false; |
| | | this.dractive = 1; |
| | | }, |
| | | /** 批量添加任务按钮点击 */ |
| | | handleBatchAddTask() { |
| | | // 校验是否选中患者 |
| | | if (this.ids.length === 0) { |
| | | this.$modal.msgWarning("请至少选中1名患者"); |
| | | return; |
| | | } |
| | | // 检查选中的患者中是否有已有任务的 |
| | | const hasTaskPatients = this.userList.filter( |
| | | (item) => this.ids.includes(item.patid) && item.serverState == 1 |
| | | ); |
| | | |
| | | if (hasTaskPatients.length > 0) { |
| | | const patientNames = hasTaskPatients.map((p) => p.patname).join("、"); |
| | | this.$modal.msgError( |
| | | `选中的患者 ${patientNames} 已有任务,无法重复添加` |
| | | ); |
| | | return; |
| | | } |
| | | // 获取选中患者的科室信息(用于校验同一科室) |
| | | const patientDepts = new Set(); |
| | | let deptcode = ""; |
| | | this.ids.forEach((patId) => { |
| | | const patient = this.userList.find((item) => item.patid === patId); |
| | | if (patient) { |
| | | patientDepts.add(patient.deptname); |
| | | deptcode = patient.deptcode; |
| | | } |
| | | }); |
| | | |
| | | // 校验是否同一科室 |
| | | if (patientDepts.size > 1) { |
| | | this.$modal.msgError("选中的患者不属于同一科室,无法批量添加任务"); |
| | | return; |
| | | } |
| | | |
| | | // 获取选中患者列表 |
| | | this.selectedPatients = this.userList.filter((item) => |
| | | this.ids.includes(item.patid) |
| | | ); |
| | | |
| | | // 显示弹窗 |
| | | this.batchTaskVisible = true; |
| | | |
| | | // 获取任务列表 |
| | | this.loadTaskList(deptcode); |
| | | }, |
| | | |
| | | /** 加载任务列表 */ |
| | | loadTaskList(deptcode) { |
| | | this.batchLoading = true; |
| | | let topqueryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | serviceType: 3, |
| | | type: 2, |
| | | deptcode: deptcode, |
| | | }; |
| | | getTasklist(topqueryParams).then((response) => { |
| | | this.taskList = response.rows; |
| | | this.batchLoading = false; |
| | | }); |
| | | }, |
| | | |
| | | /** 处理任务选择变化 */ |
| | | handleTaskSelectionChange(currentRow) { |
| | | this.selectedTask = currentRow; |
| | | }, |
| | | |
| | | // 重写批量提交方法 |
| | | async submitBatchTask() { |
| | | // 校验是否选中任务 |
| | | if (!this.selectedTask) { |
| | | this.$modal.msgWarning("请选择1个任务"); |
| | | return; |
| | | } |
| | | |
| | | this.batchLoading = true; |
| | | const successPatients = []; |
| | | const failedPatients = []; |
| | | |
| | | try { |
| | | // 遍历选中的患者,逐个调用接口 |
| | | for (const patient of this.selectedPatients) { |
| | | const params = { |
| | | taskid: this.selectedTask.taskid, |
| | | taskName: this.selectedTask.taskName, |
| | | serviceType: this.selectedTask.serviceType, |
| | | sendstate:2, |
| | | ...patient, |
| | | age: "", |
| | | }; |
| | | |
| | | try { |
| | | await addSubtask(params); |
| | | successPatients.push(patient.patname); |
| | | } catch (error) { |
| | | failedPatients.push(patient.patname); |
| | | } |
| | | } |
| | | |
| | | // 显示处理结果 |
| | | let message = `成功为 ${successPatients.length} 名患者添加任务`; |
| | | if (failedPatients.length > 0) { |
| | | message += `,${failedPatients.length} 名患者添加失败`; |
| | | } |
| | | this.$modal.msgSuccess(message); |
| | | |
| | | this.batchTaskVisible = false; |
| | | this.getList(); // 刷新患者列表 |
| | | } catch (error) { |
| | | this.$modal.msgError("批量添加任务过程中出错"); |
| | | } finally { |
| | | this.batchLoading = false; |
| | | } |
| | | }, |
| | | |
| | | /** 批量添加患者任务接口 */ |
| | | batchAddPatientTask(params) {}, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | .button-textsc { |
| | | color: #28cfe6; |
| | | } |
| | | .batch-patient-section, |
| | | .batch-task-section { |
| | | padding: 15px; |
| | | border: 1px solid #ebeef5; |
| | | border-radius: 4px; |
| | | margin-bottom: 15px; |
| | | } |
| | | |
| | | .el-table--enable-row-hover .el-table__body tr:hover > td { |
| | | background-color: #f5f7fa; |
| | | } |
| | | .el-table__body tr.current-row > td { |
| | | background-color: #e6f7ff; |
| | | } |
| | | |
| | | /* 禁用状态下按钮样式 */ |
| | | .el-button.is-disabled { |
| | | cursor: not-allowed; |
| | | } |
| | | .batch-patient-section h4, |
| | | .batch-task-section h4 { |
| | | margin-top: 0; |
| | | margin-bottom: 15px; |
| | | color: #303133; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | /* 表格样式优化 */ |
| | | .el-table { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /* 弹窗底部按钮间距 */ |
| | | .dialog-footer { |
| | | text-align: right; |
| | | padding: 10px 20px 20px; |
| | | } |
| | | </style> |