From b7ffa7395cddfeb10f88d70a81567371f62021c3 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期日, 25 十月 2026 16:30:17 +0800
Subject: [PATCH] feat(router): 排除AI模块页面并添加访问权限控制
---
src/views/hrm/attendance/rule/data.ts | 87 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 86 insertions(+), 1 deletions(-)
diff --git a/src/views/hrm/attendance/rule/data.ts b/src/views/hrm/attendance/rule/data.ts
index 50bca13..c286424 100644
--- a/src/views/hrm/attendance/rule/data.ts
+++ b/src/views/hrm/attendance/rule/data.ts
@@ -106,6 +106,83 @@
},
},
{
+ fieldName: 'locationRequired',
+ label: '瀹氫綅鎵撳崱',
+ component: 'Switch',
+ defaultValue: false,
+ componentProps: {
+ checkedChildren: '鍚敤',
+ unCheckedChildren: '鍏抽棴',
+ },
+ },
+ {
+ fieldName: 'locationName',
+ label: '鎵撳崱鍦扮偣',
+ component: 'Input',
+ componentProps: { placeholder: '渚嬪锛氭柊楂樼數鍔涘巶鍖�' },
+ dependencies: {
+ triggerFields: ['locationRequired'],
+ show: (values) => Boolean(values.locationRequired),
+ },
+ rules: 'required',
+ },
+ {
+ fieldName: 'locationAddress',
+ label: '鍦扮偣鍦板潃',
+ component: 'Input',
+ componentProps: { placeholder: '璇疯緭鍏ヨ缁嗗湴鍧�锛屼究浜庡憳宸ヨ瘑鍒�' },
+ dependencies: {
+ triggerFields: ['locationRequired'],
+ show: (values) => Boolean(values.locationRequired),
+ },
+ },
+ {
+ fieldName: 'longitude',
+ label: '缁忓害(WGS84)',
+ component: 'InputNumber',
+ componentProps: { min: -180, max: 180, precision: 7, style: { width: '100%' } },
+ dependencies: {
+ triggerFields: ['locationRequired'],
+ show: (values) => Boolean(values.locationRequired),
+ },
+ rules: 'required',
+ },
+ {
+ fieldName: 'latitude',
+ label: '绾害(WGS84)',
+ component: 'InputNumber',
+ componentProps: { min: -90, max: 90, precision: 7, style: { width: '100%' } },
+ dependencies: {
+ triggerFields: ['locationRequired'],
+ show: (values) => Boolean(values.locationRequired),
+ },
+ rules: 'required',
+ },
+ {
+ fieldName: 'radiusMeters',
+ label: '鎵撳崱鍗婂緞(绫�)',
+ component: 'InputNumber',
+ defaultValue: 100,
+ componentProps: { min: 10, max: 5000, precision: 0, style: { width: '100%' } },
+ help: '鏈�灏忓彲璁� 10 绫筹紱瀹為檯绮惧害鍙栧喅浜庢墜鏈� GPS 涓庣幆澧�',
+ dependencies: {
+ triggerFields: ['locationRequired'],
+ show: (values) => Boolean(values.locationRequired),
+ },
+ rules: 'required',
+ },
+ {
+ fieldName: 'coordinateSystem',
+ label: '鍧愭爣绯�',
+ component: 'Input',
+ defaultValue: 'WGS84',
+ componentProps: { disabled: true },
+ dependencies: {
+ triggerFields: ['locationRequired'],
+ show: (values) => Boolean(values.locationRequired),
+ },
+ },
+ {
fieldName: 'status',
label: '鐘舵��',
component: 'RadioGroup',
@@ -186,6 +263,14 @@
{ field: 'earlyAllowMinutes', title: '鏃╅��鍏佽(鍒嗛挓)', width: 120 },
{ field: 'overtimeThreshold', title: '鍔犵彮璧风畻(灏忔椂)', width: 120 },
{
+ field: 'locationName',
+ title: '鎵撳崱鑼冨洿',
+ minWidth: 180,
+ formatter: ({ row }) => row.locationRequired
+ ? `${row.locationName || '-'}锛�${row.radiusMeters || 0}绫筹級`
+ : '涓嶉檺鍒朵綅缃�',
+ },
+ {
field: 'status',
title: '鐘舵��',
width: 80,
@@ -203,4 +288,4 @@
},
},
];
-}
\ No newline at end of file
+}
--
Gitblit v1.9.3