From 93f544dbe267c8bbceda5419d4512a993babdbcc Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期一, 28 七月 2025 17:37:58 +0800 Subject: [PATCH] Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peisweb --- src/views/system/user/index.vue | 4 src/views/doctor/checkAll/index.vue | 52 +++++++--- src/views/doctor/inspectCheck/index.vue | 208 +++++++++++++++++------------------------ src/utils/websocket.js | 10 + 4 files changed, 134 insertions(+), 140 deletions(-) diff --git a/src/utils/websocket.js b/src/utils/websocket.js index 9d956c5..081eaf8 100644 --- a/src/utils/websocket.js +++ b/src/utils/websocket.js @@ -24,7 +24,15 @@ closeWebSocket(); } - const wsUrl = `ws://192.168.1.244:5011/ws?token=${token}`; +// 鍙栧綋鍓嶉〉闈㈢殑鍗忚锛坔ttp/https锛夛紝涓绘満锛堝煙鍚� + 绔彛锛� +const loc = window.location; +const protocol = loc.protocol === 'https:' ? 'wss:' : 'ws:'; // 瀹夊叏鍗忚鑷姩鍒囨崲 +const host = loc.host; // 鍩熷悕 + 绔彛锛屾瘮濡� localhost:8080 + +// 鎷兼帴 WebSocket 鍦板潃 +const wsUrl = `${protocol}//${host}/ws?token=${token}`; +console.log(wsUrl,"wsUrl"); + ws = new WebSocket(wsUrl); ws.onopen = () => { diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue index bd6d791..fe2bf91 100644 --- a/src/views/doctor/checkAll/index.vue +++ b/src/views/doctor/checkAll/index.vue @@ -733,7 +733,7 @@ placeholder="璇疯緭鍏ュ唴瀹�" v-model="textarea1" :autosize="{ minRows: minRows, maxRows: maxRows }" - style="font-size: 16px;" + style="font-size: 16px" ></el-input> </el-form-item> </el-form> @@ -779,6 +779,7 @@ style="width: 100%" :header-cell-style="{ background: '#67C23A' }" :row-key="getRowKeys" + :expand-row-keys="expends" > <!-- :expand-row-keys="expends" --> <el-table-column type="expand"> @@ -2009,7 +2010,6 @@ flags: false, jianqianwenzhendata: [], jianqians: false, - adviceLoading: false, sex: true, activeName: "1", hosproy: true, @@ -2066,7 +2066,7 @@ const end = new Date(); const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); - picker.$emit("pick", [start, end]); + picker.$adviceLoading("pick", [start, end]); }, }, { @@ -2151,6 +2151,8 @@ status1: 0, viewportHeight: 0, expends: [], + expandRowKeys: [], + shouldExpand: false, }; }, @@ -2581,6 +2583,15 @@ yichangjieguo() { this.loading = true; this.status1 = 0; + getConfigKey("kzycxmsfzk").then((res) => { + this.shouldExpand = res.msg; + // 鍙湁Y/y鎵嶅睍寮�锛屽叾瀹冿紙鍖呮嫭绌恒�丯銆乶ull銆乽ndefined锛夐兘涓嶅睍寮� + if (this.shouldExpand === "Y") { + this.getExpends(); + } else { + this.expends = []; + } + }); yichang({ tjNum: this.tjNumber, }) @@ -2599,6 +2610,12 @@ if (!this.yichangList) { this.$message.warning("鏆傛棤寮傚父鎶ュ憡"); } + // 杩欓噷涔熷彲浠ユ牴鎹畇houldExpand鍐嶈皟鐢ㄤ竴娆etExpends锛岀‘淇濇暟鎹凡鍔犺浇 + if (this.shouldExpand === "Y" || this.shouldExpand === "y") { + this.getExpends(); + } else { + this.expends = []; + } }) .catch((error) => { this.isLoading = false; @@ -2610,6 +2627,7 @@ this.loading = false; }); }, + fuchaxiangmu() { this.loading = true; @@ -2937,7 +2955,7 @@ propoChange() { this.cusobj = { sex: this.tableAll.cusSex, isZj: 0 }; - this.$refs.proposal.clearSearchFields() + this.$refs.proposal.clearSearchFields(); getConfigKey("mrzscyjy").then((res) => { this.mrjy = res.msg; // 浼氳Е鍙� watch 鈫� 璁剧疆 tjproposal = "1" // 绛夋暟鎹姸鎬佸噯澶囧ソ鍚庡啀鎵撳紑寮圭獥 @@ -3134,18 +3152,18 @@ this.qingkong(); this.$refs.Pre.open = false; this.tableAll = row; - let dict = "dict_tjtype" - getDicts(dict).then(res => { - if (res.code == 200) { - res.data.forEach((item) => { - if (this.tableAll.tjCategory == item.dictValue) { - this.tableAll.tjCategory = item.dictLabel; - } - }); - } else { - throw new Error('鑾峰彇浣撴绫诲瀷瀛楀吀澶辫触'); - } - }) + let dict = "dict_tjtype"; + getDicts(dict).then((res) => { + if (res.code == 200) { + res.data.forEach((item) => { + if (this.tableAll.tjCategory == item.dictValue) { + this.tableAll.tjCategory = item.dictLabel; + } + }); + } else { + throw new Error("鑾峰彇浣撴绫诲瀷瀛楀吀澶辫触"); + } + }); this.tjproject = "0"; this.tjNumber = this.tableAll.tjNumber; @@ -3349,7 +3367,7 @@ id: this.MsgId, }; - /* gettoPdf(tjNumber) + /* gettoPdf(tjNumber) .then((res) => { this.$modal.msgSuccess("宸茬敓鎴愭姤鍛婏紒璇峰墠寰�鎶ュ憡鏍告敹椤甸潰纭锛�"); }) diff --git a/src/views/doctor/inspectCheck/index.vue b/src/views/doctor/inspectCheck/index.vue index baac4c6..943887e 100644 --- a/src/views/doctor/inspectCheck/index.vue +++ b/src/views/doctor/inspectCheck/index.vue @@ -1,48 +1,18 @@ <template> <div class="app-container"> - <el-form - :model="queryParams" - ref="queryForm" - size="small" - :inline="true" - label-width="68px" - @submit.native.prevent - > + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px" @submit.native.prevent> <el-form-item label="浣撴鍙�" prop="reportDoctorCode"> - <el-input - ref="inputName" - v-model="queryParams.tjNum" - placeholder="璇疯緭鍏ヤ綋妫�鍙�" - clearable - @keyup.enter.native="handleQuery" - style="width: 170px" - /> + <el-input ref="inputName" v-model="queryParams.tjNum" placeholder="璇疯緭鍏ヤ綋妫�鍙�" clearable + @keyup.enter.native="handleQuery" style="width: 170px" /> </el-form-item> <el-form-item> - <el-button - type="primary" - icon="el-icon-search" - size="mini" - @click="handleQuery" - style="margin-right: 15px" - > + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" style="margin-right: 15px"> 鏌ヨ </el-button> - <el-button - icon="el-icon-refresh" - type="primary" - size="mini" - @click="resetQuery" - > + <el-button icon="el-icon-refresh" type="primary" size="mini" @click="resetQuery"> 閲嶇疆 </el-button> - <el-button - icon="el-icon-check" - type="primary" - size="mini" - style="margin-right: 15px" - @click="tongbu" - > + <el-button icon="el-icon-check" type="primary" size="mini" style="margin-right: 15px" @click="tongbu"> 鍚屾 </el-button> </el-form-item> @@ -51,27 +21,14 @@ <div class="box"> <div class="table-header">妫�楠岃褰�</div> <div> - <el-table - :data="exaLists" - border - style="width: 100%" - @selection-change="handleSelectionChange" - :header-cell-style="{ background: '#aad8df', fontSize: '14px', color: '#333' }" - height="350" - ref="firstTable" - > + <el-table :data="exaLists" border style="width: 100%" @selection-change="handleSelectionChange" + :header-cell-style="{ background: '#aad8df', fontSize: '14px', color: '#333' }" height="350" ref="firstTable"> <el-table-column fixed type="selection" align="center" label="閫夋嫨" width="50" /> <el-table-column label="濮撳悕" align="center" prop="name" width="80" /> <el-table-column label="鎬у埆" align="center" prop="gender" width="80" /> <el-table-column label="骞撮緞" align="center" prop="patientAge" width="80" /> <el-table-column label="閫佹绉戝" align="center" prop="deptName" width="100" /> - <el-table-column - label="妫�楠岄」鐩�" - align="center" - prop="checkParts" - width="350" - :show-overflow-tooltip="true" - /> + <el-table-column label="妫�楠岄」鐩�" align="center" prop="checkParts" width="350" :show-overflow-tooltip="true" /> <el-table-column label="椤圭洰缂栧彿" align="center" prop="jcxmid" width="150" /> <el-table-column label="瀹℃牳鍖诲笀" align="center" prop="shys" width="150" /> <el-table-column label="鎶ュ憡鏃堕棿" align="center" prop="examinationDate" width="150" /> @@ -102,8 +59,8 @@ infoList.tjCustomerSex == 0 ? "鐢�" : infoList.tjCustomerSex == 1 - ? "濂�" - : "鏆傛棤" + ? "濂�" + : "鏆傛棤" }} </span> <span class="highlight">骞撮緞锛歿{ infoList.tjCustomerAge || "鏆傛棤" }}</span> @@ -111,24 +68,11 @@ </h3> </div> - <el-table - border - height="350" - ref="tab1" - :data="checkList" - v-loading="loading" - style="width: 100%" + <el-table border height="350" ref="tab1" :data="checkList" v-loading="loading" style="width: 100%" @selection-change="handleSelectionChangeSecond" - :header-cell-style="{ background: '#aad8df', fontSize: '14px', color: '#333' }" - > + :header-cell-style="{ background: '#aad8df', fontSize: '14px', color: '#333' }"> <el-table-column type="selection" width="60" /> - <el-table-column - label="鐘舵��" - align="center" - prop="type" - :show-overflow-tooltip="true" - min-width="60" - > + <el-table-column label="鐘舵��" align="center" prop="type" :show-overflow-tooltip="true" min-width="60"> <template slot-scope="scope"> <span v-if="scope.row.type == '0'">鏈</span> <span v-if="scope.row.type == '1'">宸叉</span> @@ -202,54 +146,54 @@ this.checkList = []; this.infoList = {}; }, -handleSelectionChange(selected) { - if (this.isProcessingSelection) return; - this.isProcessingSelection = true; + handleSelectionChange(selected) { + if (this.isProcessingSelection) return; + this.isProcessingSelection = true; - // 鎵惧埌鐢ㄦ埛鍒氭搷浣滅殑閭d竴鏉★紙瀵规瘮涔嬪墠鍜岀幇鍦ㄧ殑宸紓锛� - const old = this.selectedFirstTable; - let changedRow = null; + // 鎵惧埌鐢ㄦ埛鍒氭搷浣滅殑閭d竴鏉★紙瀵规瘮涔嬪墠鍜岀幇鍦ㄧ殑宸紓锛� + const old = this.selectedFirstTable; + let changedRow = null; - if (selected.length > old.length) { - // 鏂板锛氭壘鍑烘柊澧炵殑 - changedRow = selected.find(row => !old.includes(row)); - } else { - // 鍒犻櫎锛氭壘鍑哄垹闄ょ殑 - changedRow = old.find(row => !selected.includes(row)); - } + if (selected.length > old.length) { + // 鏂板锛氭壘鍑烘柊澧炵殑 + changedRow = selected.find(row => !old.includes(row)); + } else { + // 鍒犻櫎锛氭壘鍑哄垹闄ょ殑 + changedRow = old.find(row => !selected.includes(row)); + } - if (changedRow) { - const group = this.exaLists.filter(r => r.brid === changedRow.brid); - const isAdding = selected.length > old.length; + if (changedRow) { + const group = this.exaLists.filter(r => r.brid === changedRow.brid); + const isAdding = selected.length > old.length; - this.$refs.firstTable.clearSelection(); - if (isAdding) { - // 娣诲姞锛屾暣涓粍閫変笂 + 鍘熸湁閫夌殑 brid 涔熼�変笂 - const allBrids = new Set(); - selected.forEach(row => allBrids.add(row.brid)); - allBrids.add(changedRow.brid); - const newSelection = this.exaLists.filter(row => allBrids.has(row.brid)); - newSelection.forEach(row => { - this.$refs.firstTable.toggleRowSelection(row, true); - }); - this.selectedFirstTable = newSelection; - } else { - // 鍒犻櫎锛屾暣涓粍鍙栨秷锛屽啀鎶婂墿涓� brid 鍒嗙粍琛ュ洖鍘� - const remaining = old.filter(row => row.brid !== changedRow.brid); - const remainBrids = [...new Set(remaining.map(r => r.brid))]; - const newSelection = this.exaLists.filter(row => remainBrids.includes(row.brid)); - newSelection.forEach(row => { - this.$refs.firstTable.toggleRowSelection(row, true); - }); - this.selectedFirstTable = newSelection; - } - } else { - this.selectedFirstTable = selected; - } + this.$refs.firstTable.clearSelection(); + if (isAdding) { + // 娣诲姞锛屾暣涓粍閫変笂 + 鍘熸湁閫夌殑 brid 涔熼�変笂 + const allBrids = new Set(); + selected.forEach(row => allBrids.add(row.brid)); + allBrids.add(changedRow.brid); + const newSelection = this.exaLists.filter(row => allBrids.has(row.brid)); + newSelection.forEach(row => { + this.$refs.firstTable.toggleRowSelection(row, true); + }); + this.selectedFirstTable = newSelection; + } else { + // 鍒犻櫎锛屾暣涓粍鍙栨秷锛屽啀鎶婂墿涓� brid 鍒嗙粍琛ュ洖鍘� + const remaining = old.filter(row => row.brid !== changedRow.brid); + const remainBrids = [...new Set(remaining.map(r => r.brid))]; + const newSelection = this.exaLists.filter(row => remainBrids.includes(row.brid)); + newSelection.forEach(row => { + this.$refs.firstTable.toggleRowSelection(row, true); + }); + this.selectedFirstTable = newSelection; + } + } else { + this.selectedFirstTable = selected; + } - this.fetchRightTableData(); - this.isProcessingSelection = false; -}, + this.fetchRightTableData(); + this.isProcessingSelection = false; + }, handleSelectionChangeSecond(selected) { @@ -269,18 +213,33 @@ }, tongbu() { + this.$modal.loading("姝e湪鍚屾锛岃绋嶅��..."); const requestData = { - lis: this.selectedFirstTable, + lis: this.selectedFirstTable ? this.selectedFirstTable.map((item) => ({ + ...item, + tjNum: this.queryParams.tjNum, + })) : [], + jcxmid: this.selectedFirstTable && this.selectedFirstTable.length > 0 ? this.selectedFirstTable[0].jcxmid : null, + shys: this.selectedFirstTable && this.selectedFirstTable.length > 0 ? this.selectedFirstTable[0].shys : null, tj: this.selectedSecondTable[0], }; - asyncPacs(requestData).then(res => { - if (res.code === 200) { - this.$message.success("鍚屾鎴愬姛锛�"); - this.fetchRightTableData(); - } else { - this.$message.error(res.message || "鍚屾澶辫触"); - } - }); + asyncPacs(requestData) + .then((res) => { + if (res.code === 200) { + this.fetchRightTableData(); + clearInterval(this.clearTimeSet); + this.clearTimeSet = null; + this.$modal.closeLoading(); + this.$modal.msgSuccess("鍚屾鎴愬姛锛�"); + } else { + this.$message.error(res.message || "鍚屾澶辫触锛岃绋嶅悗閲嶈瘯"); + } + }) + .catch((error) => { + clearInterval(this.clearTimeSet); + this.clearTimeSet = null; + this.$modal.closeLoading(); + }); }, }, }; @@ -291,6 +250,7 @@ padding: 20px; background: #f5f7fa; } + .table-header { text-align: center; background-color: #aad8df; @@ -301,11 +261,13 @@ margin-top: 10px; border-radius: 4px 4px 0 0; } + .table-title { text-align: left; margin: 20px 0; padding: 10px 0; } + .table-title h3 { font-size: 16px; color: #333; @@ -316,10 +278,12 @@ flex-wrap: wrap; gap: 20px; } + .table-title .highlight { font-weight: bold; color: #2c3e50; } + .el-table { border-radius: 4px; font-size: 14px; diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index c9d524b..5251692 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -1878,6 +1878,10 @@ this.getlistHosp(); this.reset(); this.form = row; + this.form = { + ...row, + deptId: row.deptId != null ? String(row.deptId) : null, // 馃憟 纭繚涓哄瓧绗︿覆 + }; if (this.form.hospId) { this.sendhospName(); } -- Gitblit v1.8.0