修改实训标签添加权限判断

This commit is contained in:
dong 2023-05-05 16:35:05 +08:00
parent 9618acaa9d
commit 9776419202

View File

@ -12,6 +12,7 @@ import ConstConfig from '@/scripts/ConstConfig';
import { getSessionStorage } from '@/utils/auth';
import { launchFullscreen } from '@/utils/screen';
import editTraining from './editTraining';
import { superAdmin, admin } from '@/router/index';
import { getAllPublishTrainingList, getManageTrainingListInOrg, publishTrainingPutOn, publishTrainingPutOff, publishTrainingDelete } from '@/api/jmap/training';
export default {
name:'TrainingManage',
@ -109,7 +110,8 @@ export default {
{
name: '修改标签',
handleClick: this.handlerEditLabel,
type: 'primary'
type: 'primary',
showControl: row => { return this.isAdmin; }
},
{
name: '上架',
@ -141,6 +143,9 @@ export default {
},
orgId() {
return this.$store.state.user.companyId;
},
isAdmin() {
return this.$store.state.user.roles.includes(superAdmin) || this.$store.state.user.roles.includes(admin);
}
},
created() {