From 38c2fe23d77c9f27d52941dab77a100bb1839dd7 Mon Sep 17 00:00:00 2001 From: WXL (wul) <wl_5969728@163.com> Date: 星期二, 02 九月 2025 16:31:10 +0800 Subject: [PATCH] 测试完成 --- src/views/patient/patient/outpatient.vue | 428 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 393 insertions(+), 35 deletions(-) diff --git a/src/views/patient/patient/outpatient.vue b/src/views/patient/patient/outpatient.vue index 47e7136..7ee6864 100644 --- a/src/views/patient/patient/outpatient.vue +++ b/src/views/patient/patient/outpatient.vue @@ -20,10 +20,37 @@ @keyup.enter.native="handleQuery" /> </el-form-item> - <el-form-item label="闂ㄨ瘖鍙�" prop="outhospno"> + <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" - placeholder="璇疯緭鍏ラ棬璇婂彿" + placeholder="璇疯緭鍏ョ梾妗堝彿" clearable style="width: 250px" @keyup.enter.native="handleQuery" @@ -39,6 +66,26 @@ @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 @@ -50,26 +97,7 @@ > </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" @@ -122,6 +150,18 @@ @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"> @@ -177,14 +217,14 @@ <span>{{ formatTime(scope.row.admitdate) }}</span> </template> </el-table-column> - <el-table-column + <!-- <el-table-column label="鐥呮鍙�" align="center" key="patno" prop="patno" - /> + /> --> <el-table-column - label="闂ㄨ瘖鍙�" + label="鐥呮鍙�" align="center" key="outhospno" prop="outhospno" @@ -201,10 +241,11 @@ size="medium" type="text" @click=" - $router.push({ - path: '/patient/indexls/', - query: { sfzh: scope.row.idcardno }, - }) + gettoken360( + scope.row.idcardno, + scope.row.drcode, + scope.row.drname + ) " ><span class="button-textsc">{{ scope.row.patname @@ -314,7 +355,113 @@ /> </el-col> </el-row> + <el-dialog + title="鎵归噺娣诲姞浠诲姟" + :visible.sync="batchTaskVisible" + width="90%" + append-to-body + > + <el-row :gutter="20"> + <!-- 宸︿晶锛氶�変腑鎮h�呭垪琛� --> + <el-col :span="12"> + <div class="batch-patient-section"> + <h4>閫変腑鎮h�咃紙{{ 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>鎮h�呯瀹ゆ棤鍖归厤鏈嶅姟</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" @@ -360,6 +507,7 @@ </div> </el-upload> </div> + <!-- 瀵煎叆妫�鏌� --> <div class="uploading" v-else-if="dractive == 2"> <el-table :data="uploadingData" style="width: 100%"> @@ -423,6 +571,8 @@ import { getToken } from "@/utils/auth"; import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; +import { query360PatInfo, getTasklist, addSubtask } from "@/api/AiCentre/index"; + import store from "@/store"; export default { @@ -484,6 +634,12 @@ Labelchange: false, //淇敼鏂板寮圭獥 propss: { multiple: true }, optionstag: [], //鏍囩鍒楄〃 + batchTaskVisible: false, // 寮圭獥鍙鎬� + selectedPatients: [], // 閫変腑鐨勬偅鑰呭垪琛� + taskList: [], // 浠诲姟鍒楄〃 + selectedTask: null, // 閫変腑鐨勪换鍔″垪琛� + batchLoading: false, // 鎵归噺鎻愪氦鍔犺浇鐘舵�� + deptcode: "", Patientrange: [ { name: "鍏ㄩ儴", @@ -494,6 +650,39 @@ id: 1, }, ], + postData: { + XiaoXiTou: { + FaSongFCSJC: "ZJHES", + FaSongJGID: localStorage.getItem("orgid"), + FaSongJGMC: localStorage.getItem("orgname"), + FaSongSJ: "2025-01-09聽17:29:36", + FaSongXTJC: "SUIFANGXT", + FaSongXTMC: "闅忚绯荤粺", + XiaoXiID: "5FA92AFB-9833-4608-87C7-F56A654AC171", + XiaoXiLX: "SC_LC_360STCX", + XiaoXiMC: "360聽瑙嗗浘鏌ヨ", + ZuHuID: localStorage.getItem("ZuHuID"), + ZuHuMC: localStorage.getItem("orgname"), + }, + YeWuXX: { + BingRenXX: { + ZhengJianHM: "", + ZhengJianLXDM: "01", + ZhengJianLXMC: "灞呮皯韬唤璇�", + ZuZhiJGID: localStorage.getItem("orgid"), + ZuZhiJGMC: localStorage.getItem("orgname"), + }, + YongHuXX: { + XiTongID: "SUIFANGXT", + XiTongMC: "闅忚绯荤粺", + YongHuID: "1400466972205912064", + YongHuXM: "JNRMYY", + ZuZhiJGID: localStorage.getItem("orgid"), + ZuZhiJGMC: localStorage.getItem("orgname"), + idp: "lyra", + }, + }, + }, defaultProps: { children: "children", label: "label", @@ -533,7 +722,7 @@ queryParams: { pageNum: 1, pageSize: 10, - searchscope: 2, + searchscope: 3, scopetype: [], leaveldeptcodes: [], leavehospitaldistrictcodes: [], @@ -619,8 +808,13 @@ this.queryParams.leavehospitaldistrictcodes = store.getters.belongWards.map((obj) => obj.districtCode); } - this.queryParams.beginTime = this.dateRange[0]; - this.queryParams.endTime = this.dateRange[1]; + if (this.dateRange) { + this.queryParams.beginTime = this.dateRange[0]; + this.queryParams.endTime = this.dateRange[1]; + } else { + this.queryParams.beginTime = ""; + this.queryParams.endTime = ""; + } listPatouthosp(this.queryParams).then((response) => { this.userList = response.rows; this.total = response.total; @@ -669,7 +863,23 @@ this.loading = false; }); }, + //鎮h��360璺宠浆 + 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"; + } + query360PatInfo(this.postData).then((res) => { + if (res.data.url) { + window.open(res.data.url, "_blank"); + // this.linkUrl = res.data.url; + } else { + this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�"); + } + }); + }, // 绛涢�夎妭鐐� filterNode(value, data) { if (!value) return true; @@ -709,11 +919,15 @@ resetQuery() { this.dateRange = []; this.resetForm("queryForm"); - (this.queryParams = { + this.queryParams = { pageNum: 1, pageSize: 10, - }), - this.handleQuery(); + searchscope: 3, + scopetype: [], + leaveldeptcodes: [], + leavehospitaldistrictcodes: [], + }; + this.handleQuery(); }, // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { @@ -830,6 +1044,113 @@ this.upload.open = false; this.dractive = 1; }, + /** 鎵归噺娣诲姞浠诲姟鎸夐挳鐐瑰嚮 */ + handleBatchAddTask() { + // 鏍¢獙鏄惁閫変腑鎮h�� + if (this.ids.length === 0) { + this.$modal.msgWarning("璇疯嚦灏戦�変腑1鍚嶆偅鑰�"); + return; + } + + // 鑾峰彇閫変腑鎮h�呯殑绉戝淇℃伅锛堢敤浜庢牎楠屽悓涓�绉戝锛� + 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; + } + + // 鑾峰彇閫変腑鎮h�呭垪琛� + 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, + ...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(); // 鍒锋柊鎮h�呭垪琛� + } catch (error) { + this.$modal.msgError("鎵归噺娣诲姞浠诲姟杩囩▼涓嚭閿�"); + } finally { + this.batchLoading = false; + } + }, + + /** 鎵归噺娣诲姞鎮h�呬换鍔℃帴鍙� */ + batchAddPatientTask(params) {}, }, }; </script> @@ -880,4 +1201,41 @@ .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> -- Gitblit v1.9.3