From e0909a604449641ebcc6ed15495e6f28515f437c Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期一, 17 十一月 2025 11:07:57 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/record/detailpage/index.vue | 196 +++++++++++++++++++++++++++++++++---------------
1 files changed, 134 insertions(+), 62 deletions(-)
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index c34b48f..36faefa 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -282,11 +282,7 @@
>
<!-- 鍗曢�� -->
<div
- :class="
- item.isabnormal
- ? 'scriptTopic-isabnormal'
- : 'scriptTopic-dev'
- "
+ :class="getTopicClass(item)"
:key="index"
v-if="item.scriptType == 1 && !item.astrict"
>
@@ -296,26 +292,21 @@
}}</span>
</div>
<div class="dev-xx">
- <el-radio-group
- v-model="item.scriptResult"
- @change="
- handleOptionChange(
- $event,
- index,
- item.svyLibTemplateTargetoptions,
- item
- )
- "
- >
+ <el-radio-group v-model="item.scriptResult">
<el-radio
v-for="(
items, indexs
- ) in item.svyLibTemplateTargetoptions"
- :class="items.isabnormal ? 'red-star' : ''"
+ ) in item.svyTaskTemplateTargetoptions"
+ :class="getOptionClass(items)"
:key="indexs"
:label="items.optioncontent"
@click.native.prevent="
- handleRadioToggle(item, items.optioncontent)
+ handleRadioToggle(
+ item,
+ index,
+ item.svyTaskTemplateTargetoptions,
+ items.optioncontent
+ )
"
>{{ items.optioncontent }}</el-radio
>
@@ -363,7 +354,7 @@
@change="$forceUpdate()"
v-for="(
items, indexs
- ) in item.svyLibTemplateTargetoptions"
+ ) in item.svyTaskTemplateTargetoptions"
:key="indexs"
:label="items.optioncontent"
>
@@ -437,11 +428,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>
@@ -1030,10 +1019,7 @@
:visible.sync="CaldialogVisible"
width="60%"
>
- <CallCenterLs
- ref="callCenterModal"
- :initial-phone="currentPhoneNumber"
- />
+ <CallCenterLs ref="CallCenterLs" :initial-phone="currentPhoneNumber" />
</el-dialog>
</div>
</div>
@@ -1152,6 +1138,9 @@
isEndingCall: false,
CaldialogVisible: false,
currentCall: null, // 褰撳墠閫氳瘽瀵硅薄
+ // 璺敱鐩戝惉鐩稿叧
+ routeWatcher: null,
+ lastRoutePath: this.$route.path,
input: "浠婂ぉ韬綋杩樹笉閿�",
radio: "2",
taskname: "",
@@ -1376,6 +1365,7 @@
patid: null,
};
},
+
computed: {
callStatusText() {
const statusMap = {
@@ -1413,6 +1403,29 @@
},
methods: {
+ // 鑾峰彇涓婚鏍峰紡绫�
+ getTopicClass(item) {
+ console.log(item.isabnormal,'111');
+
+ // 鏍规嵁鐘舵�佸�艰繑鍥炲搴旂殑鏍峰紡绫�
+ if (item.isabnormal == 1) {
+ return "scriptTopic-isabnormal"; // 寮傚父 - 绾㈣壊
+ } else if (item.isabnormal == 2) {
+ return "scriptTopic-warning"; // 璀﹀憡 - 榛勮壊
+ } else {
+ return "scriptTopic-dev"; // 姝e父 - 榛樿鏍峰紡
+ }
+ },
+
+ // 鑾峰彇閫夐」鏍峰紡绫�
+ getOptionClass(items) {
+ if (items.isabnormal == 1) {
+ return "red-star"; // 寮傚父 - 绾㈣壊鏄熷彿
+ } else if (items.isabnormal == 2) {
+ return "yellow-star"; // 璀﹀憡 - 榛勮壊鏄熷彿
+ }
+ return ""; // 姝e父 - 鏃犵壒娈婃牱寮�
+ },
// 鑾峰彇闂嵎鏁版嵁
getsearchrResults(id) {
getsearchrResults({
@@ -1532,7 +1545,7 @@
console.log(date);
if (!date) {
- this.form.date1 = '';
+ this.form.date1 = "";
this.$refs.zcform.clearValidate(["date1"]);
return;
}
@@ -1542,7 +1555,7 @@
if (selectedDate < now) {
this.$message.warning("闅忚鏃堕棿涓嶈兘鏃╀簬褰撳墠鏃ユ湡");
- this.form.date1 = '';
+ this.form.date1 = "";
this.$refs.zcform.validateField("date1"); // 瑙﹀彂楠岃瘉
}
},
@@ -1612,14 +1625,18 @@
return;
}
}
- var objs = item.svyLibTemplateTargetoptions.find(
+ var objs = item.svyTaskTemplateTargetoptions.find(
(items) => items.optioncontent == item.scriptResult
);
- if (obj) {
- if (objs.isabnormal) {
- excep = 1;
+
+ if (objs) {
+ if (excep != 1 && objs.isabnormal) {
+ excep = objs.isabnormal;
+ this.selectedTag = objs.isabnormal;
}
}
+ console.log(excep, "excep");
+
let obj = {
asrtext: null,
patid: this.patid,
@@ -1798,7 +1815,8 @@
},
yuyingetdetail() {
const dataToSubmit = JSON.parse(JSON.stringify(this.tableDatatop));
-
+ console.log(dataToSubmit, "dataToSubmit");
+ // return;
dataToSubmit.forEach((item, index) => {
// 瀵规嫹璐濈殑鏁版嵁杩涜鎿嶄綔锛屼笉褰卞搷鍘熷鐨� scriptResult 鏁扮粍
item.scriptResult = item.scriptResult.join("&");
@@ -2046,10 +2064,10 @@
.confirm('鏄惁鏌ョ湅浠诲姟涓�"' + row.taskName + '"鐨勬湇鍔¤鎯呮暟鎹紵')
.then(() => {
let type = "";
- console.log(row, "rwo");
- if (row.type == 1) {
- type = 1;
- }
+ console.log(row, "rwo");
+ if (row.type == 1) {
+ type = 1;
+ }
this.taskid = row.taskid;
this.id = row.id;
this.patid = row.patid;
@@ -2076,7 +2094,7 @@
(item) => item.optioncontent == a
);
} else {
- var obj = this.tableDatatop[b].svyLibTemplateTargetoptions.find(
+ var obj = this.tableDatatop[b].svyTaskTemplateTargetoptions.find(
(item) => item.optioncontent == a
);
}
@@ -2087,13 +2105,31 @@
}
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) {
// 濡傛灉鐐瑰嚮鐨勬槸褰撳墠宸查�変腑鐨勯�夐」锛屽垯鍙栨秷閫変腑
if (questionItem.scriptResult === optionValue) {
questionItem.scriptResult = ""; // 娓呯┖閫変腑鍊�
// 鍚屾椂閲嶇疆涓庨�夐」鐩稿叧鐨勭姸鎬�
- questionItem.isabnormal = false;
+ // questionItem.isabnormal = false;
questionItem.showAppendInput = false;
// 娉ㄦ剰锛氬彇娑堥�変腑鏃讹紝鎴戜滑閫氬父涓嶅笇鏈涜Е鍙戦鐩烦杞�昏緫锛屾墍浠ョ洿鎺ヨ繑鍥�
// 濡傛灉闇�瑕侊紝鍙互鍦ㄨ繖閲屾坊鍔犲彇娑堥�変腑鍚庣殑鐗瑰畾閫昏緫锛屼緥濡傞噸缃鐩簭鍒�
@@ -2101,11 +2137,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();
}
@@ -2117,7 +2157,7 @@
// 澶勭悊寮傚父鐘舵�侀珮浜�
this.tableDatatop[questionIndex].isabnormal =
- !!selectedOptionObj.isabnormal;
+ selectedOptionObj.isabnormal;
// 澶勭悊闄勫姞杈撳叆妗嗘樉绀�
this.tableDatatop[questionIndex].showAppendInput =
@@ -2192,20 +2232,18 @@
astrict: index === questionIndex + 1 ? 0 : item.astrict,
hiddenByEnd: index === questionIndex + 1 ? false : item.hiddenByEnd,
}));
- }
+ }2
this.$forceUpdate();
},
overdata() {
this.tableDatatop.forEach((item, index) => {
- var obj = item.svyLibTemplateTargetoptions.find(
+ var obj = item.svyTaskTemplateTargetoptions.find(
(items) => items.optioncontent == item.scriptResult
);
if (obj) {
if (obj.isabnormal) {
- this.tableDatatop[index].isabnormal = true;
- } else {
- this.tableDatatop[index].isabnormal = false;
+ this.tableDatatop[index].isabnormal = obj.isabnormal;
}
this.$forceUpdate();
}
@@ -2333,6 +2371,11 @@
// },
beforeRouteLeave(to, from, next) {
this.$refs.callButton.cleanupResources();
+ if (this.$refs.CallCenterLs) {
+ console.log(1);
+
+ this.$refs.CallCenterLs.handleSeatLogout();
+ }
next(); // 纭繚璋冪敤 nex
},
// beforeRouteUpdate() {
@@ -2527,7 +2570,7 @@
.CONTENT {
padding: 10px;
height: 100%;
- min-height: 660px; /* 璁剧疆鏈�灏忛珮搴� */
+ min-height: 738px; /* 璁剧疆鏈�灏忛珮搴� */
.title {
font-size: 22px;
@@ -2542,7 +2585,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 {
@@ -2592,6 +2635,18 @@
}
}
+/* 寮傚父鐘舵�佹牱寮� - 绾㈣壊 (淇濇寔涓嶅彉) */
+.scriptTopic-isabnormal {
+ color: red;
+}
+
+/* 鏂板锛氳鍛婄姸鎬佹牱寮� - 榛勮壊 */
+.scriptTopic-warning {
+ color: #d4be00; /* 鎮ㄦ寚瀹氱殑榛勮壊 */
+
+}
+
+/* 寮傚父閫夐」鏍峰紡 - 绾㈣壊鏄熷彿 (淇濇寔涓嶅彉) */
.red-star {
::v-deep.el-radio__label {
position: relative;
@@ -2605,24 +2660,42 @@
right: -5px;
top: 0;
}
+}
- ::v-deep.el-input-group__textarea {
- white-space: pre-wrap;
- word-break: break-all;
- }
-
- ::v-deep.el-checkbox__label {
+/* 鏂板锛氳鍛婇�夐」鏍峰紡 - 榛勮壊鏄熷彿 */
+.yellow-star {
+ ::v-deep.el-radio__label {
position: relative;
padding-right: 10px;
}
- ::v-deep.el-checkbox__label::after {
+ ::v-deep.el-radio__label::after {
content: "*";
- color: red;
+ color: #ffe202; /* 榛勮壊鏄熷彿 */
position: absolute;
right: -5px;
top: 0;
+ font-weight: bold;
}
+}
+
+/* 鍏辩敤鏍峰紡淇濇寔涓嶅彉 */
+::v-deep.el-input-group__textarea {
+ white-space: pre-wrap;
+ word-break: break-all;
+}
+
+::v-deep.el-checkbox__label {
+ position: relative;
+ padding-right: 10px;
+}
+
+::v-deep.el-checkbox__label::after {
+ content: "*";
+ color: red;
+ position: absolute;
+ right: -5px;
+ top: 0;
}
.tag-selector-container {
display: flex;
@@ -2737,7 +2810,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,
@@ -2893,9 +2966,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