Browse Source

【接口看板+store+job+inventory】表格多选及权限按钮优化开发

master
安虹睿 11 months ago
parent
commit
9328b78acb
  1. 19
      PC/InterFace.Dash/src/components/tablePagination/index.vue
  2. 31
      PC/InterFace.Dash/src/components/umyTable/index.vue
  3. 12
      PC/InterFace.Dash/src/utils/defaultButtons.js
  4. 19
      PC/UI.WinIn.FasterZ.Inventory/src/components/tablePagination/index.vue
  5. 33
      PC/UI.WinIn.FasterZ.Inventory/src/components/umyTable/index.vue
  6. 12
      PC/UI.WinIn.FasterZ.Inventory/src/utils/defaultButtons.js
  7. 19
      PC/UI.WinIn.FasterZ.Job/src/components/tablePagination/index.vue
  8. 33
      PC/UI.WinIn.FasterZ.Job/src/components/umyTable/index.vue
  9. 12
      PC/UI.WinIn.FasterZ.Job/src/utils/defaultButtons.js
  10. 19
      PC/UI.WinIn.FasterZ.Store/src/components/tablePagination/index.vue
  11. 33
      PC/UI.WinIn.FasterZ.Store/src/components/umyTable/index.vue
  12. 12
      PC/UI.WinIn.FasterZ.Store/src/utils/defaultButtons.js

19
PC/InterFace.Dash/src/components/tablePagination/index.vue

@ -67,6 +67,7 @@
:firstFixed="true" :firstFixed="true"
:cellStyle = "cellStyle" :cellStyle = "cellStyle"
:showOverflowTooltip="showOverflowTooltip" :showOverflowTooltip="showOverflowTooltip"
:selectionColumnHandle="selectionColumnHandle"
> >
<template> <template>
<slot></slot> <slot></slot>
@ -98,13 +99,6 @@ export default {
rowDrop rowDrop
}, },
props: { props: {
// 使
noUsePermissionBtn:{
type: Array,
default: () => {
return ['refresh','field','filterForDetail','export','filter']//
}
},
rowMaxHeight:{ rowMaxHeight:{
type:String, type:String,
default:'calc(90vh - 280px)' default:'calc(90vh - 280px)'
@ -237,6 +231,11 @@ export default {
rowSource:{ rowSource:{
type:String, type:String,
default:'list_api' default:'list_api'
},
//
selectionColumnHandle:{
type: Function,
default: null
} }
}, },
data () { data () {
@ -305,13 +304,17 @@ export default {
}) })
}, },
methods: { methods: {
// (使)
clearTableSelection(){
this.$refs.tablePaginationTableRef.clearTableSelection();
},
initButttondata(){ initButttondata(){
let _list = [] let _list = []
this.currenButtonData.forEach(item=>{ this.currenButtonData.forEach(item=>{
if(item.permission){ if(item.permission){
_list.push(item) _list.push(item)
}else{ }else{
if(this.noUsePermissionBtn.indexOf(item.name) < 0){ if(!item.isNoPermission){
let _scope = item.clientScope || localStorage.getItem('appClientScope') let _scope = item.clientScope || localStorage.getItem('appClientScope')
item.permission = [_scope + '.' +this.$route.name+'.'+(item.permissionName || item.name)] item.permission = [_scope + '.' +this.$route.name+'.'+(item.permissionName || item.name)]
}else{ }else{

31
PC/InterFace.Dash/src/components/umyTable/index.vue

@ -18,7 +18,13 @@
header-row-class-name="uTableHeader" header-row-class-name="uTableHeader"
> >
<!-- :tree-props="treeProps" height 不能共存 此组件暂不支持tree的格式--> <!-- :tree-props="treeProps" height 不能共存 此组件暂不支持tree的格式-->
<u-table-column v-if="selectionTable" fixed="left" type="selection" :reserve-selection="true" /> <u-table-column
v-if="selectionTable"
fixed="left"
type="selection"
:reserve-selection="true"
:selectable="selectionHandle"
/>
<u-table-column v-if="isShowIndex" type="index" fixed="left" label="序号" width="50" /> <u-table-column v-if="isShowIndex" type="index" fixed="left" label="序号" width="50" />
<template v-for="(item, index) in TableSize"> <template v-for="(item, index) in TableSize">
<u-table-column <u-table-column
@ -130,7 +136,7 @@
<u-table-column <u-table-column
v-if="buttonOperationList_left" v-if="buttonOperationList_left"
:fixed="'left'" :fixed="'left'"
width="auto" :width="operationLeftColumnWidth()"
min-width="120px" min-width="120px"
:align="'center'" :align="'center'"
:header-align="'center'" :header-align="'center'"
@ -144,6 +150,7 @@
:key="indexButton" :key="indexButton"
type="text" type="text"
size="mini" size="mini"
:style="{color:itemButton.color || '#409EFF'}"
@click="buttonOperationClick_left(scope.row, itemButton, indexButton)" @click="buttonOperationClick_left(scope.row, itemButton, indexButton)"
>{{itemButton.label}}</el-button> >{{itemButton.label}}</el-button>
</template> </template>
@ -250,7 +257,7 @@ export default {
// tableborder // tableborder
tableBorder: { tableBorder: {
type: Boolean, type: Boolean,
default: false, default: true,
}, },
// itemfixed // itemfixed
firstFixed: { firstFixed: {
@ -332,6 +339,11 @@ export default {
default: () => { default: () => {
return 280; return 280;
} }
},
//
selectionColumnHandle:{
type: Function,
default: null
} }
}, },
data() { data() {
@ -398,6 +410,19 @@ export default {
this.setTableHeightHandle() this.setTableHeightHandle()
}, },
methods: { methods: {
//
selectionHandle(row,index){
return this.selectionColumnHandle(row,index)
},
// (使)
clearTableSelection(){
this.$refs.multipleTable.clearSelection();
},
//
operationLeftColumnWidth(){
if(this.buttonOperationList_left.length == 1){return 120}
else{return this.buttonOperationList_left.length * 100}
},
// //
doFreshLayout(){ doFreshLayout(){
if (this.$refs.multipleTable && this.$refs.multipleTable.doLayout) { if (this.$refs.multipleTable && this.$refs.multipleTable.doLayout) {

12
PC/InterFace.Dash/src/utils/defaultButtons.js

@ -39,6 +39,7 @@ export function defaultExportBtn(option) {
label: i18n.t('btns.export'), label: i18n.t('btns.export'),
name: "export", name: "export",
size: "mini", size: "mini",
isNoPermission:true
}) })
} }
@ -69,7 +70,8 @@ export function defaultFieldSettingBtn(option,source) {
name: "field", name: "field",
size: "mini", size: "mini",
float: 'right', float: 'right',
class: "rowDropNotHideItem" class: "rowDropNotHideItem",
isNoPermission:true
}) })
} }
@ -80,7 +82,8 @@ export function defaultFreshBtn(option) {
label: i18n.t('btns.fresh'), label: i18n.t('btns.fresh'),
name: "refresh", name: "refresh",
size: "mini", size: "mini",
float: 'right' float: 'right',
isNoPermission:true
}) })
} }
@ -92,7 +95,8 @@ export function defaultFilterBtn(option) {
label: i18n.t('btns.filter'), label: i18n.t('btns.filter'),
name: "filter", name: "filter",
size: "mini", size: "mini",
float: 'left' float: 'left',
isNoPermission:true
}) })
} }
@ -105,6 +109,7 @@ export function defaultFilterForDetailBtn(option) {
name: "filterForDetail", name: "filterForDetail",
size: "mini", size: "mini",
float: 'left', float: 'left',
isNoPermission:true
}) })
} }
@ -126,5 +131,6 @@ function __defaultBtnOption(option,specific){
permission:option && option.permission ? option.permission : null, permission:option && option.permission ? option.permission : null,
clientScope:option && option.clientScope ? option.clientScope : null, clientScope:option && option.clientScope ? option.clientScope : null,
permissionName:option && option.permissionName ? option.permissionName : specific.permissionName, permissionName:option && option.permissionName ? option.permissionName : specific.permissionName,
isNoPermission:option && option.isNoPermission ? option.isNoPermission : specific.isNoPermission
} }
} }

19
PC/UI.WinIn.FasterZ.Inventory/src/components/tablePagination/index.vue

@ -62,6 +62,7 @@
:firstFixed="true" :firstFixed="true"
:cellStyle = "cellStyle" :cellStyle = "cellStyle"
:showOverflowTooltip="showOverflowTooltip" :showOverflowTooltip="showOverflowTooltip"
:selectionColumnHandle="selectionColumnHandle"
> >
<template> <template>
<slot></slot> <slot></slot>
@ -93,13 +94,6 @@ export default {
rowDrop rowDrop
}, },
props: { props: {
// 使
noUsePermissionBtn:{
type: Array,
default: () => {
return ['refresh','field','filterForDetail','export','filter']//
}
},
rowMaxHeight:{ rowMaxHeight:{
type:String, type:String,
default:'calc(90vh - 280px)' default:'calc(90vh - 280px)'
@ -232,6 +226,11 @@ export default {
rowSource:{ rowSource:{
type:String, type:String,
default:'list_api' default:'list_api'
},
//
selectionColumnHandle:{
type: Function,
default: null
} }
}, },
data () { data () {
@ -300,13 +299,17 @@ export default {
}) })
}, },
methods: { methods: {
// (使)
clearTableSelection(){
this.$refs.tablePaginationTableRef.clearTableSelection();
},
initButttondata(){ initButttondata(){
let _list = [] let _list = []
this.currenButtonData.forEach(item=>{ this.currenButtonData.forEach(item=>{
if(item.permission){ if(item.permission){
_list.push(item) _list.push(item)
}else{ }else{
if(this.noUsePermissionBtn.indexOf(item.name) < 0){ if(!item.isNoPermission){
let _scope = item.clientScope || localStorage.getItem('appClientScope') let _scope = item.clientScope || localStorage.getItem('appClientScope')
item.permission = [_scope + '.' +this.$route.name+'.'+(item.permissionName || item.name)] item.permission = [_scope + '.' +this.$route.name+'.'+(item.permissionName || item.name)]
}else{ }else{

33
PC/UI.WinIn.FasterZ.Inventory/src/components/umyTable/index.vue

@ -18,7 +18,13 @@
header-row-class-name="uTableHeader" header-row-class-name="uTableHeader"
> >
<!-- :tree-props="treeProps" height 不能共存 此组件暂不支持tree的格式--> <!-- :tree-props="treeProps" height 不能共存 此组件暂不支持tree的格式-->
<u-table-column v-if="selectionTable" fixed="left" type="selection" :reserve-selection="true" /> <u-table-column
v-if="selectionTable"
fixed="left"
type="selection"
:reserve-selection="true"
:selectable="selectionHandle"
/>
<u-table-column v-if="isShowIndex" type="index" fixed="left" label="序号" width="50" /> <u-table-column v-if="isShowIndex" type="index" fixed="left" label="序号" width="50" />
<template v-for="(item, index) in TableSize"> <template v-for="(item, index) in TableSize">
<u-table-column <u-table-column
@ -130,7 +136,7 @@
<u-table-column <u-table-column
v-if="buttonOperationList_left" v-if="buttonOperationList_left"
:fixed="'left'" :fixed="'left'"
width="auto" :width="operationLeftColumnWidth()"
min-width="120px" min-width="120px"
:align="'center'" :align="'center'"
:header-align="'center'" :header-align="'center'"
@ -144,6 +150,7 @@
:key="indexButton" :key="indexButton"
type="text" type="text"
size="mini" size="mini"
:style="{color:itemButton.color || '#409EFF'}"
@click="buttonOperationClick_left(scope.row, itemButton, indexButton)" @click="buttonOperationClick_left(scope.row, itemButton, indexButton)"
>{{itemButton.label}}</el-button> >{{itemButton.label}}</el-button>
</template> </template>
@ -250,7 +257,7 @@ export default {
// tableborder // tableborder
tableBorder: { tableBorder: {
type: Boolean, type: Boolean,
default: false, default: true,
}, },
// itemfixed // itemfixed
firstFixed: { firstFixed: {
@ -332,6 +339,11 @@ export default {
default: () => { default: () => {
return 280; return 280;
} }
},
//
selectionColumnHandle:{
type: Function,
default: null
} }
}, },
data() { data() {
@ -398,6 +410,19 @@ export default {
this.setTableHeightHandle() this.setTableHeightHandle()
}, },
methods: { methods: {
//
selectionHandle(row,index){
return this.selectionColumnHandle(row,index)
},
// (使)
clearTableSelection(){
this.$refs.multipleTable.clearSelection();
},
//
operationLeftColumnWidth(){
if(this.buttonOperationList_left.length == 1){return 120}
else{return this.buttonOperationList_left.length * 100}
},
// //
doFreshLayout(){ doFreshLayout(){
if (this.$refs.multipleTable && this.$refs.multipleTable.doLayout) { if (this.$refs.multipleTable && this.$refs.multipleTable.doLayout) {
@ -414,7 +439,7 @@ export default {
this.$refs.multipleTable.$forceUpdate() this.$refs.multipleTable.$forceUpdate()
}); });
}, },
// //
getTableHeight(){ getTableHeight(){
return this.uTableHeight return this.uTableHeight
}, },

12
PC/UI.WinIn.FasterZ.Inventory/src/utils/defaultButtons.js

@ -39,6 +39,7 @@ export function defaultExportBtn(option) {
label: i18n.t('btns.export'), label: i18n.t('btns.export'),
name: "export", name: "export",
size: "mini", size: "mini",
isNoPermission:true
}) })
} }
@ -69,7 +70,8 @@ export function defaultFieldSettingBtn(option,source) {
name: "field", name: "field",
size: "mini", size: "mini",
float: 'right', float: 'right',
class: "rowDropNotHideItem" class: "rowDropNotHideItem",
isNoPermission:true
}) })
} }
@ -80,7 +82,8 @@ export function defaultFreshBtn(option) {
label: i18n.t('btns.fresh'), label: i18n.t('btns.fresh'),
name: "refresh", name: "refresh",
size: "mini", size: "mini",
float: 'right' float: 'right',
isNoPermission:true
}) })
} }
@ -92,7 +95,8 @@ export function defaultFilterBtn(option) {
label: i18n.t('btns.filter'), label: i18n.t('btns.filter'),
name: "filter", name: "filter",
size: "mini", size: "mini",
float: 'left' float: 'left',
isNoPermission:true
}) })
} }
@ -105,6 +109,7 @@ export function defaultFilterForDetailBtn(option) {
name: "filterForDetail", name: "filterForDetail",
size: "mini", size: "mini",
float: 'left', float: 'left',
isNoPermission:true
}) })
} }
@ -126,5 +131,6 @@ function __defaultBtnOption(option,specific){
permission:option && option.permission ? option.permission : null, permission:option && option.permission ? option.permission : null,
clientScope:option && option.clientScope ? option.clientScope : null, clientScope:option && option.clientScope ? option.clientScope : null,
permissionName:option && option.permissionName ? option.permissionName : specific.permissionName, permissionName:option && option.permissionName ? option.permissionName : specific.permissionName,
isNoPermission:option && option.isNoPermission ? option.isNoPermission : specific.isNoPermission
} }
} }

19
PC/UI.WinIn.FasterZ.Job/src/components/tablePagination/index.vue

@ -62,6 +62,7 @@
:firstFixed="true" :firstFixed="true"
:cellStyle = "cellStyle" :cellStyle = "cellStyle"
:showOverflowTooltip="showOverflowTooltip" :showOverflowTooltip="showOverflowTooltip"
:selectionColumnHandle="selectionColumnHandle"
> >
<template> <template>
<slot></slot> <slot></slot>
@ -93,13 +94,6 @@ export default {
rowDrop rowDrop
}, },
props: { props: {
// 使
noUsePermissionBtn:{
type: Array,
default: () => {
return ['refresh','field','filterForDetail','export','filter']//
}
},
rowMaxHeight:{ rowMaxHeight:{
type:String, type:String,
default:'calc(90vh - 280px)' default:'calc(90vh - 280px)'
@ -232,6 +226,11 @@ export default {
rowSource:{ rowSource:{
type:String, type:String,
default:'list_api' default:'list_api'
},
//
selectionColumnHandle:{
type: Function,
default: null
} }
}, },
data () { data () {
@ -300,13 +299,17 @@ export default {
}) })
}, },
methods: { methods: {
// (使)
clearTableSelection(){
this.$refs.tablePaginationTableRef.clearTableSelection();
},
initButttondata(){ initButttondata(){
let _list = [] let _list = []
this.currenButtonData.forEach(item=>{ this.currenButtonData.forEach(item=>{
if(item.permission){ if(item.permission){
_list.push(item) _list.push(item)
}else{ }else{
if(this.noUsePermissionBtn.indexOf(item.name) < 0){ if(!item.isNoPermission){
let _scope = item.clientScope || localStorage.getItem('appClientScope') let _scope = item.clientScope || localStorage.getItem('appClientScope')
item.permission = [_scope + '.' +this.$route.name+'.'+(item.permissionName || item.name)] item.permission = [_scope + '.' +this.$route.name+'.'+(item.permissionName || item.name)]
}else{ }else{

33
PC/UI.WinIn.FasterZ.Job/src/components/umyTable/index.vue

@ -18,7 +18,13 @@
header-row-class-name="uTableHeader" header-row-class-name="uTableHeader"
> >
<!-- :tree-props="treeProps" height 不能共存 此组件暂不支持tree的格式--> <!-- :tree-props="treeProps" height 不能共存 此组件暂不支持tree的格式-->
<u-table-column v-if="selectionTable" fixed="left" type="selection" :reserve-selection="true" /> <u-table-column
v-if="selectionTable"
fixed="left"
type="selection"
:reserve-selection="true"
:selectable="selectionHandle"
/>
<u-table-column v-if="isShowIndex" type="index" fixed="left" label="序号" width="50" /> <u-table-column v-if="isShowIndex" type="index" fixed="left" label="序号" width="50" />
<template v-for="(item, index) in TableSize"> <template v-for="(item, index) in TableSize">
<u-table-column <u-table-column
@ -130,7 +136,7 @@
<u-table-column <u-table-column
v-if="buttonOperationList_left" v-if="buttonOperationList_left"
:fixed="'left'" :fixed="'left'"
width="auto" :width="operationLeftColumnWidth()"
min-width="120px" min-width="120px"
:align="'center'" :align="'center'"
:header-align="'center'" :header-align="'center'"
@ -144,6 +150,7 @@
:key="indexButton" :key="indexButton"
type="text" type="text"
size="mini" size="mini"
:style="{color:itemButton.color || '#409EFF'}"
@click="buttonOperationClick_left(scope.row, itemButton, indexButton)" @click="buttonOperationClick_left(scope.row, itemButton, indexButton)"
>{{itemButton.label}}</el-button> >{{itemButton.label}}</el-button>
</template> </template>
@ -250,7 +257,7 @@ export default {
// tableborder // tableborder
tableBorder: { tableBorder: {
type: Boolean, type: Boolean,
default: false, default: true,
}, },
// itemfixed // itemfixed
firstFixed: { firstFixed: {
@ -332,6 +339,11 @@ export default {
default: () => { default: () => {
return 280; return 280;
} }
},
//
selectionColumnHandle:{
type: Function,
default: null
} }
}, },
data() { data() {
@ -398,6 +410,19 @@ export default {
this.setTableHeightHandle() this.setTableHeightHandle()
}, },
methods: { methods: {
//
selectionHandle(row,index){
return this.selectionColumnHandle(row,index)
},
// (使)
clearTableSelection(){
this.$refs.multipleTable.clearSelection();
},
//
operationLeftColumnWidth(){
if(this.buttonOperationList_left.length == 1){return 120}
else{return this.buttonOperationList_left.length * 100}
},
// //
doFreshLayout(){ doFreshLayout(){
if (this.$refs.multipleTable && this.$refs.multipleTable.doLayout) { if (this.$refs.multipleTable && this.$refs.multipleTable.doLayout) {
@ -414,7 +439,7 @@ export default {
this.$refs.multipleTable.$forceUpdate() this.$refs.multipleTable.$forceUpdate()
}); });
}, },
// //
getTableHeight(){ getTableHeight(){
return this.uTableHeight return this.uTableHeight
}, },

12
PC/UI.WinIn.FasterZ.Job/src/utils/defaultButtons.js

@ -39,6 +39,7 @@ export function defaultExportBtn(option) {
label: i18n.t('btns.export'), label: i18n.t('btns.export'),
name: "export", name: "export",
size: "mini", size: "mini",
isNoPermission:true
}) })
} }
@ -69,7 +70,8 @@ export function defaultFieldSettingBtn(option,source) {
name: "field", name: "field",
size: "mini", size: "mini",
float: 'right', float: 'right',
class: "rowDropNotHideItem" class: "rowDropNotHideItem",
isNoPermission:true
}) })
} }
@ -80,7 +82,8 @@ export function defaultFreshBtn(option) {
label: i18n.t('btns.fresh'), label: i18n.t('btns.fresh'),
name: "refresh", name: "refresh",
size: "mini", size: "mini",
float: 'right' float: 'right',
isNoPermission:true
}) })
} }
@ -92,7 +95,8 @@ export function defaultFilterBtn(option) {
label: i18n.t('btns.filter'), label: i18n.t('btns.filter'),
name: "filter", name: "filter",
size: "mini", size: "mini",
float: 'left' float: 'left',
isNoPermission:true
}) })
} }
@ -105,6 +109,7 @@ export function defaultFilterForDetailBtn(option) {
name: "filterForDetail", name: "filterForDetail",
size: "mini", size: "mini",
float: 'left', float: 'left',
isNoPermission:true
}) })
} }
@ -126,5 +131,6 @@ function __defaultBtnOption(option,specific){
permission:option && option.permission ? option.permission : null, permission:option && option.permission ? option.permission : null,
clientScope:option && option.clientScope ? option.clientScope : null, clientScope:option && option.clientScope ? option.clientScope : null,
permissionName:option && option.permissionName ? option.permissionName : specific.permissionName, permissionName:option && option.permissionName ? option.permissionName : specific.permissionName,
isNoPermission:option && option.isNoPermission ? option.isNoPermission : specific.isNoPermission
} }
} }

19
PC/UI.WinIn.FasterZ.Store/src/components/tablePagination/index.vue

@ -62,6 +62,7 @@
:firstFixed="true" :firstFixed="true"
:cellStyle = "cellStyle" :cellStyle = "cellStyle"
:showOverflowTooltip="showOverflowTooltip" :showOverflowTooltip="showOverflowTooltip"
:selectionColumnHandle="selectionColumnHandle"
> >
<template> <template>
<slot></slot> <slot></slot>
@ -93,13 +94,6 @@ export default {
rowDrop rowDrop
}, },
props: { props: {
// 使
noUsePermissionBtn:{
type: Array,
default: () => {
return ['refresh','field','filterForDetail','export','filter']//
}
},
rowMaxHeight:{ rowMaxHeight:{
type:String, type:String,
default:'calc(90vh - 280px)' default:'calc(90vh - 280px)'
@ -232,6 +226,11 @@ export default {
rowSource:{ rowSource:{
type:String, type:String,
default:'list_api' default:'list_api'
},
//
selectionColumnHandle:{
type: Function,
default: null
} }
}, },
data () { data () {
@ -300,13 +299,17 @@ export default {
}) })
}, },
methods: { methods: {
// (使)
clearTableSelection(){
this.$refs.tablePaginationTableRef.clearTableSelection();
},
initButttondata(){ initButttondata(){
let _list = [] let _list = []
this.currenButtonData.forEach(item=>{ this.currenButtonData.forEach(item=>{
if(item.permission){ if(item.permission){
_list.push(item) _list.push(item)
}else{ }else{
if(this.noUsePermissionBtn.indexOf(item.name) < 0){ if(!item.isNoPermission){
let _scope = item.clientScope || localStorage.getItem('appClientScope') let _scope = item.clientScope || localStorage.getItem('appClientScope')
item.permission = [_scope + '.' +this.$route.name+'.'+(item.permissionName || item.name)] item.permission = [_scope + '.' +this.$route.name+'.'+(item.permissionName || item.name)]
}else{ }else{

33
PC/UI.WinIn.FasterZ.Store/src/components/umyTable/index.vue

@ -18,7 +18,13 @@
header-row-class-name="uTableHeader" header-row-class-name="uTableHeader"
> >
<!-- :tree-props="treeProps" height 不能共存 此组件暂不支持tree的格式--> <!-- :tree-props="treeProps" height 不能共存 此组件暂不支持tree的格式-->
<u-table-column v-if="selectionTable" fixed="left" type="selection" :reserve-selection="true" /> <u-table-column
v-if="selectionTable"
fixed="left"
type="selection"
:reserve-selection="true"
:selectable="selectionHandle"
/>
<u-table-column v-if="isShowIndex" type="index" fixed="left" label="序号" width="50" /> <u-table-column v-if="isShowIndex" type="index" fixed="left" label="序号" width="50" />
<template v-for="(item, index) in TableSize"> <template v-for="(item, index) in TableSize">
<u-table-column <u-table-column
@ -130,7 +136,7 @@
<u-table-column <u-table-column
v-if="buttonOperationList_left" v-if="buttonOperationList_left"
:fixed="'left'" :fixed="'left'"
width="auto" :width="operationLeftColumnWidth()"
min-width="120px" min-width="120px"
:align="'center'" :align="'center'"
:header-align="'center'" :header-align="'center'"
@ -144,6 +150,7 @@
:key="indexButton" :key="indexButton"
type="text" type="text"
size="mini" size="mini"
:style="{color:itemButton.color || '#409EFF'}"
@click="buttonOperationClick_left(scope.row, itemButton, indexButton)" @click="buttonOperationClick_left(scope.row, itemButton, indexButton)"
>{{itemButton.label}}</el-button> >{{itemButton.label}}</el-button>
</template> </template>
@ -250,7 +257,7 @@ export default {
// tableborder // tableborder
tableBorder: { tableBorder: {
type: Boolean, type: Boolean,
default: false, default: true,
}, },
// itemfixed // itemfixed
firstFixed: { firstFixed: {
@ -332,6 +339,11 @@ export default {
default: () => { default: () => {
return 280; return 280;
} }
},
//
selectionColumnHandle:{
type: Function,
default: null
} }
}, },
data() { data() {
@ -398,6 +410,19 @@ export default {
this.setTableHeightHandle() this.setTableHeightHandle()
}, },
methods: { methods: {
//
selectionHandle(row,index){
return this.selectionColumnHandle(row,index)
},
// (使)
clearTableSelection(){
this.$refs.multipleTable.clearSelection();
},
//
operationLeftColumnWidth(){
if(this.buttonOperationList_left.length == 1){return 120}
else{return this.buttonOperationList_left.length * 100}
},
// //
doFreshLayout(){ doFreshLayout(){
if (this.$refs.multipleTable && this.$refs.multipleTable.doLayout) { if (this.$refs.multipleTable && this.$refs.multipleTable.doLayout) {
@ -414,7 +439,7 @@ export default {
this.$refs.multipleTable.$forceUpdate() this.$refs.multipleTable.$forceUpdate()
}); });
}, },
// //
getTableHeight(){ getTableHeight(){
return this.uTableHeight return this.uTableHeight
}, },

12
PC/UI.WinIn.FasterZ.Store/src/utils/defaultButtons.js

@ -39,6 +39,7 @@ export function defaultExportBtn(option) {
label: i18n.t('btns.export'), label: i18n.t('btns.export'),
name: "export", name: "export",
size: "mini", size: "mini",
isNoPermission:true
}) })
} }
@ -69,7 +70,8 @@ export function defaultFieldSettingBtn(option,source) {
name: "field", name: "field",
size: "mini", size: "mini",
float: 'right', float: 'right',
class: "rowDropNotHideItem" class: "rowDropNotHideItem",
isNoPermission:true
}) })
} }
@ -80,7 +82,8 @@ export function defaultFreshBtn(option) {
label: i18n.t('btns.fresh'), label: i18n.t('btns.fresh'),
name: "refresh", name: "refresh",
size: "mini", size: "mini",
float: 'right' float: 'right',
isNoPermission:true
}) })
} }
@ -92,7 +95,8 @@ export function defaultFilterBtn(option) {
label: i18n.t('btns.filter'), label: i18n.t('btns.filter'),
name: "filter", name: "filter",
size: "mini", size: "mini",
float: 'left' float: 'left',
isNoPermission:true
}) })
} }
@ -105,6 +109,7 @@ export function defaultFilterForDetailBtn(option) {
name: "filterForDetail", name: "filterForDetail",
size: "mini", size: "mini",
float: 'left', float: 'left',
isNoPermission:true
}) })
} }
@ -126,5 +131,6 @@ function __defaultBtnOption(option,specific){
permission:option && option.permission ? option.permission : null, permission:option && option.permission ? option.permission : null,
clientScope:option && option.clientScope ? option.clientScope : null, clientScope:option && option.clientScope ? option.clientScope : null,
permissionName:option && option.permissionName ? option.permissionName : specific.permissionName, permissionName:option && option.permissionName ? option.permissionName : specific.permissionName,
isNoPermission:option && option.isNoPermission ? option.isNoPermission : specific.isNoPermission
} }
} }
Loading…
Cancel
Save