CN-1468 fix: 补充一些开关的权限控制
This commit is contained in:
@@ -52,13 +52,17 @@
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'status'">
|
||||
<el-switch
|
||||
v-if="scope.row.id"
|
||||
v-if="scope.row.id && hasPermission('editUser')"
|
||||
v-model="scope.row.status"
|
||||
active-value="1"
|
||||
:disabled="(scope.row.username === loginName) || (scope.row.username==='admin' && scope.row.id===1) || scope.row.buildIn === 1"
|
||||
inactive-value="0"
|
||||
@change="()=>{statusChange(scope.row)}">
|
||||
</el-switch>
|
||||
<template v-else>
|
||||
<span v-if="scope.row.status === '1'">{{$t('detection.create.enabled')}}</span>
|
||||
<span v-else>{{$t('detection.create.disabled')}}</span>
|
||||
</template>
|
||||
</template>
|
||||
<span v-else>{{scope.row[item.prop] || '-'}}</span>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user