From a9d2b856e0f6be6475319c2dc36bf405c2f908fc Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 22 九月 2026 14:04:52 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/discharge/index.vue | 271 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 242 insertions(+), 29 deletions(-)
diff --git a/src/views/followvisit/discharge/index.vue b/src/views/followvisit/discharge/index.vue
index 2412250..3531957 100644
--- a/src/views/followvisit/discharge/index.vue
+++ b/src/views/followvisit/discharge/index.vue
@@ -243,6 +243,17 @@
</div>
</div>
</el-col>
+ <div class="color-legend">
+ <span class="legend-item" v-if="orgname == '鍗楀崕澶у闄勫睘绗竴鍖婚櫌'">
+ <span class="legend-block legend-blue"></span>鏈埌闅忚鏃堕棿
+ </span>
+ <span class="legend-item">
+ <span class="legend-block legend-red"></span>濉姤鍐呭瀛樺湪寮傚父
+ </span>
+ <span class="legend-item">
+ <span class="legend-block legend-yellow"></span>濉姤鍐呭瀛樺湪璀﹀憡
+ </span>
+ </div>
</el-row>
<div class="selected-info">
宸查�変腑
@@ -311,7 +322,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"
@@ -460,6 +519,7 @@
width="120"
/>
<el-table-column
+ v-if="orgname != '娴欐睙鐪佹柊鍗庡尰闄�'"
label="浠诲姟鐘舵��"
align="center"
key="sendstate"
@@ -642,7 +702,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
@@ -1124,7 +1184,7 @@
inputVisible: false,
Labelchange: false,
ycvalue: 0,
- jgvalue: "",
+ jgvalue: 0,
yfsvalue: "",
inputValue: "",
preachform: "",
@@ -1295,7 +1355,8 @@
visitCount: 1,
scopetype: [],
managementDoctor:
- localStorage.getItem("orgname") == "缂欎簯鍘夸汉姘戝尰闄�"||localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌"
+ localStorage.getItem("orgname") == "缂欎簯鍘夸汉姘戝尰闄�" ||
+ localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌"
? store.getters.nickName
: "",
leaveldeptcodes: [],
@@ -1450,6 +1511,8 @@
value: dept.districtCode,
};
});
+ // 鍏嶇櫥鐩磋揪锛氭牴鎹瀹�/鐥呭尯缂栫爜棰勫~鎮h�呰寖鍥�
+ this.applyFollowUpScope();
if (this.errtype == 1) {
this.toleadExport(2);
} else if (this.errtype == 2) {
@@ -1496,7 +1559,7 @@
async getList(refresh) {
// 榛樿鍏ㄩ儴
this.applyDeptWardScope();
- if (this.endOut == 0) {
+ if (this.endOut == 0 && !this.topqueryParams.endSendDateTime) {
this.topqueryParams.endSendDateTime = this.formatDateToYYYYMMDDHHMMSS(
this.getEndOfDay()
);
@@ -1664,8 +1727,10 @@
onthatday() {
this.resetQuerykj();
- this.topqueryParams.startSendDateTime = this.getCurrentDate();
- this.topqueryParams.endSendDateTime = this.getCurrentDate();
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ this.topqueryParams.sendstate = null;
+ this.topqueryParams.startSendDateTime = null;
+ this.topqueryParams.endSendDateTime = this.getCurrentDate(); // 寮�濮嬮殢璁挎棩鏈� <= 浠婂ぉ
this.getList(1);
},
getCurrentDate() {
@@ -1674,10 +1739,12 @@
},
buidegetTasklist(type) {
- if (type) {
- this.resetQuerykj();
- }
- this.applyDeptWardScope();
+ // 鐢ㄦ埛鏉冮檺涓嬫墍鏈夊緟闅忚浠诲姟锛氫紶閫掑叏閮ㄧ瀹ゅ拰鐥呭尯
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
// 鎺ュ彈寮傚父璺宠浆
if (this.errtype) {
this.topqueryParams.leavehospitaldistrictcodes.push(
@@ -1689,7 +1756,7 @@
pageSize: 10,
leavehospitaldistrictcodes:
this.topqueryParams.leavehospitaldistrictcodes,
- sendstates: [2, 3],
+ sendstateView: 1,
leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
};
buidegetTasklist(obj).then((response) => {
@@ -1786,6 +1853,7 @@
/** 鎼滅储鎸夐挳鎿嶄綔 */
handleQuery(refresh) {
this.applyDeptWardScope();
+ this.clearAllSelection();
this.topqueryParams.pageNum = 1;
// 鍒ゆ柇鏄笉鏄伐浣滃彴蹇嵎鏌ヨ
if (this.errtype != 2) {
@@ -1795,6 +1863,17 @@
this.topqueryParams.endSendDateTime = this.dateRangefs[1];
}
this.getList(refresh);
+ },
+ // 鍏嶇櫥鐩磋揪锛氭牴鎹矾鐢变腑鐨勭瀹�/鐥呭尯缂栫爜棰勫~鎮h�呰寖鍥�
+ applyFollowUpScope() {
+ const deptCode = this.$route.query.followUpDeptCode;
+ const wardCode = this.$route.query.followUpWardCode;
+ if (!deptCode && !wardCode) return;
+ const scope = [];
+ if (deptCode) scope.push([1, deptCode]);
+ if (wardCode) scope.push([2, wardCode]);
+ this.topqueryParams.scopetype = scope;
+ this.lastScopeType = deptCode ? 1 : 2;
},
// 鎮h�呰寖鍥村鐞嗭細浠庡閫夌骇鑱� scopetype 瑙f瀽绉戝/鐥呭尯
applyDeptWardScope() {
@@ -1836,16 +1915,12 @@
if (hasDept && hasWard) {
if (this.lastScopeType == 1) {
// 涓婃閫変簡绉戝锛岃繖娆℃柊澧炵梾鍖� 鈫� 淇濈暀鐥呭尯
- this.topqueryParams.scopetype = value.filter(
- (item) => item[0] === 2
- );
+ 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.topqueryParams.scopetype = value.filter((item) => item[0] === 1);
this.lastScopeType = 1;
this.$message.warning("绉戝鍜岀梾鍖轰笉鑳藉悓鏃堕�夋嫨锛屽凡鍒囨崲涓虹瀹�");
}
@@ -2263,14 +2338,41 @@
this.getList();
});
},
- // 寮傚父鍒楁覆鏌�
+ // 琛岄鑹叉覆鏌擄細钃濊壊(鏈埌闅忚鏃堕棿) / 绾㈣壊(寮傚父) / 榛勮壊(璀﹀憡)
tableRowClassName({ row, rowIndex }) {
+ // 褰撳墠鏃堕棿灏忎簬搴旈殢璁挎椂闂翠笖浠诲姟鐘舵�佷负寰呴殢璁� 鈫� 鏁磋钃濊壊锛堝崡鍗庡ぇ瀛﹂檮灞炵涓�鍖婚櫌涓嶇敓鏁堬級
+ if (
+ this.orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" &&
+ row.sendstate == 2 &&
+ this.isBeforeVisitTime(row.visitTime)
+ ) {
+ return "blue-row";
+ }
if (row.excep == 1) {
return "warning-row";
} else if (row.excep == 2) {
return "remind-row";
}
return "";
+ },
+ // 鍒ゆ柇褰撳墠鏃堕棿鏄惁鏃╀簬搴旈殢璁挎椂闂达紙鎸夆�滃ぉ鈥濇瘮杈冿級
+ isBeforeVisitTime(visitTime) {
+ if (!visitTime) return false;
+ let date;
+ if (typeof visitTime === "number") {
+ date = new Date(visitTime);
+ } else {
+ date = new Date(String(visitTime).replace(/-/g, "/"));
+ }
+ if (isNaN(date.getTime())) return false;
+ const now = new Date();
+ const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
+ const visitDay = new Date(
+ date.getFullYear(),
+ date.getMonth(),
+ date.getDate()
+ );
+ return today.getTime() < visitDay.getTime();
},
restoreSelection() {
if (!this.$refs.userform) {
@@ -2413,21 +2515,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) {
@@ -2483,8 +2591,8 @@
<style lang="scss" scoped>
.el-button--primary.is-plain {
color: #ffffff;
- background: #409eff;
- border-color: #4fabe9;
+ background: #5b7cfa;
+ border-color: #5b7cfa;
}
.document {
@@ -2497,10 +2605,44 @@
::v-deep.el-table .remind-row {
background: #fcf5aa;
}
+::v-deep.el-table .blue-row {
+ background: #c6e2ff;
+}
.documentf {
display: flex;
justify-content: flex-end;
+}
+
+.color-legend {
+ float: right;
+ display: flex;
+ align-items: center;
+ height: 40px;
+ gap: 16px;
+ margin-right: 5px;
+}
+.legend-item {
+ display: inline-flex;
+ align-items: center;
+ font-size: 16px;
+ color: #666;
+}
+.legend-block {
+ display: inline-block;
+ width: 14px;
+ height: 14px;
+ border-radius: 3px;
+ margin-right: 6px;
+}
+.legend-blue {
+ background: #9cc9fa;
+}
+.legend-red {
+ background: #f1aaaa;
+}
+.legend-yellow {
+ background: #faf18d;
}
.download {
@@ -2717,4 +2859,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