From 70e4d2c33cc2e3af590d1816c0c703da341538cf Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 04 九月 2026 14:13:32 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/discharge/index.vue | 257 +++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 199 insertions(+), 58 deletions(-)
diff --git a/src/views/followvisit/discharge/index.vue b/src/views/followvisit/discharge/index.vue
index 15b77d9..8af1406 100644
--- a/src/views/followvisit/discharge/index.vue
+++ b/src/views/followvisit/discharge/index.vue
@@ -92,10 +92,11 @@
v-model="topqueryParams.scopetype"
placeholder="榛樿鍏ㄩ儴"
:options="sourcetype"
- :props="{ expandTrigger: 'hover' }"
+ :props="{ expandTrigger: 'hover', multiple: true }"
@change="handleChange"
filterable
clearable
+ collapse-tags
></el-cascader>
</el-form-item>
@@ -310,7 +311,55 @@
:show-overflow-tooltip="true"
>
</el-table-column>
-
+ <el-table-column
+ v-if="orgname == '娴欐睙鐪佹柊鍗庡尰闄�'"
+ label="浠诲姟鐘舵��"
+ align="center"
+ key="sendstate"
+ prop="sendstate"
+ width="120"
+ >
+ <template slot-scope="scope">
+ <el-tooltip
+ class="item"
+ effect="dark"
+ :content="scope.row.remark"
+ placement="top-start"
+ >
+ <div v-if="scope.row.sendstate == 1">
+ <el-tag type="primary" :disable-transitions="false"
+ >琛ㄥ崟宸查鍙�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 2">
+ <el-tag type="primary" :disable-transitions="false"
+ >寰呴殢璁�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 3">
+ <el-tag type="success" :disable-transitions="false"
+ >琛ㄥ崟宸插彂閫�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 4">
+ <el-tag type="info" :disable-transitions="false">涓嶆墽琛�</el-tag>
+ </div>
+ <div v-if="scope.row.sendstate == 5">
+ <el-tag type="danger" :disable-transitions="false"
+ >鍙戦�佸け璐�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 6">
+ <el-tag type="success" :disable-transitions="false"
+ >宸插畬鎴�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 7">
+ <el-tag type="danger" :disable-transitions="false">瓒呮椂</el-tag>
+ </div>
+ </el-tooltip>
+ </template>
+ </el-table-column>
<el-table-column
label="闅忚鐘舵��"
align="center"
@@ -459,6 +508,7 @@
width="120"
/>
<el-table-column
+ v-if="orgname != '娴欐睙鐪佹柊鍗庡尰闄�'"
label="浠诲姟鐘舵��"
align="center"
key="sendstate"
@@ -641,7 +691,7 @@
size="medium"
type="text"
@click="handlestop(scope.row)"
- v-hasPermi="['system:user:edit']"
+
><span class="button-sc"
><i class="el-icon-remove-outline"></i>鏆傚仠鏈嶅姟</span
></el-button
@@ -1123,7 +1173,7 @@
inputVisible: false,
Labelchange: false,
ycvalue: 0,
- jgvalue: "",
+ jgvalue: 0,
yfsvalue: "",
inputValue: "",
preachform: "",
@@ -1192,6 +1242,7 @@
label: "鍏ㄩ儴",
},
],
+ lastScopeType: 3, // 鎮h�呰寖鍥翠笂娆¢�夋嫨鐨勪竴绾х被鍨嬶紙1=绉戝锛�2=鐥呭尯锛�3=鍏ㄩ儴锛�
loading: false,
cardlist: [
{
@@ -1293,7 +1344,8 @@
visitCount: 1,
scopetype: [],
managementDoctor:
- localStorage.getItem("orgname") == "缂欎簯鍘夸汉姘戝尰闄�"
+ localStorage.getItem("orgname") == "缂欎簯鍘夸汉姘戝尰闄�" ||
+ localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌"
? store.getters.nickName
: "",
leaveldeptcodes: [],
@@ -1493,13 +1545,7 @@
/** 鏌ヨ闅忚鏈嶅姟鍒楄〃 */
async getList(refresh) {
// 榛樿鍏ㄩ儴
- if (this.topqueryParams.searchscope == 3) {
- this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
- (obj) => obj.deptCode
- );
- this.topqueryParams.leavehospitaldistrictcodes =
- store.getters.belongWards.map((obj) => obj.districtCode);
- }
+ this.applyDeptWardScope();
if (this.endOut == 0) {
this.topqueryParams.endSendDateTime = this.formatDateToYYYYMMDDHHMMSS(
this.getEndOfDay()
@@ -1681,13 +1727,7 @@
if (type) {
this.resetQuerykj();
}
- if (this.topqueryParams.searchscope == 3) {
- this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
- (obj) => obj.deptCode
- );
- this.topqueryParams.leavehospitaldistrictcodes =
- store.getters.belongWards.map((obj) => obj.districtCode);
- }
+ this.applyDeptWardScope();
// 鎺ュ彈寮傚父璺宠浆
if (this.errtype) {
this.topqueryParams.leavehospitaldistrictcodes.push(
@@ -1795,13 +1835,7 @@
},
/** 鎼滅储鎸夐挳鎿嶄綔 */
handleQuery(refresh) {
- if (this.topqueryParams.searchscope == 3) {
- this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
- (obj) => obj.deptCode
- );
- this.topqueryParams.leavehospitaldistrictcodes =
- store.getters.belongWards.map((obj) => obj.districtCode);
- }
+ this.applyDeptWardScope();
this.topqueryParams.pageNum = 1;
// 鍒ゆ柇鏄笉鏄伐浣滃彴蹇嵎鏌ヨ
if (this.errtype != 2) {
@@ -1812,33 +1846,61 @@
}
this.getList(refresh);
},
- // 鎮h�呰寖鍥村鐞�
+ // 鎮h�呰寖鍥村鐞嗭細浠庡閫夌骇鑱� scopetype 瑙f瀽绉戝/鐥呭尯
+ applyDeptWardScope() {
+ const value = this.topqueryParams.scopetype || [];
+ const deptCodes = [];
+ const wardCodes = [];
+ let isAll = false;
+
+ value.forEach((item) => {
+ const type = item[0];
+ if (type == 3) {
+ isAll = true;
+ } else if (type == 1) {
+ deptCodes.push(item[item.length - 1]);
+ } else if (type == 2) {
+ wardCodes.push(item[item.length - 1]);
+ }
+ });
+
+ // 閫変簡鍏ㄩ儴 鎴� 鏈�夋嫨 鈫� 鐢ㄦ埛鍏ㄩ儴绉戝/鐥呭尯
+ if (isAll || (!deptCodes.length && !wardCodes.length)) {
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
+ } else {
+ this.topqueryParams.leaveldeptcodes = deptCodes;
+ this.topqueryParams.leavehospitaldistrictcodes = wardCodes;
+ }
+ },
+ // 鎮h�呰寖鍥村閫夊彉鏇达紙绉戝/鐥呭尯浜掓枼锛�
handleChange(value) {
- console.log("閫夋嫨鐨勬偅鑰呰寖鍥�:", value);
+ const types = (value || []).map((item) => item[0]);
+ const hasDept = types.includes(1);
+ const hasWard = types.includes(2);
- // 娓呯┖涔嬪墠鐨勬煡璇㈠弬鏁�
- this.topqueryParams.leavehospitaldistrictcodes = [];
- this.topqueryParams.leaveldeptcodes = [];
- this.topqueryParams.searchscope = null;
-
- if (!value || value.length === 0) {
+ // 浜掓枼锛氱瀹ゅ拰鐥呭尯涓嶈兘鍚屾椂閫�
+ if (hasDept && hasWard) {
+ if (this.lastScopeType == 1) {
+ // 涓婃閫変簡绉戝锛岃繖娆℃柊澧炵梾鍖� 鈫� 淇濈暀鐥呭尯
+ this.topqueryParams.scopetype = value.filter((item) => item[0] === 2);
+ this.lastScopeType = 2;
+ this.$message.warning("绉戝鍜岀梾鍖轰笉鑳藉悓鏃堕�夋嫨锛屽凡鍒囨崲涓虹梾鍖�");
+ } else {
+ // 涓婃閫変簡鐥呭尯锛岃繖娆℃柊澧炵瀹� 鈫� 淇濈暀绉戝
+ this.topqueryParams.scopetype = value.filter((item) => item[0] === 1);
+ this.lastScopeType = 1;
+ this.$message.warning("绉戝鍜岀梾鍖轰笉鑳藉悓鏃堕�夋嫨锛屽凡鍒囨崲涓虹瀹�");
+ }
+ this.applyDeptWardScope();
return;
}
- let type = value[0];
- let code = value.slice(-1)[0];
-
- if (type == 1) {
- this.topqueryParams.leaveldeptcodes.push(code);
- this.topqueryParams.leavehospitaldistrictcodes = [];
- this.topqueryParams.searchscope = 1;
- } else if (type == 2) {
- this.topqueryParams.leavehospitaldistrictcodes.push(code);
- this.topqueryParams.leaveldeptcodes = [];
- this.topqueryParams.searchscope = 2;
- } else {
- this.topqueryParams.searchscope = 3;
- }
+ this.lastScopeType = hasDept ? 1 : hasWard ? 2 : 3;
+ this.applyDeptWardScope();
},
// 鏈嶅姟鐘舵�佸彉鏇村鐞�
handleServiceStatusChange(value) {
@@ -1876,6 +1938,7 @@
this.dateRange = [];
this.dateRangefs = [];
this.serviceStatusValue = 10;
+ this.lastScopeType = 3;
this.topqueryParams = {
pageNum: 1,
pageSize: 10,
@@ -1895,6 +1958,7 @@
this.dateRange = [];
this.dateRangefs = [];
this.serviceStatusValue = null;
+ this.lastScopeType = 3;
this.topqueryParams = {
pageNum: 1,
pageSize: 10,
@@ -2395,21 +2459,27 @@
if (val && val.length) {
this.transferForm.leavelDeptCode = val[val.length - 1];
// 浠庨�夐」鏍戜腑鏌ユ壘瀵瑰簲鍚嶇О
- const node = this.findCascaderNode(this.deptOptionsks, this.transferForm.leavelDeptCode);
- this.transferForm.leavelDeptName = node ? node.label : '';
+ const node = this.findCascaderNode(
+ this.deptOptionsks,
+ this.transferForm.leavelDeptCode
+ );
+ this.transferForm.leavelDeptName = node ? node.label : "";
} else {
- this.transferForm.leavelDeptCode = '';
- this.transferForm.leavelDeptName = '';
+ this.transferForm.leavelDeptCode = "";
+ this.transferForm.leavelDeptName = "";
}
},
handleWardCascaderChange(val) {
if (val && val.length) {
this.transferForm.leavehospitaldistrictcode = val[val.length - 1];
- const node = this.findCascaderNode(this.deptOptionsbq, this.transferForm.leavehospitaldistrictcode);
- this.transferForm.leavehospitaldistrictname = node ? node.label : '';
+ const node = this.findCascaderNode(
+ this.deptOptionsbq,
+ this.transferForm.leavehospitaldistrictcode
+ );
+ this.transferForm.leavehospitaldistrictname = node ? node.label : "";
} else {
- this.transferForm.leavehospitaldistrictcode = '';
- this.transferForm.leavehospitaldistrictname = '';
+ this.transferForm.leavehospitaldistrictcode = "";
+ this.transferForm.leavehospitaldistrictname = "";
}
},
findCascaderNode(options, code) {
@@ -2465,8 +2535,8 @@
<style lang="scss" scoped>
.el-button--primary.is-plain {
color: #ffffff;
- background: #409eff;
- border-color: #4fabe9;
+ background: #5b7cfa;
+ border-color: #5b7cfa;
}
.document {
@@ -2699,4 +2769,75 @@
font-size: 14px;
color: #666;
}
+/* ================= 娓呮柊楂樼骇绠�绾﹂ ================= */
+.app-container {
+ background: #f5f7fb;
+ border-radius: 14px;
+ padding: 20px;
+}
+
+/* 鏌ヨ琛ㄥ崟锛氱櫧鑹插渾瑙掑崱鐗� */
+::v-deep .el-form--inline {
+ background: #ffffff;
+ border-radius: 14px;
+ padding: 22px 22px 8px;
+ margin-bottom: 18px;
+ box-shadow: 0 2px 12px rgba(31, 45, 61, 0.05);
+}
+
+/* 闅愯棌鍒嗗壊绾� */
+::v-deep .el-divider {
+ display: none;
+}
+
+/* 宸ュ叿鏍忓簳閮ㄩ棿璺� */
+.mb8 {
+ margin-bottom: 18px;
+}
+
+/* 鎸夐挳锛氬渾瑙� + 鏌斿拰杩囨浮 */
+::v-deep .el-button {
+ border-radius: 8px;
+ font-weight: 500;
+ transition: all 0.25s ease;
+}
+
+/* 涓绘寜閽細娓呮柊闈涜摑 */
+::v-deep .el-button--primary:not(.is-plain) {
+ background: #5b7cfa;
+ border-color: #5b7cfa;
+}
+::v-deep .el-button--primary:not(.is-plain):hover,
+::v-deep .el-button--primary:not(.is-plain):focus {
+ background: #7593fb;
+ border-color: #7593fb;
+}
+
+/* 琛ㄦ牸锛氱櫧鑹插渾瑙掑崱鐗� + 鏌斿拰琛ㄥご */
+::v-deep .el-table {
+ border-radius: 14px;
+ overflow: hidden;
+ box-shadow: 0 2px 12px rgba(31, 45, 61, 0.05);
+}
+::v-deep .el-table::before {
+ display: none;
+}
+::v-deep .el-table th {
+ background: #f7f9fd !important;
+ color: #3f4d63;
+ font-weight: 600;
+}
+::v-deep .el-table td {
+ padding: 12px 0;
+}
+
+/* 鏍囩鍦嗚 */
+::v-deep .el-tag {
+ border-radius: 6px;
+}
+
+/* 鍒嗛〉闂磋窛 */
+::v-deep .pagination-container {
+ padding-top: 18px;
+}
</style>
--
Gitblit v1.9.3