From 257f46bce7c3325c9d9aed68e0df84ea279019aa Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期二, 28 五月 2024 15:30:21 +0800
Subject: [PATCH] 测试完成

---
 src/views/knowledge/questionnaire/index.vue |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 56 insertions(+), 4 deletions(-)

diff --git a/src/views/knowledge/questionnaire/index.vue b/src/views/knowledge/questionnaire/index.vue
index d6c4277..a201461 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>
@@ -180,12 +191,14 @@
               <el-table-column type="selection" width="50" align="center" />
               <el-table-column
                 label="搴忓彿"
+                fixed
                 align="center"
                 key="svyid"
                 prop="svyid"
               />
               <el-table-column
                 label="闂嵎鏍囬"
+                fixed
                 align="center"
                 key="svyname"
                 prop="svyname"
@@ -261,6 +274,7 @@
 
               <el-table-column
                 label="鎿嶄綔"
+                fixed="right"
                 align="center"
                 width="300"
                 class-name="small-padding fixed-width"
@@ -344,7 +358,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>
@@ -415,6 +429,7 @@
   getQtemplateclassify,
   delQtemplateclassify,
   addQtemplateclassify,
+  editQtemplateclassify,
   getQtemplatelist,
   issueinfo,
   compileissue,
@@ -667,12 +682,21 @@
     getDeptTree() {
       getQtemplateclassify({}).then((res) => {
         this.deptOptions = res.rows;
-        console.log(res);
+        this.dialogFormVisible = false;
       });
     },
 
     // 娣诲姞绫诲埆鏍�
     submitsidecolumn() {
+      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 &&
@@ -723,6 +747,16 @@
           })
           .catch(() => {});
       }
+    },
+    altertag(a, b) {
+      this.dialogFormVisible = true;
+      if (!b.pid) {
+        this.radio = "涓诲垎绫�";
+      } else {
+        this.radio = "瀛愬垎绫�";
+      }
+      this.classifyform = b;
+      this.dialogFormVisible = true;
     },
 
     // 绛涢�夎妭鐐�
@@ -810,7 +844,7 @@
   margin-top: 20px;
   margin: 20px;
   padding: 30px;
-  background: #edf1f7;
+  background: #fff;
   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);
@@ -926,6 +960,24 @@
   font-size: 20px;
   cursor: pointer;
 }
+::v-deep .el-tree {
+  position: relative;
+  cursor: default;
+  border-radius: 5px;
+  background: #eff8fe;
+  color: #606266;
+  border: 1px solid #bbe1fa;
+  // 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-tree--highlight-current
+  .el-tree-node.is-current
+  > .el-tree-node__content {
+  background-color: #7799fb;
+  color: #fff;
+}
 ::v-deep .el-button--mini.is-circle {
   padding: 7px;
   margin: 0;

--
Gitblit v1.9.3