|
|
@ -3,9 +3,9 @@ |
|
|
|
<!-- 头部按钮 --> |
|
|
|
<div class="table-nav"> |
|
|
|
<curren-Button |
|
|
|
:isRoutePermission="isRoutePermission" |
|
|
|
v-if="headerButttondata" |
|
|
|
ref="tablePagination_topNav" |
|
|
|
:Butttondata="currenButtonData" |
|
|
|
:Butttondata="headerButttondata" |
|
|
|
@tableButtonClick="topbutton" |
|
|
|
@quicklySearchClick="quicklySearchClick" |
|
|
|
@quicklySearchClear="quicklySearchClear" |
|
|
@ -93,6 +93,13 @@ export default { |
|
|
|
rowDrop |
|
|
|
}, |
|
|
|
props: { |
|
|
|
// 不使用权限的按钮 |
|
|
|
noUsePermissionBtn:{ |
|
|
|
type: Array, |
|
|
|
default: () => { |
|
|
|
return ['refresh','field'] |
|
|
|
} |
|
|
|
}, |
|
|
|
rowMaxHeight:{ |
|
|
|
type:String, |
|
|
|
default:'calc(90vh - 280px)' |
|
|
@ -117,11 +124,6 @@ export default { |
|
|
|
type: Boolean, |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
// 是否按路由配置按钮权限 |
|
|
|
isRoutePermission:{ |
|
|
|
type: Boolean, |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
// 显示搜索配置 |
|
|
|
quicklySearchOption:{ |
|
|
|
type: Object, |
|
|
@ -234,6 +236,7 @@ export default { |
|
|
|
}, |
|
|
|
data () { |
|
|
|
return { |
|
|
|
headerButttondata:null, |
|
|
|
// 字段设置是否显示 |
|
|
|
rowDropVisible: false, |
|
|
|
// table 重新渲染所需key |
|
|
@ -282,6 +285,7 @@ export default { |
|
|
|
this.uTableTopHeight = this.appRemoveHeight |
|
|
|
this.uTableOuterHeight = this.$refs.tablePaginationTableRef.getTableHeight() |
|
|
|
this.uTableOuterHeight_init = Number(JSON.stringify(this.uTableOuterHeight)) |
|
|
|
this.initButttondata() |
|
|
|
|
|
|
|
// 点击外部,字段设置弹窗隐藏 |
|
|
|
document.addEventListener('click',(e)=>{ |
|
|
@ -296,6 +300,22 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
initButttondata(){ |
|
|
|
let _list = [] |
|
|
|
this.currenButtonData.forEach(item=>{ |
|
|
|
if(item.permission){ |
|
|
|
_list.push(item) |
|
|
|
}else{ |
|
|
|
if(this.noUsePermissionBtn.indexOf(item.name) < 0){ |
|
|
|
item.permission = [this.$route.name+'.'+item.name] |
|
|
|
}else{ |
|
|
|
item.permission = [] |
|
|
|
} |
|
|
|
_list.push(item) |
|
|
|
} |
|
|
|
}) |
|
|
|
this.headerButttondata = _list |
|
|
|
}, |
|
|
|
// 重新渲染表格 |
|
|
|
doFreshTableLayout(){ |
|
|
|
if(this.$refs.tablePaginationTableRef && this.$refs.tablePaginationTableRef.doFreshLayout){ |
|
|
@ -410,7 +430,7 @@ export default { |
|
|
|
// 全面筛选组件所有按钮事件 |
|
|
|
overallSearchFormClick(options){ |
|
|
|
//增加快速搜索实体 |
|
|
|
options.vm_quickly = this.$refs.tablePagination_topNav.getQuicklySearchDom() |
|
|
|
if(this.$refs.tablePagination_topNav)options.vm_quickly = this.$refs.tablePagination_topNav.getQuicklySearchDom() |
|
|
|
this.$emit("overallSearchFormClick", options) |
|
|
|
}, |
|
|
|
// 关闭字段设置 |
|
|
|