From 6f35ca70caf02e1c2b7dbab32794c1cc1f5dbf60 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期四, 24 十月 2024 11:15:47 +0800 Subject: [PATCH] 测试完成 --- src/views/repositoryai/templateku/configurat/measurement.vue | 47 +++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 39 insertions(+), 8 deletions(-) diff --git a/src/views/repositoryai/templateku/configurat/measurement.vue b/src/views/repositoryai/templateku/configurat/measurement.vue index 10f2cc5..c5da2b7 100644 --- a/src/views/repositoryai/templateku/configurat/measurement.vue +++ b/src/views/repositoryai/templateku/configurat/measurement.vue @@ -66,9 +66,10 @@ :key="item.aaa" > <div class="dev-text"> - {{ index + 1 }}銆�<span>{{ item.questionText }}</span> + {{ index + 1 }}銆�<span>{{ item.scriptContent }}</span> </div> - <div class="dev-xx"> + + <div class="dev-xx" v-if="item.valueType == 1"> <el-radio-group v-model="item.radio"> <el-radio v-for="(items, index) in item.ivrLibaScriptTargetoptionList" @@ -77,6 +78,14 @@ >{{ items.targetvalue }}</el-radio > </el-radio-group> + </div> + <div v-else> + <el-input + type="textarea" + placeholder="鏈幏鍙栧埌淇℃伅" + v-model.sync="item.questionResult" + :rows="2" + /> </div> </div> </div> @@ -96,7 +105,7 @@ return { answer: "", //鍥炵瓟 id: null, - TemplateName: "闅忚妯$増鍚嶇О", //妯$増鍚� + TemplateName: "闅忚妯℃澘鍚嶇О", //妯℃澘鍚� radio: "1", userid: "", input: "杩樹笉閿�", @@ -111,6 +120,26 @@ created() { this.TemplateName = this.$route.query.name; this.requstWs(); //杩涘叆椤甸潰鍒涘缓杩炴帴 + }, + mounted() { + // 鑾峰彇class涓篵orderdiv鐨勫厓绱� + const borderdiv = document.querySelector(".borderdiv"); + + // 鍒涘缓涓�涓狹utationObserver瀹炰緥锛岀敤浜庣洃鍚厓绱犵殑鍙樺寲 + const observer = new MutationObserver(() => { + // 褰撳厓绱犻珮搴﹀彉鍖栨椂锛屽皢婊氬姩鏉℃粴鍔ㄥ埌鏈�涓嬫柟 + borderdiv.scrollTop = borderdiv.scrollHeight; + }); + + // 閰嶇疆MutationObserver瀹炰緥鐨勮瀵熺洰鏍囧拰瑙傚療閫夐」 + observer.observe(borderdiv, { + attributes: true, + childList: true, + subtree: true, + }); + + // 褰撲笉鍐嶉渶瑕佺洃鍚椂锛屽彲浠ヤ娇鐢╠isconnect鏂规硶鍋滄瑙傚療 + // observer.disconnect(); }, methods: { @@ -129,7 +158,7 @@ }; // 鍙戣捣ws璇锋眰 sendWebsocket( - "ws://localhost:8089/chat?userId=1", + "ws://192.168.2.13:8095/chat?userId=1", obj, this.wsMessage, this.wsError @@ -161,9 +190,9 @@ value: dataJson.jsy, isEat: 1, }); - } else if (dataJson.nowQuestion.questionText) { + } else if (dataJson.nowQuestion.scriptContent) { this.Answerline.push({ - value: dataJson.nowQuestion.questionText, + value: dataJson.nowQuestion.scriptContent, isEat: 1, }); } @@ -176,6 +205,8 @@ }); return item; }); + console.log(this.questionList); + // IMUI.appendMessage(data); }, @@ -195,7 +226,7 @@ console.log(obj, "鍏ュ弬"); // 鍙戣捣ws璇锋眰 sendWebsocket( - "ws://localhost:8089/chat?userId=1", + "ws://192.168.2.13:8095/chat?userId=1", obj, this.wsMessage, this.wsError @@ -235,7 +266,7 @@ } } .borderdiv { - min-height: 60vh; + height: 100vh; font-size: 20px; padding: 30px; max-height: 700px; -- Gitblit v1.9.3