Browse Source

表格右侧工具栏组件

tags/v2.2
RuoYi 4 years ago
parent
commit
b70e8ad81e
  1. 9
      ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
  2. 9
      ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
  3. 37
      ruoyi-ui/src/components/RightToolbar/index.vue
  4. 3
      ruoyi-ui/src/main.js
  5. 9
      ruoyi-ui/src/views/monitor/job/index.vue
  6. 9
      ruoyi-ui/src/views/monitor/job/log.vue
  7. 9
      ruoyi-ui/src/views/system/client/index.vue
  8. 9
      ruoyi-ui/src/views/system/config/index.vue
  9. 9
      ruoyi-ui/src/views/system/dept/index.vue
  10. 9
      ruoyi-ui/src/views/system/dict/data.vue
  11. 9
      ruoyi-ui/src/views/system/dict/index.vue
  12. 9
      ruoyi-ui/src/views/system/logininfor/index.vue
  13. 9
      ruoyi-ui/src/views/system/menu/index.vue
  14. 11
      ruoyi-ui/src/views/system/notice/index.vue
  15. 9
      ruoyi-ui/src/views/system/operlog/index.vue
  16. 9
      ruoyi-ui/src/views/system/post/index.vue
  17. 9
      ruoyi-ui/src/views/system/role/index.vue
  18. 9
      ruoyi-ui/src/views/system/user/index.vue
  19. 9
      ruoyi-ui/src/views/tool/gen/index.vue

9
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm

@ -66,14 +66,7 @@ @@ -66,14 +66,7 @@
v-hasPermi="['${moduleName}:${businessName}:add']"
>新增</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table

9
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm

@ -95,14 +95,7 @@ @@ -95,14 +95,7 @@
v-hasPermi="['${moduleName}:${businessName}:export']"
>导出</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">

37
ruoyi-ui/src/components/RightToolbar/index.vue

@ -0,0 +1,37 @@ @@ -0,0 +1,37 @@
<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>

3
ruoyi-ui/src/main.js

@ -21,6 +21,8 @@ import { getDicts } from "@/api/system/dict/data"; @@ -21,6 +21,8 @@ import { getDicts } from "@/api/system/dict/data";
import { getConfigKey } from "@/api/system/config";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
import Pagination from "@/components/Pagination";
//自定义表格工具扩展
import RightToolbar from "@/components/RightToolbar"
// 全局方法挂载
Vue.prototype.getDicts = getDicts
@ -47,6 +49,7 @@ Vue.prototype.msgInfo = function (msg) { @@ -47,6 +49,7 @@ Vue.prototype.msgInfo = function (msg) {
// 全局组件挂载
Vue.component('Pagination', Pagination)
Vue.component('RightToolbar', RightToolbar)
Vue.use(permission)

9
ruoyi-ui/src/views/monitor/job/index.vue

@ -84,14 +84,7 @@ @@ -84,14 +84,7 @@
v-hasPermi="['monitor:job:query']"
>日志</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange">

9
ruoyi-ui/src/views/monitor/job/log.vue

@ -90,14 +90,7 @@ @@ -90,14 +90,7 @@
v-hasPermi="['monitor:job:export']"
>导出</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="jobLogList" @selection-change="handleSelectionChange">

9
ruoyi-ui/src/views/system/client/index.vue

@ -46,14 +46,7 @@ @@ -46,14 +46,7 @@
v-hasPermi="['system:client:remove']"
>删除</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="clientList" @selection-change="handleSelectionChange">

9
ruoyi-ui/src/views/system/config/index.vue

@ -97,14 +97,7 @@ @@ -97,14 +97,7 @@
v-hasPermi="['system:config:remove']"
>清理缓存</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange">

9
ruoyi-ui/src/views/system/dept/index.vue

@ -36,14 +36,7 @@ @@ -36,14 +36,7 @@
v-hasPermi="['system:dept:add']"
>新增</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table

9
ruoyi-ui/src/views/system/dict/data.vue

@ -75,14 +75,7 @@ @@ -75,14 +75,7 @@
v-hasPermi="['system:dict:export']"
>导出</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">

9
ruoyi-ui/src/views/system/dict/index.vue

@ -103,14 +103,7 @@ @@ -103,14 +103,7 @@
v-hasPermi="['system:dict:remove']"
>清理缓存</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">

9
ruoyi-ui/src/views/system/logininfor/index.vue

@ -84,14 +84,7 @@ @@ -84,14 +84,7 @@
v-hasPermi="['system:logininfor:export']"
>导出</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">

9
ruoyi-ui/src/views/system/menu/index.vue

@ -36,14 +36,7 @@ @@ -36,14 +36,7 @@
v-hasPermi="['system:menu:add']"
>新增</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table

11
ruoyi-ui/src/views/system/notice/index.vue

@ -65,14 +65,7 @@ @@ -65,14 +65,7 @@
v-hasPermi="['system:notice:remove']"
>删除</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
@ -171,7 +164,7 @@ @@ -171,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>

9
ruoyi-ui/src/views/system/operlog/index.vue

@ -100,14 +100,7 @@ @@ -100,14 +100,7 @@
v-hasPermi="['system:config:export']"
>导出</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">

9
ruoyi-ui/src/views/system/post/index.vue

@ -74,14 +74,7 @@ @@ -74,14 +74,7 @@
v-hasPermi="['system:post:export']"
>导出</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">

9
ruoyi-ui/src/views/system/role/index.vue

@ -94,14 +94,7 @@ @@ -94,14 +94,7 @@
v-hasPermi="['system:role:export']"
>导出</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange">

9
ruoyi-ui/src/views/system/user/index.vue

@ -130,14 +130,7 @@ @@ -130,14 +130,7 @@
v-hasPermi="['system:user:export']"
>导出</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">

9
ruoyi-ui/src/views/tool/gen/index.vue

@ -76,14 +76,7 @@ @@ -76,14 +76,7 @@
v-hasPermi="['tool:gen:remove']"
>删除</el-button>
</el-col>
<div class="top-right-btn">
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
</el-tooltip>
</div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">

Loading…
Cancel
Save