feat:全局人脸

This commit is contained in:
dzc committed 2025-01-14 16:09:18 +08:00
1 parent bac2067c08
commit 97036f0f68
3 files changed
+123 -98

No files matched your search

+25 -8
View File
@@ -113,11 +113,6 @@
<el-tag v-for="(item, index) in scope.row.roleList" :key="index">{{ item.roleName }}</el-tag>
</template>
</el-table-column>
<el-table-column width="80" label="人脸">
<template #default="{ row }">
<preview-image :src="row.faceImgs" />
</template>
</el-table-column>
<el-table-column :label="$t('sysuser.lockFlag')" show-overflow-tooltip>
<template #default="scope">
<el-switch
@@ -128,6 +123,22 @@
></el-switch>
</template>
</el-table-column>
<el-table-column width="80" label="人脸">
<template #default="{ row }">
<preview-image :src="row.faceImgs" />
</template>
</el-table-column>
<el-table-column label="全局人脸" show-overflow-tooltip>
<template #default="{ row }">
<el-switch
v-if="row.isGlobalFace"
v-model="row.isGlobalFace"
@change="changeGlobalFaceSwitch(row)"
active-value="1"
inactive-value="0"
/>
</template>
</el-table-column>
<el-table-column :label="$t('common.action')" width="300" fixed="right">
<template #default="scope">
<div style="display: flex">
@@ -180,11 +191,8 @@
</div>
</pane>
</splitpanes>
<user-form ref="userDialogRef" @refresh="getDataList(false)" :deptId="state.queryForm.deptId" />
<face-manage ref="faceManageRef" @refresh="getDataList(false)" />
<upload-excel
ref="excelUploadRef"
:title="$t('sysuser.importUserTip')"
@@ -197,6 +205,7 @@
<script lang="ts" name="systemUser" setup>
import { delObj, pageList, putObj } from "/@/api/admin/user"
import { putGlobalFace } from "/@/api/admin/userFace"
import { deptTree } from "/@/api/admin/dept"
import { BasicTableProps, useTable } from "/@/hooks/table"
import { useMessage, useMessageBox } from "/@/hooks/message"
@@ -299,6 +308,14 @@ const changeSwitch = async (row: any) => {
getDataList()
}
const changeGlobalFaceSwitch = async (row: any) => {
if (!row.isGlobalFace) return
// 不修改密码
await putGlobalFace({ userId: row.userId, isGlobalFace: row.isGlobalFace })
useMessage().success(t("common.optSuccessText"))
getDataList()
}
//修改用户密码
const changePassword = async (row: any) => {
if (!inputPassword.value || inputPassword.value.length < 6 || inputPassword.value.length > 20) {