From 84cb4930fdf950f317c4fb07259cc444ab8b3d83 Mon Sep 17 00:00:00 2001 From: lzh Date: Fri, 27 Mar 2026 16:48:13 +0800 Subject: [PATCH] =?UTF-8?q?refactor(@vben/web-antd):=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E4=BF=9D=E6=B4=81=E5=B7=A5=E5=8D=95=E4=B8=AD=E5=BF=83=EF=BC=8C?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=BD=BF=E7=94=A8=E9=80=9A=E7=94=A8=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 保洁工单中心与通用工单中心功能重叠,统一入口避免歧义。 - 删除 views/ops/cleaning/work-order 整个目录 - 迁移 cleaning-actions/detail-ext/work-progress 组件到 work-order/components/ - 迁移 CLEANING_TYPE_OPTIONS/TEXT_MAP 到 work-order/data.ts - 删除路由中保洁工单详情和看板两条路由 - 更新详情页组件引用路径 Co-Authored-By: Claude Opus 4.6 (1M context) --- .../web-antd/src/router/routes/modules/ops.ts | 22 - .../views/ops/cleaning/work-order/config.ts | 15 - .../cleaning/work-order/dashboard/index.vue | 1402 ----------- .../src/views/ops/cleaning/work-order/data.ts | 362 --- .../ops/cleaning/work-order/detail/index.vue | 2179 ----------------- .../views/ops/cleaning/work-order/index.vue | 878 ------- .../work-order/modules/assign-form.vue | 227 -- .../work-order/modules/cancel-form.vue | 123 - .../cleaning/work-order/modules/card-view.vue | 872 ------- .../cleaning/work-order/modules/stats-bar.vue | 486 ---- .../modules/upgrade-priority-form.vue | 136 - .../components/cleaning-actions.vue | 0 .../components/cleaning-detail-ext.vue | 0 .../components/cleaning-work-progress.vue | 2 +- .../web-antd/src/views/ops/work-order/data.ts | 36 +- .../src/views/ops/work-order/detail/index.vue | 6 +- 16 files changed, 34 insertions(+), 6712 deletions(-) delete mode 100644 apps/web-antd/src/views/ops/cleaning/work-order/config.ts delete mode 100644 apps/web-antd/src/views/ops/cleaning/work-order/dashboard/index.vue delete mode 100644 apps/web-antd/src/views/ops/cleaning/work-order/data.ts delete mode 100644 apps/web-antd/src/views/ops/cleaning/work-order/detail/index.vue delete mode 100644 apps/web-antd/src/views/ops/cleaning/work-order/index.vue delete mode 100644 apps/web-antd/src/views/ops/cleaning/work-order/modules/assign-form.vue delete mode 100644 apps/web-antd/src/views/ops/cleaning/work-order/modules/cancel-form.vue delete mode 100644 apps/web-antd/src/views/ops/cleaning/work-order/modules/card-view.vue delete mode 100644 apps/web-antd/src/views/ops/cleaning/work-order/modules/stats-bar.vue delete mode 100644 apps/web-antd/src/views/ops/cleaning/work-order/modules/upgrade-priority-form.vue rename apps/web-antd/src/views/ops/{cleaning => }/work-order/components/cleaning-actions.vue (100%) rename apps/web-antd/src/views/ops/{cleaning => }/work-order/components/cleaning-detail-ext.vue (100%) rename apps/web-antd/src/views/ops/{cleaning => }/work-order/components/cleaning-work-progress.vue (99%) diff --git a/apps/web-antd/src/router/routes/modules/ops.ts b/apps/web-antd/src/router/routes/modules/ops.ts index 46cad717e..b8923ffb6 100644 --- a/apps/web-antd/src/router/routes/modules/ops.ts +++ b/apps/web-antd/src/router/routes/modules/ops.ts @@ -51,28 +51,6 @@ const routes: RouteRecordRaw[] = [ }, component: () => import('#/views/ops/traffic/index.vue'), }, - // 保洁工单详情 - { - path: 'cleaning/work-order/detail/:id', - name: 'CleaningWorkOrderDetail', - meta: { - title: '工单详情', - activePath: '/ops/cleaning/work-order', - }, - component: () => - import('#/views/ops/cleaning/work-order/detail/index.vue'), - }, - // 保洁工单统计看板 - { - path: 'cleaning/work-order/dashboard', - name: 'CleaningWorkOrderDashboard', - meta: { - title: '统计看板', - activePath: '/ops/cleaning/work-order', - }, - component: () => - import('#/views/ops/cleaning/work-order/dashboard/index.vue'), - }, // 工单中心详情(通用,支持所有工单类型) { path: 'work-order/detail/:id', diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/config.ts b/apps/web-antd/src/views/ops/cleaning/work-order/config.ts deleted file mode 100644 index 6faaf0d45..000000000 --- a/apps/web-antd/src/views/ops/cleaning/work-order/config.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { OpsOrderCenterApi } from '#/api/ops/order-center'; - -/** 保洁类型选项 */ -export const CLEANING_TYPE_OPTIONS = [ - { label: '日常', value: OpsOrderCenterApi.CleaningType.ROUTINE }, - { label: '深度', value: OpsOrderCenterApi.CleaningType.DEEP }, - { label: '应急', value: OpsOrderCenterApi.CleaningType.EMERGENCY }, -]; - -/** 保洁类型文本映射 */ -export const CLEANING_TYPE_TEXT_MAP: Record = { - ROUTINE: '日常', - DEEP: '深度', - EMERGENCY: '应急', -}; diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/dashboard/index.vue b/apps/web-antd/src/views/ops/cleaning/work-order/dashboard/index.vue deleted file mode 100644 index 5273c205b..000000000 --- a/apps/web-antd/src/views/ops/cleaning/work-order/dashboard/index.vue +++ /dev/null @@ -1,1402 +0,0 @@ - - - - - diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/data.ts b/apps/web-antd/src/views/ops/cleaning/work-order/data.ts deleted file mode 100644 index d44930461..000000000 --- a/apps/web-antd/src/views/ops/cleaning/work-order/data.ts +++ /dev/null @@ -1,362 +0,0 @@ -import type { VbenFormSchema } from '#/adapter/form'; -import type { VxeTableGridOptions } from '#/adapter/vxe-table'; - -import { OpsOrderCenterApi } from '#/api/ops/order-center'; - -/** 状态颜色映射(背景色 + 文字色) */ -export const STATUS_COLOR_MAP: Record = { - PENDING: { bg: '#FFF3E8', text: '#C2540A' }, // 待分配 - QUEUED: { bg: '#F0EDFF', text: '#6D28D9' }, // 排队中 - DISPATCHED: { bg: '#E0F2FE', text: '#0284C7' }, // 已派发 - CONFIRMED: { bg: '#EEF0FF', text: '#3730A3' }, // 已确认 - ARRIVED: { bg: '#E5F5EF', text: '#0D9488' }, // 已到岗 - IN_PROGRESS: { bg: '#E8F0FE', text: '#1558C0' }, // 进行中 - PAUSED: { bg: '#FFF7E0', text: '#92400E' }, // 已暂停 - RESUMED: { bg: '#E5F6FB', text: '#0891B2' }, // 已恢复 - COMPLETED: { bg: '#E8FAF2', text: '#0A7A55' }, // 已完成 - CANCELLED: { bg: '#F0EDE8', text: '#6B5E52' }, // 已取消 -}; - -/** 状态文本映射 */ -export const STATUS_TEXT_MAP: Record = { - PENDING: '待分配', - QUEUED: '排队中', - DISPATCHED: '已推送', - CONFIRMED: '已确认', - ARRIVED: '作业中', - PAUSED: '已暂停', - RESUMED: '已恢复', - COMPLETED: '已完成', - CANCELLED: '已取消', -}; - -/** 状态图标映射 */ -export const STATUS_ICON_MAP: Record = { - PENDING: 'solar:inbox-line-bold-duotone', // 待分配 - QUEUED: 'solar:clock-circle-bold-duotone', // 排队中 - DISPATCHED: 'solar:transfer-horizontal-bold-duotone', // 已推送 - CONFIRMED: 'solar:check-circle-bold-duotone', // 已确认 - ARRIVED: 'solar:play-circle-bold-duotone', // 作业中 - PAUSED: 'solar:pause-circle-bold-duotone', // 已暂停 - RESUMED: 'solar:play-circle-bold-duotone', // 已恢复 - COMPLETED: 'solar:check-read-bold-duotone', // 已完成 - CANCELLED: 'solar:close-circle-bold-duotone', // 已取消 -}; - -/** Tab 快捷筛选配置 */ -export const STATUS_TAB_OPTIONS = [ - { key: 'ALL', label: '全部', statuses: undefined }, - { key: 'PENDING', label: '待处理', statuses: ['PENDING'] }, - { - key: 'IN_PROGRESS', - label: '进行中', - statuses: ['DISPATCHED', 'CONFIRMED', 'ARRIVED', 'QUEUED'], - }, - { key: 'COMPLETED', label: '已完成', statuses: ['COMPLETED'] }, - { key: 'CANCELLED', label: '已取消', statuses: ['CANCELLED'] }, -]; - -/** 工单类型选项 */ -export const ORDER_TYPE_OPTIONS = [ - { label: '保洁', value: OpsOrderCenterApi.OrderType.CLEAN }, - { label: '维修', value: OpsOrderCenterApi.OrderType.REPAIR }, - { label: '安保', value: OpsOrderCenterApi.OrderType.SECURITY }, -]; - -/** 工单类型文本映射 */ -export const ORDER_TYPE_TEXT_MAP: Record = { - CLEAN: '保洁', - REPAIR: '维修', - SECURITY: '安保', -}; - -/** 工单类型颜色映射(背景色 + 文字色) */ -export const ORDER_TYPE_COLOR_MAP: Record< - string, - { bg: string; text: string } -> = { - CLEAN: { bg: '#E5FAF2', text: '#047857' }, // 保洁 - SECURITY: { bg: '#EEF0FF', text: '#3730A3' }, // 安保 - FACILITIES: { bg: '#FFF5E0', text: '#92400E' }, // 设施 - SERVICE: { bg: '#E0F2FE', text: '#0369A1' }, // 服务 -}; - -/** 工单状态选项 */ -export const ORDER_STATUS_OPTIONS = [ - { label: '待分配', value: OpsOrderCenterApi.OrderStatus.PENDING }, - { label: '排队中', value: OpsOrderCenterApi.OrderStatus.QUEUED }, - { label: '已推送', value: OpsOrderCenterApi.OrderStatus.DISPATCHED }, - { label: '已确认', value: OpsOrderCenterApi.OrderStatus.CONFIRMED }, - { label: '已到岗', value: OpsOrderCenterApi.OrderStatus.ARRIVED }, - { label: '已暂停', value: OpsOrderCenterApi.OrderStatus.PAUSED }, - { label: '已完成', value: OpsOrderCenterApi.OrderStatus.COMPLETED }, - { label: '已取消', value: OpsOrderCenterApi.OrderStatus.CANCELLED }, -]; - -/** 优先级选项 */ -export const PRIORITY_OPTIONS = [ - { label: 'P0 (紧急)', value: OpsOrderCenterApi.Priority.P0 }, - { label: 'P1 (重要)', value: OpsOrderCenterApi.Priority.P1 }, - { label: 'P2 (普通)', value: OpsOrderCenterApi.Priority.P2 }, -]; - -/** 触发来源选项 */ -export const TRIGGER_SOURCE_OPTIONS = [ - { label: '蓝牙信标', value: OpsOrderCenterApi.TriggerSource.IOT_BEACON }, - { label: '客流阈值', value: OpsOrderCenterApi.TriggerSource.PEOPLE_FLOW }, - { label: '手动创建', value: OpsOrderCenterApi.TriggerSource.MANUAL }, - { label: '视频告警', value: OpsOrderCenterApi.TriggerSource.VIDEO_ALARM }, - { label: '门禁告警', value: OpsOrderCenterApi.TriggerSource.ACCESS_ALARM }, - { label: '巡更告警', value: OpsOrderCenterApi.TriggerSource.PATROL_ALARM }, - { label: '紧急按钮', value: OpsOrderCenterApi.TriggerSource.PANIC_BUTTON }, -]; - -/** 触发来源文本映射 */ -export const TRIGGER_SOURCE_TEXT_MAP: Record = { - IOT_BEACON: '蓝牙信标', - IOT_TRAFFIC: '客流阈值', - TRAFFIC: '客流阈值', - PEOPLE_FLOW: '客流阈值', - MANUAL: '手动创建', - VIDEO_ALARM: '视频告警', - ACCESS_ALARM: '门禁告警', - PATROL_ALARM: '巡更告警', - PANIC_BUTTON: '紧急按钮', -}; - -/** 保洁类型选项 */ -export const CLEANING_TYPE_OPTIONS = [ - { label: '日常', value: OpsOrderCenterApi.CleaningType.ROUTINE }, - { label: '深度', value: OpsOrderCenterApi.CleaningType.DEEP }, - { label: '应急', value: OpsOrderCenterApi.CleaningType.EMERGENCY }, -]; - -/** 保洁类型文本映射 */ -export const CLEANING_TYPE_TEXT_MAP: Record = { - ROUTINE: '日常', - DEEP: '深度', - EMERGENCY: '应急', -}; - -/** 安保告警类型文本映射 */ -export const SECURITY_ALARM_TYPE_MAP: Record = { - intrusion: '入侵检测', - leave_post: '离岗检测', - fire: '火焰检测', - fence: '电子围栏', -}; - -/** 安保告警类型颜色映射 */ -export const SECURITY_ALARM_TYPE_COLOR_MAP: Record = { - intrusion: '#f5222d', - leave_post: '#fa8c16', - fire: '#ff4d4f', - fence: '#faad14', -}; - -/** 列表表格列定义 */ -export function useGridColumns(): VxeTableGridOptions['columns'] { - return [ - { type: 'seq', width: 50, title: '序号' }, - { - field: 'orderCode', - title: '工单编号', - minWidth: 180, - showOverflow: true, - }, - { - field: 'title', - title: '工单标题', - minWidth: 180, - showOverflow: true, - }, - { - field: 'orderType', - title: '类型', - width: 80, - align: 'center', - slots: { default: 'orderType' }, - }, - { - field: 'status', - title: '状态', - width: 90, - align: 'center', - slots: { default: 'status' }, - }, - { - field: 'priority', - title: '优先级', - width: 80, - align: 'center', - slots: { default: 'priority' }, - }, - { - field: 'location', - title: '位置', - minWidth: 150, - showOverflow: true, - }, - { - field: 'assigneeName', - title: '执行人', - width: 90, - align: 'center', - slots: { default: 'assignee' }, - }, - { - field: 'createTime', - title: '创建时间', - width: 160, - formatter: 'formatDateTime', - }, - { - title: '操作', - width: 200, - fixed: 'right', - align: 'center', - slots: { default: 'actions' }, - }, - ]; -} - -/** 搜索表单Schema */ -export function useSearchFormSchema(): VbenFormSchema[] { - return [ - { - fieldName: 'orderType', - label: '工单类型', - component: 'Select', - componentProps: { - options: ORDER_TYPE_OPTIONS, - placeholder: '请选择工单类型', - allowClear: true, - }, - }, - { - fieldName: 'status', - label: '工单状态', - component: 'Select', - componentProps: { - options: ORDER_STATUS_OPTIONS, - placeholder: '请选择工单状态', - mode: 'multiple', - allowClear: true, - maxTagCount: 2, - }, - }, - { - fieldName: 'priority', - label: '优先级', - component: 'Select', - componentProps: { - options: PRIORITY_OPTIONS, - placeholder: '请选择优先级', - allowClear: true, - }, - }, - { - fieldName: 'orderCode', - label: '工单编号', - component: 'Input', - componentProps: { - placeholder: '请输入工单编号', - allowClear: true, - }, - }, - { - fieldName: 'title', - label: '工单标题', - component: 'Input', - componentProps: { - placeholder: '请输入标题关键词', - allowClear: true, - }, - }, - ]; -} - -/** 派单表单Schema */ -export function useAssignFormSchema(): VbenFormSchema[] { - return [ - { - fieldName: 'orderId', - label: '工单ID', - component: 'Input', - dependencies: { - triggerFields: [''], - show: () => false, - }, - }, - { - fieldName: 'assigneeId', - label: '执行人', - component: 'Select', - componentProps: { - placeholder: '请选择执行人', - // TODO: 接入保洁员列表API - options: [], - }, - rules: 'required', - }, - { - fieldName: 'remark', - label: '备注', - component: 'Textarea', - componentProps: { - placeholder: '请输入备注(选填)', - rows: 3, - }, - }, - ]; -} - -/** 升级优先级表单Schema */ -export function useUpgradePriorityFormSchema(): VbenFormSchema[] { - return [ - { - fieldName: 'orderId', - label: '工单ID', - component: 'Input', - dependencies: { - triggerFields: [''], - show: () => false, - }, - }, - { - fieldName: 'reason', - label: '升级原因', - component: 'Textarea', - componentProps: { - placeholder: '请输入升级为P0紧急工单的原因', - rows: 4, - }, - rules: 'required', - }, - ]; -} - -/** 状态干预表单Schema */ -export function useStatusInterventionFormSchema(): VbenFormSchema[] { - return [ - { - fieldName: 'orderId', - label: '工单ID', - component: 'Input', - dependencies: { - triggerFields: [''], - show: () => false, - }, - }, - { - fieldName: 'reason', - label: '操作原因', - component: 'Textarea', - componentProps: { - placeholder: '请输入操作原因', - rows: 4, - }, - rules: 'required', - }, - ]; -} diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/detail/index.vue b/apps/web-antd/src/views/ops/cleaning/work-order/detail/index.vue deleted file mode 100644 index 3a22d8be6..000000000 --- a/apps/web-antd/src/views/ops/cleaning/work-order/detail/index.vue +++ /dev/null @@ -1,2179 +0,0 @@ - - - - - diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/index.vue b/apps/web-antd/src/views/ops/cleaning/work-order/index.vue deleted file mode 100644 index f0dce9010..000000000 --- a/apps/web-antd/src/views/ops/cleaning/work-order/index.vue +++ /dev/null @@ -1,878 +0,0 @@ - - - - - diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/modules/assign-form.vue b/apps/web-antd/src/views/ops/cleaning/work-order/modules/assign-form.vue deleted file mode 100644 index 08415d341..000000000 --- a/apps/web-antd/src/views/ops/cleaning/work-order/modules/assign-form.vue +++ /dev/null @@ -1,227 +0,0 @@ - - - - - diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/modules/cancel-form.vue b/apps/web-antd/src/views/ops/cleaning/work-order/modules/cancel-form.vue deleted file mode 100644 index a62b95fe9..000000000 --- a/apps/web-antd/src/views/ops/cleaning/work-order/modules/cancel-form.vue +++ /dev/null @@ -1,123 +0,0 @@ - - - - - diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/modules/card-view.vue b/apps/web-antd/src/views/ops/cleaning/work-order/modules/card-view.vue deleted file mode 100644 index 7cb28734d..000000000 --- a/apps/web-antd/src/views/ops/cleaning/work-order/modules/card-view.vue +++ /dev/null @@ -1,872 +0,0 @@ - - - - - diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/modules/stats-bar.vue b/apps/web-antd/src/views/ops/cleaning/work-order/modules/stats-bar.vue deleted file mode 100644 index d93399478..000000000 --- a/apps/web-antd/src/views/ops/cleaning/work-order/modules/stats-bar.vue +++ /dev/null @@ -1,486 +0,0 @@ - - - - - diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/modules/upgrade-priority-form.vue b/apps/web-antd/src/views/ops/cleaning/work-order/modules/upgrade-priority-form.vue deleted file mode 100644 index 5f2813780..000000000 --- a/apps/web-antd/src/views/ops/cleaning/work-order/modules/upgrade-priority-form.vue +++ /dev/null @@ -1,136 +0,0 @@ - - - - - diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-actions.vue b/apps/web-antd/src/views/ops/work-order/components/cleaning-actions.vue similarity index 100% rename from apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-actions.vue rename to apps/web-antd/src/views/ops/work-order/components/cleaning-actions.vue diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-detail-ext.vue b/apps/web-antd/src/views/ops/work-order/components/cleaning-detail-ext.vue similarity index 100% rename from apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-detail-ext.vue rename to apps/web-antd/src/views/ops/work-order/components/cleaning-detail-ext.vue diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-work-progress.vue b/apps/web-antd/src/views/ops/work-order/components/cleaning-work-progress.vue similarity index 99% rename from apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-work-progress.vue rename to apps/web-antd/src/views/ops/work-order/components/cleaning-work-progress.vue index 5c6c76c34..dd5892a0c 100644 --- a/apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-work-progress.vue +++ b/apps/web-antd/src/views/ops/work-order/components/cleaning-work-progress.vue @@ -7,7 +7,7 @@ import { IconifyIcon } from '@vben/icons'; import { Card, Progress, Tag } from 'ant-design-vue'; -import { CLEANING_TYPE_TEXT_MAP } from '../config'; +import { CLEANING_TYPE_TEXT_MAP } from '../data'; defineOptions({ name: 'CleaningWorkProgress' }); diff --git a/apps/web-antd/src/views/ops/work-order/data.ts b/apps/web-antd/src/views/ops/work-order/data.ts index 2b0004aeb..5a147b045 100644 --- a/apps/web-antd/src/views/ops/work-order/data.ts +++ b/apps/web-antd/src/views/ops/work-order/data.ts @@ -110,6 +110,20 @@ export function usePriorityInfo() { return { getPriorityInfo }; } +/** 保洁类型选项 */ +export const CLEANING_TYPE_OPTIONS = [ + { label: '日常', value: OpsOrderCenterApi.CleaningType.ROUTINE }, + { label: '深度', value: OpsOrderCenterApi.CleaningType.DEEP }, + { label: '应急', value: OpsOrderCenterApi.CleaningType.EMERGENCY }, +]; + +/** 保洁类型文本映射 */ +export const CLEANING_TYPE_TEXT_MAP: Record = { + ROUTINE: '日常', + DEEP: '深度', + EMERGENCY: '应急', +}; + /** 工单类型选项 */ export const ORDER_TYPE_OPTIONS = [ { label: '保洁', value: OpsOrderCenterApi.OrderType.CLEAN }, @@ -124,15 +138,25 @@ export const ORDER_TYPE_TEXT_MAP: Record = { SECURITY: '安保', }; -/** 工单类型颜色映射(背景色 + 文字色) */ +/** 工单类型颜色映射(背景色 + 文字色 + 边条色) */ export const ORDER_TYPE_COLOR_MAP: Record< string, - { bg: string; text: string } + { bg: string; border: string; text: string } > = { - CLEAN: { bg: '#E5FAF2', text: '#047857' }, // 保洁 - SECURITY: { bg: '#EEF0FF', text: '#3730A3' }, // 安保 - FACILITIES: { bg: '#FFF5E0', text: '#92400E' }, // 设施 - SERVICE: { bg: '#E0F2FE', text: '#0369A1' }, // 服务 + CLEAN: { bg: '#E5FAF2', text: '#047857', border: '#10B981' }, // 保洁 + REPAIR: { bg: '#FFF5E0', text: '#92400E', border: '#F59E0B' }, // 维修 + SECURITY: { bg: '#EEF0FF', text: '#3730A3', border: '#6366F1' }, // 安保 + FACILITIES: { bg: '#FFF5E0', text: '#92400E', border: '#F59E0B' }, // 设施 + SERVICE: { bg: '#E0F2FE', text: '#0369A1', border: '#0EA5E9' }, // 服务 +}; + +/** 工单类型图标映射 */ +export const ORDER_TYPE_ICON_MAP: Record = { + CLEAN: 'solar:broom-bold-duotone', // 保洁 + REPAIR: 'solar:wrench-bold-duotone', // 维修 + SECURITY: 'solar:shield-check-bold-duotone', // 安保 + FACILITIES: 'solar:settings-bold-duotone', // 设施 + SERVICE: 'solar:headphones-round-bold-duotone', // 服务 }; /** 工单状态选项 */ diff --git a/apps/web-antd/src/views/ops/work-order/detail/index.vue b/apps/web-antd/src/views/ops/work-order/detail/index.vue index e9f132f13..542711ea1 100644 --- a/apps/web-antd/src/views/ops/work-order/detail/index.vue +++ b/apps/web-antd/src/views/ops/work-order/detail/index.vue @@ -40,9 +40,9 @@ import { } from '#/api/ops/cleaning'; import { getOrderDetail } from '#/api/ops/order-center'; -import CleaningActions from '../../cleaning/work-order/components/cleaning-actions.vue'; -import CleaningDetailExt from '../../cleaning/work-order/components/cleaning-detail-ext.vue'; -import CleaningWorkProgress from '../../cleaning/work-order/components/cleaning-work-progress.vue'; +import CleaningActions from '../components/cleaning-actions.vue'; +import CleaningDetailExt from '../components/cleaning-detail-ext.vue'; +import CleaningWorkProgress from '../components/cleaning-work-progress.vue'; import SecurityDetailExt from '../../security/work-order/components/security-detail-ext.vue'; import { ORDER_TYPE_COLOR_MAP,