From 741805d8daa2d2baa0b6b75bc1724488baf9c6bc Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期一, 15 六月 2026 14:55:10 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/zbAgain/index.vue | 315
src/api/AiCentre/Qtemplate.js | 7
src/views/patient/patient/index.vue | 25
src/views/patient/subsequent/index.vue | 265
src/views/followvisit/zysatisfaction/index.vue | 233
src/views/system/ruleconfig/index.vue | 656 ++
src/views/patient/propaganda/Missionotice.vue | 2
src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue | 1
随访通用(需同步最新状态).zip | 0
src/components/CallButton/index.vue | 528 +
src/views/followvisit/discharge/outpatientService.vue | 312
src/components/StatisticsCards/index.vue | 271 +
src/views/Satisfaction/diseaseStatistics/components/SecondFollowUp.vue | 1424 ++++++
src/views/followvisit/technology/index.vue | 268
src/views/patient/physical/index.vue | 266
src/api/AiCentre/SingleTask.js | 33
src/views/followvisit/Tracking/index.vue | 242
src/views/followvisit/OutpatientAgain/index.vue | 333
src/views/Satisfaction/diseaseStatistics/index.vue | 569 ++
src/views/sfstatistics/percentage/components/DetailDialog.vue | 298
src/views/Satisfaction/sfstatistics/components/components/TopicDialog.vue | 321
src/views/Satisfaction/diseaseStatistics/components/styles.scss | 90
src/views/patient/patient/profile/index.vue | 2
src/views/followvisit/beHospitalized/publicity.vue | 6
src/components/OptionalForm/index.vue | 118
src/views/followvisit/outpatient/index.vue | 264
src/views/patient/patient/physical.vue | 3
dist.zip | 0
src/views/Satisfaction/diseaseStatistics/components/ChartDialog.vue | 579 ++
src/views/patient/patient/outpatient.vue | 7
src/views/Satisfaction/sfstatistics/components/visitStatistics.vue | 1
src/views/patient/propaganda/QuestionnaireTask.vue | 120
src/views/followvisit/mzsatisfaction/index.vue | 228
src/views/patient/propaganda/index.vue | 6
src/views/patient/patient/ExternalPatient.vue | 21
src/views/followvisit/record/detailpage/index.vue | 157
src/views/Satisfaction/diseaseStatistics/components/ContinuedCare.vue | 633 ++
src/views/Satisfaction/diseaseStatistics/components/DetailDialog.vue | 302 +
src/views/outsideChainwtnew.vue | 76
src/views/followvisit/complaint/index.vue | 344
src/api/system/user.js | 8
src/views/followvisit/SpecificDisease/index.vue | 193
src/views/followvisit/again/index.vue | 379
src/views/followvisit/operation/index.vue | 250
src/views/followvisit/beHospitalized/followUp.vue | 311 +
src/views/patient/questionnaire/index.vue | 195
src/views/Satisfaction/diseaseStatistics/components/FirstFollowUp.vue | 1511 ++++++
src/views/Satisfaction/diseaseStatistics/components/TimelyRateDialog.vue | 249 +
src/views/followvisit/record/index.vue | 188
src/views/followvisit/Continue/index.vue | 239
src/views/followvisit/HistoricalFollow/index.vue | 185
src/views/patient/shadow/index.vue | 193
src/views/patient/propaganda/particty.vue | 130
src/views/followvisit/discharge/index.vue | 367
54 files changed, 11,007 insertions(+), 2,717 deletions(-)
diff --git a/dist.zip b/dist.zip
index a8843f1..b42bd7e 100644
--- a/dist.zip
+++ b/dist.zip
Binary files differ
diff --git a/src/api/AiCentre/Qtemplate.js b/src/api/AiCentre/Qtemplate.js
index 3c5e873..454c72f 100644
--- a/src/api/AiCentre/Qtemplate.js
+++ b/src/api/AiCentre/Qtemplate.js
@@ -47,6 +47,13 @@
method: "get",
});
}
+// 鏌ョ湅闂嵎榛樿濉姤鏉冮檺
+export function getconfigKey(Id) {
+ return request({
+ url: "/system/config/configKey/" + Id,
+ method: "get",
+ });
+}
// 鏂板鎴栦慨鏀归棶鍗锋ā鏉胯鎯�
export function compileQtemplate(data) {
return request({
diff --git a/src/api/AiCentre/SingleTask.js b/src/api/AiCentre/SingleTask.js
index 379812f..0acb38f 100644
--- a/src/api/AiCentre/SingleTask.js
+++ b/src/api/AiCentre/SingleTask.js
@@ -86,6 +86,37 @@
data: data,
});
}
+// 浠诲姟瑙勫垯鍒犻櫎
+
+export function deltaskrule(taskid) {
+ return request({
+ url: "/smartor/taskrule/remove/" + taskid,
+ method: "get",
+ });
+}
+// 浠诲姟瑙勫垯鏌ヨ
+export function taskrulelist(data) {
+ return request({
+ url: "/smartor/taskrule/list",
+ method: "post",
+ data: data,
+ });
+}
+// 浠诲姟瑙勫垯鏂板
+export function addtaskrule(data) {
+ return request({
+ url: "/smartor/taskrule/add",
+ method: "post",
+ data: data,
+ });
+} // 浠诲姟瑙勫垯淇敼
+export function edittaskrule(data) {
+ return request({
+ url: "/smartor/taskrule/edit",
+ method: "post",
+ data: data,
+ });
+}
// 鏌ヨ浠诲姟璇︽儏
export function getTaskInfo(data) {
@@ -139,7 +170,7 @@
// 鑾峰彇璇煶浠诲姟妯℃澘璇︽儏
export function selectInfoByCondition(data) {
return request({
- url: "/smartor/ivrTaskTemplate/selectInfoByCondition",
+ url: "/smartor/ivrTaskTemplate/selectInfoByCondition",
method: "post",
data: data,
});
diff --git a/src/api/system/user.js b/src/api/system/user.js
index da1bec6..97a0648 100644
--- a/src/api/system/user.js
+++ b/src/api/system/user.js
@@ -94,6 +94,14 @@
data: data,
});
}
+// 涓撶梾缁熻鏌ヨ
+export function getSpecialSfStatistics(data) {
+ return request({
+ url: "/smartor/serviceSubtask/getSpecialSfStatistics",
+ method: "post",
+ data: data,
+ });
+}
// 婊℃剰搴︾粺璁�
export function getSfStatisticsJoy(data) {
return request({
diff --git a/src/components/CallButton/index.vue b/src/components/CallButton/index.vue
index d44aee1..d95fb2f 100644
--- a/src/components/CallButton/index.vue
+++ b/src/components/CallButton/index.vue
@@ -2,6 +2,9 @@
<div class="call-container">
<div class="sip-status" :class="sipStatusClass">
SIP鐘舵��: {{ sipStatus }}
+ <span v-if="reconnectCount > 0" class="reconnect-info">
+ (閲嶈繛: {{ reconnectCount }}娆�)
+ </span>
</div>
<!-- 鐘舵�佹樉绀� -->
@@ -16,13 +19,24 @@
{
calling: isCalling,
registering: isRegistering,
+ reconnecting: isReconnecting,
},
]"
@click="startCall"
:disabled="isButtonDisabled"
>
- <i v-if="isRegistering" class="el-icon-loading"></i>
+ <i v-if="isRegistering || isReconnecting" class="el-icon-loading"></i>
{{ callButtonText }}
+ </button>
+
+ <!-- 鎵嬪姩閲嶈繛鎸夐挳 -->
+ <button
+ v-if="showManualReconnect"
+ class="reconnect-btn"
+ @click="manualReconnect"
+ :disabled="isRegistering"
+ >
+ 鎵嬪姩閲嶈繛
</button>
<!-- 鎸傛柇鎸夐挳 -->
@@ -45,24 +59,28 @@
},
},
data() {
- const randomNum = Math.floor(Math.random() * 20) + 1000; // 瀹氫箟闅忔満鍒嗘満鍙�
+ const randomNum = Math.floor(Math.random() * 20) + 1000;
return {
isCalling: false,
- isRegistering: true, // 鍒濆涓烘敞鍐屼腑鐘舵��
+ isRegistering: true,
+ isReconnecting: false, // 娣诲姞閲嶈繛涓姸鎬�
randomNum: randomNum,
randomID: null,
orgname: localStorage.getItem("orgname"),
- callStatus: "idle", // idle, calling, connected, ended
+ callStatus: "idle",
sipStatus: "鏈繛鎺�",
sipStatusClass: "status-disconnected",
+ reconnectCount: 0, // 閲嶈繛娆℃暟
+ lastActivityTime: null, // 鏈�鍚庢椿鍔ㄦ椂闂�
+ heartbeatTimer: null, // 蹇冭烦瀹氭椂鍣�
+ reconnectTimer: null, // 閲嶈繛瀹氭椂鍣�
+ maxReconnectAttempts: 5, // 鏈�澶ч噸杩炲皾璇曟鏁�
+ reconnectDelay: 5000, // 閲嶈繛寤惰繜(ms)
sipConfig: {
- // 绉婚櫎纭紪鐮佺殑wsUrl鍜宒omain
wsUrl: "",
sipUri: "",
- password: "Smartor@2023", //涓芥按
- // password: "heskj@1234",//甯備竴
+ password: "Smartor@2023",
displayName: "Web 灏忛緳",
- // realm: "9.208.5.18:8090",
},
};
},
@@ -78,7 +96,6 @@
},
countdownText() {
if (this.sipStatus !== "宸叉敞鍐�") return "";
-
const { canCall, reason } = sipService.canMakeCall();
if (!canCall && reason.includes("绛夊緟")) {
return reason;
@@ -87,15 +104,27 @@
},
isButtonDisabled() {
return (
- this.isCalling || this.sipStatus !== "宸叉敞鍐�" || this.isRegistering
+ this.isCalling ||
+ this.sipStatus !== "宸叉敞鍐�" ||
+ this.isRegistering ||
+ this.isReconnecting
);
},
callButtonText() {
if (this.isRegistering) return "娉ㄥ唽涓�...";
+ if (this.isReconnecting) return "閲嶈繛涓�...";
return this.isCalling ? "閫氳瘽涓�..." : "涓�閿懠鍙�";
},
callStatusClass() {
return `status-${this.callStatus}`;
+ },
+ showManualReconnect() {
+ return (
+ !this.isCalling &&
+ !this.isRegistering &&
+ this.sipStatus !== "宸叉敞鍐�" &&
+ this.sipStatus !== "杩炴帴涓�"
+ );
},
},
created() {
@@ -107,8 +136,6 @@
} else {
this.sipConfig.password = "Smartor@2023";
}
-
- // CallgetList();
},
async mounted() {
@@ -117,44 +144,198 @@
return;
}
await this.CallgetList();
- this.isRegistering = true; // 寮�濮嬫敞鍐�
- sipService.init(this.sipConfig);
- // 璁剧疆鐘舵�佸洖璋�
- sipService.onStatusChange = (status) => {
- this.sipStatus = status.text;
- this.sipStatusClass = `status-${status.type}`;
- // 娉ㄥ唽鎴愬姛鎴栧け璐ユ椂鍙栨秷鍔犺浇鐘舵��
- if (status.type === "registered" || status.type === "failed") {
- this.isRegistering = false;
- }
- // 娉ㄥ唽鎴愬姛
- if (status.type === "registered") {
- this.startCallsetState();
- }
- // 澶勭悊娉ㄥ唽澶辫触鍜屾柇寮�杩炴帴鎯呭喌
- if (status.type === "failed" || status.type === "disconnected") {
- this.overCallsetState(); // 閲婃斁鍒嗘満鍙�
- this.isRegistering = false;
- }
- };
-
- // 鐩戝惉閫氳瘽鐘舵�佸彉鍖�
- sipService.onCallStatusChange = (status) => {
- this.callStatus = status.type;
- this.isCalling = status.type === "calling" || status.type === "connected";
-
- // 閫氱煡鐖剁粍浠堕�氳瘽鐘舵�佸彉鍖�
- this.$emit("call-status-change", status);
- };
- // 娣诲姞娉ㄥ唽瓒呮椂澶勭悊
- setTimeout(() => {
- if (this.isRegistering && this.sipStatus !== "宸叉敞鍐�") {
- this.isRegistering = false;
- this.$message.warning("SIP娉ㄥ唽瓒呮椂锛岃妫�鏌ョ綉缁滆繛鎺�");
- }
- }, 10000); // 10绉掕秴鏃�
+ this.isRegistering = true;
+ this.initSipService();
+ this.setupHeartbeat();
},
methods: {
+ async initSipService() {
+ try {
+ // 鍒濆鍖杝ipService
+ sipService.init(this.sipConfig);
+
+ // 璁剧疆鐘舵�佸洖璋�
+ sipService.onStatusChange = (status) => {
+ this.sipStatus = status.text;
+ this.sipStatusClass = `status-${status.type}`;
+
+ // 澶勭悊鍚勭鐘舵��
+ if (status.type === "registered") {
+ this.handleRegistered();
+ } else if (status.type === "failed" || status.type === "disconnected") {
+ this.handleDisconnected();
+ } else if (status.type === "connecting") {
+ this.handleConnecting();
+ }
+ };
+
+ // 鐩戝惉閫氳瘽鐘舵�佸彉鍖�
+ sipService.onCallStatusChange = (status) => {
+ this.callStatus = status.type;
+ this.isCalling = status.type === "calling" || status.type === "connected";
+ this.updateLastActivityTime(); // 閫氳瘽鐘舵�佸彉鍖栨椂鏇存柊娲诲姩鏃堕棿
+
+ this.$emit("call-status-change", status);
+ };
+
+ // 璁剧疆瓒呮椂澶勭悊
+ this.setupRegistrationTimeout();
+
+ } catch (error) {
+ console.error("SIP鏈嶅姟鍒濆鍖栧け璐�:", error);
+ this.handleDisconnected();
+ }
+ },
+
+ handleRegistered() {
+ console.log("SIP娉ㄥ唽鎴愬姛");
+ this.isRegistering = false;
+ this.isReconnecting = false;
+ this.reconnectCount = 0; // 閲嶇疆閲嶈繛璁℃暟
+ this.updateLastActivityTime();
+ this.startCallsetState();
+
+ // 娓呴櫎閲嶈繛瀹氭椂鍣�
+ if (this.reconnectTimer) {
+ clearTimeout(this.reconnectTimer);
+ this.reconnectTimer = null;
+ }
+ },
+
+ handleDisconnected() {
+ console.log("SIP杩炴帴鏂紑");
+ this.isRegistering = false;
+ this.overCallsetState();
+
+ // 濡傛灉涓嶆槸閫氳瘽涓柇寮�锛屽皾璇曢噸杩�
+ if (!this.isCalling) {
+ this.scheduleReconnect();
+ }
+ },
+
+ handleConnecting() {
+ this.isReconnecting = true;
+ },
+
+ setupRegistrationTimeout() {
+ setTimeout(() => {
+ if (this.isRegistering && this.sipStatus !== "宸叉敞鍐�") {
+ this.isRegistering = false;
+ this.$message.warning("SIP娉ㄥ唽瓒呮椂锛屾鍦ㄥ皾璇曢噸杩�...");
+ this.scheduleReconnect();
+ }
+ }, 10000);
+ },
+
+ // 璁剧疆蹇冭烦妫�娴�
+ setupHeartbeat() {
+ this.heartbeatTimer = setInterval(() => {
+ this.checkConnection();
+ }, 60000); // 姣�30绉掓鏌ヤ竴娆¤繛鎺�
+ },
+
+ // 妫�鏌ヨ繛鎺ョ姸鎬�
+ async checkConnection() {
+ // 濡傛灉姝e湪娉ㄥ唽銆侀噸杩炴垨閫氳瘽涓紝涓嶆鏌�
+ if (this.isRegistering || this.isReconnecting || this.isCalling) {
+ return;
+ }
+
+ // 妫�鏌IP杩炴帴鐘舵��
+ if (sipService && sipService.ua) {
+ const isConnected = sipService.ua.isConnected();
+ const isRegistered = sipService.ua.isRegistered();
+
+ if (!isConnected || !isRegistered) {
+ console.log("蹇冭烦妫�娴�: 杩炴帴寮傚父锛屽皾璇曢噸杩�");
+ await this.reconnectSip();
+ } else {
+ console.log("蹇冭烦妫�娴�: 杩炴帴姝e父");
+ this.updateLastActivityTime();
+ }
+ } else {
+ console.log("蹇冭烦妫�娴�: UA涓嶅瓨鍦紝灏濊瘯閲嶆柊鍒濆鍖�");
+ await this.reconnectSip();
+ }
+ },
+
+ // 璁″垝閲嶈繛
+ scheduleReconnect() {
+ if (this.reconnectTimer || this.isReconnecting) {
+ return;
+ }
+
+ if (this.reconnectCount >= this.maxReconnectAttempts) {
+ console.log("杈惧埌鏈�澶ч噸杩炴鏁帮紝鍋滄閲嶈繛");
+ this.$message.error("SIP杩炴帴澶辫触锛岃鍒锋柊椤甸潰閲嶈瘯");
+ return;
+ }
+
+ this.reconnectCount++;
+ const delay = Math.min(this.reconnectDelay * Math.pow(1.5, this.reconnectCount - 1), 30000);
+
+ console.log(`璁″垝鍦�${delay}ms鍚庨噸杩烇紝绗�${this.reconnectCount}娆″皾璇昤);
+
+ this.reconnectTimer = setTimeout(() => {
+ this.reconnectSip();
+ }, delay);
+ },
+
+ // 閲嶆柊杩炴帴SIP
+ async reconnectSip() {
+ if (this.isReconnecting || this.isRegistering) {
+ return;
+ }
+
+ console.log("寮�濮嬮噸杩濻IP鏈嶅姟...");
+ this.isReconnecting = true;
+
+ try {
+ // 娓呯悊鐜版湁杩炴帴
+ this.cleanupSipConnection();
+
+ // 绛夊緟涓�娈垫椂闂�
+ await new Promise(resolve => setTimeout(resolve, 1000));
+
+ // 閲嶆柊鍒濆鍖�
+ await this.CallgetList(); // 閲嶆柊鑾峰彇鍒嗘満鍙�
+ this.initSipService();
+
+ } catch (error) {
+ console.error("閲嶈繛澶辫触:", error);
+ this.isReconnecting = false;
+ this.scheduleReconnect(); // 澶辫触鍚庣户缁噸璇�
+ } finally {
+ if (this.reconnectTimer) {
+ clearTimeout(this.reconnectTimer);
+ this.reconnectTimer = null;
+ }
+ }
+ },
+
+ // 娓呯悊SIP杩炴帴
+ cleanupSipConnection() {
+ if (sipService && sipService.ua) {
+ try {
+ sipService.ua.stop();
+ sipService.ua.unregister();
+ } catch (e) {
+ console.warn("娓呯悊SIP杩炴帴鏃跺嚭閿�:", e);
+ }
+ }
+ },
+
+ // 鎵嬪姩閲嶈繛
+ async manualReconnect() {
+ this.reconnectCount = 0; // 閲嶇疆閲嶈繛璁℃暟
+ await this.reconnectSip();
+ },
+
+ // 鏇存柊鏈�鍚庢椿鍔ㄦ椂闂�
+ updateLastActivityTime() {
+ this.lastActivityTime = Date.now();
+ },
+
async startCall() {
if (!this.phoneNumber) {
this.$message.error("璇疯緭鍏ョ數璇濆彿鐮�");
@@ -165,46 +346,43 @@
// 鍏堟鏌ユ槸鍚﹀彲浠ュ懠鍙�
const { canCall, reason } = sipService.canMakeCall();
if (!canCall) {
- const { canCall, reason } = sipService.canMakeCall();
- //this.$message.warning(reason);
- //return;
+ // 鍙��: 鍙互鏄剧ず鎻愮ず
}
+
this.callStatus = "calling";
this.isCalling = true;
console.log("寮�濮嬪懠鍙細", sipService);
await sipService.makeCall(this.phoneNumber);
} catch (error) {
- let registrationTime = Date.now(); // 璁板綍娉ㄩ攢鎴愬姛鏃堕棿
- console.log(registrationTime, "鍛煎彨澶辫触鏃堕棿");
console.error("鍛煎彨澶辫触1:", error);
- // this.callStatus = "ended";
- // this.isCalling = false;
- //this.$message.error(`鍛煎彨澶辫触: ${error.message}`);
+
try {
- // 鍏堟鏌ユ槸鍚﹀彲浠ュ懠鍙�
+ // 灏濊瘯鍔�0鍐嶆鍛煎彨
const { canCall, reason } = sipService.canMakeCall();
if (!canCall) {
- const { canCall, reason } = sipService.canMakeCall();
+ // 鍙�夊鐞�
}
this.callStatus = "calling";
this.isCalling = true;
- console.log("寮�濮嬪懠鍙細", sipService);
+ console.log("灏濊瘯鍔�0鍐嶆鍛煎彨锛�", sipService);
await sipService.makeCall("0" + this.phoneNumber);
} catch (error) {
this.callStatus = "ended";
this.isCalling = false;
+ this.$message.error("鍛煎彨澶辫触锛岃妫�鏌ョ綉缁滄垨鍙风爜");
}
}
},
+
// 鏌ヨ鍙敤鍒嗘満鍙�
async CallgetList() {
try {
const res = await CallgetList();
this.randomNum = res.data[0].tel;
this.randomID = res.data[0].id;
- // 鍔ㄦ�佽缃畇ipUri锛屽煙鍚嶉儴鍒嗕細鍦╯ipService涓姩鎬佸鐞�
+
const orgName = localStorage.getItem("orgname");
if (orgName == "涓芥按甯備腑鍖婚櫌") {
this.sipConfig.sipUri = `${this.randomNum}@192.168.10.124`;
@@ -218,9 +396,10 @@
}
} catch (error) {
console.error("鑾峰彇鍒嗘満鍙峰け璐�:", error);
- // this.updateStatus("failed", "鑾峰彇鍒嗘満鍙峰け璐�");
+ throw error; // 鎶涘嚭閿欒浠ヤ究涓婂眰澶勭悊
}
},
+
async startCallsetState() {
try {
await CallsetState({ id: this.randomID, state: 1 });
@@ -240,12 +419,25 @@
console.error("閲婃斁鍒嗘満鍙峰け璐�:", error);
}
},
+
endCall() {
sipService.endCall();
this.callStatus = "ended";
this.isCalling = false;
},
+
cleanupResources() {
+ // 娓呴櫎鎵�鏈夊畾鏃跺櫒
+ if (this.heartbeatTimer) {
+ clearInterval(this.heartbeatTimer);
+ this.heartbeatTimer = null;
+ }
+
+ if (this.reconnectTimer) {
+ clearTimeout(this.reconnectTimer);
+ this.reconnectTimer = null;
+ }
+
// 缁撴潫閫氳瘽
if (this.isCalling) {
sipService.endCall();
@@ -255,19 +447,17 @@
this.overCallsetState();
// 鏂紑 SIP 杩炴帴
- if (sipService.ua) {
- sipService.ua.stop();
- }
+ this.cleanupSipConnection();
},
},
beforeUnmount() {
- // 缁勪欢閿�姣佹椂纭繚閲婃斁璧勬簮
this.cleanupResources();
},
};
</script>
<style scoped>
+/* 淇濇寔鍘熸湁鏍峰紡涓嶅彉锛屽彧娣诲姞鏂版牱寮� */
.call-container {
display: flex;
flex-direction: column;
@@ -279,25 +469,93 @@
border-radius: 8px;
}
-input {
- padding: 8px;
- border: 1px solid #ccc;
- border-radius: 4px;
+.reconnect-info {
+ font-size: 12px;
+ color: #666;
+ margin-left: 5px;
}
-.call-btn {
+.reconnect-btn {
+ padding: 8px 12px;
+ background-color: #ff9800;
+ color: white;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+ font-size: 12px;
+}
+
+.reconnect-btn:hover:not(:disabled) {
+ background-color: #f57c00;
+}
+
+.reconnect-btn:disabled {
+ background-color: #cccccc;
+ cursor: not-allowed;
+}
+
+.call-btn.reconnecting {
+ background-color: #ff9800;
+}
+
+.call-btn:hover:not(:disabled) {
+ background-color: #45a049;
+}
+
+.call-btn:disabled {
+ background-color: #cccccc;
+ cursor: not-allowed;
+}
+
+.call-btn.calling {
+ background-color: #2196f3;
+}
+
+.call-btn.registering,
+.call-btn.reconnecting {
+ position: relative;
+}
+
+.end-call-btn {
padding: 10px;
- background-color: #4caf50;
+ background-color: #f44336;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
+
+.end-call-btn:hover {
+ background-color: #d32f2f;
+}
+
+/* 鐘舵�佹牱寮忎繚鎸佷笉鍙� */
+.sip-status,
.call-status {
padding: 8px;
- margin: 10px 0;
+ margin-bottom: 10px;
border-radius: 4px;
text-align: center;
+}
+
+.status-disconnected {
+ background-color: #ffebee;
+ color: #c62828;
+}
+
+.status-connecting {
+ background-color: #fff8e1;
+ color: #ff8f00;
+}
+
+.status-registered {
+ background-color: #e8f5e9;
+ color: #2e7d32;
+}
+
+.status-failed {
+ background-color: #ffebee;
+ color: #c62828;
}
.status-idle {
@@ -316,132 +574,6 @@
}
.status-ended {
- background-color: #ffebee;
- color: #c62828;
-}
-
-/* 鍘熸湁鏍峰紡淇濇寔涓嶅彉 */
-.call-container {
- display: flex;
- flex-direction: column;
- gap: 10px;
- max-width: 300px;
- margin: 0 auto;
- padding: 20px;
- border: 1px solid #eee;
- border-radius: 8px;
-}
-
-.call-btn {
- padding: 10px;
- background-color: #4caf50;
- color: white;
- border: none;
- border-radius: 4px;
- cursor: pointer;
-}
-
-.call-btn:hover:not(:disabled) {
- background-color: #45a049;
-}
-
-.call-btn:disabled {
- background-color: #cccccc;
- cursor: not-allowed;
-}
-
-.call-btn.calling {
- background-color: #2196f3;
-}
-
-.end-call-btn {
- padding: 10px;
- background-color: #f44336;
- color: white;
- border: none;
- border-radius: 4px;
- cursor: pointer;
-}
-
-.end-call-btn:hover {
- background-color: #d32f2f;
-}
-
-.sip-status {
- padding: 8px;
- margin-bottom: 10px;
- border-radius: 4px;
- text-align: center;
-}
-
-.status-disconnected {
- background-color: #ffebee;
- color: #c62828;
-}
-
-.status-connecting {
- background-color: #fff8e1;
- color: #ff8f00;
-}
-
-.status-registered {
- background-color: #e8f5e9;
- color: #2e7d32;
-}
-
-.status-failed {
- background-color: #ffebee;
- color: #c62828;
-}
-.call-btn:hover {
- background-color: #45a049;
-}
-
-.call-btn.calling {
- background-color: #2196f3;
-}
-
-.end-call-btn {
- padding: 10px;
- background-color: #f44336;
- color: white;
- border: none;
- border-radius: 4px;
- cursor: pointer;
-}
-
-.end-call-btn:hover {
- background-color: #d32f2f;
-}
-
-.call-status {
- margin-top: 10px;
- font-size: 14px;
- color: #666;
-}
-.sip-status {
- padding: 8px;
- margin-bottom: 10px;
- border-radius: 4px;
- text-align: center;
-}
-
-.status-disconnected {
- background-color: #ffebee;
- color: #c62828;
-}
-
-.status-connecting {
- background-color: #fff8e1;
- color: #ff8f00;
-}
-
-.status-registered {
- background-color: #e8f5e9;
- color: #2e7d32;
-}
-
-.status-failed {
background-color: #ffebee;
color: #c62828;
}
diff --git a/src/components/OptionalForm/index.vue b/src/components/OptionalForm/index.vue
index 62bb525..4fa2ac1 100644
--- a/src/components/OptionalForm/index.vue
+++ b/src/components/OptionalForm/index.vue
@@ -66,9 +66,16 @@
:data="donorchargeList"
tooltip-effect="dark"
style="width: 100%"
+ @select="handleSelect"
+ @select-all="handleSelectAll"
@selection-change="handleSelectionChange"
>
- <el-table-column class="checkall" type="selection" width="55">
+ <el-table-column
+ class="checkall"
+ type="selection"
+ width="55"
+ :selectable="checkSelectable"
+ >
</el-table-column>
<el-table-column
prop="icdid"
@@ -121,6 +128,8 @@
},
donorchargeList: [],
donorchargeanlList: [], //妗堜緥鍒楄〃
+ // 鏂板锛氭槸鍚︽鍦ㄥ鐞嗗叏閫夋搷浣滅殑鏍囧織
+ isSelectAllProcessing: false,
};
},
@@ -202,41 +211,83 @@
this.Restorecheck();
});
},
- // 澶氶�夋閫変腑鏁版嵁
- handleSelectionChange(selection) {
- if (this.decision) return;
- // 鍒ゆ柇鏄惁鏈夊垹闄�
- if (this.multipleSelection.length <= selection.length) {
- this.multipleSelection = selection;
+
+ // 鏂板锛氬鐞嗗崟涓�夋嫨
+ handleSelect(selection, row) {
+ if (this.isSelectAllProcessing) return;
+
+ const isSelected = selection.includes(row);
+ this.handleItemSelection(row, isSelected);
+ },
+
+ // 鏂板锛氬鐞嗗叏閫�/鍏ㄤ笉閫�
+ handleSelectAll(selection) {
+ this.isSelectAllProcessing = true;
+
+ if (selection.length === 0) {
+ // 鍏ㄤ笉閫夛細绉婚櫎褰撳墠椤垫墍鏈夋暟鎹�
+ this.donorchargeList.forEach(item => {
+ this.removeFromSelections(item);
+ });
} else {
- this.multipleSelection.forEach((item) => {
- if (selection.includes(item)) {
- } else {
- if (this.multipleSelection.length == 1) {
- this.multipleSelection = [];
- } else {
- this.multipleSelection.splice(
- this.multipleSelection.indexOf(item),
- 1
- );
- }
- if (this.overallCase.length == 1) {
- this.overallCase = [];
- } else {
- this.overallCase.splice(this.overallCase.indexOf(item), 1);
- }
- }
+ // 鍏ㄩ�夛細娣诲姞褰撳墠椤垫墍鏈夋暟鎹�
+ this.donorchargeList.forEach(item => {
+ this.addToSelections(item);
});
}
- // 璧嬪�肩粰鏁翠綋閫変腑鏁扮粍
- this.multipleSelection.forEach((item) => {
- if (this.overallCase.every((obj) => obj.icdname != item.icdname)) {
- this.overallCase.push(item);
- }
+ this.$nextTick(() => {
+ this.isSelectAllProcessing = false;
});
- console.log(this.multipleSelection, "瑙﹀彂閫夋嫨鍚巑ultipleSelection");
},
+
+ // 鏂板锛氬鐞嗗崟涓」鐩殑閫夋嫨/鍙栨秷閫夋嫨
+ handleItemSelection(row, isSelected) {
+ if (isSelected) {
+ this.addToSelections(row);
+ } else {
+ this.removeFromSelections(row);
+ }
+ },
+
+ // 鏂板锛氭坊鍔犲埌閫変腑鍒楄〃
+ addToSelections(row) {
+ // 濡傛灉宸茬粡鍦ㄥ閫夋暟缁勪腑锛屼笉鍐嶆坊鍔�
+ if (this.multipleSelection.some(item => item.icdid === row.icdid)) {
+ return;
+ }
+
+ this.multipleSelection.push(row);
+
+ // 娣诲姞鍒版�绘暟缁�
+ if (this.overallCase.every(item => item.icdid !== row.icdid)) {
+ this.overallCase.push({...row});
+ }
+ },
+
+ // 鏂板锛氫粠閫変腑鍒楄〃绉婚櫎
+ removeFromSelections(row) {
+ const index = this.multipleSelection.findIndex(item => item.icdid === row.icdid);
+ if (index > -1) {
+ this.multipleSelection.splice(index, 1);
+ }
+
+ // 浠庢�绘暟缁勪腑绉婚櫎
+ const overallIndex = this.overallCase.findIndex(item => item.icdid === row.icdid);
+ if (overallIndex > -1) {
+ this.overallCase.splice(overallIndex, 1);
+ }
+ },
+
+ // 淇濈暀鍘熸湁鐨剆election-change浜嬩欢澶勭悊锛屼絾绠�鍖栭�昏緫
+ handleSelectionChange(selection) {
+ // 濡傛灉姝e湪澶勭悊鍏ㄩ�夋搷浣滐紝涓嶆墽琛岃繖閲岀殑閫昏緫
+ if (this.isSelectAllProcessing) return;
+
+ // 鍘熸湁鐨勫鏉傞�昏緫鍙互淇濈暀锛屼絾涓轰簡娓呮櫚锛屽缓璁娇鐢ㄤ笂闈㈢殑鏂版柟娉�
+ console.log('selection changed:', selection.length);
+ },
+
// 鍒囨崲椤靛悗鎭㈠閫変腑
Restorecheck() {
console.log(this.overallCase, "this.overallCase");
@@ -268,6 +319,11 @@
AddDispatchpatients() {
this.$emit("addoption");
},
+
+ // 鏂板锛氭鏌ユ槸鍚﹀彲浠ラ�夋嫨锛堝彲閫夛紝鐢ㄤ簬鎺у埗鏌愪簺琛屼笉鍙�夛級
+ checkSelectable(row, index) {
+ return true; // 鎵�鏈夎閮藉彲閫�
+ }
},
};
</script>
@@ -316,7 +372,7 @@
}
}
::v-deep.el-table .el-table__header th:first-child .el-checkbox {
- display: none;
+ display: inline-block; /* 淇敼杩欓噷锛屾樉绀哄叏閫夊閫夋 */
}
.el-tag + .el-tag {
margin-left: 10px;
diff --git a/src/components/StatisticsCards/index.vue b/src/components/StatisticsCards/index.vue
new file mode 100644
index 0000000..4ffa324
--- /dev/null
+++ b/src/components/StatisticsCards/index.vue
@@ -0,0 +1,271 @@
+<template>
+ <div class="statistics-cards" style="margin-bottom: 20px">
+ <el-row :gutter="16">
+ <el-col
+ v-for="(item, index) in mergedCardList"
+ :key="index"
+ :xs="12"
+ :sm="8"
+ :md="colSpan"
+ :lg="colSpan"
+ >
+ <el-tooltip
+ :content="getTooltipContent(item.name)"
+ placement="top"
+ effect="light"
+ popper-class="statistics-tooltip"
+ >
+ <el-card
+ shadow="hover"
+ :body-style="item.router ? 'cursor: pointer' : 'cursor: default'"
+ :class="getCardClass(item.name)"
+ >
+ <div
+ class="card-content"
+ @click="handleCardClick(item)"
+ >
+ <div class="card-label">
+ <span class="label-text">{{ item.name }}</span>
+ </div>
+ <div class="card-value">
+ {{ item.value !== undefined && item.value !== null ? item.value : 0 }}
+ </div>
+ </div>
+ </el-card>
+ </el-tooltip>
+ </el-col>
+ </el-row>
+ </div>
+</template>
+
+<script>
+export default {
+ name: "StatisticsCards",
+ props: {
+ cardlist: {
+ type: Array,
+ default: () => []
+ },
+ colSpan: {
+ type: Number,
+ default: 4
+ },
+ showExtra: {
+ type: Boolean,
+ default: true
+ },
+ ycvalue: {
+ type: Number,
+ default: 0
+ },
+ jgvalue: {
+ type: Number,
+ default: 0
+ },
+ showWarningCondition: {
+ type: Boolean,
+ default: false
+ }
+ },
+ computed: {
+ mergedCardList() {
+ let list = [...this.cardlist];
+
+ if (this.showExtra) {
+ list.push({
+ name: "寮傚父",
+ value: this.ycvalue
+ });
+ }
+
+ if (this.showWarningCondition) {
+ list.push({
+ name: "璀﹀憡",
+ value: this.jgvalue
+ });
+ }
+
+ return list;
+ }
+ },
+ methods: {
+ getCardClass(name) {
+ const classMap = {
+ "鎮h�呮湇鍔℃�婚噺": "total-card",
+ "鏃犻渶闅忚": "no-follow-card",
+ "闇�闅忚": "need-follow-card",
+ "寰呴殢璁�": "pending-card",
+ "宸插畬鎴�": "completed-card",
+ "寮傚父": "error-card",
+ "璀﹀憡": "warning-card"
+ };
+ return classMap[name] || "default-card";
+ },
+
+ getTooltipContent(name) {
+ const tooltips = {
+ "鎮h�呮湇鍔℃�婚噺": "鎮h�呮湇鍔℃�婚噺 = 鏃犻渶闅忚 + 闇�闅忚",
+ "鏃犻渶闅忚": "鏃犻渶闅忚锛氫笉闇�瑕佽繘琛岄殢璁跨殑鎮h�呮暟閲�",
+ "闇�闅忚": "闇�闅忚 = 寰呴殢璁� + 宸插畬鎴�",
+ "寰呴殢璁�": "寰呴殢璁匡細绛夊緟杩涜闅忚鐨勬偅鑰呮暟閲�",
+ "宸插畬鎴�": "宸插畬鎴愶細宸插畬鎴愰殢璁跨殑鎮h�呮暟閲�",
+ "寮傚父": "寮傚父鏁版嵁缁熻",
+ "璀﹀憡": "璀﹀憡鏁版嵁缁熻"
+ };
+ return tooltips[name] || "";
+ },
+
+ handleCardClick(item) {
+ if (item.router) {
+ this.$router.push(item.router);
+ }
+ this.$emit("card-click", item);
+ }
+ }
+};
+</script>
+
+<style scoped>
+.statistics-cards {
+ padding: 4px;
+}
+
+.card-content {
+ padding: 12px 8px;
+ transition: all 0.3s ease;
+ cursor: default;
+}
+
+.card-label {
+ margin-bottom: 10px;
+ font-size: 20px;
+ font-weight: 600;
+ color: #666;
+}
+
+.card-value {
+ text-align: center;
+ font-size: 28px;
+ font-weight: 700;
+ letter-spacing: 1px;
+ transition: all 0.3s ease;
+}
+
+/* 鎮诞鏁堟灉 - 鏁翠綋涓婄Щ+闃村奖鍔犳繁 */
+.el-card {
+ border-radius: 10px;
+ transition: all 0.3s ease;
+ border: none;
+}
+
+.el-card:hover {
+ transform: translateY(-3px);
+ box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1) !important;
+}
+
+/* 鍝嶅簲寮� */
+@media (max-width: 768px) {
+ .card-value {
+ font-size: 22px;
+ }
+ .card-content {
+ padding: 12px 8px;
+ }
+}
+</style>
+
+<style>
+/* ===== 鍗$墖鑳屾櫙鑹诧紙鍏ㄥ眬鏍峰紡锛� ===== */
+
+/* 鎮h�呮湇鍔℃�婚噺 - 娴呯传鑹� */
+.total-card .el-card__body {
+ background: #f0edff;
+ border-radius: 10px;
+}
+.total-card .card-value {
+ color: #7c5cfc;
+}
+
+/* 鏃犻渶闅忚 - 娴呯矇鑹� */
+.no-follow-card .el-card__body {
+ background: #fde8ef;
+ border-radius: 10px;
+}
+.no-follow-card .card-value {
+ color: #f06292;
+}
+
+/* 闇�闅忚 - 娴呰摑鑹� */
+.need-follow-card .el-card__body {
+ background: #e3f2fd;
+ border-radius: 10px;
+}
+.need-follow-card .card-value {
+ color: #42a5f5;
+}
+
+/* 寰呴殢璁� - 娴呮鑹� */
+.pending-card .el-card__body {
+ background: #fff3e0;
+ border-radius: 10px;
+}
+.pending-card .card-value {
+ color: #ff9800;
+}
+
+/* 宸插畬鎴� - 娴呯豢鑹� */
+.completed-card .el-card__body {
+ background: #e8f5e9;
+ border-radius: 10px;
+}
+.completed-card .card-value {
+ color: #66bb6a;
+}
+
+/* 寮傚父 - 娴呯孩鑹� */
+.error-card .el-card__body {
+ background: #fce4ec;
+ border-radius: 10px;
+}
+.error-card .card-value {
+ color: #ef5350;
+}
+
+/* 璀﹀憡 - 娴呴粍鑹� */
+.warning-card .el-card__body {
+ background: #fff8e1;
+ border-radius: 10px;
+}
+.warning-card .card-value {
+ color: #ffa726;
+}
+
+/* 榛樿鍗$墖 */
+.default-card .el-card__body {
+ background: #f5f5f5;
+ border-radius: 10px;
+}
+.default-card .card-value {
+ color: #757575;
+}
+
+/* ===== 娓呮柊鐧藉簳钃濆瓧 Tooltip ===== */
+.statistics-tooltip {
+ background: #ffffff !important;
+ color: #1976d2 !important;
+ border: 1px solid #bbdefb !important;
+ border-radius: 8px !important;
+ padding: 10px 14px !important;
+ font-size: 13px !important;
+ line-height: 1.6 !important;
+ box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15) !important;
+}
+
+.statistics-tooltip .popper__arrow {
+ border-bottom-color: #bbdefb !important;
+}
+
+.statistics-tooltip .popper__arrow::after {
+ border-bottom-color: #ffffff !important;
+}
+</style>
diff --git a/src/views/Satisfaction/diseaseStatistics/components/ChartDialog.vue b/src/views/Satisfaction/diseaseStatistics/components/ChartDialog.vue
new file mode 100644
index 0000000..4172811
--- /dev/null
+++ b/src/views/Satisfaction/diseaseStatistics/components/ChartDialog.vue
@@ -0,0 +1,579 @@
+<template>
+ <el-dialog
+ title="闅忚缁熻瓒嬪娍鍥�"
+ :visible.sync="visible"
+ width="80%"
+ :close-on-click-modal="false"
+ @close="handleClose"
+ >
+ <div class="chart-container">
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <div class="chart-title">闅忚鐘舵�佸垎甯�</div>
+ <div id="pieChart" style="width: 100%; height: 400px"></div>
+ </el-col>
+ <el-col :span="12">
+ <div class="chart-title">闅忚瓒嬪娍鍒嗘瀽</div>
+ <div id="barLineChart" style="width: 100%; height: 400px"></div>
+ </el-col>
+ </el-row>
+ </div>
+ </el-dialog>
+</template>
+
+<script>
+import * as echarts from 'echarts'
+
+export default {
+ name: 'ChartDialog',
+ props: {
+ visible: {
+ type: Boolean,
+ default: false
+ },
+ data: {
+ type: Array,
+ default: () => []
+ },
+ activeTab: {
+ type: String,
+ default: 'first'
+ }
+ },
+ data() {
+ return {
+ pieChart: null,
+ barLineChart: null
+ }
+ },
+ watch: {
+ visible(newVal) {
+ if (newVal) {
+ this.$nextTick(() => {
+ this.initCharts()
+ })
+ } else {
+ this.destroyCharts()
+ }
+ }
+ },
+ mounted() {
+ if (this.visible) {
+ this.$nextTick(() => {
+ this.initCharts()
+ })
+ }
+ },
+ beforeDestroy() {
+ this.destroyCharts()
+ },
+ methods: {
+ initCharts() {
+ this.initPieChart()
+ this.initBarLineChart()
+ },
+
+ initPieChart() {
+ const pieDom = document.getElementById('pieChart')
+ if (!pieDom) return
+
+ if (this.pieChart) {
+ this.pieChart.dispose()
+ }
+
+ this.pieChart = echarts.init(pieDom)
+
+ // 鏍规嵁褰撳墠tab璁$畻楗煎浘鏁版嵁
+ const pieData = this.getPieChartData()
+
+ const pieOption = {
+ title: {
+ text: '闅忚鐘舵�佸垎甯�',
+ left: 'center',
+ textStyle: {
+ color: '#333',
+ fontSize: 16
+ }
+ },
+ tooltip: {
+ trigger: 'item',
+ formatter: '{a} <br/>{b}: {c} ({d}%)'
+ },
+ legend: {
+ orient: 'vertical',
+ left: 'left',
+ data: pieData.legendData,
+ textStyle: {
+ color: '#666'
+ }
+ },
+ color: ['#FF9D4D', '#36B37E', '#FF5C5C'],
+ series: [
+ {
+ name: '闅忚鐘舵��',
+ type: 'pie',
+ radius: ['40%', '70%'],
+ avoidLabelOverlap: true,
+ itemStyle: {
+ borderRadius: 10,
+ borderColor: '#fff',
+ borderWidth: 2
+ },
+ label: {
+ show: true,
+ formatter: '{b}: {c} ({d}%)',
+ color: '#333'
+ },
+ emphasis: {
+ label: {
+ show: true,
+ fontSize: '18',
+ fontWeight: 'bold'
+ },
+ itemStyle: {
+ shadowBlur: 10,
+ shadowOffsetX: 0,
+ shadowColor: 'rgba(0, 0, 0, 0.5)'
+ }
+ },
+ data: pieData.seriesData
+ }
+ ]
+ }
+
+ this.pieChart.setOption(pieOption)
+ window.addEventListener('resize', this.resizePieChart)
+ },
+
+ getPieChartData() {
+ let legendData = []
+ let seriesData = []
+
+ if (this.activeTab === 'first') {
+ legendData = ['寰呴殢璁�', '闅忚鎴愬姛', '闅忚澶辫触']
+ const followUpData = {
+ pending: 0,
+ success: 0,
+ fail: 0
+ }
+
+ this.data.forEach((item) => {
+ followUpData.pending += item.pendingFollowUp || 0
+ followUpData.success += item.followUpSuccess || 0
+ followUpData.fail += item.followUpFail || 0
+ })
+
+ seriesData = [
+ { value: followUpData.pending, name: '寰呴殢璁�' },
+ { value: followUpData.success, name: '闅忚鎴愬姛' },
+ { value: followUpData.fail, name: '闅忚澶辫触' }
+ ]
+ } else if (this.activeTab === 'second') {
+ legendData = ['寰呴殢璁�(鍐嶆)', '闅忚鎴愬姛(鍐嶆)', '闅忚澶辫触(鍐嶆)']
+ const followUpData = {
+ pending: 0,
+ success: 0,
+ fail: 0
+ }
+
+ this.data.forEach((item) => {
+ followUpData.pending += item.pendingFollowUpAgain || 0
+ followUpData.success += item.followUpSuccessAgain || 0
+ followUpData.fail += item.followUpFailAgain || 0
+ })
+
+ seriesData = [
+ { value: followUpData.pending, name: '寰呴殢璁�(鍐嶆)' },
+ { value: followUpData.success, name: '闅忚鎴愬姛(鍐嶆)' },
+ { value: followUpData.fail, name: '闅忚澶辫触(鍐嶆)' }
+ ]
+ } else if (this.activeTab === 'continued') {
+ legendData = ['鎶ょ悊瀹屾垚', '鎶ょ悊杩涜涓�', '鎶ょ悊鏈紑濮�']
+ const careData = {
+ completed: 0,
+ inProgress: 0,
+ notStarted: 0
+ }
+
+ this.data.forEach((item) => {
+ careData.completed += item.careCompleted || 0
+ careData.inProgress += item.careInProgress || 0
+ careData.notStarted += item.careNotStarted || 0
+ })
+
+ seriesData = [
+ { value: careData.completed, name: '鎶ょ悊瀹屾垚' },
+ { value: careData.inProgress, name: '鎶ょ悊杩涜涓�' },
+ { value: careData.notStarted, name: '鎶ょ悊鏈紑濮�' }
+ ]
+ }
+
+ return { legendData, seriesData }
+ },
+
+ initBarLineChart() {
+ const barDom = document.getElementById('barLineChart')
+ if (!barDom) return
+
+ if (this.barLineChart) {
+ this.barLineChart.dispose()
+ }
+
+ this.barLineChart = echarts.init(barDom)
+
+ // 鍑嗗鏁版嵁
+ const chartData = this.getBarLineChartData()
+
+ const option = {
+ title: {
+ text: `${chartData.title}瓒嬪娍`,
+ left: 'center',
+ textStyle: {
+ color: '#333',
+ fontSize: 16
+ }
+ },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'cross',
+ crossStyle: {
+ color: '#999'
+ }
+ }
+ },
+ legend: {
+ data: chartData.legendData,
+ top: 'bottom',
+ textStyle: {
+ color: '#666'
+ }
+ },
+ color: chartData.colors,
+ xAxis: {
+ type: 'category',
+ data: chartData.categories,
+ axisLabel: {
+ interval: 0,
+ rotate: 30,
+ color: '#666'
+ },
+ axisLine: {
+ lineStyle: {
+ color: '#ddd'
+ }
+ }
+ },
+ yAxis: [
+ {
+ type: 'value',
+ name: chartData.yAxisName1,
+ min: 0,
+ axisLabel: {
+ color: '#666'
+ },
+ axisLine: {
+ lineStyle: {
+ color: '#ddd'
+ }
+ },
+ splitLine: {
+ lineStyle: {
+ color: '#f0f0f0'
+ }
+ }
+ },
+ {
+ type: 'value',
+ name: '鐧惧垎姣�(%)',
+ min: 0,
+ max: 100,
+ axisLabel: {
+ color: '#666',
+ formatter: '{value}%'
+ },
+ axisLine: {
+ lineStyle: {
+ color: '#ddd'
+ }
+ },
+ splitLine: {
+ show: false
+ }
+ }
+ ],
+ series: chartData.series,
+ grid: {
+ top: '15%',
+ left: '3%',
+ right: '4%',
+ bottom: '15%',
+ containLabel: true
+ }
+ }
+
+ this.barLineChart.setOption(option)
+ window.addEventListener('resize', this.resizeBarLineChart)
+ },
+
+ getBarLineChartData() {
+ const categories = this.data.map(
+ (item) => item.leavehospitaldistrictname || item.deptname
+ )
+
+ let title = '绉戝/鐥呭尯'
+ let yAxisName1 = '浜烘'
+ let legendData = []
+ let colors = []
+ let series = []
+
+ if (this.activeTab === 'first') {
+ title = '棣栨闅忚'
+ yAxisName1 = '浜烘'
+ legendData = ['鍑洪櫌浜烘', '搴旈殢璁夸汉娆�', '闅忚鐜�(%)', '鍙婃椂鐜�(%)']
+ colors = ['#5470C6', '#91CC75', '#EE6666', '#9A60B4']
+
+ const dischargeData = this.data.map((item) => item.dischargeCount || 0)
+ const followUpData = this.data.map((item) => item.followUpNeeded || 0)
+ const followUpRateData = this.data.map((item) => {
+ if (!item.followUpRate) return 0
+ const rateStr = String(item.followUpRate).replace('%', '')
+ return parseFloat(rateStr) || 0
+ })
+ const timelyRateData = this.data.map((item) =>
+ item.rate ? (Number(item.rate) * 100).toFixed(2) : 0
+ )
+
+ series = [
+ {
+ name: '鍑洪櫌浜烘',
+ type: 'bar',
+ barWidth: '25%',
+ data: dischargeData,
+ itemStyle: {
+ borderRadius: [4, 4, 0, 0]
+ }
+ },
+ {
+ name: '搴旈殢璁夸汉娆�',
+ type: 'bar',
+ barWidth: '25%',
+ data: followUpData,
+ itemStyle: {
+ borderRadius: [4, 4, 0, 0]
+ }
+ },
+ {
+ name: '闅忚鐜�(%)',
+ type: 'line',
+ yAxisIndex: 1,
+ data: followUpRateData,
+ symbolSize: 8,
+ lineStyle: {
+ width: 3
+ },
+ markLine: {
+ silent: true,
+ data: [
+ {
+ yAxis: 80,
+ lineStyle: {
+ color: '#EE6666',
+ type: 'dashed'
+ }
+ }
+ ]
+ }
+ },
+ {
+ name: '鍙婃椂鐜�(%)',
+ type: 'line',
+ yAxisIndex: 1,
+ data: timelyRateData,
+ symbolSize: 8,
+ lineStyle: {
+ width: 3,
+ type: 'dotted'
+ },
+ markLine: {
+ silent: true,
+ data: [
+ {
+ yAxis: 90,
+ lineStyle: {
+ color: '#9A60B4',
+ type: 'dashed'
+ }
+ }
+ ]
+ }
+ }
+ ]
+ } else if (this.activeTab === 'second') {
+ title = '鍐嶆闅忚'
+ yAxisName1 = '浜烘'
+ legendData = ['鍑洪櫌浜烘', '搴旈殢璁夸汉娆�', '闅忚鐜�(%)']
+ colors = ['#5470C6', '#91CC75', '#EE6666']
+
+ const dischargeData = this.data.map((item) => item.dischargeCount || 0)
+ const followUpData = this.data.map((item) => item.followUpNeeded || 0)
+ const followUpRateAgainData = this.data.map((item) => {
+ if (!item.followUpRateAgain) return 0
+ const rateStr = String(item.followUpRateAgain).replace('%', '')
+ return parseFloat(rateStr) || 0
+ })
+
+ series = [
+ {
+ name: '鍑洪櫌浜烘',
+ type: 'bar',
+ barWidth: '25%',
+ data: dischargeData,
+ itemStyle: {
+ borderRadius: [4, 4, 0, 0]
+ }
+ },
+ {
+ name: '搴旈殢璁夸汉娆�',
+ type: 'bar',
+ barWidth: '25%',
+ data: followUpData,
+ itemStyle: {
+ borderRadius: [4, 4, 0, 0]
+ }
+ },
+ {
+ name: '闅忚鐜�(%)',
+ type: 'line',
+ yAxisIndex: 1,
+ data: followUpRateAgainData,
+ symbolSize: 8,
+ lineStyle: {
+ width: 3
+ },
+ markLine: {
+ silent: true,
+ data: [
+ {
+ yAxis: 80,
+ lineStyle: {
+ color: '#EE6666',
+ type: 'dashed'
+ }
+ }
+ ]
+ }
+ }
+ ]
+ } else if (this.activeTab === 'continued') {
+ title = '寤剁画鎶ょ悊'
+ yAxisName1 = '浜烘'
+ legendData = ['寤剁画鎶ょ悊浜烘', '鎶ょ悊瀹屾垚', '瀹屾垚鐜�(%)']
+ colors = ['#5470C6', '#91CC75', '#EE6666']
+
+ const continuedCareData = this.data.map((item) => item.continuedCareCount || 0)
+ const careCompletedData = this.data.map((item) => item.careCompleted || 0)
+ const completionRateData = this.data.map((item) => {
+ if (!item.completionRate) return 0
+ const rateStr = String(item.completionRate).replace('%', '')
+ return parseFloat(rateStr) || 0
+ })
+
+ series = [
+ {
+ name: '寤剁画鎶ょ悊浜烘',
+ type: 'bar',
+ barWidth: '25%',
+ data: continuedCareData,
+ itemStyle: {
+ borderRadius: [4, 4, 0, 0]
+ }
+ },
+ {
+ name: '鎶ょ悊瀹屾垚',
+ type: 'bar',
+ barWidth: '25%',
+ data: careCompletedData,
+ itemStyle: {
+ borderRadius: [4, 4, 0, 0]
+ }
+ },
+ {
+ name: '瀹屾垚鐜�(%)',
+ type: 'line',
+ yAxisIndex: 1,
+ data: completionRateData,
+ symbolSize: 8,
+ lineStyle: {
+ width: 3
+ },
+ markLine: {
+ silent: true,
+ data: [
+ {
+ yAxis: 85,
+ lineStyle: {
+ color: '#EE6666',
+ type: 'dashed'
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+
+ return {
+ title,
+ yAxisName1,
+ categories,
+ legendData,
+ colors,
+ series
+ }
+ },
+
+ resizePieChart() {
+ if (this.pieChart) {
+ this.pieChart.resize()
+ }
+ },
+
+ resizeBarLineChart() {
+ if (this.barLineChart) {
+ this.barLineChart.resize()
+ }
+ },
+
+ destroyCharts() {
+ if (this.pieChart) {
+ this.pieChart.dispose()
+ this.pieChart = null
+ }
+ if (this.barLineChart) {
+ this.barLineChart.dispose()
+ this.barLineChart = null
+ }
+ window.removeEventListener('resize', this.resizePieChart)
+ window.removeEventListener('resize', this.resizeBarLineChart)
+ },
+
+ handleClose() {
+ this.destroyCharts()
+ this.$emit('close')
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+.chart-container {
+ .chart-title {
+ text-align: center;
+ font-size: 16px;
+ font-weight: bold;
+ margin-bottom: 20px;
+ color: #333;
+ }
+}
+</style>
diff --git a/src/views/Satisfaction/diseaseStatistics/components/ContinuedCare.vue b/src/views/Satisfaction/diseaseStatistics/components/ContinuedCare.vue
new file mode 100644
index 0000000..2cf6f31
--- /dev/null
+++ b/src/views/Satisfaction/diseaseStatistics/components/ContinuedCare.vue
@@ -0,0 +1,633 @@
+<template>
+ <div class="continued-care">
+ <div class="your-table-container">
+ <el-table
+ v-loading="loading"
+ :data="tableData"
+ :border="true"
+ show-summary
+ :summary-method="getSummaries"
+ >
+ <!-- 琛ㄦ牸鍒楀畾涔� -->
+ <el-table-column
+ label="搴忓彿"
+ type="index"
+ align="center"
+ width="60"
+ />
+
+ <el-table-column
+ label="鐥呭尯鍚嶇О"
+ align="center"
+ prop="wardName"
+ width="200"
+ :show-overflow-tooltip="true"
+ />
+
+ <el-table-column
+ label="宸插欢缁暟閲�"
+ align="center"
+ prop="continuedCount"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="handleViewDetails(scope.row, 'continued', '宸插欢缁垪琛�')"
+ >
+ <span class="button-zx">{{ scope.row.continuedCount }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ label="鏈欢缁暟閲�"
+ align="center"
+ prop="unContinuedCount"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="handleViewDetails(scope.row, 'uncontinued', '鏈欢缁垪琛�')"
+ >
+ <span class="button-zx">{{ scope.row.unContinuedCount }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ label="寤剁画鐜�"
+ align="center"
+ prop="continuedRate"
+ width="120"
+ />
+
+ <!-- <el-table-column
+ label="鎿嶄綔"
+ align="center"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="small"
+ type="primary"
+ @click="handleRowClick(scope.row)"
+ >
+ 鏌ョ湅鎶ゅ+璇︽儏
+ </el-button>
+ </template>
+ </el-table-column> -->
+ </el-table>
+ </div>
+
+ <!-- 鎶ゅ+璇︽儏寮圭獥 -->
+ <el-dialog
+ title="鎶ゅ+寤剁画鎶ょ悊璇︽儏"
+ :visible.sync="nurseDialogVisible"
+ width="80%"
+ :close-on-click-modal="false"
+ >
+ <div v-if="currentWardData">
+ <el-table
+ v-loading="nurseLoading"
+ :data="nurseData"
+ :border="true"
+ >
+ <el-table-column
+ label="鎶ゅ+濮撳悕"
+ prop="nurseName"
+ align="center"
+ width="120"
+ />
+ <el-table-column
+ label="绉戝"
+ prop="deptName"
+ align="center"
+ width="150"
+ />
+ <el-table-column
+ label="宸插欢缁暟閲�"
+ prop="continuedCount"
+ align="center"
+ />
+ <el-table-column
+ label="鏈欢缁暟閲�"
+ prop="unContinuedCount"
+ align="center"
+ />
+ <el-table-column
+ label="寤剁画鐜�"
+ prop="continuedRate"
+ align="center"
+ width="120"
+ />
+ </el-table>
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import { getContinueNerseCount, getNurseContinuedDetail } from "@/api/system/user";
+import ExcelJS from "exceljs";
+import { saveAs } from "file-saver";
+
+export default {
+ name: "ContinuedCare",
+ props: {
+ queryParams: {
+ type: Object,
+ required: true,
+ },
+ flatArrayhospit: {
+ type: Array,
+ default: () => [],
+ },
+ flatArraydept: {
+ type: Array,
+ default: () => [],
+ },
+ options: {
+ type: Array,
+ default: () => [],
+ },
+ orgname: {
+ type: String,
+ default: "",
+ },
+ },
+ data() {
+ return {
+ tableData: [],
+ loading: false,
+ nurseDialogVisible: false,
+ nurseLoading: false,
+ currentWardData: null,
+ nurseData: [],
+ originalData: {},
+ totalData: {
+ continued: 0,
+ uncontinued: 0
+ }
+ };
+ },
+ methods: {
+ loadData() {
+ this.loading = true;
+
+ const params = {
+ leavehospitaldistrictcodes:
+ this.queryParams.leavehospitaldistrictcodes.includes("all")
+ ? this.getAllWardCodes()
+ : this.queryParams.leavehospitaldistrictcodes,
+ deptcodes: this.queryParams.deptcodes.includes("all")
+ ? this.getAllDeptCodes()
+ : this.queryParams.deptcodes,
+
+ };
+
+ delete params.leavehospitaldistrictcodes.all;
+ delete params.deptcodes.all;
+
+ getContinueNerseCount(params)
+ .then((response) => {
+ this.originalData = response.data;
+ this.processData(response.data);
+ })
+ .catch((error) => {
+ console.error("鑾峰彇寤剁画鎶ょ悊鏁版嵁澶辫触:", error);
+ this.$message.error("鑾峰彇寤剁画鎶ょ悊鏁版嵁澶辫触");
+ })
+ .finally(() => {
+ this.loading = false;
+ });
+ },
+
+ processData(data) {
+ this.totalData = {
+ continued: data.宸插欢缁�绘暟閲� || 0,
+ uncontinued: data.鏈欢缁�绘暟閲� || 0
+ };
+
+ const processedData = [];
+
+ if (data.璇︽儏 && Array.isArray(data.璇︽儏)) {
+ data.璇︽儏.forEach((item) => {
+ // 鎻愬彇鐥呭尯鍚嶇О鍜屾暟鎹�
+ Object.keys(item).forEach(key => {
+ if (key.startsWith('宸插欢缁璤')) {
+ const wardName = key.replace('宸插欢缁璤', '');
+ const continuedCount = item[key];
+ const unContinuedCount = item[`鏈欢缁璤${wardName}`] || 0;
+ const total = continuedCount + unContinuedCount;
+ const continuedRate = total > 0 ? ((continuedCount / total) * 100).toFixed(2) + '%' : '0.00%';
+
+ processedData.push({
+ wardName,
+ continuedCount,
+ unContinuedCount,
+ continuedRate,
+ originalData: item
+ });
+ }
+ });
+ });
+ }
+
+ // 鎺掑簭
+ this.tableData = this.customSort(processedData);
+ },
+
+ getAllWardCodes() {
+ return this.flatArrayhospit
+ .filter((item) => item.value !== "all")
+ .map((item) => item.value);
+ },
+
+ getAllDeptCodes() {
+ return this.flatArraydept
+ .filter((item) => item.value !== "all")
+ .map((item) => item.value);
+ },
+
+ customSort(data) {
+ const order = [
+ "涓�", "浜�", "涓�", "鍥�", "浜�", "鍏�", "涓�", "鍏�", "涔�", "鍗�",
+ "鍗佷竴", "鍗佷簩", "鍗佷笁", "鍗佸洓", "鍗佷簲", "鍗佸叚", "鍗佷竷", "鍗佸叓", "鍗佷節", "浜屽崄",
+ "浜屽崄涓�", "浜屽崄浜�", "浜屽崄涓�", "浜屽崄鍥�", "浜屽崄浜�", "浜屽崄鍏�", "浜屽崄涓�", "浜屽崄鍏�", "浜屽崄涔�", "涓夊崄",
+ "涓夊崄涓�", "涓夊崄浜�", "涓夊崄涓�", "涓夊崄鍥�", "涓夊崄浜�", "涓夊崄鍏�", "涓夊崄涓�", "涓夊崄鍏�", "涓夊崄涔�", "鍥涘崄",
+ "鍥涘崄涓�", "鍥涘崄浜�", "鍥涘崄涓�", "鍥涘崄鍥�", "鍥涘崄浜�"
+ ];
+
+ return data.sort((a, b) => {
+ const getIndex = (name) => {
+ if (!name || typeof name !== "string") return -1;
+ const chineseMatch = name.match(/^(\d+)-/);
+ if (chineseMatch && chineseMatch[1]) {
+ const num = parseInt(chineseMatch[1], 10);
+ if (num >= 1 && num <= 45) {
+ return num - 1;
+ }
+ }
+
+ // 灏濊瘯鍖归厤涓枃鏁板瓧
+ for (let i = 0; i < order.length; i++) {
+ if (name.includes(order[i])) {
+ return i;
+ }
+ }
+ return -1;
+ };
+
+ const indexA = getIndex(a.wardName);
+ const indexB = getIndex(b.wardName);
+
+ if (indexA === -1 && indexB === -1) {
+ return (a.wardName || "").localeCompare(b.wardName || "");
+ }
+ if (indexA === -1) return 1;
+ if (indexB === -1) return -1;
+ return indexA - indexB;
+ });
+ },
+
+ getSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ return;
+ }
+
+ if (index === 1) { // 鐥呭尯鍚嶇О鍒�
+ sums[index] = "/";
+ return;
+ }
+
+ if (index === 2) { // 宸插欢缁暟閲忓悎璁�
+ const totalContinued = this.tableData.reduce((sum, item) => sum + item.continuedCount, 0);
+ sums[index] = this.formatNumber(totalContinued);
+ } else if (index === 3) { // 鏈欢缁暟閲忓悎璁�
+ const totalUnContinued = this.tableData.reduce((sum, item) => sum + item.unContinuedCount, 0);
+ sums[index] = this.formatNumber(totalUnContinued);
+ } else if (index === 4) { // 寤剁画鐜囧钩鍧囧��
+ const totalContinued = this.tableData.reduce((sum, item) => sum + item.continuedCount, 0);
+ const totalUnContinued = this.tableData.reduce((sum, item) => sum + item.unContinuedCount, 0);
+ const total = totalContinued + totalUnContinued;
+ const avgRate = total > 0 ? ((totalContinued / total) * 100).toFixed(2) + '%' : '0.00%';
+ sums[index] = avgRate;
+ } else {
+ sums[index] = "";
+ }
+ });
+
+ return sums;
+ },
+
+ formatNumber(num) {
+ if (isNaN(num)) return "-";
+ return Number.isInteger(num) ? num.toString() : num.toFixed(0);
+ },
+
+ handleViewDetails(row, type, titleSuffix) {
+ const title = `${row.wardName}${titleSuffix}`;
+ // 杩欓噷闇�瑕佹牴鎹綘鐨勫疄闄呮儏鍐佃幏鍙栬鎯呮暟鎹�
+ // 浣犲彲浠ヤ粠row.originalData涓幏鍙栵紝鎴栬�呰皟鐢ㄦ柊鐨凙PI
+ const detailData = this.getMockDetailData(row, type);
+ this.$emit("view-details", detailData, title);
+ },
+
+ handleRowClick(row) {
+ this.currentWardData = row;
+ this.nurseDialogVisible = true;
+ this.loadNurseData(row.wardName);
+ },
+
+ async loadNurseData(wardName) {
+ this.nurseLoading = true;
+ try {
+ const params = {
+ wardName: wardName,
+ startTime: this.queryParams.startTime,
+ endTime: this.queryParams.endTime
+ };
+
+ const response = await getNurseContinuedDetail(params);
+ this.nurseData = this.processNurseData(response.data);
+ } catch (error) {
+ console.error("鑾峰彇鎶ゅ+璇︽儏澶辫触:", error);
+ this.$message.error("鑾峰彇鎶ゅ+璇︽儏澶辫触");
+ } finally {
+ this.nurseLoading = false;
+ }
+ },
+
+ processNurseData(data) {
+ // 鏍规嵁浣犵殑瀹為檯API鍝嶅簲缁撴瀯澶勭悊鏁版嵁
+ // 杩欓噷鏄竴涓ず渚�
+ return [
+ {
+ nurseName: "鎶ゅ+A",
+ deptName: this.currentWardData.wardName,
+ continuedCount: Math.floor(this.currentWardData.continuedCount * 0.3),
+ unContinuedCount: Math.floor(this.currentWardData.unContinuedCount * 0.3),
+ continuedRate: "75.00%"
+ },
+ {
+ nurseName: "鎶ゅ+B",
+ deptName: this.currentWardData.wardName,
+ continuedCount: Math.floor(this.currentWardData.continuedCount * 0.4),
+ unContinuedCount: Math.floor(this.currentWardData.unContinuedCount * 0.4),
+ continuedRate: "80.00%"
+ },
+ {
+ nurseName: "鎶ゅ+C",
+ deptName: this.currentWardData.wardName,
+ continuedCount: Math.floor(this.currentWardData.continuedCount * 0.3),
+ unContinuedCount: Math.floor(this.currentWardData.unContinuedCount * 0.3),
+ continuedRate: "70.00%"
+ }
+ ];
+ },
+
+ getMockDetailData(row, type) {
+ // 妯℃嫙璇︽儏鏁版嵁锛屽疄闄呭簲璇ヨ皟鐢ˋPI
+ const detailData = [];
+ const count = type === 'continued' ? row.continuedCount : row.unContinuedCount;
+
+ for (let i = 1; i <= Math.min(count, 10); i++) {
+ detailData.push({
+ sendname: `鎮h��${i}`,
+ taskName: `${row.wardName}寤剁画鎶ょ悊`,
+ sendstate: type === 'continued' ? 6 : 2,
+ preachform: ["浜哄伐闅忚", "鐢佃瘽闅忚"],
+ visitTime: "2024-01-15 10:00:00",
+ finishtime: type === 'continued' ? "2024-01-15 11:00:00" : "",
+ endtime: "2024-01-10 09:00:00",
+ nurseName: "鎶ゅ+A",
+ drname: "鍖荤敓A",
+ excep: 1,
+ suggest: 2,
+ templatename: "寤剁画鎶ょ悊鏈嶅姟妯℃澘",
+ remark: type === 'continued' ? "宸插畬鎴愬欢缁姢鐞�" : "鏈紑濮嬪欢缁姢鐞�",
+ bankcardno: "宸插畬鎴�"
+ });
+ }
+
+ return detailData;
+ },
+
+ async exportTable() {
+ try {
+ let dateRangeString = "";
+ let sheetNameSuffix = "";
+
+ if (
+ this.queryParams.dateRange &&
+ this.queryParams.dateRange.length === 2
+ ) {
+ const startDateStr = this.queryParams.dateRange[0];
+ const endDateStr = this.queryParams.dateRange[1];
+ const formatDateForDisplay = (dateTimeStr) => {
+ return dateTimeStr.split(" ")[0];
+ };
+ const startDateFormatted = formatDateForDisplay(startDateStr);
+ const endDateFormatted = formatDateForDisplay(endDateStr);
+ dateRangeString = `${startDateFormatted}鑷�${endDateFormatted}`;
+ sheetNameSuffix = `${startDateFormatted}鑷�${endDateFormatted}`;
+ } else {
+ const now = new Date();
+ const currentMonth = now.getMonth() + 1;
+ dateRangeString = `${currentMonth}鏈坄;
+ sheetNameSuffix = `${currentMonth}鏈坄;
+ }
+
+ const excelName = `寤剁画鎶ょ悊缁熻琛╛${dateRangeString}.xlsx`;
+ const worksheetName = `寤剁画鎶ょ悊缁熻_${sheetNameSuffix}`;
+
+ if (!this.tableData || this.tableData.length === 0) {
+ this.$message.warning("鏆傛棤寤剁画鎶ょ悊鏁版嵁鍙鍑�");
+ return false;
+ }
+
+ const workbook = new ExcelJS.Workbook();
+ const worksheet = workbook.addWorksheet(worksheetName);
+
+ this.buildExportSheet(worksheet, sheetNameSuffix);
+
+ const buffer = await workbook.xlsx.writeBuffer();
+ const blob = new Blob([buffer], {
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ });
+ saveAs(blob, excelName);
+
+ this.$message.success("瀵煎嚭鎴愬姛");
+ return true;
+ } catch (error) {
+ console.error("瀵煎嚭澶辫触:", error);
+ this.$message.error(`瀵煎嚭澶辫触: ${error.message}`);
+ return false;
+ }
+ },
+
+ buildExportSheet(worksheet, sheetNameSuffix) {
+ const titleStyle = {
+ font: {
+ name: "寰蒋闆呴粦",
+ size: 16,
+ bold: true,
+ color: { argb: "FF000000" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFE6F3FF" },
+ },
+ alignment: { vertical: "middle", horizontal: "center", wrapText: true },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const headerStyle = {
+ font: {
+ name: "寰蒋闆呴粦",
+ size: 11,
+ bold: true,
+ color: { argb: "FF000000" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ },
+ alignment: { vertical: "middle", horizontal: "center", wrapText: true },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const cellStyle = {
+ font: { name: "瀹嬩綋", size: 10, color: { argb: "FF000000" } },
+ alignment: { vertical: "middle", horizontal: "center" },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const summaryStyle = {
+ font: {
+ name: "瀹嬩綋",
+ size: 10,
+ bold: true,
+ color: { argb: "FF409EFF" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ },
+ alignment: { vertical: "middle", horizontal: "center" },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ // 娣诲姞鏍囬琛�
+ worksheet.mergeCells(1, 1, 1, 6);
+ const titleCell = worksheet.getCell(1, 1);
+ titleCell.value = `寤剁画鎶ょ悊缁熻琛╛${sheetNameSuffix}`;
+ titleCell.style = titleStyle;
+ worksheet.getRow(1).height = 35;
+
+ // 琛ㄥご
+ const headers = ["搴忓彿", "鐥呭尯鍚嶇О", "宸插欢缁暟閲�", "鏈欢缁暟閲�", "寤剁画鐜�", "鎿嶄綔"];
+
+ headers.forEach((header, index) => {
+ const cell = worksheet.getCell(2, index + 1);
+ cell.value = header;
+ cell.style = headerStyle;
+ });
+
+ worksheet.getRow(2).height = 25;
+
+ // 鏁版嵁琛�
+ this.tableData.forEach((item, rowIndex) => {
+ const dataRow = worksheet.addRow(
+ [
+ rowIndex + 1,
+ item.wardName,
+ item.continuedCount,
+ item.unContinuedCount,
+ item.continuedRate,
+ "鏌ョ湅鎶ゅ+璇︽儏"
+ ],
+ rowIndex + 3
+ );
+
+ dataRow.eachCell((cell) => {
+ cell.style = cellStyle;
+ });
+ dataRow.height = 24;
+ });
+
+ // 鍚堣琛�
+ const totalContinued = this.tableData.reduce((sum, item) => sum + item.continuedCount, 0);
+ const totalUnContinued = this.tableData.reduce((sum, item) => sum + item.unContinuedCount, 0);
+ const total = totalContinued + totalUnContinued;
+ const totalRate = total > 0 ? ((totalContinued / total) * 100).toFixed(2) + '%' : '0.00%';
+
+ const summaryRow = worksheet.addRow([
+ "鍚堣",
+ "/",
+ totalContinued,
+ totalUnContinued,
+ totalRate,
+ "/"
+ ]);
+
+ summaryRow.eachCell((cell, colNumber) => {
+ cell.style = summaryStyle;
+ });
+ summaryRow.height = 28;
+
+ // 鍒楀
+ worksheet.columns = [
+ { width: 8 },
+ { width: 30 },
+ { width: 15 },
+ { width: 15 },
+ { width: 12 },
+ { width: 15 }
+ ];
+ }
+ }
+};
+</script>
+
+<style lang="scss" scoped>
+.continued-care {
+ .your-table-container {
+ margin-top: 10px;
+ }
+
+ .button-zx {
+ color: rgb(70, 204, 238);
+ }
+}
+</style>
diff --git a/src/views/Satisfaction/diseaseStatistics/components/DetailDialog.vue b/src/views/Satisfaction/diseaseStatistics/components/DetailDialog.vue
new file mode 100644
index 0000000..2209b13
--- /dev/null
+++ b/src/views/Satisfaction/diseaseStatistics/components/DetailDialog.vue
@@ -0,0 +1,302 @@
+<template>
+ <el-dialog
+ :title="title"
+ :visible.sync="visible"
+ v-loading="loading"
+ width="70%"
+ :close-on-click-modal="false"
+ @close="handleClose"
+ >
+ <div class="detail-dialog">
+ <div style="margin-bottom: 16px; display: flex; align-items: center">
+ <span style="margin-right: 10px; font-weight: bold">鎮h�呭鍚嶆煡璇�:</span>
+ <el-input
+ v-model="searchName"
+ placeholder="璇疯緭鍏ユ偅鑰呭鍚嶈繘琛岀瓫閫�"
+ clearable
+ style="width: 300px"
+ @input="handleSearch"
+ @clear="handleSearch"
+ />
+ <span style="margin-left: 10px; color: rgb(35, 81, 233); font-size: 16px">
+ 鍏� {{ displayList.length }} 鏉¤褰�
+ </span>
+ </div>
+
+ <div class="examine-jic">
+ <div class="jic-value">
+ <el-row :gutter="20">
+ <div class="data-list" ref="dataList" @scroll="handleScroll" v-loading="loading">
+ <el-table :data="currentDisplayList" height="660" style="width: 100%">
+ <el-table-column prop="sendname" align="center" label="濮撳悕" width="100" />
+ <el-table-column prop="taskName" align="center" width="200" show-overflow-tooltip label="浠诲姟鍚嶇О" />
+
+ <el-table-column prop="sendstate" align="center" width="200" label="浠诲姟鐘舵��">
+ <template slot-scope="scope">
+ <el-tag
+ :type="getStateTagType(scope.row.sendstate)"
+ :disable-transitions="false"
+ >
+ {{ getStateText(scope.row.sendstate) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ label="浠诲姟鎵ц鏂瑰紡"
+ align="center"
+ key="preachform"
+ prop="preachform"
+ width="160"
+ :show-overflow-tooltip="true"
+ >
+ <template slot-scope="scope">
+ <span v-for="(item, index) in scope.row.preachform" :key="index">
+ {{ item }}{{ index < scope.row.preachform.length - 1 ? '銆�' : '' }}
+ </span>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ prop="visitTime"
+ align="center"
+ label="搴旈殢璁挎椂闂�"
+ width="200"
+ show-overflow-tooltip
+ />
+ <el-table-column
+ prop="finishtime"
+ align="center"
+ label="闅忚瀹屾垚鏃堕棿"
+ width="200"
+ show-overflow-tooltip
+ />
+ <el-table-column label="鍑洪櫌鏃ユ湡" width="200" align="center" key="endtime" prop="endtime">
+ <template slot-scope="scope">
+ <span>{{ formatTime(scope.row.endtime) }}</span>
+ </template>
+ </el-table-column>
+
+ <el-table-column label="璐d换鎶ゅ+" width="120" align="center" key="nurseName" prop="nurseName" />
+ <el-table-column label="涓绘不鍖荤敓" width="120" align="center" key="drname" prop="drname" />
+
+ <el-table-column label="缁撴灉鐘舵��" align="center" key="excep" prop="excep" width="120">
+ <template slot-scope="scope">
+ <dict-tag :options="dict.type.sys_yujing" :value="scope.row.excep" />
+ </template>
+ </el-table-column>
+
+ <el-table-column label="澶勭悊鎰忚" align="center" key="suggest" prop="suggest" width="120">
+ <template slot-scope="scope">
+ <dict-tag :options="dict.type.sys_suggest" :value="scope.row.suggest" />
+ </template>
+ </el-table-column>
+
+ <el-table-column prop="templatename" align="center" label="鏈嶅姟妯℃澘" width="200" show-overflow-tooltip />
+ <el-table-column prop="remark" align="center" label="鏈嶅姟璁板綍" width="200" show-overflow-tooltip />
+
+ <el-table-column prop="bankcardno" align="center" label="鍛煎彨鐘舵��" width="210" />
+
+ <el-table-column label="鎿嶄綔" fixed="right" align="center" width="200" class-name="small-padding fixed-width">
+ <template slot-scope="scope">
+ <el-button size="medium" type="text" @click="handleDetailsGo(scope.row)">
+ <span class="button-zx">
+ <i class="el-icon-s-order"></i>鏌ョ湅
+ </span>
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </el-row>
+ </div>
+ </div>
+ </div>
+ </el-dialog>
+</template>
+
+<script>
+export default {
+ name: 'DetailDialog',
+ dicts: ['sys_yujing', 'sys_suggest'],
+ props: {
+ visible: {
+ type: Boolean,
+ default: false
+ },
+ title: {
+ type: String,
+ default: ''
+ },
+ data: {
+ type: Array,
+ default: () => []
+ },
+ searchName: {
+ type: String,
+ default: ''
+ },
+ loading: {
+ type: Boolean,
+ default: false
+ }
+ },
+ data() {
+ return {
+ localSearchName: '',
+ displayList: [],
+ currentDisplayList: [],
+ loadIndex: 0,
+ pageSize: 100,
+ isLoading: false
+ }
+ },
+ watch: {
+ data: {
+ immediate: true,
+ handler(newData) {
+ this.initializeData(newData)
+ }
+ },
+ searchName(newVal) {
+ this.localSearchName = newVal
+ this.handleSearch()
+ }
+ },
+ mounted() {
+ if (this.data && this.data.length > 0) {
+ this.initializeData(this.data)
+ }
+ },
+ methods: {
+ initializeData(data) {
+ this.displayList = [...data]
+ this.formatPreachformData()
+ this.loadIndex = 0
+ this.currentDisplayList = []
+ this.$nextTick(() => {
+ this.loadMoreData()
+ })
+ },
+
+ formatPreachformData() {
+ this.displayList.forEach((item) => {
+ if (item.preachform) {
+ if (item.endtime) {
+ item.preachformson = item.preachform
+ const idArray = item.preachform.split(',')
+
+ item.preachform = idArray.map((value) => {
+ const checkboxlist = this.$store.getters.checkboxlist
+ const foundItem = checkboxlist.find((item) => item.value == value)
+ return foundItem ? foundItem.label : null
+ }).filter(label => label !== null)
+ }
+ }
+ })
+ },
+
+ handleSearch() {
+ if (!this.localSearchName.trim()) {
+ this.displayList = [...this.data]
+ this.formatPreachformData()
+ } else {
+ const keyword = this.localSearchName.toLowerCase()
+ this.displayList = this.data.filter((item) => {
+ return item.sendname && item.sendname.toLowerCase().includes(keyword)
+ })
+ this.formatPreachformData()
+ }
+
+ this.loadIndex = 0
+ this.currentDisplayList = []
+ this.$nextTick(() => {
+ this.loadMoreData()
+ })
+
+ this.$emit('search', this.localSearchName)
+ },
+
+ loadMoreData() {
+ if (this.isLoading || this.loadIndex >= this.displayList.length) return
+
+ this.isLoading = true
+
+ setTimeout(() => {
+ const nextChunk = this.displayList.slice(
+ this.loadIndex,
+ this.loadIndex + this.pageSize
+ )
+ this.currentDisplayList = this.currentDisplayList.concat(nextChunk)
+ this.loadIndex += this.pageSize
+ this.isLoading = false
+ }, 200)
+ },
+
+ handleScroll(event) {
+ const scrollContainer = event.target
+ const isAtBottom =
+ scrollContainer.scrollTop + scrollContainer.clientHeight >=
+ scrollContainer.scrollHeight - 10
+
+ if (
+ isAtBottom &&
+ !this.isLoading &&
+ this.loadIndex < this.displayList.length
+ ) {
+ this.loadMoreData()
+ }
+ },
+
+ getStateTagType(state) {
+ const stateMap = {
+ 1: 'primary', // 琛ㄥ崟宸查鍙�
+ 2: 'primary', // 寰呴殢璁�
+ 3: 'success', // 琛ㄥ崟宸插彂閫�
+ 4: 'info', // 涓嶆墽琛�
+ 5: 'danger', // 鍙戦�佸け璐�
+ 6: 'success' // 宸插畬鎴�
+ }
+ return stateMap[state] || 'info'
+ },
+
+ getStateText(state) {
+ const stateTextMap = {
+ 1: '琛ㄥ崟宸查鍙�',
+ 2: '寰呴殢璁�',
+ 3: '琛ㄥ崟宸插彂閫�',
+ 4: '涓嶆墽琛�',
+ 5: '鍙戦�佸け璐�',
+ 6: '宸插畬鎴�'
+ }
+ return stateTextMap[state] || '鏈煡鐘舵��'
+ },
+
+ formatTime(time) {
+ if (!time) return ''
+ return this.parseTime(time)
+ },
+
+ handleDetailsGo(row) {
+ this.$emit('details-go', row)
+ },
+
+ handleClose() {
+ this.$emit('close')
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+.detail-dialog {
+ .data-list {
+ max-height: 800px;
+ overflow-y: auto;
+ }
+
+ .button-zx {
+ color: rgb(70, 204, 238);
+ }
+}
+</style>
diff --git a/src/views/Satisfaction/diseaseStatistics/components/FirstFollowUp.vue b/src/views/Satisfaction/diseaseStatistics/components/FirstFollowUp.vue
new file mode 100644
index 0000000..e8ee568
--- /dev/null
+++ b/src/views/Satisfaction/diseaseStatistics/components/FirstFollowUp.vue
@@ -0,0 +1,1511 @@
+<template>
+ <div class="first-follow-up">
+ <div class="your-table-container">
+ <el-table
+ ref="exportTable"
+ id="exportTableid"
+ v-loading="loading"
+ :data="tableData"
+ :border="true"
+ @selection-change="handleSelectionChange"
+ @expand-change="handleRowClick"
+ :row-key="getRowKey"
+ show-summary
+ :summary-method="getSummaries"
+ :expand-row-keys="expands"
+ >
+ <!-- 琛ㄦ牸鍒楀畾涔� -->
+ <el-table-column
+ v-if="queryParams.statisticaltype == 1"
+ label="鍑洪櫌鐥呭尯"
+ align="center"
+ sortable
+ key="leavehospitaldistrictname"
+ prop="leavehospitaldistrictname"
+ width="150"
+ :show-overflow-tooltip="true"
+ :sort-method="sortChineseNumber"
+ />
+ <el-table-column
+ v-if="queryParams.statisticaltype == 2"
+ label="绉戝"
+ align="center"
+ key="deptname"
+ prop="deptname"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ v-if="queryParams.statisticaltype == 3"
+ label="涓撶梾浠诲姟"
+ width="200"
+ align="center"
+ key="taskName"
+ prop="taskName"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鍑洪櫌浜烘"
+ align="center"
+ key="dischargeCount"
+ prop="dischargeCount"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'dischargeCountInfo',
+ '鍑洪櫌鎮h�呭垪琛�'
+ )
+ "
+ >
+ <span class="button-zx">{{ scope.row.dischargeCount }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鏃犻渶闅忚浜烘"
+ align="center"
+ width="100"
+ key="nonFollowUp"
+ prop="nonFollowUp"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(scope.row, 'nonFollowUpInfo', '鏃犻渶闅忚鍒楄〃')
+ "
+ >
+ <span class="button-zx">{{ scope.row.nonFollowUp }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="搴旈殢璁夸汉娆�"
+ align="center"
+ width="100"
+ key="followUpNeeded"
+ prop="followUpNeeded"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(scope.row, 'followUpNeededInfo', '搴旈殢璁垮垪琛�')
+ "
+ >
+ <span class="button-zx">{{ scope.row.followUpNeeded }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+
+ <el-table-column align="center" label="棣栨涓撶梾闅忚">
+ <el-table-column
+ label="闇�闅忚"
+ align="center"
+ key="needFollowUp"
+ prop="needFollowUp"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(scope.row, 'needFollowUpInfo', '闇�闅忚鍒楄〃')
+ "
+ >
+ <span class="button-zx">{{ scope.row.needFollowUp }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="寰呴殢璁�"
+ align="center"
+ key="pendingFollowUp"
+ prop="pendingFollowUp"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'pendingFollowUpInfo',
+ '寰呴殢璁垮垪琛�'
+ )
+ "
+ >
+ <span class="button-zx">{{ scope.row.pendingFollowUp }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="闅忚鎴愬姛"
+ align="center"
+ key="followUpSuccess"
+ prop="followUpSuccess"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'followUpSuccessInfo',
+ '闅忚鎴愬姛鍒楄〃'
+ )
+ "
+ >
+ <span class="button-zx">{{ scope.row.followUpSuccess }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="闅忚澶辫触"
+ align="center"
+ key="followUpFail"
+ prop="followUpFail"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'followUpFailInfo',
+ '闅忚澶辫触鍒楄〃'
+ )
+ "
+ >
+ <span class="button-zx">{{ scope.row.followUpFail }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎴愬姛鐜�"
+ align="center"
+ width="120"
+ key="successRate"
+ prop="successRate"
+ >
+ <template slot-scope="scope">
+ <span class="success-rate">{{
+ calculateSuccessRate(
+ scope.row.followUpSuccess,
+ scope.row.needFollowUp,
+ scope.row.pendingFollowUp
+ )
+ }}</span>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
+ label="鍙婃椂鐜�"
+ align="center"
+ width="120"
+ key="rate"
+ prop="rate"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="handleSeeDetails(scope.row)"
+ >
+ <span class="button-zx"
+ >{{ (Number(scope.row.rate) * 100).toFixed(2) }}%</span
+ >
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="浜哄伐"
+ align="center"
+ key="manual"
+ prop="manual"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(scope.row, 'manualInfo', '浜哄伐闅忚鍒楄〃')
+ "
+ >
+ <span class="button-zx">{{ scope.row.manual }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column label="璇煶" align="center" key="voice" prop="voice">
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(scope.row, 'voiceInfo', '璇煶闅忚鍒楄〃')
+ "
+ >
+ <span class="button-zx">{{ scope.row.voice }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐭俊" align="center" key="sms" prop="sms">
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="handleViewDetails(scope.row, 'smsInfo', '鐭俊闅忚鍒楄〃')"
+ >
+ <span class="button-zx">{{ scope.row.sms }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="寰俊"
+ align="center"
+ key="weChat"
+ prop="weChat"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(scope.row, 'weChatInfo', '寰俊闅忚鍒楄〃')
+ "
+ >
+ <span class="button-zx">{{ scope.row.weChat }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table-column>
+
+ <!-- 闅忚鎯呭喌鍒楋紙浠呬附姘村競涓尰闄㈡樉绀猴級 -->
+ <el-table-column
+ v-if="
+ orgname == '涓芥按甯備腑鍖婚櫌' || orgname == '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�'
+ "
+ align="center"
+ label="闅忚鎯呭喌"
+ >
+ <el-table-column
+ label="姝e父璇煶"
+ align="center"
+ width="100"
+ key="taskSituation1"
+ prop="taskSituation1"
+ />
+ <el-table-column
+ label="鎮h�呮嫆鎺ユ垨鎷掕"
+ align="center"
+ width="100"
+ key="taskSituation2"
+ prop="taskSituation2"
+ />
+ <el-table-column
+ label="闈㈣鎴栬�呮帴璇�"
+ align="center"
+ width="100"
+ key="taskSituation3"
+ prop="taskSituation3"
+ />
+ <el-table-column
+ label="寰俊闅忚"
+ align="center"
+ width="100"
+ key="taskSituation4"
+ prop="taskSituation4"
+ />
+ <el-table-column
+ label="闅忚鐢佃瘽涓嶆纭�"
+ align="center"
+ width="100"
+ key="taskSituation5"
+ prop="taskSituation5"
+ />
+ <el-table-column
+ label="鍏朵粬鎯呭喌涓嶅疁闅忚"
+ align="center"
+ width="100"
+ key="taskSituation6"
+ prop="taskSituation6"
+ />
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+</template>
+
+<script>
+import { getSfStatisticsHyperlink } from "@/api/AiCentre/index";
+import store from "@/store";
+
+import { getSpecialSfStatistics, selectTimelyRate } from "@/api/system/user";
+import ExcelJS from "exceljs";
+import { saveAs } from "file-saver";
+
+export default {
+ name: "FirstFollowUp",
+ props: {
+ queryParams: {
+ type: Object,
+ required: true,
+ },
+ flatArrayhospit: {
+ type: Array,
+ default: () => [],
+ },
+ flatArraydept: {
+ type: Array,
+ default: () => [],
+ },
+ options: {
+ type: Array,
+ default: () => [],
+ },
+ orgname: {
+ type: String,
+ default: "",
+ },
+ },
+ data() {
+ return {
+ tableData: [],
+ loading: false,
+ expands: [],
+ ids: [],
+ patientqueryParams: { pn: 1, ps: 10 },
+ tasktypes: store.getters.tasktypes,
+ };
+ },
+ methods: {
+ loadData() {
+ this.loading = true;
+ const params = {
+ ...this.queryParams,
+ visitCount: 1,
+ leavehospitaldistrictcodes:
+ this.queryParams.leavehospitaldistrictcodes.includes("all")
+ ? this.getAllWardCodes()
+ : this.queryParams.leavehospitaldistrictcodes,
+ deptcodes: this.queryParams.deptcodes.includes("all")
+ ? this.getAllDeptCodes()
+ : this.queryParams.deptcodes,
+ };
+
+ delete params.leavehospitaldistrictcodes.all;
+ delete params.deptcodes.all;
+ params.rateDay = 7;
+ getSpecialSfStatistics(params)
+ .then((response) => {
+ this.tableData = this.customSort(response.data);
+ })
+ .catch((error) => {
+ console.error("鑾峰彇棣栨闅忚鏁版嵁澶辫触:", error);
+ this.$message.error("鑾峰彇棣栨闅忚鏁版嵁澶辫触");
+ })
+ .finally(() => {
+ this.loading = false;
+ });
+ },
+
+ getAllWardCodes() {
+ return this.flatArrayhospit
+ .filter((item) => item.value !== "all")
+ .map((item) => item.value);
+ },
+
+ getAllDeptCodes() {
+ return this.flatArraydept
+ .filter((item) => item.value !== "all")
+ .map((item) => item.value);
+ },
+
+ customSort(data) {
+ const order = [
+ "涓�",
+ "浜�",
+ "涓�",
+ "鍥�",
+ "浜�",
+ "鍏�",
+ "涓�",
+ "鍏�",
+ "涔�",
+ "鍗�",
+ "鍗佷竴",
+ "鍗佷簩",
+ "鍗佷笁",
+ "鍗佸洓",
+ "鍗佷簲",
+ "鍗佸叚",
+ "鍗佷竷",
+ "鍗佸叓",
+ "鍗佷節",
+ "浜屽崄",
+ "浜屽崄涓�",
+ "浜屽崄浜�",
+ "浜屽崄涓�",
+ "浜屽崄鍥�",
+ "浜屽崄浜�",
+ "浜屽崄鍏�",
+ "浜屽崄涓�",
+ "浜屽崄鍏�",
+ "浜屽崄涔�",
+ "涓夊崄",
+ "涓夊崄涓�",
+ "涓夊崄浜�",
+ "涓夊崄涓�",
+ "涓夊崄鍥�",
+ "涓夊崄浜�",
+ "涓夊崄鍏�",
+ "涓夊崄涓�",
+ "涓夊崄鍏�",
+ "涓夊崄涔�",
+ "鍥涘崄",
+ "鍥涘崄涓�",
+ "鍥涘崄浜�",
+ "鍥涘崄涓�",
+ "鍥涘崄鍥�",
+ "鍥涘崄浜�",
+ ];
+
+ return data.sort((a, b) => {
+ const getIndex = (name) => {
+ if (!name || typeof name !== "string") return -1;
+ const chineseMatch = name.match(/^([涓�浜屼笁鍥涗簲鍏竷鍏節鍗乚+)/);
+ if (chineseMatch && chineseMatch[1]) {
+ return order.indexOf(chineseMatch[1]);
+ }
+ const arabicMatch = name.match(/^(\d+)/);
+ if (arabicMatch && arabicMatch[1]) {
+ const num = parseInt(arabicMatch[1], 10);
+ if (num >= 1 && num <= 45) {
+ return num - 1;
+ }
+ }
+ return -1;
+ };
+
+ const indexA = getIndex(a.leavehospitaldistrictname);
+ const indexB = getIndex(b.leavehospitaldistrictname);
+
+ if (indexA === -1 && indexB === -1) {
+ return (a.leavehospitaldistrictname || "").localeCompare(
+ b.leavehospitaldistrictname || ""
+ );
+ }
+ if (indexA === -1) return 1;
+ if (indexB === -1) return -1;
+ return indexA - indexB;
+ });
+ },
+
+ sortChineseNumber(aRow, bRow) {
+ const a = aRow.leavehospitaldistrictname;
+ const b = bRow.leavehospitaldistrictname;
+
+ const chineseNumMap = {
+ 涓�: 1,
+ 浜�: 2,
+ 涓�: 3,
+ 鍥�: 4,
+ 浜�: 5,
+ 鍏�: 6,
+ 涓�: 7,
+ 鍏�: 8,
+ 涔�: 9,
+ 鍗�: 10,
+ 鍗佷竴: 11,
+ 鍗佷簩: 12,
+ 鍗佷笁: 13,
+ 鍗佸洓: 14,
+ 鍗佷簲: 15,
+ 鍗佸叚: 16,
+ 鍗佷竷: 17,
+ 鍗佸叓: 18,
+ 鍗佷節: 19,
+ 浜屽崄: 20,
+ 浜屽崄涓�: 21,
+ 浜屽崄浜�: 22,
+ 浜屽崄涓�: 23,
+ 浜屽崄鍥�: 24,
+ 浜屽崄浜�: 25,
+ 浜屽崄鍏�: 26,
+ 浜屽崄涓�: 27,
+ 浜屽崄鍏�: 28,
+ 浜屽崄涔�: 29,
+ 涓夊崄: 30,
+ 涓夊崄涓�: 31,
+ 涓夊崄浜�: 32,
+ 涓夊崄涓�: 33,
+ 涓夊崄鍥�: 34,
+ 涓夊崄浜�: 35,
+ 涓夊崄鍏�: 36,
+ 涓夊崄涓�: 37,
+ 涓夊崄鍏�: 38,
+ 涓夊崄涔�: 39,
+ 鍥涘崄: 40,
+ 鍥涘崄涓�: 41,
+ 鍥涘崄浜�: 42,
+ 鍥涘崄涓�: 43,
+ 鍥涘崄鍥�: 44,
+ 鍥涘崄浜�: 45,
+ };
+
+ const getNumberFromText = (text) => {
+ if (!text || typeof text !== "string") return -1;
+ const match = text.match(/^([涓�浜屼笁鍥涗簲鍏竷鍏節鍗乚+)/);
+ if (match && match[1]) {
+ const chineseNum = match[1];
+ return chineseNumMap[chineseNum] !== undefined
+ ? chineseNumMap[chineseNum]
+ : -1;
+ }
+ const arabicMatch = text.match(/^(\d+)/);
+ if (arabicMatch && arabicMatch[1]) {
+ const num = parseInt(arabicMatch[1], 10);
+ return num >= 1 && num <= 45 ? num : -1;
+ }
+ return -1;
+ };
+
+ const numA = getNumberFromText(a);
+ const numB = getNumberFromText(b);
+
+ if (numA === -1 && numB === -1) {
+ return (a || "").localeCompare(b || "");
+ }
+ if (numA === -1) return 1;
+ if (numB === -1) return -1;
+ return numA - numB;
+ },
+
+ getRowKey(row) {
+ return row.statisticaltype == 1
+ ? row.leavehospitaldistrictcode
+ : row.deptcode;
+ },
+
+ handleRowClick(row) {
+ if (this.expands.includes(this.getRowKey(row))) {
+ this.expands = [];
+ return;
+ }
+
+ const params = {
+ ...this.queryParams,
+ deptcodes: this.queryParams.deptcodes.includes("all")
+ ? this.getAllDeptCodes()
+ : this.queryParams.deptcodes,
+ leavehospitaldistrictcodes: [row.leavehospitaldistrictcode],
+ drcode: "1",
+ visitCount: 1,
+ };
+
+ delete params.leavehospitaldistrictcodes.all;
+ delete params.deptcodes.all;
+
+ if (!row.doctorStats) {
+ this.loading = true;
+ params.rateDay = 7;
+
+ getSpecialSfStatistics(params).then((res) => {
+ this.$set(row, "doctorStats", res.data);
+ this.expands = [this.getRowKey(row)];
+ this.loading = false;
+ });
+ } else {
+ this.expands = [this.getRowKey(row)];
+ }
+ },
+ // 璁$畻鎴愬姛鐜囩殑鏂规硶
+ calculateSuccessRate(followUpSuccess, needFollowUp, pendingFollowUp) {
+ const success = Number(followUpSuccess) || 0;
+ const need = Number(needFollowUp) || 0;
+ const pending = Number(pendingFollowUp) || 0;
+
+ // 鍒嗘瘝 = 闇�闅忚 - 寰呴殢璁�
+ const denominator = need - pending;
+
+ if (denominator <= 0) {
+ return "0.00%";
+ }
+
+ const rate = (success / denominator) * 100;
+ return rate.toFixed(2) + "%";
+ },
+ // 鍦ㄧ粺璁℃眹鎬绘柟娉曚腑澶勭悊鎴愬姛鐜�
+ getSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ return;
+ }
+ if (index === 1) {
+ sums[index] = "/";
+ return;
+ }
+
+ if (column.property === "successRate") {
+ // 鎴愬姛鐜囬渶瑕侀噸鏂拌绠楁�荤殑鎴愬姛鐜囷紝鑰屼笉鏄钩鍧囧��
+ const totalSuccess = data.reduce((sum, item) => {
+ return sum + (Number(item.followUpSuccess) || 0);
+ }, 0);
+
+ const totalNeed = data.reduce((sum, item) => {
+ return sum + (Number(item.needFollowUp) || 0);
+ }, 0);
+
+ const totalPending = data.reduce((sum, item) => {
+ return sum + (Number(item.pendingFollowUp) || 0);
+ }, 0);
+
+ const denominator = totalNeed - totalPending;
+
+ if (denominator > 0) {
+ sums[index] = ((totalSuccess / denominator) * 100).toFixed(2) + "%";
+ } else {
+ sums[index] = "0.00%";
+ }
+ } else if (
+ column.property === "followUpRate" ||
+ column.property === "rate"
+ ) {
+ const percentageValues = data
+ .map((item) => {
+ const value = item[column.property];
+ if (!value || value === "-" || value === "0%") return null;
+ if (typeof value === "string" && value.includes("%")) {
+ const numValue = parseFloat(value.replace("%", "")) / 100;
+ return isNaN(numValue) ? null : numValue;
+ } else {
+ const numValue = parseFloat(value);
+ return isNaN(numValue) ? null : numValue;
+ }
+ })
+ .filter((value) => value !== null && value !== 0);
+
+ if (percentageValues.length > 0) {
+ const average =
+ percentageValues.reduce((sum, value) => sum + value, 0) /
+ percentageValues.length;
+ sums[index] = (average * 100).toFixed(2) + "%";
+ } else {
+ sums[index] = "0.00%";
+ }
+ } else {
+ const values = data.map((item) => {
+ const value = item[column.property];
+ if (value === "-" || value === "" || value === null) return 0;
+ return Number(value) || 0;
+ });
+
+ if (!values.every((value) => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => prev + curr, 0);
+ sums[index] = this.formatNumber(sums[index]);
+ } else {
+ sums[index] = "-";
+ }
+ }
+ });
+
+ return sums;
+ },
+
+ getInnerSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "灏忚";
+ return;
+ }
+
+ if (column.property === "drname" || column.property === "deptname") {
+ sums[index] = "-";
+ return;
+ }
+
+ if (column.property === "successRate") {
+ // 鎴愬姛鐜囬渶瑕侀噸鏂拌绠楁�荤殑鎴愬姛鐜囷紝鑰屼笉鏄钩鍧囧��
+ const totalSuccess = data.reduce((sum, item) => {
+ return sum + (Number(item.followUpSuccess) || 0);
+ }, 0);
+
+ const totalNeed = data.reduce((sum, item) => {
+ return sum + (Number(item.needFollowUp) || 0);
+ }, 0);
+
+ const totalPending = data.reduce((sum, item) => {
+ return sum + (Number(item.pendingFollowUp) || 0);
+ }, 0);
+
+ const denominator = totalNeed - totalPending;
+
+ if (denominator > 0) {
+ sums[index] = ((totalSuccess / denominator) * 100).toFixed(2) + "%";
+ } else {
+ sums[index] = "0.00%";
+ }
+ } else if (
+ column.property === "followUpRate" ||
+ column.property === "rate"
+ ) {
+ const percentageValues = data
+ .map((item) => {
+ const value = item[column.property];
+ if (!value || value === "-" || value === "0%") return null;
+ if (typeof value === "string" && value.includes("%")) {
+ const numValue = parseFloat(value.replace("%", "")) / 100;
+ return isNaN(numValue) ? null : numValue;
+ } else {
+ const numValue = parseFloat(value);
+ return isNaN(numValue) ? null : numValue;
+ }
+ })
+ .filter((value) => value !== null && value !== 0);
+
+ if (percentageValues.length > 0) {
+ const average =
+ percentageValues.reduce((sum, value) => sum + value, 0) /
+ percentageValues.length;
+ sums[index] = (average * 100).toFixed(2) + "%";
+ } else {
+ sums[index] = "0.00%";
+ }
+ } else {
+ const values = data.map((item) => {
+ const value = item[column.property];
+ if (value === "-" || value === "" || value === null) return 0;
+ return Number(value) || 0;
+ });
+
+ if (!values.every((value) => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => prev + curr, 0);
+ sums[index] = this.formatNumber(sums[index]);
+ } else {
+ sums[index] = "-";
+ }
+ }
+ });
+
+ return sums;
+ },
+
+ formatNumber(num) {
+ if (isNaN(num)) return "-";
+ return Number.isInteger(num) ? num.toString() : num.toFixed(0);
+ },
+
+ handleSelectionChange(selection) {
+ this.ids = selection.map((item) => item.tagid);
+ },
+
+ handleViewDetails(row, infoKey, titleSuffix, type) {
+ const title = `${
+ row.leavehospitaldistrictname || row.deptname
+ }${titleSuffix}`;
+ this.$emit("view-details", row, infoKey, title, type);
+ },
+
+ handleSeeDetails(row) {
+ this.$emit("see-details", row);
+ },
+ // 涓昏〃瀵煎嚭
+ async exportTable() {
+ try {
+ let dateRangeString = "";
+ let sheetNameSuffix = "";
+
+ // 鍒ゆ柇鏄惁鏄附姘村競涓尰闄�
+ const isLishuiHospital = this.orgname == "涓芥按甯備腑鍖婚櫌";
+
+ if (
+ this.queryParams.dateRange &&
+ this.queryParams.dateRange.length === 2
+ ) {
+ const startDateStr = this.queryParams.dateRange[0];
+ const endDateStr = this.queryParams.dateRange[1];
+
+ if (isLishuiHospital) {
+ // 涓芥按甯備腑鍖婚櫌锛氬彧鏄剧ず骞存湀
+ const formatMonthOnly = (dateTimeStr) => {
+ const date = new Date(dateTimeStr);
+ const year = date.getFullYear();
+ const month = date.getMonth() + 1;
+ return `${year}骞�${month}鏈坄;
+ };
+ const startDateFormatted = formatMonthOnly(startDateStr);
+ const endDateFormatted = formatMonthOnly(endDateStr);
+ dateRangeString = `${startDateFormatted}鑷�${endDateFormatted}`;
+ sheetNameSuffix = `${startDateFormatted}鑷�${endDateFormatted}`;
+ } else {
+ // 鍏朵粬鍖婚櫌锛氭樉绀哄勾鏈堟棩
+ const formatDateForDisplay = (dateTimeStr) => {
+ return dateTimeStr.split(" ")[0];
+ };
+ const startDateFormatted = formatDateForDisplay(startDateStr);
+ const endDateFormatted = formatDateForDisplay(endDateStr);
+ dateRangeString = `${startDateFormatted}鑷�${endDateFormatted}`;
+ sheetNameSuffix = `${startDateFormatted}鑷�${endDateFormatted}`;
+ }
+ } else {
+ const now = new Date();
+ const currentMonth = now.getMonth() + 1;
+ const currentYear = now.getFullYear();
+
+ if (isLishuiHospital) {
+ // 涓芥按甯備腑鍖婚櫌锛氭樉绀哄勾鏈�
+ dateRangeString = `${currentYear}骞�${currentMonth}鏈坄;
+ sheetNameSuffix = `${currentYear}骞�${currentMonth}鏈坄;
+ } else {
+ // 鍏朵粬鍖婚櫌锛氭樉绀烘湀浠�
+ dateRangeString = `${currentMonth}鏈坄;
+ sheetNameSuffix = `${currentMonth}鏈坄;
+ }
+ }
+
+ // 鏍规嵁 serviceType 鐢熸垚闅忚绫诲瀷鍚嶇О
+ let serviceTypeName = "棣栨涓撶梾闅忚"; // 鏂囦欢鍚嶄娇鐢ㄧ殑鍚嶇О
+ let sheetTypeName = "棣栨闅忚"; // 宸ヤ綔琛ㄤ娇鐢ㄧ殑鍚嶇О锛堢畝鍖栫増锛�
+
+ if (
+ this.queryParams.serviceType &&
+ Array.isArray(this.queryParams.serviceType) &&
+ this.queryParams.serviceType.length > 0
+ ) {
+ if (this.tasktypes && Array.isArray(this.tasktypes)) {
+ // 杩囨护鍑哄尮閰嶇殑闅忚绫诲瀷
+ const matchedTypes = this.tasktypes.filter((task) =>
+ this.queryParams.serviceType.includes(task.value)
+ );
+
+ if (matchedTypes.length === 1) {
+ // 鍗曚釜绫诲瀷
+ const label = matchedTypes[0].label;
+ serviceTypeName = `棣栨${label}`;
+ sheetTypeName = `棣栨${label}`;
+ } else if (matchedTypes.length > 1) {
+ // 澶氫釜绫诲瀷
+ const typeNames = matchedTypes.map((task) => task.label);
+
+ // 鏂囦欢鍚嶏細鐢ㄦ枩鏉犲垎闅�
+ serviceTypeName = `棣栨${typeNames.join("/")}`;
+
+ // 宸ヤ綔琛ㄥ悕锛氫娇鐢ㄧ涓�涓被鍨嬫垨绠�鍖栧悕绉�
+ if (matchedTypes.length <= 2) {
+ // 濡傛灉鍙湁2涓被鍨嬶紝閮芥樉绀�
+ sheetTypeName = `棣栨${typeNames[0]}绛塦;
+ } else {
+ // 濡傛灉瓒呰繃2涓被鍨嬶紝鍙樉绀虹涓�涓�
+ sheetTypeName = `棣栨${typeNames[0]}绛塦;
+ }
+ } else if (this.queryParams.serviceType.length > 0) {
+ // 濡傛灉娌℃湁鍖归厤鐨勶紝浣跨敤鍘熷鍊�
+ const typeStr = this.queryParams.serviceType.join("/");
+ serviceTypeName = `棣栨${typeStr}`;
+ sheetTypeName = "棣栨闅忚";
+ }
+ } else if (this.queryParams.serviceType.length > 0) {
+ // 濡傛灉娌℃湁 tasktypes锛屼娇鐢ㄥ師濮嬪��
+ const typeStr = this.queryParams.serviceType.join("/");
+ serviceTypeName = `棣栨${typeStr}`;
+ sheetTypeName = "棣栨闅忚";
+ }
+ }
+
+ const excelName = `${serviceTypeName}缁熻琛╛${dateRangeString}.xlsx`;
+
+ // 娓呯悊宸ヤ綔琛ㄥ悕绉帮紝绉婚櫎闈炴硶瀛楃
+ const cleanSheetName = (name) => {
+ // Excel宸ヤ綔琛ㄥ悕涓嶈兘鍖呭惈鐨勫瓧绗�: * ? : \ / [ ]
+ return name.replace(/[*?:\\/[\]]/g, " ");
+ };
+
+ const worksheetName = cleanSheetName(
+ `${sheetTypeName}缁熻_${sheetNameSuffix}`
+ );
+
+ if (!this.tableData || this.tableData.length === 0) {
+ this.$message.warning(`鏆傛棤${serviceTypeName}鏁版嵁鍙鍑篳);
+ return false;
+ }
+
+ const workbook = new ExcelJS.Workbook();
+ const worksheet = workbook.addWorksheet(worksheetName);
+
+ // 鏋勫缓琛ㄦ牸
+ this.buildExportSheet(worksheet, sheetNameSuffix);
+
+ const buffer = await workbook.xlsx.writeBuffer();
+ const blob = new Blob([buffer], {
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ });
+ saveAs(blob, excelName);
+
+ this.$message.success("瀵煎嚭鎴愬姛");
+ return true;
+ } catch (error) {
+ console.error("瀵煎嚭澶辫触:", error);
+ this.$message.error(`瀵煎嚭澶辫触: ${error.message}`);
+ return false;
+ }
+ },
+ // 瀛愯〃瀵煎嚭
+ /** 瀵煎嚭鍖荤敓瀛愯〃 */
+ async exportDoctorTable(row) {
+ try {
+ const areaName =
+ row.leavehospitaldistrictname || row.deptname || "鏈煡鐥呭尯";
+
+ let dateRangeString = "";
+ if (
+ this.queryParams.dateRange &&
+ this.queryParams.dateRange.length === 2
+ ) {
+ const start = this.queryParams.dateRange[0].split(" ")[0];
+ const end = this.queryParams.dateRange[1].split(" ")[0];
+ dateRangeString = `${start}鑷�${end}`;
+ } else {
+ dateRangeString = `${new Date().getMonth() + 1}鏈坄;
+ }
+
+ const fileName = `${areaName}鍖荤敓闅忚鍒楄〃_${dateRangeString}.xlsx`;
+ const sheetName = `${areaName}鍖荤敓闅忚`;
+
+ if (!row.doctorStats || row.doctorStats.length === 0) {
+ this.$message.warning("褰撳墠鐥呭尯鏆傛棤鍖荤敓闅忚鏁版嵁");
+ return;
+ }
+
+ const workbook = new ExcelJS.Workbook();
+ const worksheet = workbook.addWorksheet(sheetName);
+ console.log(111);
+
+ this.buildDoctorExportSheet(worksheet, row.doctorStats, areaName);
+ console.log(222);
+
+ const buffer = await workbook.xlsx.writeBuffer();
+ saveAs(
+ new Blob([buffer], {
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ }),
+ fileName
+ );
+
+ this.$message.success("鍖荤敓闅忚鍒楄〃瀵煎嚭鎴愬姛");
+ } catch (err) {
+ console.error(err);
+ this.$message.error("瀵煎嚭澶辫触");
+ }
+ },
+ buildDoctorExportSheet(worksheet, data, areaName) {
+ const titleStyle = {
+ font: { name: "寰蒋闆呴粦", size: 16, bold: true },
+ alignment: { horizontal: "center", vertical: "middle" },
+ };
+
+ const headerStyle = {
+ font: { name: "寰蒋闆呴粦", size: 11, bold: true },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ },
+ alignment: { horizontal: "center", vertical: "middle", wrapText: true },
+ border: {
+ top: { style: "thin" },
+ left: { style: "thin" },
+ bottom: { style: "thin" },
+ right: { style: "thin" },
+ },
+ };
+
+ const cellStyle = {
+ font: { name: "瀹嬩綋", size: 10 },
+ alignment: { horizontal: "center", vertical: "middle" },
+ border: {
+ top: { style: "thin" },
+ left: { style: "thin" },
+ bottom: { style: "thin" },
+ right: { style: "thin" },
+ },
+ };
+
+ // 鏍囬
+ worksheet.mergeCells(1, 1, 1, 10);
+ worksheet.getCell(1, 1).value = `${areaName}鍖荤敓闅忚鍒楄〃`;
+ worksheet.getCell(1, 1).style = titleStyle;
+ worksheet.getRow(1).height = 30;
+
+ // 琛ㄥご
+ const headers = [
+ "鍖荤敓濮撳悕",
+ "绉戝",
+ "鍑洪櫌浜烘",
+ "鏃犻渶闅忚",
+ "搴旈殢璁�",
+ "闇�闅忚",
+ "寰呴殢璁�",
+ "闅忚鎴愬姛",
+ "闅忚澶辫触",
+ "鎴愬姛鐜�", // 鏂板
+ // "闅忚鐜�", // 鍘熸潵鍦ㄦ垚鍔熺巼浣嶇疆
+ ];
+
+ const headerRow = worksheet.addRow(headers);
+ headerRow.eachCell((cell) => {
+ cell.style = headerStyle;
+ });
+ worksheet.getRow(2).height = 25;
+
+ // 鏁版嵁
+ data.forEach((item) => {
+ const row = worksheet.addRow([
+ item.drname,
+ item.deptname,
+ item.dischargeCount,
+ item.nonFollowUp,
+ item.followUpNeeded,
+ item.needFollowUp,
+ item.pendingFollowUp,
+ item.followUpSuccess,
+ item.followUpFail,
+ this.calculateSuccessRate(
+ item.followUpSuccess,
+ item.needFollowUp,
+ item.pendingFollowUp
+ ),
+ item.followUpRate,
+ ]);
+ row.eachCell((cell) => {
+ cell.style = cellStyle;
+ });
+ });
+
+ // 灏忚琛�
+ const summaryRow = worksheet.addRow(this.getDoctorExportSummary(data));
+ summaryRow.eachCell((cell) => {
+ cell.font = { bold: true };
+ cell.fill = {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ };
+ });
+
+ // 鍒楀
+ worksheet.columns = [
+ { width: 15 },
+ { width: 15 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 }, // 鎴愬姛鐜�
+ // { width: 12 }, // 闅忚鐜�
+ ];
+ },
+ getDoctorExportSummary(data) {
+ const sums = ["灏忚"];
+
+ const keys = [
+ "dischargeCount",
+ "nonFollowUp",
+ "followUpNeeded",
+ "needFollowUp",
+ "pendingFollowUp",
+ "followUpSuccess",
+ "followUpFail",
+ ];
+
+ keys.forEach((key) => {
+ sums.push(data.reduce((t, r) => t + (Number(r[key]) || 0), 0));
+ });
+
+ // 鎴愬姛鐜囷紙骞冲潎鍊硷級
+ const successRates = data
+ .map((item) => {
+ const success = Number(item.followUpSuccess) || 0;
+ const need = Number(item.needFollowUp) || 0;
+ const pending = Number(item.pendingFollowUp) || 0;
+ const denominator = need - pending;
+ if (denominator <= 0) return 0;
+ return success / denominator;
+ })
+ .filter((rate) => !isNaN(rate));
+
+ sums.push(
+ successRates.length
+ ? (
+ (successRates.reduce((a, b) => a + b, 0) / successRates.length) *
+ 100
+ ).toFixed(2) + "%"
+ : "0.00%"
+ );
+
+ // // 闅忚鐜囷紙骞冲潎鍊硷級
+ // const followUpRates = data
+ // .map((i) => this.extractPercentageValue(i.followUpRate))
+ // .filter(Boolean);
+
+ // sums.push(
+ // followUpRates.length
+ // ? (
+ // (followUpRates.reduce((a, b) => a + b, 0) /
+ // followUpRates.length) *
+ // 100
+ // ).toFixed(2) + "%"
+ // : "0.00%"
+ // );
+
+ return sums;
+ },
+ buildExportSheet(worksheet, sheetNameSuffix) {
+ const titleStyle = {
+ font: {
+ name: "寰蒋闆呴粦",
+ size: 16,
+ bold: true,
+ color: { argb: "FF000000" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFE6F3FF" },
+ },
+ alignment: { vertical: "middle", horizontal: "center", wrapText: true },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const headerStyle = {
+ font: {
+ name: "寰蒋闆呴粦",
+ size: 11,
+ bold: true,
+ color: { argb: "FF000000" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ },
+ alignment: { vertical: "middle", horizontal: "center", wrapText: true },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const cellStyle = {
+ font: { name: "瀹嬩綋", size: 10, color: { argb: "FF000000" } },
+ alignment: { vertical: "middle", horizontal: "center" },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const summaryStyle = {
+ font: {
+ name: "瀹嬩綋",
+ size: 10,
+ bold: true,
+ color: { argb: "FF409EFF" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ },
+ alignment: { vertical: "middle", horizontal: "center" },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ // 娣诲姞鏍囬琛�
+ worksheet.mergeCells(1, 1, 1, 16);
+ const titleCell = worksheet.getCell(1, 1);
+ titleCell.value = `棣栨涓撶梾闅忚缁熻琛╛${sheetNameSuffix}`;
+ titleCell.style = titleStyle;
+ worksheet.getRow(1).height = 35;
+
+ // 琛ㄥご
+ const secondRowHeaders = [
+ "",
+ "鍑洪櫌鐥呭尯",
+ "绉戝",
+ "鍑洪櫌浜烘",
+ "鏃犻渶闅忚浜烘",
+ "搴旈殢璁夸汉娆�",
+ "闇�闅忚",
+ "寰呴殢璁�",
+ "闅忚鎴愬姛",
+ "闅忚澶辫触",
+ "鎴愬姛鐜�", // 鏂板
+ // "闅忚鐜�", // 鍘熶綅缃悗绉�
+ "鍙婃椂鐜�", // 鍙婃椂鐜囧悗绉�
+ "浜哄伐",
+ "璇煶", // 淇锛氬簲璇ユ槸璇煶
+ "鐭俊", // 鐭俊
+ "寰俊", // 寰俊
+ ];
+
+ secondRowHeaders.forEach((header, index) => {
+ const cell = worksheet.getCell(3, index + 1);
+ cell.value = header;
+ cell.style = headerStyle;
+ });
+
+ // 鍚堝苟鍗曞厓鏍�
+ for (let i = 1; i <= 6; i++) {
+ worksheet.mergeCells(2, i, 3, i);
+ const cell = worksheet.getCell(2, i);
+ cell.style = headerStyle;
+ }
+
+ worksheet.getCell(2, 1).value = "";
+ worksheet.getCell(2, 2).value = "鍑洪櫌鐥呭尯";
+ worksheet.getCell(2, 3).value = "绉戝";
+ worksheet.getCell(2, 4).value = "鍑洪櫌浜烘";
+ worksheet.getCell(2, 5).value = "鏃犻渶闅忚浜烘";
+ worksheet.getCell(2, 6).value = "搴旈殢璁夸汉娆�";
+
+ worksheet.mergeCells(2, 7, 2, 16); // 浠�7鍚堝苟鍒�16锛堝師鏉ユ槸7-15锛�
+ worksheet.getCell(2, 7).value = "棣栨涓撶梾闅忚";
+ worksheet.getCell(2, 7).style = headerStyle;
+
+ worksheet.getRow(2).height = 28;
+ worksheet.getRow(3).height = 25;
+
+ // 鏁版嵁琛�
+ this.tableData.forEach((item, rowIndex) => {
+ const dataRow = worksheet.addRow(
+ [
+ "",
+ item.leavehospitaldistrictname || "",
+ item.deptname || "",
+ item.dischargeCount || 0,
+ item.nonFollowUp || 0,
+ item.followUpNeeded || 0,
+ item.needFollowUp || 0,
+ item.pendingFollowUp || 0,
+ item.followUpSuccess || 0,
+ item.followUpFail || 0,
+ // 鎴愬姛鐜� - 闇�瑕佸姩鎬佽绠�
+ this.calculateSuccessRate(
+ item.followUpSuccess,
+ item.needFollowUp,
+ item.pendingFollowUp
+ ),
+ // item.followUpRate || "0%", // 闅忚鐜�
+ item.rate ? (Number(item.rate) * 100).toFixed(2) + "%" : "0%", // 鍙婃椂鐜�
+ item.manual || 0,
+ item.voice || 0, // 璇煶
+ item.sms || 0, // 鐭俊
+ item.weChat || 0, // 寰俊
+ ],
+ rowIndex + 4
+ );
+ dataRow.eachCell((cell) => {
+ cell.style = cellStyle;
+ });
+ dataRow.height = 24;
+ });
+
+ // 鍚堣琛�
+ const summaries = this.getExportSummaries();
+ const summaryRow = worksheet.addRow(summaries);
+ summaryRow.eachCell((cell, colNumber) => {
+ cell.style = summaryStyle;
+ if (colNumber === 1) {
+ cell.value = "鍚堣";
+ }
+ });
+ summaryRow.height = 28;
+
+ // 鍒楀
+ worksheet.columns = [
+ { width: 8 },
+ { width: 20 },
+ { width: 15 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 },
+ { width: 10 },
+ { width: 10 },
+ { width: 10 },
+ { width: 10 },
+ { width: 12 }, // 鎴愬姛鐜�
+ // { width: 12 }, // 闅忚鐜�
+ { width: 12 }, // 鍙婃椂鐜�
+ { width: 8 }, // 浜哄伐
+ { width: 8 }, // 璇煶
+ { width: 8 }, // 鐭俊
+ { width: 8 }, // 寰俊
+ ];
+ },
+
+ getExportSummaries() {
+ const summaries = [
+ "鍚堣",
+ "/",
+ "/",
+ 0, // 3: dischargeCount
+ 0, // 4: nonFollowUp
+ 0, // 5: followUpNeeded
+ 0, // 6: needFollowUp
+ 0, // 7: pendingFollowUp
+ 0, // 8: followUpSuccess
+ 0, // 9: followUpFail
+ "0%", // 10: 鎴愬姛鐜�
+ // "0%", // 11: 闅忚鐜�
+ "0%", // 12: 鍙婃椂鐜�
+ 0, // 13: manual
+ 0, // 14: voice
+ 0, // 15: sms
+ 0, // 16: weChat
+ ];
+
+ this.tableData.forEach((item) => {
+ summaries[3] += Number(item.dischargeCount) || 0;
+ summaries[4] += Number(item.nonFollowUp) || 0;
+ summaries[5] += Number(item.followUpNeeded) || 0;
+ summaries[6] += Number(item.needFollowUp) || 0;
+ summaries[7] += Number(item.pendingFollowUp) || 0;
+ summaries[8] += Number(item.followUpSuccess) || 0;
+ summaries[9] += Number(item.followUpFail) || 0;
+ summaries[13] += Number(item.manual) || 0;
+ summaries[14] += Number(item.voice) || 0;
+ summaries[15] += Number(item.sms) || 0;
+ summaries[16] += Number(item.weChat) || 0;
+ });
+
+ // 鎴愬姛鐜囪绠�
+ const totalSuccess = summaries[8]; // followUpSuccess鐨勬�诲拰
+ const totalNeed = summaries[6]; // needFollowUp鐨勬�诲拰
+ const totalPending = summaries[7]; // pendingFollowUp鐨勬�诲拰
+ const denominator = totalNeed - totalPending;
+
+ if (denominator > 0) {
+ summaries[10] = ((totalSuccess / denominator) * 100).toFixed(2) + "%";
+ } else {
+ summaries[10] = "0.00%";
+ }
+
+ // 闅忚鐜囪绠�
+ // const followUpRateValues = this.tableData
+ // .map((item) => this.extractPercentageValue(item.followUpRate))
+ // .filter((value) => value !== null);
+
+ // if (followUpRateValues.length > 0) {
+ // const avgFollowUpRate =
+ // followUpRateValues.reduce((sum, val) => sum + val, 0) /
+ // followUpRateValues.length;
+ // summaries[11] = (avgFollowUpRate * 100).toFixed(2) + "%";
+ // }
+
+ // 鍙婃椂鐜囪绠�
+ const rateValues = this.tableData
+ .map((item) => this.extractPercentageValue(item.rate))
+ .filter((value) => value !== null);
+
+ if (rateValues.length > 0) {
+ const avgRate =
+ rateValues.reduce((sum, val) => sum + val, 0) / rateValues.length;
+ summaries[12] = (avgRate * 100).toFixed(2) + "%";
+ }
+
+ // 鏍煎紡鍖栨暟瀛�
+ [3, 4, 5, 6, 7, 8, 9, 13, 14, 15, 16].forEach((index) => {
+ summaries[index] = this.formatNumber(summaries[index]);
+ });
+
+ return summaries;
+ },
+
+ extractPercentageValue(value) {
+ if (!value) return null;
+ if (typeof value === "string" && value.includes("%")) {
+ const num = parseFloat(value.replace("%", ""));
+ return isNaN(num) ? null : num / 100;
+ }
+ const num = parseFloat(value);
+ return isNaN(num) ? null : num;
+ },
+
+ selectTimelyRate(row, queryParams) {
+ console.log(row, queryParams, 88);
+
+ // const params = {
+ // ...this.patientqueryParams,
+ // starttime: this.parseTime(dateRange[0]),
+ // endtime: this.parseTime(dateRange[1]),
+ // deptcode: row.deptcode,
+ // };
+ this.patientqueryParams.starttime = this.parseTime(
+ queryParams.dateRange[0]
+ );
+ this.patientqueryParams.endtime = this.parseTime(
+ queryParams.dateRange[1]
+ );
+ this.patientqueryParams.deptcode = row.deptcode;
+ console.log(1);
+
+ this.patientqueryParams.serviceTypes = queryParams.serviceType
+ ? queryParams.serviceType.join(",")
+ : null;
+
+ return selectTimelyRate(this.patientqueryParams);
+ },
+ selectTimelyRates(dateRange) {
+ this.patientqueryParams.pn = dateRange.pageNum;
+ this.patientqueryParams.ps = dateRange.pageSize;
+
+ return selectTimelyRate(this.patientqueryParams);
+ },
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+.first-follow-up {
+ .your-table-container {
+ margin-top: 10px;
+ }
+
+ .button-zx {
+ color: rgb(70, 204, 238);
+ }
+}
+</style>
diff --git a/src/views/Satisfaction/diseaseStatistics/components/SecondFollowUp.vue b/src/views/Satisfaction/diseaseStatistics/components/SecondFollowUp.vue
new file mode 100644
index 0000000..fb14b1a
--- /dev/null
+++ b/src/views/Satisfaction/diseaseStatistics/components/SecondFollowUp.vue
@@ -0,0 +1,1424 @@
+<template>
+ <div class="second-follow-up">
+ <div class="your-table-container">
+ <el-table
+ ref="exportTableSecond"
+ id="exportTableidSecond"
+ v-loading="loading"
+ :data="tableData"
+ :border="true"
+ @selection-change="handleSelectionChange"
+ @expand-change="handleRowClick"
+ :row-key="getRowKey"
+ show-summary
+ :summary-method="getSummaries"
+ :expand-row-keys="expands"
+ >
+ <!-- 琛ㄦ牸鍒楀畾涔� -->
+ <el-table-column
+ v-if="queryParams.statisticaltype == 1"
+ label="鍑洪櫌鐥呭尯"
+ align="center"
+ sortable
+ key="leavehospitaldistrictname"
+ prop="leavehospitaldistrictname"
+ width="150"
+ :show-overflow-tooltip="true"
+ :sort-method="sortChineseNumber"
+ />
+ <el-table-column
+ v-if="queryParams.statisticaltype == 2"
+ label="绉戝"
+ align="center"
+ key="deptname"
+ prop="deptname"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ v-if="queryParams.statisticaltype == 3"
+ label="涓撶梾浠诲姟"
+ width="200"
+ align="center"
+ key="taskName"
+ prop="taskName"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鍑洪櫌浜烘"
+ align="center"
+ key="dischargeCount"
+ prop="dischargeCount"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'dischargeCountInfo',
+ '鍑洪櫌鎮h�呭垪琛�'
+ )
+ "
+ >
+ <span class="button-zx">{{ scope.row.dischargeCount }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鏃犻渶闅忚浜烘"
+ align="center"
+ width="100"
+ key="nonFollowUp"
+ prop="nonFollowUp"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(scope.row, 'nonFollowUpInfo', '鏃犻渶闅忚鍒楄〃')
+ "
+ >
+ <span class="button-zx">{{ scope.row.nonFollowUp }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="搴旈殢璁夸汉娆�"
+ align="center"
+ width="100"
+ key="followUpNeeded"
+ prop="followUpNeeded"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(scope.row, 'followUpNeededInfo', '搴旈殢璁垮垪琛�')
+ "
+ >
+ <span class="button-zx">{{ scope.row.followUpNeeded }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+
+ <el-table-column align="center" label="鍐嶆涓撶梾闅忚">
+ <el-table-column
+ label="闇�闅忚"
+ align="center"
+ key="needFollowUpAgain"
+ prop="needFollowUpAgain"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'needFollowUpAgainInfo',
+ '鍐嶆闅忚闇�闅忚鍒楄〃'
+ )
+ "
+ >
+ <span class="button-zx">{{ scope.row.needFollowUpAgain }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="寰呴殢璁�"
+ align="center"
+ key="pendingFollowUpAgain"
+ prop="pendingFollowUpAgain"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'pendingFollowUpAgainInfo',
+ '鍐嶆闅忚寰呴殢璁垮垪琛�'
+ )
+ "
+ >
+ <span class="button-zx">{{
+ scope.row.pendingFollowUpAgain
+ }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="闅忚鎴愬姛"
+ align="center"
+ key="followUpSuccessAgain"
+ prop="followUpSuccessAgain"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'followUpSuccessAgainInfo',
+ '鍐嶆闅忚闅忚鎴愬姛鍒楄〃'
+ )
+ "
+ >
+ <span class="button-zx">{{
+ scope.row.followUpSuccessAgain
+ }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="闅忚澶辫触"
+ align="center"
+ key="followUpFailAgain"
+ prop="followUpFailAgain"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'followUpFailAgainInfo',
+ '鍐嶆闅忚闅忚澶辫触鍒楄〃'
+ )
+ "
+ >
+ <span class="button-zx">{{ scope.row.followUpFailAgain }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎴愬姛鐜�"
+ align="center"
+ width="120"
+ key="successRateAgain"
+ prop="successRateAgain"
+ >
+ <template slot-scope="scope">
+ <span class="success-rate">{{
+ calculateSuccessRate(
+ scope.row.followUpSuccessAgain,
+ scope.row.needFollowUpAgain,
+ scope.row.pendingFollowUpAgain
+ )
+ }}</span>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column
+ label="闅忚鐜�"
+ align="center"
+ width="120"
+ key="followUpRateAgain"
+ prop="followUpRateAgain"
+ /> -->
+ <el-table-column
+ label="浜哄伐"
+ align="center"
+ key="manualAgain"
+ prop="manualAgain"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'manualAgainInfo',
+ '鍐嶆闅忚浜哄伐闅忚鍒楄〃'
+ )
+ "
+ >
+ <span class="button-zx">{{ scope.row.manualAgain }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="璇煶"
+ align="center"
+ key="voiceAgain"
+ prop="voiceAgain"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(scope.row, 'voiceAgainInfo', '璇煶闅忚鍒楄〃')
+ "
+ >
+ <span class="button-zx">{{ scope.row.voiceAgain }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鐭俊"
+ align="center"
+ key="smsAgain"
+ prop="smsAgain"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'smsAgainInfo',
+ '鍐嶆闅忚鐭俊闅忚鍒楄〃'
+ )
+ "
+ >
+ <span class="button-zx">{{ scope.row.smsAgain }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="寰俊"
+ align="center"
+ key="weChatAgain"
+ prop="weChatAgain"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'weChatAgainInfo',
+ '鍐嶆闅忚寰俊闅忚鍒楄〃'
+ )
+ "
+ >
+ <span class="button-zx">{{ scope.row.weChatAgain }}</span>
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+</template>
+
+<script>
+import { getSfStatistics } from "@/api/system/user";
+import ExcelJS from "exceljs";
+import { saveAs } from "file-saver";
+import store from "@/store";
+
+export default {
+ name: "SecondFollowUp",
+ props: {
+ queryParams: {
+ type: Object,
+ required: true,
+ },
+ flatArrayhospit: {
+ type: Array,
+ default: () => [],
+ },
+ flatArraydept: {
+ type: Array,
+ default: () => [],
+ },
+ options: {
+ type: Array,
+ default: () => [],
+ },
+ orgname: {
+ type: String,
+ default: "",
+ },
+ },
+ data() {
+ return {
+ tableData: [],
+ loading: false,
+ expands: [],
+ ids: [],
+ tasktypes: store.getters.tasktypes,
+ };
+ },
+ methods: {
+ loadData() {
+ this.loading = true;
+ const params = {
+ ...this.queryParams,
+ visitCount: 2,
+ leavehospitaldistrictcodes:
+ this.queryParams.leavehospitaldistrictcodes.includes("all")
+ ? this.getAllWardCodes()
+ : this.queryParams.leavehospitaldistrictcodes,
+ deptcodes: this.queryParams.deptcodes.includes("all")
+ ? this.getAllDeptCodes()
+ : this.queryParams.deptcodes,
+ };
+
+ delete params.leavehospitaldistrictcodes.all;
+ delete params.deptcodes.all;
+ params.rateDay = 7;
+
+ getSfStatistics(params)
+ .then((response) => {
+ this.tableData = this.customSort(response.data);
+ })
+ .catch((error) => {
+ console.error("鑾峰彇鍐嶆闅忚鏁版嵁澶辫触:", error);
+ this.$message.error("鑾峰彇鍐嶆闅忚鏁版嵁澶辫触");
+ })
+ .finally(() => {
+ this.loading = false;
+ });
+ },
+
+ getAllWardCodes() {
+ return this.flatArrayhospit
+ .filter((item) => item.value !== "all")
+ .map((item) => item.value);
+ },
+
+ getAllDeptCodes() {
+ return this.flatArraydept
+ .filter((item) => item.value !== "all")
+ .map((item) => item.value);
+ },
+
+ customSort(data) {
+ const order = [
+ "涓�",
+ "浜�",
+ "涓�",
+ "鍥�",
+ "浜�",
+ "鍏�",
+ "涓�",
+ "鍏�",
+ "涔�",
+ "鍗�",
+ "鍗佷竴",
+ "鍗佷簩",
+ "鍗佷笁",
+ "鍗佸洓",
+ "鍗佷簲",
+ "鍗佸叚",
+ "鍗佷竷",
+ "鍗佸叓",
+ "鍗佷節",
+ "浜屽崄",
+ "浜屽崄涓�",
+ "浜屽崄浜�",
+ "浜屽崄涓�",
+ "浜屽崄鍥�",
+ "浜屽崄浜�",
+ "浜屽崄鍏�",
+ "浜屽崄涓�",
+ "浜屽崄鍏�",
+ "浜屽崄涔�",
+ "涓夊崄",
+ "涓夊崄涓�",
+ "涓夊崄浜�",
+ "涓夊崄涓�",
+ "涓夊崄鍥�",
+ "涓夊崄浜�",
+ "涓夊崄鍏�",
+ "涓夊崄涓�",
+ "涓夊崄鍏�",
+ "涓夊崄涔�",
+ "鍥涘崄",
+ "鍥涘崄涓�",
+ "鍥涘崄浜�",
+ "鍥涘崄涓�",
+ "鍥涘崄鍥�",
+ "鍥涘崄浜�",
+ ];
+
+ return data.sort((a, b) => {
+ const getIndex = (name) => {
+ if (!name || typeof name !== "string") return -1;
+ const chineseMatch = name.match(/^([涓�浜屼笁鍥涗簲鍏竷鍏節鍗乚+)/);
+ if (chineseMatch && chineseMatch[1]) {
+ return order.indexOf(chineseMatch[1]);
+ }
+ const arabicMatch = name.match(/^(\d+)/);
+ if (arabicMatch && arabicMatch[1]) {
+ const num = parseInt(arabicMatch[1], 10);
+ if (num >= 1 && num <= 45) {
+ return num - 1;
+ }
+ }
+ return -1;
+ };
+
+ const indexA = getIndex(a.leavehospitaldistrictname);
+ const indexB = getIndex(b.leavehospitaldistrictname);
+
+ if (indexA === -1 && indexB === -1) {
+ return (a.leavehospitaldistrictname || "").localeCompare(
+ b.leavehospitaldistrictname || ""
+ );
+ }
+ if (indexA === -1) return 1;
+ if (indexB === -1) return -1;
+ return indexA - indexB;
+ });
+ },
+
+ sortChineseNumber(aRow, bRow) {
+ const a = aRow.leavehospitaldistrictname;
+ const b = bRow.leavehospitaldistrictname;
+
+ const chineseNumMap = {
+ 涓�: 1,
+ 浜�: 2,
+ 涓�: 3,
+ 鍥�: 4,
+ 浜�: 5,
+ 鍏�: 6,
+ 涓�: 7,
+ 鍏�: 8,
+ 涔�: 9,
+ 鍗�: 10,
+ 鍗佷竴: 11,
+ 鍗佷簩: 12,
+ 鍗佷笁: 13,
+ 鍗佸洓: 14,
+ 鍗佷簲: 15,
+ 鍗佸叚: 16,
+ 鍗佷竷: 17,
+ 鍗佸叓: 18,
+ 鍗佷節: 19,
+ 浜屽崄: 20,
+ 浜屽崄涓�: 21,
+ 浜屽崄浜�: 22,
+ 浜屽崄涓�: 23,
+ 浜屽崄鍥�: 24,
+ 浜屽崄浜�: 25,
+ 浜屽崄鍏�: 26,
+ 浜屽崄涓�: 27,
+ 浜屽崄鍏�: 28,
+ 浜屽崄涔�: 29,
+ 涓夊崄: 30,
+ 涓夊崄涓�: 31,
+ 涓夊崄浜�: 32,
+ 涓夊崄涓�: 33,
+ 涓夊崄鍥�: 34,
+ 涓夊崄浜�: 35,
+ 涓夊崄鍏�: 36,
+ 涓夊崄涓�: 37,
+ 涓夊崄鍏�: 38,
+ 涓夊崄涔�: 39,
+ 鍥涘崄: 40,
+ 鍥涘崄涓�: 41,
+ 鍥涘崄浜�: 42,
+ 鍥涘崄涓�: 43,
+ 鍥涘崄鍥�: 44,
+ 鍥涘崄浜�: 45,
+ };
+
+ const getNumberFromText = (text) => {
+ if (!text || typeof text !== "string") return -1;
+ const match = text.match(/^([涓�浜屼笁鍥涗簲鍏竷鍏節鍗乚+)/);
+ if (match && match[1]) {
+ const chineseNum = match[1];
+ return chineseNumMap[chineseNum] !== undefined
+ ? chineseNumMap[chineseNum]
+ : -1;
+ }
+ const arabicMatch = text.match(/^(\d+)/);
+ if (arabicMatch && arabicMatch[1]) {
+ const num = parseInt(arabicMatch[1], 10);
+ return num >= 1 && num <= 45 ? num : -1;
+ }
+ return -1;
+ };
+
+ const numA = getNumberFromText(a);
+ const numB = getNumberFromText(b);
+
+ if (numA === -1 && numB === -1) {
+ return (a || "").localeCompare(b || "");
+ }
+ if (numA === -1) return 1;
+ if (numB === -1) return -1;
+ return numA - numB;
+ },
+
+ getRowKey(row) {
+ return row.statisticaltype === 1
+ ? row.leavehospitaldistrictcode
+ : row.deptcode;
+ },
+
+ handleRowClick(row) {
+ if (this.expands.includes(this.getRowKey(row))) {
+ this.expands = [];
+ return;
+ }
+
+ const params = {
+ ...this.queryParams,
+ deptcodes: this.queryParams.deptcodes.includes("all")
+ ? this.getAllDeptCodes()
+ : this.queryParams.deptcodes,
+ leavehospitaldistrictcodes: [row.leavehospitaldistrictcode],
+ drcode: "1",
+ visitCount: 2,
+ };
+
+ delete params.leavehospitaldistrictcodes.all;
+ delete params.deptcodes.all;
+
+ if (!row.doctorStats) {
+ this.loading = true;
+ params.rateDay = 7;
+
+ getSfStatistics(params).then((res) => {
+ this.$set(row, "doctorStats", res.data);
+ this.expands = [this.getRowKey(row)];
+ this.loading = false;
+ });
+ } else {
+ this.expands = [this.getRowKey(row)];
+ }
+ },
+
+ // 鍦ㄧ粺璁℃眹鎬绘柟娉曚腑澶勭悊鎴愬姛鐜�
+ getSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ return;
+ }
+ if (index === 1) {
+ sums[index] = "/";
+ return;
+ }
+
+ if (column.property === "successRateAgain") {
+ // 鎴愬姛鐜囬渶瑕侀噸鏂拌绠楁�荤殑鎴愬姛鐜囷紝鑰屼笉鏄钩鍧囧��
+ const totalSuccess = data.reduce((sum, item) => {
+ return sum + (Number(item.followUpSuccessAgain) || 0);
+ }, 0);
+
+ const totalNeed = data.reduce((sum, item) => {
+ return sum + (Number(item.needFollowUpAgain) || 0);
+ }, 0);
+
+ const totalPending = data.reduce((sum, item) => {
+ return sum + (Number(item.pendingFollowUpAgain) || 0);
+ }, 0);
+
+ const denominator = totalNeed - totalPending;
+
+ if (denominator > 0) {
+ sums[index] = ((totalSuccess / denominator) * 100).toFixed(2) + "%";
+ } else {
+ sums[index] = "0.00%";
+ }
+ } else if (column.property === "followUpRateAgain") {
+ const percentageValues = data
+ .map((item) => {
+ const value = item[column.property];
+ if (!value || value === "-" || value === "0%") return null;
+ if (typeof value === "string" && value.includes("%")) {
+ const numValue = parseFloat(value.replace("%", "")) / 100;
+ return isNaN(numValue) ? null : numValue;
+ } else {
+ const numValue = parseFloat(value);
+ return isNaN(numValue) ? null : numValue;
+ }
+ })
+ .filter((value) => value !== null && value !== 0);
+
+ if (percentageValues.length > 0) {
+ const average =
+ percentageValues.reduce((sum, value) => sum + value, 0) /
+ percentageValues.length;
+ sums[index] = (average * 100).toFixed(2) + "%";
+ } else {
+ sums[index] = "0.00%";
+ }
+ } else {
+ const values = data.map((item) => {
+ const value = item[column.property];
+ if (value === "-" || value === "" || value === null) return 0;
+ return Number(value) || 0;
+ });
+
+ if (!values.every((value) => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => prev + curr, 0);
+ sums[index] = this.formatNumber(sums[index]);
+ } else {
+ sums[index] = "-";
+ }
+ }
+ });
+
+ return sums;
+ },
+
+ getInnerSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "灏忚";
+ return;
+ }
+
+ if (column.property === "drname" || column.property === "deptname") {
+ sums[index] = "-";
+ return;
+ }
+
+ if (column.property === "successRateAgain") {
+ // 鎴愬姛鐜囬渶瑕侀噸鏂拌绠楁�荤殑鎴愬姛鐜囷紝鑰屼笉鏄钩鍧囧��
+ const totalSuccess = data.reduce((sum, item) => {
+ return sum + (Number(item.followUpSuccessAgain) || 0);
+ }, 0);
+
+ const totalNeed = data.reduce((sum, item) => {
+ return sum + (Number(item.needFollowUpAgain) || 0);
+ }, 0);
+
+ const totalPending = data.reduce((sum, item) => {
+ return sum + (Number(item.pendingFollowUpAgain) || 0);
+ }, 0);
+
+ const denominator = totalNeed - totalPending;
+
+ if (denominator > 0) {
+ sums[index] = ((totalSuccess / denominator) * 100).toFixed(2) + "%";
+ } else {
+ sums[index] = "0.00%";
+ }
+ } else if (column.property === "followUpRateAgain") {
+ const percentageValues = data
+ .map((item) => {
+ const value = item[column.property];
+ if (!value || value === "-" || value === "0%") return null;
+ if (typeof value === "string" && value.includes("%")) {
+ const numValue = parseFloat(value.replace("%", "")) / 100;
+ return isNaN(numValue) ? null : numValue;
+ } else {
+ const numValue = parseFloat(value);
+ return isNaN(numValue) ? null : numValue;
+ }
+ })
+ .filter((value) => value !== null && value !== 0);
+
+ if (percentageValues.length > 0) {
+ const average =
+ percentageValues.reduce((sum, value) => sum + value, 0) /
+ percentageValues.length;
+ sums[index] = (average * 100).toFixed(2) + "%";
+ } else {
+ sums[index] = "0.00%";
+ }
+ } else {
+ const values = data.map((item) => {
+ const value = item[column.property];
+ if (value === "-" || value === "" || value === null) return 0;
+ return Number(value) || 0;
+ });
+
+ if (!values.every((value) => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => prev + curr, 0);
+ sums[index] = this.formatNumber(sums[index]);
+ } else {
+ sums[index] = "-";
+ }
+ }
+ });
+
+ return sums;
+ },
+
+ formatNumber(num) {
+ if (isNaN(num)) return "-";
+ return Number.isInteger(num) ? num.toString() : num.toFixed(0);
+ },
+
+ handleSelectionChange(selection) {
+ this.ids = selection.map((item) => item.tagid);
+ },
+
+ handleViewDetails(row, infoKey, titleSuffix, type) {
+ const title = `${
+ row.leavehospitaldistrictname || row.deptname
+ }${titleSuffix}`;
+ this.$emit("view-details", row, infoKey, title, type);
+ },
+ // 璁$畻鎴愬姛鐜囩殑鏂规硶
+ calculateSuccessRate(followUpSuccess, needFollowUp, pendingFollowUp) {
+ const success = Number(followUpSuccess) || 0;
+ const need = Number(needFollowUp) || 0;
+ const pending = Number(pendingFollowUp) || 0;
+
+ // 鍒嗘瘝 = 闇�闅忚 - 寰呴殢璁�
+ const denominator = need - pending;
+
+ if (denominator <= 0) {
+ return "0.00%";
+ }
+
+ const rate = (success / denominator) * 100;
+ return rate.toFixed(2) + "%";
+ },
+ async exportTable() {
+ try {
+ let dateRangeString = "";
+ let sheetNameSuffix = "";
+
+ // 鍒ゆ柇鏄惁鏄附姘村競涓尰闄�
+ const isLishuiHospital = this.orgname == "涓芥按甯備腑鍖婚櫌";
+
+ if (
+ this.queryParams.dateRange &&
+ this.queryParams.dateRange.length === 2
+ ) {
+ const startDateStr = this.queryParams.dateRange[0];
+ const endDateStr = this.queryParams.dateRange[1];
+
+ if (isLishuiHospital) {
+ // 涓芥按甯備腑鍖婚櫌锛氬彧鏄剧ず骞存湀
+ const formatMonthOnly = (dateTimeStr) => {
+ const date = new Date(dateTimeStr);
+ const year = date.getFullYear();
+ const month = date.getMonth() + 1;
+ return `${year}骞�${month}鏈坄;
+ };
+ const startDateFormatted = formatMonthOnly(startDateStr);
+ const endDateFormatted = formatMonthOnly(endDateStr);
+ dateRangeString = `${startDateFormatted}鑷�${endDateFormatted}`;
+ sheetNameSuffix = `${startDateFormatted}鑷�${endDateFormatted}`;
+ } else {
+ // 鍏朵粬鍖婚櫌锛氭樉绀哄勾鏈堟棩
+ const formatDateForDisplay = (dateTimeStr) => {
+ return dateTimeStr.split(" ")[0];
+ };
+ const startDateFormatted = formatDateForDisplay(startDateStr);
+ const endDateFormatted = formatDateForDisplay(endDateStr);
+ dateRangeString = `${startDateFormatted}鑷�${endDateFormatted}`;
+ sheetNameSuffix = `${startDateFormatted}鑷�${endDateFormatted}`;
+ }
+ } else {
+ const now = new Date();
+ const currentMonth = now.getMonth() + 1;
+ const currentYear = now.getFullYear();
+
+ if (isLishuiHospital) {
+ // 涓芥按甯備腑鍖婚櫌锛氭樉绀哄勾鏈�
+ dateRangeString = `${currentYear}骞�${currentMonth}鏈坄;
+ sheetNameSuffix = `${currentYear}骞�${currentMonth}鏈坄;
+ } else {
+ // 鍏朵粬鍖婚櫌锛氭樉绀烘湀浠�
+ dateRangeString = `${currentMonth}鏈坄;
+ sheetNameSuffix = `${currentMonth}鏈坄;
+ }
+ }
+
+ // 鏍规嵁 serviceType 鐢熸垚闅忚绫诲瀷鍚嶇О
+ let serviceTypeName = "鍑洪櫌闅忚"; // 鏂囦欢鍚嶄娇鐢ㄧ殑鍚嶇О
+ let sheetTypeName = "鍐嶆闅忚"; // 宸ヤ綔琛ㄤ娇鐢ㄧ殑鍚嶇О锛堢畝鍖栫増锛�
+ console.log(this.queryParams.serviceType);
+
+ if (
+ this.queryParams.serviceType &&
+ Array.isArray(this.queryParams.serviceType) &&
+ this.queryParams.serviceType.length > 0
+ ) {
+ if (this.tasktypes && Array.isArray(this.tasktypes)) {
+ // 杩囨护鍑哄尮閰嶇殑闅忚绫诲瀷
+ const matchedTypes = this.tasktypes.filter((task) =>
+ this.queryParams.serviceType.includes(task.value)
+ );
+
+ if (matchedTypes.length === 1) {
+ // 鍗曚釜绫诲瀷
+ const label = matchedTypes[0].label;
+ serviceTypeName = label;
+ sheetTypeName = label;
+ } else if (matchedTypes.length > 1) {
+ // 澶氫釜绫诲瀷
+ const typeNames = matchedTypes.map((task) => task.label);
+
+ // 鏂囦欢鍚嶏細鐢ㄦ枩鏉犲垎闅�
+ serviceTypeName = typeNames.join("/");
+
+ // 宸ヤ綔琛ㄥ悕锛氫娇鐢ㄧ涓�涓被鍨嬫垨绠�鍖栧悕绉�
+ if (matchedTypes.length <= 2) {
+ // 濡傛灉鍙湁2涓被鍨嬶紝閮芥樉绀�
+ sheetTypeName = `${typeNames[0]}绛塦;
+ } else {
+ // 濡傛灉瓒呰繃2涓被鍨嬶紝鍙樉绀虹涓�涓�
+ sheetTypeName = `${typeNames[0]}绛塦;
+ }
+ } else if (this.queryParams.serviceType.length > 0) {
+ // 濡傛灉娌℃湁鍖归厤鐨勶紝浣跨敤鍘熷鍊�
+ const typeStr = this.queryParams.serviceType.join("/");
+ serviceTypeName = typeStr;
+ sheetTypeName = "鍐嶆闅忚";
+ }
+ } else if (this.queryParams.serviceType.length > 0) {
+ // 濡傛灉娌℃湁 tasktypes锛屼娇鐢ㄥ師濮嬪��
+ const typeStr = this.queryParams.serviceType.join("/");
+ serviceTypeName = typeStr;
+ sheetTypeName = "鍐嶆闅忚";
+ }
+ }
+
+ const excelName = `鍐嶆${serviceTypeName}缁熻琛╛${dateRangeString}.xlsx`;
+
+ // 娓呯悊宸ヤ綔琛ㄥ悕绉帮紝绉婚櫎闈炴硶瀛楃
+ const cleanSheetName = (name) => {
+ // Excel宸ヤ綔琛ㄥ悕涓嶈兘鍖呭惈鐨勫瓧绗�: * ? : \ / [ ]
+ return name.replace(/[*?:\\/[\]]/g, " ");
+ };
+
+ const worksheetName = cleanSheetName(
+ `鍐嶆${sheetTypeName}缁熻_${sheetNameSuffix}`
+ );
+
+ if (!this.tableData || this.tableData.length === 0) {
+ this.$message.warning(`鏆傛棤鍐嶆${serviceTypeName}鏁版嵁鍙鍑篳);
+ return false;
+ }
+
+ const workbook = new ExcelJS.Workbook();
+ const worksheet = workbook.addWorksheet(worksheetName);
+
+ // 鏋勫缓琛ㄦ牸
+ this.buildExportSheet(worksheet, sheetNameSuffix);
+
+ const buffer = await workbook.xlsx.writeBuffer();
+ const blob = new Blob([buffer], {
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ });
+ saveAs(blob, excelName);
+
+ this.$message.success("瀵煎嚭鎴愬姛");
+ return true;
+ } catch (error) {
+ console.error("瀵煎嚭澶辫触:", error);
+ this.$message.error(`瀵煎嚭澶辫触: ${error.message}`);
+ return false;
+ }
+ },
+ /** 瀵煎嚭鍖荤敓瀛愯〃锛堝啀娆¢殢璁匡級 */
+ async exportDoctorTable(row) {
+ try {
+ const areaName =
+ row.leavehospitaldistrictname || row.deptname || "鏈煡鐥呭尯";
+
+ let dateRangeString = "";
+ if (
+ this.queryParams.dateRange &&
+ this.queryParams.dateRange.length === 2
+ ) {
+ const start = this.queryParams.dateRange[0].split(" ")[0];
+ const end = this.queryParams.dateRange[1].split(" ")[0];
+ dateRangeString = `${start}鑷�${end}`;
+ } else {
+ dateRangeString = `${new Date().getMonth() + 1}鏈坄;
+ }
+
+ const fileName = `${areaName}鍖荤敓鍐嶆闅忚鍒楄〃_${dateRangeString}.xlsx`;
+ const sheetName = `${areaName}鍖荤敓鍐嶆闅忚`;
+
+ if (!row.doctorStats || row.doctorStats.length === 0) {
+ this.$message.warning("褰撳墠鐥呭尯鏆傛棤鍖荤敓鍐嶆闅忚鏁版嵁");
+ return;
+ }
+
+ const workbook = new ExcelJS.Workbook();
+ const worksheet = workbook.addWorksheet(sheetName);
+
+ this.buildDoctorExportSheet(worksheet, row.doctorStats, areaName);
+
+ const buffer = await workbook.xlsx.writeBuffer();
+ saveAs(
+ new Blob([buffer], {
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ }),
+ fileName
+ );
+
+ this.$message.success("鍖荤敓鍐嶆闅忚鍒楄〃瀵煎嚭鎴愬姛");
+ } catch (err) {
+ console.error(err);
+ this.$message.error("瀵煎嚭澶辫触");
+ }
+ },
+ buildDoctorExportSheet(worksheet, data, areaName) {
+ const titleStyle = {
+ font: { name: "寰蒋闆呴粦", size: 16, bold: true },
+ alignment: { horizontal: "center", vertical: "middle" },
+ };
+
+ const headerStyle = {
+ font: { name: "寰蒋闆呴粦", size: 11, bold: true },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ },
+ alignment: { horizontal: "center", vertical: "middle", wrapText: true },
+ border: {
+ top: { style: "thin" },
+ left: { style: "thin" },
+ bottom: { style: "thin" },
+ right: { style: "thin" },
+ },
+ };
+
+ const cellStyle = {
+ font: { name: "瀹嬩綋", size: 10 },
+ alignment: { horizontal: "center", vertical: "middle" },
+ border: {
+ top: { style: "thin" },
+ left: { style: "thin" },
+ bottom: { style: "thin" },
+ right: { style: "thin" },
+ },
+ };
+
+ // 鏍囬
+ worksheet.mergeCells(1, 1, 1, 10);
+ worksheet.getCell(1, 1).value = `${areaName}鍖荤敓鍐嶆闅忚鍒楄〃`;
+ worksheet.getCell(1, 1).style = titleStyle;
+ worksheet.getRow(1).height = 30;
+
+ // 琛ㄥご
+ const headers = [
+ "鍖荤敓濮撳悕",
+ "绉戝",
+ "鍑洪櫌浜烘",
+ "鏃犻渶闅忚",
+ "搴旈殢璁�",
+ "闇�闅忚",
+ "寰呴殢璁�",
+ "闅忚鎴愬姛",
+ "闅忚澶辫触",
+ "鎴愬姛鐜�", // 鏂板
+ // "闅忚鐜�", // 鍘熸潵鍦ㄦ垚鍔熺巼浣嶇疆
+ ];
+
+ const headerRow = worksheet.addRow(headers);
+ headerRow.eachCell((cell) => {
+ cell.style = headerStyle;
+ });
+ worksheet.getRow(2).height = 25;
+
+ // 鏁版嵁
+ data.forEach((item) => {
+ const row = worksheet.addRow([
+ item.drname,
+ item.deptname,
+ item.dischargeCount,
+ item.nonFollowUp,
+ item.followUpNeeded,
+ item.needFollowUpAgain,
+ item.pendingFollowUpAgain,
+ item.followUpSuccessAgain,
+ item.followUpFailAgain,
+ this.calculateSuccessRate(
+ item.followUpSuccessAgain,
+ item.needFollowUpAgain,
+ item.pendingFollowUpAgain
+ ),
+ item.followUpRateAgain,
+ ]);
+ row.eachCell((cell) => {
+ cell.style = cellStyle;
+ });
+ });
+
+ // 灏忚琛�
+ const summaryRow = worksheet.addRow(
+ this.getDoctorAgainExportSummary(data)
+ );
+ summaryRow.eachCell((cell) => {
+ cell.font = { bold: true };
+ cell.fill = {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ };
+ });
+
+ // 鍒楀
+ worksheet.columns = [
+ { width: 15 },
+ { width: 15 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 }, // 鎴愬姛鐜�
+ // { width: 12 }, // 闅忚鐜�
+ ];
+ },
+ /** 鍐嶆闅忚 - 鍖荤敓瀛愯〃瀵煎嚭灏忚 */
+ getDoctorAgainExportSummary(data) {
+ const sums = ["灏忚"];
+
+ const keys = [
+ "dischargeCount",
+ "nonFollowUp",
+ "followUpNeeded",
+ "needFollowUpAgain",
+ "pendingFollowUpAgain",
+ "followUpSuccessAgain",
+ "followUpFailAgain",
+ ];
+
+ keys.forEach((key) => {
+ sums.push(data.reduce((t, r) => t + (Number(r[key]) || 0), 0));
+ });
+
+ // 鎴愬姛鐜囷紙骞冲潎鍊硷級
+ const successRates = data
+ .map((item) => {
+ const success = Number(item.followUpSuccessAgain) || 0;
+ const need = Number(item.needFollowUpAgain) || 0;
+ const pending = Number(item.pendingFollowUpAgain) || 0;
+ const denominator = need - pending;
+ if (denominator <= 0) return 0;
+ return success / denominator;
+ })
+ .filter((rate) => !isNaN(rate));
+
+ sums.push(
+ successRates.length
+ ? (
+ (successRates.reduce((a, b) => a + b, 0) / successRates.length) *
+ 100
+ ).toFixed(2) + "%"
+ : "0.00%"
+ );
+
+ // // 闅忚鐜囷紙骞冲潎鍊硷級
+ // const followUpRates = data
+ // .map((i) => this.extractPercentageValue(i.followUpRateAgain))
+ // .filter(Boolean);
+
+ // sums.push(
+ // followUpRates.length
+ // ? (
+ // (followUpRates.reduce((a, b) => a + b, 0) /
+ // followUpRates.length) *
+ // 100
+ // ).toFixed(2) + "%"
+ // : "0.00%"
+ // );
+
+ return sums;
+ },
+ buildExportSheet(worksheet, sheetNameSuffix) {
+ const titleStyle = {
+ font: {
+ name: "寰蒋闆呴粦",
+ size: 16,
+ bold: true,
+ color: { argb: "FF000000" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFE6F3FF" },
+ },
+ alignment: { vertical: "middle", horizontal: "center", wrapText: true },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const headerStyle = {
+ font: {
+ name: "寰蒋闆呴粦",
+ size: 11,
+ bold: true,
+ color: { argb: "FF000000" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ },
+ alignment: { vertical: "middle", horizontal: "center", wrapText: true },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const cellStyle = {
+ font: { name: "瀹嬩綋", size: 10, color: { argb: "FF000000" } },
+ alignment: { vertical: "middle", horizontal: "center" },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const summaryStyle = {
+ font: {
+ name: "瀹嬩綋",
+ size: 10,
+ bold: true,
+ color: { argb: "FF409EFF" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ },
+ alignment: { vertical: "middle", horizontal: "center" },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ // 娣诲姞鏍囬琛�
+ worksheet.mergeCells(1, 1, 1, 15);
+ const titleCell = worksheet.getCell(1, 1);
+ titleCell.value = `鍐嶆涓撶梾闅忚缁熻琛╛${sheetNameSuffix}`;
+ titleCell.style = titleStyle;
+ worksheet.getRow(1).height = 35;
+
+ // 琛ㄥご
+ // 琛ㄥご闇�瑕佸鍔犳垚鍔熺巼鍒�
+ const secondRowHeaders = [
+ "",
+ "鍑洪櫌鐥呭尯",
+ "绉戝",
+ "鍑洪櫌浜烘",
+ "鏃犻渶闅忚浜烘",
+ "搴旈殢璁夸汉娆�",
+ "闇�闅忚",
+ "寰呴殢璁�",
+ "闅忚鎴愬姛",
+ "闅忚澶辫触",
+ "鎴愬姛鐜�", // 鎴愬姛鐜囧簲璇ュ湪闅忚澶辫触鍚庨潰
+ // "闅忚鐜�", // 闅忚鐜囧湪鎴愬姛鐜囧悗闈�
+ "浜哄伐",
+ "璇煶", // 淇锛氬簲璇ユ槸璇煶锛屼笉鏄煭淇�
+ "鐭俊", // 鐭俊
+ "寰俊", // 寰俊
+ ];
+
+ secondRowHeaders.forEach((header, index) => {
+ const cell = worksheet.getCell(3, index + 1);
+ cell.value = header;
+ cell.style = headerStyle;
+ });
+
+ // 鏇存柊鍚堝苟鍗曞厓鏍肩殑鑼冨洿
+ for (let i = 1; i <= 6; i++) {
+ worksheet.mergeCells(2, i, 3, i);
+ const cell = worksheet.getCell(2, i);
+ cell.style = headerStyle;
+ }
+
+ worksheet.getCell(2, 1).value = "";
+ worksheet.getCell(2, 2).value = "鍑洪櫌鐥呭尯";
+ worksheet.getCell(2, 3).value = "绉戝";
+ worksheet.getCell(2, 4).value = "鍑洪櫌浜烘";
+ worksheet.getCell(2, 5).value = "鏃犻渶闅忚浜烘";
+ worksheet.getCell(2, 6).value = "搴旈殢璁夸汉娆�";
+
+ // 娉ㄦ剰锛氱敱浜庡鍔犱簡鎴愬姛鐜囧垪锛屽悎骞跺垪鏁拌澧炲姞
+ worksheet.mergeCells(2, 7, 2, 16); // 浠�7鍚堝苟鍒�16锛堝師鏉ユ槸7-14锛�
+ worksheet.getCell(2, 7).value = "鍐嶆涓撶梾闅忚";
+ worksheet.getCell(2, 7).style = headerStyle;
+
+ worksheet.getRow(2).height = 28;
+ worksheet.getRow(3).height = 25;
+
+ // 鏁版嵁琛�
+ this.tableData.forEach((item, rowIndex) => {
+ const dataRow = worksheet.addRow(
+ [
+ "",
+ item.leavehospitaldistrictname || "",
+ item.deptname || "",
+ item.dischargeCount || 0,
+ item.nonFollowUp || 0,
+ item.followUpNeeded || 0,
+ item.needFollowUpAgain || 0,
+ item.pendingFollowUpAgain || 0,
+ item.followUpSuccessAgain || 0,
+ item.followUpFailAgain || 0,
+ // 鎴愬姛鐜� - 闇�瑕佸姩鎬佽绠�
+ this.calculateSuccessRate(
+ item.followUpSuccessAgain,
+ item.needFollowUpAgain,
+ item.pendingFollowUpAgain
+ ),
+ // item.followUpRateAgain || "0%", // 闅忚鐜�
+ item.manualAgain || 0,
+ item.voiceAgain || 0,
+ item.smsAgain || 0,
+ item.weChatAgain || 0,
+ ],
+ rowIndex + 4
+ );
+
+ dataRow.eachCell((cell) => {
+ cell.style = cellStyle;
+ });
+ dataRow.height = 24;
+ });
+
+ // 鍚堣琛�
+ const summaries = this.getExportSummaries();
+ const summaryRow = worksheet.addRow(summaries);
+ summaryRow.eachCell((cell, colNumber) => {
+ cell.style = summaryStyle;
+ if (colNumber === 1) {
+ cell.value = "鍚堣";
+ }
+ });
+ summaryRow.height = 28;
+
+ // 鍒楀
+ // 淇鍒楀
+ worksheet.columns = [
+ { width: 8 },
+ { width: 20 },
+ { width: 15 },
+ { width: 12 },
+ { width: 12 },
+ { width: 12 },
+ { width: 10 },
+ { width: 10 },
+ { width: 10 },
+ { width: 10 },
+ { width: 12 }, // 鎴愬姛鐜�
+ // { width: 12 }, // 闅忚鐜�
+ { width: 8 }, // 浜哄伐
+ { width: 8 }, // 璇煶
+ { width: 8 }, // 鐭俊
+ { width: 8 }, // 寰俊
+ ];
+ },
+
+ getExportSummaries() {
+ const summaries = [
+ "鍚堣",
+ "/",
+ "/",
+ 0, // 3: dischargeCount
+ 0, // 4: nonFollowUp
+ 0, // 5: followUpNeeded
+ 0, // 6: needFollowUpAgain
+ 0, // 7: pendingFollowUpAgain
+ 0, // 8: followUpSuccessAgain
+ 0, // 9: followUpFailAgain
+ "0%", // 10: 鎴愬姛鐜�
+ // "0%", // 11: 闅忚鐜�
+ 0, // 12: manualAgain
+ 0, // 13: voiceAgain
+ 0, // 14: smsAgain
+ 0, // 15: weChatAgain
+ ];
+
+ this.tableData.forEach((item) => {
+ summaries[3] += Number(item.dischargeCount) || 0;
+ summaries[4] += Number(item.nonFollowUp) || 0;
+ summaries[5] += Number(item.followUpNeeded) || 0;
+ summaries[6] += Number(item.needFollowUpAgain) || 0;
+ summaries[7] += Number(item.pendingFollowUpAgain) || 0;
+ summaries[8] += Number(item.followUpSuccessAgain) || 0;
+ summaries[9] += Number(item.followUpFailAgain) || 0;
+ summaries[12] += Number(item.manualAgain) || 0;
+ summaries[13] += Number(item.voiceAgain) || 0;
+ summaries[14] += Number(item.smsAgain) || 0;
+ summaries[15] += Number(item.weChatAgain) || 0;
+ });
+
+ // 鎴愬姛鐜囪绠�
+ const totalSuccess = summaries[8]; // followUpSuccessAgain鐨勬�诲拰
+ const totalNeed = summaries[6]; // needFollowUpAgain鐨勬�诲拰
+ const totalPending = summaries[7]; // pendingFollowUpAgain鐨勬�诲拰
+ const denominator = totalNeed - totalPending;
+
+ if (denominator > 0) {
+ summaries[10] = ((totalSuccess / denominator) * 100).toFixed(2) + "%";
+ } else {
+ summaries[10] = "0.00%";
+ }
+
+ // 闅忚鐜囪绠�
+ // const followUpRateAgainValues = this.tableData
+ // .map((item) => this.extractPercentageValue(item.followUpRateAgain))
+ // .filter((value) => value !== null);
+
+ // if (followUpRateAgainValues.length > 0) {
+ // const avgFollowUpRateAgain =
+ // followUpRateAgainValues.reduce((sum, val) => sum + val, 0) /
+ // followUpRateAgainValues.length;
+ // summaries[11] = (avgFollowUpRateAgain * 100).toFixed(2) + "%";
+ // }
+
+ // 鏍煎紡鍖栨暟瀛�
+ [3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15].forEach((index) => {
+ summaries[index] = this.formatNumber(summaries[index]);
+ });
+
+ return summaries;
+ },
+
+ extractPercentageValue(value) {
+ if (!value) return null;
+ if (typeof value === "string" && value.includes("%")) {
+ const num = parseFloat(value.replace("%", ""));
+ return isNaN(num) ? null : num / 100;
+ }
+ const num = parseFloat(value);
+ return isNaN(num) ? null : num;
+ },
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+.second-follow-up {
+ .your-table-container {
+ margin-top: 10px;
+ }
+
+ .button-zx {
+ color: rgb(70, 204, 238);
+ }
+}
+</style>
diff --git a/src/views/Satisfaction/diseaseStatistics/components/TimelyRateDialog.vue b/src/views/Satisfaction/diseaseStatistics/components/TimelyRateDialog.vue
new file mode 100644
index 0000000..f58d55c
--- /dev/null
+++ b/src/views/Satisfaction/diseaseStatistics/components/TimelyRateDialog.vue
@@ -0,0 +1,249 @@
+<template>
+ <el-dialog
+ title="鏈強鏃堕殢璁挎偅鑰呮湇鍔�"
+ :visible.sync="visible"
+ v-loading="loading"
+ width="70%"
+ :close-on-click-modal="false"
+ @close="handleClose"
+ >
+ <div class="timely-rate-dialog">
+ <div class="examine-jic">
+ <div class="jic-value">
+ <el-row :gutter="20">
+ <!-- 鎼滅储琛ㄥ崟 -->
+ <el-form
+ :model="queryParams"
+ ref="queryForm"
+ size="small"
+ :inline="true"
+ label-width="98px"
+ class="search-form"
+ >
+ <el-form-item label="鎮h�咃細">
+ <el-input
+ v-model="queryParams.name"
+ placeholder="璇疯緭鍏ユ偅鑰呭鍚�"
+ @keyup.enter.native="handleSearch"
+ />
+ </el-form-item>
+ <el-form-item label="鎮h�呰瘖鏂細">
+ <el-input
+ v-model="queryParams.leavediagname"
+ placeholder="璇疯緭鍏ユ偅鑰呰瘖鏂�"
+ @keyup.enter.native="handleSearch"
+ />
+ </el-form-item>
+
+ <el-form-item>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="medium"
+ @click="handleSearch"
+ >
+ 鎼滅储
+ </el-button>
+ <el-button
+ icon="el-icon-refresh"
+ size="medium"
+ @click="resetQuery"
+ >
+ 閲嶇疆
+ </el-button>
+ </el-form-item>
+ </el-form>
+
+ <!-- 鎮h�呭垪琛� -->
+ <el-table :data="data" style="width: 100%" v-loading="loading">
+ <el-table-column prop="sendname" align="center" label="濮撳悕" width="100" />
+ <el-table-column prop="taskName" align="center" width="200" show-overflow-tooltip label="浠诲姟鍚嶇О" />
+
+ <el-table-column prop="sendstate" align="center" width="200" label="浠诲姟鐘舵��">
+ <template slot-scope="scope">
+ <el-tag
+ :type="getStateTagType(scope.row.sendstate)"
+ :disable-transitions="false"
+ >
+ {{ getStateText(scope.row.sendstate) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+
+ <el-table-column prop="visitTime" align="center" label="搴旈殢璁挎椂闂�" width="200" show-overflow-tooltip />
+ <el-table-column prop="finishtime" align="center" label="闅忚瀹屾垚鏃堕棿" width="200" show-overflow-tooltip />
+
+ <el-table-column label="鍑洪櫌鏃ユ湡" width="200" align="center" key="endtime" prop="endtime">
+ <template slot-scope="scope">
+ <span>{{ formatTime(scope.row.endtime) }}</span>
+ </template>
+ </el-table-column>
+
+ <el-table-column label="璐d换鎶ゅ+" width="120" align="center" key="nurseName" prop="nurseName" />
+ <el-table-column label="涓绘不鍖荤敓" width="120" align="center" key="drname" prop="drname" />
+
+ <el-table-column label="缁撴灉鐘舵��" align="center" key="excep" prop="excep" width="120">
+ <template slot-scope="scope">
+ <dict-tag :options="dict.type.sys_yujing" :value="scope.row.excep" />
+ </template>
+ </el-table-column>
+
+ <el-table-column label="澶勭悊鎰忚" align="center" key="suggest" prop="suggest" width="120">
+ <template slot-scope="scope">
+ <dict-tag :options="dict.type.sys_suggest" :value="scope.row.suggest" />
+ </template>
+ </el-table-column>
+
+ <el-table-column prop="templatename" align="center" label="鏈嶅姟妯℃澘" width="200" show-overflow-tooltip />
+ <el-table-column prop="remark" align="center" label="鏈嶅姟璁板綍" width="200" show-overflow-tooltip />
+
+ <el-table-column prop="bankcardno" align="center" label="鍛煎彨鐘舵��" width="210" />
+
+ <el-table-column label="鎿嶄綔" fixed="right" align="center" width="200" class-name="small-padding fixed-width">
+ <template slot-scope="scope">
+ <el-button size="medium" type="text" @click="handleDetailsGo(scope.row)">
+ <span class="button-zx">
+ <i class="el-icon-s-order"></i>鏌ョ湅
+ </span>
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </el-row>
+
+ <!-- 鍒嗛〉 -->
+ <pagination
+ v-show="total > 0"
+ :total="total"
+ :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize"
+ @pagination="handlePagination"
+ />
+ </div>
+ </div>
+ </div>
+ </el-dialog>
+</template>
+
+<script>
+
+export default {
+ name: 'TimelyRateDialog',
+
+ dicts: ['sys_yujing', 'sys_suggest'],
+ props: {
+ visible: {
+ type: Boolean,
+ default: false
+ },
+ loading: {
+ type: Boolean,
+ default: false
+ },
+ data: {
+ type: Array,
+ default: () => []
+ },
+ total: {
+ type: Number,
+ default: 0
+ },
+ queryParams: {
+ type: Object,
+ default: () => ({
+ pageNum: 1,
+ pageSize: 10
+ })
+ }
+ },
+ data() {
+ return {
+ localQueryParams: { ...this.queryParams }
+ }
+ },
+ watch: {
+ queryParams: {
+ deep: true,
+ handler(newParams) {
+ this.localQueryParams = { ...newParams }
+ }
+ }
+ },
+ mounted() {
+ this.localQueryParams = { ...this.queryParams }
+ },
+ methods: {
+ handleSearch() {
+ this.$emit('search', this.localQueryParams)
+ },
+
+ resetQuery() {
+ this.localQueryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ name: '',
+ leavediagname: ''
+ }
+ this.$emit('search', this.localQueryParams)
+ },
+
+ handlePagination(pagination) {
+ this.localQueryParams.pageNum = pagination.page
+ this.localQueryParams.pageSize = pagination.limit
+ console.log(pagination,'pagination');
+ console.log(this.localQueryParams,'this.localQueryParams');
+
+ this.$emit('search', this.localQueryParams)
+ },
+
+ getStateTagType(state) {
+ const stateMap = {
+ 1: 'primary',
+ 2: 'primary',
+ 3: 'success',
+ 4: 'info',
+ 5: 'danger',
+ 6: 'success'
+ }
+ return stateMap[state] || 'info'
+ },
+
+ getStateText(state) {
+ const stateTextMap = {
+ 1: '琛ㄥ崟宸查鍙�',
+ 2: '寰呴殢璁�',
+ 3: '琛ㄥ崟宸插彂閫�',
+ 4: '涓嶆墽琛�',
+ 5: '鍙戦�佸け璐�',
+ 6: '宸插畬鎴�'
+ }
+ return stateTextMap[state] || '鏈煡鐘舵��'
+ },
+
+ formatTime(time) {
+ if (!time) return ''
+ return this.parseTime(time)
+ },
+
+ handleDetailsGo(row) {
+ this.$emit('details-go', row)
+ },
+
+ handleClose() {
+ this.$emit('close')
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+.timely-rate-dialog {
+ .search-form {
+ margin-bottom: 20px;
+ }
+
+ .button-zx {
+ color: rgb(70, 204, 238);
+ }
+}
+</style>
diff --git a/src/views/Satisfaction/diseaseStatistics/components/styles.scss b/src/views/Satisfaction/diseaseStatistics/components/styles.scss
new file mode 100644
index 0000000..49f2005
--- /dev/null
+++ b/src/views/Satisfaction/diseaseStatistics/components/styles.scss
@@ -0,0 +1,90 @@
+// 鍏ㄥ眬鏍峰紡
+.follow-up-statistics,
+.first-follow-up,
+.second-follow-up,
+.continued-care {
+ .your-table-container {
+ margin-top: 10px;
+ }
+
+ .button-zx {
+ color: rgb(70, 204, 238);
+ }
+
+ // 缇庡寲鍚堣琛屾牱寮�
+ ::v-deep .el-table__footer {
+ .el-table__cell {
+ background-color: #f5f7fa;
+ font-weight: 600;
+ color: #409eff;
+
+ .cell {
+ font-weight: 600;
+ color: #409eff;
+ }
+ }
+ }
+
+ // 鍐呴儴琛ㄦ牸鍚堣琛屾牱寮�
+ ::v-deep .inner-table .el-table__footer {
+ .el-table__cell {
+ background-color: #ecf5ff;
+ font-weight: 500;
+ color: #67c23a;
+
+ .cell {
+ font-weight: 500;
+ color: #67c23a;
+ }
+ }
+ }
+
+ // 鐧惧垎姣斿瓧娈电壒娈婃牱寮�
+ ::v-deep .el-table__footer .el-table__cell[data-field="followUpRate"] .cell,
+ ::v-deep .el-table__footer .el-table__cell[data-field="rate"] .cell,
+ ::v-deep .el-table__footer .el-table__cell[data-field="followUpRateAgain"] .cell,
+ ::v-deep .el-table__footer .el-table__cell[data-field="completionRate"] .cell {
+ color: #e6a23c !important;
+ font-weight: 700 !important;
+ }
+
+ // 鍐呭眰鍖荤敓琛ㄦ牸鏍峰紡
+ .inner-table {
+ ::v-deep .el-table__header-wrapper {
+ background-color: #f0f7ff !important;
+
+ th {
+ background-color: #f0f7ff !important;
+ }
+ }
+
+ ::v-deep .el-table__body-wrapper {
+ tr {
+ background-color: #f9fbfe !important;
+
+ &:hover {
+ background-color: #e6f1ff !important;
+ }
+ }
+ }
+
+ ::v-deep .el-table--border {
+ border-color: #d9e8ff !important;
+
+ td, th {
+ border-color: #d9e8ff !important;
+ }
+ }
+ }
+
+ /* 浣胯鏈夋墜鍨嬫寚閽� */
+ ::v-deep .el-table__row {
+ cursor: pointer;
+ }
+
+ /* 灞曞紑琛屾牱寮� */
+ ::v-deep .el-table__expanded-cell {
+ padding: 10px 0 !important;
+ background: #f8f8f8;
+ }
+}
diff --git a/src/views/Satisfaction/diseaseStatistics/index.vue b/src/views/Satisfaction/diseaseStatistics/index.vue
new file mode 100644
index 0000000..a4a1fc3
--- /dev/null
+++ b/src/views/Satisfaction/diseaseStatistics/index.vue
@@ -0,0 +1,569 @@
+<template>
+ <div class="follow-up-statistics">
+ <!-- 鎼滅储琛ㄥ崟鍖哄煙 -->
+ <div class="search-section">
+ <el-form
+ :model="queryParams"
+ ref="queryForm"
+ size="small"
+ :inline="true"
+ v-show="showSearch"
+ label-width="98px"
+ >
+ <el-form-item label="缁熻绫诲瀷" prop="userName">
+ <el-select
+ v-model="queryParams.statisticaltype"
+ placeholder="璇烽�夋嫨缁熻绫诲瀷"
+ >
+ <el-option
+ v-for="item in Statisticallist"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ <el-select
+ style="margin-left: 10px"
+ v-if="queryParams.statisticaltype == 1"
+ v-model="queryParams.leavehospitaldistrictcodes"
+ size="medium"
+ multiple
+ filterable
+ placeholder="璇烽�夋嫨鐥呭尯"
+ >
+ <el-option
+ v-for="item in flatArrayhospit"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ <el-select
+ v-else-if="queryParams.statisticaltype == 2"
+ v-model="queryParams.deptcodes"
+ size="medium"
+ multiple
+ filterable
+ placeholder="璇烽�夋嫨绉戝"
+ >
+ <el-option
+ v-for="item in flatArraydept"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ <el-select
+ v-model="queryParams.diagTypes"
+ v-else-if="queryParams.statisticaltype == 3"
+ filterable
+ remote
+ allow-create
+ default-first-option
+ placeholder="璇烽�夋嫨/鏌ヨ"
+ multiple
+ :remote-method="remoteSearch"
+ :loading="loading"
+ @visible-change="handleVisibleChange"
+ @focus="handleFocus"
+ >
+ <el-option
+ v-for="item in donorchargeList"
+ :key="item.icdid"
+ :label="item.icdname"
+ :value="item.icdid"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="涓撶梾浠诲姟" prop="userName">
+ <el-select
+ v-model="queryParams.taskNames"
+ multiple
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in taskList"
+ :key="item.taskName"
+ :label="item.taskName"
+ :value="item.taskName"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label-width="200" label="搴旈殢璁挎椂闂磋寖鍥�" prop="userName">
+ <el-date-picker
+ v-model="queryParams.dateRange"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ type="daterange"
+ unlink-panels
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ :default-time="['00:00:00', '23:59:59']"
+ :picker-options="pickerOptions"
+ />
+ </el-form-item>
+
+ <el-form-item>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="medium"
+ @click="handleQuery"
+ >鎼滅储</el-button
+ >
+ <el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
+ >閲嶇疆</el-button
+ >
+ </el-form-item>
+
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-download"
+ size="medium"
+ @click="handleExport"
+ >瀵煎嚭</el-button
+ >
+ <!-- <el-button
+ type="primary"
+ plain
+ icon="el-icon-data-line"
+ size="medium"
+ @click="showChartDialog"
+ >缁熻瓒嬪娍鍥�</el-button
+ > -->
+ </el-form>
+ </div>
+
+ <!-- Tab鍒囨崲鍖哄煙 -->
+ <div class="tab-section">
+ <el-tabs v-model="activeTab" @tab-click="handleTabClick">
+ <el-tab-pane label="棣栨闅忚" name="first">
+ <FirstFollowUp
+ ref="firstFollowUp"
+ :query-params="queryParams"
+ :flat-array-hospit="flatArrayhospit"
+ :flat-array-dept="flatArraydept"
+ :options="options"
+ :orgname="orgname"
+ @view-details="viewDetails"
+ @see-details="Seedetails"
+ />
+ </el-tab-pane>
+
+ <el-tab-pane label="鍐嶆闅忚" name="second">
+ <SecondFollowUp
+ ref="secondFollowUp"
+ :query-params="queryParams"
+ :flat-array-hospit="flatArrayhospit"
+ :flat-array-dept="flatArraydept"
+ :options="options"
+ :orgname="orgname"
+ @view-details="viewDetails"
+ />
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+ </div>
+</template>
+
+<script>
+import FirstFollowUp from "./components/FirstFollowUp.vue";
+import SecondFollowUp from "./components/SecondFollowUp.vue";
+import ContinuedCare from "./components/ContinuedCare.vue";
+import ChartDialog from "./components/ChartDialog.vue";
+import DetailDialog from "./components/DetailDialog.vue";
+import TimelyRateDialog from "./components/TimelyRateDialog.vue";
+
+import {
+ getSfStatisticsHyperlink,
+ getTasklist,
+ getillnesslist,
+} from "@/api/AiCentre/index";
+
+export default {
+ name: "FollowUpStatistics",
+ components: {
+ FirstFollowUp,
+ SecondFollowUp,
+ ContinuedCare,
+ ChartDialog,
+ DetailDialog,
+ TimelyRateDialog,
+ },
+ data() {
+ return {
+ activeTab: "first",
+ orgname: localStorage.getItem("orgname") || "",
+ Statisticallist: [
+ { label: "鐥呭尯缁熻", value: 1 },
+ { label: "绉戝缁熻", value: 2 },
+ { label: "鐥呯缁熻", value: 3 },
+ ],
+ options: this.$store.getters.tasktypes,
+ queryParams: {
+ serviceType: [13],
+ statisticaltype: 3,
+ dateRange: this.getLastMonthRange(),
+ leavehospitaldistrictcodes: ["all"],
+ deptcodes: [],
+ diagTypes: [],
+ },
+ pickerOptions: {
+ shortcuts: [
+ {
+ text: "鏈�杩戜竴鍛�",
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+ picker.$emit("pick", [start, end]);
+ },
+ },
+ {
+ text: "鏈�杩戜竴涓湀",
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+ picker.$emit("pick", [start, end]);
+ },
+ },
+ {
+ text: "鏈�杩戜笁涓湀",
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+ picker.$emit("pick", [start, end]);
+ },
+ },
+ ],
+ },
+ flatArrayhospit: [],
+ flatArraydept: [],
+ allDeptCodes: [],
+ allWardCodes: [],
+ donorchargeList: [], //鐥呯闆嗗悎
+ taskList: [],
+ showSearch: true,
+ loading: false,
+ searchTimeout: null,
+ hasSearched: false, // 鏍囪鏄惁宸茶繘琛岃繃鎼滅储
+ // 寮圭獥鐩稿叧鐘舵��
+ chartDialogVisible: false,
+ chartData: [],
+ infotitleVisible: false,
+ SeedetailsVisible: false,
+ searchName: "",
+ infotitle: "",
+ infotitlelist: [],
+ patienttotal: 0,
+ logsheetlist: [],
+ Seedloading: false,
+ patientqueryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ },
+ };
+ },
+ created() {
+ this.getDeptTree();
+ this.loadCurrentTabData();
+ },
+ methods: {
+ // 鍚勭被鍨嬪垪琛�
+ getDeptTree() {
+ // 绉戝鍒楄〃
+ this.flatArraydept = this.$store.getters.belongDepts.map((dept) => {
+ return {
+ label: dept.deptName,
+ value: dept.deptCode,
+ };
+ });
+ this.allDeptCodes = this.$store.getters.belongDepts.map(
+ (dept) => dept.deptCode
+ );
+
+ // 鐥呭尯鍒楄〃
+ this.flatArrayhospit = this.$store.getters.belongWards.map((ward) => {
+ return {
+ label: ward.districtName,
+ value: ward.districtCode,
+ };
+ });
+ this.allWardCodes = this.$store.getters.belongWards.map(
+ (ward) => ward.districtCode
+ );
+ // 鐤剧梾
+ getillnesslist({ pageNum: 1, pageSize: 100 }).then((res) => {
+ this.donorchargeList = res.rows;
+ });
+ // 涓撶梾浠诲姟
+ getTasklist({ pageNum: 1, pageSize: 50, serviceType: 13, type: 2 }).then(
+ (response) => {
+ this.taskList = response.rows;
+ }
+ );
+ this.flatArraydept.push({ label: "鍏ㄩ儴", value: "all" });
+ this.flatArrayhospit.push({ label: "鍏ㄩ儴", value: "all" });
+ },
+ // 杩滅▼鎼滅储鏂规硶
+ remoteSearch(query) {
+ if (this.searchTimeout) {
+ clearTimeout(this.searchTimeout);
+ }
+
+ this.loading = true;
+
+ // 闃叉姈澶勭悊锛�300ms鍚庢墽琛屾悳绱�
+ this.searchTimeout = setTimeout(() => {
+ this.performSearch(query);
+ }, 300);
+ },
+ // 鎵ц鎼滅储
+ performSearch(query) {
+ if (!query) {
+ // 濡傛灉鎼滅储鍐呭涓虹┖锛屾樉绀烘墍鏈夋暟鎹�
+ this.loadInitialData();
+ this.loading = false;
+ this.hasSearched = true;
+ return;
+ }
+
+ const params = {
+ pageNum: 1,
+ pageSize: 100,
+ icdname: query, // 鍋囪鍙互鏍规嵁icdname鎼滅储
+ };
+
+ getillnesslist(params)
+ .then((res) => {
+ this.donorchargeList = res.rows || [];
+ this.loading = false;
+ this.hasSearched = true;
+ })
+ .catch(() => {
+ this.loading = false;
+ this.hasSearched = true;
+ });
+ },
+ // 涓嬫媺妗嗘樉绀�/闅愯棌鏃剁殑澶勭悊
+ handleVisibleChange(visible) {
+ if (visible && !this.hasSearched) {
+ // 棣栨灞曞紑鏃跺姞杞芥暟鎹�
+ this.loadInitialData();
+ }
+ },
+
+ // 鑾峰彇鐒︾偣鏃剁殑澶勭悊
+ handleFocus() {
+ if (this.donorchargeList.length === 0 && !this.hasSearched) {
+ this.loadInitialData();
+ }
+ },
+
+ // 娣诲姞鑾峰彇鏈�杩戜竴涓湀鏃堕棿鑼冨洿鐨勬柟娉�
+ getLastMonthRange() {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+
+ // 鏍煎紡鍖栦负 yyyy-MM-dd HH:mm:ss
+ const formatDate = (date) => {
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, "0");
+ const day = String(date.getDate()).padStart(2, "0");
+ return `${year}-${month}-${day} 00:00:00`;
+ };
+
+ const formatEndDate = (date) => {
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, "0");
+ const day = String(date.getDate()).padStart(2, "0");
+ return `${year}-${month}-${day} 23:59:59`;
+ };
+
+ return [formatDate(start), formatEndDate(end)];
+ },
+ handleTabClick(tab) {
+ this.activeTab = tab.name;
+ this.loadCurrentTabData();
+ },
+
+ loadCurrentTabData() {
+ switch (this.activeTab) {
+ case "first":
+ this.$refs.firstFollowUp.loadData();
+ break;
+ case "second":
+ this.$refs.secondFollowUp.loadData();
+ break;
+ case "continued":
+ this.$refs.continuedCare.loadData();
+ break;
+ }
+ },
+
+ handleQuery() {
+ this.queryParams.startTime = this.parseTime(
+ this.queryParams.dateRange[0]
+ );
+ this.queryParams.endTime = this.parseTime(this.queryParams.dateRange[1]);
+
+ if (this.queryParams.statisticaltype == 1) {
+ this.queryParams.deptcodes = [];
+ } else if (this.queryParams.statisticaltype == 2) {
+ this.queryParams.leavehospitaldistrictcodes = [];
+ }
+
+ this.loadCurrentTabData();
+ },
+
+ resetQuery() {
+ this.queryParams.dateRange = [];
+ this.queryParams.leavehospitaldistrictcodes = [];
+ this.handleQuery();
+ },
+
+ async handleExport() {
+ switch (this.activeTab) {
+ case "first":
+ await this.$refs.firstFollowUp.exportTable();
+ break;
+ case "second":
+ await this.$refs.secondFollowUp.exportTable();
+ break;
+ case "continued":
+ await this.$refs.continuedCare.exportTable();
+ break;
+ }
+ },
+
+ showChartDialog() {
+ this.chartData = this.getCurrentTabData();
+ this.chartDialogVisible = true;
+ },
+
+ getCurrentTabData() {
+ switch (this.activeTab) {
+ case "first":
+ return this.$refs.firstFollowUp.tableData;
+ case "second":
+ return this.$refs.secondFollowUp.tableData;
+ case "continued":
+ return this.$refs.continuedCare.tableData;
+ default:
+ return [];
+ }
+ },
+
+ viewDetails(row, infoKey, title, type) {
+ this.infotitle = title;
+
+ let obj = {
+ hyperLinkInfoType: infoKey,
+ leavehospitaldistrictcodes: this.queryParams.leavehospitaldistrictcodes,
+ serviceType: this.queryParams.serviceType,
+ };
+ if (type == 1) {
+ obj.drcode = row.drcode;
+ }
+ if (this.queryParams.statisticaltype == 1) {
+ obj.leavehospitaldistrictcodes = [row.leavehospitaldistrictcode];
+ obj.deptcodes = [];
+ } else {
+ obj.deptcodes = [row.deptcode];
+ obj.leavehospitaldistrictcodes = [];
+ }
+ obj.endTime = this.queryParams.endTime;
+ obj.startTime = this.queryParams.startTime;
+ obj.statisticaltype = this.queryParams.statisticaltype;
+
+ getSfStatisticsHyperlink(obj).then((response) => {
+ this.infotitlelist = response.data;
+ });
+
+ this.infotitleVisible = true;
+ },
+
+ Seedetails(row) {
+ this.SeedetailsVisible = true;
+ this.Seedloading = true;
+
+ this.$refs.firstFollowUp
+ .selectTimelyRate(row, this.queryParams)
+ .then((response) => {
+ this.logsheetlist = response.data.detail;
+ this.patienttotal = response.data.total;
+ this.Seedloading = false;
+ });
+ },
+
+ Seedetailstion() {
+ console.log(this.patientqueryParams);
+
+ this.$refs.firstFollowUp
+ .selectTimelyRates(this.patientqueryParams)
+ .then((response) => {
+ this.logsheetlist = response.data.detail;
+ this.patienttotal = response.data.total;
+ });
+ },
+
+ SeedetailsgGo(row) {
+ this.SeedetailsVisible = false;
+ let type = "";
+ if (row.preachformson && row.preachformson.includes("3")) {
+ type = 1;
+ }
+ setTimeout(() => {
+ this.$router.push({
+ path: "/followvisit/record/detailpage/",
+ query: {
+ taskid: row.taskid,
+ patid: row.patid,
+ id: row.id,
+ Voicetype: type,
+ },
+ });
+ }, 300);
+ },
+
+ handleSearch() {
+ // 鎼滅储閫昏緫
+ },
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+.follow-up-statistics {
+ padding: 20px;
+ background: #ffff;
+ border: 1px solid #dcdfe6;
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
+
+ .search-section {
+ margin-bottom: 20px;
+ }
+
+ .tab-section {
+ ::v-deep .el-tabs__header {
+ margin-bottom: 20px;
+ }
+
+ ::v-deep .el-tabs__item {
+ font-size: 16px;
+ padding: 0 20px;
+ height: 40px;
+ line-height: 40px;
+ }
+
+ ::v-deep .el-tabs__active-bar {
+ height: 3px;
+ }
+ }
+}
+</style>
diff --git a/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue b/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue
index 0c0dd0c..80f1160 100644
--- a/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue
+++ b/src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue
@@ -323,6 +323,7 @@
:row-data="currentRow"
:topicList="topiclist"
:query-params="queryParams"
+ :topType="2"
@close="topicVisible = false"
/>
</el-dialog>
diff --git a/src/views/Satisfaction/sfstatistics/components/components/TopicDialog.vue b/src/views/Satisfaction/sfstatistics/components/components/TopicDialog.vue
index 7b6fa0a..3095477 100644
--- a/src/views/Satisfaction/sfstatistics/components/components/TopicDialog.vue
+++ b/src/views/Satisfaction/sfstatistics/components/components/TopicDialog.vue
@@ -89,6 +89,7 @@
<script>
import ExcelJS from "exceljs";
import { saveAs } from "file-saver";
+
export default {
name: "TopicDialog",
props: {
@@ -100,6 +101,9 @@
type: Object,
default: () => ({}),
},
+ topType: {
+ type: String,
+ },
topicList: {
type: [Array, Object],
default: () => ({}),
@@ -107,211 +111,260 @@
},
data() {
return {
- processedTopicList: [], // 澶勭悊鍚庣殑鏁版嵁
+ processedTopicList: [],
+ orgname: "", // 鏂板锛氬尰闄㈠悕绉�
};
},
computed: {
configTitle() {
- // 浠庣埗绾� queryParams 涓鍙�
const key = this.queryParams?.configKey;
return key === "returnVisitCount" ? "澶嶈瘖閫氱煡" : "婊℃剰搴�";
},
},
+ created() {
+ // 鑾峰彇鍖婚櫌鍚嶇О
+ this.orgname = localStorage.getItem("orgname") || "";
+ },
watch: {
- // 鐩戝惉鐖剁粍浠朵紶閫掔殑鏁版嵁鍙樺寲
topicList: {
immediate: true,
handler(newVal) {
- console.log("TopicDialog鎺ユ敹鍒扮埗缁勪欢鏁版嵁:", newVal);
this.processTopicList(newVal);
},
},
},
- mounted() {
- console.log("TopicDialog mounted, props:", this.$props);
- },
methods: {
- // 澶勭悊topicList鏁版嵁
processTopicList(data) {
- console.log("寮�濮嬪鐞嗘暟鎹�:", data);
-
if (!data || typeof data !== "object") {
this.processedTopicList = [];
return;
}
- // 灏嗗璞¤浆鎹负鏁扮粍
const result = [];
-
Object.keys(data).forEach((key) => {
const item = data[key];
if (item && item.scriptContent) {
- // 娣辨嫹璐漣tem锛岄伩鍏嶄慨鏀瑰師鏁版嵁
const processedItem = JSON.parse(JSON.stringify(item));
- // 杩囨护details锛屽彧淇濈暀鏈夐�夐」鏂囨湰鐨�
if (processedItem.details && Array.isArray(processedItem.details)) {
processedItem.details = processedItem.details.filter(
(detail) => detail && detail.optionText
);
}
-
result.push(processedItem);
}
});
- console.log("澶勭悊鍚庣殑鏁版嵁:", result);
this.processedTopicList = result;
},
- /** 瀵煎嚭棰樼洰鏄庣粏 */
+
+ // 鏍煎紡鍖栨棩鏈熻寖鍥村瓧绗︿覆锛堜笌涓婚〉闈竴鑷达級
+ formatDateRangeForExport() {
+ let dateRangeString = "";
+ let sheetNameSuffix = "";
+ const isLishuiHospital = this.orgname == "涓芥按甯備腑鍖婚櫌";
+
+ if (
+ this.queryParams.dateRange &&
+ this.queryParams.dateRange.length === 2
+ ) {
+ const startDateStr = this.queryParams.dateRange[0];
+ const endDateStr = this.queryParams.dateRange[1];
+
+ if (isLishuiHospital) {
+ // 涓芥按甯備腑鍖婚櫌锛氬彧鏄剧ず骞存湀
+ const formatMonthOnly = (dateStr) => {
+ const date = new Date(dateStr);
+ const year = date.getFullYear();
+ const month = date.getMonth() + 1;
+ return `${year}骞�${month}鏈坄;
+ };
+ const startDateFormatted = formatMonthOnly(startDateStr);
+ const endDateFormatted = formatMonthOnly(endDateStr);
+ dateRangeString = `${startDateFormatted}鑷�${endDateFormatted}`;
+ sheetNameSuffix = `${startDateFormatted}鑷�${endDateFormatted}`;
+ } else {
+ // 鍏朵粬鍖婚櫌锛氭樉绀哄勾鏈堟棩
+ const formatDateForDisplay = (dateStr) => {
+ return dateStr.split(" ")[0]; // 濡傛灉鍖呭惈鏃堕棿閮ㄥ垎锛屽彧鍙栨棩鏈�
+ };
+ const startDateFormatted = formatDateForDisplay(startDateStr);
+ const endDateFormatted = formatDateForDisplay(endDateStr);
+ dateRangeString = `${startDateFormatted}鑷�${endDateFormatted}`;
+ sheetNameSuffix = `${startDateFormatted}鑷�${endDateFormatted}`;
+ }
+ } else {
+ const now = new Date();
+ const currentMonth = now.getMonth() + 1;
+ const currentYear = now.getFullYear();
+
+ if (isLishuiHospital) {
+ // 涓芥按甯備腑鍖婚櫌锛氭樉绀哄勾鏈�
+ dateRangeString = `${currentYear}骞�${currentMonth}鏈坄;
+ sheetNameSuffix = `${currentYear}骞�${currentMonth}鏈坄;
+ } else {
+ // 鍏朵粬鍖婚櫌锛氭樉绀烘湀浠�
+ dateRangeString = `${currentMonth}鏈坄;
+ sheetNameSuffix = `${currentMonth}鏈坄;
+ }
+ }
+
+ return { dateRangeString, sheetNameSuffix };
+ },
+
+ // 瀵煎嚭棰樼洰鏄庣粏
async exportTopicDetail() {
if (!this.processedTopicList.length) {
this.$message.warning("鏆傛棤鏁版嵁鍙鍑�");
return;
}
- const workbook = new ExcelJS.Workbook();
- const sheetName = `${
- this.rowData.leavehospitaldistrictname || this.rowData.deptname
- }${this.configTitle}鏄庣粏`;
- const worksheet = workbook.addWorksheet(sheetName);
+ try {
+ // 鑾峰彇鏍煎紡鍖栧悗鐨勬棩鏈熻寖鍥�
+ const { dateRangeString, sheetNameSuffix } =
+ this.formatDateRangeForExport();
- /* ---------- 鏍峰紡 ---------- */
- const titleStyle = {
- font: { name: "寰蒋闆呴粦", size: 14, bold: true },
- alignment: { horizontal: "center", vertical: "middle" },
- fill: {
- type: "pattern",
- pattern: "solid",
- fgColor: { argb: "FFF5F7FA" },
- },
- };
+ const workbook = new ExcelJS.Workbook();
+ const sheetName = `${
+ this.rowData.leavehospitaldistrictname || this.rowData.deptname
+ }${this.configTitle}鏄庣粏_${sheetNameSuffix}`;
+ const worksheet = workbook.addWorksheet(sheetName);
- const subtitleStyle = {
- font: { name: "寰蒋闆呴粦", size: 12, bold: true },
- alignment: { horizontal: "left", vertical: "middle" },
- };
+ // 鏍峰紡瀹氫箟锛堜繚鎸佷笉鍙橈級
+ const titleStyle = {
+ font: { name: "寰蒋闆呴粦", size: 14, bold: true },
+ alignment: { horizontal: "center", vertical: "middle" },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ },
+ };
- const headerStyle = {
- font: { name: "寰蒋闆呴粦", size: 11, bold: true },
- fill: {
- type: "pattern",
- pattern: "solid",
- fgColor: { argb: "FFEBEEF5" },
- },
- alignment: { horizontal: "center", vertical: "middle" },
- border: {
- top: { style: "thin" },
- left: { style: "thin" },
- bottom: { style: "thin" },
- right: { style: "thin" },
- },
- };
+ const subtitleStyle = {
+ font: { name: "寰蒋闆呴粦", size: 12, bold: true },
+ alignment: { horizontal: "left", vertical: "middle" },
+ };
- const cellStyle = {
- font: { name: "瀹嬩綋", size: 10 },
- alignment: { horizontal: "center", vertical: "middle" },
- border: {
- top: { style: "thin" },
- left: { style: "thin" },
- bottom: { style: "thin" },
- right: { style: "thin" },
- },
- };
+ const headerStyle = {
+ font: { name: "寰蒋闆呴粦", size: 11, bold: true },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFEBEEF5" },
+ },
+ alignment: { horizontal: "center", vertical: "middle" },
+ border: {
+ top: { style: "thin" },
+ left: { style: "thin" },
+ bottom: { style: "thin" },
+ right: { style: "thin" },
+ },
+ };
- /* ---------- 鏍囬鍖� ---------- */
- worksheet.mergeCells(1, 1, 1, 4);
- worksheet.getCell(1, 1).value = `${this.configTitle}棰樼洰鏄庣粏`;
- worksheet.getCell(1, 1).style = titleStyle;
+ const cellStyle = {
+ font: { name: "瀹嬩綋", size: 10 },
+ alignment: { horizontal: "center", vertical: "middle" },
+ border: {
+ top: { style: "thin" },
+ left: { style: "thin" },
+ bottom: { style: "thin" },
+ right: { style: "thin" },
+ },
+ };
- worksheet.mergeCells(2, 1, 2, 4);
- worksheet.getCell(2, 1).value = `缁熻瀵硅薄锛�${
- this.rowData.leavehospitaldistrictname || this.rowData.deptname
- }`;
- worksheet.getCell(2, 1).style = subtitleStyle;
+ // 鏍囬鍖�
+ worksheet.mergeCells(1, 1, 1, 4);
+ worksheet.getCell(
+ 1,
+ 1
+ ).value = `${this.configTitle}棰樼洰鏄庣粏锛�${dateRangeString}锛塦;
+ worksheet.getCell(1, 1).style = titleStyle;
- worksheet.mergeCells(3, 1, 3, 4);
- worksheet.getCell(3, 1).value = `缁熻鏃堕棿锛�${
- this.queryParams.dateRange?.[0] || "-"
- } 鑷� ${this.queryParams.dateRange?.[1] || "-"}`;
- worksheet.getCell(3, 1).style = subtitleStyle;
+ worksheet.mergeCells(2, 1, 2, 4);
+ worksheet.getCell(2, 1).value = `缁熻瀵硅薄锛�${
+ this.rowData.leavehospitaldistrictname || this.rowData.deptname
+ }`;
+ worksheet.getCell(2, 1).style = subtitleStyle;
- let currentRow = 5;
+ let currentRow = 4;
- /* ---------- 閫愰鍐欏叆 ---------- */
- this.processedTopicList.forEach((item, index) => {
- worksheet.mergeCells(currentRow, 1, currentRow, 4);
- worksheet.getCell(currentRow, 1).value = `绗�${index + 1}棰橈細${
- item.scriptContent
- } [${item.scriptType == 1 ? "鍗曢�夐" : "澶氶�夐"}]`;
- worksheet.getCell(currentRow, 1).style = subtitleStyle;
- currentRow++;
+ // 閫愰鍐欏叆
+ this.processedTopicList.forEach((item, index) => {
+ worksheet.mergeCells(currentRow, 1, currentRow, 4);
+ worksheet.getCell(currentRow, 1).value = `绗�${index + 1}棰橈細${
+ item.scriptContent
+ } [${item.scriptType == 1 ? "鍗曢�夐" : "澶氶�夐"}]`;
+ worksheet.getCell(currentRow, 1).style = subtitleStyle;
+ currentRow++;
- const headerRow = worksheet.addRow([
- "闂閫夐」",
- "閫夋嫨浜烘暟",
- "鍗犳瘮",
- "",
- ]);
- headerRow.eachCell((cell) => {
- cell.style = headerStyle;
- });
- currentRow++;
-
- item.details.forEach((detail) => {
- const percent =
- detail.chosenPercentage != null
- ? (Number(detail.chosenPercentage) * 100).toFixed(2) + "%"
- : "-";
-
- const row = worksheet.addRow([
- detail.optionText,
- detail.chosenQuantity || 0,
- percent,
+ const headerRow = worksheet.addRow([
+ "闂閫夐」",
+ "閫夋嫨浜烘暟",
+ "鍗犳瘮",
"",
]);
- row.eachCell((cell) => {
- cell.style = cellStyle;
+ headerRow.eachCell((cell) => {
+ cell.style = headerStyle;
});
+ currentRow++;
+
+ item.details.forEach((detail) => {
+ const percent =
+ detail.chosenPercentage != null
+ ? (Number(detail.chosenPercentage) * 100).toFixed(2) + "%"
+ : "-";
+
+ const row = worksheet.addRow([
+ detail.optionText,
+ detail.chosenQuantity || 0,
+ percent,
+ "",
+ ]);
+ row.eachCell((cell) => {
+ cell.style = cellStyle;
+ });
+ currentRow++;
+ });
+
currentRow++;
});
- currentRow++;
- });
+ // 璁剧疆鍒楀
+ worksheet.columns = [
+ { width: 40 },
+ { width: 12 },
+ { width: 12 },
+ { width: 10 },
+ ];
- /* ---------- 鍒楀 ---------- */
- worksheet.columns = [
- { width: 40 },
- { width: 12 },
- { width: 12 },
- { width: 10 },
- ];
+ // 鐢熸垚鏂囦欢鍚嶏紙涓庝富椤甸潰淇濇寔涓�鑷达級
+ const fileName = `${
+ this.rowData.leavehospitaldistrictname || this.rowData.deptname
+ }${this.configTitle}鏄庣粏_${dateRangeString}.xlsx`;
- /* ---------- 瀵煎嚭 ---------- */
- const buffer = await workbook.xlsx.writeBuffer();
- const fileName =
- `${this.rowData.leavehospitaldistrictname || this.rowData.deptname}` +
- `${this.configTitle}鏄庣粏_` +
- `${this.queryParams.dateRange?.[0]}鑷�${this.queryParams.dateRange?.[1]}.xlsx`;
+ const buffer = await workbook.xlsx.writeBuffer();
+ saveAs(
+ new Blob([buffer], {
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ }),
+ fileName
+ );
- saveAs(
- new Blob([buffer], {
- type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
- }),
- fileName
- );
-
- this.$message.success("瀵煎嚭鎴愬姛");
+ this.$message.success("瀵煎嚭鎴愬姛");
+ } catch (error) {
+ console.error("瀵煎嚭澶辫触:", error);
+ this.$message.error(`瀵煎嚭澶辫触: ${error.message}`);
+ }
},
- // 鏍煎紡鍖栫櫨鍒嗘瘮
+
formatPercent(value) {
if (value === null || value === undefined) return "-";
const num = parseFloat(value);
if (isNaN(num)) return "-";
- return `${num.toFixed(2)}%`; // 娉ㄦ剰锛氫綘鐨勬暟鎹腑鐧惧垎姣斿凡缁忔槸0-100鐨勫舰寮�
+ return `${num.toFixed(2)}%`;
},
- // 鍏抽棴瀵硅瘽妗�
handleClose() {
this.$emit("close");
},
@@ -354,6 +407,7 @@
overflow: hidden;
font-size: 14px;
}
+
.dialog-header {
display: flex;
justify-content: space-between;
@@ -368,6 +422,7 @@
color: #303133;
}
}
+
::v-deep .el-table th {
background-color: #f1f5f9;
color: #333;
diff --git a/src/views/Satisfaction/sfstatistics/components/visitStatistics.vue b/src/views/Satisfaction/sfstatistics/components/visitStatistics.vue
index ee25d7e..2c7ed98 100644
--- a/src/views/Satisfaction/sfstatistics/components/visitStatistics.vue
+++ b/src/views/Satisfaction/sfstatistics/components/visitStatistics.vue
@@ -323,6 +323,7 @@
:row-data="currentRow"
:topicList="topiclist"
:query-params="queryParams"
+ :topType="1"
@close="topicVisible = false"
/>
</el-dialog>
diff --git a/src/views/followvisit/Continue/index.vue b/src/views/followvisit/Continue/index.vue
index 3381ea3..a0657b9 100644
--- a/src/views/followvisit/Continue/index.vue
+++ b/src/views/followvisit/Continue/index.vue
@@ -172,16 +172,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<!-- <el-form-item label="鎺掑簭鏂瑰紡" prop="status">
<el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
@@ -330,7 +329,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -342,22 +341,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -400,7 +389,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -411,7 +400,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -500,6 +489,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -798,17 +835,22 @@
</el-form-item>
</el-col>
</el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="杩囨护鍘熷洜">
- <el-input
- v-model="form.notrequiredreason"
- type="textarea"
- placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ <!-- 鎻愰啋鏂囧瓧 -->
+ <div class="filter-warning">
+ <i class="el-icon-warning-outline"></i>
+ 璇ュ姛鑳介�傜敤浜庢浜°�佸垪鍏ュ尰闄㈤粦鍚嶅崟銆佹槑纭嫆缁濋殢璁跨瓑鎮h�呯殑杩囨护鎺掗櫎锛岃繃婊ゅ悗璇ユ偅鑰呮墍鏈夎繘琛屼腑浠诲姟鍏ㄩ儴鍋滄涓旀棤娉曞尮閰嶆柊鐨勯殢璁夸换鍔★紝璇疯皑鎱庢搷浣滐紒
+ </div>
+ </el-form-item>
+ </el-col>
+</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
@@ -1063,36 +1105,62 @@
},
],
loading: false,
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
cardlist: [
{
- name: "鍑洪櫌鏈嶅姟鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
- value: 0,
- },
- {
- name: "鍙戦�佸け璐�",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
zcrules: {
date1: [
@@ -1334,14 +1402,14 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
this.jgvalue = response.rows[0].jg;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1426,7 +1494,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -1529,6 +1597,37 @@
this.topqueryParams.startSendDateTime = this.dateRangefs[0];
this.topqueryParams.endSendDateTime = this.dateRangefs[1];
this.getList(refresh);
+ },
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
},
// 鎮h�呰寖鍥村鐞�
handleChange(value) {
@@ -2113,4 +2212,24 @@
// font-size: 24px;
// }
// }
+.filter-warning {
+ margin-top: 8px;
+ padding: 10px 14px;
+ background: #fff7e6;
+ border: 1px solid #ffe58f;
+ border-radius: 6px;
+ color: #d46b08;
+ font-size: 18px;
+ line-height: 1.6;
+ display: flex;
+ align-items: flex-start;
+ gap: 6px;
+}
+
+.filter-warning .el-icon-warning-outline {
+ font-size: 16px;
+ color: #faad14;
+ flex-shrink: 0;
+ margin-top: 2px;
+}
</style>
diff --git a/src/views/followvisit/HistoricalFollow/index.vue b/src/views/followvisit/HistoricalFollow/index.vue
index aca9f10..28b3354 100644
--- a/src/views/followvisit/HistoricalFollow/index.vue
+++ b/src/views/followvisit/HistoricalFollow/index.vue
@@ -31,16 +31,15 @@
placeholder="璇疯緭鍏ヨ瘖鏂悕绉�"
></el-input>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item>
@@ -122,7 +121,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -134,22 +133,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -201,7 +190,7 @@
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -212,7 +201,7 @@
>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -307,6 +296,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -590,41 +627,62 @@
},
],
loading: false,
- cardlist: [
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
{
- name: "鍑洪櫌鏈嶅姟鎬婚噺",
- value: 0,
+ value: null,
+ label: "鍏ㄩ儴",
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
{
- name: "闇�闅忚",
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
+ cardlist: [
+ {
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "寮傚父",
- // value: 0,
- // },
{
- name: "鍙戦�佸け璐�",
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
+ {
+ name: "闇�闅忚",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
// 琛ㄥ崟鍙傛暟
@@ -841,7 +899,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -947,6 +1005,37 @@
this.getList(refresh);
},
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
// 鎮h�呰寖鍥村鐞�
handleChange(value) {
let type = value[0];
diff --git a/src/views/followvisit/OutpatientAgain/index.vue b/src/views/followvisit/OutpatientAgain/index.vue
index 651130f..d8034c3 100644
--- a/src/views/followvisit/OutpatientAgain/index.vue
+++ b/src/views/followvisit/OutpatientAgain/index.vue
@@ -1,67 +1,11 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
- <el-row :gutter="10">
- <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
- <el-card
- shadow="hover"
- :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
- >
- <div style="padding: 8px" @click="$router.push(item.router)">
- <span>{{ item.name }}</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ item.value ? item.value : 0 }}
- </div>
- </div>
- </el-card>
- </el-col>
- <el-col :span="2.5">
- <div class="ysfleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>琛ㄥ崟宸插彂閫�</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ yfsvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- <el-col :span="2.5">
- <div class="errleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>寮傚父</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ ycvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
+ <statistics-cards
+ :cardlist="cardlist"
+ :ycvalue="ycvalue"
+ :jgvalue="jgvalue"
+ :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -125,16 +69,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item label="鎺掑簭鏂瑰紡" prop="status">
<el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
@@ -177,7 +120,7 @@
</div>
</div>
</el-col>
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
@@ -185,7 +128,7 @@
@click="handleAdd"
>鏂板</el-button
>
- </el-col>
+ </el-col> -->
<el-col :span="1.5">
<div class="documentf">
@@ -281,11 +224,11 @@
type="text"
@click="
gettoken360(
- scope.row.sfzh,
- scope.row.drcode,
- scope.row.drname,
- scope.row.patid
- )
+ scope.row.sfzh,
+ scope.row.drcode,
+ scope.row.drname,
+ scope.row.patid
+ )
"
><span class="button-textsc">{{
scope.row.sendname
@@ -313,22 +256,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -382,7 +315,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -493,6 +426,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -657,17 +638,22 @@
</el-form-item>
</el-col>
</el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="杩囨护鍘熷洜">
- <el-input
- v-model="form.notrequiredreason"
- type="textarea"
- placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ <!-- 鎻愰啋鏂囧瓧 -->
+ <div class="filter-warning">
+ <i class="el-icon-warning-outline"></i>
+ 璇ュ姛鑳介�傜敤浜庢浜°�佸垪鍏ュ尰闄㈤粦鍚嶅崟銆佹槑纭嫆缁濋殢璁跨瓑鎮h�呯殑杩囨护鎺掗櫎锛岃繃婊ゅ悗璇ユ偅鑰呮墍鏈夎繘琛屼腑浠诲姟鍏ㄩ儴鍋滄涓旀棤娉曞尮閰嶆柊鐨勯殢璁夸换鍔★紝璇疯皑鎱庢搷浣滐紒
+ </div>
+ </el-form-item>
+ </el-col>
+</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
@@ -837,17 +823,18 @@
buidegetTasklist,
addserviceSubtask,
query360PatInfo,
- query360PatInfonh
+ query360PatInfonh,
} from "@/api/AiCentre/index";
import { alterpatient, particularpatient } from "@/api/patient/homepage";
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import StatisticsCards from "@/components/StatisticsCards";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect,StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -922,34 +909,26 @@
loading: false,
cardlist: [
{
- name: "鏈嶅姟璺熻釜鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
- value: 0,
- },
- {
- name: "鍙戦�佸け璐�",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
zcrules: {
date1: [
@@ -959,6 +938,41 @@
{ required: true, message: "璇烽�夋嫨闅忚鏃堕棿", trigger: "blur" },
],
},
+ // 绾ц仈閫夋嫨鍣ㄧ粦瀹氬��
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 鏈嶅姟鐘舵�侀�夐」锛堜竴绾у拰浜岀骇鍊间笉鍐茬獊锛�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
// 琛ㄥ崟鍙傛暟
form: {
phonenumber: "",
@@ -998,7 +1012,8 @@
topqueryParams: {
pageNum: 1,
pageSize: 10,
- sendstateView: 1,
+ sendstateView:
+ localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" ? 1 : 2,
sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鏈嶅姟鏃堕棿(姝e簭) 1 鏈嶅姟鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
serviceType: 3,
searchscope: 3,
@@ -1011,7 +1026,7 @@
propss: { multiple: true },
options: [],
- topicoptions: [
+ topicoptions: [
{
value: null,
label: "鍏ㄩ儴",
@@ -1172,13 +1187,13 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1252,7 +1267,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -1380,6 +1395,37 @@
this.topqueryParams.searchscope = 3;
}
},
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
this.dateRange = [];
@@ -1387,7 +1433,8 @@
this.topqueryParams = {
pageNum: 1,
pageSize: 10,
- sendstateView: 1,
+ sendstateView:
+ localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" ? 1 : 2,
sort: 2, //0 鏈嶅姟鏃堕棿(姝e簭) 1 鏈嶅姟鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
serviceType: 3,
searchscope: 3,
@@ -1603,8 +1650,7 @@
'"鐨勬暟鎹」锛�'
)
.then(() => {
-
- getTaskservelist({
+ getTaskservelist({
patid: row.patid,
taskid: row.taskid,
}).then((res) => {
@@ -1857,7 +1903,26 @@
font-size: 24px;
}
}
+.filter-warning {
+ margin-top: 8px;
+ padding: 10px 14px;
+ background: #fff7e6;
+ border: 1px solid #ffe58f;
+ border-radius: 6px;
+ color: #d46b08;
+ font-size: 18px;
+ line-height: 1.6;
+ display: flex;
+ align-items: flex-start;
+ gap: 6px;
+}
+.filter-warning .el-icon-warning-outline {
+ font-size: 16px;
+ color: #faad14;
+ flex-shrink: 0;
+ margin-top: 2px;
+}
// 閫夐」瀛椾綋鏀惧ぇ
// ::v-deep.el-checkbox-group {
// span {
diff --git a/src/views/followvisit/SpecificDisease/index.vue b/src/views/followvisit/SpecificDisease/index.vue
index cb2734b..a71f265 100644
--- a/src/views/followvisit/SpecificDisease/index.vue
+++ b/src/views/followvisit/SpecificDisease/index.vue
@@ -108,16 +108,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item>
@@ -232,7 +231,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -244,22 +243,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -308,7 +297,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -319,7 +308,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -414,6 +403,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -812,41 +849,62 @@
},
],
loading: false,
- cardlist: [
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
{
- name: "鍑洪櫌鏈嶅姟鎬婚噺",
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
+ cardlist: [
+ {
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
value: 0,
},
-
- // {
- // name: "寮傚父",
- // value: 0,
- // },
{
- name: "鍙戦�佸け璐�",
+ name: "寰呴殢璁�",
value: 0,
},
{
- name: "寰呭彂閫�",
+ name: "宸插畬鎴�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "宸插彂閫佹湭棰嗗彇",
- // value: 0,
- // },
],
// 琛ㄥ崟鍙傛暟
@@ -981,13 +1039,13 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1119,6 +1177,37 @@
this.getList(refresh);
},
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
// 鎮h�呰寖鍥村鐞�
handleChange(value) {
let type = value[0];
diff --git a/src/views/followvisit/Tracking/index.vue b/src/views/followvisit/Tracking/index.vue
index 8579ede..2256578 100644
--- a/src/views/followvisit/Tracking/index.vue
+++ b/src/views/followvisit/Tracking/index.vue
@@ -64,16 +64,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item label="鎺掑簭鏂瑰紡" prop="status">
<el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
@@ -240,7 +239,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -252,22 +251,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -321,7 +310,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -432,6 +421,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -596,17 +633,22 @@
</el-form-item>
</el-col>
</el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="杩囨护鍘熷洜">
- <el-input
- v-model="form.notrequiredreason"
- type="textarea"
- placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ <!-- 鎻愰啋鏂囧瓧 -->
+ <div class="filter-warning">
+ <i class="el-icon-warning-outline"></i>
+ 璇ュ姛鑳介�傜敤浜庢浜°�佸垪鍏ュ尰闄㈤粦鍚嶅崟銆佹槑纭嫆缁濋殢璁跨瓑鎮h�呯殑杩囨护鎺掗櫎锛岃繃婊ゅ悗璇ユ偅鑰呮墍鏈夎繘琛屼腑浠诲姟鍏ㄩ儴鍋滄涓旀棤娉曞尮閰嶆柊鐨勯殢璁夸换鍔★紝璇疯皑鎱庢搷浣滐紒
+ </div>
+ </el-form-item>
+ </el-col>
+</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
@@ -859,36 +901,62 @@
},
],
loading: false,
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
cardlist: [
{
- name: "寤剁画鎶ょ悊鏈嶅姟鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
- value: 0,
- },
- {
- name: "鍙戦�佸け璐�",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
zcrules: {
date1: [
@@ -937,7 +1005,8 @@
topqueryParams: {
pageNum: 1,
pageSize: 10,
- sendstateView: 1,
+ sendstateView:
+ localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" ? 1 : 2,
sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 寤剁画鎶ょ悊鏃堕棿(姝e簭) 1 寤剁画鎶ょ悊鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
serviceType: 3,
searchscope: 3,
@@ -1111,13 +1180,13 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1191,7 +1260,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -1298,6 +1367,37 @@
console.log("2");
this.getList(refresh);
},
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
// 鎮h�呰寖鍥村鐞�
handleChange(value) {
let type = value[0];
@@ -1326,7 +1426,8 @@
this.topqueryParams = {
pageNum: 1,
pageSize: 10,
- sendstateView: 1,
+ sendstateView:
+ localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" ? 1 : 2,
sort: 2, //0 寤剁画鎶ょ悊鏃堕棿(姝e簭) 1 寤剁画鎶ょ悊鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
serviceType: 3,
searchscope: 3,
@@ -1796,7 +1897,26 @@
font-size: 24px;
}
}
+.filter-warning {
+ margin-top: 8px;
+ padding: 10px 14px;
+ background: #fff7e6;
+ border: 1px solid #ffe58f;
+ border-radius: 6px;
+ color: #d46b08;
+ font-size: 18px;
+ line-height: 1.6;
+ display: flex;
+ align-items: flex-start;
+ gap: 6px;
+}
+.filter-warning .el-icon-warning-outline {
+ font-size: 16px;
+ color: #faad14;
+ flex-shrink: 0;
+ margin-top: 2px;
+}
// 閫夐」瀛椾綋鏀惧ぇ
// ::v-deep.el-checkbox-group {
// span {
diff --git a/src/views/followvisit/again/index.vue b/src/views/followvisit/again/index.vue
index 5833d59..902ee73 100644
--- a/src/views/followvisit/again/index.vue
+++ b/src/views/followvisit/again/index.vue
@@ -1,67 +1,11 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
- <el-row :gutter="10">
- <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
- <el-card
- shadow="hover"
- :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
- >
- <div style="padding: 8px" @click="$router.push(item.router)">
- <span>{{ item.name }}</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ item.value ? item.value : 0 }}
- </div>
- </div>
- </el-card>
- </el-col>
- <el-col :span="2.5">
- <div class="ysfleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>琛ㄥ崟宸插彂閫�</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ yfsvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- <el-col :span="2.5">
- <div class="errleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>寮傚父</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ ycvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
+ <statistics-cards
+ :cardlist="cardlist"
+ :ycvalue="ycvalue"
+ :jgvalue="jgvalue"
+ :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -125,16 +69,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item label="鎺掑簭鏂瑰紡" prop="status">
<el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
@@ -177,7 +120,7 @@
</div>
</div>
</el-col>
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
@@ -185,7 +128,7 @@
@click="handleAdd"
>鏂板</el-button
>
- </el-col>
+ </el-col> -->
<el-col :span="1.5">
<div class="documentf">
@@ -302,54 +245,7 @@
:show-overflow-tooltip="true"
>
</el-table-column>
- <!-- <el-table-column
- 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"
@@ -370,22 +266,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -428,7 +314,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -439,7 +325,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -448,6 +334,7 @@
<span>{{ formatTime(scope.row.visitTime) }}</span>
</template></el-table-column
>
+
<el-table-column
label="涓绘不鍖荤敓"
width="120"
@@ -541,6 +428,55 @@
prop="templatename"
width="200"
/>
+
+ <el-table-column
+ 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"
@@ -705,17 +641,22 @@
</el-form-item>
</el-col>
</el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="杩囨护鍘熷洜">
- <el-input
- v-model="form.notrequiredreason"
- type="textarea"
- placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ <!-- 鎻愰啋鏂囧瓧 -->
+ <div class="filter-warning">
+ <i class="el-icon-warning-outline"></i>
+ 璇ュ姛鑳介�傜敤浜庢浜°�佸垪鍏ュ尰闄㈤粦鍚嶅崟銆佹槑纭嫆缁濋殢璁跨瓑鎮h�呯殑杩囨护鎺掗櫎锛岃繃婊ゅ悗璇ユ偅鑰呮墍鏈夎繘琛屼腑浠诲姟鍏ㄩ儴鍋滄涓旀棤娉曞尮閰嶆柊鐨勯殢璁夸换鍔★紝璇疯皑鎱庢搷浣滐紒
+ </div>
+ </el-form-item>
+ </el-col>
+</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
@@ -890,12 +831,14 @@
import { alterpatient, particularpatient } from "@/api/patient/homepage";
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
+import StatisticsCards from "@/components/StatisticsCards";
+
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect, StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -951,7 +894,41 @@
},
value: [],
list: [],
-
+ // 绾ц仈閫夋嫨鍣ㄧ粦瀹氬��
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 鏈嶅姟鐘舵�侀�夐」锛堜竴绾у拰浜岀骇鍊间笉鍐茬獊锛�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
sourcetype: [
{
value: 1,
@@ -971,34 +948,26 @@
loading: false,
cardlist: [
{
- name: "鍑洪櫌鏈嶅姟鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
- value: 0,
- },
- {
- name: "鍙戦�佸け璐�",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
zcrules: {
date1: [
@@ -1047,7 +1016,7 @@
topqueryParams: {
pageNum: 1,
pageSize: 10,
- sendstateView: 1,
+ sendstateView:1,
sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
serviceType: 2,
searchscope: 3,
@@ -1212,7 +1181,6 @@
this.topqueryParams.deptOrDistrict = 1;
}
-
if (!this.followupAuthority()) {
this.$message.warning("鏈厤缃瀹�/鐥呭尯鐩稿叧鏉冮檺涓嶅彲鏌ヨ");
return Promise.reject(new Error("鏃犳潈闄愭煡璇�"));
@@ -1221,14 +1189,14 @@
this.userList = response.rows[0].serviceSubtaskList;
this.total = response.total;
if (refresh) {
- this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ this.cardlist[0].value =
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1301,8 +1269,8 @@
this.userList = response.rows[0].serviceSubtaskList;
this.total = response.total;
if (refresh) {
- this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ this.cardlist[0].value =
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -1430,14 +1398,47 @@
this.topqueryParams.searchscope = 3;
}
},
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
this.dateRange = [];
this.dateRangefs = [];
+ this.serviceStatusValue = 10;
+
this.topqueryParams = {
pageNum: 1,
pageSize: 10,
- sendstateView: 1,
+ sendstateView:1,
sort: 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
serviceType: 2,
searchscope: 3,
@@ -1653,8 +1654,7 @@
'"鐨勬暟鎹」锛�'
)
.then(() => {
-
- getTaskservelist({
+ getTaskservelist({
patid: row.patid,
taskid: row.taskid,
}).then((res) => {
@@ -1907,7 +1907,26 @@
font-size: 24px;
}
}
+.filter-warning {
+ margin-top: 8px;
+ padding: 10px 14px;
+ background: #fff7e6;
+ border: 1px solid #ffe58f;
+ border-radius: 6px;
+ color: #d46b08;
+ font-size: 18px;
+ line-height: 1.6;
+ display: flex;
+ align-items: flex-start;
+ gap: 6px;
+}
+.filter-warning .el-icon-warning-outline {
+ font-size: 16px;
+ color: #faad14;
+ flex-shrink: 0;
+ margin-top: 2px;
+}
// 閫夐」瀛椾綋鏀惧ぇ
// ::v-deep.el-checkbox-group {
// span {
diff --git a/src/views/followvisit/beHospitalized/followUp.vue b/src/views/followvisit/beHospitalized/followUp.vue
index 2de6cc0..baaf539 100644
--- a/src/views/followvisit/beHospitalized/followUp.vue
+++ b/src/views/followvisit/beHospitalized/followUp.vue
@@ -172,16 +172,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item label="鎺掑簭鏂瑰紡" prop="status">
<el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
@@ -224,7 +223,7 @@
</div>
</div>
</el-col>
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
@@ -232,7 +231,7 @@
@click="handleAdd"
>鏂板</el-button
>
- </el-col>
+ </el-col> -->
<el-col :span="1.5">
<div class="documentf">
@@ -436,22 +435,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -494,7 +483,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -505,7 +494,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -531,12 +520,11 @@
width="120"
/>
<el-table-column
- v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
- label="缁忕鍖荤敓"
+ label="鑱旂郴鐢佃瘽"
+ width="200"
align="center"
- key="managementDoctor"
- prop="managementDoctor"
- width="120"
+ key="phone"
+ prop="phone"
/>
<el-table-column
label="鍑洪櫌澶╂暟"
@@ -550,18 +538,27 @@
</template>
</el-table-column>
<el-table-column
+ label="鑱旂郴鐢佃瘽"
+ width="200"
+ align="center"
+ key="phone"
+ prop="phone"
+ />
+ <el-table-column
label="韬唤璇佸彿鐮�"
width="200"
align="center"
key="sfzh"
prop="sfzh"
/>
+
<el-table-column
- label="鑱旂郴鐢佃瘽"
- width="200"
+ v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
+ label="缁忕鍖荤敓"
align="center"
- key="phone"
- prop="phone"
+ key="managementDoctor"
+ prop="managementDoctor"
+ width="120"
/>
<el-table-column
label="璐d换鎶ゅ+"
@@ -607,6 +604,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -946,17 +991,22 @@
</el-form-item>
</el-col>
</el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="杩囨护鍘熷洜">
- <el-input
- v-model="form.notrequiredreason"
- type="textarea"
- placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ <!-- 鎻愰啋鏂囧瓧 -->
+ <div class="filter-warning">
+ <i class="el-icon-warning-outline"></i>
+ 璇ュ姛鑳介�傜敤浜庢浜°�佸垪鍏ュ尰闄㈤粦鍚嶅崟銆佹槑纭嫆缁濋殢璁跨瓑鎮h�呯殑杩囨护鎺掗櫎锛岃繃婊ゅ悗璇ユ偅鑰呮墍鏈夎繘琛屼腑浠诲姟鍏ㄩ儴鍋滄涓旀棤娉曞尮閰嶆柊鐨勯殢璁夸换鍔★紝璇疯皑鎱庢搷浣滐紒
+ </div>
+ </el-form-item>
+ </el-col>
+</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
@@ -1211,36 +1261,97 @@
},
],
loading: false,
- cardlist: [
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
{
- name: "鍑洪櫌鏈嶅姟鎬婚噺",
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
+ cardlist: [
+ {
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
- value: 0,
- },
- {
- name: "鍙戦�佸け璐�",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
+ ],
+ // 绾ц仈閫夋嫨鍣ㄧ粦瀹氬��
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 鏈嶅姟鐘舵�侀�夐」锛堜竴绾у拰浜岀骇鍊间笉鍐茬獊锛�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
],
zcrules: {
date1: [
@@ -1306,7 +1417,7 @@
pageNum: 1,
pageSize: 10,
sendstateView:
- localStorage.getItem("orgname") == "鐪佺珛鍚屽痉缈犺嫅闄㈠尯" ? null : 2,
+ localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" ? 1 : 2,
sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
serviceType: 18,
searchscope: 3,
@@ -1530,16 +1641,14 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) +
- Number(response.rows[0].ysf) +
- Number(response.rows[0].fssb);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
this.jgvalue = response.rows[0].jg;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1643,7 +1752,7 @@
this.userList = response.rows[0].serviceSubtaskList;
this.total = response.total;
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -1767,6 +1876,37 @@
this.topqueryParams.searchscope = 3;
}
},
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
this.dateRange = [];
@@ -1774,7 +1914,8 @@
this.topqueryParams = {
pageNum: 1,
pageSize: 10,
- sendstateView: 1,
+ sendstateView:
+ localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" ? 1 : 2,
sort: 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
serviceType: 18,
searchscope: 3,
@@ -2347,6 +2488,26 @@
border-color: #d8b4fe;
opacity: 1; /* 淇濇寔绂佺敤鐘舵�侀�忔槑搴� */
}
+.filter-warning {
+ margin-top: 8px;
+ padding: 10px 14px;
+ background: #fff7e6;
+ border: 1px solid #ffe58f;
+ border-radius: 6px;
+ color: #d46b08;
+ font-size: 18px;
+ line-height: 1.6;
+ display: flex;
+ align-items: flex-start;
+ gap: 6px;
+}
+
+.filter-warning .el-icon-warning-outline {
+ font-size: 16px;
+ color: #faad14;
+ flex-shrink: 0;
+ margin-top: 2px;
+}
// 閫夐」瀛椾綋鏀惧ぇ
// ::v-deep.el-checkbox-group {
// span {
diff --git a/src/views/followvisit/beHospitalized/publicity.vue b/src/views/followvisit/beHospitalized/publicity.vue
index 15311bb..110edf5 100644
--- a/src/views/followvisit/beHospitalized/publicity.vue
+++ b/src/views/followvisit/beHospitalized/publicity.vue
@@ -98,7 +98,7 @@
</el-form>
<el-divider></el-divider>
<el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
@@ -106,7 +106,7 @@
@click="handleAdd"
>鏂板</el-button
>
- </el-col>
+ </el-col> -->
<el-col :span="1.5">
<div class="documentf">
<div class="document">
@@ -246,7 +246,7 @@
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
diff --git a/src/views/followvisit/complaint/index.vue b/src/views/followvisit/complaint/index.vue
index 0c6e97b..8cc960f 100644
--- a/src/views/followvisit/complaint/index.vue
+++ b/src/views/followvisit/complaint/index.vue
@@ -1,67 +1,11 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
- <el-row :gutter="10">
- <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
- <el-card
- shadow="hover"
- :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
- >
- <div style="padding: 8px" @click="$router.push(item.router)">
- <span>{{ item.name }}</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ item.value ? item.value : 0 }}
- </div>
- </div>
- </el-card>
- </el-col>
- <el-col :span="2.5">
- <div class="ysfleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>琛ㄥ崟宸插彂閫�</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ yfsvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- <el-col :span="2.5">
- <div class="errleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>寮傚父</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ ycvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
+ <statistics-cards
+ :cardlist="cardlist"
+ :ycvalue="ycvalue"
+ :jgvalue="jgvalue"
+ :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -133,16 +77,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item label="鎺掑簭鏂瑰紡" prop="status">
<el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
@@ -311,7 +254,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -323,22 +266,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -381,7 +314,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -491,6 +424,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -830,17 +811,22 @@
</el-form-item>
</el-col>
</el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="杩囨护鍘熷洜">
- <el-input
- v-model="form.notrequiredreason"
- type="textarea"
- placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ <!-- 鎻愰啋鏂囧瓧 -->
+ <div class="filter-warning">
+ <i class="el-icon-warning-outline"></i>
+ 璇ュ姛鑳介�傜敤浜庢浜°�佸垪鍏ュ尰闄㈤粦鍚嶅崟銆佹槑纭嫆缁濋殢璁跨瓑鎮h�呯殑杩囨护鎺掗櫎锛岃繃婊ゅ悗璇ユ偅鑰呮墍鏈夎繘琛屼腑浠诲姟鍏ㄩ儴鍋滄涓旀棤娉曞尮閰嶆柊鐨勯殢璁夸换鍔★紝璇疯皑鎱庢搷浣滐紒
+ </div>
+ </el-form-item>
+ </el-col>
+</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
@@ -946,12 +932,14 @@
import { alterpatient, particularpatient } from "@/api/patient/homepage";
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
+import StatisticsCards from "@/components/StatisticsCards";
+
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect,StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -987,6 +975,41 @@
type: [],
},
zcform: {},
+ // 绾ц仈閫夋嫨鍣ㄧ粦瀹氬��
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 鏈嶅姟鐘舵�侀�夐」锛堜竴绾у拰浜岀骇鍊间笉鍐茬獊锛�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
dynamicTags: ["閫夐」涓�", "閫夐」浜�", "閫夐」涓�"], //閫夐」
inputVisible: false,
Labelchange: false,
@@ -1023,36 +1046,62 @@
},
],
loading: false,
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
cardlist: [
{
- name: "鏈嶅姟鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
- value: 0,
- },
- {
- name: "鍙戦�佸け璐�",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
zcrules: {
date1: [
@@ -1263,13 +1312,13 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1339,7 +1388,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -1441,6 +1490,37 @@
this.topqueryParams.startSendDateTime = this.dateRangefs[0];
this.topqueryParams.endSendDateTime = this.dateRangefs[1];
this.getList(refresh);
+ },
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
},
// 鎮h�呰寖鍥村鐞�
handleChange(value) {
@@ -1982,4 +2062,24 @@
// font-size: 24px;
// }
// }
+.filter-warning {
+ margin-top: 8px;
+ padding: 10px 14px;
+ background: #fff7e6;
+ border: 1px solid #ffe58f;
+ border-radius: 6px;
+ color: #d46b08;
+ font-size: 18px;
+ line-height: 1.6;
+ display: flex;
+ align-items: flex-start;
+ gap: 6px;
+}
+
+.filter-warning .el-icon-warning-outline {
+ font-size: 16px;
+ color: #faad14;
+ flex-shrink: 0;
+ margin-top: 2px;
+}
</style>
diff --git a/src/views/followvisit/discharge/index.vue b/src/views/followvisit/discharge/index.vue
index 0f3f605..dfe664f 100644
--- a/src/views/followvisit/discharge/index.vue
+++ b/src/views/followvisit/discharge/index.vue
@@ -1,86 +1,11 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
- <el-row :gutter="10">
- <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
- <el-card
- shadow="hover"
- :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
- >
- <div style="padding: 8px" @click="$router.push(item.router)">
- <span>{{ item.name }}</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ item.value ? item.value : 0 }}
- </div>
- </div>
- </el-card>
- </el-col>
- <el-col :span="2.5">
- <div class="ysfleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>琛ㄥ崟宸插彂閫�</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ yfsvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- <el-col :span="2.5">
- <div class="errleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>寮傚父</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ ycvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- <el-col :span="2.5" v-if="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'">
- <div class="jgleftvlue">
- <el-card shadow="hover ">
- <div style="padding: 8px">
- <span>璀﹀憡</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ jgvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
+ <statistics-cards
+ :cardlist="cardlist"
+ :ycvalue="ycvalue"
+ :jgvalue="jgvalue"
+ :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -172,16 +97,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item label="鎺掑簭鏂瑰紡" prop="status">
@@ -225,7 +149,7 @@
</div>
</div>
</el-col>
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
@@ -233,7 +157,7 @@
@click="handleAdd"
>鏂板</el-button
>
- </el-col>
+ </el-col> -->
<el-col :span="1.5">
<div class="documentf">
@@ -383,6 +307,7 @@
effect="dark"
:content="scope.row.remark"
placement="top-start"
+ popper-class="statistics-tooltip"
>
<div v-if="scope.row.sendstateView == 1">
<el-tag type="primary" :disable-transitions="false"
@@ -390,22 +315,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -427,6 +342,7 @@
/>
</template>
</el-table-column>
+
<el-table-column
label="浠诲姟鎵ц鏂瑰紡"
align="center"
@@ -452,7 +368,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -463,7 +379,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -489,13 +405,53 @@
width="120"
/>
<el-table-column
- v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
- label="缁忕鍖荤敓"
+ label="浠诲姟鐘舵��"
align="center"
- key="managementDoctor"
- prop="managementDoctor"
+ 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="鍑洪櫌澶╂暟"
width="120"
@@ -508,13 +464,6 @@
</template>
</el-table-column>
<el-table-column
- label="韬唤璇佸彿鐮�"
- width="200"
- align="center"
- key="sfzh"
- prop="sfzh"
- />
- <el-table-column
label="鑱旂郴鐢佃瘽"
width="200"
align="center"
@@ -522,13 +471,28 @@
prop="phone"
/>
<el-table-column
+ label="韬唤璇佸彿鐮�"
+ width="200"
+ align="center"
+ key="sfzh"
+ prop="sfzh"
+ />
+
+ <el-table-column
label="璐d换鎶ゅ+"
width="120"
align="center"
key="nurseName"
prop="nurseName"
/>
-
+ <el-table-column
+ v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
+ label="缁忕鍖荤敓"
+ align="center"
+ key="managementDoctor"
+ prop="managementDoctor"
+ width="120"
+ />
<!-- <el-table-column
label="鐥呭巻鍙�"
align="center"
@@ -580,6 +544,7 @@
</span>
</template>
</el-table-column> -->
+
<el-table-column
label="浠诲姟缁撴灉璇存槑"
width="220"
@@ -901,6 +866,11 @@
type="textarea"
placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
></el-input>
+ <!-- 鎻愰啋鏂囧瓧 -->
+ <div class="filter-warning">
+ <i class="el-icon-warning-outline"></i>
+ 璇ュ姛鑳介�傜敤浜庢浜°�佸垪鍏ュ尰闄㈤粦鍚嶅崟銆佹槑纭嫆缁濋殢璁跨瓑鎮h�呯殑杩囨护鎺掗櫎锛岃繃婊ゅ悗璇ユ偅鑰呮墍鏈夎繘琛屼腑浠诲姟鍏ㄩ儴鍋滄涓旀棤娉曞尮閰嶆柊鐨勯殢璁夸换鍔★紝璇疯皑鎱庢搷浣滐紒
+ </div>
</el-form-item>
</el-col>
</el-row>
@@ -1078,13 +1048,15 @@
} from "@/api/AiCentre/index";
import { alterpatient, particularpatient } from "@/api/patient/homepage";
import Treeselect from "@riophae/vue-treeselect";
+import StatisticsCards from "@/components/StatisticsCards";
+
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect, StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -1137,7 +1109,41 @@
// 婊℃剰搴﹁皟鏌ユ暟鎹�
scoreDialogVisible: false,
selectedRows: [],
-
+ // 绾ц仈閫夋嫨鍣ㄧ粦瀹氬��
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 鏈嶅姟鐘舵�侀�夐」锛堜竴绾у拰浜岀骇鍊间笉鍐茬獊锛�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
value: [],
list: [],
@@ -1160,34 +1166,26 @@
loading: false,
cardlist: [
{
- name: "鍑洪櫌鏈嶅姟鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
- value: 0,
- },
- {
- name: "鍙戦�佸け璐�",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
zcrules: {
date1: [
@@ -1252,10 +1250,10 @@
topqueryParams: {
pageNum: 1,
pageSize: 10,
- sendstateView:
- localStorage.getItem("orgname") == "鐪佺珛鍚屽痉缈犺嫅闄㈠尯" ? null : 2,
- sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
+ sendstateView: 1,
+ sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 1, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
serviceType: 2,
+ sendstate: null,
searchscope: 3,
visitCount: 1,
scopetype: [],
@@ -1477,16 +1475,14 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) +
- Number(response.rows[0].ysf) +
- Number(response.rows[0].fssb);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
this.jgvalue = response.rows[0].jg;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1590,7 +1586,7 @@
this.userList = response.rows[0].serviceSubtaskList;
this.total = response.total;
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -1714,10 +1710,42 @@
this.topqueryParams.searchscope = 3;
}
},
+ // 鏈嶅姟鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
this.dateRange = [];
this.dateRangefs = [];
+ this.serviceStatusValue = 10;
this.topqueryParams = {
pageNum: 1,
pageSize: 10,
@@ -2300,10 +2328,47 @@
border-color: #d8b4fe;
opacity: 1; /* 淇濇寔绂佺敤鐘舵�侀�忔槑搴� */
}
+.statistics-tooltip {
+ background: #ffffff !important;
+ color: #1976d2 !important;
+ border: 1px solid #bbdefb !important;
+ border-radius: 8px !important;
+ padding: 10px 14px !important;
+ font-size: 13px !important;
+ line-height: 1.6 !important;
+ box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15) !important;
+}
+.statistics-tooltip .popper__arrow {
+ border-bottom-color: #bbdefb !important;
+}
+
+.statistics-tooltip .popper__arrow::after {
+ border-bottom-color: #ffffff !important;
+}
// 閫夐」瀛椾綋鏀惧ぇ
// ::v-deep.el-checkbox-group {
// span {
// font-size: 24px;
// }
// }
+.filter-warning {
+ margin-top: 8px;
+ padding: 10px 14px;
+ background: #fff7e6;
+ border: 1px solid #ffe58f;
+ border-radius: 6px;
+ color: #d46b08;
+ font-size: 18px;
+ line-height: 1.6;
+ display: flex;
+ align-items: flex-start;
+ gap: 6px;
+}
+
+.filter-warning .el-icon-warning-outline {
+ font-size: 16px;
+ color: #faad14;
+ flex-shrink: 0;
+ margin-top: 2px;
+}
</style>
diff --git a/src/views/followvisit/discharge/outpatientService.vue b/src/views/followvisit/discharge/outpatientService.vue
index 38bcdea..0f286b3 100644
--- a/src/views/followvisit/discharge/outpatientService.vue
+++ b/src/views/followvisit/discharge/outpatientService.vue
@@ -1,67 +1,11 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
- <el-row :gutter="10">
- <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
- <el-card
- shadow="hover"
- :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
- >
- <div style="padding: 8px" @click="$router.push(item.router)">
- <span>{{ item.name }}</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ item.value ? item.value : 0 }}
- </div>
- </div>
- </el-card>
- </el-col>
- <el-col :span="2.5">
- <div class="ysfleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>琛ㄥ崟宸插彂閫�</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ yfsvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- <el-col :span="2.5">
- <div class="errleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>寮傚父</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ ycvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
+ <statistics-cards
+ :cardlist="cardlist"
+ :ycvalue="ycvalue"
+ :jgvalue="jgvalue"
+ :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -131,16 +75,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item label="鎺掑簭鏂瑰紡" prop="status">
<el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
@@ -307,7 +250,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -319,22 +262,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -389,7 +322,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -491,6 +424,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -645,17 +626,22 @@
</el-col>
</el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="杩囨护鍘熷洜">
- <el-input
- v-model="form.notrequiredreason"
- type="textarea"
- placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ <!-- 鎻愰啋鏂囧瓧 -->
+ <div class="filter-warning">
+ <i class="el-icon-warning-outline"></i>
+ 璇ュ姛鑳介�傜敤浜庢浜°�佸垪鍏ュ尰闄㈤粦鍚嶅崟銆佹槑纭嫆缁濋殢璁跨瓑鎮h�呯殑杩囨护鎺掗櫎锛岃繃婊ゅ悗璇ユ偅鑰呮墍鏈夎繘琛屼腑浠诲姟鍏ㄩ儴鍋滄涓旀棤娉曞尮閰嶆柊鐨勯殢璁夸换鍔★紝璇疯皑鎱庢搷浣滐紒
+ </div>
+ </el-form-item>
+ </el-col>
+</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
@@ -830,12 +816,14 @@
import { alterpatient, particularpatient } from "@/api/patient/homepage";
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
+import StatisticsCards from "@/components/StatisticsCards";
+
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect,StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -909,36 +897,62 @@
},
],
loading: false,
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
cardlist: [
{
- name: "闂ㄨ瘖鏈嶅姟鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
- value: 0,
- },
- {
- name: "鍙戦�佸け璐�",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
zcrules: {
date1: [
@@ -1156,13 +1170,13 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1233,7 +1247,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -1336,6 +1350,37 @@
this.topqueryParams.endSendDateTime = this.dateRangefs[1];
this.getList(refresh);
},
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
// 鎮h�呰寖鍥村鐞�
handleChange(value) {
let type = value[0];
@@ -1361,7 +1406,8 @@
this.topqueryParams = {
pageNum: 1,
pageSize: 10,
- sendstateView: 1,
+ sendstateView:
+ localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" ? 1 : 2,
sort: 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
serviceType: 3,
searchscope: 3,
@@ -1837,4 +1883,24 @@
// font-size: 24px;
// }
// }
+.filter-warning {
+ margin-top: 8px;
+ padding: 10px 14px;
+ background: #fff7e6;
+ border: 1px solid #ffe58f;
+ border-radius: 6px;
+ color: #d46b08;
+ font-size: 18px;
+ line-height: 1.6;
+ display: flex;
+ align-items: flex-start;
+ gap: 6px;
+}
+
+.filter-warning .el-icon-warning-outline {
+ font-size: 16px;
+ color: #faad14;
+ flex-shrink: 0;
+ margin-top: 2px;
+}
</style>
diff --git a/src/views/followvisit/mzsatisfaction/index.vue b/src/views/followvisit/mzsatisfaction/index.vue
index 13205f5..9ec17af 100644
--- a/src/views/followvisit/mzsatisfaction/index.vue
+++ b/src/views/followvisit/mzsatisfaction/index.vue
@@ -1,67 +1,11 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
- <el-row :gutter="10">
- <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
- <el-card
- shadow="hover"
- :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
- >
- <div style="padding: 8px" @click="$router.push(item.router)">
- <span>{{ item.name }}</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ item.value ? item.value : 0 }}
- </div>
- </div>
- </el-card>
- </el-col>
- <el-col :span="2.5">
- <div class="ysfleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>琛ㄥ崟宸插彂閫�</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ yfsvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- <el-col :span="2.5">
- <div class="errleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>寮傚父</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ ycvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
+ <statistics-cards
+ :cardlist="cardlist"
+ :ycvalue="ycvalue"
+ :jgvalue="jgvalue"
+ :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -187,7 +131,7 @@
</div>
</div>
</el-col>
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
@@ -195,7 +139,7 @@
@click="handleAdd"
>鏂板</el-button
>
- </el-col>
+ </el-col> -->
<el-col :span="1.5">
<div class="documentf">
@@ -312,7 +256,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -324,22 +268,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -382,7 +316,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -492,6 +426,54 @@
width="200"
/>
+ <el-table-column
+ 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"
@@ -798,17 +780,22 @@
</el-form-item>
</el-col>
</el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="杩囨护鍘熷洜">
- <el-input
- v-model="form.notrequiredreason"
- type="textarea"
- placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ <!-- 鎻愰啋鏂囧瓧 -->
+ <div class="filter-warning">
+ <i class="el-icon-warning-outline"></i>
+ 璇ュ姛鑳介�傜敤浜庢浜°�佸垪鍏ュ尰闄㈤粦鍚嶅崟銆佹槑纭嫆缁濋殢璁跨瓑鎮h�呯殑杩囨护鎺掗櫎锛岃繃婊ゅ悗璇ユ偅鑰呮墍鏈夎繘琛屼腑浠诲姟鍏ㄩ儴鍋滄涓旀棤娉曞尮閰嶆柊鐨勯殢璁夸换鍔★紝璇疯皑鎱庢搷浣滐紒
+ </div>
+ </el-form-item>
+ </el-col>
+</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
@@ -984,11 +971,12 @@
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import StatisticsCards from "@/components/StatisticsCards";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect,StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -1063,34 +1051,26 @@
loading: false,
cardlist: [
{
- name: "鏈嶅姟鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
- value: 0,
- },
- {
- name: "鍙戦�佸け璐�",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
zcrules: {
date1: [
@@ -1309,13 +1289,13 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1385,7 +1365,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -1996,4 +1976,24 @@
// font-size: 24px;
// }
// }
+.filter-warning {
+ margin-top: 8px;
+ padding: 10px 14px;
+ background: #fff7e6;
+ border: 1px solid #ffe58f;
+ border-radius: 6px;
+ color: #d46b08;
+ font-size: 18px;
+ line-height: 1.6;
+ display: flex;
+ align-items: flex-start;
+ gap: 6px;
+}
+
+.filter-warning .el-icon-warning-outline {
+ font-size: 16px;
+ color: #faad14;
+ flex-shrink: 0;
+ margin-top: 2px;
+}
</style>
diff --git a/src/views/followvisit/operation/index.vue b/src/views/followvisit/operation/index.vue
index 8e3b599..5742599 100644
--- a/src/views/followvisit/operation/index.vue
+++ b/src/views/followvisit/operation/index.vue
@@ -172,16 +172,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item label="鎺掑簭鏂瑰紡" prop="status">
<el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
@@ -224,7 +223,7 @@
</div>
</div>
</el-col>
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
@@ -232,7 +231,7 @@
@click="handleAdd"
>鏂板</el-button
>
- </el-col>
+ </el-col> -->
<el-col :span="1.5">
<div class="documentf">
@@ -384,7 +383,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -396,22 +395,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -440,6 +429,54 @@
/>
</template>
</el-table-column>
+ <el-table-column
+ 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"
@@ -465,7 +502,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -476,7 +513,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -906,17 +943,22 @@
</el-form-item>
</el-col>
</el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="杩囨护鍘熷洜">
- <el-input
- v-model="form.notrequiredreason"
- type="textarea"
- placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ <!-- 鎻愰啋鏂囧瓧 -->
+ <div class="filter-warning">
+ <i class="el-icon-warning-outline"></i>
+ 璇ュ姛鑳介�傜敤浜庢浜°�佸垪鍏ュ尰闄㈤粦鍚嶅崟銆佹槑纭嫆缁濋殢璁跨瓑鎮h�呯殑杩囨护鎺掗櫎锛岃繃婊ゅ悗璇ユ偅鑰呮墍鏈夎繘琛屼腑浠诲姟鍏ㄩ儴鍋滄涓旀棤娉曞尮閰嶆柊鐨勯殢璁夸换鍔★紝璇疯皑鎱庢搷浣滐紒
+ </div>
+ </el-form-item>
+ </el-col>
+</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
@@ -1171,36 +1213,62 @@
},
],
loading: false,
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
cardlist: [
{
- name: "鎵嬫湳鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
- value: 0,
- },
- {
- name: "鍙戦�佸け璐�",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
zcrules: {
date1: [
@@ -1266,7 +1334,7 @@
pageNum: 1,
pageSize: 10,
sendstateView:
- localStorage.getItem("orgname") == "鐪佺珛鍚屽痉缈犺嫅闄㈠尯" ? null : 2,
+ localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" ? 1 : 2,
sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鎵嬫湳瀹屾垚鏃堕棿(姝e簭) 1 鎵嬫湳瀹屾垚鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
serviceType: 19,
searchscope: 3,
@@ -1489,16 +1557,14 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) +
- Number(response.rows[0].ysf) +
- Number(response.rows[0].fssb);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
this.jgvalue = response.rows[0].jg;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1602,7 +1668,7 @@
this.userList = response.rows[0].serviceSubtaskList;
this.total = response.total;
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -1708,6 +1774,37 @@
}
this.getList(refresh);
},
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
// 鎮h�呰寖鍥村鐞�
handleChange(value) {
let type = value[0];
@@ -1733,7 +1830,8 @@
this.topqueryParams = {
pageNum: 1,
pageSize: 10,
- sendstateView: 1,
+ sendstateView:
+ localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" ? 1 : 2,
sort: 2, //0 鎵嬫湳瀹屾垚鏃堕棿(姝e簭) 1 鎵嬫湳瀹屾垚鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
serviceType: 19,
searchscope: 3,
@@ -2318,4 +2416,24 @@
// font-size: 24px;
// }
// }
+.filter-warning {
+ margin-top: 8px;
+ padding: 10px 14px;
+ background: #fff7e6;
+ border: 1px solid #ffe58f;
+ border-radius: 6px;
+ color: #d46b08;
+ font-size: 18px;
+ line-height: 1.6;
+ display: flex;
+ align-items: flex-start;
+ gap: 6px;
+}
+
+.filter-warning .el-icon-warning-outline {
+ font-size: 16px;
+ color: #faad14;
+ flex-shrink: 0;
+ margin-top: 2px;
+}
</style>
diff --git a/src/views/followvisit/outpatient/index.vue b/src/views/followvisit/outpatient/index.vue
index 5638b93..561ecfd 100644
--- a/src/views/followvisit/outpatient/index.vue
+++ b/src/views/followvisit/outpatient/index.vue
@@ -1,67 +1,11 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
- <el-row :gutter="10">
- <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
- <el-card
- shadow="hover"
- :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
- >
- <div style="padding: 8px" @click="$router.push(item.router)">
- <span>{{ item.name }}</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ item.value ? item.value : 0 }}
- </div>
- </div>
- </el-card>
- </el-col>
- <!-- <el-col :span="2.5">
- <div class="ysfleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>琛ㄥ崟宸插彂閫�</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ yfsvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col> -->
- <el-col :span="2.5">
- <div class="errleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>寮傚父</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ ycvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
+ <statistics-cards
+ :cardlist="cardlist"
+ :ycvalue="ycvalue"
+ :jgvalue="jgvalue"
+ :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -108,16 +52,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item>
@@ -235,7 +178,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -247,22 +190,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -338,7 +271,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -433,6 +366,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -660,11 +641,12 @@
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import StatisticsCards from "@/components/StatisticsCards";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect,StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -734,41 +716,62 @@
},
],
loading: false,
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
cardlist: [
{
- name: "闂ㄨ瘖鏈嶅姟鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
value: 0,
},
-
- // {
- // name: "寮傚父",
- // value: 0,
- // },
- // {
- // name: "鍙戦�佸け璐�",
- // value: 0,
- // },
{
name: "寰呴殢璁�",
value: 0,
},
{
- name: "宸查殢璁�",
+ name: "宸插畬鎴�",
value: 0,
},
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
],
// 琛ㄥ崟鍙傛暟
@@ -887,7 +890,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
// this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -991,9 +994,50 @@
handleChange(value) {
let type = value[0];
let code = value.slice(-1)[0];
+ this.topqueryParams.leavehospitaldistrictcodes = [];
+ this.topqueryParams.leaveldeptcodes = [];
+ 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;
+ }
+ },
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
-
-
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
},
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index e1f3830..1dfa1a7 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -144,6 +144,18 @@
show-overflow-tooltip
>
</el-table-column>
+ <el-table-column
+ v-if="orgname == '鍗楀崕澶у闄勫睘绗竴鍖婚櫌'"
+ label="鍏ラ櫌鏃ユ湡"
+ width="200"
+ align="center"
+ key="starttime"
+ prop="starttime"
+ >
+ <template slot-scope="scope">
+ <span>{{ formatTime(scope.row.starttime) }}</span>
+ </template></el-table-column
+ >
<el-table-column
label="鍑洪櫌鏃ユ湡"
width="200"
@@ -155,6 +167,7 @@
<span>{{ formatTime(scope.row.endtime) }}</span>
</template></el-table-column
>
+
<el-table-column
label="璐d换鎶ゅ+"
width="120"
@@ -264,15 +277,34 @@
<!-- 闅忚鍐呭 -->
<div class="call-action">
<div class="call-container">
- <template-selector
+ <div
+ style="display: flex"
v-if="orgname == '鍗楀崕澶у闄勫睘绗竴鍖婚櫌' && !Voicetype"
- v-model="form.templateid"
- :templateName="form.templatename"
- :service-type="form.serviceType"
- :is-editable="form.sendState !== 2"
- @select="handleTemplateSelect"
- @clear="handleTemplateClear"
- />
+ >
+ <template-selector
+ v-model="form.templateid"
+ :templateName="form.templatename"
+ :service-type="form.serviceType"
+ :is-editable="form.sendState !== 2"
+ @select="handleTemplateSelect"
+ @clear="handleTemplateClear"
+ />
+ <div
+ v-if="defaultKey"
+ style="
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 100%;
+ padding: 33px 0 0 50px;
+ "
+ >
+ <el-button type="success" round @click="handleConfirmReplace">
+ 榛樿濉厖
+ </el-button>
+ </div>
+ </div>
+
<div class="headline">
<div>闅忚鍐呭</div>
</div>
@@ -1187,6 +1219,7 @@
updateTemplate,
query360PatInfonh,
sendMsg,
+ getconfigKey,
} from "@/api/AiCentre/index";
import {
messagelistpatient,
@@ -1290,6 +1323,7 @@
return {
visitAgain: 1,
userid: "",
+ defaultKey: false, //鏄惁鍙粯璁ゅ~鎶�
currentPhoneNumber: "",
callType: "", // 鐢ㄤ簬鍖哄垎鏄摢涓數璇�
isSipRegistering: true, // SIP娉ㄥ唽鐘舵��
@@ -1472,56 +1506,6 @@
// 绂佺敤浠婂ぉ鍙婁箣鍓嶇殑鏃ユ湡
return time.getTime() < Date.now() - 24 * 60 * 60 * 1000;
},
- // shortcuts: [
- // {
- // text: "涓冨ぉ鍚�",
- // onClick(picker) {
- // const date = new Date();
- // date.setTime(date.getTime() + 3600 * 1000 * 24 * 7);
- // picker.$emit("pick", date);
- // },
- // },
- // {
- // text: "15澶╁悗",
- // onClick(picker) {
- // const date = new Date();
- // date.setTime(date.getTime() + 3600 * 1000 * 24 * 15);
- // picker.$emit("pick", date);
- // },
- // },
- // {
- // text: "涓�涓湀鍚�",
- // onClick(picker) {
- // const date = new Date();
- // date.setTime(date.getTime() + 3600 * 1000 * 24 * 30);
- // picker.$emit("pick", date);
- // },
- // },
- // {
- // text: "涓変釜鏈堝悗",
- // onClick(picker) {
- // const date = new Date();
- // date.setTime(date.getTime() + 3600 * 1000 * 24 * 90);
- // picker.$emit("pick", date);
- // },
- // },
- // {
- // text: "鍏釜鏈堝悗",
- // onClick(picker) {
- // const date = new Date();
- // date.setTime(date.getTime() + 3600 * 1000 * 24 * 180);
- // picker.$emit("pick", date);
- // },
- // },
- // {
- // text: "涓�骞村悗",
- // onClick(picker) {
- // const date = new Date();
- // date.setTime(date.getTime() + 3600 * 1000 * 24 * 365);
- // picker.$emit("pick", date);
- // },
- // },
- // ],
},
options: [
{
@@ -1644,6 +1628,7 @@
];
}
this.getTaskservelist();
+ this.getconfigKey();
},
mounted() {
// 鐩戝惉瀛愮粍浠剁殑sipStatus灞炴�у彉鍖�
@@ -1683,7 +1668,30 @@
return "scriptTopic-dev"; // 姝e父 - 榛樿鏍峰紡
}
},
+ getconfigKey() {
+ getconfigKey("default.value.icon").then((res) => {
+ if (res.msg) {
+ if (
+ this.getAssignArr(res.msg).includes(this.$store.state.user.name) ||
+ this.$store.state.user.name == "admin"
+ ) {
+ this.defaultKey = true;
+ } else {
+ this.defaultKey = false;
+ }
+ }
+ });
+ },
+ getAssignArr(rule) {
+ let arr = [];
+ let assiginArr = rule.split(",");
+ for (let i = 0; i < assiginArr.length; i++) {
+ arr[i] = assiginArr[i];
+ }
+ arr.sort(this.compare);
+ return arr;
+ },
// 鑾峰彇閫夐」鏍峰紡绫�
getOptionClass(items) {
if (items.isabnormal == 1) {
@@ -2102,6 +2110,39 @@
handleTemplateClear() {
console.log("娓呴櫎浜嗘ā鏉块�夋嫨");
},
+ handleConfirmReplace() {
+ // 閬嶅巻鎵�鏈夐鐩紙tableDatatop锛�
+ this.tableDatatop.forEach((item) => {
+ // 鍙鐞嗘湭濉姤鐨勯鐩紙scriptResult 涓虹┖鎴栫┖鏁扮粍锛�
+ if (
+ !item.scriptResult ||
+ (Array.isArray(item.scriptResult) && item.scriptResult.length === 0)
+ ) {
+ // 鏌ユ壘閫夐」涓� defaultValue 涓� 2 鐨勯�夐」
+ const defaultOption = item.svyTaskTemplateTargetoptions?.find(
+ (opt) => opt.defaultValue == 2
+ );
+ console.log(item);
+
+ if (defaultOption) {
+ // 鏍规嵁棰樼洰绫诲瀷璧嬪��
+ if (item.scriptType === "1") {
+ // 鍗曢�夐锛氱洿鎺ヨ祴鍊间负 optioncontent 瀛楃涓�
+ item.scriptResult = defaultOption.optioncontent;
+ } else if (item.scriptType === "2") {
+ // 澶氶�夐锛氳祴鍊间负鍖呭惈 optioncontent 鐨勬暟缁�
+ item.scriptResult = [defaultOption.optioncontent];
+ } else if (item.scriptType === "4") {
+ // 濉┖棰橈細涓�鑸病鏈夐�夐」锛屼絾濡傛灉鏈夊垯璧嬪��
+ item.scriptResult = defaultOption.optioncontent;
+ }
+
+ // 瑙﹀彂瑙嗗浘鏇存柊锛堝洜涓� Vue 鍙兘鏃犳硶妫�娴嬪埌娣卞眰宓屽瀵硅薄鐨勫彉鍖栵級
+ this.$forceUpdate();
+ }
+ }
+ });
+ },
// 浣跨敤绀轰緥
isValidPhone(phone) {
return this.validatePhoneNumber(phone).isValid;
diff --git a/src/views/followvisit/record/index.vue b/src/views/followvisit/record/index.vue
index 7e7d92e..be90560 100644
--- a/src/views/followvisit/record/index.vue
+++ b/src/views/followvisit/record/index.vue
@@ -1,67 +1,11 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
- <el-row :gutter="10">
- <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
- <el-card
- shadow="hover"
- :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
- >
- <div style="padding: 8px" @click="$router.push(item.router)">
- <span>{{ item.name }}</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ item.value ? item.value : 0 }}
- </div>
- </div>
- </el-card>
- </el-col>
- <el-col :span="2.5">
- <div class="ysfleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>琛ㄥ崟宸插彂閫�</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ yfsvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- <el-col :span="2.5">
- <div class="errleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>寮傚父</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ ycvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
+ <statistics-cards
+ :cardlist="cardlist"
+ :ycvalue="ycvalue"
+ :jgvalue="jgvalue"
+ :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -165,7 +109,7 @@
</el-form>
<el-divider></el-divider>
<el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
@@ -173,7 +117,7 @@
@click="handleAdd"
>鏂板</el-button
>
- </el-col>
+ </el-col> -->
<el-col :span="1.5">
<div class="documentf">
<div class="document">
@@ -288,7 +232,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -300,22 +244,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -364,7 +298,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -375,7 +309,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -478,6 +412,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -773,11 +755,12 @@
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import StatisticsCards from "@/components/StatisticsCards";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect,StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -894,39 +877,26 @@
loading: false,
cardlist: [
{
- name: "鍑洪櫌鏈嶅姟鎬婚噺",
- value: 0,
- },
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
- {
- name: "闇�闅忚",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "寮傚父",
- // value: 0,
- // },
{
- name: "鍙戦�佸け璐�",
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
+ {
+ name: "闇�闅忚",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
// 琛ㄥ崟鍙傛暟
@@ -1098,13 +1068,13 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1208,7 +1178,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
diff --git a/src/views/followvisit/technology/index.vue b/src/views/followvisit/technology/index.vue
index 0887b30..2040192 100644
--- a/src/views/followvisit/technology/index.vue
+++ b/src/views/followvisit/technology/index.vue
@@ -1,67 +1,11 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
- <el-row :gutter="10">
- <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
- <el-card
- shadow="hover"
- :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
- >
- <div style="padding: 8px" @click="$router.push(item.router)">
- <span>{{ item.name }}</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ item.value ? item.value : 0 }}
- </div>
- </div>
- </el-card>
- </el-col>
- <el-col :span="2.5">
- <div class="ysfleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>琛ㄥ崟宸插彂閫�</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ yfsvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- <el-col :span="2.5">
- <div class="errleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>寮傚父</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ ycvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
+ <statistics-cards
+ :cardlist="cardlist"
+ :ycvalue="ycvalue"
+ :jgvalue="jgvalue"
+ :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -108,16 +52,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item>
@@ -245,7 +188,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -257,22 +200,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -321,7 +254,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -332,7 +265,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -427,6 +360,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -717,11 +698,12 @@
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import StatisticsCards from "@/components/StatisticsCards";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect,StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -793,41 +775,62 @@
},
],
loading: false,
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
cardlist: [
{
- name: "鍑洪櫌鏈嶅姟鎬婚噺",
- value: 0,
- },
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
- {
- name: "闇�闅忚",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "寮傚父",
- // value: 0,
- // },
{
- name: "鍙戦�佸け璐�",
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
+ {
+ name: "闇�闅忚",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
postData: {
XiaoXiTou: {
@@ -994,13 +997,13 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1056,7 +1059,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -1194,6 +1197,37 @@
this.getList(refresh);
},
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
// 鎮h�呰寖鍥村鐞�
handleChange(value) {
let type = value[0];
diff --git a/src/views/followvisit/zbAgain/index.vue b/src/views/followvisit/zbAgain/index.vue
index 6a0d0c9..5e85030 100644
--- a/src/views/followvisit/zbAgain/index.vue
+++ b/src/views/followvisit/zbAgain/index.vue
@@ -1,67 +1,11 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
- <el-row :gutter="10">
- <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
- <el-card
- shadow="hover"
- :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
- >
- <div style="padding: 8px" @click="$router.push(item.router)">
- <span>{{ item.name }}</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ item.value ? item.value : 0 }}
- </div>
- </div>
- </el-card>
- </el-col>
- <el-col :span="2.5">
- <div class="ysfleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>琛ㄥ崟宸插彂閫�</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ yfsvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- <el-col :span="2.5">
- <div class="errleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>寮傚父</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ ycvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
+ <statistics-cards
+ :cardlist="cardlist"
+ :ycvalue="ycvalue"
+ :jgvalue="jgvalue"
+ :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -125,16 +69,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item label="鎺掑簭鏂瑰紡" prop="status">
<el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
@@ -301,7 +244,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -313,22 +256,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -371,7 +304,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -382,7 +315,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -492,6 +425,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -646,17 +627,22 @@
</el-col>
</el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="杩囨护鍘熷洜">
- <el-input
- v-model="form.notrequiredreason"
- type="textarea"
- placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ <!-- 鎻愰啋鏂囧瓧 -->
+ <div class="filter-warning">
+ <i class="el-icon-warning-outline"></i>
+ 璇ュ姛鑳介�傜敤浜庢浜°�佸垪鍏ュ尰闄㈤粦鍚嶅崟銆佹槑纭嫆缁濋殢璁跨瓑鎮h�呯殑杩囨护鎺掗櫎锛岃繃婊ゅ悗璇ユ偅鑰呮墍鏈夎繘琛屼腑浠诲姟鍏ㄩ儴鍋滄涓旀棤娉曞尮閰嶆柊鐨勯殢璁夸换鍔★紝璇疯皑鎱庢搷浣滐紒
+ </div>
+ </el-form-item>
+ </el-col>
+</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
@@ -832,11 +818,12 @@
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import StatisticsCards from "@/components/StatisticsCards";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect,StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -910,36 +897,62 @@
},
],
loading: false,
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
cardlist: [
{
- name: "鍑洪櫌鏈嶅姟鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
- value: 0,
- },
- {
- name: "鍙戦�佸け璐�",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
zcrules: {
date1: [
@@ -988,7 +1001,8 @@
topqueryParams: {
pageNum: 1,
pageSize: 10,
- sendstateView: 1,
+ sendstateView:
+ localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" ? 1 : 2,
sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
serviceType: 13,
searchscope: 3,
@@ -1162,13 +1176,13 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1242,7 +1256,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -1349,6 +1363,37 @@
console.log("2");
this.getList(refresh);
},
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
// 鎮h�呰寖鍥村鐞�
handleChange(value) {
let type = value[0];
@@ -1377,7 +1422,8 @@
this.topqueryParams = {
pageNum: 1,
pageSize: 10,
- sendstateView: 1,
+ sendstateView:
+ localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" ? 1 : 2,
sort: 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
serviceType: 13,
searchscope: 3,
@@ -1846,7 +1892,26 @@
font-size: 24px;
}
}
+.filter-warning {
+ margin-top: 8px;
+ padding: 10px 14px;
+ background: #fff7e6;
+ border: 1px solid #ffe58f;
+ border-radius: 6px;
+ color: #d46b08;
+ font-size: 18px;
+ line-height: 1.6;
+ display: flex;
+ align-items: flex-start;
+ gap: 6px;
+}
+.filter-warning .el-icon-warning-outline {
+ font-size: 16px;
+ color: #faad14;
+ flex-shrink: 0;
+ margin-top: 2px;
+}
// 閫夐」瀛椾綋鏀惧ぇ
// ::v-deep.el-checkbox-group {
// span {
diff --git a/src/views/followvisit/zysatisfaction/index.vue b/src/views/followvisit/zysatisfaction/index.vue
index 4848da4..9cdf105 100644
--- a/src/views/followvisit/zysatisfaction/index.vue
+++ b/src/views/followvisit/zysatisfaction/index.vue
@@ -1,67 +1,11 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
- <el-row :gutter="10">
- <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
- <el-card
- shadow="hover"
- :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
- >
- <div style="padding: 8px" @click="$router.push(item.router)">
- <span>{{ item.name }}</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ item.value ? item.value : 0 }}
- </div>
- </div>
- </el-card>
- </el-col>
- <el-col :span="2.5">
- <div class="ysfleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>琛ㄥ崟宸插彂閫�</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ yfsvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- <el-col :span="2.5">
- <div class="errleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>寮傚父</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ ycvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
+ <statistics-cards
+ :cardlist="cardlist"
+ :ycvalue="ycvalue"
+ :jgvalue="jgvalue"
+ :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -187,7 +131,7 @@
</div>
</div>
</el-col>
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
@@ -195,7 +139,7 @@
@click="handleAdd"
>鏂板</el-button
>
- </el-col>
+ </el-col> -->
<el-col :span="1.5">
<div class="documentf">
@@ -312,7 +256,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -324,22 +268,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -382,7 +316,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -491,6 +425,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -830,17 +812,22 @@
</el-form-item>
</el-col>
</el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="杩囨护鍘熷洜">
- <el-input
- v-model="form.notrequiredreason"
- type="textarea"
- placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ <!-- 鎻愰啋鏂囧瓧 -->
+ <div class="filter-warning">
+ <i class="el-icon-warning-outline"></i>
+ 璇ュ姛鑳介�傜敤浜庢浜°�佸垪鍏ュ尰闄㈤粦鍚嶅崟銆佹槑纭嫆缁濋殢璁跨瓑鎮h�呯殑杩囨护鎺掗櫎锛岃繃婊ゅ悗璇ユ偅鑰呮墍鏈夎繘琛屼腑浠诲姟鍏ㄩ儴鍋滄涓旀棤娉曞尮閰嶆柊鐨勯殢璁夸换鍔★紝璇疯皑鎱庢搷浣滐紒
+ </div>
+ </el-form-item>
+ </el-col>
+</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
@@ -946,11 +933,12 @@
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import StatisticsCards from "@/components/StatisticsCards";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect,StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -1024,34 +1012,26 @@
loading: false,
cardlist: [
{
- name: "鏈嶅姟鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
- value: 0,
- },
- {
- name: "鍙戦�佸け璐�",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
zcrules: {
date1: [
@@ -1101,7 +1081,7 @@
pageNum: 1,
pageSize: 10,
sendstateView:
- localStorage.getItem("orgname") == "鐪佺珛鍚屽痉缈犺嫅闄㈠尯" ? null : 2,
+ localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" ? 1 : 2,
sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
serviceType: 6,
searchscope: 3,
@@ -1271,13 +1251,13 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -1347,7 +1327,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
this.cardlist[1].value = response.rows[0].wzx;
this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -1475,7 +1455,8 @@
this.topqueryParams = {
pageNum: 1,
pageSize: 10,
- sendstateView: 1,
+ sendstateView:
+ localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌" ? 1 : 2,
sort: 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
serviceType: 6,
searchscope: 3,
@@ -1984,6 +1965,26 @@
border-color: #d8b4fe;
opacity: 1; /* 淇濇寔绂佺敤鐘舵�侀�忔槑搴� */
}
+.filter-warning {
+ margin-top: 8px;
+ padding: 10px 14px;
+ background: #fff7e6;
+ border: 1px solid #ffe58f;
+ border-radius: 6px;
+ color: #d46b08;
+ font-size: 18px;
+ line-height: 1.6;
+ display: flex;
+ align-items: flex-start;
+ gap: 6px;
+}
+
+.filter-warning .el-icon-warning-outline {
+ font-size: 16px;
+ color: #faad14;
+ flex-shrink: 0;
+ margin-top: 2px;
+}
// 閫夐」瀛椾綋鏀惧ぇ
// ::v-deep.el-checkbox-group {
// span {
diff --git a/src/views/outsideChainwtnew.vue b/src/views/outsideChainwtnew.vue
index 3882e7f..ffcee9d 100644
--- a/src/views/outsideChainwtnew.vue
+++ b/src/views/outsideChainwtnew.vue
@@ -23,6 +23,7 @@
: "浜茬埍鐨勬偅鑰�-瀹跺睘锛屾垜浠槸鍖婚櫌鐨勫尰鎶や汉鍛橈紝涓轰簡鏇村ソ鍦颁簡瑙f偍鐨勫悍澶嶆儏鍐碉紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瀹屾垚杩欎唤闅忚闂嵎銆�"
}}
</div>
+ <div v-if="orgname" class="questionnaire-signature">鈥斺�斺�攞{ orgname }}</div>
</div>
<el-divider class="custom-divider"></el-divider>
@@ -93,7 +94,7 @@
@click.native.prevent="
handleRadioToggle(
item,
- getGlobalIndex(dimension, group, index),
+ getGlobalIndex(item.dimension, group, index),
item.svyTaskTemplateTargetoptions,
option.optioncontent
)
@@ -159,6 +160,18 @@
:closable="false"
class="warning-alert"
></el-alert>
+ </div>
+ <div
+ v-if="item.showAppendInput || item.answerps"
+ class="append-input-container"
+ >
+ <el-input
+ type="textarea"
+ :rows="1"
+ placeholder="璇疯緭鍏ュ叿浣撲俊鎭�"
+ v-model="item.answerps"
+ clearable
+ ></el-input>
</div>
</div>
</div>
@@ -281,6 +294,18 @@
class="warning-alert"
></el-alert>
</div>
+ <div
+ v-if="item.showAppendInput || item.answerps"
+ class="append-input-container"
+ >
+ <el-input
+ type="textarea"
+ :rows="1"
+ placeholder="璇疯緭鍏ュ叿浣撲俊鎭�"
+ v-model="item.answerps"
+ clearable
+ ></el-input>
+ </div>
</div>
</div>
@@ -335,6 +360,7 @@
excep: 0,
isabnormal: 0,
taskname: "",
+ orgname: "",
questionList: [],
param6: null,
jsy: null,
@@ -480,6 +506,8 @@
res.data.param3,
res.data.param5
);
+ this.orgname = res.data.orgname;
+
this.param6 = res.data.param6;
}
});
@@ -746,6 +774,7 @@
this.questionList[questionIndex].showAppendInput =
selectedOptionObj.appendflag == 1;
console.log(this.questionList);
+ console.log(selectedOptionObj.appendflag);
// if (!this.questionList[questionIndex].showAppendInput) {
// this.questionList[questionIndex].answerps = ""; // 娓呴櫎闄勫姞淇℃伅
@@ -818,6 +847,7 @@
hiddenByEnd: index == questionIndex + 1 ? false : item.hiddenByEnd,
}));
}
+ this.$forceUpdate();
// 鍦ㄥ鐞嗗畬棰樼洰鏄剧ず/闅愯棌鍚庯紝寮哄埗鏇存柊瑙嗗浘浠ョ‘淇濆簭鍙锋纭�
this.$nextTick(() => {
@@ -864,13 +894,24 @@
}
.questionnaire-description {
- font-size: 18px;
+ font-size: 16px;
color: #5a6c84;
- line-height: 1.6;
- max-width: 700px;
- margin: 0 auto;
+ line-height: 1.8;
+ max-width: 720px;
+ margin: 0;
+ padding: 0 16px;
+ text-align: justify; /* 涓ょ瀵归綈锛屾洿缇庤 */
+ text-indent: 2em; /* 棣栬缂╄繘 */
}
-
+.questionnaire-signature {
+ font-size: 15px;
+ color: #8a9bb5; /* 姣旀鏂囬鑹茬◢娴咃紝浣撶幇闄勫睘鎰� */
+ text-align: right; /* 鍙冲榻� */
+ max-width: 720px;
+ margin: 8px 0 0 auto; /* 涓婅竟璺�8px锛屽彸杈归潬榻� */
+ padding: 0 16px;
+ letter-spacing: 1px; /* 瀛楅棿璺濈◢瀹斤紝鏇存湁钀芥鎰� */
+}
.custom-divider {
margin: 25px 0;
background-color: #eaeef2;
@@ -930,8 +971,10 @@
}
.question-stem {
- display: flex;
- align-items: flex-start;
+ display: grid;
+ grid-template-columns: auto 1fr auto; /* 棰樺彿鑷�傚簲锛屾枃鏈崰婊″墿浣欑┖闂达紝棰樺瀷鏍囩鑷�傚簲 */
+ gap: 3px;
+ align-items: center;
margin-bottom: 20px;
font-size: 18px;
}
@@ -939,22 +982,23 @@
.question-number {
font-weight: 600;
color: #175997;
- margin-right: 8px;
- min-width: 24px;
+ min-width: 16px;
}
.question-text {
- flex: 1;
line-height: 1.5;
color: #2c3e50;
font-weight: 500;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
.question-type-tag {
color: #3ba2f7;
font-size: 14px;
- margin-left: 10px;
font-weight: 500;
+ text-align: right;
}
.question-options {
@@ -1021,7 +1065,13 @@
.question-warning {
margin-top: 15px;
}
-
+.append-input-container {
+ margin-top: 15px;
+ padding: 10px;
+ background-color: #f5f7fa;
+ border-radius: 4px;
+ border: 1px solid #dcdfe6;
+}
.warning-alert {
:deep(.el-alert__title) {
font-size: 15px;
diff --git a/src/views/patient/patient/ExternalPatient.vue b/src/views/patient/patient/ExternalPatient.vue
index 69e7a2d..cd02788 100644
--- a/src/views/patient/patient/ExternalPatient.vue
+++ b/src/views/patient/patient/ExternalPatient.vue
@@ -736,21 +736,24 @@
cardlist: [
{
- name: "鎮h�呮�绘暟",
- value: 123,
+ name: "鎮h�呮湇鍔℃�婚噺",
+ value: 0,
+ },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
},
{
- name: "鍦ㄩ櫌鎮h��",
- value: 23,
- router: "/patient/inpatient",
+ name: "闇�闅忚",
+ value: 0,
},
{
- name: "鍑洪櫌鎮h��",
- value: 41,
- router: "/patient/hospital",
+ name: "寰呴殢璁�",
+ value: 0,
},
{
- name: "绂讳笘鎮h��",
+ name: "宸插畬鎴�",
value: 0,
},
],
diff --git a/src/views/patient/patient/index.vue b/src/views/patient/patient/index.vue
index 6de65c4..c6b5bc0 100644
--- a/src/views/patient/patient/index.vue
+++ b/src/views/patient/patient/index.vue
@@ -668,6 +668,11 @@
type="textarea"
placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
></el-input>
+ <!-- 鎻愰啋鏂囧瓧 -->
+ <div class="filter-warning">
+ <i class="el-icon-warning-outline"></i>
+ 璇ュ姛鑳介�傜敤浜庢浜°�佸垪鍏ュ尰闄㈤粦鍚嶅崟銆佹槑纭嫆缁濋殢璁跨瓑鎮h�呯殑杩囨护鎺掗櫎锛岃繃婊ゅ悗璇ユ偅鑰呮墍鏈夎繘琛屼腑浠诲姟鍏ㄩ儴鍋滄涓旀棤娉曞尮閰嶆柊鐨勯殢璁夸换鍔★紝璇疯皑鎱庢搷浣滐紒
+ </div>
</el-form-item>
</el-col>
</el-row>
@@ -1640,6 +1645,26 @@
height: 50px;
}
}
+.filter-warning {
+ margin-top: 8px;
+ padding: 10px 14px;
+ background: #fff7e6;
+ border: 1px solid #ffe58f;
+ border-radius: 6px;
+ color: #d46b08;
+ font-size: 18px;
+ line-height: 1.6;
+ display: flex;
+ align-items: flex-start;
+ gap: 6px;
+}
+
+.filter-warning .el-icon-warning-outline {
+ font-size: 16px;
+ color: #faad14;
+ flex-shrink: 0;
+ margin-top: 2px;
+}
.button-textsc {
color: #3664d9;
}
diff --git a/src/views/patient/patient/outpatient.vue b/src/views/patient/patient/outpatient.vue
index 4e97f6c..2759dff 100644
--- a/src/views/patient/patient/outpatient.vue
+++ b/src/views/patient/patient/outpatient.vue
@@ -211,7 +211,7 @@
align="center"
key="admitdate"
prop="admitdate"
- width="160"
+ width="140"
>
<template slot-scope="scope">
<span>{{ formatTime(scope.row.admitdate) }}</span>
@@ -225,6 +225,7 @@
/> -->
<el-table-column
label="鐥呮鍙�"
+ width="100"
align="center"
key="outhospno"
prop="outhospno"
@@ -297,7 +298,6 @@
align="center"
key="diagname"
prop="diagname"
- width="190"
/>
<!-- <el-table-column
label="涓昏堪"
@@ -311,14 +311,12 @@
align="center"
key="deptname"
prop="deptname"
- width="120"
/>
<el-table-column
label="鎺ヨ瘖鍖荤敓"
align="center"
key="drname"
prop="drname"
- width="120"
/>
<el-table-column
label="鏄惁瀛樺湪浠诲姟"
@@ -341,7 +339,6 @@
label="鎿嶄綔"
fixed="right"
align="center"
- width="160"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
diff --git a/src/views/patient/patient/physical.vue b/src/views/patient/patient/physical.vue
index 0b62b0f..5896462 100644
--- a/src/views/patient/patient/physical.vue
+++ b/src/views/patient/patient/physical.vue
@@ -256,7 +256,7 @@
align="center"
key="admitdate"
prop="admitdate"
- width="160"
+ width="140"
>
<template slot-scope="scope">
<span>{{ formatTime(scope.row.admitdate) }}</span>
@@ -276,7 +276,6 @@
label="鎿嶄綔"
fixed="right"
align="center"
- width="160"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
diff --git a/src/views/patient/patient/profile/index.vue b/src/views/patient/patient/profile/index.vue
index 5426870..454c3fc 100644
--- a/src/views/patient/patient/profile/index.vue
+++ b/src/views/patient/patient/profile/index.vue
@@ -375,7 +375,6 @@
align="center"
key="admitdate"
prop="admitdate"
- width="160"
>
<template slot-scope="scope">
<span>{{ formatTime(scope.row.admitdate) }}</span>
@@ -384,6 +383,7 @@
<el-table-column
label="鐥呮鍙�"
+ width="100"
align="center"
key="outhospno"
prop="outhospno"
diff --git a/src/views/patient/physical/index.vue b/src/views/patient/physical/index.vue
index fcbfb71..448a03b 100644
--- a/src/views/patient/physical/index.vue
+++ b/src/views/patient/physical/index.vue
@@ -1,67 +1,11 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
- <el-row :gutter="10">
- <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
- <el-card
- shadow="hover"
- :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
- >
- <div style="padding: 8px" @click="$router.push(item.router)">
- <span>{{ item.name }}</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ item.value ? item.value : 0 }}
- </div>
- </div>
- </el-card>
- </el-col>
- <!-- <el-col :span="2.5">
- <div class="ysfleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>琛ㄥ崟宸插彂閫�</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ yfsvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col> -->
- <el-col :span="2.5">
- <div class="errleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>寮傚父</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ ycvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
+ <statistics-cards
+ :cardlist="cardlist"
+ :ycvalue="ycvalue"
+ :jgvalue="jgvalue"
+ :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -108,16 +52,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item>
@@ -235,7 +178,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -247,22 +190,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -338,7 +271,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -433,6 +366,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -660,11 +641,12 @@
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import StatisticsCards from "@/components/StatisticsCards";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect,StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -734,41 +716,62 @@
},
],
loading: false,
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
cardlist: [
{
- name: "蹇冪數鏈嶅姟鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
value: 0,
},
-
- // {
- // name: "寮傚父",
- // value: 0,
- // },
- // {
- // name: "鍙戦�佸け璐�",
- // value: 0,
- // },
{
name: "寰呴殢璁�",
value: 0,
},
{
- name: "宸查殢璁�",
+ name: "宸插畬鎴�",
value: 0,
},
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
],
// 琛ㄥ崟鍙傛暟
@@ -887,7 +890,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
// this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -987,13 +990,54 @@
this.getList(refresh);
},
- // 鎮h�呰寖鍥村鐞�
+ // 鎮h�呰寖鍥村鐞�
handleChange(value) {
let type = value[0];
let code = value.slice(-1)[0];
+ this.topqueryParams.leavehospitaldistrictcodes = [];
+ this.topqueryParams.leaveldeptcodes = [];
+ 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;
+ }
+ },
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
-
-
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
},
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
diff --git a/src/views/patient/propaganda/Missionotice.vue b/src/views/patient/propaganda/Missionotice.vue
index 0bdd8a5..8cb7178 100644
--- a/src/views/patient/propaganda/Missionotice.vue
+++ b/src/views/patient/propaganda/Missionotice.vue
@@ -200,7 +200,7 @@
align="center"
key="admitdate"
prop="admitdate"
- width="160"
+ width="140"
>
</el-table-column>
<el-table-column
diff --git a/src/views/patient/propaganda/QuestionnaireTask.vue b/src/views/patient/propaganda/QuestionnaireTask.vue
index 2f19c12..6c4256a 100644
--- a/src/views/patient/propaganda/QuestionnaireTask.vue
+++ b/src/views/patient/propaganda/QuestionnaireTask.vue
@@ -1503,13 +1503,16 @@
if (this.submitLoading) {
return;
}
- // 绗簩姝ワ細寮�鍚姞杞界姸鎬侊紝绂佺敤鎸夐挳
+
+ // 寮�鍚姞杞界姸鎬�
this.submitLoading = true;
console.log(this.submitLoading);
try {
- if (this.time4 && this.form.sendType == 3)
+ // 鏃堕棿澶勭悊
+ if (this.time4 && this.form.sendType == 3) {
this.form.showTimeMorn = this.time4;
+ }
this.form.sendTimeslot = [
{
begantime: this.time4,
@@ -1517,8 +1520,8 @@
xh: 1,
},
];
- console.log(1);
+ // 鏍规嵁搴旂敤绫诲瀷娓呯悊瀛楁
if (this.form.appltype == 1) {
this.leavehospitaldistrictcodes = [];
this.form.oplevelcode = null;
@@ -1536,75 +1539,90 @@
this.illnesscodes = [];
this.leavehospitaldistrictcodes = [];
}
+
+ // 鏍¢獙锛氭湇鍔$被鍨�
if (this.checkList) {
this.form.preachform = this.checkList.join(",");
this.form.preachformList = this.selectedOrder;
} else {
this.$modal.msgError("璇烽�夋嫨鏈嶅姟绫诲瀷");
this.submitLoading = false;
-
return;
}
- console.log(2);
- if (
+ // 鏍¢獙锛氱柧鐥呭叧鑱旂瀹ゆ垨鐥呭尯
+ if (this.form.appltype == 3) {
+ const hasDept = this.diseaseDept?.deptCode;
+ const hasWard = this.diseaseWard?.districtCode;
+
+ if (!hasDept && !hasWard) {
+ this.$modal.msgError("褰撳墠鐤剧梾闇�鍏宠仈绉戝鎴栫梾鍖�");
+ this.submitLoading = false;
+ return;
+ }
+ }
+
+ // 鏍¢獙锛氫换鍔″叧鑱旀潯浠�
+ const hasCondition =
this.deptcodesWards[0] ||
this.leavehospitaldistrictcodes[0] ||
this.diagglist[0] ||
this.form.oplevelcode ||
this.form.longTask == 2 ||
- this.serviceType == 3
- ) {
- } else {
+ this.serviceType == 3;
+
+ if (!hasCondition) {
this.$modal.msgError("璇烽�夋嫨浠诲姟鍏宠仈鏉′欢");
this.submitLoading = false;
return;
}
- //鏆傚仠浠诲姟鎮h�呴檺鍒�
- // if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
- // this.$modal.msgError("璇烽�夋嫨鐥呬汉");
- // return;
- // }
- console.log(3);
+ // 鏍¢獙锛氭ā鏉�
if (!this.form.templatename && !this.templateor) {
this.$modal.msgError("鏈�夋嫨妯℃澘");
this.submitLoading = false;
-
return;
}
- if (
+ // 鏍¢獙锛氭椂闂翠俊鎭�
+ const isValidTime =
(this.form.sendType == 1 && this.time1) ||
- this.form.sendType == 2
- ) {
- } else if (
+ this.form.sendType == 2 ||
(this.form.sendType == 3 && this.time4) ||
- this.form.longTask
- ) {
- } else {
+ this.form.longTask;
+
+ if (!isValidTime) {
this.submitLoading = false;
- return this.$modal.msgError("鏃堕棿淇℃伅缂哄け");
+ this.$modal.msgError("鏃堕棿淇℃伅缂哄け");
+ return;
}
+
+ // 澶勭悊鏂囨湰鍙傛暟
const filteredArray = this.variableList.filter(
(item) =>
item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃"
);
this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
+
+ // 璁剧疆鎿嶄綔绫诲瀷
if (this.form.taskid) {
this.form.isoperation = 2;
} else {
this.form.isoperation = 1;
}
+
+ // 璁剧疆绫诲瀷
if (!this.form.type) {
this.form.type = this.$route.query.type;
}
- console.log(4);
+
+ // 缁勮鎻愪氦鏁版嵁
this.form.serviceType = this.serviceType;
this.form.deptcode = this.deptcodesWards.join(",");
this.form.leavehospitaldistrictcode =
this.leavehospitaldistrictcodes.join(",");
- // this.form.opcode = this.operationcodes.join(",");
+
+ // 鐤剧梾鍏宠仈鐨勭瀹�/鐥呭尯
if (this.form.appltype == 3) {
if (this.diseaseDept) {
this.form.deptcode = this.diseaseDept.deptCode;
@@ -1617,30 +1635,46 @@
}
}
+ // 璇婃柇淇℃伅
this.form.icd10code = this.diagglist
.map((item) => item.icdcode)
.join(",");
this.form.icd10name = this.diagglist
.map((item) => item.icdname)
.join(",");
- Editsingletask(this.form).then((res) => {
- if (res.code == 200) {
- if (this.form.taskid) {
- this.$modal.msgSuccess("淇敼鎴愬姛");
+
+ // 鎻愪氦鎺ュ彛
+ Editsingletask(this.form)
+ .then((res) => {
+ if (res.code == 200) {
+ if (this.form.taskid) {
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ } else {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ }
+ this.$router.push({
+ path: "/followvisit/tasklist",
+ query: { tasktopic: this.form.serviceType },
+ });
} else {
- this.$modal.msgSuccess("鏂板鎴愬姛");
+ // 鉁� 鎺ュ彛杩斿洖閿欒鐮佹椂鐨勫鐞�
+ this.$modal.msgError(res.msg || "鎿嶄綔澶辫触");
}
- this.$router.push({
- path: "/followvisit/tasklist",
- query: { tasktopic: this.form.serviceType },
- });
+ })
+ .catch((error) => {
+ // 鉁� 鎹曡幏鎺ュ彛璇锋眰寮傚父
+ console.error("鎻愪氦澶辫触:", error);
+ this.$modal.msgError(error.message || "缃戠粶寮傚父锛岃绋嶅悗閲嶈瘯");
+ })
+ .finally(() => {
+ // 鉁� 鏃犺鎴愬姛鎴栧け璐ワ紝鏈�缁堥兘鍏抽棴鍔犺浇鐘舵��
this.submitLoading = false;
- }
- });
+ });
} catch (error) {
+ // 鉁� 鎹曡幏鍚屾浠g爜寮傚父
+ console.error("琛ㄥ崟鎻愪氦寮傚父:", error);
+ this.$modal.msgError(error.message || "琛ㄥ崟鎻愪氦寮傚父");
this.submitLoading = false;
- } finally {
- // 绗洓姝ワ細鏃犺鎴愬姛鎴栧け璐ワ紝鏈�缁堥兘鍏抽棴鍔犺浇鐘舵��
}
},
handleDiseaseDeptChange(dept) {
@@ -2102,6 +2136,14 @@
this.form.patTaskRelevances = this.form.patTaskRelevances
? this.form.patTaskRelevances
: [];
+ this.diseaseDept = {
+ deptCode: this.form.deptcode,
+ deptName: this.form.deptname,
+ };
+ this.diseaseWard = {
+ districtCode: this.form.leavehospitaldistrictcode,
+ districtName: this.form.leavehospitaldistrictname,
+ };
this.overallCase = this.form.patTaskRelevances.concat();
this.checkList = this.form.preachform.split(",");
this.selectedOrder = this.form.preachformList;
diff --git a/src/views/patient/propaganda/index.vue b/src/views/patient/propaganda/index.vue
index 8bef086..e0f1086 100644
--- a/src/views/patient/propaganda/index.vue
+++ b/src/views/patient/propaganda/index.vue
@@ -98,7 +98,7 @@
</el-form>
<el-divider></el-divider>
<el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
@@ -106,7 +106,7 @@
@click="handleAdd"
>鏂板</el-button
>
- </el-col>
+ </el-col> -->
<el-col :span="1.5">
<div class="documentf">
<div class="document">
@@ -246,7 +246,7 @@
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
diff --git a/src/views/patient/propaganda/particty.vue b/src/views/patient/propaganda/particty.vue
index ed9f86a..2d36270 100644
--- a/src/views/patient/propaganda/particty.vue
+++ b/src/views/patient/propaganda/particty.vue
@@ -1530,15 +1530,24 @@
},
// 淇濆瓨
submitForm(type) {
+ // 闃叉閲嶅鎻愪氦
if (this.submitLoading) {
return;
}
- // 绗簩姝ワ細寮�鍚姞杞界姸鎬侊紝绂佺敤鎸夐挳
+
+ // 寮�鍚姞杞界姸鎬�
this.submitLoading = true;
+
try {
- if (this.templateor && type) this.templateor = false;
- if (this.time4 && this.form.sendType == 3)
+ // 妯℃澘鐩稿叧澶勭悊
+ if (this.templateor && type) {
+ this.templateor = false;
+ }
+
+ // 鏃堕棿澶勭悊
+ if (this.time4 && this.form.sendType == 3) {
this.form.showTimeMorn = this.time4;
+ }
this.form.sendTimeslot = [
{
begantime: this.time4,
@@ -1546,6 +1555,8 @@
xh: 1,
},
];
+
+ // 鏍规嵁搴旂敤绫诲瀷娓呯悊瀛楁
if (this.form.appltype == 1) {
this.leavehospitaldistrictcodes = [];
this.operationcodes = [];
@@ -1563,68 +1574,88 @@
this.illnesscodes = [];
this.leavehospitaldistrictcodes = [];
}
+
+ // ===== 琛ㄥ崟鏍¢獙 =====
+
+ // 1. 鏈嶅姟绫诲瀷鏍¢獙
if (this.checkList) {
this.form.preachform = this.checkList.join(",") || [];
this.form.preachformList = this.selectedOrder || [];
} else {
this.$modal.msgError("璇烽�夋嫨鏈嶅姟绫诲瀷");
this.submitLoading = false;
-
return;
}
- if (
+ // 2. 鐤剧梾鍏宠仈绉戝鎴栫梾鍖烘牎楠�
+ if (this.form.appltype == 3) {
+ const hasDept = this.diseaseDept?.deptCode;
+ const hasWard = this.diseaseWard?.districtCode;
+
+ if (!hasDept && !hasWard) {
+ this.$modal.msgError("褰撳墠鐤剧梾闇�鍏宠仈绉戝鎴栫梾鍖�");
+ this.submitLoading = false;
+ return;
+ }
+ }
+
+ // 3. 浠诲姟鍏宠仈鏉′欢鏍¢獙
+ const hasCondition =
this.deptcodesWards[0] ||
this.leavehospitaldistrictcodes[0] ||
this.diagglist[0] ||
this.operationcodes[0] ||
this.form.longTask == 2 ||
- this.serviceType == 3
- ) {
- } else {
+ this.serviceType == 3;
+
+ if (!hasCondition) {
this.$modal.msgError("璇烽�夋嫨浠诲姟鍏宠仈鏉′欢");
this.submitLoading = false;
-
return;
}
- // if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
- // this.$modal.msgError("璇烽�夋嫨鐥呬汉");
- // return;
- // }
+ // 4. 妯℃澘鏍¢獙
if (!this.form.templatename && !this.templateor) {
this.$modal.msgError("鏈�夋嫨妯℃澘");
this.submitLoading = false;
-
return;
}
- if (
+ // 5. 鏃堕棿淇℃伅鏍¢獙
+ const isValidTime =
(this.form.sendType == 1 && this.time1) ||
- this.form.sendType == 2
- ) {
- } else if (
+ this.form.sendType == 2 ||
(this.form.sendType == 3 && this.time4) ||
- this.form.longTask
- ) {
- } else {
- this.submitLoading = false;
+ this.form.longTask;
- return this.$modal.msgError("鏃堕棿淇℃伅缂哄け");
+ if (!isValidTime) {
+ this.submitLoading = false;
+ this.$modal.msgError("鏃堕棿淇℃伅缂哄け");
+ return;
}
+
+ // ===== 鏁版嵁澶勭悊 =====
+
+ // 杩囨护鏂囨湰鍙傛暟
const filteredArray = this.variableList.filter(
(item) =>
item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃"
);
this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
+
+ // 璁剧疆鎿嶄綔绫诲瀷
if (this.form.taskid) {
this.form.isoperation = 2;
} else {
this.form.isoperation = 1;
}
+
+ // 璁剧疆绫诲瀷
if (!this.form.type) {
this.form.type = this.$route.query.type;
}
+
+ // 鐤剧梾鍏宠仈鐨勭瀹�/鐥呭尯
if (this.form.appltype == 3) {
if (this.diseaseDept) {
this.form.deptcode = this.diseaseDept.deptCode;
@@ -1636,6 +1667,8 @@
this.form.leavehospitaldistrictname = this.diseaseWard.districtName;
}
}
+
+ // 缁勮鎻愪氦鏁版嵁
this.form.serviceType = this.serviceType;
this.form.deptcode = this.deptcodesWards.join(",");
this.form.leavehospitaldistrictcode =
@@ -1647,24 +1680,39 @@
this.form.icd10name = this.diagglist
.map((item) => item.icdname)
.join(",");
- Editsingletask(this.form).then((res) => {
- if (res.code == 200) {
- if (this.form.taskid) {
- this.$modal.msgSuccess("淇敼鎴愬姛");
+
+ // ===== 鎻愪氦鎺ュ彛 =====
+ Editsingletask(this.form)
+ .then((res) => {
+ if (res.code == 200) {
+ // 鉁� 鎴愬姛
+ if (this.form.taskid) {
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ } else {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ }
+ this.submitLoading = false;
+ this.$router.push({
+ path: "/followvisit/tasklist",
+ query: { tasktopic: this.form.serviceType },
+ });
} else {
- this.$modal.msgSuccess("鏂板鎴愬姛");
+ // 鉁� 鎺ュ彛杩斿洖閿欒鐮�
+ this.$modal.msgError(res.msg || "鎿嶄綔澶辫触");
+ this.submitLoading = false;
}
+ })
+ .catch((error) => {
+ // 鉁� 鎹曡幏鎺ュ彛璇锋眰寮傚父
+ console.error("鎻愪氦澶辫触:", error);
+ this.$modal.msgError(error.message || "缃戠粶寮傚父锛岃绋嶅悗閲嶈瘯");
this.submitLoading = false;
- this.$router.push({
- path: "/followvisit/tasklist",
- query: { tasktopic: this.form.serviceType },
- });
- }
- });
+ });
} catch (error) {
+ // 鉁� 鎹曡幏鍚屾浠g爜寮傚父
+ console.error("琛ㄥ崟鎻愪氦寮傚父:", error);
+ this.$modal.msgError(error.message || "琛ㄥ崟鎻愪氦寮傚父");
this.submitLoading = false;
- } finally {
- // 绗洓姝ワ細鏃犺鎴愬姛鎴栧け璐ワ紝鏈�缁堥兘鍏抽棴鍔犺浇鐘舵��
}
},
handleDiseaseDeptChange(dept) {
@@ -2041,6 +2089,16 @@
let filteredArray = "";
if (res.code == 200) {
this.form = res.data;
+ this.diseaseDept = {
+ deptCode: this.form.deptcode,
+ deptName: this.form.deptname,
+ };
+ this.diseaseWard = {
+ districtCode: this.form.leavehospitaldistrictcode,
+ districtName: this.form.leavehospitaldistrictname,
+ };
+ console.log(this.diseaseWard, this.diseaseDept);
+
this.form.serviceType = this.serviceType;
this.form.patTaskRelevances = this.form.patTaskRelevances
? this.form.patTaskRelevances
diff --git a/src/views/patient/questionnaire/index.vue b/src/views/patient/questionnaire/index.vue
index 8217a3b..7a084eb 100644
--- a/src/views/patient/questionnaire/index.vue
+++ b/src/views/patient/questionnaire/index.vue
@@ -108,16 +108,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item>
@@ -220,7 +219,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -232,22 +231,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -296,7 +285,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -307,7 +296,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -402,6 +391,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -718,41 +755,62 @@
},
],
loading: false,
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
cardlist: [
{
- name: "鍑洪櫌鏈嶅姟鎬婚噺",
- value: 0,
- },
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
- {
- name: "闇�闅忚",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "寮傚父",
- // value: 0,
- // },
{
- name: "鍙戦�佸け璐�",
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
+ {
+ name: "闇�闅忚",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
// 琛ㄥ崟鍙傛暟
@@ -887,13 +945,13 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -993,6 +1051,37 @@
this.getList(refresh);
},
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
// 鎮h�呰寖鍥村鐞�
handleChange(value) {
let type = value[0];
diff --git a/src/views/patient/shadow/index.vue b/src/views/patient/shadow/index.vue
index 5b30122..2233f76 100644
--- a/src/views/patient/shadow/index.vue
+++ b/src/views/patient/shadow/index.vue
@@ -108,16 +108,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item>
@@ -220,7 +219,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -232,22 +231,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -296,7 +285,7 @@
</el-table-column>
<el-table-column
label="鍑洪櫌鏃ユ湡"
- width="200"
+ width="146"
align="center"
key="endtime"
prop="endtime"
@@ -307,7 +296,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -402,6 +391,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -718,41 +755,62 @@
},
],
loading: false,
- cardlist: [
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
{
- name: "鍑洪櫌鏈嶅姟鎬婚噺",
- value: 0,
+ value: null,
+ label: "鍏ㄩ儴",
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
{
- name: "闇�闅忚",
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
+ cardlist: [
+ {
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "寮傚父",
- // value: 0,
- // },
{
- name: "鍙戦�佸け璐�",
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
+ {
+ name: "闇�闅忚",
value: 0,
},
{
name: "寰呴殢璁�",
value: 0,
},
- // {
- // name: "宸插彂閫�",
- // value: 0,
- // },
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
+ {
+ name: "宸插畬鎴�",
+ value: 0,
+ },
],
// 琛ㄥ崟鍙傛暟
@@ -887,13 +945,13 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].ysf;
+ this.cardlist[1].value = response.rows[0].wxsf || 0;
this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].fssb;
- this.cardlist[3].value = response.rows[0].dsf;
- // this.cardlist[4].value = response.rows[0].yfs2;
+ this.cardlist[2].value = response.rows[0].xsf || 0;
+ this.cardlist[3].value = response.rows[0].dsf || 0;
+ this.cardlist[4].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
this.loading = false;
@@ -993,6 +1051,37 @@
this.getList(refresh);
},
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
// 鎮h�呰寖鍥村鐞�
handleChange(value) {
let type = value[0];
diff --git a/src/views/patient/subsequent/index.vue b/src/views/patient/subsequent/index.vue
index 77a468f..18d3ce2 100644
--- a/src/views/patient/subsequent/index.vue
+++ b/src/views/patient/subsequent/index.vue
@@ -1,67 +1,11 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
- <el-row :gutter="10">
- <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
- <el-card
- shadow="hover"
- :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
- >
- <div style="padding: 8px" @click="$router.push(item.router)">
- <span>{{ item.name }}</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ item.value ? item.value : 0 }}
- </div>
- </div>
- </el-card>
- </el-col>
- <!-- <el-col :span="2.5">
- <div class="ysfleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>琛ㄥ崟宸插彂閫�</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ yfsvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col> -->
- <el-col :span="2.5">
- <div class="errleftvlue">
- <el-card shadow="hover">
- <div style="padding: 8px">
- <span>寮傚父</span>
- <div
- style="
- text-align: center;
- font-size: 18px;
- margin-top: 10px;
- font-weight: 600;
- "
- >
- {{ ycvalue }}
- </div>
- </div>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
+ <statistics-cards
+ :cardlist="cardlist"
+ :ycvalue="ycvalue"
+ :jgvalue="jgvalue"
+ :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -108,16 +52,15 @@
></el-cascader>
</el-form-item>
- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
- <el-select v-model="topqueryParams.sendstateView" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闅忚鐘舵��" prop="status">
+ <el-cascader
+ v-model="serviceStatusValue"
+ placeholder="璇烽�夋嫨"
+ :options="serviceStatusOptions"
+ :props="cascaderProps"
+ @change="handleServiceStatusChange"
+ clearable
+ ></el-cascader>
</el-form-item>
<el-form-item>
@@ -235,7 +178,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -247,22 +190,12 @@
>
</div>
<div v-if="scope.row.sendstateView == 2">
- <el-tag type="primary" :disable-transitions="false"
- >闅忚涓�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 3">
- <el-tag type="warning" :disable-transitions="false"
- >鏈畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstateView == 4">
<el-tag type="success" :disable-transitions="false"
>宸插畬鎴�</el-tag
>
</div>
- <div v-if="scope.row.sendstateView == 5">
- <el-tag type="danger" :disable-transitions="false"
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
>鏃犻渶闅忚</el-tag
>
</div>
@@ -338,7 +271,7 @@
>
<el-table-column
label="搴旈殢璁挎棩鏈�"
- width="200"
+ width="146"
align="center"
key="visitTime"
prop="visitTime"
@@ -433,6 +366,54 @@
prop="templatename"
width="200"
/>
+ <el-table-column
+ 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"
@@ -660,11 +641,12 @@
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import StatisticsCards from "@/components/StatisticsCards";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect,StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -734,41 +716,62 @@
},
],
loading: false,
+ serviceStatusValue: 10,
+ cascaderProps: {
+ expandTrigger: "hover", // 鎮仠灞曞紑
+ checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+ emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+ },
+ // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+ serviceStatusOptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 10, // 涓�绾э細寰呴殢璁�
+ label: "寰呴殢璁�",
+ children: [
+ { value: 1, label: "琚鍙�" },
+ { value: 2, label: "寰呭彂閫�" },
+ { value: 3, label: "宸插彂閫�" },
+ { value: 5, label: "鍙戦�佸け璐�" },
+ { value: 7, label: "瓒呮椂" },
+ ],
+ },
+ {
+ value: 20, // 涓�绾э細宸插畬鎴�
+ label: "宸插畬鎴�",
+ children: [{ value: 6, label: "宸插畬鎴�" }],
+ },
+ {
+ value: 30, // 涓�绾э細鏃犻渶闅忚
+ label: "鏃犻渶闅忚",
+ children: [{ value: 4, label: "涓嶆墽琛�" }],
+ },
+ ],
cardlist: [
{
- name: "浣撴鏈嶅姟鎬婚噺",
+ name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
- // {
- // name: "鎮h�呰繃婊�",
- // value: 0,
- // },
+
+ {
+ name: "鏃犻渶闅忚",
+ value: 0,
+ },
{
name: "闇�闅忚",
value: 0,
},
-
- // {
- // name: "寮傚父",
- // value: 0,
- // },
- // {
- // name: "鍙戦�佸け璐�",
- // value: 0,
- // },
{
name: "寰呴殢璁�",
value: 0,
},
{
- name: "宸查殢璁�",
+ name: "宸插畬鎴�",
value: 0,
},
-
- // {
- // name: "琛ㄥ崟宸插彂閫�",
- // value: 0,
- // },
],
// 琛ㄥ崟鍙傛暟
@@ -887,7 +890,7 @@
this.total = response.total;
if (refresh) {
this.cardlist[0].value =
- Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
+ Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
// this.cardlist[1].value = response.rows[0].wzx;
// this.cardlist[2].value = response.rows[0].ysf;
this.ycvalue = response.rows[0].yc;
@@ -987,13 +990,55 @@
this.getList(refresh);
},
+ // 闅忚鐘舵�佸彉鏇村鐞�
+ handleServiceStatusChange(value) {
+ // 娓呯┖閫夋嫨
+ if (value === null || value === undefined || value === "") {
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = null;
+ return;
+ }
+ console.log(value, "value");
+
+ // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+ if (value >= 10) {
+ // 閫変腑浜嗕竴绾�
+ switch (value) {
+ case 10:
+ this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+ break;
+ case 20:
+ this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+ break;
+ case 30:
+ this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+ break;
+ }
+ this.topqueryParams.sendstate = null;
+ } else {
+ // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+ this.topqueryParams.sendstateView = null;
+ this.topqueryParams.sendstate = value;
+ }
+ },
// 鎮h�呰寖鍥村鐞�
handleChange(value) {
let type = value[0];
let code = value.slice(-1)[0];
+ this.topqueryParams.leavehospitaldistrictcodes = [];
+ this.topqueryParams.leaveldeptcodes = [];
-
-
+ 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;
+ }
},
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
diff --git a/src/views/sfstatistics/percentage/components/DetailDialog.vue b/src/views/sfstatistics/percentage/components/DetailDialog.vue
index 2209b13..559520a 100644
--- a/src/views/sfstatistics/percentage/components/DetailDialog.vue
+++ b/src/views/sfstatistics/percentage/components/DetailDialog.vue
@@ -18,7 +18,9 @@
@input="handleSearch"
@clear="handleSearch"
/>
- <span style="margin-left: 10px; color: rgb(35, 81, 233); font-size: 16px">
+ <span
+ style="margin-left: 10px; color: rgb(35, 81, 233); font-size: 16px"
+ >
鍏� {{ displayList.length }} 鏉¤褰�
</span>
</div>
@@ -26,12 +28,43 @@
<div class="examine-jic">
<div class="jic-value">
<el-row :gutter="20">
- <div class="data-list" ref="dataList" @scroll="handleScroll" v-loading="loading">
- <el-table :data="currentDisplayList" height="660" style="width: 100%">
- <el-table-column prop="sendname" align="center" label="濮撳悕" width="100" />
- <el-table-column prop="taskName" align="center" width="200" show-overflow-tooltip label="浠诲姟鍚嶇О" />
+ <div
+ class="data-list"
+ ref="dataList"
+ @scroll="handleScroll"
+ v-loading="loading"
+ >
+ <el-table
+ :data="currentDisplayList"
+ height="660"
+ style="width: 100%"
+ >
+ <el-table-column
+ prop="sendname"
+ align="center"
+ label="濮撳悕"
+ width="100"
+ />
+ <el-table-column
+ prop="telcode"
+ align="center"
+ label="鑱旂郴鐢佃瘽"
+ width="100"
+ />
+ <el-table-column
+ prop="taskName"
+ align="center"
+ width="200"
+ show-overflow-tooltip
+ label="浠诲姟鍚嶇О"
+ />
- <el-table-column prop="sendstate" align="center" width="200" label="浠诲姟鐘舵��">
+ <el-table-column
+ prop="sendstate"
+ align="center"
+ width="200"
+ label="浠诲姟鐘舵��"
+ >
<template slot-scope="scope">
<el-tag
:type="getStateTagType(scope.row.sendstate)"
@@ -51,8 +84,14 @@
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
- <span v-for="(item, index) in scope.row.preachform" :key="index">
- {{ item }}{{ index < scope.row.preachform.length - 1 ? '銆�' : '' }}
+ <span
+ v-for="(item, index) in scope.row.preachform"
+ :key="index"
+ >
+ {{ item
+ }}{{
+ index < scope.row.preachform.length - 1 ? "銆�" : ""
+ }}
</span>
</template>
</el-table-column>
@@ -71,35 +110,98 @@
width="200"
show-overflow-tooltip
/>
- <el-table-column label="鍑洪櫌鏃ユ湡" width="200" align="center" key="endtime" prop="endtime">
+ <el-table-column
+ label="鍑洪櫌鏃ユ湡"
+ width="200"
+ align="center"
+ key="endtime"
+ prop="endtime"
+ >
<template slot-scope="scope">
<span>{{ formatTime(scope.row.endtime) }}</span>
</template>
</el-table-column>
- <el-table-column label="璐d换鎶ゅ+" width="120" align="center" key="nurseName" prop="nurseName" />
- <el-table-column label="涓绘不鍖荤敓" width="120" align="center" key="drname" prop="drname" />
+ <el-table-column
+ label="璐d换鎶ゅ+"
+ width="120"
+ align="center"
+ key="nurseName"
+ prop="nurseName"
+ />
+ <el-table-column
+ label="涓绘不鍖荤敓"
+ width="120"
+ align="center"
+ key="drname"
+ prop="drname"
+ />
- <el-table-column label="缁撴灉鐘舵��" align="center" key="excep" prop="excep" width="120">
+ <el-table-column
+ label="缁撴灉鐘舵��"
+ align="center"
+ key="excep"
+ prop="excep"
+ width="120"
+ >
<template slot-scope="scope">
- <dict-tag :options="dict.type.sys_yujing" :value="scope.row.excep" />
+ <dict-tag
+ :options="dict.type.sys_yujing"
+ :value="scope.row.excep"
+ />
</template>
</el-table-column>
- <el-table-column label="澶勭悊鎰忚" align="center" key="suggest" prop="suggest" width="120">
+ <el-table-column
+ label="澶勭悊鎰忚"
+ align="center"
+ key="suggest"
+ prop="suggest"
+ width="120"
+ >
<template slot-scope="scope">
- <dict-tag :options="dict.type.sys_suggest" :value="scope.row.suggest" />
+ <dict-tag
+ :options="dict.type.sys_suggest"
+ :value="scope.row.suggest"
+ />
</template>
</el-table-column>
- <el-table-column prop="templatename" align="center" label="鏈嶅姟妯℃澘" width="200" show-overflow-tooltip />
- <el-table-column prop="remark" align="center" label="鏈嶅姟璁板綍" width="200" show-overflow-tooltip />
+ <el-table-column
+ prop="templatename"
+ align="center"
+ label="鏈嶅姟妯℃澘"
+ width="200"
+ show-overflow-tooltip
+ />
+ <el-table-column
+ prop="remark"
+ align="center"
+ label="鏈嶅姟璁板綍"
+ width="200"
+ show-overflow-tooltip
+ />
- <el-table-column prop="bankcardno" align="center" label="鍛煎彨鐘舵��" width="210" />
+ <el-table-column
+ prop="bankcardno"
+ align="center"
+ label="鍛煎彨鐘舵��"
+ width="210"
+ />
- <el-table-column label="鎿嶄綔" fixed="right" align="center" width="200" class-name="small-padding fixed-width">
+ <el-table-column
+ label="鎿嶄綔"
+ fixed="right"
+ align="center"
+ width="200"
+ class-name="small-padding fixed-width"
+ >
<template slot-scope="scope">
- <el-button size="medium" type="text" @click="handleDetailsGo(scope.row)">
+ <el-button
+ size="medium"
+ type="text"
+ @click="handleDetailsGo(scope.row)"
+ >
<span class="button-zx">
<i class="el-icon-s-order"></i>鏌ョ湅
</span>
@@ -117,175 +219,181 @@
<script>
export default {
- name: 'DetailDialog',
- dicts: ['sys_yujing', 'sys_suggest'],
+ name: "DetailDialog",
+ dicts: ["sys_yujing", "sys_suggest"],
props: {
visible: {
type: Boolean,
- default: false
+ default: false,
},
title: {
type: String,
- default: ''
+ default: "",
},
data: {
type: Array,
- default: () => []
+ default: () => [],
},
searchName: {
type: String,
- default: ''
+ default: "",
},
loading: {
type: Boolean,
- default: false
- }
+ default: false,
+ },
},
data() {
return {
- localSearchName: '',
+ localSearchName: "",
displayList: [],
currentDisplayList: [],
loadIndex: 0,
pageSize: 100,
- isLoading: false
- }
+ isLoading: false,
+ };
},
watch: {
data: {
immediate: true,
handler(newData) {
- this.initializeData(newData)
- }
+ this.initializeData(newData);
+ },
},
searchName(newVal) {
- this.localSearchName = newVal
- this.handleSearch()
- }
+ this.localSearchName = newVal;
+ this.handleSearch();
+ },
},
mounted() {
if (this.data && this.data.length > 0) {
- this.initializeData(this.data)
+ this.initializeData(this.data);
}
},
methods: {
initializeData(data) {
- this.displayList = [...data]
- this.formatPreachformData()
- this.loadIndex = 0
- this.currentDisplayList = []
+ this.displayList = [...data];
+ this.formatPreachformData();
+ this.loadIndex = 0;
+ this.currentDisplayList = [];
this.$nextTick(() => {
- this.loadMoreData()
- })
+ this.loadMoreData();
+ });
},
formatPreachformData() {
this.displayList.forEach((item) => {
if (item.preachform) {
if (item.endtime) {
- item.preachformson = item.preachform
- const idArray = item.preachform.split(',')
+ item.preachformson = item.preachform;
+ const idArray = item.preachform.split(",");
- item.preachform = idArray.map((value) => {
- const checkboxlist = this.$store.getters.checkboxlist
- const foundItem = checkboxlist.find((item) => item.value == value)
- return foundItem ? foundItem.label : null
- }).filter(label => label !== null)
+ item.preachform = idArray
+ .map((value) => {
+ const checkboxlist = this.$store.getters.checkboxlist;
+ const foundItem = checkboxlist.find(
+ (item) => item.value == value
+ );
+ return foundItem ? foundItem.label : null;
+ })
+ .filter((label) => label !== null);
}
}
- })
+ });
},
handleSearch() {
if (!this.localSearchName.trim()) {
- this.displayList = [...this.data]
- this.formatPreachformData()
+ this.displayList = [...this.data];
+ this.formatPreachformData();
} else {
- const keyword = this.localSearchName.toLowerCase()
+ const keyword = this.localSearchName.toLowerCase();
this.displayList = this.data.filter((item) => {
- return item.sendname && item.sendname.toLowerCase().includes(keyword)
- })
- this.formatPreachformData()
+ return item.sendname && item.sendname.toLowerCase().includes(keyword);
+ });
+ this.formatPreachformData();
}
- this.loadIndex = 0
- this.currentDisplayList = []
+ this.loadIndex = 0;
+ this.currentDisplayList = [];
this.$nextTick(() => {
- this.loadMoreData()
- })
+ this.loadMoreData();
+ });
- this.$emit('search', this.localSearchName)
+ this.$emit("search", this.localSearchName);
},
loadMoreData() {
- if (this.isLoading || this.loadIndex >= this.displayList.length) return
+ if (this.isLoading || this.loadIndex >= this.displayList.length) return;
- this.isLoading = true
+ this.isLoading = true;
setTimeout(() => {
const nextChunk = this.displayList.slice(
this.loadIndex,
this.loadIndex + this.pageSize
- )
- this.currentDisplayList = this.currentDisplayList.concat(nextChunk)
- this.loadIndex += this.pageSize
- this.isLoading = false
- }, 200)
+ );
+ this.currentDisplayList = this.currentDisplayList.concat(nextChunk);
+ this.loadIndex += this.pageSize;
+ this.isLoading = false;
+ }, 200);
},
handleScroll(event) {
- const scrollContainer = event.target
+ const scrollContainer = event.target;
const isAtBottom =
scrollContainer.scrollTop + scrollContainer.clientHeight >=
- scrollContainer.scrollHeight - 10
+ scrollContainer.scrollHeight - 10;
if (
isAtBottom &&
!this.isLoading &&
this.loadIndex < this.displayList.length
) {
- this.loadMoreData()
+ this.loadMoreData();
}
},
getStateTagType(state) {
const stateMap = {
- 1: 'primary', // 琛ㄥ崟宸查鍙�
- 2: 'primary', // 寰呴殢璁�
- 3: 'success', // 琛ㄥ崟宸插彂閫�
- 4: 'info', // 涓嶆墽琛�
- 5: 'danger', // 鍙戦�佸け璐�
- 6: 'success' // 宸插畬鎴�
- }
- return stateMap[state] || 'info'
+ 1: "primary", // 琛ㄥ崟宸查鍙�
+ 2: "primary", // 寰呴殢璁�
+ 3: "success", // 琛ㄥ崟宸插彂閫�
+ 4: "info", // 涓嶆墽琛�
+ 5: "danger", // 鍙戦�佸け璐�
+ 6: "success", // 宸插畬鎴�
+ 7: "danger", // 瓒呮椂
+ };
+ return stateMap[state] || "info";
},
getStateText(state) {
const stateTextMap = {
- 1: '琛ㄥ崟宸查鍙�',
- 2: '寰呴殢璁�',
- 3: '琛ㄥ崟宸插彂閫�',
- 4: '涓嶆墽琛�',
- 5: '鍙戦�佸け璐�',
- 6: '宸插畬鎴�'
- }
- return stateTextMap[state] || '鏈煡鐘舵��'
+ 1: "琛ㄥ崟宸查鍙�",
+ 2: "寰呴殢璁�",
+ 3: "琛ㄥ崟宸插彂閫�",
+ 4: "涓嶆墽琛�",
+ 5: "鍙戦�佸け璐�",
+ 6: "宸插畬鎴�",
+ 7: "瓒呮椂",
+ };
+ return stateTextMap[state] || "鏈煡鐘舵��";
},
formatTime(time) {
- if (!time) return ''
- return this.parseTime(time)
+ if (!time) return "";
+ return this.parseTime(time);
},
handleDetailsGo(row) {
- this.$emit('details-go', row)
+ this.$emit("details-go", row);
},
handleClose() {
- this.$emit('close')
- }
- }
-}
+ this.$emit("close");
+ },
+ },
+};
</script>
<style lang="scss" scoped>
diff --git a/src/views/system/ruleconfig/index.vue b/src/views/system/ruleconfig/index.vue
new file mode 100644
index 0000000..7554947
--- /dev/null
+++ b/src/views/system/ruleconfig/index.vue
@@ -0,0 +1,656 @@
+<template>
+ <div class="app-container">
+ <!-- 澶撮儴锛氭爣棰樺拰鎿嶄綔鎸夐挳 -->
+ <div class="header-container">
+ <div class="header-left">
+ <div class="title">瑙勫垯閰嶇疆绠$悊</div>
+ <div class="tips">閰嶇疆绉戝鍜岀梾鍖虹殑鎵ц浼樺厛绾ц鍒�</div>
+ </div>
+ <div class="header-right">
+ <el-button type="primary" icon="el-icon-plus" @click="openAddDialog">
+ 鏂板瑙勫垯
+ </el-button>
+ </div>
+ </div>
+
+ <!-- 鎼滅储鍖哄煙 -->
+ <el-card class="filter-container" shadow="never">
+ <div class="filter-title">鏌ヨ鏉′欢</div>
+ <el-form :model="searchForm" :inline="true" class="filter-form">
+ <el-form-item label="绉戝鍚嶇О">
+ <el-input
+ v-model="searchForm.deptname"
+ placeholder="璇疯緭鍏ョ瀹ゅ悕绉�"
+ clearable
+ style="width: 200px"
+ @keyup.enter.native="handleSearch"
+ />
+ </el-form-item>
+ <el-form-item label="鐥呭尯鍚嶇О">
+ <el-input
+ v-model="searchForm.wardname"
+ placeholder="璇疯緭鍏ョ梾鍖哄悕绉�"
+ clearable
+ style="width: 200px"
+ @keyup.enter.native="handleSearch"
+ />
+ </el-form-item>
+ <el-form-item label="绉戝瑙勫垯">
+ <el-select
+ v-model="searchForm.deptRule"
+ placeholder="璇烽�夋嫨"
+ clearable
+ style="width: 120px"
+ >
+ <el-option label="棣栧厛鎵ц" value="1" />
+ <el-option label="娆¤鎵ц" value="2" />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鐥呭尯瑙勫垯">
+ <el-select
+ v-model="searchForm.wradRule"
+ placeholder="璇烽�夋嫨"
+ clearable
+ style="width: 120px"
+ >
+ <el-option label="棣栧厛鎵ц" value="1" />
+ <el-option label="娆¤鎵ц" value="2" />
+ </el-select>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" icon="el-icon-search" @click="handleSearch"
+ >鏌ヨ</el-button
+ >
+ <el-button icon="el-icon-refresh" @click="resetSearch"
+ >閲嶇疆</el-button
+ >
+ </el-form-item>
+ </el-form>
+ </el-card>
+
+ <!-- 瑙勫垯鍒楄〃琛ㄦ牸 -->
+ <el-card class="table-container" shadow="never">
+ <el-table
+ v-loading="loading"
+ :data="tableData"
+ style="width: 100%"
+ stripe
+ :header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
+ >
+ <el-table-column
+ prop="deptname"
+ label="绉戝"
+ min-width="120"
+ align="center"
+ />
+ <el-table-column
+ prop="wardname"
+ label="鐥呭尯"
+ min-width="120"
+ align="center"
+ />
+ <el-table-column label="绉戝浼樺厛绾�" min-width="100" align="center">
+ <template slot-scope="{ row }">
+ <el-tag
+ :type="row.deptRule === '1' ? 'success' : 'warning'"
+ size="small"
+ >
+ {{ row.deptRule === "1" ? "棣栧厛鎵ц" : "娆¤鎵ц" }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐥呭尯浼樺厛绾�" min-width="100" align="center">
+ <template slot-scope="{ row }">
+ <el-tag
+ :type="row.wradRule === '1' ? 'success' : 'warning'"
+ size="small"
+ >
+ {{ row.wradRule === "1" ? "棣栧厛鎵ц" : "娆¤鎵ц" }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐤剧梾浼樺厛绾�" min-width="100" align="center">
+ <template slot-scope="{ row }">
+ <el-tag
+ :type="row.diagRule === '1' ? 'success' : 'warning'"
+ size="small"
+ >
+ {{ row.diagRule === "1" ? "棣栧厛鎵ц" : "娆¤鎵ц" }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="createTime"
+ label="鍒涘缓鏃堕棿"
+ min-width="150"
+ align="center"
+ />
+ <el-table-column label="鎿嶄綔" width="180" fixed="right" align="center">
+ <template slot-scope="{ row }">
+ <el-button
+ type="text"
+ size="mini"
+ icon="el-icon-edit"
+ @click="openEditDialog(row)"
+ class="action-btn"
+ >
+ 缂栬緫
+ </el-button>
+ <el-button
+ type="text"
+ size="mini"
+ icon="el-icon-delete"
+ @click="handleDelete(row)"
+ style="color: #f56c6c"
+ class="action-btn"
+ >
+ 鍒犻櫎
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <!-- 鍒嗛〉 -->
+ <pagination
+ v-show="total > 0"
+ :total="total"
+ :page.sync="searchForm.pageNum"
+ :limit.sync="searchForm.pageSize"
+ @pagination="getList"
+ style="margin-top: 20px"
+ />
+ </el-card>
+
+ <!-- 娣诲姞/缂栬緫瀵硅瘽妗� -->
+ <el-dialog
+ :title="dialogTitle"
+ :visible.sync="dialogVisible"
+ width="500px"
+ :close-on-click-modal="false"
+ @close="resetDialog"
+ >
+ <el-form
+ ref="ruleFormRef"
+ :model="ruleForm"
+ :rules="rules"
+ label-width="100px"
+ class="rule-form"
+ >
+ <el-form-item label="绉戝" prop="deptcode">
+ <el-select
+ v-model="ruleForm.deptcode"
+ placeholder="璇烽�夋嫨绉戝"
+ filterable
+ clearable
+ style="width: 100%"
+ @change="handleDeptChange"
+ >
+ <el-option
+ v-for="dept in departmentOptions"
+ :key="dept.value"
+ :label="dept.label"
+ :value="dept.value"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="鐥呭尯" prop="wardcode">
+ <el-select
+ v-model="ruleForm.wardcode"
+ placeholder="璇烽�夋嫨鐥呭尯"
+ filterable
+ clearable
+ style="width: 100%"
+ @change="handleDeptChangebq"
+ >
+ <el-option
+ v-for="ward in wardOptions"
+ :key="ward.value"
+ :label="ward.label"
+ :value="ward.value"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="绉戝浼樺厛绾�" prop="deptRule">
+ <el-radio-group v-model="ruleForm.deptRule">
+ <el-radio label="1">棣栧厛鎵ц</el-radio>
+ <el-radio label="2">娆¤鎵ц</el-radio>
+ </el-radio-group>
+ </el-form-item>
+
+ <el-form-item label="鐥呭尯浼樺厛绾�" prop="wradRule">
+ <el-radio-group v-model="ruleForm.wradRule">
+ <el-radio label="1">棣栧厛鎵ц</el-radio>
+ <el-radio label="2">娆¤鎵ц</el-radio>
+ </el-radio-group>
+ </el-form-item>
+
+ <el-form-item label="鐤剧梾浼樺厛绾�" prop="diagRule">
+ <el-radio-group v-model="ruleForm.diagRule">
+ <el-radio label="1">棣栧厛鎵ц</el-radio>
+ <el-radio label="2">娆¤鎵ц</el-radio>
+ </el-radio-group>
+ </el-form-item>
+
+ <div class="form-tips">
+ <i class="el-icon-info"></i>
+ 鎻愮ず锛氱瀹ゅ拰鐥呭尯鑷冲皯闇�瑕侀�夋嫨涓�涓�
+ </div>
+ </el-form>
+
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="dialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="handleSubmit" :loading="submitting"
+ >纭� 瀹�</el-button
+ >
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import {
+ taskrulelist,
+ addtaskrule,
+ edittaskrule,
+ deltaskrule,
+} from "@/api/AiCentre/index";
+
+export default {
+ name: "RuleConfig",
+ data() {
+ // 楠岃瘉绉戝鍜岀梾鍖鸿嚦灏戦�変竴涓�
+ const validateDeptOrWard = (rule, value, callback) => {
+ if (!this.ruleForm.deptcode && !this.ruleForm.wardcode) {
+ callback(new Error("绉戝鍜岀梾鍖鸿嚦灏戦渶瑕侀�夋嫨涓�涓�"));
+ } else {
+ callback();
+ }
+ };
+
+ return {
+ // 鎼滅储琛ㄥ崟
+ searchForm: {
+ pageNum: 1,
+ pageSize: 10,
+ deptname: "",
+ wardname: "",
+ deptRule: "",
+ wradRule: "",
+ },
+
+ // 琛ㄦ牸鏁版嵁
+ tableData: [],
+ total: 0,
+ loading: false,
+
+ // 瀵硅瘽妗嗙浉鍏�
+ dialogVisible: false,
+ dialogTitle: "",
+ submitting: false,
+ isEdit: false,
+ currentId: null,
+
+ // 琛ㄥ崟鏁版嵁
+ ruleForm: {
+ deptcode: "",
+ deptname: "",
+ wardcode: "",
+ wardname: "",
+ deptRule: "1",
+ wradRule: "1",
+ diagRule: "1",
+ },
+
+ // 楠岃瘉瑙勫垯
+ rules: {
+ deptRule: [
+ { required: true, message: "璇烽�夋嫨绉戝浼樺厛绾�", trigger: "change" },
+ ],
+ wradRule: [
+ { required: true, message: "璇烽�夋嫨鐥呭尯浼樺厛绾�", trigger: "change" },
+ ],
+ diagRule: [
+ { required: true, message: "璇烽�夋嫨鐤剧梾浼樺厛绾�", trigger: "change" },
+ ],
+ deptcode: [{ validator: validateDeptOrWard, trigger: "change" }],
+ wardcode: [{ validator: validateDeptOrWard, trigger: "change" }],
+ },
+
+ // 閫夐」鏁版嵁
+ departmentOptions: [],
+ wardOptions: [],
+ };
+ },
+ computed: {
+ // 绉戝閫夐」
+ computedDepartmentOptions() {
+ if (this.$store.getters.belongDepts) {
+ return this.$store.getters.belongDepts.map((dept) => ({
+ label: dept.deptName,
+ value: dept.deptCode,
+ }));
+ }
+ return [];
+ },
+ },
+ created() {
+ this.getList();
+ this.departmentOptions = this.computedDepartmentOptions;
+ this.fetchWardOptions();
+ },
+ methods: {
+ // 鑾峰彇瑙勫垯鍒楄〃
+ getList() {
+ this.loading = true;
+ taskrulelist(this.searchForm)
+ .then((response) => {
+ if (response.code === 200) {
+ this.tableData = response.rows;
+ this.total = response.total;
+ } else {
+ this.$message.error(response.msg || "鑾峰彇鍒楄〃澶辫触");
+ }
+ })
+ .catch((error) => {
+ console.error("鑾峰彇瑙勫垯鍒楄〃澶辫触:", error);
+ this.$message.error("鑾峰彇瑙勫垯鍒楄〃澶辫触");
+ })
+ .finally(() => {
+ this.loading = false;
+ });
+ },
+
+ // 鑾峰彇鐥呭尯鏁版嵁
+ fetchWardOptions() {
+ // TODO: 璋冪敤鑾峰彇鐥呭尯鍒楄〃鐨勬帴鍙�
+ // getWardList().then(response => {
+ // this.wardOptions = response.data.map(ward => ({
+ // label: ward.wardName,
+ // value: ward.wardCode
+ // }));
+ // }).catch(error => {
+ // console.error('鑾峰彇鐥呭尯鍒楄〃澶辫触:', error);
+ // });
+
+ // 涓存椂鏁版嵁
+ this.wardOptions = [
+ { label: "蹇冭绠″唴绉戜竴鐥呭尯", value: "W001" },
+ { label: "蹇冭绠″唴绉戜簩鐥呭尯", value: "W002" },
+ { label: "鍛煎惛鍐呯鐥呭尯", value: "W003" },
+ { label: "绁炵粡鍐呯鐥呭尯", value: "W004" },
+ ];
+ },
+
+ // 绉戝鍙樺寲澶勭悊
+ handleDeptChange(value) {
+ const selectedDept = this.departmentOptions.find(
+ (dept) => dept.value === value
+ );
+ if (selectedDept) {
+ this.ruleForm.deptname = selectedDept.label;
+ } else {
+ this.ruleForm.deptname = "";
+ }
+ },
+ handleDeptChangebq(value) {
+ const selectedDept = this.wardOptions.find(
+ (dept) => dept.value === value
+ );
+ if (selectedDept) {
+ this.ruleForm.wardname = selectedDept.label;
+ } else {
+ this.ruleForm.wardname = "";
+ }
+ },
+
+ // 鎼滅储
+ handleSearch() {
+ this.searchForm.pageNum = 1;
+ this.getList();
+ },
+
+ // 閲嶇疆鎼滅储
+ resetSearch() {
+ this.searchForm = {
+ pageNum: 1,
+ pageSize: 10,
+ deptname: "",
+ wardname: "",
+ deptRule: "",
+ wradRule: "",
+ };
+ this.getList();
+ },
+
+ // 鎵撳紑鏂板瀵硅瘽妗�
+ openAddDialog() {
+ this.dialogTitle = "鏂板瑙勫垯";
+ this.isEdit = false;
+ this.currentId = null;
+ this.dialogVisible = true;
+ },
+
+ // 鎵撳紑缂栬緫瀵硅瘽妗�
+ openEditDialog(row) {
+ this.dialogTitle = "缂栬緫瑙勫垯";
+ this.isEdit = true;
+ this.currentId = row.id;
+
+ // 濉厖琛ㄥ崟鏁版嵁
+ this.ruleForm = {
+ deptcode: row.deptcode || "",
+ deptname: row.deptname || "",
+ wardcode: row.wardcode || "",
+ wardname: row.wardname || "",
+ deptRule: row.deptRule || "1",
+ wradRule: row.wradRule || "1",
+ diagRule: row.diagRule || "1",
+ };
+
+ this.dialogVisible = true;
+ },
+
+ // 閲嶇疆瀵硅瘽妗�
+ resetDialog() {
+ this.$refs.ruleFormRef && this.$refs.ruleFormRef.resetFields();
+ this.ruleForm = {
+ deptcode: "",
+ deptname: "",
+ wardcode: "",
+ wardname: "",
+ deptRule: "1",
+ wradRule: "1",
+ diagRule: "1",
+ };
+ this.currentId = null;
+ this.submitting = false;
+ },
+
+ // 鎻愪氦琛ㄥ崟
+ handleSubmit() {
+ this.$refs.ruleFormRef.validate((valid) => {
+ if (valid) {
+ this.submitting = true;
+
+ const formData = { ...this.ruleForm };
+ if (this.isEdit) {
+ formData.id = this.currentId;
+ }
+
+ const api = this.isEdit ? edittaskrule : addtaskrule;
+
+ api(formData)
+ .then((response) => {
+ if (response.code === 200) {
+ this.$message.success(this.isEdit ? "缂栬緫鎴愬姛" : "鏂板鎴愬姛");
+ this.dialogVisible = false;
+ this.getList();
+ } else {
+ this.$message.error(
+ response.msg || (this.isEdit ? "缂栬緫澶辫触" : "鏂板澶辫触")
+ );
+ }
+ })
+ .catch((error) => {
+ console.error("鎻愪氦澶辫触:", error);
+ this.$message.error("鎻愪氦澶辫触锛岃绋嶅悗閲嶈瘯");
+ })
+ .finally(() => {
+ this.submitting = false;
+ });
+ }
+ });
+ },
+
+ // 鍒犻櫎瑙勫垯
+ handleDelete(row) {
+ this.$confirm(
+ `纭畾瑕佸垹闄よ鍒�"${row.deptname || row.wardname}"鍚楋紵`,
+ "鎻愮ず",
+ {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ }
+ )
+ .then(() => {
+ return deltaskrule({ id: row.id });
+ })
+ .then((response) => {
+ if (response.code === 200) {
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.getList();
+ } else {
+ this.$message.error(response.msg || "鍒犻櫎澶辫触");
+ }
+ })
+ .catch((error) => {
+ if (error !== "cancel") {
+ console.error("鍒犻櫎澶辫触:", error);
+ this.$message.error("鍒犻櫎澶辫触");
+ }
+ });
+ },
+ },
+};
+</script>
+
+<style scoped>
+.app-container {
+ padding: 20px;
+ background-color: #f0f2f5;
+ min-height: calc(100vh - 84px);
+}
+
+.header-container {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 20px;
+ padding: 16px 20px;
+ background: white;
+ border-radius: 4px;
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+}
+
+.header-left {
+ display: flex;
+ flex-direction: column;
+}
+
+.header-left .title {
+ font-size: 20px;
+ font-weight: 500;
+ color: #303133;
+ margin-bottom: 6px;
+}
+
+.header-left .tips {
+ font-size: 13px;
+ color: #909399;
+}
+
+.filter-container {
+ margin-bottom: 20px;
+ border-radius: 4px;
+}
+
+.filter-title {
+ font-size: 15px;
+ font-weight: 500;
+ color: #303133;
+ margin-bottom: 16px;
+ padding-bottom: 12px;
+ border-bottom: 1px solid #ebeef5;
+}
+
+.filter-form {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 20px 0;
+}
+
+.filter-form .el-form-item {
+ margin-bottom: 0;
+ margin-right: 20px;
+}
+
+.table-container {
+ border-radius: 4px;
+ margin-bottom: 20px;
+}
+
+.action-btn {
+ padding: 5px 8px;
+ font-size: 12px;
+}
+
+.rule-form {
+ padding-right: 20px;
+}
+
+.form-tips {
+ background-color: #f0f9ff;
+ border: 1px solid #c6e2ff;
+ border-radius: 4px;
+ padding: 10px 15px;
+ margin-left: 100px;
+ color: #409eff;
+ font-size: 12px;
+ line-height: 1.5;
+}
+
+.form-tips i {
+ margin-right: 5px;
+}
+
+.dialog-footer {
+ text-align: right;
+ padding-top: 20px;
+ border-top: 1px solid #ebeef5;
+}
+
+/* 鍝嶅簲寮忚皟鏁� */
+@media (max-width: 768px) {
+ .header-container {
+ flex-direction: column;
+ align-items: flex-start;
+ }
+
+ .header-right {
+ margin-top: 10px;
+ }
+
+ .filter-form .el-form-item {
+ width: 100%;
+ margin-right: 0;
+ }
+
+ .filter-form .el-form-item .el-input,
+ .filter-form .el-form-item .el-select {
+ width: 100%;
+ }
+}
+</style>
diff --git "a/\351\232\217\350\256\277\351\200\232\347\224\250.zip" "b/\351\232\217\350\256\277\351\200\232\347\224\250\357\274\210\351\234\200\345\220\214\346\255\245\346\234\200\346\226\260\347\212\266\346\200\201\357\274\211.zip"
similarity index 73%
rename from "\351\232\217\350\256\277\351\200\232\347\224\250.zip"
rename to "\351\232\217\350\256\277\351\200\232\347\224\250\357\274\210\351\234\200\345\220\214\346\255\245\346\234\200\346\226\260\347\212\266\346\200\201\357\274\211.zip"
index b72c91f..a02a0dc 100644
--- "a/\351\232\217\350\256\277\351\200\232\347\224\250.zip"
+++ "b/\351\232\217\350\256\277\351\200\232\347\224\250\357\274\210\351\234\200\345\220\214\346\255\245\346\234\200\346\226\260\347\212\266\346\200\201\357\274\211.zip"
Binary files differ
--
Gitblit v1.9.3