bug 78147
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
:label="$t('standardRegulationLibrary.dynamicMessage.pushRange')">
|
||||
<user-selection v-decorator="['pushRange', validatorRules.pushRange]"
|
||||
type="checkbox"
|
||||
:name-str="modal.pushRange_dictText"
|
||||
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.dynamicMessage.pushRange')" />
|
||||
</a-form-item>
|
||||
<!--动态详情-->
|
||||
|
||||
@@ -74,15 +74,11 @@ export default {
|
||||
...mapGetters(['userInfo']),
|
||||
// 是否管理员
|
||||
isAdmin () {
|
||||
let flag = false
|
||||
if (this.userInfo.userRoleList && this.userInfo.userRoleList.length > 0) {
|
||||
this.userInfo.userRoleList.forEach(res => {
|
||||
if (res.roleCode === 'admin') {
|
||||
flag = true
|
||||
}
|
||||
})
|
||||
const roleList = this.userInfo.roleCode.split(',')
|
||||
if (roleList && roleList.length > 0 && roleList.some(tt => tt === 'admin')) {
|
||||
return true
|
||||
}
|
||||
return flag
|
||||
return false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -108,7 +104,11 @@ export default {
|
||||
{
|
||||
text: this.$t('delete'),
|
||||
clickEvent: 'handleDelete',
|
||||
has: 'dynamicMessage:delete'
|
||||
has: 'dynamicMessage:delete',
|
||||
// 管理员可以编辑/删除所有,编辑人能修改/删除自己发布的,其他用户只能收藏/查看和分享
|
||||
show: (record) => {
|
||||
return this.isAdmin || record.writer === this.userInfo.id
|
||||
}
|
||||
}
|
||||
],
|
||||
columns: [
|
||||
|
||||
Reference in New Issue
Block a user