Commit 74f52677be7718d63eef89e01c367058a2e43e57

Authored by RuoYi
1 parent 60d5c03e

表格右侧工具栏组件

ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
... ... @@ -66,7 +66,7 @@
66 66 v-hasPermi="['${moduleName}:${businessName}:add']"
67 67 >新增</el-button>
68 68 </el-col>
69   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  69 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
70 70 </el-row>
71 71  
72 72 <el-table
... ...
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
... ... @@ -95,7 +95,7 @@
95 95 v-hasPermi="['${moduleName}:${businessName}:export']"
96 96 >导出</el-button>
97 97 </el-col>
98   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  98 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
99 99 </el-row>
100 100  
101 101 <el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
... ...
ruoyi-ui/src/components/TableToolsExt/index.vue renamed to ruoyi-ui/src/components/RightToolbar/index.vue
1   -<!-- @author Shiyn/ huangmx 20200807优化-->
2   -<template>
3   - <div class="top-right-btn">
4   - <el-row>
5   - <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
6   - <el-button size="mini" circle icon="el-icon-search" @click="clickSearch()" />
7   - </el-tooltip>
8   - <el-tooltip class="item" effect="dark" content="刷新" placement="top">
9   - <el-button size="mini" circle icon="el-icon-refresh" @click="clickFresh()" />
10   - </el-tooltip>
11   - </el-row>
12   - </div>
13   -</template>
14   -<script>
15   -export default {
16   - name: "TableToolsExt",
17   - data() {
18   - return {};
19   - },
20   - props: {
21   - showSearch: {
22   - type: Boolean,
23   - default: true,
24   - },
25   - },
26   -
27   - methods: {
28   - //搜索
29   - clickSearch() {
30   - this.$emit("update:showSearch", !this.showSearch);
31   - },
32   - //刷新
33   - clickFresh() {
34   - this.$emit("queryTable");
35   - },
36   - },
37   -};
38   -</script>
39 1 \ No newline at end of file
  2 +<!-- @author Shiyn/ huangmx 20200807优化-->
  3 +<template>
  4 + <div class="top-right-btn">
  5 + <el-row>
  6 + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
  7 + <el-button size="mini" circle icon="el-icon-search" @click="toggleSearch()" />
  8 + </el-tooltip>
  9 + <el-tooltip class="item" effect="dark" content="刷新" placement="top">
  10 + <el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" />
  11 + </el-tooltip>
  12 + </el-row>
  13 + </div>
  14 +</template>
  15 +<script>
  16 +export default {
  17 + name: "RightToolbar",
  18 + data() {
  19 + return {};
  20 + },
  21 + props: {
  22 + showSearch: {
  23 + type: Boolean,
  24 + default: true,
  25 + },
  26 + },
  27 +
  28 + methods: {
  29 + //搜索
  30 + toggleSearch() {
  31 + this.$emit("update:showSearch", !this.showSearch);
  32 + },
  33 + //刷新
  34 + refresh() {
  35 + this.$emit("queryTable");
  36 + },
  37 + },
  38 +};
  39 +</script>
... ...
ruoyi-ui/src/main.js
... ... @@ -21,7 +21,7 @@ import { getConfigKey } from &quot;@/api/system/config&quot;;
21 21 import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/ruoyi";
22 22 import Pagination from "@/components/Pagination";
23 23 //自定义表格工具扩展
24   -import TableToolsExt from "@/components/TableToolsExt"
  24 +import RightToolbar from "@/components/RightToolbar"
25 25  
26 26 // 全局方法挂载
27 27 Vue.prototype.getDicts = getDicts
... ... @@ -48,7 +48,7 @@ Vue.prototype.msgInfo = function (msg) {
48 48  
49 49 // 全局组件挂载
50 50 Vue.component('Pagination', Pagination)
51   -Vue.component('TableToolsExt', TableToolsExt)
  51 +Vue.component('RightToolbar', RightToolbar)
52 52  
53 53 Vue.use(permission)
54 54  
... ...
ruoyi-ui/src/views/monitor/job/index.vue
... ... @@ -84,7 +84,7 @@
84 84 v-hasPermi="['monitor:job:query']"
85 85 >日志</el-button>
86 86 </el-col>
87   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  87 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
88 88 </el-row>
89 89  
90 90 <el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange">
... ...
ruoyi-ui/src/views/monitor/job/log.vue
... ... @@ -90,7 +90,7 @@
90 90 v-hasPermi="['monitor:job:export']"
91 91 >导出</el-button>
92 92 </el-col>
93   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  93 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
94 94 </el-row>
95 95  
96 96 <el-table v-loading="loading" :data="jobLogList" @selection-change="handleSelectionChange">
... ...
ruoyi-ui/src/views/monitor/logininfor/index.vue
... ... @@ -84,7 +84,7 @@
84 84 v-hasPermi="['system:logininfor:export']"
85 85 >导出</el-button>
86 86 </el-col>
87   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  87 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
88 88 </el-row>
89 89  
90 90 <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
... ...
ruoyi-ui/src/views/monitor/operlog/index.vue
... ... @@ -100,7 +100,7 @@
100 100 v-hasPermi="['system:config:export']"
101 101 >导出</el-button>
102 102 </el-col>
103   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  103 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
104 104 </el-row>
105 105  
106 106 <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
... ...
ruoyi-ui/src/views/system/config/index.vue
... ... @@ -97,7 +97,7 @@
97 97 v-hasPermi="['system:config:remove']"
98 98 >清理缓存</el-button>
99 99 </el-col>
100   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  100 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
101 101 </el-row>
102 102  
103 103 <el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange">
... ...
ruoyi-ui/src/views/system/dept/index.vue
... ... @@ -36,7 +36,7 @@
36 36 v-hasPermi="['system:dept:add']"
37 37 >新增</el-button>
38 38 </el-col>
39   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  39 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
40 40 </el-row>
41 41  
42 42 <el-table
... ...
ruoyi-ui/src/views/system/dict/data.vue
... ... @@ -75,7 +75,7 @@
75 75 v-hasPermi="['system:dict:export']"
76 76 >导出</el-button>
77 77 </el-col>
78   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  78 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
79 79 </el-row>
80 80  
81 81 <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
... ...
ruoyi-ui/src/views/system/dict/index.vue
... ... @@ -103,7 +103,7 @@
103 103 v-hasPermi="['system:dict:remove']"
104 104 >清理缓存</el-button>
105 105 </el-col>
106   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  106 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
107 107 </el-row>
108 108  
109 109 <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
... ...
ruoyi-ui/src/views/system/menu/index.vue
... ... @@ -36,7 +36,7 @@
36 36 v-hasPermi="['system:menu:add']"
37 37 >新增</el-button>
38 38 </el-col>
39   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  39 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
40 40 </el-row>
41 41  
42 42 <el-table
... ...
ruoyi-ui/src/views/system/notice/index.vue
... ... @@ -65,7 +65,7 @@
65 65 v-hasPermi="['system:notice:remove']"
66 66 >删除</el-button>
67 67 </el-col>
68   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  68 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
69 69 </el-row>
70 70  
71 71 <el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
... ... @@ -164,7 +164,7 @@
164 164 </el-col>
165 165 </el-row>
166 166 </el-form>
167   - <div slot="footer" class="dialog-footer" style="padding-top:20px">
  167 + <div slot="footer" class="dialog-footer" style="padding-top:30px">
168 168 <el-button type="primary" @click="submitForm">确 定</el-button>
169 169 <el-button @click="cancel">取 消</el-button>
170 170 </div>
... ...
ruoyi-ui/src/views/system/post/index.vue
... ... @@ -74,7 +74,7 @@
74 74 v-hasPermi="['system:post:export']"
75 75 >导出</el-button>
76 76 </el-col>
77   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  77 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
78 78 </el-row>
79 79  
80 80 <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
... ...
ruoyi-ui/src/views/system/role/index.vue
... ... @@ -94,7 +94,7 @@
94 94 v-hasPermi="['system:role:export']"
95 95 >导出</el-button>
96 96 </el-col>
97   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  97 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
98 98 </el-row>
99 99  
100 100 <el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange">
... ...
ruoyi-ui/src/views/system/user/index.vue
... ... @@ -49,7 +49,7 @@
49 49 <el-col :span="1.5">
50 50 <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:user:export']">导出</el-button>
51 51 </el-col>
52   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  52 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
53 53 </el-row>
54 54  
55 55 <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
... ...
ruoyi-ui/src/views/tool/gen/index.vue
... ... @@ -76,7 +76,7 @@
76 76 v-hasPermi="['tool:gen:remove']"
77 77 >删除</el-button>
78 78 </el-col>
79   - <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
  79 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
80 80 </el-row>
81 81  
82 82 <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
... ...