From 9290a0a7023a612cddc5971553a6efb727a51165 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期二, 19 八月 2025 17:34:58 +0800
Subject: [PATCH] qx
---
src/views/doctor/pacsCheck/index.vue | 552 ++++++++++++++++++++++--------------------------------
1 files changed, 225 insertions(+), 327 deletions(-)
diff --git a/src/views/doctor/pacsCheck/index.vue b/src/views/doctor/pacsCheck/index.vue
index daf5306..bd4bf76 100644
--- a/src/views/doctor/pacsCheck/index.vue
+++ b/src/views/doctor/pacsCheck/index.vue
@@ -1,192 +1,60 @@
<template>
<div class="app-container">
- <el-form
- :model="queryParams"
- ref="queryForm"
- size="small"
- :inline="true"
- label-width="68px"
- >
+ <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" @input="onInput" style="width: 170px" />
</el-form-item>
- <!-- <el-form-item label="濮撳悕" prop="name">
- <el-input
- v-model="queryParams.name"
- placeholder="璇疯緭鍏ュ鍚�"
- clearable
- @keyup.enter.native="handleQuery"
- style="width: 110px"
- />
- </el-form-item>
- <el-form-item label="鐧昏鏃堕棿" prop="createTimeList">
- <el-date-picker
- v-model="createTimeList"
- type="datetimerange"
- align="right"
- :picker-options="pickerOptions"
- style="width: 310px"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡"
- format="yyyy.MM.dd"
- value-format="yyyy.MM.dd "
- @change="handleDateChange"
- >
- </el-date-picker>
- </el-form-item> -->
<el-form-item>
- <el-button
- type="primary"
- icon="el-icon-search"
- size="mini"
- @click="handleQuery"
- style="margin-right: 15px"
- >鏌ヨ</el-button
- >
- <!-- <el-button size="mini" @click="tongbu(scope.row)"
- >鍚屾</el-button
- > -->
- <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"
- :disabled="!selectedFirstTable"
- >鍚屾</el-button
- >
+ <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>
+ <el-button icon="el-icon-check" type="primary" size="mini" style="margin-right: 15px" @click="tongbu"
+ :disabled="!selectedFirstTable">
+ 鍚屾
+ </el-button>
</el-form-item>
</el-form>
- <!-- <el-radio-group
- v-model="checkStatus"
- @input="radioChange"
- style="margin: 10px 15px"
- >
- </el-radio-group> -->
- <div class="table-title">
- <h3>妫�鏌ヨ褰�</h3>
+ <div class="table-title table-header">
+ <div style="text-align: center;">妫�鏌ヨ褰�</div>
</div>
- <!-- v-loading="loading" :row-class-name="tableRowClassName" @current-change="handleCurrentChange" -->
- <el-table
- id="ta"
- ref="tb"
- :data="exaLists"
- v-loading="loading"
- border
- max-height="350"
- @current-change="handleCurrentChange"
- @selection-change="handleSelectionChange"
+ <el-table ref="tb" :data="exaLists" v-loading="loading" border style="width: 100%" height="350"
+ @current-change="handleCurrentChange" @selection-change="handleSelectionChange"
:row-class-name="tableRowClassName"
- >
- <el-table-column
- fixed
- type="selection"
- align="center"
- label="閫夋嫨"
- width="40"
- :selectable="isSelectable"
- >
- </el-table-column>
-
- <el-table-column label="濮撳悕" align="center" prop="name" width="80px" />
- <el-table-column label="鎬у埆" align="center" prop="gender" width="80px" />
- <el-table-column
- label="骞撮緞"
- align="center"
- prop="patientAge"
- width="80px"
- >
- </el-table-column>
- <el-table-column
- label="閫佹绉戝"
- align="center"
- prop="deptName"
- width="100px"
- />
-
- <el-table-column
- label="妫�鏌ラ」鐩�"
- align="center"
- prop="checkParts"
- width="150px"
- />
- <el-table-column
- label="鎶ュ憡鏃堕棿"
- align="center"
- prop="examinationDate"
- width="150px"
- />
-
- <el-table-column label="闂ㄨ瘖鍙�" align="center" prop="mzh" width="140px" />
- <el-table-column
- label="鐢宠鍗曞彿"
- align="center"
- prop="brid"
- width="145px"
- />
- <el-table-column
- label="缁撴灉鐘舵��"
- align="center"
- prop="diagnosis"
- width="150"
- :show-overflow-tooltip="true"
- />
- <!-- :show-overflow-tooltip="true" -->
- <el-table-column
- label="鎶ュ憡鍖诲笀"
- align="center"
- prop="reportDoctorName"
- width="120px"
- />
- <el-table-column
- label="妫�鏌ュ尰甯堝悕"
- align="center"
- prop="checkDoctorName"
- width="120px"
- />
-
- <el-table-column
- label="缁撴灉琛ㄧ幇"
- align="center"
- prop="examination"
- :show-overflow-tooltip="true"
- />
+ :header-cell-style="{ background: '#aad8df', fontSize: '14px', color: '#333' }">
+ <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="150" />
+ <el-table-column label="鎶ュ憡鏃堕棿" align="center" prop="examinationDate" width="153" :formatter="formatDate" />
+ <el-table-column label="闂ㄨ瘖鍙�" align="center" prop="mzh" width="140" />
+ <el-table-column label="鐢宠鍗曞彿" align="center" prop="brid" width="145" />
+ <el-table-column label="缁撴灉鐘舵��" align="center" prop="diagnosis" width="150" :show-overflow-tooltip="true" />
+ <el-table-column label="鎶ュ憡鍖诲笀" align="center" prop="reportDoctorName" width="120" />
+ <el-table-column label="妫�鏌ュ尰甯堝悕" align="center" prop="checkDoctorName" width="120" />
+ <el-table-column label="缁撴灉琛ㄧ幇" align="center" prop="examination" :show-overflow-tooltip="true" />
</el-table>
<div class="table-title">
- <h3>浣撴璁板綍</h3>
+ <h3>
+ 浣撴璁板綍锛�
+ <span class="highlight">濮撳悕锛歿{ infoList.tjCustomerName || "鏆傛棤" }}</span>
+ <span class="highlight">鎬у埆锛歿{ infoList.tjCustomerSex == 0 ? "鐢�" : infoList.tjCustomerSex == 1 ? "濂�" : "鏆傛棤"
+ }}</span>
+ <span class="highlight">骞撮緞锛歿{ infoList.tjCustomerAge || "鏆傛棤" }}</span>
+ </h3>
</div>
- <el-table
- border
- max-height="280"
- ref="tab1"
- :data="checkList"
- v-loading="loading"
+ <el-table border max-height="280" ref="tab1" :data="checkList" v-loading="loading" style="width: 100%"
@selection-change="handleSelectionChangeSecond"
- >
- <el-table-column type="selection" width="55"> </el-table-column>
- <el-table-column
- label="鐘舵��"
- align="center"
- prop="type"
- :show-overflow-tooltip="true"
- min-width="60"
- >
+ :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">
<template slot-scope="scope">
<span v-if="scope.row.type == '0'">鏈</span>
<span v-if="scope.row.type == '1'">宸叉</span>
@@ -194,92 +62,42 @@
<span v-if="scope.row.type == '3'">寤舵湡</span>
</template>
</el-table-column>
- <el-table-column
- label="绉戝"
- align="center"
- prop="deptName"
- min-width="115"
- />
- <el-table-column
- label="椤圭洰"
- align="center"
- prop="proName"
- min-width="160"
- />
- <el-table-column
- label="鏀惰垂鏂瑰紡"
- align="center"
- prop="sffs"
- min-width="80"
- />
- <el-table-column
- label="鏄惁鏀惰垂"
- align="center"
- prop="isPay"
- min-width="80"
- />
- <el-table-column
- label="妫�鏌ユ椂闂�"
- align="center"
- prop="bcupdateTime"
- min-width="160"
- />
-
- <el-table-column
- label="鏈�鍚庝慨鏀规椂闂�"
- align="center"
- prop="zhupdateTime"
- min-width="160"
- />
+ <el-table-column label="绉戝" align="center" prop="deptName" min-width="115" />
+ <el-table-column label="椤圭洰" align="center" prop="proName" min-width="160" />
+ <el-table-column label="鏀惰垂鏂瑰紡" align="center" prop="sffs" min-width="80" />
+ <el-table-column label="鏄惁鏀惰垂" align="center" prop="isPay" min-width="80" />
+ <el-table-column label="妫�鏌ユ椂闂�" align="center" prop="bcupdateTime" min-width="160" />
+ <el-table-column label="鏈�鍚庝慨鏀规椂闂�" align="center" prop="zhupdateTime" min-width="160" />
</el-table>
-
- <div class="pag">
- <div class="pag1">
- <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :pager-count="5" :current-page.sync="currentPage1" :current-page="page"
- :page-sizes="pageSize" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="total">
- </el-pagination> -->
- <!-- <pagination
- v-show="total > 0"
- :total="total"
- :pager-count="5"
- :page.sync="queryParams.page"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- /> -->
- </div>
- </div>
</div>
</template>
-
- <script>
+<script>
import { getLeftList, getRightList, asyncPacs } from "@/api/doctor/pacsCheck";
+import { getOrderList } from "@/api/hosp/order";
import moment from "moment";
export default {
dicts: ["dict_tj_status"],
data() {
return {
+ infoList: {},
dis: false,
code: null,
createTimeList: "",
total: 0,
loading: false,
isSyncing: false,
- // 鏌ヨ鍙傛暟
+ isFetchingRightTableData: false,
queryParams: {
- // page: 1,
- // pageSize: 20,
name: null,
start: null,
end: null,
tjNum: null,
},
- // 缁戝畾鍗曢�夋寜閽�
checkStatus: "0",
exaLists: [],
- selectedFirstTable: null, // 绗竴涓〃鏍奸�変腑琛�
- selectedSecondTable: [], // 绗簩涓〃鏍奸�変腑琛�
- // 琛ㄥ崟鍙傛暟
+ selectedFirstTable: null,
+ selectedSecondTable: [],
form: {},
clearTimeSet: null,
tjNumbers: "",
@@ -328,55 +146,59 @@
this.$refs.inputName.focus();
});
},
+
methods: {
-
- handleDateChange(val){
+ onInput(val) {
+ this.queryParams.tjNum = val.replace(/\s+/g, "");
+ },
+
+ handleDateChange(val) {
if (val && val.length === 2) {
- this.queryParams.start = val[0]; // 璁剧疆寮�濮嬫椂闂�
- this.queryParams.end = val[1]; // 璁剧疆缁撴潫鏃堕棿
+ this.queryParams.start = val[0];
+ this.queryParams.end = val[1];
} else {
this.queryParams.start = null;
this.queryParams.end = null;
}
- console.log('Query Params:', this.queryParams);
+ },
- },
- isSelectable(row) {
- return !!row.mzh;
- },
tableRowClassName({ row }) {
- return !row.mzh ? "row-disabled" : "";
+ return !row.brid ? "row-disabled" : "";
+ },
+
+ formatDate(row) {
+ if (!row.examinationDate) return "";
+ const date = moment(row.examinationDate, "YYYY-MM-DD HH:mm:ss");
+ return date.isValid() ? date.format("YYYY-MM-DD HH:mm") : "鏃犳晥鏃ユ湡";
},
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);
- /* if (!selectedRow.mzh) {
- this.$refs.tb.toggleRowSelection(selectedRow, false);
- this.$message.warning("褰撳墠琛屾棤鏈夋晥闂ㄨ瘖鍙凤紝涓嶈兘閫変腑");
- return;
- } */
- this.selectedFirstTable = selectedRow;
- console.log("褰撳墠閫変腑鐨勮鏁版嵁:", this.selectedFirstTable);
- this.fetchRightTableData(selectedRow);
+
+ this.selectedFirstTable = val;
+
+ const code = this.queryParams.tjNum;
+ if (!code) {
+ this.$message.warning("浣撴鍙蜂笉鑳戒负绌�!");
+ return;
+ }
+ this.loading = true;
+ getRightList(code).then((response) => {
+ this.checkList = response.data;
+ this.loading = false;
+ });
} else {
this.selectedFirstTable = null;
this.checkList = [];
}
},
- // 鏍规嵁閫変腑鐨勮鏁版嵁璇锋眰鍙宠竟琛ㄦ牸鏁版嵁
+
fetchRightTableData(selectedRow) {
- const code = selectedRow.mzh;
- if (!code) return;
+ const code = this.queryParams.tjNum;
+
this.loading = true;
getRightList(code).then((response) => {
this.checkList = response.data;
@@ -384,41 +206,92 @@
});
},
+ fetchRightTableData() {
+ const code = this.queryParams.tjNum;
+ if (!code) {
+ console.warn('鏈彁渚涗綋妫�鍙凤紝璺宠繃 fetchRightTableData');
+ this.checkList = [];
+ this.loading = false;
+ return Promise.resolve();
+ }
+ this.loading = true;
+ return getRightList(code)
+ .then((response) => {
+ this.checkList = response.data || [];
+ this.loading = false;
+ })
+ .catch((error) => {
+ console.error('鑾峰彇 checkList 澶辫触:', error);
+ this.checkList = [];
+ this.loading = false;
+ throw error;
+ });
+ },
+
handleSelectionChangeSecond(selectedRows) {
this.selectedSecondTable = selectedRows;
- console.log("褰撳墠閫変腑鐨勮鏁版嵁:", this.selectedSecondTable);
+ if (selectedRows.length > 1) {
+ let del_row = selectedRows.shift();
+ this.$refs.tab1.toggleRowSelection(del_row, false);
+ }
+
},
- getList() {
+
+ async handleQuery() {
+ if (!this.queryParams.tjNum) {
+ this.$message.error("浣撴鍙蜂笉鑳戒负绌�");
+ return;
+ }
+
+ this.loading = true;
+ try {
+ const [orderResponse, leftResponse] = await Promise.all([
+ getOrderList(this.queryParams).catch((error) => {
+ console.error('鑾峰彇 orderList 澶辫触:', error);
+ return { data: { list: [] } };
+ }),
+ getLeftList(this.queryParams),
+ ]);
+
+ if (orderResponse.data?.list?.length > 0) {
+ this.infoList = orderResponse.data.list[0];
+ } else {
+ this.infoList = {};
+ console.warn('getOrderList 杩斿洖绌哄垪琛�');
+ }
+
+ if (leftResponse.code === 200) {
+ this.exaLists = leftResponse.data.map((item, index) => ({
+ ...item,
+ brid: item.brid?.trim(),
+ mzh: item.mzh?.trim(),
+ tempId: index,
+ }));
+
+ await this.fetchRightTableData();
+ } else {
+ this.exaLists = [];
+ this.$message.error(leftResponse.msg || "鏌ヨ妫�鏌ヨ褰曞け璐�");
+ }
+ } catch (error) {
+ console.error('鏌ヨ澶辫触:', error);
+ this.$message.error(error?.msg || "鏌ヨ澶辫触锛岃绋嶅悗閲嶈瘯");
+ this.exaLists = [];
+ this.checkList = [];
+ this.infoList = {};
+ } finally {
+ this.loading = false;
+ }
+
if (this.createTimeList) {
this.queryParams.start = this.createTimeList[0];
this.queryParams.end = this.createTimeList[1];
- } else if (this.createTimeList == null) {
+ } else {
this.queryParams.start = null;
this.queryParams.end = null;
}
},
- /** 鎼滅储鎸夐挳鎿嶄綔 */
- handleQuery() {
- // this.queryParams.page = 1;
- this.loading = true;
- getLeftList(this.queryParams)
- .then((res) => {
- console.log(res, 1111);
- if (res.code == 200) {
- this.loading = false;
- this.exaLists = res.data;
- this.code = this.exaLists.mzh;
- }
- })
- .catch((error) => {
- this.loading = false;
- this.$message.error(res.msg || "鏌ヨ澶辫触锛岃绋嶅悗閲嶈瘯");
- });
- this.getList();
- },
-
- /** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
this.createTimeList = [];
this.resetForm("queryForm");
@@ -428,19 +301,16 @@
end: null,
tjNum: null,
};
-
- // 娓呯┖鍏朵粬渚濊禆鏁版嵁
this.checkList = [];
this.exaLists = [];
+ this.infoList = {};
},
handleCurrentChange(row) {
this.currentRow = row;
- // console.log('褰撳墠閫変腑鐨勮:', row);
},
setTime() {
- //璁剧疆瀹氭椂鍣�
this.clearTimeSet = setInterval(() => {
this.$modal.closeLoading();
}, 300000);
@@ -448,21 +318,19 @@
tongbu(row) {
this.$modal.loading("姝e湪鍚屾锛岃绋嶅��...");
this.setTime();
- // console.log(val, 66);
+ this.selectedFirstTable.tjnum = this.queryParams.tjNum;
+
const requestData = {
- pacs: this.selectedFirstTable, // 宸︿晶琛ㄦ牸閫変腑鏁版嵁
+ pacs: this.selectedFirstTable.map((item) => ({
+ ...item,
+ tjNum: this.queryParams.tjNum,
+ })),// 宸︿晶琛ㄦ牸閫変腑鏁版嵁
tj: this.selectedSecondTable[0], // 鍙充晶琛ㄦ牸閫変腑鏁版嵁
};
-
- if (!this.selectedSecondTable || this.selectedSecondTable.length === 0) {
- this.$message.error("鑷冲皯閫変竴鏉℃暟鎹紒");
- return;
- }
-
asyncPacs(requestData)
.then((res) => {
- if (res.code == 200) {
- this.fetchRightTableData(this.selectedFirstTable);
+ if (res.code === 200) {
+ this.fetchRightTableData();
clearInterval(this.clearTimeSet);
this.clearTimeSet = null;
this.$modal.closeLoading();
@@ -475,42 +343,72 @@
clearInterval(this.clearTimeSet);
this.clearTimeSet = null;
this.$modal.closeLoading();
- // this.$modal.error("鎿嶄綔澶辫触锛岃绋嶅悗閲嶈瘯");
- })
+ this.$message.error("鍚屾澶辫触锛岃绋嶅悗閲嶈瘯");
+ });
},
},
};
</script>
-
- <style lang="scss" scoped>
-#ta .el-table__header-wrapper .el-checkbox {
- display: none;
+<style lang="scss" scoped>
+.app-container {
+ padding: 20px;
+ background: #f5f7fa;
+}
+
+.table-header {
+ text-align: center;
+ background-color: #aad8df;
+ padding: 10px;
+ font-size: 16px;
+ font-weight: bold;
+ color: #333;
+ border-radius: 4px 4px 0 0;
+ margin: 10px 0 0 0;
+ /* 椤堕儴闂磋窛淇濈暀锛屽簳閮ㄩ棿璺濈Щ闄� */
+}
+
+.table-title {
+ text-align: center;
+ padding: 10px 0;
+}
+
+.table-title.table-header h3 {
+ margin: 0;
+ font-weight: bold;
+ color: #333;
+}
+
+.table-title h3 {
+ font-size: 16px;
+ color: #333;
+ margin: 0;
+ line-height: 1.5;
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 20px;
+}
+
+.table-title .highlight {
+ font-weight: bold;
+ color: #2c3e50;
+}
+
+.el-table {
+ border-radius: 4px;
+ font-size: 14px;
}
.el-table .warning-row {
background: #e5f3ff !important;
}
-::v-deep .el-table__body tr.current-row > td {
+
+::v-deep .el-table__body tr.current-row>td {
background: #edf2fa !important;
}
-.table-title {
- text-align: center;
- margin-bottom: 15px;
-}
.row-disabled {
- color: #ccc; /* 璁剧疆绂佺敤琛岀殑瀛椾綋棰滆壊 */
- pointer-events: none; /* 绂佹榧犳爣鎿嶄綔 */
- background-color: #f5f5f5; /* 璁剧疆绂佺敤琛岀殑鑳屾櫙鑹� */
-}
-
-.pag {
- width: 100%;
- display: flex;
- justify-content: center;
-}
-
-.pag1 {
- width: 30%;
+ color: #999;
+ background-color: #f5f5f5;
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0