Переглянути джерело

系统消息 这个用户不允许删除修改等操作

wukai 1 рік тому
батько
коміт
2804d69ecb
1 змінених файлів з 6 додано та 6 видалено
  1. 6 6
      src/views/system/user/index.vue

+ 6 - 6
src/views/system/user/index.vue

@@ -78,7 +78,7 @@
 						v-if="columns[4].visible" width="120" />
 					<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
 						<template #default="scope">
-							<el-switch v-model="scope.row.status" active-value="0" inactive-value="1"
+							<el-switch  v-if="scope.row.userId !== 1 && scope.row.userId !== -1" v-model="scope.row.status" active-value="0" inactive-value="1"
 								@change="handleStatusChange(scope.row)"></el-switch>
 						</template>
 					</el-table-column>
@@ -90,23 +90,23 @@
 					</el-table-column>
 					<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
 						<template #default="scope">
-							<el-tooltip content="修改" placement="top" :show-after="1000" v-if="scope.row.userId !== 1">
+							<el-tooltip content="修改" placement="top" :show-after="1000" v-if="scope.row.userId !== 1 && scope.row.userId !== -1">
 								<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
 									v-hasPermi="['system:user:edit']"></el-button>
 							</el-tooltip>
-							<el-tooltip content="删除" placement="top" :show-after="1000" v-if="scope.row.userId !== 1">
+							<el-tooltip content="删除" placement="top" :show-after="1000" v-if="scope.row.userId !== 1 && scope.row.userId !== -1">
 								<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
 									v-hasPermi="['system:user:remove']"></el-button>
 							</el-tooltip>
-							<el-tooltip content="重置密码" placement="top" :show-after="1000" v-if="scope.row.userId !== 1">
+							<el-tooltip content="重置密码" placement="top" :show-after="1000" v-if="scope.row.userId !== 1 && scope.row.userId !== -1">
 								<el-button link type="primary" icon="Key" @click="handleResetPwd(scope.row)"
 									v-hasPermi="['system:user:resetPwd']"></el-button>
 							</el-tooltip>
-							<el-tooltip content="分配角色" placement="top" :show-after="1000" v-if="scope.row.userId !== 1">
+							<el-tooltip content="分配角色" placement="top" :show-after="1000" v-if="scope.row.userId !== 1 && scope.row.userId !== -1">
 								<el-button link type="primary" icon="CircleCheck" @click="handleAuthRole(scope.row)"
 									v-hasPermi="['system:user:edit']"></el-button>
 							</el-tooltip>
-							<el-tooltip content="登录限制" placement="top" :show-after="1000" v-if="scope.row.userId !== 1">
+							<el-tooltip content="登录限制" placement="top" :show-after="1000" v-if="scope.row.userId !== 1 && scope.row.userId !== -1">
 								<!-- <i class="el-icon-info"></i> -->
 								<el-button link type="primary" icon="Operation" @click="handleLoginLimit(scope.row)"
 									v-hasPermi="['system:user:resetPwd']"></el-button>