Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
74f52677
Commit
74f52677
authored
Aug 10, 2020
by
RuoYi
Browse files
表格右侧工具栏组件
parent
60d5c03e
Changes
18
Hide whitespace changes
Inline
Side-by-side
ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
View file @
74f52677
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
v-hasPermi=
"['
${
moduleName
}
:
${
businessName
}
:add']"
v-hasPermi=
"['
${
moduleName
}
:
${
businessName
}
:add']"
>
新增
</el-button>
>
新增
</el-button>
</el-col>
</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-row>
<el-table
<el-table
...
...
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
View file @
74f52677
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
v-hasPermi=
"['
${
moduleName
}
:
${
businessName
}
:export']"
v-hasPermi=
"['
${
moduleName
}
:
${
businessName
}
:export']"
>
导出
</el-button>
>
导出
</el-button>
</el-col>
</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-row>
<el-table
v-loading=
"loading"
:data=
"
${
businessName
}
List"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"
${
businessName
}
List"
@
selection-change=
"handleSelectionChange"
>
...
...
ruoyi-ui/src/components/
TableToolsExt
/index.vue
→
ruoyi-ui/src/components/
RightToolbar
/index.vue
View file @
74f52677
<!-- @author Shiyn/ huangmx 20200807优化-->
<!-- @author Shiyn/ huangmx 20200807优化-->
<
template
>
<
template
>
<div
class=
"top-right-btn"
>
<div
class=
"top-right-btn"
>
<el-row>
<el-row>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"showSearch ? '隐藏搜索' : '显示搜索'"
placement=
"top"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"showSearch ? '隐藏搜索' : '显示搜索'"
placement=
"top"
>
<el-button
size=
"mini"
circle
icon=
"el-icon-search"
@
click=
"clickSearch()"
/>
<el-button
size=
"mini"
circle
icon=
"el-icon-search"
@
click=
"toggleSearch()"
/>
</el-tooltip>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"刷新"
placement=
"top"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"刷新"
placement=
"top"
>
<el-button
size=
"mini"
circle
icon=
"el-icon-refresh"
@
click=
"clickFresh()"
/>
<el-button
size=
"mini"
circle
icon=
"el-icon-refresh"
@
click=
"refresh()"
/>
</el-tooltip>
</el-tooltip>
</el-row>
</el-row>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"
TableToolsExt
"
,
name
:
"
RightToolbar
"
,
data
()
{
data
()
{
return
{};
return
{};
},
},
props
:
{
props
:
{
showSearch
:
{
showSearch
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
,
default
:
true
,
},
},
},
},
methods
:
{
methods
:
{
//搜索
//搜索
clickSearch
()
{
toggleSearch
()
{
this
.
$emit
(
"
update:showSearch
"
,
!
this
.
showSearch
);
this
.
$emit
(
"
update:showSearch
"
,
!
this
.
showSearch
);
},
},
//刷新
//刷新
clickFresh
()
{
refresh
()
{
this
.
$emit
(
"
queryTable
"
);
this
.
$emit
(
"
queryTable
"
);
},
},
},
},
};
};
</
script
>
</
script
>
\ No newline at end of file
ruoyi-ui/src/main.js
View file @
74f52677
...
@@ -21,7 +21,7 @@ import { getConfigKey } from "@/api/system/config";
...
@@ -21,7 +21,7 @@ import { getConfigKey } from "@/api/system/config";
import
{
parseTime
,
resetForm
,
addDateRange
,
selectDictLabel
,
selectDictLabels
,
download
,
handleTree
}
from
"
@/utils/ruoyi
"
;
import
{
parseTime
,
resetForm
,
addDateRange
,
selectDictLabel
,
selectDictLabels
,
download
,
handleTree
}
from
"
@/utils/ruoyi
"
;
import
Pagination
from
"
@/components/Pagination
"
;
import
Pagination
from
"
@/components/Pagination
"
;
//自定义表格工具扩展
//自定义表格工具扩展
import
TableToolsExt
from
"
@/components/
TableToolsExt
"
import
RightToolbar
from
"
@/components/
RightToolbar
"
// 全局方法挂载
// 全局方法挂载
Vue
.
prototype
.
getDicts
=
getDicts
Vue
.
prototype
.
getDicts
=
getDicts
...
@@ -48,7 +48,7 @@ Vue.prototype.msgInfo = function (msg) {
...
@@ -48,7 +48,7 @@ Vue.prototype.msgInfo = function (msg) {
// 全局组件挂载
// 全局组件挂载
Vue
.
component
(
'
Pagination
'
,
Pagination
)
Vue
.
component
(
'
Pagination
'
,
Pagination
)
Vue
.
component
(
'
TableToolsExt
'
,
TableToolsExt
)
Vue
.
component
(
'
RightToolbar
'
,
RightToolbar
)
Vue
.
use
(
permission
)
Vue
.
use
(
permission
)
...
...
ruoyi-ui/src/views/monitor/job/index.vue
View file @
74f52677
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
v-hasPermi=
"['monitor:job:query']"
v-hasPermi=
"['monitor:job:query']"
>
日志
</el-button>
>
日志
</el-button>
</el-col>
</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-row>
<el-table
v-loading=
"loading"
:data=
"jobList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"jobList"
@
selection-change=
"handleSelectionChange"
>
...
...
ruoyi-ui/src/views/monitor/job/log.vue
View file @
74f52677
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
v-hasPermi=
"['monitor:job:export']"
v-hasPermi=
"['monitor:job:export']"
>
导出
</el-button>
>
导出
</el-button>
</el-col>
</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-row>
<el-table
v-loading=
"loading"
:data=
"jobLogList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"jobLogList"
@
selection-change=
"handleSelectionChange"
>
...
...
ruoyi-ui/src/views/monitor/logininfor/index.vue
View file @
74f52677
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
v-hasPermi=
"['system:logininfor:export']"
v-hasPermi=
"['system:logininfor:export']"
>
导出
</el-button>
>
导出
</el-button>
</el-col>
</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-row>
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
...
...
ruoyi-ui/src/views/monitor/operlog/index.vue
View file @
74f52677
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
v-hasPermi=
"['system:config:export']"
v-hasPermi=
"['system:config:export']"
>
导出
</el-button>
>
导出
</el-button>
</el-col>
</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-row>
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
...
...
ruoyi-ui/src/views/system/config/index.vue
View file @
74f52677
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
v-hasPermi=
"['system:config:remove']"
v-hasPermi=
"['system:config:remove']"
>
清理缓存
</el-button>
>
清理缓存
</el-button>
</el-col>
</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-row>
<el-table
v-loading=
"loading"
:data=
"configList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"configList"
@
selection-change=
"handleSelectionChange"
>
...
...
ruoyi-ui/src/views/system/dept/index.vue
View file @
74f52677
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
v-hasPermi=
"['system:dept:add']"
v-hasPermi=
"['system:dept:add']"
>
新增
</el-button>
>
新增
</el-button>
</el-col>
</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-row>
<el-table
<el-table
...
...
ruoyi-ui/src/views/system/dict/data.vue
View file @
74f52677
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
v-hasPermi=
"['system:dict:export']"
v-hasPermi=
"['system:dict:export']"
>
导出
</el-button>
>
导出
</el-button>
</el-col>
</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-row>
<el-table
v-loading=
"loading"
:data=
"dataList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"dataList"
@
selection-change=
"handleSelectionChange"
>
...
...
ruoyi-ui/src/views/system/dict/index.vue
View file @
74f52677
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
v-hasPermi=
"['system:dict:remove']"
v-hasPermi=
"['system:dict:remove']"
>
清理缓存
</el-button>
>
清理缓存
</el-button>
</el-col>
</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-row>
<el-table
v-loading=
"loading"
:data=
"typeList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"typeList"
@
selection-change=
"handleSelectionChange"
>
...
...
ruoyi-ui/src/views/system/menu/index.vue
View file @
74f52677
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
v-hasPermi=
"['system:menu:add']"
v-hasPermi=
"['system:menu:add']"
>
新增
</el-button>
>
新增
</el-button>
</el-col>
</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-row>
<el-table
<el-table
...
...
ruoyi-ui/src/views/system/notice/index.vue
View file @
74f52677
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
v-hasPermi=
"['system:notice:remove']"
v-hasPermi=
"['system:notice:remove']"
>
删除
</el-button>
>
删除
</el-button>
</el-col>
</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-row>
<el-table
v-loading=
"loading"
:data=
"noticeList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"noticeList"
@
selection-change=
"handleSelectionChange"
>
...
@@ -164,7 +164,7 @@
...
@@ -164,7 +164,7 @@
<
/el-col>
<
/el-col>
<
/el-row>
<
/el-row>
<
/el-form>
<
/el-form>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
style
=
"
padding-top:
2
0px
"
>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
style
=
"
padding-top:
3
0px
"
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
submitForm
"
>
确
定
<
/el-button>
<
el
-
button
type
=
"
primary
"
@
click
=
"
submitForm
"
>
确
定
<
/el-button>
<
el
-
button
@
click
=
"
cancel
"
>
取
消
<
/el-button>
<
el
-
button
@
click
=
"
cancel
"
>
取
消
<
/el-button>
<
/div>
<
/div>
...
...
ruoyi-ui/src/views/system/post/index.vue
View file @
74f52677
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
v-hasPermi=
"['system:post:export']"
v-hasPermi=
"['system:post:export']"
>
导出
</el-button>
>
导出
</el-button>
</el-col>
</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-row>
<el-table
v-loading=
"loading"
:data=
"postList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"postList"
@
selection-change=
"handleSelectionChange"
>
...
...
ruoyi-ui/src/views/system/role/index.vue
View file @
74f52677
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
v-hasPermi=
"['system:role:export']"
v-hasPermi=
"['system:role:export']"
>
导出
</el-button>
>
导出
</el-button>
</el-col>
</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-row>
<el-table
v-loading=
"loading"
:data=
"roleList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"roleList"
@
selection-change=
"handleSelectionChange"
>
...
...
ruoyi-ui/src/views/system/user/index.vue
View file @
74f52677
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
<el-col
:span=
"1.5"
>
<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-button
type=
"warning"
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['system:user:export']"
>
导出
</el-button>
</el-col>
</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-row>
<el-table
v-loading=
"loading"
:data=
"userList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"userList"
@
selection-change=
"handleSelectionChange"
>
...
...
ruoyi-ui/src/views/tool/gen/index.vue
View file @
74f52677
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
v-hasPermi=
"['tool:gen:remove']"
v-hasPermi=
"['tool:gen:remove']"
>
删除
</el-button>
>
删除
</el-button>
</el-col>
</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-row>
<el-table
v-loading=
"loading"
:data=
"tableList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"tableList"
@
selection-change=
"handleSelectionChange"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment