From 1be7d1dc4426a005621ddb14c96960ca4280bed1 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期四, 20 六月 2024 09:51:11 +0800
Subject: [PATCH] 测试完成

---
 src/views/knowledge/questionbank/particulars/index.vue  |   38 +++++++-----
 src/views/knowledge/questionnaire/compilequer/index.vue |   81 +++++++++++++++------------
 src/views/knowledge/questionbank/index.vue              |    8 +-
 3 files changed, 72 insertions(+), 55 deletions(-)

diff --git a/src/views/knowledge/questionbank/index.vue b/src/views/knowledge/questionbank/index.vue
index 573f072..bcfe201 100644
--- a/src/views/knowledge/questionbank/index.vue
+++ b/src/views/knowledge/questionbank/index.vue
@@ -180,16 +180,16 @@
                 label="棰樼洰鏍囬"
                 fixed
                 align="center"
-                key="script"
-                prop="script"
+                key="topic"
+                prop="topic"
                 width="200"
                 :show-overflow-tooltip="true"
               />
               <el-table-column
                 label="棰樼洰鍐呭"
                 align="center"
-                key="scriptContent"
-                prop="scriptContent"
+                key="script"
+                prop="script"
                 width="200"
                 :show-overflow-tooltip="true"
               />
diff --git a/src/views/knowledge/questionbank/particulars/index.vue b/src/views/knowledge/questionbank/particulars/index.vue
index 407fbb6..f7e1da4 100644
--- a/src/views/knowledge/questionbank/particulars/index.vue
+++ b/src/views/knowledge/questionbank/particulars/index.vue
@@ -63,7 +63,7 @@
               <el-col :span="8"
                 ><el-form-item label="棰樼洰鏍囬">
                   <el-input
-                    v-model="topicobj.script"
+                    v-model="topicobj.topic"
                     placeholder="璇疯緭鍏ユ爣棰�"
                   ></el-input> </el-form-item
               ></el-col>
@@ -164,10 +164,18 @@
               <el-input
                 style="width: 40vw"
                 type="textarea"
-                id="scriptContent"
+                id="script"
+                v-model="topicobj.script"
+                @focus="handleInput('script')"
+                placeholder="璇疯緭鍏ラ鐩唴瀹�"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="棰樼洰璇存槑">
+              <el-input
+                style="width: 40vw"
+                type="textarea"
                 v-model="topicobj.scriptContent"
-                @focus="handleInput('scriptContent')"
-                placeholder="璇疯緭鍏ユ爣棰�"
+                placeholder="璇疯緭鍏ヨ鏄�"
               ></el-input>
             </el-form-item>
 
@@ -838,8 +846,8 @@
       let inputValueArr = "";
       let el = document.querySelector("#" + this.currentInputId);
       //el.selectionStart; 杩欏氨鏄綋鍓嶅厜鏍囨墍鍦ㄧ殑浣嶇疆锛堝瓧绗︿覆涓瓧绗︾殑index锛�
-      if (this.currentInputId == "scriptContent") {
-        inputValueArr = this.topicobj.scriptContent.split("");
+      if (this.currentInputId == "script") {
+        inputValueArr = this.topicobj.script.split("");
         console.log(123);
       } else if (this.currentInputId == "nomatchtext") {
         inputValueArr = this.topicobj.nomatchtext.split("");
@@ -861,8 +869,8 @@
       // 鎶婃暟缁勯噸鏂拌浆鎹负瀛楃涓插苟璧嬪��
       inputValueArr = inputValueArr.join("");
       console.log(inputValueArr);
-      if (this.currentInputId == "scriptContent") {
-        this.topicobj.scriptContent = inputValueArr;
+      if (this.currentInputId == "script") {
+        this.topicobj.script = inputValueArr;
       } else if (this.currentInputId == "nomatchtext") {
         this.topicobj.nomatchtext = inputValueArr;
       } else if (this.currentInputId == "sliencetext") {
@@ -921,14 +929,14 @@
     // 鎵ц
     test() {
       const arrays = [
-        ["2", "3", "4"],
-        ["1", "2"],
-        ["3", "4", "5"],
-        ["3", "2", "5"],
+        ["2", "3", "4", "5"],
+        ["1", "2", "5", "6"],
+        ["3", "4", "5", "3"],
+        ["3", "2", "5", "7"],
       ];
 
       const newMixArray = this.generateCombinations(arrays);
-      console.log(newMixArray,'鍏ㄩ儴璺嚎');
+      console.log(newMixArray, "鍏ㄩ儴璺嚎");
       this.screen(newMixArray);
     },
     // 鏁扮粍姹傚拰
@@ -937,9 +945,9 @@
     },
     // 绛涢�夐敊璇矾绾�
     screen(data) {
-      const arraysGreaterThan10 = data.filter((arr) => this.sumArray(arr) > 13);
+      const arraysGreaterThan10 = data.filter((arr) => this.sumArray(arr) > 21);
 
-      console.log(arraysGreaterThan10,'绛涢�夐敊璇矾绾垮ぇ浜�13鍒�');
+      console.log(arraysGreaterThan10, "绛涢�夐敊璇矾绾垮ぇ浜�13鍒�");
     },
   },
 };
diff --git a/src/views/knowledge/questionnaire/compilequer/index.vue b/src/views/knowledge/questionnaire/compilequer/index.vue
index d8e9dbf..195ccbd 100644
--- a/src/views/knowledge/questionnaire/compilequer/index.vue
+++ b/src/views/knowledge/questionnaire/compilequer/index.vue
@@ -52,7 +52,7 @@
                 :label="group.name"
               >
                 <el-option
-                  v-for="item in group.svyLibTitleCategoryList"
+                  v-for="item in group.svyLibTemplateCategoryList"
                   :key="item.id"
                   :label="item.name"
                   :value="item.id"
@@ -279,7 +279,7 @@
         <div class="presentation">
           <div class="presentation-left">
             <el-card class="box-card" style="min-height: 688px">
-              <el-table v-loading="loading" :data="ruleForm.svyLibTopics">
+              <el-table v-loading="loading" :data="ruleForm.svyLibScripts">
                 <el-table-column
                   label="搴忓彿"
                   align="center"
@@ -287,17 +287,17 @@
                   prop="guid"
                 />
                 <el-table-column
-                  label="棰樼洰"
+                  label="棰樼洰鏍囬"
                   align="center"
-                  key="script"
-                  prop="script"
+                  key="topic"
+                  prop="topic"
                   :show-overflow-tooltip="true"
                 />
                 <el-table-column
-                  label="涓昏鍐呭"
+                  label="棰樼洰鍐呭"
                   align="center"
-                  key="scriptContent"
-                  prop="scriptContent"
+                  key="script"
+                  prop="script"
                   :show-overflow-tooltip="true"
                 />
 
@@ -354,7 +354,7 @@
                 </div>
                 <el-form-item label="棰樼洰鏍囬">
                   <el-input
-                    v-model="topicobj.script"
+                    v-model="topicobj.topic"
                     placeholder="璇疯緭鍏ユ爣棰�"
                   ></el-input>
                 </el-form-item>
@@ -393,7 +393,7 @@
                 <div class="headline">閫夐」璁剧疆</div>
                 <div
                   class="topicxq"
-                  v-for="item in topicobj.svyLibTopicoptions"
+                  v-for="item in topicobj.svyLibTemplateTargetoptions"
                 >
                   <el-row :gutter="10">
                     <el-col :span="11"
@@ -533,7 +533,7 @@
       title="娣诲姞棰樼洰"
       :visible.sync="drawer"
       custom-class="demo-drawer"
-      width="50%"
+      size="50%"
     >
       <div class="preview-left">
         <el-form
@@ -543,9 +543,9 @@
           :inline="true"
           label-width="98px"
         >
-          <el-form-item label="闂鏍囬" prop="script">
+          <el-form-item label="闂鏍囬" prop="topic">
             <el-input
-              v-model="queryParams.script"
+              v-model="queryParams.topic"
               placeholder="璇疯緭鍏�"
               clearable
               style="width: 200px"
@@ -570,15 +570,15 @@
           <el-table-column
             label="鏍囬"
             align="center"
-            key="script"
-            prop="script"
+            key="topic"
+            prop="topic"
             width="100"
           />
           <el-table-column
             label="闂鍐呭"
             align="center"
-            key="scriptContent"
-            prop="scriptContent"
+            key="script"
+            prop="script"
             width="200"
             :show-overflow-tooltip="true"
           />
@@ -597,6 +597,13 @@
             </template>
           </el-table-column>
         </el-table>
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getaddtopiclist"
+        />
       </div>
     </el-drawer>
   </div>
@@ -729,11 +736,11 @@
       let result = [];
       arr.forEach((item) => {
         result.push(item);
-        if (item.svyLibTitleCategoryList) {
+        if (item.svyLibTemplateCategoryList) {
           result = result.concat(
-            this.flattenArray(item.svyLibTitleCategoryList)
+            this.flattenArray(item.svyLibTemplateCategoryList)
           );
-          delete item.svyLibTitleCategoryList;
+          delete item.svyLibTemplateCategoryList;
         }
       });
       return result;
@@ -789,10 +796,10 @@
     Departmenttreatment() {
       this.ruleForm.deptNames = JSON.stringify(this.tempDetpRelevanceslist);
       console.log(this.tempDetpRelevanceslist);
-      this.ruleForm.svyLibTopics = this.ruleForm.svyLibTopics.concat(
+      this.ruleForm.svyLibScripts = this.ruleForm.svyLibScripts.concat(
         this.delScriptVOList
       );
-      console.log(this.ruleForm.svyLibTopics, "this.ruleForm.svyLibTopics");
+      console.log(this.ruleForm.svyLibScripts, "this.ruleForm.svyLibScripts");
       const result = this.tempDetpRelevanceslist.map(
         (subArr) => subArr[subArr.length - 1]
       );
@@ -865,14 +872,14 @@
     // 鏂板棰樼洰
     addtopic(row) {
       row.isoperation = 1;
-      row.svyLibTopicoptions.forEach((item) => {
+      row.svyLibTemplateTargetoptions.forEach((item) => {
         item.isoperation = 1;
       });
-      this.ruleForm.svyLibTopics.push(row);
+      this.ruleForm.svyLibScripts.push(row);
     },
     handleDelete(row) {
-      let index = this.ruleForm.svyLibTopics.indexOf(row);
-      this.ruleForm.svyLibTopics.splice(index, 1);
+      let index = this.ruleForm.svyLibScripts.indexOf(row);
+      this.ruleForm.svyLibScripts.splice(index, 1);
       row.isoperation = 3;
       this.delScriptVOList.push(row);
       this.sortFn();
@@ -884,33 +891,35 @@
       // });
     },
     syioption(row) {
-      const index = this.getIndexInArray(this.ruleForm.svyLibTopics, row);
-      const item = this.ruleForm.svyLibTopics.splice(index, 1)[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓�
-      this.ruleForm.svyLibTopics.splice(index - 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣�
+      const index = this.getIndexInArray(this.ruleForm.svyLibScripts, row);
+      const item = this.ruleForm.svyLibScripts.splice(index, 1)[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓�
+      this.ruleForm.svyLibScripts.splice(index - 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣�
       this.sortFn();
     },
     xiayioption(row) {
-      const index = this.getIndexInArray(this.ruleForm.svyLibTopics, row);
-      const item = this.ruleForm.svyLibTopics.splice(index, 1)[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓�
-      this.ruleForm.svyLibTopics.splice(index + 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣�
+      const index = this.getIndexInArray(this.ruleForm.svyLibScripts, row);
+      const item = this.ruleForm.svyLibScripts.splice(index, 1)[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓�
+      this.ruleForm.svyLibScripts.splice(index + 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣�
       this.sortFn();
     },
     sortFn() {
-      this.ruleForm.svyLibTopics = this.ruleForm.svyLibTopics.map(
+      this.ruleForm.svyLibScripts = this.ruleForm.svyLibScripts.map(
         (item, index) => {
           return {
             guid: index + 1,
             svyid: item.svyid,
             script: item.script,
-            scriptContent: item.scriptContent,
+            script: item.script,
           };
         }
       );
-      console.log(this.ruleForm.svyLibTopics);
+      console.log(this.ruleForm.svyLibScripts);
     },
 
     // 淇敼棰樼洰淇℃伅
-    Submittopicobj() {},
+    Submittopicobj() {
+      
+    },
     // 鏂板鍙橀噺
     addvariable() {
       this.variablelist.push({

--
Gitblit v1.9.3