diff --git a/src/views/admin/system/userFaceApprove/index.vue b/src/views/admin/system/userFaceApprove/index.vue
index 11eea50..9d770c0 100644
--- a/src/views/admin/system/userFaceApprove/index.vue
+++ b/src/views/admin/system/userFaceApprove/index.vue
@@ -32,6 +32,16 @@
+
+
+
+
+
@@ -83,6 +93,27 @@
+
+
+
+
+
+ {{ getFaceQualityLabel(row) }}
+
+
+
+
+
@@ -141,6 +172,104 @@ const processDrawerRef = ref()
const batchDealRef = ref()
const loading = ref()
+/** PC 当前阶段用于判定低质量人脸的固定阈值,与终端默认在库阈值保持一致。 */
+const LIBRARY_FACE_QUALITY_THRESHOLD = 0.6
+
+/** 人脸质量查询分类,与后端分页接口的 qualityCategory 协议值保持一致。 */
+const FACE_QUALITY_FILTER_OPTIONS = [
+ { label: "合格", value: "qualified" },
+ { label: "低质量", value: "low" },
+ { label: "检测失败", value: "failed" },
+ { label: "未检测", value: "pending" },
+] as const
+
+/** Element Plus 小号状态标签允许使用的语义类型。 */
+type FaceQualityTagType = "success" | "warning" | "danger" | "info"
+
+/** 审批列表中与服务端人脸质量字段有关的最小行结构。 */
+interface UserFaceQualityRow {
+ /** 虹软综合质量分,数据库 decimal 可能由不同网关序列化为数字或文本。 */
+ qualityScore?: number | string | null
+ /** 服务端质量状态;历史未检测记录为空。 */
+ qualityStatus?: string | null
+ /** 终端完成质量检测的时间。 */
+ qualityCheckedAt?: string | null
+ /** 虹软 SDK 或终端插件错误码。 */
+ qualityErrorCode?: number | string | null
+ /** 最后一次成功写入质量结果的终端设备主键。 */
+ qualityDeviceId?: number | string | null
+}
+
+/** 人脸质量单元格的紧凑展示模型。 */
+interface FaceQualityDisplay {
+ /** 标签内可直接理解的状态与分数文案。 */
+ label: string
+ /** 与状态对应的 Element Plus 语义颜色。 */
+ tagType: FaceQualityTagType
+ /** 包含阈值、时间、来源和排查动作的完整辅助说明。 */
+ tooltip: string
+}
+
+/**
+ * 将服务端人脸质量字段归一化为不依赖颜色的表格状态。
+ *
+ * @param row 审批列表人脸记录
+ * @returns 标签文案、语义颜色和完整诊断说明
+ */
+const resolveFaceQuality = (row: UserFaceQualityRow): FaceQualityDisplay => {
+ const checkedAt = row.qualityCheckedAt || "未知"
+ const deviceId = row.qualityDeviceId ?? "未知"
+ if (row.qualityStatus === "detected") {
+ const score = Number(row.qualityScore)
+ if (row.qualityScore == null || row.qualityScore === "" || !Number.isFinite(score) || score < 0 || score > 1) {
+ return {
+ label: "数据异常",
+ tagType: "danger",
+ tooltip: `服务端质量状态为已检测,但质量分无效。检测时间:${checkedAt};来源设备:${deviceId}`,
+ }
+ }
+ const scoreText = score.toFixed(2)
+ if (score < LIBRARY_FACE_QUALITY_THRESHOLD) {
+ return {
+ label: `低质量 ${scoreText}`,
+ tagType: "warning",
+ tooltip: `质量分 ${scoreText},低于当前阈值 ${LIBRARY_FACE_QUALITY_THRESHOLD.toFixed(
+ 2,
+ )}。请排查照片清晰度、光照、人脸角度及人脸区域大小。检测时间:${checkedAt};来源设备:${deviceId}`,
+ }
+ }
+ return {
+ label: `合格 ${scoreText}`,
+ tagType: "success",
+ tooltip: `质量分 ${scoreText},达到当前阈值 ${LIBRARY_FACE_QUALITY_THRESHOLD.toFixed(
+ 2,
+ )}。检测时间:${checkedAt};来源设备:${deviceId}`,
+ }
+ }
+ if (row.qualityStatus === "failed") {
+ const errorCode = row.qualityErrorCode == null ? "未知" : row.qualityErrorCode
+ return {
+ label: "检测失败",
+ tagType: "danger",
+ tooltip: `质量检测失败,错误码:${errorCode}。请确认终端虹软质量授权和本地图片有效性。检测时间:${checkedAt};来源设备:${deviceId}`,
+ }
+ }
+ return {
+ label: "未检测",
+ tagType: "info",
+ tooltip: "尚未收到终端质量检测结果,可在终端人脸管理中执行存量检测。",
+ }
+}
+
+/** 返回人脸质量标签文案。 */
+const getFaceQualityLabel = (row: UserFaceQualityRow) => resolveFaceQuality(row).label
+
+/** 返回人脸质量标签语义类型。 */
+const getFaceQualityTagType = (row: UserFaceQualityRow) => resolveFaceQuality(row).tagType
+
+/** 返回人脸质量 Tooltip 与无障碍说明。 */
+const getFaceQualityTooltip = (row: UserFaceQualityRow) => resolveFaceQuality(row).tooltip
+
// 多选rows
const selectObjs = ref([]) as any
const selectIds = ref([]) as any
@@ -153,6 +282,7 @@ const state: BasicTableProps = reactive({
deptId: "",
username: "",
phone: "",
+ qualityCategory: "",
isDeepDept: false,
processStatus: "2",
},