From 74f52677be7718d63eef89e01c367058a2e43e57 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期一, 10 八月 2020 10:12:39 +0800
Subject: [PATCH] 表格右侧工具栏组件

---
 ruoyi-ui/src/views/system/dict/data.vue                     |    2 
 ruoyi-ui/src/views/monitor/job/log.vue                      |    2 
 ruoyi-ui/src/views/tool/gen/index.vue                       |    2 
 ruoyi-ui/src/views/system/notice/index.vue                  |    4 +-
 ruoyi-ui/src/views/system/role/index.vue                    |    2 
 ruoyi-generator/src/main/resources/vm/vue/index.vue.vm      |    2 
 ruoyi-ui/src/views/system/menu/index.vue                    |    2 
 ruoyi-ui/src/views/system/user/index.vue                    |    2 
 ruoyi-ui/src/views/system/dept/index.vue                    |    2 
 ruoyi-ui/src/views/monitor/job/index.vue                    |    2 
 ruoyi-ui/src/views/monitor/operlog/index.vue                |    2 
 ruoyi-ui/src/components/RightToolbar/index.vue              |   76 +++++++++++++++++++-------------------
 ruoyi-ui/src/views/system/config/index.vue                  |    2 
 ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm |    2 
 ruoyi-ui/src/views/system/dict/index.vue                    |    2 
 ruoyi-ui/src/main.js                                        |    4 +-
 ruoyi-ui/src/views/monitor/logininfor/index.vue             |    2 
 ruoyi-ui/src/views/system/post/index.vue                    |    2 
 18 files changed, 57 insertions(+), 57 deletions(-)

diff --git a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
index 21f5138..495a94c 100644
--- a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
+++ b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
@@ -66,7 +66,7 @@
           v-hasPermi="['${moduleName}:${businessName}:add']"
         >新增</el-button>
       </el-col>
-	  <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table
diff --git a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
index a92fad0..3e5298c 100644
--- a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
+++ b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
@@ -95,7 +95,7 @@
           v-hasPermi="['${moduleName}:${businessName}:export']"
         >导出</el-button>
       </el-col>
-	  <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
diff --git a/ruoyi-ui/src/components/TableToolsExt/index.vue b/ruoyi-ui/src/components/RightToolbar/index.vue
similarity index 87%
rename from ruoyi-ui/src/components/TableToolsExt/index.vue
rename to ruoyi-ui/src/components/RightToolbar/index.vue
index 534dd23..73d2dcc 100644
--- a/ruoyi-ui/src/components/TableToolsExt/index.vue
+++ b/ruoyi-ui/src/components/RightToolbar/index.vue
@@ -1,38 +1,38 @@
-<!-- @author Shiyn/   huangmx 20200807优化-->
-<template>
-  <div class="top-right-btn">
-    <el-row>
-      <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
-        <el-button size="mini" circle icon="el-icon-search" @click="clickSearch()" />
-      </el-tooltip>
-      <el-tooltip class="item" effect="dark" content="刷新" placement="top">
-        <el-button size="mini" circle icon="el-icon-refresh" @click="clickFresh()" />
-      </el-tooltip>
-    </el-row>
-  </div>
-</template>
-<script>
-export default {
-  name: "TableToolsExt",
-  data() {
-    return {};
-  },
-  props: {
-    showSearch: {
-      type: Boolean,
-      default: true,
-    },
-  },
-
-  methods: {
-    //搜索
-    clickSearch() {
-      this.$emit("update:showSearch", !this.showSearch);
-    },
-    //刷新
-    clickFresh() {
-      this.$emit("queryTable");
-    },
-  },
-};
-</script>
\ No newline at end of file
+<!-- @author Shiyn/   huangmx 20200807优化-->
+<template>
+  <div class="top-right-btn">
+    <el-row>
+      <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
+        <el-button size="mini" circle icon="el-icon-search" @click="toggleSearch()" />
+      </el-tooltip>
+      <el-tooltip class="item" effect="dark" content="刷新" placement="top">
+        <el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" />
+      </el-tooltip>
+    </el-row>
+  </div>
+</template>
+<script>
+export default {
+  name: "RightToolbar",
+  data() {
+    return {};
+  },
+  props: {
+    showSearch: {
+      type: Boolean,
+      default: true,
+    },
+  },
+
+  methods: {
+    //搜索
+    toggleSearch() {
+      this.$emit("update:showSearch", !this.showSearch);
+    },
+    //刷新
+    refresh() {
+      this.$emit("queryTable");
+    },
+  },
+};
+</script>
diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js
index 037ecf9..27a0ba6 100644
--- a/ruoyi-ui/src/main.js
+++ b/ruoyi-ui/src/main.js
@@ -21,7 +21,7 @@
 import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/ruoyi";
 import Pagination from "@/components/Pagination";
 //自定义表格工具扩展
-import TableToolsExt from "@/components/TableToolsExt"
+import RightToolbar from "@/components/RightToolbar"
 
 // 全局方法挂载
 Vue.prototype.getDicts = getDicts
@@ -48,7 +48,7 @@
 
 // 全局组件挂载
 Vue.component('Pagination', Pagination)
-Vue.component('TableToolsExt', TableToolsExt)
+Vue.component('RightToolbar', RightToolbar)
 
 Vue.use(permission)
 
diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue
index 5f0cc21..be92199 100644
--- a/ruoyi-ui/src/views/monitor/job/index.vue
+++ b/ruoyi-ui/src/views/monitor/job/index.vue
@@ -84,7 +84,7 @@
           v-hasPermi="['monitor:job:query']"
         >日志</el-button>
       </el-col>
-      <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange">
diff --git a/ruoyi-ui/src/views/monitor/job/log.vue b/ruoyi-ui/src/views/monitor/job/log.vue
index ab15965..10299dd 100644
--- a/ruoyi-ui/src/views/monitor/job/log.vue
+++ b/ruoyi-ui/src/views/monitor/job/log.vue
@@ -90,7 +90,7 @@
           v-hasPermi="['monitor:job:export']"
         >导出</el-button>
       </el-col>
-      <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="jobLogList" @selection-change="handleSelectionChange">
diff --git a/ruoyi-ui/src/views/monitor/logininfor/index.vue b/ruoyi-ui/src/views/monitor/logininfor/index.vue
index 9aec14e..8b0cdc4 100644
--- a/ruoyi-ui/src/views/monitor/logininfor/index.vue
+++ b/ruoyi-ui/src/views/monitor/logininfor/index.vue
@@ -84,7 +84,7 @@
           v-hasPermi="['system:logininfor:export']"
         >导出</el-button>
       </el-col>
-      <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
diff --git a/ruoyi-ui/src/views/monitor/operlog/index.vue b/ruoyi-ui/src/views/monitor/operlog/index.vue
index 7eb7572..1371cdf 100644
--- a/ruoyi-ui/src/views/monitor/operlog/index.vue
+++ b/ruoyi-ui/src/views/monitor/operlog/index.vue
@@ -100,7 +100,7 @@
           v-hasPermi="['system:config:export']"
         >导出</el-button>
       </el-col>
-      <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue
index c5d7ffd..0d88b00 100644
--- a/ruoyi-ui/src/views/system/config/index.vue
+++ b/ruoyi-ui/src/views/system/config/index.vue
@@ -97,7 +97,7 @@
           v-hasPermi="['system:config:remove']"
         >清理缓存</el-button>
       </el-col>
-      <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange">
diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/ruoyi-ui/src/views/system/dept/index.vue
index 13c30d4..ae2aaaa 100644
--- a/ruoyi-ui/src/views/system/dept/index.vue
+++ b/ruoyi-ui/src/views/system/dept/index.vue
@@ -36,7 +36,7 @@
           v-hasPermi="['system:dept:add']"
         >新增</el-button>
       </el-col>
-      <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table
diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue
index 46abd6d..b86d245 100644
--- a/ruoyi-ui/src/views/system/dict/data.vue
+++ b/ruoyi-ui/src/views/system/dict/data.vue
@@ -75,7 +75,7 @@
           v-hasPermi="['system:dict:export']"
         >导出</el-button>
       </el-col>
-      <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue
index d278352..7b831da 100644
--- a/ruoyi-ui/src/views/system/dict/index.vue
+++ b/ruoyi-ui/src/views/system/dict/index.vue
@@ -103,7 +103,7 @@
           v-hasPermi="['system:dict:remove']"
         >清理缓存</el-button>
       </el-col>
-      <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue
index 53e9181..52f15a4 100644
--- a/ruoyi-ui/src/views/system/menu/index.vue
+++ b/ruoyi-ui/src/views/system/menu/index.vue
@@ -36,7 +36,7 @@
           v-hasPermi="['system:menu:add']"
         >新增</el-button>
       </el-col>
-      <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table
diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/ruoyi-ui/src/views/system/notice/index.vue
index 2e97c23..078d94a 100644
--- a/ruoyi-ui/src/views/system/notice/index.vue
+++ b/ruoyi-ui/src/views/system/notice/index.vue
@@ -65,7 +65,7 @@
           v-hasPermi="['system:notice:remove']"
         >删除</el-button>
       </el-col>
-      <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
@@ -164,7 +164,7 @@
           </el-col>
         </el-row>
       </el-form>
-      <div slot="footer" class="dialog-footer" style="padding-top:20px">
+      <div slot="footer" class="dialog-footer" style="padding-top:30px">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
diff --git a/ruoyi-ui/src/views/system/post/index.vue b/ruoyi-ui/src/views/system/post/index.vue
index f27ee3d..b66060d 100644
--- a/ruoyi-ui/src/views/system/post/index.vue
+++ b/ruoyi-ui/src/views/system/post/index.vue
@@ -74,7 +74,7 @@
           v-hasPermi="['system:post:export']"
         >导出</el-button>
       </el-col>
-      <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue
index 8006e96..7780c1f 100644
--- a/ruoyi-ui/src/views/system/role/index.vue
+++ b/ruoyi-ui/src/views/system/role/index.vue
@@ -94,7 +94,7 @@
           v-hasPermi="['system:role:export']"
         >导出</el-button>
       </el-col>
-      <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange">
diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index bfef3a8..0dda538 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -49,7 +49,7 @@
           <el-col :span="1.5">
             <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:user:export']">导出</el-button>
           </el-col>
-          <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
         </el-row>
 
         <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue
index fe4d42e..7f37f62 100644
--- a/ruoyi-ui/src/views/tool/gen/index.vue
+++ b/ruoyi-ui/src/views/tool/gen/index.vue
@@ -76,7 +76,7 @@
           v-hasPermi="['tool:gen:remove']"
         >删除</el-button>
       </el-col>
-      <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">

--
Gitblit v1.9.2