人脸审批状态tab
This commit is contained in:
1 parent
42dfbe30f5
commit
ab308dd286
3 files changed
+101
-66
No files matched your search
@@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<div class="system-user-dialog-container">
|
||||
<el-dialog :close-on-click-modal="false" title="人脸管理" draggable v-model="dialogVisible">
|
||||
<el-button v-auth="'userFace_sysUserFace_add'" icon="folder-add" type="primary" @click="addFace">
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-auth="'userFace_sysUserFace_add'" icon="folder-add" type="primary" @click="addFace"> 新增 </el-button>
|
||||
<div class="h-4" />
|
||||
<el-table
|
||||
v-loading="state.loading"
|
||||
@@ -19,17 +17,10 @@
|
||||
<preview-image :src="row.faceImg" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-auths="['userFace_sysUserFace_edit', 'userFace_sysUserFace_del']"
|
||||
prop="address"
|
||||
align="center"
|
||||
label="操作"
|
||||
>
|
||||
<el-table-column v-auths="['userFace_sysUserFace_edit', 'userFace_sysUserFace_del']" prop="address" align="center" label="操作">
|
||||
<template #default="{ row }">
|
||||
<el-button v-auth="'userFace_sysUserFace_edit'" link type="primary" @click="editFace(row)">
|
||||
修改
|
||||
</el-button>
|
||||
<el-button v-auth="'userFace_sysUserFace_del'" link type="danger" @click="delFace(row)"> 删除 </el-button>
|
||||
<el-button v-auth="'userFace_sysUserFace_edit'" link type="primary" @click="editFace(row)">修改</el-button>
|
||||
<el-button v-auth="'userFace_sysUserFace_del'" link type="danger" @click="delFace(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -38,13 +29,7 @@
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-model="uploadDialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
:title="faceUploadTitle"
|
||||
width="30%"
|
||||
@close="uploadDialogClone"
|
||||
>
|
||||
<el-dialog v-model="uploadDialogVisible" :close-on-click-modal="false" :title="faceUploadTitle" width="30%" @close="uploadDialogClone">
|
||||
<el-form v-loading="formLoading" ref="formRef" :model="formData" :rules="formRules" label-width="80px">
|
||||
<el-form-item label="人脸" prop="uploadFace">
|
||||
<upload-img v-model:image-url="formData.uploadFace" />
|
||||
@@ -128,7 +113,7 @@ const editFace = (row: any) => {
|
||||
const delFace = async (row: any) => {
|
||||
try {
|
||||
await useMessage().delConfirm("是否删除人脸?")
|
||||
userFaceApi.delObjs([row.id])
|
||||
await userFaceApi.delObjs([row.id])
|
||||
useMessage().success("删除成功")
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
|
||||
@@ -17,25 +17,23 @@
|
||||
<el-form-item style="width: 250px" label="用户" prop="userId">
|
||||
<select-user v-model="state.queryForm.userId" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('sysuser.username')" prop="username">
|
||||
<el-input v-model="state.queryForm.username" :placeholder="$t('sysuser.inputUsernameTip')" clearable />
|
||||
<el-form-item label="用户名" prop="username">
|
||||
<el-input v-model="state.queryForm.username" placeholder="请输入用户名" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('sysuser.phone')" prop="phone">
|
||||
<el-input v-model="state.queryForm.phone" :placeholder="$t('sysuser.inputPhoneTip')" clearable />
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input v-model="state.queryForm.phone" placeholder="请输入手机号" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t("common.queryBtn") }}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t("common.resetBtn") }}</el-button>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">查询</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button v-auth="'sys_user_add'" icon="folder-add" type="primary" @click="userDialogRef.openDialog()">
|
||||
{{ $t("common.addBtn") }}
|
||||
</el-button>
|
||||
<el-button v-auth="'sys_user_add'" icon="folder-add" type="primary" @click="userDialogRef.openDialog()">新增</el-button>
|
||||
<el-button plain v-auth="'sys_user_export'" class="ml10" icon="upload-filled" type="primary" @click="excelUploadRef.show()">
|
||||
{{ $t("common.importBtn") }}
|
||||
导入
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
@@ -47,17 +45,23 @@
|
||||
type="primary"
|
||||
@click="handleDelete(selectObjs)"
|
||||
>
|
||||
{{ $t("common.delBtn") }}
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'sys_user_export'"
|
||||
@exportExcel="exportExcel"
|
||||
@queryTable="getDataList"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
/>
|
||||
<div class="flex justify-between items-center">
|
||||
<el-tabs class="flex-1" v-model="activeName" @tab-click="handleClickTabItem">
|
||||
<el-tab-pane v-for="v in tabItems" :key="v.id" :label="v.label" :name="v.value" />
|
||||
</el-tabs>
|
||||
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'sys_user_export'"
|
||||
@exportExcel="exportExcel"
|
||||
@queryTable="getDataList"
|
||||
class="ml10"
|
||||
style="float: right"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table
|
||||
@@ -70,22 +74,17 @@
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table-column :selectable="handleSelectable" type="selection" width="40" />
|
||||
<el-table-column :label="$t('sysuser.index')" type="index" width="60" fixed="left" />
|
||||
<el-table-column :label="$t('sysuser.username')" prop="username" fixed="left" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column :label="$t('sysuser.name')" prop="name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column :label="$t('sysuser.phone')" prop="phone" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="#" type="index" width="60" fixed="left" />
|
||||
<el-table-column label="用户名" prop="username" fixed="left" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="手机号" prop="phone" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="部门" prop="deptName" show-overflow-tooltip />
|
||||
<!-- <el-table-column :label="$t('sysuser.post')" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag v-for="(item, index) in scope.row.postList" :key="index">{{ item.postName }}</el-tag>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column :label="$t('sysuser.role')" show-overflow-tooltip>
|
||||
<el-table-column label="角色" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag v-for="(item, index) in scope.row.roleList" :key="index">{{ item.roleName }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('sysuser.lockFlag')" show-overflow-tooltip>
|
||||
<el-table-column label="启用" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-switch
|
||||
:disabled="!auth('sys_user_edit')"
|
||||
@@ -96,12 +95,12 @@
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="80" label="人脸">
|
||||
<el-table-column label="人脸">
|
||||
<template #default="{ row }">
|
||||
<preview-image :src="row.faceImgs" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="全局人脸" show-overflow-tooltip>
|
||||
<!-- <el-table-column label="全局人脸" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-switch
|
||||
:disabled="!auth('userFace_sysUserFace_global_face')"
|
||||
@@ -112,11 +111,11 @@
|
||||
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="$t('common.action')"
|
||||
width="300"
|
||||
label="操作"
|
||||
min-width="370"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -124,9 +123,7 @@
|
||||
<!-- 重置密码 -->
|
||||
<popover-input v-model="inputPassword" @confirm="changePassword(scope.row)">
|
||||
<template #default>
|
||||
<el-button v-auth="'sys_user_edit'" icon="RefreshLeft" text type="primary" class="mr-4">
|
||||
{{ $t("sysuser.passwordBtn") }}
|
||||
</el-button>
|
||||
<el-button v-auth="'sys_user_edit'" icon="RefreshLeft" text type="primary" class="mr-4">密码</el-button>
|
||||
</template>
|
||||
</popover-input>
|
||||
<!-- 修改信息 -->
|
||||
@@ -137,7 +134,7 @@
|
||||
type="primary"
|
||||
@click="userDialogRef.openDialog(scope.row.userId)"
|
||||
>
|
||||
{{ $t("common.editBtn") }}
|
||||
修改
|
||||
</el-button>
|
||||
<!-- 人脸管理 -->
|
||||
<el-button
|
||||
@@ -149,8 +146,9 @@
|
||||
>
|
||||
人脸管理
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" link icon="VideoPlay" @click="deal(scope.row)">开始处理</el-button>
|
||||
<!-- 删除用户 -->
|
||||
<el-tooltip :content="$t('sysuser.deleteDisabledTip')" :disabled="scope.row.userId !== '1'" placement="top">
|
||||
<el-tooltip content="admin 不允许被删除" :disabled="scope.row.userId !== '1'" placement="top">
|
||||
<span style="margin-left: 12px">
|
||||
<el-button
|
||||
icon="delete"
|
||||
@@ -159,7 +157,8 @@
|
||||
text
|
||||
type="primary"
|
||||
@click="handleDelete([scope.row.userId])"
|
||||
>{{ $t("common.delBtn") }}
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
@@ -176,11 +175,14 @@
|
||||
<face-manage ref="faceManageRef" @refresh="getDataList(false)" />
|
||||
<upload-excel
|
||||
ref="excelUploadRef"
|
||||
:title="$t('sysuser.importUserTip')"
|
||||
title="用户导入"
|
||||
temp-url="/admin/sys-file/local/file/user.xlsx"
|
||||
url="/admin/user/import-face"
|
||||
@refreshDataList="getDataList"
|
||||
/>
|
||||
|
||||
<!-- 审批抽屉 -->
|
||||
<process-drawer ref="processDrawerRef" @task-submit-event="taskSubmitEvent" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -191,6 +193,8 @@ import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useI18n } from "vue-i18n"
|
||||
import { auth } from "/@/utils/authFunction"
|
||||
import { getDicts } from "/@/api/admin/dict"
|
||||
import ProcessDrawer from "/@/components/processDrawer/index.vue"
|
||||
|
||||
const UserForm = defineAsyncComponent(() => import("./form.vue"))
|
||||
const FaceManage = defineAsyncComponent(() => import("./face-manage.vue"))
|
||||
@@ -205,6 +209,9 @@ const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
const inputPassword = ref()
|
||||
const draggableDepTreeRef = ref() // 树组件ref引用
|
||||
const activeName = ref(null)
|
||||
const tabItems = ref<any>([{}])
|
||||
const processDrawerRef = ref()
|
||||
|
||||
// 多选rows
|
||||
const selectObjs = ref([]) as any
|
||||
@@ -240,6 +247,29 @@ const handleGetSelectNode = (curClickedNode: any, checkedTreeNodes: any, isDeepT
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
const { data } = await getDicts("check_status")
|
||||
data.unshift({ label: "全部", value: null })
|
||||
tabItems.value = data
|
||||
})
|
||||
|
||||
// tab点击切换
|
||||
const handleClickTabItem = (e: any) => {
|
||||
state.queryForm.processStatus = tabItems.value[e.index].value
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 点击开始处理
|
||||
const deal = (row: any) => {
|
||||
if (!row.processId) return useMessage().warning("流程id不存在")
|
||||
processDrawerRef.value.openProcessDrawer(row)
|
||||
}
|
||||
|
||||
// 审批提交事件
|
||||
const taskSubmitEvent = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
postDownBlobFile("/admin/user/export", Object.assign(state.queryForm, { ids: selectObjs }), "用户管理.xlsx")
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-tabs class="flex-1" v-model="activeName" @tab-click="handleClickTabItem">
|
||||
<el-tab-pane v-for="v in tabItems" :key="v.id" :label="v.label" :name="v.value" />
|
||||
</el-tabs>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="state.loading"
|
||||
@@ -54,7 +58,7 @@
|
||||
<el-table-column label="审核时间" prop="processTime" show-overflow-tooltip min-width="160" />
|
||||
<el-table-column label="操作" min-width="100" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" size="small" link icon="VideoPlay" @click="deal(scope.row)"> 开始处理 </el-button>
|
||||
<el-button type="primary" size="small" link icon="VideoPlay" @click="deal(scope.row)">开始处理</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -74,12 +78,15 @@ import ProcessDrawer from "/@/components/processDrawer/index.vue"
|
||||
import { getUserFaceList } from "/@/api/admin/userFaceApprove"
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { getDicts } from "/@/api/admin/dict"
|
||||
|
||||
const { check_status } = useDict("check_status")
|
||||
const processDrawerRef = ref()
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
const draggableDepTreeRef = ref() // 树组件ref引用
|
||||
const activeName = ref(null)
|
||||
const tabItems = ref<any>([{}])
|
||||
const processDrawerRef = ref()
|
||||
|
||||
// 定义表格查询、后台调用的API
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
@@ -110,8 +117,21 @@ const handleGetSelectNode = (curClickedNode: any, checkedTreeNodes: any, isDeepT
|
||||
getDataList()
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
const { data } = await getDicts("check_status")
|
||||
data.unshift({ label: "全部", value: null })
|
||||
tabItems.value = data
|
||||
})
|
||||
|
||||
// tab点击切换
|
||||
const handleClickTabItem = (e: any) => {
|
||||
state.queryForm.processStatus = tabItems.value[e.index].value
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 点击开始处理
|
||||
const deal = (row: any) => {
|
||||
if (!row.processId) return useMessage().info("流程id不存在")
|
||||
if (!row.processId) return useMessage().warning("流程id不存在")
|
||||
processDrawerRef.value.openProcessDrawer(row)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user