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