From 4a7648d05accd3b7b358b44fc9ef72394b21de39 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期四, 16 一月 2025 13:57:12 +0800 Subject: [PATCH] 测试完成 --- src/views/followvisit/record/detailpage/index.vue | 181 +++++++++++++++++++++++++++++++------------- 1 files changed, 126 insertions(+), 55 deletions(-) diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue index 8f53179..9828010 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" @@ -162,31 +167,43 @@ </el-table> </div> </div> - <div class="Followuserinfo"> + <div :class="form.serviceType==2?'Followuserinfo':'Followuserinfos'"> + <div> <div class="headline"> - <div>浜哄伐澶勭悊鎰忚</div> + <div>浜哄伐澶勭悊</div> + <div style="margin-left: 30px;"><el-button type="warning" + >涓�閿懠鍙�</el-button + ></div> </div> - <div style="margin-left: 30px"> - <el-button type="warning" @click="Editsingletaskson('1')" - >鏆備笉澶勭悊</el-button - > - <el-button type="success" @click="Editsingletaskson('2')" - >鐥呮儏绋冲畾</el-button - > - <el-button type="primary" @click="Editsingletaskson('3')" - >閫氱煡灏辫瘖</el-button - > - <!-- <el-button type="danger" @click="Editsingletaskson('4')" - >澶辫</el-button - > --> - <el-button type="info" @click="Editsingletaskson('5')" - >浜哄伐闅忚</el-button - > - </div> + <el-form ref="form" :model="form" label-width="80px"> + <el-form-item label="闅忚璁板綍"> + <el-input type="textarea" v-model="form.remark"></el-input> + </el-form-item> + + <el-form-item label="澶勭悊鎰忚"> + <div> + <el-button plain type="warning" @click="Editsingletaskson('1')" + >鏆備笉澶勭悊</el-button + > + <el-button plain type="success" @click="Editsingletaskson('2')" + >鐥呮儏绋冲畾</el-button + > + <el-button plain type="primary" @click="Editsingletaskson('3')" + >閫氱煡灏辫瘖</el-button + > + <!-- <el-button type="danger" @click="Editsingletaskson('4')" + >澶辫</el-button + > --> + <el-button plain type="info" @click="Editsingletaskson('5')" + >涓績闅忚</el-button + > + </div> + </el-form-item> + </el-form> </div> </div> - <div> + <div v-if="form.serviceType==2"> <el-tabs v-model="activeName" type="border-card"> <el-tab-pane name="wj"> <span class="mulsz" slot="label" @@ -194,7 +211,7 @@ > <div class="CONTENT"> <div class="title">{{ taskname ? taskname : "闂嵎" }}</div> - <!-- 闂嵎浠诲姟灞曠ず --> + <div class="preview-left" v-if="!Voicetype"> <!-- 鍗曢�� --> <div @@ -291,9 +308,9 @@ </div> </div> </div> - <!-- 璇煶闂嵎褰㈠紡灞曠ず --> + <div class="preview-left" v-else> - <!-- 鍗曢�� --> + <div class="topic-dev" v-for="(item, index) in tableDatatop" @@ -321,7 +338,7 @@ </div> </div> - <!-- 濉┖ --> + <div class="scriptTopic-dev" :key="index" v-else> <div class="dev-text"> {{ index + 1 }}銆乕闂瓟]<span>{{ item.questiontext }}</span> @@ -347,7 +364,7 @@ > </div> </el-tab-pane> - <!-- 璇煶闅忚璇︽儏---------------------- --> + <el-tab-pane name="yy"> <span class="mulsz" slot="label" ><i class="el-icon-headset"></i> 璇煶闅忚璇︽儏</span @@ -383,10 +400,7 @@ :autosize="{ minRows: 1 }" v-model="item.asrtext" ></el-input> - <!-- <el-radio v-model="radio" label="1">寰堟</el-radio> - <el-radio v-model="radio" label="2">杩樺彲浠�</el-radio> - <el-radio v-model="radio" label="3">涓嶅お濂�</el-radio> - <el-radio v-model="radio" label="4">姣旇緝宸�</el-radio> --> + <div> <mini-audio :audio-source=" @@ -423,6 +437,7 @@ serviceSubtaskDetailedit, serviceSubtaskDetailadd, updatePersonVoices, + addPersonVoices, } from "@/api/AiCentre/index"; export default { dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"], @@ -434,7 +449,8 @@ taskname: "", activeName: "wj", voice: "", - templateid:'', + templateid: "", + form: {}, tableDatatop: [], //棰樼洰琛� voiceDatatop: [], //棰樼洰琛� Whetherall: false, //鏄惁鍏ㄩ儴璁板綍灞曠ず @@ -456,11 +472,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 +527,7 @@ } }); if (!this.tableDatatop.length) { - this.puttaskid(this.templateid); + this.puttaskid(this.templateid); } } }); @@ -526,11 +538,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 +553,7 @@ item.scriptResult = []; } }); - console.log(this.tableDatatop,'this.tableDatatop'); - + console.log(this.tableDatatop, "this.tableDatatop"); } }); }, @@ -589,14 +603,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) { @@ -606,14 +636,28 @@ } else { this.Whetherall = true; } + console.log('111'); + getTaskservelist({ patid: this.patid, taskid: taskid, }).then((res) => { if (res.code == 200) { + this.form = res.rows[0].serviceSubtaskList[0]; + console.log(this.form,'form3'); this.logsheetlist = res.rows[0].serviceSubtaskList; - this.templateid=this.logsheetlist[0].templateid + this.templateid = this.logsheetlist[0].templateid; + console.log(this.form.serviceType,'serviceType'); } + + if (this.form.scriptType==2) { + if (this.Voicetype) { + this.getPersonVoices(); + } else { + this.getsearchrResults(); + } + } + }); }, Editsingletaskson(son) { @@ -623,7 +667,7 @@ taskid: this.taskid, }).then((res) => { if (res.code == 200) { - objson = res.rows[0]; + objson = res.rows[0].serviceSubtaskList[0]; objson.suggest = son; Editsingletaskson(objson).then((res) => { if (res.code) { @@ -642,8 +686,6 @@ }).then((res) => { if (res.code == 200) { objson = res.rows[0].serviceSubtaskList[0]; - console.log(objson, "obj"); - objson.excep = excep; Editsingletaskson(objson).then((res) => { if (res.code) { @@ -665,9 +707,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 { @@ -726,6 +776,27 @@ } } } +.Followuserinfos { + margin: 20px 10px; + align-items: center; + height: 300px; + padding: 30px; + background: #ffff; + border: 1px solid #dcdfe6; + -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), + 0 0 6px 0 rgba(0, 0, 0, 0.04); + .userinfo-text { + font-size: 20px; + margin-right: 20px; + margin-bottom: 10px; + } + .userinfo-value { + color: rgb(15, 139, 211); + span { + margin-right: 20px; + } + } +} .borderdiv { min-height: 60vh; font-size: 20px; -- Gitblit v1.9.3