From 6b6cc07fb81f05153fc07995e0a5be5596b5ca4f Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期一, 29 七月 2024 09:36:45 +0800
Subject: [PATCH] 测试完成

---
 src/views/repositoryai/templateku/configurat/index.vue |  177 +++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 113 insertions(+), 64 deletions(-)

diff --git a/src/views/repositoryai/templateku/configurat/index.vue b/src/views/repositoryai/templateku/configurat/index.vue
index d17d4c3..52f5ed0 100644
--- a/src/views/repositoryai/templateku/configurat/index.vue
+++ b/src/views/repositoryai/templateku/configurat/index.vue
@@ -188,6 +188,7 @@
                 @change="handleInputConfirm"
                 filterable
                 remote
+                allow-create
                 reserve-keyword
                 default-first-option
                 :remote-method="remoteMethodtag"
@@ -388,15 +389,15 @@
                 <el-table-column
                   label="鏍囬"
                   align="center"
-                  key="questiontitle"
-                  prop="questiontitle"
+                  key="scriptTopic"
+                  prop="scriptTopic"
                   :show-overflow-tooltip="true"
                 />
                 <el-table-column
                   label="闂璇濇湳"
                   align="center"
-                  key="questionText"
-                  prop="questionText"
+                  key="scriptContent"
+                  prop="scriptContent"
                   :show-overflow-tooltip="true"
                 />
 
@@ -453,7 +454,7 @@
                 </div>
                 <el-form-item label="棰樼洰鏍囬">
                   <el-input
-                    v-model="topicobj.questiontitle"
+                    v-model="topicobj.scriptTopic"
                     placeholder="璇蜂粠宸︿晶鍒楄〃閫夋嫨"
                   ></el-input>
                 </el-form-item>
@@ -535,10 +536,11 @@
                   <!-- 鏃犲尮閰嶇被鍨� -->
                   <div class="topicxq">
                     <el-row :gutter="10">
-                      <el-col :span="12"
+                      <el-col :span="20"
                         ><el-form-item label="鏃犲尮閰嶈瘽鏈�">
                           <el-input
-                            type="text"
+                            type="textarea"
+                            style="width: 400px"
                             placeholder="璇疯緭鍏�"
                             v-model="topicobj.noMatchText"
                             show-word-limit
@@ -582,10 +584,11 @@
                   </div>
                   <div class="topicxq">
                     <el-row :gutter="10">
-                      <el-col :span="12"
+                      <el-col :span="20"
                         ><el-form-item label="鍚笉娓呰瘽鏈�">
                           <el-input
-                            type="text"
+                            style="width: 400px"
+                            type="textarea"
                             placeholder="璇疯緭鍏�"
                             v-model="topicobj.noClearlyText"
                             show-word-limit
@@ -629,10 +632,11 @@
                   </div>
                   <div class="topicxq">
                     <el-row :gutter="10">
-                      <el-col :span="12"
+                      <el-col :span="20"
                         ><el-form-item label="闈欓粯璇濇湳">
                           <el-input
-                            type="text"
+                            type="textarea"
+                            style="width: 400px"
                             placeholder="璇疯緭鍏�"
                             v-model="topicobj.slienceText"
                             show-word-limit
@@ -693,18 +697,20 @@
       <div v-if="Editprogress == 3">
         <div class="leftvlue-jbxx">闅忚妯$増闂棰勮</div>
         <el-divider></el-divider>
+
         <div class="preview-left">
           <!-- 鍗曢�� -->
           <div
-            class="topic-dev"
-            v-for="(item, index) in valssu"
-            :key="item.aaa"
+            class="scriptTopic-dev"
+            v-for="item in valssu"
+            :key="item.targetid"
+            v-if="item.valueType == 1"
           >
             <div class="dev-text">
-              {{ index + 1 }}銆乕鍗曢�塢<span>{{ item.questionText }}</span>
+              {{ item.targetid }}銆乕鍗曢�塢<span>{{ item.scriptContent }}</span>
             </div>
             <div class="dev-xx">
-              <el-radio-group v-model="radio">
+              <el-radio-group v-model="item.remark">
                 <el-radio
                   v-for="(items, index) in item.ivrLibaScriptTargetoptionList"
                   :key="index"
@@ -716,35 +722,41 @@
           </div>
           <!-- 澶氶�� -->
           <div
-            class="topic-dev"
-            v-for="(item, index) in valssu"
-            :key="item.aaa"
+            class="scriptTopic-dev"
+            v-for="item in valssu"
+            :key="item.targetid"
+            v-if="item.valueType == 2"
           >
             <div class="dev-text">
-              {{ index + 1 }}銆乕澶氶�塢<span>{{ item.questionText }}</span>
+              {{ item.targetid }}銆乕澶氶�塢<span>{{ item.scriptContent }}</span>
             </div>
             <div class="dev-xx">
-              <el-checkbox-group v-model="radios">
+              <el-checkbox-group v-model="item.remark">
                 <el-checkbox
-                  v-for="(items, indexs) in item.ivrLibaScriptTargetoptionList"
-                  :key="indexs"
-                  :label="indexs"
+                  v-for="(items, index) in item.ivrLibaScriptTargetoptionList"
+                  :key="index"
+                  :label="index"
                 >
                   {{ items.targetvalue }}
                 </el-checkbox>
               </el-checkbox-group>
             </div>
           </div>
-          <!-- 濉┖
-          <div class="topic-dev" v-for="item in valssu" :key="item.aaa">
+          <!-- 濉┖ -->
+          <div
+            class="scriptTopic-dev"
+            v-for="item in valssu"
+            :key="item.targetid"
+            v-if="item.valueType == 3"
+          >
             <div class="dev-text">
-              {{ item.idd }}銆乕濉┖]<span>{{ item.wssd }}</span>
+              {{ item.targetid }}銆乕濉┖]<span>{{ item.scriptContent }}</span>
             </div>
             <div class="dev-xx">
               <el-input placeholder="璇疯緭鍏ョ瓟妗�" v-model="radioas" clearable>
               </el-input>
             </div>
-          </div> -->
+          </div>
         </div>
         <el-button type="primary" plain @click="laststep()">涓婁竴姝�</el-button>
         <el-button type="warning" @click="measurement()">鍓嶅線娴嬭瘯</el-button>
@@ -756,7 +768,7 @@
       title="娣诲姞棰樼洰"
       :visible.sync="drawer"
       custom-class="demo-drawer"
-      width="50%"
+      size="50%"
     >
       <div class="preview-left">
         <el-form
@@ -768,7 +780,7 @@
         >
           <el-form-item label="鏍囬" prop="userName">
             <el-input
-              v-model="queryParams.questiontitle"
+              v-model="queryParams.scriptTopic"
               placeholder="璇疯緭鍏�"
               clearable
               style="width: 200px"
@@ -793,15 +805,23 @@
           <el-table-column
             label="鏍囬"
             align="center"
-            key="questiontitle"
-            prop="questiontitle"
+            key="scriptTopic"
+            prop="scriptTopic"
             width="100"
           />
           <el-table-column
             label="闂璇濇湳"
             align="center"
-            key="questionText"
-            prop="questionText"
+            key="scriptContent"
+            prop="scriptContent"
+            width="200"
+            :show-overflow-tooltip="true"
+          />
+          <el-table-column
+            label="閫夐」鍐呭"
+            align="center"
+            key="targetoptions"
+            prop="targetoptions"
             width="200"
             :show-overflow-tooltip="true"
           />
@@ -820,6 +840,12 @@
             </template>
           </el-table-column>
         </el-table>
+        <pagination
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getaddtopiclist"
+        />
       </div>
     </el-drawer>
   </div>
@@ -868,9 +894,9 @@
       inputValue: "",
       inputValueillness: "",
       topicobj: {
-        noMatchText:'',
-        noClearlyText:'',
-        slienceText:'',
+        noMatchText: "",
+        noClearlyText: "",
+        slienceText: "",
       },
       total: 1,
       id: "",
@@ -990,26 +1016,31 @@
     },
     // 鑾峰彇琛ㄥ崟鏁版嵁
     getvFollowup() {
-      getvFollowup({ id: this.id }).then((res) => {
-        if (res.code == 200 && this.id) {
-          console.log(2211);
-          this.ruleForm = res.data;
-          this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
-          this.ruleForm.suitway = this.ruleForm.suitway.split(",");
-          this.ruleForm.campus = this.ruleForm.campus.split(",");
-          this.ruleForm.submoduleID = this.ruleForm.submoduleID.split(",");
-          this.ruleForm.submoduleID = this.ruleForm.submoduleID.map((res) => {
-            return Number(res);
-          });
-          console.log(this.ruleForm.submoduleID, "this.ruleForm.submoduleID鍙�");
-          this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList;
+      if (this.id) {
+        getvFollowup({ id: this.id }).then((res) => {
+          if (res.code == 200) {
+            console.log(2211);
+            this.ruleForm = res.data;
+            this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
+            this.ruleForm.suitway = this.ruleForm.suitway.split(",");
+            this.ruleForm.campus = this.ruleForm.campus.split(",");
+            this.ruleForm.submoduleID = this.ruleForm.submoduleID.split(",");
+            this.ruleForm.submoduleID = this.ruleForm.submoduleID.map((res) => {
+              return Number(res);
+            });
+            console.log(
+              this.ruleForm.submoduleID,
+              "this.ruleForm.submoduleID鍙�"
+            );
+            this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList;
 
-          this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList.map(
-            this.processElement
-          );
-          console.log(this.ruleForm.suitway);
-        }
-      });
+            this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList.map(
+              this.processElement
+            );
+            console.log(this.ruleForm.suitway);
+          }
+        });
+      }
       getillnesslist({
         pageNum: 1,
         pageSize: 100,
@@ -1030,7 +1061,9 @@
       // 鍒嗙被
       getFollowupclassify({}).then((res) => {
         this.indexAssortlist = res.rows;
-        this.ruleForm.assortid = Number(this.$route.query.assortid);
+        if (this.$route.query.assortid) {
+          this.ruleForm.assortid = Number(this.$route.query.assortid);
+        }
       });
       // 绉戝
       listDept(this.queryParams).then((response) => {
@@ -1077,8 +1110,17 @@
             return item;
           });
       });
-
+      compileFollowup(this.ruleForm).then((res) => {
+        this.$modal.msgSuccess("缂栬緫鎴愬姛");
+        this.confirmillness(res.data);
+        this.$router.go(-1);
+      });
+    },
+    confirmillness(guid) {
       this.illnesslist.forEach((item, index) => {
+        if (guid) {
+          item.outid = guid;
+        }
         if (!item.id) {
           addtargetillness(item).then((res) => {});
         }
@@ -1086,10 +1128,8 @@
       if (this.illnesslistapi.length) {
         deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
       }
-      compileFollowup(this.ruleForm).then((res) => {
-        this.$modal.msgSuccess("缂栬緫鎴愬姛");
-        this.$router.go(-1);
-      });
+      this.illnessVisible = false;
+      this.$modal.msgSuccess("缂栬緫鎴愬姛");
     },
     // 绉戝澶勭悊
     Departmenttreatment() {
@@ -1244,6 +1284,14 @@
     },
     addtopic(row) {
       console.log(row);
+      if (
+        this.ruleForm.ivrLibaTemplateScriptVOList.some(
+          (obj) => obj.scriptTopic == row.scriptTopic
+        )
+      ) {
+        this.$modal.msgError("璇ラ鐩凡瀛樺湪");
+        return;
+      }
       getverbaltrick({ id: row.id }).then((res) => {
         console.log(res, "璇︽儏");
         res.data.isoperation = 1;
@@ -1253,11 +1301,12 @@
         });
         this.ruleForm.ivrLibaTemplateScriptVOList.push(res.data);
         this.sortFn();
+        this.$modal.msgSuccess("娣诲姞鎴愬姛");
       });
     },
     handleDelete(row) {
       this.$modal
-        .confirm('鏄惁纭鍒犻櫎闂锛�"' + row.questiontitle + '"锛�')
+        .confirm('鏄惁纭鍒犻櫎闂锛�"' + row.scriptTopic + '"锛�')
         .then(() => {
           this.ruleForm.ivrLibaTemplateScriptVOList.splice(
             this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row),
@@ -1454,7 +1503,7 @@
   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);
-  .topic-dev {
+  .scriptTopic-dev {
     margin-bottom: 25px;
     font-size: 20px !important;
     .dev-text {

--
Gitblit v1.9.3