From bbbc478129f72b26e2ec4a2e981ed8698a96880c Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 22 十月 2026 00:28:18 +0800
Subject: [PATCH] 当service_type=6时,需要根据传入的入院还是离院病区(病区)去后端查询
---
src/views/followvisit/zysatisfaction/index.vue | 76 ++++++++++++++++++++++++++++++++++++--
1 files changed, 72 insertions(+), 4 deletions(-)
diff --git a/src/views/followvisit/zysatisfaction/index.vue b/src/views/followvisit/zysatisfaction/index.vue
index 05b216f..78603be 100644
--- a/src/views/followvisit/zysatisfaction/index.vue
+++ b/src/views/followvisit/zysatisfaction/index.vue
@@ -15,6 +15,18 @@
v-show="showSearch"
label-width="98px"
>
+ <el-form-item label="婊℃剰搴︾被鍨�" prop="satisfactionScope">
+ <el-select
+ v-model="satisfactionScope"
+ placeholder="榛樿绂婚櫌"
+ clearable
+ style="width: 150px"
+ @change="handleSatisfactionScopeChange"
+ >
+ <el-option label="绂婚櫌婊℃剰搴�" value="leave" />
+ <el-option label="鍦ㄩ櫌婊℃剰搴�" value="hospital" />
+ </el-select>
+ </el-form-item>
<!-- <el-form-item label="鍑洪櫌鏃堕棿">
<el-date-picker
v-model="dateRange"
@@ -82,12 +94,16 @@
</el-option>
</el-select>
</el-form-item> -->
+ <!-- 澶勭悊鐘舵�侊細淇濈暀绾ц仈鑱斿姩锛堜竴绾уぇ绫� 鈫� 浜岀骇鍏蜂綋鐘舵�侊級锛�
+ 闈㈡澘鎸傚湪鏈粍浠跺唴(popper-append-to-body=false)锛岄伩鍏嶄笅鎷夎窇鍒板埆澶� -->
<el-form-item label="澶勭悊鐘舵��" prop="status">
<el-cascader
v-model="serviceStatusValue"
placeholder="璇烽�夋嫨"
:options="serviceStatusOptions"
:props="cascaderProps"
+ :popper-append-to-body="false"
+ style="width: 180px"
@change="handleServiceStatusChange"
clearable
></el-cascader>
@@ -375,17 +391,21 @@
label="绉戝"
align="center"
key="leaveldeptname"
- prop="leaveldeptname"
width="120"
>
+ <template slot-scope="scope">
+ {{ deptNameOf(scope.row) }}
+ </template>
</el-table-column>
<el-table-column
label="鐥呭尯"
align="center"
key="leavehospitaldistrictname"
- prop="leavehospitaldistrictname"
width="120"
>
+ <template slot-scope="scope">
+ {{ wardNameOf(scope.row) }}
+ </template>
</el-table-column>
<el-table-column
@@ -1089,6 +1109,8 @@
label: "搴旈殢璁挎棩鏈�(鍊掑簭)",
},
],
+ // 婊℃剰搴︾被鍨嬶細leave=绂婚櫌婊℃剰搴︼紙鎸夌闄㈢瀹�/鐥呭尯鏌ワ級锛宧ospital=鍦ㄩ櫌婊℃剰搴︼紙鎸夊湪闄㈢瀹�/鐥呭尯鏌ワ級
+ satisfactionScope: "leave",
// 鏌ヨ鍙傛暟
topqueryParams: {
pageNum: 1,
@@ -1264,7 +1286,7 @@
this.$message.warning("鏈厤缃瀹�/鐥呭尯鐩稿叧鏉冮檺涓嶅彲鏌ヨ");
return Promise.reject(new Error("鏃犳潈闄愭煡璇�"));
}
- getTaskservelist(this.topqueryParams).then((response) => {
+ getTaskservelist(this.buildScopePayload(this.topqueryParams)).then((response) => {
this.userList = response.rows[0].serviceSubtaskList;
this.total = response.total;
if (refresh) {
@@ -1309,6 +1331,47 @@
this.total = response.total;
});
},
+
+ // 鍒囨崲婊℃剰搴︾被鍨嬶紙绂婚櫌/鍦ㄩ櫌锛夊悗閲嶆柊鏌ヨ
+ handleSatisfactionScopeChange() {
+ this.topqueryParams.pageNum = 1;
+ this.getList(1);
+ },
+
+ // 鎸夋弧鎰忓害绫诲瀷缁勮绉戝/鐥呭尯鏉′欢锛�
+ // 绂婚櫌婊℃剰搴� => leaveldeptcodes / leavehospitaldistrictcodes锛�
+ // 鍦ㄩ櫌婊℃剰搴� => deptcodes / hospitaldistrictcodes锛堝湪闄㈢瀹ゃ�佸湪闄㈢梾鍖猴級
+ buildScopePayload(params) {
+ const payload = { ...params };
+ if (this.satisfactionScope === "hospital") {
+ payload.deptcodes = params.leaveldeptcodes || [];
+ payload.hospitaldistrictcodes = params.leavehospitaldistrictcodes || [];
+ delete payload.leaveldeptcodes;
+ delete payload.leavehospitaldistrictcodes;
+ }
+ return payload;
+ },
+
+ // 绉戝鍚嶇О锛氬湪闄㈡弧鎰忓害浼樺厛鍙栧湪闄㈢瀹わ紝鍏朵綑鍙栧嚭闄㈢瀹�
+ deptNameOf(row) {
+ if (!row) return "-";
+ return (
+ (this.satisfactionScope === "hospital"
+ ? row.deptname || row.leaveldeptname
+ : row.leaveldeptname || row.deptname) || "-"
+ );
+ },
+
+ // 鐥呭尯鍚嶇О锛氬湪闄㈡弧鎰忓害浼樺厛鍙栧湪闄㈢梾鍖猴紝鍏朵綑鍙栧嚭闄㈢梾鍖�
+ wardNameOf(row) {
+ if (!row) return "-";
+ return (
+ (this.satisfactionScope === "hospital"
+ ? row.hospitaldistrictname || row.leavehospitaldistrictname
+ : row.leavehospitaldistrictname || row.hospitaldistrictname) || "-"
+ );
+ },
+
// 鏈嶅姟鐘舵�佸彉鏇村鐞�
handleServiceStatusChange(value) {
// 娓呯┖閫夋嫨
@@ -1841,7 +1904,7 @@
this.download(
"smartor/serviceSubtask/patItemExport",
{
- ...this.topqueryParams,
+ ...this.buildScopePayload(this.topqueryParams),
},
`user_${new Date().getTime()}.xlsx`
);
@@ -2085,6 +2148,11 @@
box-shadow: 0 2px 12px rgba(31, 45, 61, 0.05);
}
+/* 绾ц仈涓嬫媺鎸傚湪鏈粍浠跺唴鏃讹紝浠ユ墍鍦ㄨ〃鍗曢」涓哄畾浣嶅熀鍑嗭紝閬垮厤闈㈡澘璺戝埌椤甸潰鍒 */
+::v-deep .el-form--inline .el-form-item {
+ position: relative;
+}
+
/* 闅愯棌鍒嗗壊绾� */
::v-deep .el-divider {
display: none;
--
Gitblit v1.9.3