From 1feb410410781eb56159c8fdd856e68d2c23e0a4 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 12 十二月 2025 15:21:26 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/record/detailpage/index.vue | 147 +++++++++++++++++++++++++++++++------------------
1 files changed, 93 insertions(+), 54 deletions(-)
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index 886d0b5..8526297 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -695,7 +695,10 @@
</div>
<!-- SIP娉ㄥ唽鐘舵�佹彁绀� -->
- <div v-if="isSipRegistering&&orgname == '涓芥按甯備腑鍖婚櫌'" class="sip-registering">
+ <div
+ v-if="isSipRegistering && orgname == '涓芥按甯備腑鍖婚櫌'"
+ class="sip-registering"
+ >
<el-alert
title="鍛煎彨搴ф満鍒濆鍖栦腑锛岃绋嶅��..."
type="info"
@@ -1157,6 +1160,7 @@
callType: "", // 鐢ㄤ簬鍖哄垎鏄摢涓數璇�
isSipRegistering: true, // SIP娉ㄥ唽鐘舵��
// 宸叉湁鏁版嵁...
+ customCallStatus: "", // 鐢ㄤ簬瀛樺偍鑷畾涔夌姸鎬佹枃鏈�
callStatus: "idle", // idle, calling, connected, ended, failed
isEndingCall: false,
CaldialogVisible: false,
@@ -1376,6 +1380,7 @@
label: "涓�骞村悗",
},
],
+ statusTimer: null,
userform: {},
smsDialogVisible: false, // 鎺у埗鐭俊瀵硅瘽妗嗘樉绀�
smsContent: "", // 瀛樺偍鐭俊鍐呭
@@ -1392,9 +1397,18 @@
patid: null,
};
},
-
+ // 鍦ㄧ粍浠朵腑娣诲姞閿�姣佸墠鐨勬竻鐞�
+ beforeUnmount() {
+ if (this.statusTimer) {
+ clearTimeout(this.statusTimer);
+ this.statusTimer = null;
+ }
+ },
computed: {
callStatusText() {
+ if (this.customCallStatus) {
+ return this.customCallStatus;
+ }
const statusMap = {
idle: "鍑嗗鍛煎彨",
calling: `姝e湪鍛煎彨 ${this.currentPhoneNumber}...`,
@@ -1425,19 +1439,55 @@
this.visitCount = this.$route.query.visitCount;
this.serviceType = this.$route.query.serviceType;
this.orgname = localStorage.getItem("orgname");
-
+ if (this.orgname == "缂欎簯鍘夸腑鍖诲尰闄�") {
+ this.options = [
+ {
+ value: "鍗婁釜鏈堝悗",
+ label: "鍗婁釜鏈堝悗",
+ },
+ {
+ value: "涓�涓湀鍚�",
+ label: "涓�涓湀鍚�",
+ }, {
+ value: "涓や釜鏈堝悗",
+ label: "涓や釜鏈堝悗",
+ },
+ {
+ value: "涓変釜鏈堝悗",
+ label: "涓変釜鏈堝悗",
+ },
+ {
+ value: "鍏釜鏈堝悗",
+ label: "鍏釜鏈堝悗",
+ },
+ {
+ value: "12涓湀鍚�",
+ label: "12涓湀鍚�",
+ },
+ ];
+ }
this.getTaskservelist();
},
-mounted() {
+ mounted() {
// 鐩戝惉瀛愮粍浠剁殑sipStatus灞炴�у彉鍖�
if (this.$refs.callButton) {
this.$watch(
() => this.$refs.callButton.sipStatus,
(newStatus) => {
- if (newStatus === '宸叉敞鍐�') {
+ if (this.statusTimer) {
+ clearTimeout(this.statusTimer);
+ this.statusTimer = null;
+ }
+ if (newStatus === "宸叉敞鍐�") {
+ this.statusTimer = setTimeout(() => {
+ this.isSipRegistering = false;
+ this.customCallStatus = ""; // 娉ㄥ唽鎴愬姛鍚庢竻绌鸿嚜瀹氫箟鎻愮ず
+ console.log("SIP娉ㄥ唽鎴愬姛锛岀姸鎬佸凡鏇存柊");
+ }, 2000);
this.isSipRegistering = false;
- } else if (newStatus === '娉ㄥ唽澶辫触' || newStatus === '鏈繛鎺�') {
+ } else if (newStatus === "娉ㄥ唽澶辫触" || newStatus === "鏈繛鎺�") {
this.isSipRegistering = true;
+ this.customCallStatus = "鍛煎彨涓柇锛岃祫婧愰噸鏂板姞杞戒腑璇风◢绛�3s閲嶆柊銆�";
}
},
{ immediate: true } // 绔嬪嵆鎵ц涓�娆′互鑾峰彇鍒濆鍊�
@@ -1555,15 +1605,17 @@
// 鏍规嵁閫夋嫨鐨勯殢璁挎柟寮忚绠楅殢璁挎棩鏈�
if (value.includes("涓冨ぉ鍚�")) {
followupDate.setDate(dischargeDate.getDate() + 7);
- } else if (value.includes("15澶╁悗")) {
+ } else if (value.includes("15澶╁悗")||value.includes("鍗婁釜鏈堝悗")) {
followupDate.setDate(dischargeDate.getDate() + 15);
} else if (value.includes("涓�涓湀鍚�")) {
followupDate.setMonth(dischargeDate.getMonth() + 1);
+ }else if (value.includes("涓や釜鏈堝悗")) {
+ followupDate.setMonth(dischargeDate.getMonth() + 2);
} else if (value.includes("涓変釜鏈堝悗")) {
followupDate.setMonth(dischargeDate.getMonth() + 3);
} else if (value.includes("鍏釜鏈堝悗")) {
followupDate.setMonth(dischargeDate.getMonth() + 6);
- } else if (value.includes("涓�骞村悗")) {
+ } else if (value.includes("涓�骞村悗")||value.includes("12涓湀鍚�")) {
followupDate.setFullYear(dischargeDate.getFullYear() + 1);
}
@@ -1582,8 +1634,6 @@
},
// 妫�鏌ラ殢璁挎棩鏈熸槸鍚︽湁鏁�
checkFollowupDate(date) {
- console.log(date);
-
if (!date) {
this.form.date1 = "";
this.$refs.zcform.clearValidate(["date1"]);
@@ -1710,7 +1760,10 @@
}
});
this.Editsingletasksonyic(6);
-
+ if (this.visitCount != 1) {
+ this.Torouter();
+ return;
+ }
this.$modal
.confirm(
'浠诲姟淇濆瓨鎴愬姛鏄惁閽堝鎮h�咃細"' +
@@ -1732,33 +1785,36 @@
this.dialogFormVisible = true;
})
.catch(() => {
- if (this.form.serviceType == 13) {
- if (this.visitCount != 1) {
- this.$router.push({
- path: "/logisticsservice/zbAgain",
- });
- } else {
- this.$router.push({
- path: "/logisticsservice/record",
- });
- }
- } else if (this.form.serviceType == 2) {
- if (this.visitCount != 1) {
- this.$router.push({
- path: "/logisticsservice/again",
- });
- } else {
- this.$router.push({
- path: "/followvisit/discharge",
- });
- }
- }
+ this.Torouter();
});
})
.catch((error) => {
// 濡傛灉鏈変换浣曚竴涓紓姝ユ搷浣滃け璐ワ紝浼氳繘鍏ヨ繖閲�
console.error("鍙戠敓閿欒锛�", error);
});
+ },
+ Torouter() {
+ if (this.form.serviceType == 13) {
+ if (this.visitCount != 1) {
+ this.$router.push({
+ path: "/logisticsservice/zbAgain",
+ });
+ } else {
+ this.$router.push({
+ path: "/logisticsservice/record",
+ });
+ }
+ } else if (this.form.serviceType == 2) {
+ if (this.visitCount != 1) {
+ this.$router.push({
+ path: "/logisticsservice/again",
+ });
+ } else {
+ this.$router.push({
+ path: "/followvisit/discharge",
+ });
+ }
+ }
},
// 鐢佃瘽============================
// 楠岃瘉鐢佃瘽鍙风爜鏍煎紡骞惰繑鍥為敊璇俊鎭�
@@ -1889,7 +1945,10 @@
param2: this.patid,
subId: this.id,
};
-
+ if (this.visitCount != 1) {
+ this.Torouter();
+ return;
+ }
addPersonVoices(obj).then((res) => {
if (res.code == 200) {
this.$modal.msgSuccess("鏈嶅姟淇濆瓨鎴愬姛");
@@ -1914,27 +1973,7 @@
this.dialogFormVisible = true;
})
.catch(() => {
- if (this.form.serviceType == 13) {
- if (this.visitCount != 1) {
- this.$router.push({
- path: "/logisticsservice/zbAgain",
- });
- } else {
- this.$router.push({
- path: "/logisticsservice/record",
- });
- }
- } else if (form.serviceType == 2) {
- if (this.visitCount != 1) {
- this.$router.push({
- path: "/followvisit/again",
- });
- } else {
- this.$router.push({
- path: "/followvisit/discharge",
- });
- }
- }
+ this.Torouter();
});
}
});
--
Gitblit v1.9.3