From fb34ba28cb908bd328cf6690ab0b19a56428f4e2 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 13 十一月 2026 10:56:55 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/zysatisfaction/index.vue | 101 +++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 90 insertions(+), 11 deletions(-)
diff --git a/src/views/followvisit/zysatisfaction/index.vue b/src/views/followvisit/zysatisfaction/index.vue
index 3ff55b7..3edb9ba 100644
--- a/src/views/followvisit/zysatisfaction/index.vue
+++ b/src/views/followvisit/zysatisfaction/index.vue
@@ -79,6 +79,23 @@
@change="handleChange"
></el-cascader>
</el-form-item>
+ <el-form-item label="鐐逛綅" prop="pointLocations" v-if="isTongdeCampus">
+ <el-select
+ v-model="topqueryParams.pointLocations"
+ multiple
+ filterable
+ clearable
+ placeholder="璇烽�夋嫨鐐逛綅"
+ style="width: 240px"
+ >
+ <el-option
+ v-for="item in pointOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ ></el-option>
+ </el-select>
+ </el-form-item>
<!-- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
<el-select
@@ -409,12 +426,15 @@
</el-table-column>
<el-table-column
v-if="isTongdeCampus"
- label="鐐逛綅缂栫爜"
+ label="鐐逛綅"
width="120"
align="center"
key="pointLocation"
- prop="pointLocation"
- />
+ >
+ <template slot-scope="scope">
+ {{ pointNameOf(scope.row) }}
+ </template>
+ </el-table-column>
<el-table-column
label="澶勭悊浜哄憳"
@@ -926,6 +946,7 @@
updateUser,
resetUserPwd,
changeUserStatus,
+ deptTreeSelect,
} from "@/api/system/user";
import {
getTaskservelist,
@@ -1134,6 +1155,7 @@
scopetype: [],
leaveldeptcodes: [],
leavehospitaldistrictcodes: [],
+ pointLocations: [],
},
propss: { multiple: true },
options: [],
@@ -1225,6 +1247,8 @@
leavehospitaldistrictcode: "",
serviceState: [],
checkboxlist: [],
+ // 鐐逛綅鍒楄〃锛堝悓寰烽櫌鍖猴紝deptType=3锛�
+ pointOptions: [],
// 琛ㄥ崟鏍¢獙
rules: {},
};
@@ -1255,6 +1279,7 @@
} else {
this.getList(1);
}
+ this.getPointOptions();
this.getConfigKey("sys.user.initPassword").then((response) => {
this.initPassword = response.msg;
});
@@ -1281,21 +1306,26 @@
);
console.log(this.topqueryParams.leavehospitaldistrictcodes, "11");
}
+
+ const queryParams = this.buildQueryParams();
+
this.loading = true;
if (
- this.topqueryParams.leavehospitaldistrictcodes[0] &&
- this.topqueryParams.leaveldeptcodes[0]
+ queryParams.leavehospitaldistrictcodes &&
+ queryParams.leavehospitaldistrictcodes[0] &&
+ queryParams.leaveldeptcodes &&
+ queryParams.leaveldeptcodes[0]
) {
- this.topqueryParams.deptOrDistrict = 2;
+ queryParams.deptOrDistrict = 2;
} else {
- this.topqueryParams.deptOrDistrict = 1;
+ queryParams.deptOrDistrict = 1;
}
if (!this.followupAuthority()) {
this.$message.warning("鏈厤缃瀹�/鐥呭尯鐩稿叧鏉冮檺涓嶅彲鏌ヨ");
return Promise.reject(new Error("鏃犳潈闄愭煡璇�"));
}
- getTaskservelist(this.buildScopePayload(this.topqueryParams)).then((response) => {
+ getTaskservelist(this.buildScopePayload(queryParams)).then((response) => {
this.userList = response.rows[0].serviceSubtaskList;
this.total = response.total;
if (refresh) {
@@ -1353,8 +1383,9 @@
buildScopePayload(params) {
const payload = { ...params };
if (this.satisfactionScope === "hospital") {
- payload.deptcodes = params.leaveldeptcodes || [];
- payload.hospitaldistrictcodes = params.leavehospitaldistrictcodes || [];
+ // 閫夌偣浣嶆椂 leaveldeptcodes/leavehospitaldistrictcodes 涓� null锛岄渶鍘熸牱閫忎紶锛屼笉鑳� || [] 鍏滄垚绌烘暟缁�
+ payload.deptcodes = params.leaveldeptcodes;
+ payload.hospitaldistrictcodes = params.leavehospitaldistrictcodes;
delete payload.leaveldeptcodes;
delete payload.leavehospitaldistrictcodes;
}
@@ -1379,6 +1410,40 @@
? row.hospitaldistrictname || row.leavehospitaldistrictname
: row.leavehospitaldistrictname || row.hospitaldistrictname) || "-"
);
+ },
+
+ // 鐐逛綅鍒楄〃锛堝悓寰烽櫌鍖猴紝deptType=3锛�
+ getPointOptions() {
+ if (!this.isTongdeCampus) return;
+ deptTreeSelect(3).then((response) => {
+ const flat = [];
+ const walk = (nodes) => {
+ (Array.isArray(nodes) ? nodes : []).forEach((n) => {
+ if (n.label && n.deptCode) {
+ flat.push({ label: n.label, value: String(n.deptCode) });
+ }
+ if (n.children && n.children.length) walk(n.children);
+ });
+ };
+ walk(response && response.data);
+ this.pointOptions = flat;
+ });
+ },
+
+ // 鐐逛綅鍚嶇О锛氬皢 pointLocation 缂栫爜鏄犲皠涓虹偣浣嶅悕绉�
+ pointNameOf(row) {
+ if (
+ !row ||
+ row.pointLocation === undefined ||
+ row.pointLocation === null ||
+ row.pointLocation === ""
+ ) {
+ return "";
+ }
+ const found = this.pointOptions.find(
+ (p) => String(p.value) === String(row.pointLocation)
+ );
+ return found ? found.label : row.pointLocation;
},
// 鏈嶅姟鐘舵�佸彉鏇村鐞�
@@ -1559,6 +1624,18 @@
this.topqueryParams.finishtimeEnd = this.dateRangefs[1];
this.getList(refresh);
},
+ // 鏋勯�犳煡璇�/瀵煎嚭鍙傛暟锛氶�夋嫨鐐逛綅鏃剁瀹�/鐥呭尯浼� null锛屽惁鍒欎繚鎸佸師鍊�
+ buildQueryParams() {
+ const params = { ...this.topqueryParams };
+ if (
+ this.topqueryParams.pointLocations &&
+ this.topqueryParams.pointLocations.length > 0
+ ) {
+ params.leaveldeptcodes = null;
+ params.leavehospitaldistrictcodes = null;
+ }
+ return params;
+ },
// 鎮h�呰寖鍥村鐞�
handleChange(value) {
let type = value[0];
@@ -1594,6 +1671,7 @@
scopetype: [],
leaveldeptcodes: [],
leavehospitaldistrictcodes: [],
+ pointLocations: [],
};
this.handleQuery(1);
},
@@ -1615,6 +1693,7 @@
scopetype: [],
leaveldeptcodes: [],
leavehospitaldistrictcodes: [],
+ pointLocations: [],
};
},
handleSelectionChange(rows) {
@@ -1916,7 +1995,7 @@
this.download(
"smartor/serviceSubtask/patItemExport",
{
- ...this.buildScopePayload(this.topqueryParams),
+ ...this.buildScopePayload(this.buildQueryParams()),
},
`user_${new Date().getTime()}.xlsx`
).finally(() => {
--
Gitblit v1.9.3