Browse Source

【接口看板+job+store】按钮权限优化

faster_AG_grid
安虹睿 11 months ago
parent
commit
9437243186
  1. 2
      PC/InterFace.Dash/src/components/tablePagination/index.vue
  2. 4
      PC/InterFace.Dash/src/utils/defaultButtons.js
  3. 113
      PC/InterFace.Dash/src/views/menuList/AsnMstr_child_add_demo.vue
  4. 2
      PC/UI.WinIn.FasterZ.Job/src/components/tablePagination/index.vue
  5. 4
      PC/UI.WinIn.FasterZ.Job/src/utils/defaultButtons.js
  6. 2
      PC/UI.WinIn.FasterZ.Store/src/components/tablePagination/index.vue
  7. 4
      PC/UI.WinIn.FasterZ.Store/src/utils/defaultButtons.js

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

@ -308,7 +308,7 @@ export default {
}else{ }else{
if(this.noUsePermissionBtn.indexOf(item.name) < 0){ if(this.noUsePermissionBtn.indexOf(item.name) < 0){
let _scope = item.clientScope || localStorage.getItem('appClientScope') let _scope = item.clientScope || localStorage.getItem('appClientScope')
item.permission = [_scope + '.' +this.$route.name+'.'+item.name] item.permission = [_scope + '.' +this.$route.name+'.'+(item.permissionName || item.name)]
}else{ }else{
item.permission = [] item.permission = []
} }

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

@ -15,7 +15,8 @@ export function defaultAddBtn(option) {
label: i18n.t('btns.add'), label: i18n.t('btns.add'),
name: "Create", name: "Create",
size: "mini", size: "mini",
background:"#31bb99" background:"#31bb99",
permissionName:"Create",
}) })
} }
@ -124,5 +125,6 @@ function __defaultBtnOption(option,specific){
isRedundance:option && option.isRedundance ? option.isRedundance : false, isRedundance:option && option.isRedundance ? option.isRedundance : false,
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,
} }
} }

113
PC/InterFace.Dash/src/views/menuList/AsnMstr_child_add_demo.vue

@ -0,0 +1,113 @@
<template>
<div class="page-box" v-loading="Loading.tableLoading">
<!-- DEMO: API新增编辑删除 根据details判断是否有子表编辑-->
<tablePagination
v-if="apiColumns_Table"
:currenButtonData="currenButtonData"
:tableData="tableData"
:tableLoading="Loading.tableLoading"
:tableColumns="apiColumns_Table"
@rowDrop="rowDrop"
:totalCount="totalCount"
:multipleSelection="multipleSelection"
:MaxResultCount="PageListParams.MaxResultCount"
@topbutton="topbutton"
@inlineDialog="inlineDialog"
@sortChange="sortChange"
@alertoldSkipCount="alertoldSkipCount"
@alterResultCount="alterResultCount"
@handleSelectionChange="handleSelectionChange"
:currentPageProps="oldSkipCount"
:quicklySearchOption="quicklySearchOption"
@quicklySearchClick="quicklySearchClick"
@quicklySearchClear="quicklySearchClear"
:primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData"
:buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left"
:buttonOperationList_right="(data)=>{return buttonOperationList_rightApi(data,'edit|delete')}"
@buttonOperationClick_right="buttonOperationClick_right"
></tablePagination>
<curren-Drawer
ref="currenDrawer_Ref"
:title="apiColumns_DesTions"
@rowDrop="rowDrop"
:tableColumns="apiColumns_DetailsTable"
:tabsDesTions="apiColumns_DesTions"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:propsData="propsData"
:Butttondata="[]"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@handleCommand="drawerHandle"
@close-value="closeValue"
:totalCount="totalCountDetails"
:currentPage="oldSkipCountDetails"
:MaxResultCount="MaxResultCountDetails"
@alterResultCountDetails="alterResultCountDetails"
@alertoldSkipCountDetails="alertoldSkipCountDetails"
:buttonOperationList_left="operationButtonsDetail"
></curren-Drawer>
<!-- 导出弹窗 -->
<exportDrop
v-if="displayDialog.exportDialog"
@closeDialog="closeExportDrop"
@exportDropSubmit="exportDropSubmit"
></exportDrop>
<!-- Api新增 -->
<addEditFromApiPop
v-if="displayDialog.addEditApiDialog"
:handleType="addEditApiType"
:editRowData="editFromApiRowData"
@closePop="closeAddEditApiPop"
@exitAfterHandle="paging"
></addEditFromApiPop>
</div>
</template>
<script>
import { tableMixins } from "@/mixins/TableMixins";
import { LoadingMixins } from "@/mixins/LoadingMixins";
import { drawerMixins } from "@/mixins/drawerMixins"
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins";
import { mixins } from "@/mixins/mixins";
import { filterSelectMixins } from '@/mixins/filter-Select'
import { getToken } from '@/utils/auth'
export default {
name: "AsnMstr",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
filterSelectMixins,
],
data() {
return {
//
currenButtonData: [
this.defaultAddBtn({
name:'addFromApi'
}),//
this.defaultExportBtn({
isRedundance:true,
isDetailExport:true
}),//
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
};
},
mounted() {
this.paging();
},
}
</script>
<style lang="scss" scoped>
@import "@/styles/basicData.scss";
</style>

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

@ -308,7 +308,7 @@ export default {
}else{ }else{
if(this.noUsePermissionBtn.indexOf(item.name) < 0){ if(this.noUsePermissionBtn.indexOf(item.name) < 0){
let _scope = item.clientScope || localStorage.getItem('appClientScope') let _scope = item.clientScope || localStorage.getItem('appClientScope')
item.permission = [_scope + '.' +this.$route.name+'.'+item.name] item.permission = [_scope + '.' +this.$route.name+'.'+(item.permissionName || item.name)]
}else{ }else{
item.permission = [] item.permission = []
} }

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

@ -15,7 +15,8 @@ export function defaultAddBtn(option) {
label: i18n.t('btns.add'), label: i18n.t('btns.add'),
name: "Create", name: "Create",
size: "mini", size: "mini",
background:"#31bb99" background:"#31bb99",
permissionName:"Create",
}) })
} }
@ -124,5 +125,6 @@ function __defaultBtnOption(option,specific){
isRedundance:option && option.isRedundance ? option.isRedundance : false, isRedundance:option && option.isRedundance ? option.isRedundance : false,
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,
} }
} }

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

@ -308,7 +308,7 @@ export default {
}else{ }else{
if(this.noUsePermissionBtn.indexOf(item.name) < 0){ if(this.noUsePermissionBtn.indexOf(item.name) < 0){
let _scope = item.clientScope || localStorage.getItem('appClientScope') let _scope = item.clientScope || localStorage.getItem('appClientScope')
item.permission = [_scope + '.' +this.$route.name+'.'+item.name] item.permission = [_scope + '.' +this.$route.name+'.'+(item.permissionName || item.name)]
}else{ }else{
item.permission = [] item.permission = []
} }

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

@ -15,7 +15,8 @@ export function defaultAddBtn(option) {
label: i18n.t('btns.add'), label: i18n.t('btns.add'),
name: "Create", name: "Create",
size: "mini", size: "mini",
background:"#31bb99" background:"#31bb99",
permissionName:"Create",
}) })
} }
@ -124,5 +125,6 @@ function __defaultBtnOption(option,specific){
isRedundance:option && option.isRedundance ? option.isRedundance : false, isRedundance:option && option.isRedundance ? option.isRedundance : false,
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,
} }
} }
Loading…
Cancel
Save