From 4dc66a6c347a4483e72892ed4195e597b9d43f8f Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期一, 29 四月 2024 15:02:28 +0800
Subject: [PATCH] 测试完成

---
 src/views/repositoryai/verbaltrick/particulars/index.vue | 1172 +++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 1,032 insertions(+), 140 deletions(-)

diff --git a/src/views/repositoryai/verbaltrick/particulars/index.vue b/src/views/repositoryai/verbaltrick/particulars/index.vue
index f072168..8e0978c 100644
--- a/src/views/repositoryai/verbaltrick/particulars/index.vue
+++ b/src/views/repositoryai/verbaltrick/particulars/index.vue
@@ -1,182 +1,1074 @@
 <template>
-  <div>
-    <div class="basic">鍩烘湰淇℃伅</div>
-    <div class="top-text">
-      <div class="substance">
-        <p>璇濇湳涓绘棬锛�<span>鏈夋棤澶嶆煡</span></p>
-        <p>闂鏂囨湰锛�<span>鏈夋棤澶嶆煡</span></p>
-        <p>鎸囨爣绉嶇被锛�<span>鏈夋棤澶嶆煡</span></p>
-        <p>
-          鎸囨爣閫夐」锛�<span>{{ optionvalue }}</span>
-        </p>
+  <div class="Questionnairemanagement">
+    <!-- 宸︿晶鏍� -->
+    <div class="sidecolumn">
+      <div>
+        <el-steps finish-status="success" :active="Editprogress" simple>
+          <el-step>
+            <template slot="title">
+              <span style="cursor: pointer" @click="Editprogress = 1"
+                >闂搴撶紪杈�</span
+              >
+            </template>
+          </el-step>
+          <el-step>
+            <template slot="title">
+              <span style="cursor: pointer" @click="nextstep"
+                >闂鎸囨爣缂栬緫</span
+              >
+            </template>
+          </el-step>
+        </el-steps>
       </div>
     </div>
-    <div class="headline">
-      <div class="basics">闂閰嶇疆</div>
-      <div class="headbottom">
-        <el-button
-          type="primary"
-          icon="el-icon-circle-plus-outline"
-          @click="addzbiao"
-          >娣诲姞鎸囨爣</el-button
+    <!-- 鍙充晶鏁版嵁 -->
+    <div class="leftvlue">
+      <!-- 鍩烘湰淇℃伅 -->
+      <div v-if="Editprogress == 1">
+        <div class="leftvlue-jbxx">鍩烘湰淇℃伅</div>
+        <el-divider></el-divider>
+        <el-form
+          ref="form"
+          :model="indexform"
+          :rules="rules"
+          label-width="100px"
         >
-        <el-button type="primary" icon="el-icon-s-claim">淇濆瓨</el-button>
-        <el-button type="primary" icon="el-icon-document"
-          >鏇存柊鎸囨爣瑙勫垯鑷虫ā鐗�</el-button
-        >
-      </div>
-    </div>
-    <div class="valuetop" v-for="(item, index) in deployList" :key="item.id">
-      <div class="val-text">
-        <div>
-          鏈夋棤澶嶆煡 <span>{{ item.name }}</span>
-        </div>
-        <div class="text-icon" @click="deletei(index)">
-          <i class="el-icon-delete" />
-        </div>
-      </div>
-      <div class="val-bon">
-        <el-form ref="form" :model="form" label-width="80px">
-          <el-form-item label="鎸囨爣绫诲瀷">
-            <el-radio-group v-model="form.resource">
-              <el-radio label="閫夐」"></el-radio>
-              <el-radio label="鏂囨湰"></el-radio>
-              <el-radio label="鏁扮粍"></el-radio>
-            </el-radio-group>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="璇█" prop="deptId">
+                <el-select
+                  v-model="indexform.language"
+                  placeholder="璇烽�夋嫨璇█"
+                >
+                  <el-option
+                    v-for="index in languagelist"
+                    :key="index.value"
+                    :label="index.label"
+                    :value="index.value"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="鍙敤鐘舵��" prop="status">
+                <el-select
+                  v-model="indexform.isAvailable"
+                  placeholder="璇烽�夋嫨鐘舵��"
+                >
+                  <el-option
+                    v-for="item in usable"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="闂鍒嗙被" prop="status">
+                <el-select
+                  v-model="indexform.assortid"
+                  filterable
+                  placeholder="璇烽�夋嫨鍒嗙被"
+                >
+                  <el-option-group
+                    v-for="group in questionclass"
+                    :key="group.id"
+                    :label="group.indexAssortName"
+                  >
+                    <el-option
+                      v-for="item in group.ivrLibaScriptAssortList"
+                      :key="item.id"
+                      :label="item.indexAssortName"
+                      :value="item.id"
+                    >
+                    </el-option>
+                  </el-option-group>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="5">
+              <el-form-item label="鐗堟湰鍙�" prop="version">
+                <el-input
+                  v-model="indexform.version"
+                  placeholder="璇疯緭鍏�"
+                  maxlength="80"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="20">
+              <el-form-item label="闂涓绘棬" prop="questiontitle">
+                <el-input
+                  v-model="indexform.questiontitle"
+                  placeholder="璇疯緭鍏ラ棶棰樹富鏃�"
+                  maxlength="80"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-form-item label="鏍囩" prop="desc">
+            <div class="xinz-inf">
+              <el-tag
+                :key="tag.tagname"
+                type="success"
+                v-for="tag in dynamicTags"
+                closable
+                :disable-transitions="false"
+                @close="handleClosetag(tag)"
+              >
+                {{ tag.tagname }}
+              </el-tag>
+              <el-select
+                v-model="inputValue"
+                v-if="inputVisible"
+                @change="handleInputConfirm"
+                filterable
+                remote
+                reserve-keyword
+                default-first-option
+                :remote-method="remoteMethodtag"
+                :loading="loading"
+                placeholder="璇烽�夋嫨"
+              >
+                <el-option
+                  v-for="item in optionstag"
+                  :key="item.tagid"
+                  :label="item.tagname"
+                  :value="item.tagname"
+                >
+                </el-option>
+              </el-select>
+              <el-button
+                v-else
+                class="button-new-tag"
+                size="small"
+                @click="showInput"
+                >+ 鏂板鏍囩</el-button
+              >
+            </div>
           </el-form-item>
-          <el-form-item label="鎸囨爣鍚嶇О">
-            <el-input v-model="form.name"></el-input>
+          <el-form-item label="閫氱煡鍙橀噺" prop="name">
+            <div style="margin-bottom: 5px" v-for="item in variablelist">
+              <el-row>
+                <el-col :span="5">
+                  <el-input
+                    v-model="item.variatename"
+                    placeholder="璇疯緭鍏ュ彉閲忓悕"
+                  ></el-input>
+                </el-col>
+                <el-col :span="8" :offset="1">
+                  <el-input
+                    v-model="item.variate"
+                    placeholder="璇疯緭鍏ュ彉閲忓唴瀹�"
+                  ></el-input>
+                </el-col>
+                <el-col :span="8" :offset="1">
+                  <el-button
+                    type="success"
+                    icon="el-icon-plus"
+                    circle
+                    @click="addvariable(item)"
+                  ></el-button>
+                  <el-button
+                    v-if="!item.default"
+                    type="danger"
+                    icon="el-icon-delete"
+                    circle
+                    @click="delvariable(item)"
+                  ></el-button>
+                </el-col>
+              </el-row>
+            </div>
           </el-form-item>
-          <el-form-item label="鎸囨爣鍊�">
-            <el-input v-model="item.name"></el-input>
-          </el-form-item>
-          <el-form-item label="鐗规畩璧勬簮">
-            <el-radio-group v-model="form.resource">
-              <el-radio label="鍩虹"></el-radio>
-              <el-radio label="鑷畾涔�"></el-radio>
-            </el-radio-group>
-          </el-form-item>
-          <el-form-item label="鍩虹瑙勫垯">
-            <el-input type="textarea" v-model="item.valuetop"></el-input>
-          </el-form-item>
+
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="浠呴檺闄㈠尯" prop="region">
+                <el-select
+                  v-model="indexform.campus"
+                  size="medium"
+                  filterable
+                  placeholder="璇烽�夋嫨"
+                >
+                  <el-option
+                    class="indexformaa"
+                    v-for="item in courtyardlist"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="閫傜敤鏂瑰紡" prop="status">
+                <el-select
+                  v-model="indexform.suitway"
+                  multiple
+                  placeholder="璇烽�夋嫨"
+                >
+                  <el-option
+                    v-for="item in mode"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="鍏宠仈鎸囨爣" prop="region">
+                <el-select
+                  v-model="indexform.targetid"
+                  filterable
+                  remote
+                  reserve-keyword
+                  placeholder="璇疯緭鍏ュ叧閿瘝"
+                  :remote-method="remoteMethod"
+                  @change="targetchange"
+                  :loading="loading"
+                >
+                  <el-option
+                    v-for="item in targetlist"
+                    :key="item.id"
+                    :label="item.targetname"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="24">
+              <div
+                style="display: flex; margin-left: 100px; margin-bottom: 10px"
+              >
+                <div
+                  v-for="item in variablelist"
+                  class="tsgname"
+                  @click="tsgnameto(item)"
+                >
+                  {{ item.variatename }}
+                </div>
+              </div>
+            </el-col></el-row
+          >
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="闂鏂囨湰" prop="questionText">
+                <el-input
+                :rows="2"
+                  type="textarea"
+                  id="questionText"
+                  show-word-limit
+                  placeholder="璇疯緭鍏ュ唴瀹�"
+                  v-model.sync="indexform.questionText"
+                  @focus="handleInput('questionText')"
+                />
+              </el-form-item> </el-col
+          ></el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="闂璇煶" prop="verbaltrickyy">
+                <el-upload
+                  class="upload-demo"
+                  action="https://jsonplaceholder.typicode.com/posts/"
+                  :on-change="handleChange"
+                  :file-list="fileList"
+                  :limit="1"
+                  :on-exceed="handleExceed"
+                >
+                  <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+                </el-upload>
+                <!-- <el-input v-model="indexform.userName" maxlength="66"
+                  show-word-limit /> -->
+              </el-form-item>
+            </el-col></el-row
+          >
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="鏃犲尮閰嶆枃鏈�" prop="noMatchText">
+                <el-input
+                  type="textarea"
+                  :rows="2"
+                  id="noMatchText"
+                  placeholder="璇疯緭鍏ュ唴瀹�"
+                  v-model.sync="indexform.noMatchText"
+                  @focus="handleInput('noMatchText')"
+                  show-word-limit
+                />
+              </el-form-item> </el-col
+          ></el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="鏃犲尮閰嶈闊�" prop="matchyy">
+                <el-upload
+                  class="upload-demo"
+                  action="https://jsonplaceholder.typicode.com/posts/"
+                  :on-change="handleChange"
+                  :file-list="fileList"
+                  :limit="1"
+                  :on-exceed="handleExceed"
+                >
+                  <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+                </el-upload>
+              </el-form-item>
+            </el-col></el-row
+          >
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="鏃犲0鏂囨湰" prop="slienceText">
+                <el-input
+                  type="textarea"
+                  :rows="2"
+                  id="slienceText"
+                  placeholder="璇疯緭鍏ュ唴瀹�"
+                  v-model.sync="indexform.slienceText"
+                  @focus="handleInput('slienceText')"
+                  show-word-limit
+                />
+              </el-form-item> </el-col
+          ></el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="鏃犲0璇煶" prop="silentyy">
+                <el-upload
+                  class="upload-demo"
+                  action="https://jsonplaceholder.typicode.com/posts/"
+                  :on-change="handleChange"
+                  :file-list="fileList"
+                  :limit="1"
+                  :on-exceed="handleExceed"
+                >
+                  <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+                </el-upload>
+              </el-form-item>
+            </el-col></el-row
+          >
+
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="鍚笉娓呮枃鏈�" prop="noClearlyText">
+                <el-input
+                  type="textarea"
+                  id="noClearlyText"
+                  :rows="2"
+                  placeholder="璇疯緭鍏ュ唴瀹�"
+                  @focus="handleInput('noClearlyText')" 
+                  v-model.sync="indexform.noClearlyText"
+                  show-word-limit
+                />
+              </el-form-item> </el-col
+          ></el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="鍚笉娓呰闊�" prop="vagueyy">
+                <el-upload
+                  class="upload-demo"
+                  action="https://jsonplaceholder.typicode.com/posts/"
+                  :on-change="handleChange"
+                  :file-list="fileList"
+                  :limit="1"
+                  :on-exceed="handleExceed"
+                >
+                  <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+                </el-upload>
+              </el-form-item>
+            </el-col></el-row
+          >
         </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="nextstep">涓嬩竴姝�</el-button>
+          <el-button @click="closeFm">鍏� 闂�</el-button>
+          <el-button @click="Saveproblem()">淇濆瓨鏁版嵁</el-button>
+        </div>
+      </div>
+      <!-- 鎸囨爣璁剧疆 -->
+      <div v-if="Editprogress == 2">
+        <div class="leftvlue-jbxx">鎸囨爣棰樼洰璁剧疆</div>
+        <el-divider></el-divider>
+        <el-form
+          ref="form"
+          :model="indexform"
+          :rules="rules"
+          label-width="100px"
+        >
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="鎸囨爣鍚嶇О" prop="deptId">
+                <el-input
+                  v-model="indexform.targetname"
+                  placeholder="璇疯緭鍏ユ寚鏍囧悕绉�"
+                  maxlength="40"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="鍊肩被鍨�">
+                <el-radio-group v-model="indexform.valueType">
+                  <el-radio :label="1">閫夐」</el-radio>
+                  <el-radio :label="2">鏂囨湰</el-radio>
+                  <el-radio :label="3">鏁板��</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col></el-row
+          >
+          <div v-if="indexform.valueType == 1">
+            <el-card class="box-card" style="margin-bottom: 20px">
+              <Regular
+                :TargetoptionList="indexform.ivrLibaScriptTargetoptionList"
+                @addoption="addoption"
+                @deloption="deloption"
+                @syioption="syioption"
+                @xiayioption="xiayioption"
+              />
+            </el-card>
+            <el-row :gutter="20">
+              <el-col :span="12">
+                <el-form-item label="娴嬭瘯杈撳叆" prop="targetvalue">
+                  <el-input
+                    v-model="testvalue"
+                    placeholder="璇疯緭鍏ユ祴璇曞唴瀹�"
+                    maxlength="40"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="4">
+                <el-button type="success">寮�濮嬫祴璇�</el-button>
+              </el-col>
+            </el-row>
+            <div style="margin-bottom: 20px">
+              <el-input
+                type="textarea"
+                :rows="4"
+                placeholder="姝ゅ灞曠ず璇嗗埆缁撴灉"
+                v-model="testgovalue"
+              >
+              </el-input>
+            </div>
+          </div>
+          <div style="margin-bottom: 20px" v-else>
+            <el-input
+              type="textarea"
+              :rows="4"
+              placeholder="姝ゅ灞曠ず鏀堕泦淇℃伅"
+              v-model="testgovalue"
+            >
+            </el-input>
+          </div>
+        </el-form>
+
+        <el-button type="primary" @click="laststep()">涓婁竴姝�</el-button>
+        <el-button type="info" @click="closeFm()">鍏抽棴</el-button>
+        <el-button @click="Saveproblem()">淇濆瓨鏁版嵁</el-button>
       </div>
     </div>
   </div>
 </template>
 
 <script>
+import { listtag } from "@/api/system/label";
+import {
+  getverbaltricklist,
+  verbaltrickinfo,
+  delverbaltrickinfo,
+  compileverbaltrick,
+  getverbaltrick,
+  getbaltrickclassify,
+  gettargetInfolist,
+  gettargetInfo,
+} from "@/api/AiCentre/index";
+import Regular from "@/components/Regular"; //姝e垯缁勪欢
+import store from "@/store";
+
 export default {
+  name: "Verbalproblem",
+  components: { Regular },
   data() {
     return {
-      optionvalue: "涓嶉渶瑕併�佹病鏈夈�佷笉鐭ラ亾",
-      form: {
-        name: "",
-        region: "",
-        date1: "",
-        date2: "",
-        delivery: false,
-        type: [],
-        resource: "",
-        desc: "",
+      Editprogress: 1, //缂栬緫杩涘害
+      loading: false, // 閬僵灞�
+      radio: "false", //鍗曢�夐閫変腑
+      radios: [], //澶氶�夐閫変腑
+      radioas: "", //濉┖棰樼瓟妗�
+      dynamicTags: [],
+      dellist: [],
+      inputVisible: false,
+      inputValue: "",
+      testvalue: "",
+      testgovalue: "",
+      topicobj: {},
+      indexform: {
+        ivrLibaScriptTargetoptionList: [],
+        ivrLibaScriptTagList: [],
       },
-      deployList: [
+      mode: [],
+      questionclass: [],
+      currentInputId: "",
+      courtyardlist: [],
+      // 鎬绘潯鏁�
+      total: 1,
+
+      targetlist: [
         {
-          id: 1,
-          name: "鏈�",
-          valuetop:
-            "(?!.*蹇榺.*涓峾.*娌�)^.*(鏄瘄鏈墊瀵箌鍋殀浣渱妫�|鏌澶嶈瘖|濂絴鍙傚姞|澶嶈瘖|鍘�(杩噟濂絴浜唡瀹寍鍖婚櫌)|鏉�(杩噟浜唡鍖婚櫌))|娌¢敊|瀵瑰憖|鍙兘|(宸茬粡|鏃�)鍘讳簡|寮�浜嗚嵂|鑵板甫|鍚婂甫|瑕佺殑|(?<!娌�)鏈夌殑|琛ㄥ甫,10;瑕�,5",
-        },
-        {
-          id: 2,
-          name: "涓嶇煡閬�",
-          valuetop:
-            "(涓峾娌璋亅楝紎鎬庝箞).*(鐥厊鍙兘|鐭ラ亾|浜嗚В|娓呮|鎳倈鏄庣櫧|纭|纭畾|鏅撳緱|鐭ユ檽|璁ゅ緱|璇嗗緱|鍗拌薄|鐔熸倝|璁皘浼殀鍏冲績|鍏虫敞|娉ㄦ剰|鍛婅瘔|閫氱煡|鍚�)",
+          value: "閫夐」1",
+          label: "鍥炬枃",
         },
       ],
+      rules: {},
+      rulesa: {},
+      optionstag: [],
+
+      fileList: [
+        {
+          name: "food.jpeg",
+          url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
+        },
+      ],
+      usable: [],
+      options: [],
+      variablelist: [
+        { variatename: "濮撳悕", variate: "${name}", default: 1 },
+        { variatename: "鐢佃瘽", variate: "${phone}", default: 1 },
+        { variatename: "鐥呮儏", variate: "${illness}", default: 1 },
+      ],
+
+      addvalue: "娣诲姞棰樼洰",
+      languagelist: [], //璇█鍒楄〃
+      // 鏌ヨ鍙傛暟
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        userName: undefined,
+        phonenumber: undefined,
+        status: undefined,
+        deptId: undefined,
+        IDnumber: undefined,
+      },
     };
   },
 
-  created() {},
+  created() {
+    this.gettabList();
+    this.getverbaltrick();
+    this.mode = store.getters.mode;
+    this.valuetype = store.getters.valuetype;
+    this.languagelist = store.getters.languagelist;
+    this.usable = store.getters.usable;
+    this.courtyardlist = store.getters.courtyardlist;
+  },
 
   methods: {
-    onSubmit() {
-      console.log("submit!");
-    },
-    deletei(index) {
-      console.log(index);
-      this.deployList.splice(index, 1);
-    },
-    addzbiao() {
-      const ids = this.deployList.length + 1;
-      console.log(ids);
-      this.deployList.push({
-        id: ids,
-        name: "",
-        valuetop: "",
+    // 鑾峰彇璇︽儏鏁版嵁
+    getverbaltrick() {
+      let id = this.$route.query.id;
+      if (id) {
+        getverbaltrick({ id: id }).then((res) => {
+          this.indexform = res.data;
+          if (this.indexform.suitway)
+            this.indexform.suitway = this.indexform.suitway.split(",");
+          this.indexform.assortid = parseInt(this.indexform.assortid);
+          this.variablelist = JSON.parse(this.indexform.otherdata).length
+            ? JSON.parse(this.indexform.otherdata)
+            : this.variablelist;
+          this.dynamicTags = this.indexform.ivrLibaScriptTagList.map(
+            this.processElement
+          );
+
+          // this.targetlist = [
+          //   {
+          //     id: this.indexform.targetid,
+          //     targetname: this.indexform.targetname,
+          //   },
+          // ];
+        });
+      }
+      gettargetInfolist({ pageSize: 100, pageNum: 1 }).then((res) => {
+        this.targetlist = res.rows;
       });
+      // 鏍�
+      getbaltrickclassify({}).then((res) => {
+        this.questionclass = res.rows;
+        console.log(res);
+      });
+    },
+
+    // 淇濆瓨璇︾粏淇℃伅
+    Saveproblem() {
+      this.indexform.otherdata = JSON.stringify(this.variablelist);
+      if (this.indexform.suitway) {
+        this.indexform.suitway = this.indexform.suitway.join(",");
+      }
+
+      if (this.indexform.id) {
+        this.indexform.ivrLibaScriptTargetoptionList =
+          this.indexform.ivrLibaScriptTargetoptionList.map((res) => {
+            if (res.isoperation != 1) {
+              res.isoperation = 2;
+            }
+            return res;
+          });
+
+        this.indexform.isoperation = 2;
+        console.log(this.dellist);
+        this.indexform.ivrLibaScriptTargetoptionList =
+          this.indexform.ivrLibaScriptTargetoptionList.concat(this.dellist);
+        compileverbaltrick(this.indexform).then((res) => {
+          if (res.code == 200) {
+            this.$modal.msgSuccess("淇敼鎴愬姛");
+            this.$router.go(-1);
+          } else {
+            this.$message({
+              message: "淇敼澶辫触",
+              type: "error",
+            });
+          }
+        });
+      } else {
+        this.indexform.isoperation = 1;
+
+        compileverbaltrick(this.indexform).then((res) => {
+          if (res.code == 200) {
+            this.$modal.msgSuccess("鏂板鎴愬姛");
+            this.$router.go(-1);
+          } else {
+            this.$message({
+              message: "鏂板澶辫触",
+              type: "error",
+            });
+          }
+        });
+      }
+    },
+    remoteMethod(query) {
+      if (query !== "") {
+        this.loading = true;
+        setTimeout(() => {
+          this.loading = false;
+          gettargetInfolist({ targetname: query }).then((res) => {
+            this.targetlist = res.rows;
+          });
+        }, 200);
+      } else {
+        this.targetlist = [];
+      }
+    },
+    targetchange(res) {
+      console.log(res);
+      gettargetInfo({ id: res }).then((res) => {
+        console.log(res.rows[0]);
+        this.$modal
+          .confirm('鏄惁娣诲姞"' + res.rows[0].targetname + '"鎸囨爣鐨勯�夐」锛�')
+          .then(() => {
+            this.indexform.valueType = res.rows[0].valueType;
+            this.indexform.questiontitle = res.rows[0].targetname;
+            this.indexform.targetname = res.rows[0].targetname;
+            this.indexform.questionText = res.rows[0].targetdesc;
+            this.indexform.isAvailable = "0";
+            this.indexform.language = "鏅�氳瘽";
+            this.indexform.isenable = res.rows[0].isenable;
+            this.$forceUpdate()
+            res.rows[0].targetoptionList.forEach((item) => {
+              item.isoperation = 1;
+              this.indexform.ivrLibaScriptTargetoptionList.push(item);
+            });
+          })
+          .catch(() => {
+            this.$modal.msgSuccess("宸插彇娑�");
+          });
+      });
+    },
+
+    // 涓嬩竴姝�
+    nextstep() {
+      if (this.Editprogress <= 1) {
+        // if (this.indexform.targetid) {
+        return this.Editprogress++;
+        // } else {
+        //   this.$message.warning("璇峰厛閫夋嫨鍏宠仈鎸囨爣");
+        // }
+      } else {
+      }
+    },
+    // 涓婁竴姝�
+    laststep() {
+      this.Editprogress = this.Editprogress - 1;
+    },
+    // 鍏抽棴
+    closeFm() {
+      this.$confirm("閫�鍑轰笉浼氫繚鐣欓〉闈㈠唴瀹规洿鏀�, 鏄惁缁х画?", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(() => {
+          this.$router.go(-1);
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "宸插彇娑�",
+          });
+        });
+    },
+    // 鏂囦欢----------------------
+    // 鎺у埗鏂囦欢
+    handleChange(file, fileList) {
+      this.fileList = fileList.slice(-3);
+    },
+    // 鏂囦欢瓒呭嚭涓暟闄愬埗鏃剁殑閽╁瓙
+    handleExceed(files, fileList) {
+      this.$message.warning(
+        `褰撳墠闄愬埗閫夋嫨 1 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠讹紝鍏遍�夋嫨浜� ${
+          files.length + fileList.length
+        } 涓枃浠禶
+      );
+    },
+    // 鏍囩-----------------
+    gettabList() {
+      const tagqueryParams = {
+        pageNum: 1,
+        pageSize: 1000,
+        tagcategoryid: "0",
+      };
+      listtag(tagqueryParams).then((response) => {
+        console.log(response);
+        this.optionstag = response.rows;
+      });
+    },
+    handleClosetag(tag) {
+      console.log(tag);
+      console.log(this.dynamicTags.indexOf(tag));
+      const lindex = this.dynamicTags.indexOf(tag);
+      this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
+      this.indexform.ivrLibaScriptTagList[lindex].isoperation = 3;
+    },
+    handleInputConfirm() {
+      let tagvalue = {};
+      let tagname = this.inputValue;
+      if (tagname) {
+        listtag({
+          pageNum: 1,
+          pageSize: 1000,
+          tagcategoryid: "0",
+          tagname: tagname,
+        }).then((res) => {
+          if (res.rows[0]) {
+            tagvalue = res.rows[0];
+            tagvalue.isoperation = 1;
+          } else {
+            tagvalue = {
+              tagname: tagname,
+              isoperation: 1,
+            };
+          }
+          this.indexform.ivrLibaScriptTagList.push(tagvalue);
+          this.dynamicTags.push(tagvalue);
+        });
+      }
+      this.inputVisible = false;
+      this.inputValue = "";
+    },
+    remoteMethodtag(query) {
+      if (query !== "") {
+        this.loading = true;
+        setTimeout(() => {
+          this.loading = false;
+          listtag({ tagname: query, tagcategoryid: "0" }).then((res) => {
+            this.optionstag = res.rows;
+          });
+        }, 200);
+      } else {
+        this.optionstag = [];
+      }
+    },
+    showInput() {
+      this.inputVisible = true;
+    },
+    //娴嬭瘯琛ㄥ崟 --------------------------
+    gettagerlist() {
+      gettagerlist({ targetname: this.targetname }).then((response) => {
+        console.log(response);
+        this.optionstag = response.rows;
+      });
+    },
+    addoption() {
+      this.indexform.ivrLibaScriptTargetoptionList.push({
+        guid: 1,
+        isoperation: 1,
+        targetvalue: "",
+        targetregex: "",
+        targetregex2: "",
+        dynamiccruxs: [],
+        nodynamiccruxs: [],
+        dynamiccruxsJson: "",
+        nodynamiccruxsJson: "",
+      });
+      this.sortFn();
+    },
+    deloption(item) {
+      const index = this.indexform.ivrLibaScriptTargetoptionList.indexOf(item);
+      if (index !== -1) {
+        if (item.id) {
+          console.log(item, "chunz");
+          item.isoperation = 3;
+          this.dellist.push(item);
+        }
+        console.log(this.dellist, "dellist");
+        this.indexform.ivrLibaScriptTargetoptionList.splice(index, 1); // 浠庣储寮曚綅缃垹闄や竴涓厓绱�
+        this.sortFn();
+      } else {
+        console.log("鏈壘鍒拌瀵硅薄");
+      }
+    },
+    getIndexInArray(arr, obj) {
+      return arr.indexOf(obj);
+    },
+    processElement(element) {
+      return { ...element, isoperation: 1 };
+    },
+    syioption(row) {
+      const index = this.getIndexInArray(
+        this.indexform.ivrLibaScriptTargetoptionList,
+        row
+      );
+      const item = this.indexform.ivrLibaScriptTargetoptionList.splice(
+        index,
+        1
+      )[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓�
+      this.indexform.ivrLibaScriptTargetoptionList.splice(index - 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣�
+      this.sortFn();
+    },
+    xiayioption(row) {
+      const index = this.getIndexInArray(
+        this.indexform.ivrLibaScriptTargetoptionList,
+        row
+      );
+      const item = this.indexform.ivrLibaScriptTargetoptionList.splice(
+        index,
+        1
+      )[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓�
+      this.indexform.ivrLibaScriptTargetoptionList.splice(index + 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣�
+      this.sortFn();
+    },
+    sortFn() {
+      this.indexform.ivrLibaScriptTargetoptionList =
+        this.indexform.ivrLibaScriptTargetoptionList.map((item, index) => {
+          return {
+            guid: index + 1,
+            targetvalue: item.targetvalue,
+            targetregex2: item.targetregex2,
+            targetregex: item.targetregex,
+            id: item.id,
+            targettype: this.indexform.targettype,
+            isoperation: item.id ? 2 : 1,
+            categoryName: item.categoryName,
+            language: item.language,
+            dynamiccruxs: item.dynamiccruxs,
+            nodynamiccruxs: item.nodynamiccruxs,
+            dynamiccruxsJson: item.dynamiccruxsJson,
+            nodynamiccruxsJson: item.nodynamiccruxsJson,
+          };
+        });
+      console.log(this.indexform.ivrLibaScriptTargetoptionList);
+    },
+    // ---------------------
+    // 渚挎嵎鏍囩
+    tsgnameto(row) {
+      let inputValueArr = "";
+      let el = document.querySelector("#" + this.currentInputId);
+      //el.selectionStart; 杩欏氨鏄綋鍓嶅厜鏍囨墍鍦ㄧ殑浣嶇疆锛堝瓧绗︿覆涓瓧绗︾殑index锛�
+      if (this.currentInputId == "questionText") {
+        inputValueArr = this.indexform.questionText.split("");
+      } else if (this.currentInputId == "noMatchText") {
+        inputValueArr = this.indexform.noMatchText.split("");
+      } else if (this.currentInputId == "slienceText") {
+        inputValueArr = this.indexform.slienceText.split("");
+      } else if (this.currentInputId == "noClearlyText") {
+        inputValueArr = this.indexform.noClearlyText.split("");
+      } else if (this.currentInputId == "submoduletext") {
+        inputValueArr = this.indexform.submoduletext.split("");
+      } else {
+        return;
+      }
+      //灏嗚緭鍏ユ鍐呭鍒囨垚鏁扮粍锛屾柟渚垮悗缁搷浣�
+      // inputValueArr = this.inputValue.split("");
+      // 鎷垮埌閫変腑鏂囧瓧鐨勯暱搴︼紙鍚庣画鍙互鐢ㄦ潵鏇挎崲閫変腑鐨勬枃瀛楋級
+      let selectLength = el.selectionEnd - el.selectionStart;
+      // 灏嗚鎻掑叆/鏇挎崲鐨勬枃瀛楁彃鍏�/鏇挎崲锛坴alue.name鏄鎻掑叆/鏇挎崲鐨勫瓧绗︿覆锛�
+      inputValueArr.splice(el.selectionStart, selectLength, `${row.variate}`);
+      // 鎶婃暟缁勯噸鏂拌浆鎹负瀛楃涓插苟璧嬪��
+      inputValueArr = inputValueArr.join("");
+      console.log(inputValueArr);
+      if (this.currentInputId == "questionText") {
+        this.indexform.questionText = inputValueArr;
+      } else if (this.currentInputId == "noMatchText") {
+        this.indexform.noMatchText = inputValueArr;
+      } else if (this.currentInputId == "slienceText") {
+        this.indexform.slienceText = inputValueArr;
+      } else if (this.currentInputId == "noClearlyText") {
+        this.indexform.noClearlyText = inputValueArr;
+      } else if (this.currentInputId == "submoduletext") {
+        this.indexform.submoduletext = inputValueArr;
+      } else {
+        return;
+      }
+    },
+
+    // 鏂板鍙橀噺
+    addvariable() {
+      this.variablelist.push({
+        variatename: "",
+        variate: "",
+      });
+    },
+    // 鍒犻櫎鍙橀噺
+    delvariable(item) {
+      const index = this.variablelist.indexOf(item);
+      if (index !== -1) {
+        this.variablelist.splice(index, 1); // 浠庣储寮曚綅缃垹闄や竴涓厓绱�
+      } else {
+        console.log("鏈壘鍒拌瀵硅薄");
+      }
+    },
+    // 杈撳叆鑾峰彇id
+    handleInput(id) {
+      this.currentInputId = id;
+      console.log("杈撳叆妗嗙殑鍊煎凡鏇存柊:", this.currentInputId);
+      // 鍦ㄨ繖閲屾墽琛屾洿鏂版暟鎹殑閫昏緫
     },
   },
 };
 </script>
 
 <style lang="scss" scoped>
-.top-text {
-  margin: 15px;
-  margin-top: 0;
-  padding: 0 30px 30px 30px;
-  background: #f2f5fc;
+.Questionnairemanagement {
+  // display: flex;
+}
+.sidecolumn {
+  margin: 20px;
+  margin-bottom: 0;
+  padding: 20px;
+  background: #edf1f7;
   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);
 }
-.basic {
-  height: 50px;
-  margin: 15px;
-  margin-bottom: 0;
-  padding: 0 20px 20px 20px;
-  line-height: 50px;
-  background: #cdcdce;
+.leftvlue {
+  margin: 20px;
+  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);
+
+  .leftvlue-jbxx {
+    font-size: 24px;
+    border-left: 5px solid #41a1be;
+    padding-left: 5px;
+    margin: 15px 0;
+  }
 }
-.headline {
+.xinz-inf {
+  font-size: 18px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+
+  line-height: 48px;
+
+  .el-tag + .el-tag {
+    margin-left: 10px;
+  }
+  .button-new-tag {
+    margin-left: 10px;
+    height: 32px;
+    line-height: 30px;
+    padding-top: 0;
+    padding-bottom: 0;
+  }
+  .input-new-tag {
+    width: 90px;
+    margin-left: 10px;
+    vertical-align: bottom;
+  }
+}
+.button-new-tag {
+  margin-left: 10px;
+  height: 32px;
+  line-height: 30px;
+  padding-top: 0;
+  padding-bottom: 0;
+}
+.tsgname {
+  width: 90px;
+  margin-right: 10px;
+  text-align: center;
+  cursor: pointer;
+  height: 40px;
+  line-height: 40px;
+  background: #7799fa;
+  color: #ffff;
+  font-size: 18px;
+  border-radius: 5px;
+}
+.tsgname:hover {
+  background: #3366f5;
+}
+
+::v-deep .addtopic-input {
+  input {
+    background: #02a7f0;
+    color: #edf1f7;
+    width: 150px;
+  }
+}
+::v-deep.el-step.is-vertical .el-step__title {
+  font-size: 25px;
+}
+::v-deep.el-input--medium {
+  font-size: 18px !important;
+}
+
+.el-select__tags {
+  font-size: 20px;
+  max-width: 888px !important;
+}
+::v-deep.el-radio__inner {
+  width: 22px;
+  height: 22px;
+}
+// ::v-deep.topic-dev.el-radio__label {
+//   font-size: 24px;
+// }
+::v-deep.el-radio-group {
+  span {
+    font-size: 24px;
+  }
+}
+::v-deep.upload-demo {
   display: flex;
-  height: 50px;
-  margin: 15px;
-  margin-bottom: 0;
-  padding: 0 20px 20px 20px;
-  line-height: 50px;
-  background: #cdcdce;
-  justify-content: space-between;
 }
-.valuetop {
-  .val-text {
-    display: flex;
-    height: 50px;
-    margin: 15px;
-    margin-bottom: 0;
-    // padding: 0 20px 20px 20px;
-    padding: 0 20px;
-    align-items: center;
-    background: #cdcdce;
-    justify-content: space-between;
-    .text-icon {
-      width: 35px;
-      height: 35px;
-      line-height: 35px;
-      text-align: center;
-      background: #fafafa;
-      cursor: pointer;
-      border-radius: 5px;
-    }
-  }
-  .val-bon {
-    margin: 15px;
-    margin-top: 0;
-    padding: 30px;
-    background: #f2f5fc;
-    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);
+::v-deep.el-checkbox-group {
+  span {
+    font-size: 24px;
   }
 }
+// ::v-deep.el-form-item--medium .el-form-item__content {
+//   line-height: 36px;
+//   display: flex;
+// }
 </style>

--
Gitblit v1.9.3