feat:用户管理 设置admin的状态不可修改

This commit is contained in:
fit2cloud-chenyw 2021-06-24 11:14:45 +08:00
parent 9321291c6b
commit a7c66485eb

View File

@ -46,7 +46,7 @@
</el-table-column>
<el-table-column prop="status" sortable="custom" :label="$t('commons.status')">
<template v-slot:default="scope">
<el-switch v-model="scope.row.enabled" :active-value="1" :inactive-value="0" :disabled="!checkPermission(['user:edit'])" inactive-color="#DCDFE6" @change="changeSwitch(scope.row)" />
<el-switch v-model="scope.row.enabled" :active-value="1" :inactive-value="0" :disabled="!checkPermission(['user:edit']) || scope.row.isAdmin" inactive-color="#DCDFE6" @change="changeSwitch(scope.row)" />
</template>
</el-table-column>
<el-table-column prop="createTime" sortable="custom" :label="$t('commons.create_time')">