From 76c30727c77065c808b1c0fb3146080e423e5fe6 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期四, 27 六月 2024 09:45:30 +0800
Subject: [PATCH] 测试完成

---
 src/views/repositoryai/templateku/configurat/index.vue |  227 ++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 136 insertions(+), 91 deletions(-)

diff --git a/src/views/repositoryai/templateku/configurat/index.vue b/src/views/repositoryai/templateku/configurat/index.vue
index 2d92d79..ad39da7 100644
--- a/src/views/repositoryai/templateku/configurat/index.vue
+++ b/src/views/repositoryai/templateku/configurat/index.vue
@@ -311,7 +311,6 @@
               <el-form-item label="闅忚鍓嶅鐞�" prop="name">
                 <el-input
                   type="textarea"
-                  maxlength="66"
                   show-word-limit
                   v-model="ruleForm.revisitBefore"
                 ></el-input></el-form-item
@@ -320,7 +319,6 @@
               <el-form-item label="闅忚鍚庡鐞�" prop="region">
                 <el-input
                   type="textarea"
-                  maxlength="66"
                   show-word-limit
                   v-model="ruleForm.revisitAfter"
                 ></el-input> </el-form-item
@@ -353,8 +351,10 @@
               >涓嬩竴姝�</el-button
             >
             <el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
-            <el-button type="success" @click="Departmenttreatment('ruleForm')"
-              >淇濆瓨闅忚妯$増鍩虹淇℃伅</el-button
+            <el-button
+              type="success"
+              @click="Departmenttreatment('ruleForm')"
+              >{{ task ? "淇濆瓨鍒颁换鍔℃ā鐗�" : "淇濆瓨闅忚妯$増鍩虹淇℃伅" }}</el-button
             >
           </el-form-item>
         </el-form>
@@ -455,7 +455,6 @@
                   <el-input
                     v-model="topicobj.questiontitle"
                     placeholder="璇蜂粠宸︿晶鍒楄〃閫夋嫨"
-                    :disabled="true"
                   ></el-input>
                 </el-form-item>
                 <el-form-item label="闂鑺傜偣">
@@ -536,18 +535,19 @@
                   <!-- 鏃犲尮閰嶇被鍨� -->
                   <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"
+                            v-model="topicobj.noMatchText"
                             show-word-limit
                           >
                           </el-input> </el-form-item
                       ></el-col>
                     </el-row>
-                    <el-row :gutter="10">
+                    <!-- <el-row :gutter="10">
                       <el-col :span="12"
                         ><el-form-item label="澶勭悊">
                           <el-input
@@ -559,7 +559,7 @@
                           >
                           </el-input> </el-form-item
                       ></el-col>
-                    </el-row>
+                    </el-row> -->
 
                     <el-row :gutter="10">
                       <el-col :span="16">
@@ -583,18 +583,19 @@
                   </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"
+                            v-model="topicobj.noClearlyText"
                             show-word-limit
                           >
                           </el-input> </el-form-item
                       ></el-col>
                     </el-row>
-                    <el-row :gutter="10">
+                    <!-- <el-row :gutter="10">
                       <el-col :span="12"
                         ><el-form-item label="澶勭悊">
                           <el-input
@@ -606,7 +607,7 @@
                           >
                           </el-input> </el-form-item
                       ></el-col>
-                    </el-row>
+                    </el-row> -->
 
                     <el-row :gutter="10">
                       <el-col :span="16">
@@ -630,18 +631,19 @@
                   </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"
+                            v-model="topicobj.slienceText"
                             show-word-limit
                           >
                           </el-input> </el-form-item
                       ></el-col>
                     </el-row>
-                    <el-row :gutter="10">
+                    <!-- <el-row :gutter="10">
                       <el-col :span="12"
                         ><el-form-item label="澶勭悊">
                           <el-input
@@ -653,7 +655,7 @@
                           >
                           </el-input> </el-form-item
                       ></el-col>
-                    </el-row>
+                    </el-row> -->
 
                     <el-row :gutter="10">
                       <el-col :span="16">
@@ -681,9 +683,9 @@
           </div>
         </div>
 
-        <el-button type="success" @click="Departmenttreatment('ruleForm')"
-          >淇濆瓨棰樼洰鏁版嵁</el-button
-        >
+        <el-button type="success" @click="Departmenttreatment('ruleForm')">{{
+          task ? "淇濆瓨鍒颁换鍔℃ā鐗�" : "淇濆瓨棰樼洰鏁版嵁"
+        }}</el-button>
         <el-button type="primary" plain @click="laststep()">涓婁竴姝�</el-button>
         <el-button type="success" plain @click="preview('ruleForm')"
           >鏌ョ湅棰勮</el-button
@@ -716,7 +718,7 @@
             </div>
           </div>
           <!-- 澶氶�� -->
-          <div
+          <!-- <div
             class="topic-dev"
             v-for="(item, index) in valssu"
             :key="item.aaa"
@@ -735,7 +737,7 @@
                 </el-checkbox>
               </el-checkbox-group>
             </div>
-          </div>
+          </div> -->
           <!-- 濉┖
           <div class="topic-dev" v-for="item in valssu" :key="item.aaa">
             <div class="dev-text">
@@ -757,7 +759,7 @@
       title="娣诲姞棰樼洰"
       :visible.sync="drawer"
       custom-class="demo-drawer"
-      width="50%"
+      size="50%"
     >
       <div class="preview-left">
         <el-form
@@ -821,6 +823,12 @@
             </template>
           </el-table-column>
         </el-table>
+        <pagination
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getaddtopiclist"
+        />
       </div>
     </el-drawer>
   </div>
@@ -860,16 +868,27 @@
       drawer: false, //鎺у埗灞曞紑
       radios: [], //澶氶�夐閫変腑
       radioas: "", //濉┖棰樼瓟妗�
+      task: null, //鏄惁鏉ヨ嚜浠诲姟
+      taskform: null, //浠诲姟淇℃伅
       labelInfovalue: [], //鏍囩涓存椂瀛樺偍
       deptNamesvalue: [], //绉戝涓存椂瀛樺偍
       dynamicTags: [],
       indexAssortlist: [],
       inputValue: "",
       inputValueillness: "",
-      topicobj: {},
+      topicobj: {
+        noMatchText: "",
+        noClearlyText: "",
+        slienceText: "",
+      },
       total: 1,
       id: "",
-      ruleForm: {},
+      ruleForm: {
+        templateName: "",
+        ivrLibaTemplateTagList: [],
+        ivrLibaTemplateScriptVOList: [],
+        tempDetpRelevances: [],
+      },
       rules: {},
       optionstag: [],
       prefollowuplist: [],
@@ -927,38 +946,11 @@
         },
       ],
 
-      valssu: [
-        {
-          idd: 1,
-          wssd: "浣犳渶杩戞�庝箞鏍�",
-          sdadd: ["sss", "ssccss", "ssaas", "ss"],
-        },
-      ],
+      valssu: [],
       radio: "",
       addvalue: "娣诲姞棰樼洰",
       // 棰樼洰琛ㄦ牸鏁版嵁
-      userList: [
-        {
-          userid: "1",
-          userName: "涓�鍙烽殢璁挎ā鐗�",
-          verbaltrick: "涓�鍙烽殢璁挎ā鐗�",
-        },
-        {
-          userid: "2",
-          userName: "浜屽彿闅忚妯$増",
-          verbaltrick: "涓�鍙烽殢璁挎ā鐗�",
-        },
-        {
-          userid: "3",
-          userName: "涓夊彿闅忚妯$増",
-          verbaltrick: "涓�鍙烽殢璁挎ā鐗�",
-        },
-        {
-          userid: "4",
-          userName: "鍥涘彿闅忚妯$増",
-          verbaltrick: "涓�鍙烽殢璁挎ā鐗�",
-        },
-      ],
+      userList: [],
       // 鏌ヨ鍙傛暟
       queryParams: {
         pageNum: 1,
@@ -973,6 +965,7 @@
   },
 
   created() {
+    this.RoutingDataProcessing();
     this.gettabList();
     this.getvFollowup();
     this.auxiliary();
@@ -984,6 +977,7 @@
     this.courtyardlist = store.getters.courtyardlist;
     this.precedencetype = store.getters.precedencetype;
   },
+  mounted() {},
 
   methods: {
     //鍏叡鏂规硶--------------------
@@ -993,37 +987,54 @@
     processElement(element) {
       return { ...element, isoperation: 0 };
     },
+    // 璺敱鏁版嵁澶勭悊
+    RoutingDataProcessing() {
+      this.id = this.$route.query.id;
+      this.task = this.$route.query.task;
+
+      // console.log(this.task, "task");
+      // if (this.task) {
+      //   this.id = this.$route.query.id;
+      // }
+    },
     // 鑾峰彇琛ㄥ崟鏁版嵁
     getvFollowup() {
-      this.id = this.$route.query.id;
+      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;
 
-      getvFollowup({ id: this.id }).then((res) => {
-        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);
+            this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList.map(
+              this.processElement
+            );
+            console.log(this.ruleForm.suitway);
+          }
         });
-        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);
-      });
+      }
       getillnesslist({
         pageNum: 1,
         pageSize: 100,
       }).then((response) => {
         this.optionsillness = response.rows;
       });
-      getillness({ outid: this.id, type: 3 }).then((res) => {
-        this.illnesslist = res.rows;
-      });
+      if (this.id) {
+        getillness({ outid: this.id, type: 3 }).then((res) => {
+          this.illnesslist = res.rows;
+        });
+      }
       listDept(this.queryParams).then((response) => {
         this.deptList = this.handleTree(response.data, "deptId");
       });
@@ -1033,6 +1044,20 @@
       // 鍒嗙被
       getFollowupclassify({}).then((res) => {
         this.indexAssortlist = res.rows;
+        if (this.$route.query.assortid) {
+          this.ruleForm.assortid = Number(this.$route.query.assortid);
+        }
+      });
+      // 绉戝
+      listDept(this.queryParams).then((response) => {
+        this.deptList = this.handleTree(response.data, "deptId");
+      });
+      // 鐤剧梾
+      getillnesslist({
+        pageNum: 1,
+        pageSize: 100,
+      }).then((response) => {
+        this.optionsillness = response.rows;
       });
       getgenerallist({
         pageNum: 1,
@@ -1068,8 +1093,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) => {});
         }
@@ -1077,10 +1111,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() {
@@ -1225,7 +1257,6 @@
       this.getaddtopiclist();
     },
     getaddtopiclist() {
-      console.log(12);
       this.drawer = true;
       getverbaltricklist(this.queryParams).then((res) => {
         this.loading = false;
@@ -1236,6 +1267,14 @@
     },
     addtopic(row) {
       console.log(row);
+      if (
+        this.ruleForm.ivrLibaTemplateScriptVOList.some(
+          (obj) => obj.questiontitle == row.questiontitle
+        )
+      ) {
+        this.$modal.msgError("璇ラ鐩凡瀛樺湪");
+        return;
+      }
       getverbaltrick({ id: row.id }).then((res) => {
         console.log(res, "璇︽儏");
         res.data.isoperation = 1;
@@ -1245,16 +1284,22 @@
         });
         this.ruleForm.ivrLibaTemplateScriptVOList.push(res.data);
         this.sortFn();
+        this.$modal.msgSuccess("娣诲姞鎴愬姛");
       });
     },
     handleDelete(row) {
-      let index = this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row);
-      this.ruleForm.ivrLibaTemplateScriptVOList.splice(
-        this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row),
-        1
-      );
-      row.isoperation = 3;
-      this.delScriptVOList.push(row);
+      this.$modal
+        .confirm('鏄惁纭鍒犻櫎闂锛�"' + row.questiontitle + '"锛�')
+        .then(() => {
+          this.ruleForm.ivrLibaTemplateScriptVOList.splice(
+            this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row),
+            1
+          );
+          row.isoperation = 3;
+          this.delScriptVOList.push(row);
+          this.$modal.msgSuccess("宸插垹闄わ紝淇濆瓨妯$増鐢熸晥");
+        })
+        .catch(() => {});
     },
     handleUpdate(row) {
       console.log(row);

--
Gitblit v1.9.3