Browse Source

feat: [档案管理] 档案记录tab权限配置

lkf
memorylkf 2 months ago
parent
commit
370738cda9
1 changed files with 33 additions and 11 deletions
  1. +33
    -11
      src/views/business/archive/record/list.vue

+ 33
- 11
src/views/business/archive/record/list.vue View File

@ -23,6 +23,7 @@
</template>
<script>
import { checkPermi } from "@/utils/permission";
import syfsyda from './comp/syfsyda.vue'
import gspda from './comp/gspda.vue'
import gsplqffda from './comp/gsplqffda.vue'
@ -39,24 +40,45 @@ export default {
filters: {},
data() {
return {
tabList: [
{ key: 'syfsyda', name: 'page.business.archive.syfsyda' },
{ key: 'gspda', name: 'page.business.archive.gspda' },
{ key: 'gsplqffda', name: 'page.business.archive.gsplqffda' },
{ key: 'gyzjda', name: 'page.business.archive.gyzjda' },
{ key: 'gyzjlqffda', name: 'page.business.archive.gyzjlqffda' },
{ key: 'mjyda', name: 'page.business.archive.mjyda' },
{ key: 'mjylqffda', name: 'page.business.archive.mjylqffda' },
{ key: 'sjda', name: 'page.business.archive.sjda' }
],
active: this.$route.params.tab || 'syfsyda',
tabList: [],
active: '',
study: {},
}
},
created() {
this.initTab()
},
methods: {
checkPermi,
initTab(){
this.tabList = []
if(this.checkPermi(['business:archive:record:syfsydaTab'])){
this.tabList.push({ key: 'syfsyda', name: 'page.business.archive.syfsyda' })
}
if(this.checkPermi(['business:archive:record:gspdaTab'])){
this.tabList.push({ key: 'gspda', name: 'page.business.archive.gspda' })
}
if(this.checkPermi(['business:archive:record:gsplqffdaTab'])){
this.tabList.push({ key: 'gsplqffda', name: 'page.business.archive.gsplqffda' })
}
if(this.checkPermi(['business:archive:record:gyzjdaTab'])){
this.tabList.push({ key: 'gyzjda', name: 'page.business.archive.gyzjda' })
}
if(this.checkPermi(['business:archive:record:gyzjlqffdaTab'])){
this.tabList.push({ key: 'gyzjlqffda', name: 'page.business.archive.gyzjlqffda' })
}
if(this.checkPermi(['business:archive:record:mjydaTab'])){
this.tabList.push({ key: 'mjyda', name: 'page.business.archive.mjyda' })
}
if(this.checkPermi(['business:archive:record:mjylqffdaTab'])){
this.tabList.push({ key: 'mjylqffda', name: 'page.business.archive.mjylqffda' })
}
if(this.checkPermi(['business:archive:record:sjdaTab'])){
this.tabList.push({ key: 'sjda', name: 'page.business.archive.sjda' })
}
this.active = this.$route.params.tab && _.findIndex(this.tabList,(o)=>{return o.key===this.$route.params.tab})>-1 ? this.$route.params.tab: this.tabList.length>0 ? this.tabList[0].key :''
},
changeTab(item) {
if (this.active !== item.key) {
this.active = item.key

Loading…
Cancel
Save