From e6af7e6f95fb49115bf593daff0bee48648f99cf Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期五, 31 五月 2024 14:46:55 +0800 Subject: [PATCH] 测试完成 --- src/views/repositoryai/templateku/configurat/measurement.vue | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 51 insertions(+), 6 deletions(-) diff --git a/src/views/repositoryai/templateku/configurat/measurement.vue b/src/views/repositoryai/templateku/configurat/measurement.vue index 491059f..e631cc8 100644 --- a/src/views/repositoryai/templateku/configurat/measurement.vue +++ b/src/views/repositoryai/templateku/configurat/measurement.vue @@ -68,7 +68,8 @@ <div class="dev-text"> {{ index + 1 }}銆�<span>{{ item.questionText }}</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> @@ -112,6 +121,26 @@ 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: { // 寤虹珛杩炴帴 @@ -141,16 +170,32 @@ dataJson = JSON.parse(dataJson); dataJson = JSON.parse(dataJson); console.log(dataJson, "鏁版嵁"); + // 棣栨鎺ユ敹鏁版嵁 if (!this.Answerline[0]) { this.Answerline.push({ value: dataJson.kcb, isEat: 1, }); } - this.Answerline.push({ - value: dataJson.nowQuestion.questionText, - isEat: 1, - }); + // 浼樺厛鍔犲叆閫氱敤搴撳尮閰嶆枃鏈� + if (dataJson.nowQuestion.submoduleText) { + this.Answerline.push({ + value: dataJson.nowQuestion.submoduleText, + isEat: 1, + }); + } + // 鏄惁缁撴潫 + if (dataJson.jsy) { + this.Answerline.push({ + value: dataJson.jsy, + isEat: 1, + }); + } else if (dataJson.nowQuestion.questionText) { + this.Answerline.push({ + value: dataJson.nowQuestion.questionText, + isEat: 1, + }); + } this.questionList = dataJson.questionList; this.questionList = this.questionList.map((item) => { item.ivrLibaScriptTargetoptionList.forEach((row) => { @@ -219,7 +264,7 @@ } } .borderdiv { - min-height: 60vh; + height: 100vh; font-size: 20px; padding: 30px; max-height: 700px; -- Gitblit v1.9.3