From 3b79eff2f1181eb6df58ac6f7c7e173f2677cf08 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 18 五月 2021 11:38:15 +0800
Subject: [PATCH] fix maven install 异常

---
 ruoyi-ui/src/views/system/menu/index.vue |  109 ++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 80 insertions(+), 29 deletions(-)

diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue
index 4117f31..094a706 100644
--- a/ruoyi-ui/src/views/system/menu/index.vue
+++ b/ruoyi-ui/src/views/system/menu/index.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form :inline="true">
-      <el-form-item label="鑿滃崟鍚嶇О">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
+      <el-form-item label="鑿滃崟鍚嶇О" prop="menuName">
         <el-input
           v-model="queryParams.menuName"
           placeholder="璇疯緭鍏ヨ彍鍗曞悕绉�"
@@ -10,10 +10,10 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="鐘舵��">
-        <el-select v-model="queryParams.visible" placeholder="鑿滃崟鐘舵��" clearable size="small">
+      <el-form-item label="鐘舵��" prop="status">
+        <el-select v-model="queryParams.status" placeholder="鑿滃崟鐘舵��" clearable size="small">
           <el-option
-            v-for="dict in visibleOptions"
+            v-for="dict in statusOptions"
             :key="dict.dictValue"
             :label="dict.dictLabel"
             :value="dict.dictValue"
@@ -22,9 +22,23 @@
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
-        <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:menu:add']">鏂板</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
       </el-form-item>
     </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['system:menu:add']"
+        >鏂板</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
 
     <el-table
       v-loading="loading"
@@ -41,7 +55,7 @@
       <el-table-column prop="orderNum" label="鎺掑簭" width="60"></el-table-column>
       <el-table-column prop="perms" label="鏉冮檺鏍囪瘑" :show-overflow-tooltip="true"></el-table-column>
       <el-table-column prop="component" label="缁勪欢璺緞" :show-overflow-tooltip="true"></el-table-column>
-      <el-table-column prop="visible" label="鍙" :formatter="visibleFormat" width="80"></el-table-column>
+      <el-table-column prop="status" label="鐘舵��" :formatter="statusFormat" width="80"></el-table-column>
       <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
@@ -74,7 +88,7 @@
     </el-table>
 
     <!-- 娣诲姞鎴栦慨鏀硅彍鍗曞璇濇 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px">
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-row>
           <el-col :span="24">
@@ -152,14 +166,33 @@
               <el-input v-model="form.perms" placeholder="璇锋潈闄愭爣璇�" maxlength="50" />
             </el-form-item>
           </el-col>
-          <el-col :span="24">
-            <el-form-item v-if="form.menuType != 'F'" label="鑿滃崟鐘舵��">
+          <el-col :span="12">
+            <el-form-item v-if="form.menuType != 'F'" label="鏄剧ず鐘舵��">
               <el-radio-group v-model="form.visible">
                 <el-radio
                   v-for="dict in visibleOptions"
                   :key="dict.dictValue"
                   :label="dict.dictValue"
                 >{{dict.dictLabel}}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item v-if="form.menuType != 'F'" label="鑿滃崟鐘舵��">
+              <el-radio-group v-model="form.status">
+                <el-radio
+                  v-for="dict in statusOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictValue"
+                >{{dict.dictLabel}}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item v-if="form.menuType == 'C'" label="鏄惁缂撳瓨">
+              <el-radio-group v-model="form.isCache">
+                <el-radio label="0">缂撳瓨</el-radio>
+                <el-radio label="1">涓嶇紦瀛�</el-radio>
               </el-radio-group>
             </el-form-item>
           </el-col>
@@ -186,6 +219,8 @@
     return {
       // 閬僵灞�
       loading: true,
+      // 鏄剧ず鎼滅储鏉′欢
+      showSearch: true,
       // 鑿滃崟琛ㄦ牸鏍戞暟鎹�
       menuList: [],
       // 鑿滃崟鏍戦�夐」
@@ -194,8 +229,10 @@
       title: "",
       // 鏄惁鏄剧ず寮瑰嚭灞�
       open: false,
-      // 鑿滃崟鐘舵�佹暟鎹瓧鍏�
+      // 鏄剧ず鐘舵�佹暟鎹瓧鍏�
       visibleOptions: [],
+      // 鑿滃崟鐘舵�佹暟鎹瓧鍏�
+      statusOptions: [],
       // 鏌ヨ鍙傛暟
       queryParams: {
         menuName: undefined,
@@ -210,6 +247,9 @@
         ],
         orderNum: [
           { required: true, message: "鑿滃崟椤哄簭涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        path: [
+          { required: true, message: "璺敱鍦板潃涓嶈兘涓虹┖", trigger: "blur" }
         ]
       }
     };
@@ -218,6 +258,9 @@
     this.getList();
     this.getDicts("sys_show_hide").then(response => {
       this.visibleOptions = response.data;
+    });
+    this.getDicts("sys_normal_disable").then(response => {
+      this.statusOptions = response.data;
     });
   },
   methods: {
@@ -253,12 +296,19 @@
         this.menuOptions.push(menu);
       });
     },
-    // 鑿滃崟鏄剧ず鐘舵�佸瓧鍏哥炕璇�
+    // 鏄剧ず鐘舵�佸瓧鍏哥炕璇�
     visibleFormat(row, column) {
       if (row.menuType == "F") {
         return "";
       }
       return this.selectDictLabel(this.visibleOptions, row.visible);
+    },
+    // 鑿滃崟鐘舵�佸瓧鍏哥炕璇�
+    statusFormat(row, column) {
+      if (row.menuType == "F") {
+        return "";
+      }
+      return this.selectDictLabel(this.statusOptions, row.status);
     },
     // 鍙栨秷鎸夐挳
     cancel() {
@@ -275,7 +325,9 @@
         menuType: "M",
         orderNum: undefined,
         isFrame: "1",
-        visible: "0"
+        isCache: "0",
+        visible: "0",
+        status: "0"
       };
       this.resetForm("form");
     },
@@ -283,12 +335,19 @@
     handleQuery() {
       this.getList();
     },
+    /** 閲嶇疆鎸夐挳鎿嶄綔 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
     /** 鏂板鎸夐挳鎿嶄綔 */
     handleAdd(row) {
       this.reset();
       this.getTreeselect();
-      if (row != null) {
+      if (row != null && row.menuId) {
         this.form.parentId = row.menuId;
+      } else {
+        this.form.parentId = 0;
       }
       this.open = true;
       this.title = "娣诲姞鑿滃崟";
@@ -309,23 +368,15 @@
         if (valid) {
           if (this.form.menuId != undefined) {
             updateMenu(this.form).then(response => {
-              if (response.code === 200) {
-                this.msgSuccess("淇敼鎴愬姛");
-                this.open = false;
-                this.getList();
-              } else {
-                this.msgError(response.msg);
-              }
+              this.msgSuccess("淇敼鎴愬姛");
+              this.open = false;
+              this.getList();
             });
           } else {
             addMenu(this.form).then(response => {
-              if (response.code === 200) {
-                this.msgSuccess("鏂板鎴愬姛");
-                this.open = false;
-                this.getList();
-              } else {
-                this.msgError(response.msg);
-              }
+              this.msgSuccess("鏂板鎴愬姛");
+              this.open = false;
+              this.getList();
             });
           }
         }
@@ -342,7 +393,7 @@
         }).then(() => {
           this.getList();
           this.msgSuccess("鍒犻櫎鎴愬姛");
-        }).catch(function() {});
+        })
     }
   }
 };

--
Gitblit v1.9.3