This commit is contained in:
weiwei committed 2025-03-13 21:23:32 +08:00
commit 5f304192e5
1 file changed
+19 -18
+19 -18
View File
@@ -85,12 +85,11 @@
</template>
</el-table-column>
<el-table-column label="启用" show-overflow-tooltip min-width="150">
<template #default="scope">
<template #default="{ row }">
<el-switch
v-if="scope.processStatus == '2'"
:disabled="!auth('sys_user_edit')"
v-model="scope.row.lockFlag"
@change="changeSwitch(scope.row)"
:disabled="!auth('sys_user_edit') || row.processStatus != '2'"
v-model="row.lockFlag"
@change="changeSwitch(row)"
active-value="0"
inactive-value="9"
></el-switch>
@@ -101,7 +100,7 @@
<preview-image :src="row.faceImgs" />
</template>
</el-table-column>
<!-- <el-table-column label="全局人脸" show-overflow-tooltip>
<el-table-column v-if="false" label="全局人脸" show-overflow-tooltip>
<template #default="{ row }">
<el-switch
:disabled="!auth('userFace_sysUserFace_global_face')"
@@ -112,54 +111,56 @@
inactive-value="0"
/>
</template>
</el-table-column> -->
</el-table-column>
<el-table-column
v-auths="['sys_user_edit', 'userFace_sysUserFace_view', 'sys_user_del']"
label="操作"
width="380"
min-width="300"
fixed="right"
>
<template #default="scope">
<template #default="{ row }">
<div style="display: flex; justify-content: center">
<!-- 重置密码 -->
<popover-input v-if="scope.processStatus == '2'" v-model="inputPassword" @confirm="changePassword(scope.row)">
<popover-input v-if="row.processStatus == '2'" v-model="inputPassword" @confirm="changePassword(row)">
<template #default>
<el-button v-auth="'sys_user_edit'" icon="RefreshLeft" text type="primary" class="mr-4">密码</el-button>
</template>
</popover-input>
<!-- 修改信息 -->
<el-button
v-if="scope.processStatus == '2'"
v-if="row.processStatus == '2'"
v-auth="'sys_user_edit'"
icon="edit-pen"
text
type="primary"
@click="userDialogRef.openDialog(scope.row.userId)"
@click="userDialogRef.openDialog(row.userId)"
>
修改
</el-button>
<!-- 人脸管理 -->
<el-button
v-if="scope.processStatus == '2'"
v-if="row.processStatus == '2'"
v-auth="'userFace_sysUserFace_view'"
icon="User"
text
type="primary"
@click="faceManageRef.openDialog(scope.row.userId)"
@click="faceManageRef.openDialog(row.userId)"
>
人脸管理
</el-button>
<el-button type="primary" size="small" link icon="VideoPlay" @click="deal(scope.row)">开始处理</el-button>
<el-button type="primary" size="small" v-if="row.isCheckUser" link icon="VideoPlay" @click="deal(row)">
开始处理
</el-button>
<!-- 删除用户 -->
<el-tooltip content="admin 不允许被删除" :disabled="scope.row.userId !== '1'" placement="top">
<el-tooltip content="admin 不允许被删除" :disabled="row.userId !== '1'" placement="top">
<span style="margin-left: 12px">
<el-button
icon="delete"
v-auth="'sys_user_del'"
:disabled="scope.row.username === 'admin'"
:disabled="row.username === 'admin'"
text
type="primary"
@click="handleDelete([scope.row.userId])"
@click="handleDelete([row.userId])"
>
删除
</el-button>