From 9903954c85f651dd5cc6d4b538cfe66b17fc5baa Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 28 十月 2026 18:23:45 +0800
Subject: [PATCH] 提交
---
src/views/followvisit/discharge/outpatientService.vue | 114 ++++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 96 insertions(+), 18 deletions(-)
diff --git a/src/views/followvisit/discharge/outpatientService.vue b/src/views/followvisit/discharge/outpatientService.vue
index 5910c74..243496d 100644
--- a/src/views/followvisit/discharge/outpatientService.vue
+++ b/src/views/followvisit/discharge/outpatientService.vue
@@ -185,7 +185,7 @@
</div>
</div>
</el-col>
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<div class="documentf">
<div class="document">
<el-button
@@ -197,7 +197,7 @@
>
</div>
</div>
- </el-col>
+ </el-col> -->
<el-col :span="1.5">
<div class="documentf">
<div class="document">
@@ -400,8 +400,8 @@
<el-table-column
label="绉戝"
align="center"
- key="deptname"
- prop="deptname"
+ key="leaveldeptname"
+ prop="leaveldeptname"
width="120"
>
</el-table-column>
@@ -758,7 +758,7 @@
<el-input
style="width: 400px"
disabled
- v-model="zcform.deptname"
+ v-model="zcform.leaveldeptname"
></el-input>
</el-form-item>
<el-form-item label="鐥呭尯">
@@ -1117,7 +1117,21 @@
rules: {},
};
},
- watch: {},
+ watch: {
+ // 鍙充笅瑙掋�屽緟澶勭悊闅忚浠诲姟銆嶅崱鐗囧啀娆$偣鍑伙紙褰撳墠宸插湪鏈〉锛�
+ "$route.query": {
+ handler(newQuery) {
+ if (
+ newQuery?.month &&
+ newQuery?.fromPendingTask === "1" &&
+ this.taskQueryReady
+ ) {
+ this.applyPendingTaskQuery();
+ }
+ },
+ immediate: true,
+ },
+ },
created() {
this.serviceState = store.getters.serviceState;
this.checkboxlist = store.getters.checkboxlist;
@@ -1136,7 +1150,9 @@
value: dept.districtCode,
};
});
- if (this.errtype) {
+ if (this.applyPendingTaskQuery()) {
+ // 鍙充笅瑙掋�屽緟澶勭悊闅忚浠诲姟銆嶅崱鐗囪烦杞細宸叉寜骞存湀 + 寰呴殢璁挎潯浠舵煡璇�
+ } else if (this.errtype) {
this.toleadExport(2);
} else {
this.getList(1);
@@ -1144,8 +1160,13 @@
this.getConfigKey("sys.user.initPassword").then((response) => {
this.initPassword = response.msg;
});
+ // created 鍒濆鍖栧畬鎴愶紝涔嬪悗璺敱 query 鍙樺寲鎵嶆寜鍗$墖鏉′欢閲嶆柊鏌ヨ
+ this.taskQueryReady = true;
},
activated() {
+ if (this.applyPendingTaskQuery()) {
+ return;
+ }
this.getList(1);
},
methods: {
@@ -1227,8 +1248,10 @@
this.getList(1);
},
onthatday() {
- 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() {
@@ -1236,13 +1259,12 @@
return now.toISOString().slice(0, 10); // 鎴彇鍓�10涓瓧绗︼紝鍗� YYYY-MM-DD
},
buidegetTasklist(type) {
- 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.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(
@@ -1254,7 +1276,7 @@
pageSize: 10,
leavehospitaldistrictcodes:
this.topqueryParams.leavehospitaldistrictcodes,
- sendstates: [2, 3],
+ sendstateView: 1,
leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
};
buidegetTasklist(obj).then((response) => {
@@ -1349,6 +1371,60 @@
};
this.resetForm("form");
},
+ /**
+ * 鍙充笅瑙掋�屽緟澶勭悊闅忚浠诲姟銆嶅崱鐗囩偣鍑绘暟瀛楄烦杞繃鏉ワ細
+ * 鎸夊嚭闄㈠勾鏈� + 寰呴殢璁匡紙sendstate 1/2/3/5/7锛�+ 鍑洪櫌婊� 7 澶� 杩囨护锛屽彛寰勪笌鍗$墖涓�鑷�
+ * @returns {boolean} 鏄惁宸叉寜鍗$墖鏉′欢鍙戣捣鏌ヨ
+ */
+ applyPendingTaskQuery() {
+ const query = this.$route.query || {};
+ if (!query.month || query.fromPendingTask !== "1") {
+ return false;
+ }
+ // 椤甸潰琚� keep-alive 澶嶇敤鏃朵細閲嶅瑙﹀彂 activated锛屽悓涓�娆$偣鍑诲彧澶勭悊涓�娆�
+ if (this.pendingTaskToken && this.pendingTaskToken === query._t) {
+ return false;
+ }
+ this.pendingTaskToken = query._t;
+
+ const month = String(query.month);
+ const serviceType = Number(query.serviceType) === 3 ? 3 : 2;
+ this.errtype = undefined;
+ const start = month + "-01";
+ let end = this.pendingTaskMonthEnd(month);
+ // 鏈堝垵 7 澶╁唴锛�"浠婂ぉ-7澶�" 浼氭棭浜庢湀鍒濓紝鍏滃簳鎴愭湀鍒濓紝閬垮厤鏃ユ湡鍖洪棿鍊掓寕
+ if (end < start) {
+ end = start;
+ }
+ this.dateRange = [start, end];
+ this.topqueryParams.serviceType = serviceType;
+ this.topqueryParams.sendstateView = 1;
+ this.topqueryParams.sendstate = null;
+ // 鍗$墖缁熻鐨勬槸鍏ㄩ儴寰呴殢璁夸换鍔★紙涓嶅尯鍒嗛杞�/澶嶈瘖锛夛紝鍒楄〃杩欓噷鍚屾鏀惧紑
+ this.topqueryParams.visitCount = null;
+ this.topqueryParams.pageNum = 1;
+ this.handleQuery(1);
+ return true;
+ },
+ /**
+ * 鍗$墖鍙e緞鐨勬湀浠界粨鏉熸棩锛�
+ * 褰撴湀鍙粺璁″嚭闄㈡弧 7 澶╃殑锛屾墍浠ュ彇銆屼粖澶� - 7 澶┿�嶏紱鍘嗗彶鏈堜唤鍙栧綋鏈堟渶鍚庝竴澶�
+ */
+ pendingTaskMonthEnd(month) {
+ const parts = String(month).split("-");
+ const year = Number(parts[0]);
+ const mon = Number(parts[1]);
+ const now = new Date();
+ let date;
+ if (year === now.getFullYear() && mon === now.getMonth() + 1) {
+ date = new Date(year, mon - 1, now.getDate() - 7);
+ } else {
+ date = new Date(year, mon, 0);
+ }
+ const mm = String(date.getMonth() + 1).padStart(2, "0");
+ const dd = String(date.getDate()).padStart(2, "0");
+ return date.getFullYear() + "-" + mm + "-" + dd;
+ },
/** 鎼滅储鎸夐挳鎿嶄綔 */
handleQuery(refresh) {
if (this.topqueryParams.searchscope == 3) {
@@ -1418,10 +1494,12 @@
resetQuery() {
this.dateRange = [];
this.dateRangefs = [];
+ this.serviceStatusValue = 10;
+
this.topqueryParams = {
pageNum: 1,
pageSize: 10,
- sendstateView:2,
+ sendstateView:1,
sort: 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
serviceType: 3,
searchscope: 3,
--
Gitblit v1.9.3