From 3d50e2c6d8cd86ee10b4353ad6365c59f588dbc4 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 31 七月 2024 17:22:02 +0800
Subject: [PATCH] 测试完成

---
 src/views/knowledge/questionnaire/index.vue |  264 ++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 184 insertions(+), 80 deletions(-)

diff --git a/src/views/knowledge/questionnaire/index.vue b/src/views/knowledge/questionnaire/index.vue
index 68dbafc..1606dd4 100644
--- a/src/views/knowledge/questionnaire/index.vue
+++ b/src/views/knowledge/questionnaire/index.vue
@@ -29,7 +29,7 @@
         >
           <span class="custom-tree-node" slot-scope="{ node, data }">
             <span>{{ node.label }}</span>
-            <span v-if="node.id > 0">
+            <span v-if="data.id > 0">
               <el-button
                 type="text"
                 icon="el-icon-delete"
@@ -37,6 +37,17 @@
                 size="mini"
                 @click="() => remove(node, data)"
               >
+              </el-button>
+            </span>
+            <span v-if="data.id > 0">
+              <el-button
+                type="text"
+                circle
+                size="mini"
+                @click="() => altertag(node, data)"
+                ><span class="button-textxg"
+                  ><i class="el-icon-edit-outline"></i
+                ></span>
               </el-button>
             </span>
           </span>
@@ -57,72 +68,48 @@
               v-show="showSearch"
               label-width="98px"
             >
-              <el-form-item label="闂嵎鍚嶇О" prop="userName">
+              <el-form-item label="闂嵎鍚嶇О" prop="svyname">
                 <el-input
-                  v-model="queryParams.userName"
+                  v-model="queryParams.svyname"
                   placeholder="璇疯緭鍏�"
                   clearable
                   style="width: 200px"
                   @keyup.enter.native="handleQuery"
                 />
               </el-form-item>
-              <el-form-item label="閫傜敤绉戝" prop="region">
-                <el-cascader
-                  v-model="queryParams.administrative"
-                  :options="deptList"
-                  :props="props"
-                  :show-all-levels="false"
-                  clearable
-                >
-                  <template slot-scope="{ node, data }">
-                    <span>{{ data.deptName }}</span>
-                    <span v-if="!node.isLeaf">
-                      ({{ data.children.length }})
-                    </span>
-                  </template>
-                </el-cascader>
-              </el-form-item>
-              <el-form-item label="閫氱煡鍐呭" prop="userName">
-                <el-input
-                  v-model="queryParams.userNamevalue"
-                  placeholder="璇疯緭鍏�"
-                  clearable
-                  style="width: 200px"
-                  @keyup.enter.native="handleQuery"
-                />
-              </el-form-item>
-              <el-form-item label="閫傜敤鏂瑰紡" prop="shape">
-                <el-cascader
-                  v-model="queryParams.shapevalue"
-                  :options="editableTabs"
-                  :props="propss"
-                  clearable
-                ></el-cascader>
-              </el-form-item>
-              <el-form-item label="鍐呭褰㈠紡" prop="classify">
+              <el-form-item label="閫傜敤闄㈠尯" prop="region">
                 <el-select
-                  v-model="queryParams.classifyvalue"
-                  placeholder="璇烽�夋嫨"
+                  v-model="queryParams.campus"
+                  size="medium"
+                  filterable
+                  placeholder="璇烽�夋嫨鍒嗙被"
                 >
                   <el-option
-                    v-for="(item, index) in editableTabs"
-                    :key="index++"
-                    :label="item.title"
-                    :value="index++"
+                    v-for="item in courtyardlist"
+                    :key="item.label"
+                    :label="item.label"
+                    :value="item.label"
                   >
                   </el-option>
                 </el-select>
               </el-form-item>
+              <el-form-item label="涓昏鍐呭" prop="userName">
+                <el-input
+                  v-model="queryParams.description"
+                  placeholder="璇疯緭鍏�"
+                  clearable
+                  style="width: 200px"
+                  @keyup.enter.native="handleQuery"
+                />
+              </el-form-item>
+
               <el-form-item label="鍙敤鐘舵��" prop="classify">
-                <el-select
-                  v-model="queryParams.classifyvalue"
-                  placeholder="璇烽�夋嫨"
-                >
+                <el-select v-model="queryParams.isenable" placeholder="璇烽�夋嫨">
                   <el-option
-                    v-for="(item, index) in editableTabs"
-                    :key="index++"
-                    :label="item.title"
-                    :value="index++"
+                    v-for="(item, index) in qyoptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
                   >
                   </el-option>
                 </el-select>
@@ -178,15 +165,15 @@
               @selection-change="handleSelectionChange"
             >
               <el-table-column type="selection" width="50" align="center" />
-              <el-table-column
+              <!-- <el-table-column
                 label="搴忓彿"
                 fixed
                 align="center"
                 key="svyid"
                 prop="svyid"
-              />
+              /> -->
               <el-table-column
-                label="闂嵎鏍囬"
+                label="闂嵎鍚嶇О"
                 fixed
                 align="center"
                 key="svyname"
@@ -236,14 +223,14 @@
                 :show-overflow-tooltip="true"
               >
                 <template slot-scope="scope">
-                  <span v-for="item in scope.row.labelInfo.split(',')"
-                    >{{ item }}銆�
+                  <span v-for="item in scope.row.svyLibTemplateTagList"
+                    >{{ item.tagname }}銆�
                   </span>
                 </template>
               </el-table-column>
 
               <el-table-column
-                label="鍙敤"
+                label="鏄惁鍙敤"
                 align="center"
                 key="isenable"
                 prop="isenable"
@@ -276,10 +263,10 @@
                     v-hasPermi="['system:user:edit']"
                   >
                     <span class="button-text"
-                      ><i class="el-icon-edit"></i>浜岀淮鐮�</span
+                      ><i class="el-icon-edit"></i>棰勮</span
                     ></el-button
                   >
-                  <el-button
+                  <!-- <el-button
                     size="medium"
                     type="text"
                     @click="ViewQuestionnaire(scope.row)"
@@ -287,7 +274,7 @@
                     ><span class="button-textck"
                       ><i class="el-icon-edit"></i>鏌ョ湅</span
                     ></el-button
-                  >
+                  > -->
                   <el-button
                     size="medium"
                     type="text"
@@ -347,7 +334,7 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="dialogFormVisible = false">鍙� 娑�</el-button>
+        <el-button @click="getDeptTree()">鍙� 娑�</el-button>
         <el-button type="primary" @click="submitsidecolumn">纭� 瀹�</el-button>
       </div>
     </el-dialog>
@@ -400,12 +387,80 @@
       </span>
     </el-dialog>
     <!-- 浜岀淮鐮佸睍绀哄脊妗� -->
-    <el-dialog width="30%" :visible.sync="goQRCodeVisible">
+    <!-- <el-dialog width="30%" :visible.sync="goQRCodeVisible">
       <div class="qrcode-dialo">
         <div class="qrcode-text">
           {{ namequestionnaire }}<span>{{ haoquestionnaire }}</span>
         </div>
-        <div class="qrcode-img"></div>
+        <div class="qrcode-img">
+          <el-image
+            src="D:/qrcode/fc9a1fa37e394ac3ac606bf6b77b17c3"
+            fit="cover"
+          ></el-image>
+        </div>
+      </div>
+    </el-dialog> -->
+    <!-- 闂嵎妯$増棰勮 -->
+    <el-dialog title="闅忚棰樼洰棰勮" :visible.sync="topicVisible" width="50%">
+      <div class="preview-left">
+        <!-- 鍗曢�� -->
+        <div
+          class="scriptTopic-dev"
+          v-for="item in topicform.svyTemplateLibScripts"
+          :key="item.sort"
+          v-if="item.scriptType == 1"
+        >
+          <div class="dev-text">
+            {{ item.sort }}銆乕鍗曢�塢<span>{{ item.scriptContent }}</span>
+          </div>
+          <div class="dev-xx">
+            <el-radio-group v-model="item.remark">
+              <el-radio
+                v-for="(items, index) in item.svyLibTemplateTargetoptions"
+                :key="index"
+                :label="index"
+                >{{ items.optioncontent }}</el-radio
+              >
+            </el-radio-group>
+          </div>
+        </div>
+        <!-- 澶氶�� -->
+        <div
+          class="scriptTopic-dev"
+          v-for="item in topicform.svyTemplateLibScripts"
+          :key="item.sort"
+          v-if="item.scriptType == 2"
+        >
+          <div class="dev-text">
+            {{ item.sort }}銆乕澶氶�塢<span>{{ item.scriptContent }}</span>
+          </div>
+          <div class="dev-xx">
+            <el-checkbox-group v-model="qremark">
+              <el-checkbox
+                v-for="(items, index) in item.svyLibTemplateTargetoptions"
+                :key="index"
+                :label="index"
+              >
+                {{ items.optioncontent }}
+              </el-checkbox>
+            </el-checkbox-group>
+          </div>
+        </div>
+        <!-- 濉┖ -->
+        <div
+          class="scriptTopic-dev"
+          v-for="item in topicform.svyTemplateLibScripts"
+          :key="item.sort"
+          v-if="item.scriptType == 3"
+        >
+          <div class="dev-text">
+            {{ item.sort }}銆乕濉┖]<span>{{ item.scriptContent }}</span>
+          </div>
+          <div class="dev-xx">
+            <el-input placeholder="璇疯緭鍏ョ瓟妗�" v-model="radioas" clearable>
+            </el-input>
+          </div>
+        </div>
       </div>
     </el-dialog>
   </div>
@@ -418,8 +473,9 @@
   getQtemplateclassify,
   delQtemplateclassify,
   addQtemplateclassify,
+  editQtemplateclassify,
   getQtemplatelist,
-  issueinfo,
+  getQtemplateobj,
   compileissue,
   delQtemplateinfo,
   Followupinfo,
@@ -428,6 +484,7 @@
   getillnesslist,
   illnesslistget,
   getillness,
+  getQRcode,
 } from "@/api/AiCentre/index";
 import { listDept } from "@/api/system/dept";
 
@@ -444,6 +501,7 @@
       loading: false,
       // 閫変腑鏁扮粍
       ids: [],
+      qremark: [],
       // 闈炲崟涓鐢�
       single: true,
       // 闈炲涓鐢�
@@ -454,6 +512,8 @@
       total: 0,
       namequestionnaire: "",
       haoquestionnaire: "",
+      QRcodeurl: "",
+      courtyardlist: "",
       // 鐢ㄦ埛琛ㄦ牸鏁版嵁
       userList: [],
 
@@ -473,6 +533,8 @@
       idds: "",
       amendtag: false, //鏄惁淇敼绫诲埆
       dialogFormVisible: false, //淇敼娣诲姞绫诲埆寮规
+      topicVisible: false, //
+      topicform: {},
       classifyform: {}, //绫诲埆琛ㄥ崟
       indexid: null,
       inputValue: "",
@@ -484,7 +546,7 @@
       illnesslistapi: [],
       illnesslist: [],
       defaultProps: {
-        children: "svyLibTitleCategoryList",
+        children: "svyLibTemplateCategoryList",
         label: "name",
       },
       deptList: [],
@@ -511,6 +573,7 @@
     this.languagelist = store.getters.languagelist;
     this.qyoptions = store.getters.usable;
     this.editableTabs = store.getters.editableTabs;
+    this.courtyardlist = store.getters.courtyardlist;
   },
 
   methods: {
@@ -528,9 +591,20 @@
     },
 
     goQRCode(row) {
-      this.goQRCodeVisible = true;
-      this.namequestionnaire = row.userName;
-      this.haoquestionnaire = row.nickName;
+      getQtemplateobj({ svyid: row.svyid }).then((res) => {
+        this.topicform = res.rows[0];
+        console.log(this.topicform);
+        this.topicVisible = true;
+      });
+      // getQRcode({
+      //   url: "/outsideChain?param1=KHRYDSSuTpwGWDhAS6OnpfxObRZf8fd/TIagYWPvDuyku+MjtrWt1efC1htoBDc+G4QP2UOWPNitAO4TwH4oIQ==&param2=CP/xYqwqDhWACt2aQ/HOwhgRM62Lh4/1upwYDl7dmKSuiaa4zRzMgu7rmRztiwQj2YvJ1KAX1zBTpUAIdxPvUA==",
+      // }).then((res) => {
+      //   console.log(res);
+      //   this.QRcodeurl = "D:/qrcode/fc9a1fa37e394ac3ac606bf6b77b17c3";
+      // });
+      // this.goQRCodeVisible = true;
+      // this.namequestionnaire = row.userName;
+      // this.haoquestionnaire = row.nickName;
     },
     // 琛ㄥ崟閲嶇疆
     reset() {
@@ -670,13 +744,23 @@
     getDeptTree() {
       getQtemplateclassify({}).then((res) => {
         this.deptOptions = res.rows;
-        console.log(res);
+        this.dialogFormVisible = false;
       });
     },
 
     // 娣诲姞绫诲埆鏍�
     submitsidecolumn() {
-      let calssvalue = {};
+      if (this.classifyform.id) {
+        editQtemplateclassify(this.classifyform).then((res) => {
+          this.getDeptTree();
+          this.$modal.msgSuccess("淇敼鎴愬姛");
+          this.classifyform = {};
+          this.dialogFormVisible = false;
+        });
+        return;
+      }
+      let calssvalue = {
+      };
       if (
         this.classifyform.pid &&
         this.classifyform.name &&
@@ -685,11 +769,12 @@
         const index = this.deptOptions.findIndex(
           (obj) => obj.id == this.classifyform.pid
         );
+        console.log(this.deptOptions[index]);
         calssvalue = this.deptOptions[index];
-        calssvalue.svyLibTitleCategoryList.push(this.classifyform);
+        calssvalue.svyLibTemplateCategoryList.push(this.classifyform);
       } else if (this.radio == "涓诲垎绫�" && this.classifyform.name) {
         this.classifyform.pid = null;
-        this.classifyform.svyLibTitleCategoryList = [];
+        this.classifyform.svyLibTemplateCategoryList = [];
       } else {
         return this.$modal.msgError("璇峰~鍐欏畬鏁翠俊鎭�");
       }
@@ -727,6 +812,16 @@
           .catch(() => {});
       }
     },
+    altertag(a, b) {
+      this.dialogFormVisible = true;
+      if (!b.pid) {
+        this.radio = "涓诲垎绫�";
+      } else {
+        this.radio = "瀛愬垎绫�";
+      }
+      this.classifyform = b;
+      this.dialogFormVisible = true;
+    },
 
     // 绛涢�夎妭鐐�
     filterNode(value, data) {
@@ -734,7 +829,7 @@
       return data.name.indexOf(value) !== -1;
     },
     handleNodeClick(data) {
-      this.queryParams.assortid = data.id;
+      this.queryParams.categoryid = data.id;
       this.getList();
     },
 
@@ -774,13 +869,6 @@
       this.ids = selection.map((item) => item.svyid);
       this.single = selection.length != 1;
       this.multiple = !selection.length;
-    },
-    /** 鏂板鎸夐挳鎿嶄綔 */
-    handleAdd() {
-      this.$router.push({
-        path: "/knowledge/verbaltrick/particulars/",
-        query: { id: "1" },
-      });
     },
 
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
@@ -917,6 +1005,22 @@
     vertical-align: bottom;
   }
 }
+.preview-left {
+  margin: 20px;
+  //   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);
+  .scriptTopic-dev {
+    margin-bottom: 25px;
+    font-size: 20px !important;
+    .dev-text {
+      margin-bottom: 10px;
+    }
+  }
+}
 
 ::v-deep .el-tree-node__content {
   display: -webkit-box;

--
Gitblit v1.9.3