diff --git a/src/api/iot/work-order/index.ts b/src/api/iot/work-order/index.ts new file mode 100644 index 0000000..46e021d --- /dev/null +++ b/src/api/iot/work-order/index.ts @@ -0,0 +1,65 @@ +import type { PageParam, PageResult } from '@/http/types' +import { http } from '@/http/http' + +/** 工单 VO */ +export interface WorkOrderVO { + id: number + code: string + title: string + area: string + description: string + images?: string[] + status: number + priority: number + creatorName?: string + assigneeName?: string + createTime: string + assignTime?: string + acceptTime?: string + completeTime?: string +} + +/** 工单状态枚举 */ +export const WorkOrderStatus = { + PENDING: 0, // 待派发 + PROCESSING: 1, // 进行中 + COMPLETED: 2, // 已完成 + CLOSED: 3, // 已关闭 +} as const + +/** 工单优先级枚举 */ +export const WorkOrderPriority = { + P0: 0, // 紧急 + P1: 1, // 高优 + P2: 2, // 普通 +} as const + +/** 获取工单详情 */ +export function getWorkOrder(id: number) { + return http.get(`/iot/work-order/get?id=${id}`) +} + +/** 获取工单分页列表 */ +export function getWorkOrderPage(params: PageParam) { + return http.get>('/iot/work-order/page', params) +} + +/** 创建工单 */ +export function createWorkOrder(data: Partial) { + return http.post('/iot/work-order/create', data) +} + +/** 派发工单 */ +export function assignWorkOrder(id: number, assigneeId: number) { + return http.put('/iot/work-order/assign', { id, assigneeId }) +} + +/** 接单 */ +export function acceptWorkOrder(id: number) { + return http.put(`/iot/work-order/accept?id=${id}`) +} + +/** 标记完成 */ +export function completeWorkOrder(id: number) { + return http.put(`/iot/work-order/complete?id=${id}`) +} diff --git a/src/pages-core/splash/index.vue b/src/pages-core/splash/index.vue new file mode 100644 index 0000000..34abf3b --- /dev/null +++ b/src/pages-core/splash/index.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/src/pages/scan/index.vue b/src/pages/scan/index.vue new file mode 100644 index 0000000..550f1d6 --- /dev/null +++ b/src/pages/scan/index.vue @@ -0,0 +1,141 @@ + + + diff --git a/src/pages/scan/inspection/index.vue b/src/pages/scan/inspection/index.vue new file mode 100644 index 0000000..4577c25 --- /dev/null +++ b/src/pages/scan/inspection/index.vue @@ -0,0 +1,206 @@ + + + + + diff --git a/src/pages/scan/staff/index.vue b/src/pages/scan/staff/index.vue new file mode 100644 index 0000000..07e8de2 --- /dev/null +++ b/src/pages/scan/staff/index.vue @@ -0,0 +1,145 @@ + + + + + diff --git a/src/pages/scan/work-order/components/progress-timeline.vue b/src/pages/scan/work-order/components/progress-timeline.vue new file mode 100644 index 0000000..a2eb590 --- /dev/null +++ b/src/pages/scan/work-order/components/progress-timeline.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/pages/scan/work-order/create.vue b/src/pages/scan/work-order/create.vue new file mode 100644 index 0000000..4942d20 --- /dev/null +++ b/src/pages/scan/work-order/create.vue @@ -0,0 +1,205 @@ + + + + + diff --git a/src/pages/scan/work-order/detail.vue b/src/pages/scan/work-order/detail.vue new file mode 100644 index 0000000..60beab7 --- /dev/null +++ b/src/pages/scan/work-order/detail.vue @@ -0,0 +1,391 @@ + + + + + diff --git a/src/pages/scan/work-order/index.vue b/src/pages/scan/work-order/index.vue new file mode 100644 index 0000000..bf0b7f9 --- /dev/null +++ b/src/pages/scan/work-order/index.vue @@ -0,0 +1,192 @@ + + + + +