From 9a1a82e442721ce04a743381b278482487d6a60b Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 11 十二月 2024 15:20:35 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/record/detailpage/index.vue | 79 ++++++++++++++++++++++++++++-----------
1 files changed, 56 insertions(+), 23 deletions(-)
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index 8f53179..e0f68c0 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -26,7 +26,12 @@
<el-table :data="logsheetlist" style="width: 100%">
<el-table-column prop="sendname" align="center" label="濮撳悕">
</el-table-column>
- <el-table-column prop="sendstate" align="center" label="鏈嶅姟鐘舵��">
+ <el-table-column
+ prop="sendstate"
+ align="center"
+ width="200"
+ label="鏈嶅姟鐘舵��"
+ >
<template slot-scope="scope">
<div v-if="scope.row.sendstate == 1">
<el-tag type="primary" :disable-transitions="false"
@@ -423,6 +428,7 @@
serviceSubtaskDetailedit,
serviceSubtaskDetailadd,
updatePersonVoices,
+ addPersonVoices,
} from "@/api/AiCentre/index";
export default {
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
@@ -434,7 +440,7 @@
taskname: "",
activeName: "wj",
voice: "",
- templateid:'',
+ templateid: "",
tableDatatop: [], //棰樼洰琛�
voiceDatatop: [], //棰樼洰琛�
Whetherall: false, //鏄惁鍏ㄩ儴璁板綍灞曠ず
@@ -456,11 +462,7 @@
this.patid = this.$route.query.patid;
this.Voicetype = this.$route.query.Voicetype;
this.serviceType = this.$route.query.serviceType;
- if (this.Voicetype) {
- this.getPersonVoices();
- } else {
- this.getsearchrResults();
- }
+
this.getTaskservelist(this.taskid);
},
@@ -515,7 +517,7 @@
}
});
if (!this.tableDatatop.length) {
- this.puttaskid(this.templateid);
+ this.puttaskid(this.templateid);
}
}
});
@@ -526,11 +528,14 @@
if (res.code == 200) {
this.tableDatatop = res.data.ivrTaskTemplateScriptVOList;
this.tableDatatop.forEach((item) => {
+ item.id = null;
// 绫诲瀷鍒ゆ柇璧嬪��
if (item.ivrTaskScriptTargetoptionList) {
- item.targetvalue=1;
- item.questiontext=item.scriptContent;
- item.targetvalue = item.ivrTaskScriptTargetoptionList.map(obj => obj.targetvalue).join('&');
+ item.targetvalue = 1;
+ item.questiontext = item.scriptContent;
+ item.targetvalue = item.ivrTaskScriptTargetoptionList
+ .map((obj) => obj.targetvalue)
+ .join("&");
}
if (item.targetvalue) {
item.scriptResult = item.targetvalue.split("&");
@@ -538,8 +543,7 @@
item.scriptResult = [];
}
});
- console.log(this.tableDatatop,'this.tableDatatop');
-
+ console.log(this.tableDatatop, "this.tableDatatop");
}
});
},
@@ -589,14 +593,30 @@
this.Editsingletasksonyic(excep);
},
yuyingetdetail() {
- this.tableDatatop.forEach((item) => {
+ this.tableDatatop.forEach((item,index) => {
+ console.log(item.scriptResult, "scriptResult");
item.scriptResult = item.scriptResult.join("&");
+ item.templatequestionnum=index+1;
+ item.subId = this.id;
+ item.taskid = this.taskid;
+ item.asrtext = item.matchedtext;
+ item.isoperation = 1;
+ item.patid = this.patid;
+ item.templateid = item.templateID;
});
- updatePersonVoices(this.tableDatatop).then((res) => {
- if (res.code == 200) {
- this.$modal.msgSuccess("鏈嶅姟淇敼鎴愬姛");
- }
- });
+ if (this.tableDatatop[0].id) {
+ updatePersonVoices(this.tableDatatop).then((res) => {
+ if (res.code == 200) {
+ this.$modal.msgSuccess("鏈嶅姟淇敼鎴愬姛");
+ }
+ });
+ } else {
+ addPersonVoices(this.tableDatatop).then((res) => {
+ if (res.code == 200) {
+ this.$modal.msgSuccess("鏈嶅姟淇濆瓨鎴愬姛");
+ }
+ });
+ }
},
// 鑾峰彇鎮h�呰褰�
getTaskservelist(taskid) {
@@ -612,7 +632,12 @@
}).then((res) => {
if (res.code == 200) {
this.logsheetlist = res.rows[0].serviceSubtaskList;
- this.templateid=this.logsheetlist[0].templateid
+ this.templateid = this.logsheetlist[0].templateid;
+ }
+ if (this.Voicetype) {
+ this.getPersonVoices();
+ } else {
+ this.getsearchrResults();
}
});
},
@@ -665,9 +690,17 @@
.catch(() => {});
},
handleOptionChange(a, b, c) {
- var obj = this.tableDatatop[b].svyLibTemplateTargetoptions.find(
- (item) => item.optioncontent == a
- );
+ console.log(this.tableDatatop[b], "this.tableDatatop[b]");
+
+ if (this.Voicetype) {
+ var obj = this.tableDatatop[b].ivrTaskScriptTargetoptionList.find(
+ (item) => item.optioncontent == a
+ );
+ } else {
+ var obj = this.tableDatatop[b].svyLibTemplateTargetoptions.find(
+ (item) => item.optioncontent == a
+ );
+ }
if (obj.isabnormal) {
this.tableDatatop[b].isabnormal = true;
} else {
--
Gitblit v1.9.3