From dacfc42199eaeed64738201411d0b37153f7bf76 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 12 十一月 2025 15:02:01 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/record/detailpage/index.vue | 294 +++++++++++++++++++++++++++++++++++++---------------------
1 files changed, 188 insertions(+), 106 deletions(-)
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index fa48d8a..1113245 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -296,17 +296,7 @@
}}</span>
</div>
<div class="dev-xx">
- <el-radio-group
- v-model="item.scriptResult"
- @change="
- handleOptionChange(
- $event,
- index,
- item.svyTaskTemplateTargetoptions,
- item
- )
- "
- >
+ <el-radio-group v-model="item.scriptResult">
<el-radio
v-for="(
items, indexs
@@ -314,7 +304,14 @@
:class="items.isabnormal ? 'red-star' : ''"
:key="indexs"
:label="items.optioncontent"
- @click.native.prevent="handleRadioToggle(item, items.optioncontent)"
+ @click.native.prevent="
+ handleRadioToggle(
+ item,
+ index,
+ item.svyTaskTemplateTargetoptions,
+ items.optioncontent
+ )
+ "
>{{ items.optioncontent }}</el-radio
>
</el-radio-group>
@@ -435,9 +432,9 @@
>
<el-radio
v-for="(items, index) in item.scriptResult"
- :key="items"
+ :key="index"
:label="items"
- @click.native.prevent="handleRadioToggle(item, items.optioncontent)"
+ :class="items.isabnormal ? 'red-star' : ''"
>{{ items }}</el-radio
>
</el-radio-group>
@@ -965,14 +962,14 @@
<el-divider></el-divider>
<el-row>
<el-col :span="12">
- <el-form-item label="闅忚鏂瑰紡" prop="date1">
+ <el-form-item label="闅忚鏂瑰紡" prop="visitType">
<el-select
v-model="form.visitType"
filterable
allow-create
default-first-option
@change="visitChange"
- placeholder="璇烽�夋嫨闅忚鏂瑰紡(渚濆嚭闄㈡椂闂存妧璁$畻)"
+ placeholder="璇烽�夋嫨闅忚鏂瑰紡(渚濆嚭闄㈡椂闂磋绠�)"
>
<el-option
v-for="item in options"
@@ -993,6 +990,8 @@
align="right"
v-model="form.date1"
class="custom-disabled"
+ value-format="yyyy-MM-dd"
+ @change="checkFollowupDate"
></el-date-picker>
</el-form-item>
</el-col>
@@ -1024,10 +1023,7 @@
:visible.sync="CaldialogVisible"
width="60%"
>
- <CallCenterLs
- ref="callCenterModal"
- :initial-phone="currentPhoneNumber"
- />
+ <CallCenterLs ref="CallCenterLs" :initial-phone="currentPhoneNumber" />
</el-dialog>
</div>
</div>
@@ -1146,6 +1142,9 @@
isEndingCall: false,
CaldialogVisible: false,
currentCall: null, // 褰撳墠閫氳瘽瀵硅薄
+ // 璺敱鐩戝惉鐩稿叧
+ routeWatcher: null,
+ lastRoutePath: this.$route.path,
input: "浠婂ぉ韬綋杩樹笉閿�",
radio: "2",
taskname: "",
@@ -1191,21 +1190,21 @@
selectedTag: "",
tagOptions: [
{
- value: "0",
+ value: '0',
label: "姝e父",
type: "normal",
color: "#7ff5e1",
description: "鎮h�呮儏鍐垫甯革紝鏃犻渶鐗瑰埆鍏虫敞",
},
{
- value: "1",
+ value: '1',
label: "寮傚父",
type: "abnormal",
color: "#f75c5c",
description: "鎮h�呭瓨鍦ㄥ紓甯告儏鍐碉紝闇�瑕侀噸鐐瑰叧娉�",
},
{
- value: "2",
+ value: '2',
label: "璀﹀憡",
type: "warning",
color: "#fbfb4a",
@@ -1216,7 +1215,23 @@
resource: [
{ required: true, message: "璇烽�夋嫨闅忚鏂瑰紡", trigger: "change" },
],
- date1: [{ required: true, message: "璇烽�夋嫨闅忚鏃堕棿", trigger: "blur" }],
+ date1: [
+ { required: true, message: "璇烽�夋嫨闅忚鏃堕棿", trigger: "blur" },
+ {
+ validator: (rule, value, callback) => {
+ if (!value) {
+ return callback(new Error("璇烽�夋嫨闅忚鏃堕棿"));
+ }
+ const selectedDate = new Date(value);
+ const now = new Date();
+ if (selectedDate < now) {
+ return callback(new Error("闅忚鏃堕棿涓嶈兘鏃╀簬褰撳墠鏃ユ湡"));
+ }
+ callback();
+ },
+ trigger: "change",
+ },
+ ],
},
userrules: {
telcode: [{ validator: validatePhone, trigger: "blur" }],
@@ -1261,56 +1276,56 @@
// 绂佺敤浠婂ぉ鍙婁箣鍓嶇殑鏃ユ湡
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);
- },
- },
- ],
+ // 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: [
{
@@ -1354,6 +1369,7 @@
patid: null,
};
},
+
computed: {
callStatusText() {
const statusMap = {
@@ -1466,35 +1482,64 @@
},
// 鍐嶆闅忚鏃堕棿閫夊彇
visitChange(value) {
- // 鏍规嵁閫夋嫨鐨勯殢璁挎柟寮忚缃椂闂�
+ if (!this.form.endtime) {
+ this.$message.warning("璇峰厛纭鍑洪櫌鏃堕棿");
+ this.form.visitType = "";
+ this.$refs.zcform.clearValidate(["visitType"]);
+ return;
+ }
+
+ const dischargeDate = new Date(this.form.endtime);
const now = new Date();
+ let followupDate = new Date(dischargeDate);
+
+ // 鏍规嵁閫夋嫨鐨勯殢璁挎柟寮忚绠楅殢璁挎棩鏈�
if (value.includes("涓冨ぉ鍚�")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 7
- );
+ followupDate.setDate(dischargeDate.getDate() + 7);
} else if (value.includes("15澶╁悗")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 15
- );
+ followupDate.setDate(dischargeDate.getDate() + 15);
} else if (value.includes("涓�涓湀鍚�")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 30
- );
+ followupDate.setMonth(dischargeDate.getMonth() + 1);
} else if (value.includes("涓変釜鏈堝悗")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 90
- );
+ followupDate.setMonth(dischargeDate.getMonth() + 3);
} else if (value.includes("鍏釜鏈堝悗")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 180
- );
+ followupDate.setMonth(dischargeDate.getMonth() + 6);
} else if (value.includes("涓�骞村悗")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 365
+ followupDate.setFullYear(dischargeDate.getFullYear() + 1);
+ }
+
+ if (followupDate < now) {
+ this.$message.warning(
+ `璁$畻鍑虹殑闅忚鏃堕棿 ${this.formatTime(followupDate)} 宸茶繃鏈焋
);
+ this.form.visitType = "";
+ this.$refs.zcform.clearValidate(["visitType", "date1"]);
+ return;
+ }
+
+ this.form.date1 = this.formatTime(followupDate);
+
+ this.$refs.zcform.clearValidate(["date1"]);
+ },
+ // 妫�鏌ラ殢璁挎棩鏈熸槸鍚︽湁鏁�
+ checkFollowupDate(date) {
+ console.log(date);
+
+ if (!date) {
+ this.form.date1 = "";
+ this.$refs.zcform.clearValidate(["date1"]);
+ return;
+ }
+
+ const selectedDate = new Date(date);
+ const now = new Date();
+
+ if (selectedDate < now) {
+ this.$message.warning("闅忚鏃堕棿涓嶈兘鏃╀簬褰撳墠鏃ユ湡");
+ this.form.date1 = "";
+ this.$refs.zcform.validateField("date1"); // 瑙﹀彂楠岃瘉
}
},
-
// 鑾峰彇璇煶鏁版嵁
getPersonVoices(id) {
let obj = {
@@ -1566,7 +1611,7 @@
);
if (obj) {
if (objs.isabnormal) {
- excep = 1;
+ excep = objs.isabnormal;
}
}
let obj = {
@@ -1606,7 +1651,7 @@
this.$modal
.confirm(
'浠诲姟淇濆瓨鎴愬姛鏄惁閽堝鎮h�咃細"' +
- this.logsheetlist[0].sendname +
+ this.userform.name +
'"鍐嶆闅忚锛�',
"纭",
{
@@ -1822,7 +1867,16 @@
formtidy() {
this.form.visitType2 = this.form.visitType;
this.form.date2 = this.form.longSendTime;
+ // this.form.date1 = this.setCurrentDate();
this.form.remark2 = this.form.remark;
+ },
+ setCurrentDate() {
+ // 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� yyyy-MM-dd
+ const today = new Date();
+ const year = today.getFullYear();
+ const month = String(today.getMonth() + 1).padStart(2, "0");
+ const day = String(today.getDate()).padStart(2, "0");
+ return `${year}-${month}-${day}`;
},
// 鑾峰彇鎮h�呰褰�
getTaskservelist(id) {
@@ -1985,10 +2039,10 @@
this.$modal
.confirm('鏄惁鏌ョ湅浠诲姟涓�"' + row.taskName + '"鐨勬湇鍔¤鎯呮暟鎹紵')
.then(() => {
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
- this.Voicetype = 1;
- }
+ let type = "";
+ console.log(row, "rwo");
+ if (row.type == 1) {
+ type = 1;
}
this.taskid = row.taskid;
this.id = row.id;
@@ -2027,8 +2081,28 @@
}
this.$forceUpdate();
},
+ handleRadioToggles(questionItem, optionValue) {
+ if (!questionItem.matchedtext) {
+ questionItem.matchedtext == "";
+ }
+ // 濡傛灉鐐瑰嚮鐨勬槸褰撳墠宸查�変腑鐨勯�夐」锛屽垯鍙栨秷閫変腑
+ if (questionItem.matchedtext == optionValue) {
+ this.$set(questionItem, "matchedtext", "");
+ // 鍚屾椂閲嶇疆涓庨�夐」鐩稿叧鐨勭姸鎬�
+ questionItem.isabnormal = false;
+ questionItem.showAppendInput = false;
+ // 娉ㄦ剰锛氬彇娑堥�変腑鏃讹紝鎴戜滑閫氬父涓嶅笇鏈涜Е鍙戦鐩烦杞�昏緫锛屾墍浠ョ洿鎺ヨ繑鍥�
+ // 濡傛灉闇�瑕侊紝鍙互鍦ㄨ繖閲屾坊鍔犲彇娑堥�変腑鍚庣殑鐗瑰畾閫昏緫锛屼緥濡傞噸缃鐩簭鍒�
+ } else {
+ // 濡傛灉鐐瑰嚮鐨勬槸鏈�変腑鐨勯�夐」锛屽垯閫氳繃鏇存敼缁戝畾鍊兼潵瑙﹀彂鍘熷鐨� handleOptionChange 鏂规硶
+ // 杩欓噷鍙渶瑕佹敼鍙� v-model 缁戝畾鐨勫�硷紝change浜嬩欢浼氳嚜鍔ㄨЕ鍙�
+ this.$set(questionItem, "matchedtext", optionValue); // 鍚庣画鐨勮烦杞瓑澶嶆潅閫昏緫浼氬湪 handleOptionChange 涓甯告墽琛�
+ }
+ },
// 鏂板鐨勫垏鎹㈤�変腑/鍙栨秷閫変腑鏂规硶
- handleRadioToggle(questionItem, optionValue) {
+ handleRadioToggle(questionItem, index, options, optionValue) {
+ console.log(questionItem, optionValue, 999);
+
// 濡傛灉鐐瑰嚮鐨勬槸褰撳墠宸查�変腑鐨勯�夐」锛屽垯鍙栨秷閫変腑
if (questionItem.scriptResult === optionValue) {
questionItem.scriptResult = ""; // 娓呯┖閫変腑鍊�
@@ -2041,11 +2115,15 @@
// 濡傛灉鐐瑰嚮鐨勬槸鏈�変腑鐨勯�夐」锛屽垯閫氳繃鏇存敼缁戝畾鍊兼潵瑙﹀彂鍘熷鐨� handleOptionChange 鏂规硶
// 杩欓噷鍙渶瑕佹敼鍙� v-model 缁戝畾鐨勫�硷紝change浜嬩欢浼氳嚜鍔ㄨЕ鍙�
questionItem.scriptResult = optionValue;
+ this.handleOptionChange(optionValue, index, options, questionItem);
// 鍚庣画鐨勮烦杞瓑澶嶆潅閫昏緫浼氬湪 handleOptionChange 涓甯告墽琛�
}
},
+
// 鍦╩ethods閮ㄥ垎锛屼慨鏀筯andleOptionChange鏂规硶:
handleOptionChange(selectedOption, questionIndex, options, a) {
+ console.log(selectedOption, questionIndex, options, a, "888");
+
if (document.activeElement) {
document.activeElement.blur();
}
@@ -2273,6 +2351,11 @@
// },
beforeRouteLeave(to, from, next) {
this.$refs.callButton.cleanupResources();
+ if (this.$refs.CallCenterLs) {
+ console.log(1);
+
+ this.$refs.CallCenterLs.handleSeatLogout();
+ }
next(); // 纭繚璋冪敤 nex
},
// beforeRouteUpdate() {
@@ -2467,7 +2550,7 @@
.CONTENT {
padding: 10px;
height: 100%;
- min-height: 660px; /* 璁剧疆鏈�灏忛珮搴� */
+ min-height: 738px; /* 璁剧疆鏈�灏忛珮搴� */
.title {
font-size: 22px;
@@ -2482,7 +2565,7 @@
padding: 30px;
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);
- max-height: 580px; /* 璁剧疆鏈�澶ч珮搴� */
+ max-height: 618px; /* 璁剧疆鏈�澶ч珮搴� */
overflow-y: auto; /* 鍐呭瓒呰繃楂樺害鏃舵樉绀烘粴鍔ㄦ潯 */
.topic-dev {
@@ -2677,7 +2760,7 @@
margin: 0 10px 20px 10px;
/* 褰撶缉鏀炬瘮渚嬪ぇ浜�100%鎴栧睆骞曞搴﹁緝灏忔椂鏀逛负涓婁笅鎺掑垪 */
- @media screen and (max-width: 1200px), (min-resolution: 1dppx) {
+ @media screen and (min-resolution: 1.5dppx) {
flex-direction: column;
.call-action,
@@ -2833,9 +2916,8 @@
}
/* 缂╂斁妫�娴嬫牱寮� */
-@media screen and (min-resolution: 1.1dppx),
- screen and (-webkit-min-device-pixel-ratio: 1.1),
- screen and (max-width: 1200px) {
+@media screen and (min-resolution: 1.5dppx),
+ screen and (-webkit-min-device-pixel-ratio: 1.5) {
.action-container {
flex-direction: column;
}
--
Gitblit v1.9.3