[update] 市场法规清单删除权限从管理员和作者可以删改成超级管理员和作者可以删

This commit is contained in:
lideqin
2024-10-10 10:23:55 +08:00
parent 60633a4fc1
commit d112c6310b
@@ -144,6 +144,12 @@ export default {
const roleList = [...adminRoleList, ...superAdminRoleList] const roleList = [...adminRoleList, ...superAdminRoleList]
const userRoleList = this.userInfo.roleCode.split(',') const userRoleList = this.userInfo.roleCode.split(',')
return userRoleList.some(tt => roleList.includes(tt)) return userRoleList.some(tt => roleList.includes(tt))
},
// 是否是超级管理员
isSuperAdmin () {
const superAdminRoleList = window._CONFIG.superAdminRoleCode.split(',')
const userRoleList = this.userInfo.roleCode.split(',')
return userRoleList.some(tt => superAdminRoleList.includes(tt))
} }
}, },
data () { data () {
@@ -241,9 +247,9 @@ export default {
text: this.$t('delete'), text: this.$t('delete'),
clickEvent: 'handleDelete', clickEvent: 'handleDelete',
has: 'marketStandard:deleteBatch', has: 'marketStandard:deleteBatch',
// 只有作者和管理员可以删除 // 只有作者和超级管理员可以删除
show: (record) => { show: (record) => {
return this.isAdmin || this.userInfo.id === record.author return this.isSuperAdmin || this.userInfo.id === record.author
} }
} }
], ],