添加按钮权限

This commit is contained in:
sunFlower
2022-11-09 17:28:27 +08:00
parent 92618c37b8
commit 6eaba7770f
@@ -4,7 +4,7 @@
<a-tab-pane :key="$t('problemKnowledgeBase')" :tab="$t('problemKnowledgeBase')">
<problemKnowledgeBaseList v-if="tabModel == $t('problemKnowledgeBase')" ref="problemKnowledgeBaseListRef"/>
</a-tab-pane>
<a-tab-pane key="Country Card" tab="Country Card">
<a-tab-pane v-if="isTrue" key="Country Card" tab="Country Card">
<countryCardList v-if="tabModel == 'Country Card'" ref="countryCardListRef"/>
</a-tab-pane>
</a-tabs>
@@ -13,6 +13,7 @@
<script>
import problemKnowledgeBaseList from './components/problemKnowledgeBaseList'
import countryCardList from './components/countryCardList'
import { USER_AUTH, SYS_BUTTON_AUTH } from '@/store/mutation-types'
export default {
name: 'index',
@@ -22,10 +23,18 @@
},
data() {
return {
tabModel: this.$t('problemKnowledgeBase')
tabModel: this.$t('problemKnowledgeBase'),
isTrue:false,
}
},
mounted() {
let userAuthList = JSON.parse(sessionStorage.getItem(USER_AUTH) || '[]')
this.isTrue = false
userAuthList.map(res => {
if (res.action == 'countryCard:list') {
this.isTrue = true
}
})
},
methods: {
callback(key) {