From a9a1a5cf8e6d6677374e9ef7bcddb97877e4eee4 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期五, 02 八月 2024 15:34:12 +0800 Subject: [PATCH] 测试完成 --- src/views/repositoryai/intention/index.vue | 70 +++++++++++++++++++++++++++++++--- 1 files changed, 63 insertions(+), 7 deletions(-) diff --git a/src/views/repositoryai/intention/index.vue b/src/views/repositoryai/intention/index.vue index 54f60dc..fcd9c99 100644 --- a/src/views/repositoryai/intention/index.vue +++ b/src/views/repositoryai/intention/index.vue @@ -421,10 +421,17 @@ <el-input v-model="indexform.targetdesc" placeholder="璇疯緭鍏ユ寚鏍囨弿杩�" + id="targetdesc" + @focus="currentInputId = 'targetdesc'" maxlength="40" /> </el-form-item> </el-col ></el-row> + <el-form-item label="鎻掑叆濉┖" prop="scriptContent"> + <div style="display: flex; margin-bottom: 10px"> + <div class="tsgname" @click="tsgnameto">鎻掑叆濉┖</div> + </div> + </el-form-item> <el-form-item label="鏍囩" prop="desc" v-if="!measurement"> <div class="xinz-inf"> <el-tag @@ -525,13 +532,17 @@ </el-card> <div v-if="indexform.scriptType == 3"> <el-form-item label="鏀堕泦淇℃伅"> - <el-input - type="text" - placeholder="濉叆鏀堕泦淇℃伅" - v-model="indexform.reply" - > - </el-input - ></el-form-item> + <el-card class="box-card"> + <div v-for="item in indexform.targetoptionList"> + <el-input + type="text" + placeholder="濉叆鏀堕泦淇℃伅" + v-model="indexform.optiondesc" + > + </el-input> + </div> + </el-card> + </el-form-item> </div> <el-row :gutter="20"> <el-col :span="12"> @@ -832,7 +843,37 @@ this.deletefenl = row.title; } }, + // 渚挎嵎鏍囩 + tsgnameto(row) { + let inputValueArr = ""; + let value = 1; + let el = document.querySelector("#" + this.currentInputId); + //el.selectionStart; 杩欏氨鏄綋鍓嶅厜鏍囨墍鍦ㄧ殑浣嶇疆锛堝瓧绗︿覆涓瓧绗︾殑index锛� + if (this.currentInputId == "targetdesc") { + inputValueArr = this.indexform.targetdesc.split(""); + } else { + return; + } + //灏嗚緭鍏ユ鍐呭鍒囨垚鏁扮粍锛屾柟渚垮悗缁搷浣� + // inputValueArr = this.inputValue.split(""); + // 鎷垮埌閫変腑鏂囧瓧鐨勯暱搴︼紙鍚庣画鍙互鐢ㄦ潵鏇挎崲閫変腑鐨勬枃瀛楋級 + let selectLength = el.selectionEnd - el.selectionStart; + // 灏嗚鎻掑叆/鏇挎崲鐨勬枃瀛楁彃鍏�/鏇挎崲锛坴alue.name鏄鎻掑叆/鏇挎崲鐨勫瓧绗︿覆锛� + inputValueArr.splice( + el.selectionStart, + selectLength, + "__" + value + "__" + ); + // 鎶婃暟缁勯噸鏂拌浆鎹负瀛楃涓插苟璧嬪�� + inputValueArr = inputValueArr.join(""); + console.log(inputValueArr); + if (this.currentInputId == "targetdesc") { + this.indexform.targetdesc = inputValueArr; + } else { + return; + } + }, // 鐤剧梾----------------------- illnessUpdate(row) { this.illnessVisible = true; @@ -1391,6 +1432,21 @@ display: center !important; } } +.tsgname { + width: 90px; + margin-right: 10px; + text-align: center; + cursor: pointer; + height: 40px; + line-height: 40px; + background: #66c18c; + color: #ffff; + font-size: 18px; + border-radius: 5px; +} +.tsgname:hover { + background: #20894d; +} .qrcode-dialo { text-align: center; // display: flex; -- Gitblit v1.9.3