From 77a938594b066349db89ce9c06007bfc02a58150 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期二, 06 八月 2024 18:23:46 +0800
Subject: [PATCH] 测试完成
---
src/views/repositoryai/intention/index.vue | 97 ++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 88 insertions(+), 9 deletions(-)
diff --git a/src/views/repositoryai/intention/index.vue b/src/views/repositoryai/intention/index.vue
index 54f60dc..8091499 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
@@ -477,7 +484,10 @@
<el-row v-if="!measurement">
<el-col :span="24">
<el-form-item label="棰樼洰绫诲瀷">
- <el-radio-group v-model="indexform.scriptType">
+ <el-radio-group
+ @input="Changtype"
+ v-model="indexform.scriptType"
+ >
<el-radio :label="1">鍗曢��</el-radio>
<el-radio :label="2">澶氶��</el-radio>
<el-radio :label="3">濉┖</el-radio>
@@ -525,13 +535,18 @@
</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">
+ <span>{{ "(" + item.orderno + ")" }}</span>
+ <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">
@@ -707,6 +722,7 @@
radio: "涓诲垎绫�",
testvalue: "",
testgovalue: "",
+ creatype:'',//鎸囨爣涓存椂绫诲瀷
hasValue: true,
classifyform: {
categoryname: "",
@@ -790,7 +806,7 @@
this.valuetypelb = store.getters.askvaluetype;
this.languagelist = store.getters.languagelist;
this.qyoptions = store.getters.askvaluetype;
- this.usable = store.getters.usable;
+ this.usable = store.getters.usable;
},
methods: {
/** 鏌ヨ鎸囨爣鍒楄〃 */
@@ -832,7 +848,55 @@
this.deletefenl = row.title;
}
},
+ // 渚挎嵎鏍囩
+ tsgnameto(row) {
+ let inputValueArr = "";
+ let value = indexform.targetoptionList.length + 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 + "__"
+ );
+ this.indexform.targetoptionList.push({
+ orderno: value,
+ optiondesc: "",
+ });
+ // 鎶婃暟缁勯噸鏂拌浆鎹负瀛楃涓插苟璧嬪��
+ inputValueArr = inputValueArr.join("");
+
+ console.log(inputValueArr);
+ if (this.currentInputId == "targetdesc") {
+ this.indexform.targetdesc = inputValueArr;
+ } else {
+ return;
+ }
+ },
+ Changtype(item) {
+ console.log(item, "閫夐」鍙樻洿鐨勫鐞�");
+ if (item==3) {
+ this.$modal
+ .confirm('鏇存敼绫诲瀷涓哄~绌哄悗閫夐」灏嗘竻绌烘槸鍚︾户缁紵')
+ .then(() => {
+
+ })
+ .catch(() => {
+
+ });
+ }
+ },
// 鐤剧梾-----------------------
illnessUpdate(row) {
this.illnessVisible = true;
@@ -1391,6 +1455,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