From b2278ee7b3934157b2400d75c39957a8885ade9f Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期一, 27 五月 2024 17:34:53 +0800
Subject: [PATCH] 测试完成

---
 src/views/repositoryai/verbaltrick/index.vue |   89 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 74 insertions(+), 15 deletions(-)

diff --git a/src/views/repositoryai/verbaltrick/index.vue b/src/views/repositoryai/verbaltrick/index.vue
index e0fedf6..fc91097 100644
--- a/src/views/repositoryai/verbaltrick/index.vue
+++ b/src/views/repositoryai/verbaltrick/index.vue
@@ -29,7 +29,7 @@
         >
           <span class="custom-tree-node" slot-scope="{ node, data }">
             <span>{{ node.label }}</span>
-            <span>
+            <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>
@@ -68,7 +79,7 @@
                   </el-option>
                 </el-select>
               </el-form-item>
-              <el-form-item label="闂涓婚" prop="userName">
+              <el-form-item label="闂鏍囬" prop="userName">
                 <el-input
                   v-model="queryParams.userName"
                   placeholder="璇疯緭鍏�"
@@ -87,9 +98,9 @@
                 />
               </el-form-item>
               <el-form-item label="閫傜敤鏂瑰紡" prop="status">
-                <el-select v-model="queryParams.applyway" placeholder="璇烽�夋嫨">
+                <el-select v-model="queryParams.suitway" placeholder="璇烽�夋嫨">
                   <el-option
-                    v-for="item in languagelist"
+                    v-for="item in mode"
                     :key="item.value"
                     :label="item.label"
                     :value="item.value"
@@ -170,9 +181,16 @@
               @selection-change="handleSelectionChange"
             >
               <el-table-column type="selection" width="50" align="center" />
-              <el-table-column label="搴忓彿" align="center" key="id" prop="id" />
+              <el-table-column
+                label="搴忓彿"
+                fixed
+                align="center"
+                key="id"
+                prop="id"
+              />
               <el-table-column
                 label="闂涓婚"
+                fixed
                 align="center"
                 key="questiontitle"
                 prop="questiontitle"
@@ -181,8 +199,8 @@
               <el-table-column
                 label="闂鏂囨湰"
                 align="center"
-                key="questiontext"
-                prop="questiontext"
+                key="questionText"
+                prop="questionText"
                 width="200"
                 :show-overflow-tooltip="true"
               />
@@ -204,12 +222,12 @@
               /><el-table-column
                 label="閫傜敤鏂瑰紡"
                 align="center"
-                key="application"
-                prop="application"
+                key="suitway"
+                prop="suitway"
                 width="120"
               >
                 <template slot-scope="scope">
-                  <dict-tag :options="mode" :value="scope.row.suitWay" />
+                  <dict-tag :options="mode" :value="scope.row.suitway" />
                 </template>
               </el-table-column>
               <el-table-column
@@ -266,6 +284,7 @@
 
               <el-table-column
                 label="鎿嶄綔"
+                fixed="right"
                 align="center"
                 width="250"
                 class-name="small-padding fixed-width"
@@ -343,7 +362,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>
@@ -403,7 +422,7 @@
   getverbaltricklist,
   verbaltrickinfo,
   delverbaltrickinfo,
-  getverbaltrick,
+  compileverbaltrickclassify,
   getillnesslist,
   illnesslistget,
   getillness,
@@ -523,7 +542,7 @@
       getverbaltricklist(this.queryParams).then((res) => {
         this.userList = res.rows;
         this.loading = false;
-        this.total=res.total
+        this.total = res.total;
       });
     },
 
@@ -589,12 +608,22 @@
     getDeptTree() {
       getbaltrickclassify({}).then((res) => {
         this.deptOptions = res.rows;
-        console.log(res);
+        this.dialogFormVisible = false;
+
       });
     },
 
     // 娣诲姞绫诲埆鏍�
     submitsidecolumn() {
+      if (this.classifyform.id) {
+        compileverbaltrickclassify(this.classifyform).then((res) => {
+          this.getDeptTree();
+          this.$modal.msgSuccess("淇敼鎴愬姛");
+          this.classifyform = {};
+          this.dialogFormVisible = false;
+        });
+        return;
+      }
       let calssvalue = {};
       if (
         this.classifyform.pid &&
@@ -615,6 +644,8 @@
       addbaltrickclassify(this.classifyform).then((res) => {
         this.getDeptTree();
         this.$modal.msgSuccess("鏂板鎴愬姛");
+        this.classifyform = {};
+        this.dialogFormVisible = false;
       });
     },
     remove(a, b) {
@@ -645,6 +676,16 @@
           })
           .catch(() => {});
       }
+    },
+    altertag(a, b) {
+      this.dialogFormVisible = true;
+      if (!b.pid) {
+        this.radio = "涓诲垎绫�";
+      } else {
+        this.radio = "瀛愬垎绫�";
+      }
+      this.classifyform = b;
+      this.dialogFormVisible = true;
     },
 
     // 绛涢�夎妭鐐�
@@ -747,7 +788,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);
@@ -862,6 +903,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