diff --git a/apps/web-antd/src/router/routes/modules/ops.ts b/apps/web-antd/src/router/routes/modules/ops.ts index fb2ff4ab2..a6739690e 100644 --- a/apps/web-antd/src/router/routes/modules/ops.ts +++ b/apps/web-antd/src/router/routes/modules/ops.ts @@ -21,6 +21,16 @@ const routes: RouteRecordRaw[] = [ }, component: () => import('#/views/ops/area/index.vue'), }, + // 区域设备管理 + { + path: 'area-device', + name: 'OpsAreaDevice', + meta: { + title: '区域设备管理', + activePath: '/ops/area-device', + }, + component: () => import('#/views/ops/area-device/index.vue'), + }, // 客流统计 { path: 'traffic', diff --git a/apps/web-antd/src/views/ops/area-device/index.vue b/apps/web-antd/src/views/ops/area-device/index.vue new file mode 100644 index 000000000..ce196b7c8 --- /dev/null +++ b/apps/web-antd/src/views/ops/area-device/index.vue @@ -0,0 +1,311 @@ + + + + + diff --git a/apps/web-antd/src/views/ops/area-device/modules/device-card.vue b/apps/web-antd/src/views/ops/area-device/modules/device-card.vue new file mode 100644 index 000000000..3c19563a7 --- /dev/null +++ b/apps/web-antd/src/views/ops/area-device/modules/device-card.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/apps/web-antd/src/views/ops/area-device/modules/device-detail-drawer.vue b/apps/web-antd/src/views/ops/area-device/modules/device-detail-drawer.vue new file mode 100644 index 000000000..c6e660875 --- /dev/null +++ b/apps/web-antd/src/views/ops/area-device/modules/device-detail-drawer.vue @@ -0,0 +1,845 @@ + + + + + diff --git a/apps/web-antd/src/views/ops/area/data.ts b/apps/web-antd/src/views/ops/area/data.ts index 72e1b9b8e..90ee88275 100644 --- a/apps/web-antd/src/views/ops/area/data.ts +++ b/apps/web-antd/src/views/ops/area/data.ts @@ -44,6 +44,23 @@ export const RELATION_TYPE_OPTIONS: { label: string; value: RelationType }[] = [ { label: '工牌', value: 'BADGE' }, ]; +/** 关联类型颜色映射(卡片用) */ +export const RELATION_TYPE_COLORS: Record< + string, + { bg: string; text: string } +> = { + TRAFFIC_COUNTER: { bg: '#e6f4ff', text: '#1677ff' }, + BEACON: { bg: '#f6ffed', text: '#52c41a' }, + BADGE: { bg: '#fff7e6', text: '#fa8c16' }, +}; + +/** 关联类型 Tag 颜色映射(Ant Design Tag 用) */ +export const RELATION_TYPE_TAG_COLORS: Record = { + TRAFFIC_COUNTER: 'blue', + BEACON: 'green', + BADGE: 'orange', +}; + /** 启用状态选项(筛选用) */ export const ACTIVE_OPTIONS = [ { label: '全部', value: undefined },