@appthen/cli 1.2.10 → 1.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitignore +1 -0
- package/bin/main.js +92 -0
- package/dist/index.js +7014 -14988
- package/package.json +8 -1
- package/tests/test-app/.appthen/shadow-space-100001-test-app-e99876b1.json +1862 -0
- package/tests/test-app/.appthen/space-config.json +8 -0
- package/tests/test-app/docs/AI-Workflow.flow +112 -0
- package/tests/test-app/docs/Logic-1.flow +16 -0
- package/tests/test-app/docs/Logic.flow +16 -0
- package/tests/test-app/docs/Project-Blueprint-1.flow +119 -0
- package/tests/test-app/docs/Project-Blueprint.flow +119 -0
- package/tests/test-app/docs/README.md +3 -0
- package/tests/test-app/docs/claude.md +194 -0
- package/tests/test-app/docs/page_requirement_analysis.md +149 -0
- package/tests/test-app/docs//345/267/245/345/215/225/347/256/241/347/220/206/347/263/273/347/273/237/350/257/246/347/273/206/350/256/276/350/256/241.md +377 -0
- package/tests/test-app/src/apis/AddTodoPost.api.ts +42 -0
- package/tests/test-app/src/apis/DeleteTodoPost.api.ts +32 -0
- package/tests/test-app/src/apis/GetListPost.api.ts +38 -0
- package/tests/test-app/src/apis/TicketAttachmentUploadPost.api.ts +42 -0
- package/tests/test-app/src/apis/UpdateTodoPost.api.ts +46 -0
- package/tests/test-app/src/app.css +15 -0
- package/tests/test-app/src/cloud_functions/ticket|attachment|upload.node.ts +86 -0
- package/tests/test-app/src/cloud_functions/ticket|comment|add.node.ts +65 -0
- package/tests/test-app/src/cloud_functions/types|entity|Ticket.node.ts +88 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketAttachment.node.ts +70 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketCategory.node.ts +56 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketComment.node.ts +62 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketHistory.node.ts +74 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketPriority.node.ts +68 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketStatus.node.ts +63 -0
- package/tests/test-app/src/cloud_functions/types|models|CreateTicketParams.node.ts +20 -0
- package/tests/test-app/src/cloud_functions/types|models|TicketListParams.node.ts +30 -0
- package/tests/test-app/src/cloud_functions/types|models|UpdateTicketParams.node.ts +22 -0
- package/tests/test-app/src/components/Button.js +11 -0
- package/tests/test-app/src/components/MessageCenter.tsx +506 -0
- package/tests/test-app/src/components/MouduleDemoNzp.tsx +40 -0
- package/tests/test-app/src/components/Timeline.tsx +145 -0
- package/tests/test-app/src/index.ts +2 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketCommentAddPost.api.ts +48 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketCreatePost.api.ts +52 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketDeleteDelete.api.ts +39 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketDetailGet.api.ts +39 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketListGet.api.ts +61 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketUpdatePut.api.ts +57 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorFaultListGet.ts +76 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorListGet.ts +76 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorOperationRecordsGet.ts +284 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorStatisticsGet.ts +96 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/category|list.node.ts +40 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/priority|list.node.ts +26 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/status|list.node.ts +26 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|create.node.ts +54 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|delete.node.ts +55 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|detail.node.ts +65 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|list.node.ts +85 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|update.node.ts +73 -0
- package/tests/test-app/src/modules/work_order_module/data_model/Ticket.m.ts +85 -0
- package/tests/test-app/src/modules/work_order_module/data_model/TicketCategory.m.ts +53 -0
- package/tests/test-app/src/modules/work_order_module/data_model/TicketStatus.m.ts +60 -0
- package/tests/test-app/src/modules/work_order_module//345/267/245/345/215/225/347/263/273/347/273/237/344/272/247/345/223/201/350/256/276/350/256/241/346/226/207/346/241/243.md +301 -0
- package/tests/test-app/src/modules/work_order_module//345/267/245/345/215/225/347/263/273/347/273/237/345/274/200/345/217/221/344/273/273/345/212/241/345/210/206/345/267/245/346/226/207/346/241/243.md +345 -0
- package/tests/test-app/src/pages/CustomerManagement.tsx +535 -0
- package/tests/test-app/src/pages/CyberpunkDashboard.tsx +348 -0
- package/tests/test-app/src/pages/CyberpunkProductManagement.tsx +637 -0
- package/tests/test-app/src/pages/CyberpunkUserList.tsx +316 -0
- package/tests/test-app/src/pages/DashboardV2.tsx +334 -0
- package/tests/test-app/src/pages/DataReport.tsx +298 -0
- package/tests/test-app/src/pages/DataStatistics.tsx +317 -0
- package/tests/test-app/src/pages/DepartmentManagement.tsx +503 -0
- package/tests/test-app/src/pages/FileExplorer.tsx +441 -0
- package/tests/test-app/src/pages/OrderDetail.tsx +393 -0
- package/tests/test-app/src/pages/ProductManagement.tsx +521 -0
- package/tests/test-app/src/pages/ProjectTimeline.tsx +395 -0
- package/tests/test-app/src/pages/RoleManagement.tsx +523 -0
- package/tests/test-app/src/pages/SLAManagement.tsx +668 -0
- package/tests/test-app/src/pages/StaticCyberpunkDashboard.tsx +462 -0
- package/tests/test-app/src/pages/StaticCyberpunkUserList.tsx +567 -0
- package/tests/test-app/src/pages/StudentWeaknessList.tsx +547 -0
- package/tests/test-app/src/pages/SystemSettings.tsx +422 -0
- package/tests/test-app/src/pages/TaskManagement.tsx +467 -0
- package/tests/test-app/src/pages/TicketCreate.tsx +27 -0
- package/tests/test-app/src/pages/TicketDetail.tsx +27 -0
- package/tests/test-app/src/pages/TicketList.tsx +27 -0
- package/tests/test-app/src/pages/TicketManagement.tsx +402 -0
- package/tests/test-app/src/pages/TicketManagementPage.tsx +1238 -0
- package/tests/test-app/src/pages/UserProfile.tsx +404 -0
- package/tests/test-app/src/pages/VisualAIIDEUpgrade.tsx +245 -0
- package/tests/test-app/src/pages/WorkflowDesigner.tsx +434 -0
- package/tests/test-app/src/pages/admin/dashboard.tsx +591 -0
- package/tests/test-app/src/pages/appthen_guide/ComponentTreeUnderstanding.tsx +26 -0
- package/tests/test-app/src/pages/appthen_guide/DataBindingLearning.tsx +26 -0
- package/tests/test-app/src/pages/article-list.tsx +222 -0
- package/tests/test-app/src/pages/babyProductRecommendationPage.tsx +168 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout.tsx +155 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout10.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout2.tsx +156 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout3.tsx +156 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout4.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout5.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout6.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout7.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout8.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout9.tsx +157 -0
- package/tests/test-app/src/pages/back-end/backgroundManagementSystem.css +5 -0
- package/tests/test-app/src/pages/back-end/backgroundManagementSystem.tsx +1745 -0
- package/tests/test-app/src/pages/category-list.tsx +179 -0
- package/tests/test-app/src/pages/comment-list.tsx +194 -0
- package/tests/test-app/src/pages/component/WorkOrderCard.tsx +140 -0
- package/tests/test-app/src/pages/cover.tsx +42 -0
- package/tests/test-app/src/pages/cyberpunk/cyberpunkCRMPage.tsx +1299 -0
- package/tests/test-app/src/pages/data-analytics.tsx +1872 -0
- package/tests/test-app/src/pages/data-overview.tsx +600 -0
- package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.css +181 -0
- package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.tsx +225 -0
- package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.css +181 -0
- package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.tsx +138 -0
- package/tests/test-app/src/pages/data_dashboard/component_library/BlueBrightGreenBorder.tsx +47 -0
- package/tests/test-app/src/pages/data_dashboard/component_library/FullScreenContainer.tsx +133 -0
- package/tests/test-app/src/pages/demo-error-page.tsx +119 -0
- package/tests/test-app/src/pages/department-list.tsx +183 -0
- package/tests/test-app/src/pages/description_of_mock_interface.md +32 -0
- package/tests/test-app/src/pages/digitalLargeScreen.css +181 -0
- package/tests/test-app/src/pages/digitalLargeScreen.tsx +1417 -0
- package/tests/test-app/src/pages/goods-list.tsx +233 -0
- package/tests/test-app/src/pages/housekeeping/adminDashboardPage.tsx +880 -0
- package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.css +3 -0
- package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.tsx +362 -0
- package/tests/test-app/src/pages/mobile_terminal/WorkOrderHomepage.tsx +337 -0
- package/tests/test-app/src/pages/mobile_terminal/newWorkOrder.tsx +224 -0
- package/tests/test-app/src/pages/mobile_terminal/tabbar.tsx +67 -0
- package/tests/test-app/src/pages/mobile_terminal/uiHandsOnPractice.tsx +638 -0
- package/tests/test-app/src/pages/mobile_terminal/workOrderDetails.tsx +346 -0
- package/tests/test-app/src/pages/mobile_terminal/workOrderPage.tsx +345 -0
- package/tests/test-app/src/pages/notice-list.tsx +217 -0
- package/tests/test-app/src/pages/order-detail.tsx +330 -0
- package/tests/test-app/src/pages/order-list.tsx +195 -0
- package/tests/test-app/src/pages/order-management.tsx +563 -0
- package/tests/test-app/src/pages/page/OrderList.tsx +230 -0
- package/tests/test-app/src/pages/role-list.tsx +184 -0
- package/tests/test-app/src/pages/simple/simplePage.tsx +92 -0
- package/tests/test-app/src/pages/simple-page.tsx +43 -0
- package/tests/test-app/src/pages/test-destructure.tsx +44 -0
- package/tests/test-app/src/pages/test-error-page.tsx +75 -0
- package/tests/test-app/src/pages/test-page-with-errors.tsx +51 -0
- package/tests/test-app/src/pages/test-page.tsx +101 -0
- package/tests/test-app/src/pages/test-render.tsx +52 -0
- package/tests/test-app/src/pages/test-return-type.tsx +41 -0
- package/tests/test-app/src/pages/test-type-assertion.tsx +37 -0
- package/tests/test-app/src/pages/testPage.css +3 -0
- package/tests/test-app/src/pages/testPage.tsx +158 -0
- package/tests/test-app/src/pages/ui/styleSelectorPage.tsx +1554 -0
- package/tests/test-app/src/pages/user-list.tsx +212 -0
- package/tests/test-app/src/pages/web_version/website.css +205 -0
- package/tests/test-app/src/pages/web_version/website.tsx +1066 -0
- package/tests/test-app/src/pages/wrong-page.tsx +50 -0
- package/tests/test-app/src/pages//345/276/205/345/212/236.apidoc.json +336 -0
- package/tests/test-app/src/project.json +1120 -0
- package/tests/test-app/src/store/global.store.ts +10 -0
- package/tests/test-app/src/types/CreateTicketParams.m.ts +20 -0
- package/tests/test-app/src/types/SLAPolicy.ts +50 -0
- package/tests/test-app/src/types/Ticket.ts +68 -0
- package/tests/test-app/src/types/TicketAttachment.m.ts +67 -0
- package/tests/test-app/src/types/TicketComment.m.ts +59 -0
- package/tests/test-app/src/types/TicketEvaluation.ts +44 -0
- package/tests/test-app/src/types/TicketHistory.m.ts +71 -0
- package/tests/test-app/src/types/TicketListParams.m.ts +30 -0
- package/tests/test-app/src/types/TicketPriority.m.ts +65 -0
- package/tests/test-app/src/types/TicketRecord.ts +47 -0
- package/tests/test-app/src/types/TrainDoor.ts +284 -0
- package/tests/test-app/src/types/UpdateTicketParams.m.ts +22 -0
- package/tests/test-app/src/utils/__afterRequest.util.ts +3 -0
- package/tests/test-app/src/utils/__beforeRequest.util.ts +10 -0
- package/tests/test-app/src/utils/testGlobalAction.util.ts +7 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* constants
|
|
3
|
+
*/
|
|
4
|
+
export class constants {
|
|
5
|
+
/* 接口域名 */
|
|
6
|
+
HostDomain: string = "http://localhost:9001";
|
|
7
|
+
/* token认证 */
|
|
8
|
+
accessToken: string = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc1JlZnJlc2giOmZhbHNlLCJpZCI6MSwidGVuYW50SWQiOm51bGwsImlhdCI6MTc1MDQwNDk0NCwiZXhwIjoyMDY1NzY0OTQ0fQ.ksKiI0bwJ9d1NaQu-kvVdmdot62myiAytuzpETjIgmI";
|
|
9
|
+
BaseURL: string = "http://106.13.174.178:8001/app/phm-base/fault/statistics";
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 创建工单参数
|
|
3
|
+
* 用于创建新工单时的参数定义
|
|
4
|
+
*/
|
|
5
|
+
export class CreateTicketParams {
|
|
6
|
+
/* 工单标题dd1 */
|
|
7
|
+
title?: string = "";
|
|
8
|
+
/* 工单描述 */
|
|
9
|
+
description: string = "";
|
|
10
|
+
/* 分类ID */
|
|
11
|
+
categoryId?: number;
|
|
12
|
+
/* 优先级ID */
|
|
13
|
+
priorityId?: number;
|
|
14
|
+
/* 标签 */
|
|
15
|
+
tags: string[] = [];
|
|
16
|
+
/* 截止日期 */
|
|
17
|
+
dueDate: Date = new Date();
|
|
18
|
+
/* 附件列表 */
|
|
19
|
+
attachments: string[] = [];
|
|
20
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SLA策略数据模型
|
|
3
|
+
* @type Model
|
|
4
|
+
*/
|
|
5
|
+
class SLAPolicy {
|
|
6
|
+
/** 策略ID */
|
|
7
|
+
id?: string;
|
|
8
|
+
|
|
9
|
+
/** 策略名称 */
|
|
10
|
+
name?: string;
|
|
11
|
+
|
|
12
|
+
/** 适用工单类型 */
|
|
13
|
+
ticketType?: string;
|
|
14
|
+
|
|
15
|
+
/** 适用优先级 */
|
|
16
|
+
priority?: string;
|
|
17
|
+
|
|
18
|
+
/** 响应时间(分钟) */
|
|
19
|
+
responseTime?: number;
|
|
20
|
+
|
|
21
|
+
/** 解决时间(分钟) */
|
|
22
|
+
resolveTime?: number;
|
|
23
|
+
|
|
24
|
+
/** 工作时间设置 */
|
|
25
|
+
workingHours?: any[];
|
|
26
|
+
|
|
27
|
+
/** 节假日设置 */
|
|
28
|
+
holidays?: any[];
|
|
29
|
+
|
|
30
|
+
/** 是否启用 */
|
|
31
|
+
active?: boolean;
|
|
32
|
+
|
|
33
|
+
/** 创建时间 */
|
|
34
|
+
createdAt?: string;
|
|
35
|
+
|
|
36
|
+
/** 更新时间 */
|
|
37
|
+
updatedAt?: string;
|
|
38
|
+
|
|
39
|
+
/** 创建人 */
|
|
40
|
+
createdBy?: string;
|
|
41
|
+
|
|
42
|
+
/** 描述 */
|
|
43
|
+
description?: string;
|
|
44
|
+
|
|
45
|
+
/** 适用部门 */
|
|
46
|
+
departments?: string[];
|
|
47
|
+
|
|
48
|
+
/** 升级规则 */
|
|
49
|
+
escalationRules?: any[];
|
|
50
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 工单基础数据模型
|
|
3
|
+
* @type Model
|
|
4
|
+
*/
|
|
5
|
+
class Ticket {
|
|
6
|
+
/** 工单ID */
|
|
7
|
+
id?: string;
|
|
8
|
+
|
|
9
|
+
/** 工单标题 */
|
|
10
|
+
title?: string;
|
|
11
|
+
|
|
12
|
+
/** 工单类型 */
|
|
13
|
+
type?: string;
|
|
14
|
+
|
|
15
|
+
/** 优先级:low-低、medium-中、high-高、urgent-紧急 */
|
|
16
|
+
priority?: string;
|
|
17
|
+
|
|
18
|
+
/** 状态:pending-待处理、processing-处理中、waiting_confirm-待确认、resolved-已解决、closed-已关闭、cancelled-已取消 */
|
|
19
|
+
status?: string;
|
|
20
|
+
|
|
21
|
+
/** 请求人 */
|
|
22
|
+
requester?: string;
|
|
23
|
+
|
|
24
|
+
/** 处理人 */
|
|
25
|
+
assignee?: string;
|
|
26
|
+
|
|
27
|
+
/** 处理组 */
|
|
28
|
+
group?: string;
|
|
29
|
+
|
|
30
|
+
/** 工单描述 */
|
|
31
|
+
description?: string;
|
|
32
|
+
|
|
33
|
+
/** 附件列表 */
|
|
34
|
+
attachments?: any[];
|
|
35
|
+
|
|
36
|
+
/** 创建时间 */
|
|
37
|
+
createdAt?: string;
|
|
38
|
+
|
|
39
|
+
/** 更新时间 */
|
|
40
|
+
updatedAt?: string;
|
|
41
|
+
|
|
42
|
+
/** 截止时间 */
|
|
43
|
+
dueDate?: string;
|
|
44
|
+
|
|
45
|
+
/** SLA信息 */
|
|
46
|
+
sla?: any;
|
|
47
|
+
|
|
48
|
+
/** 自定义字段 */
|
|
49
|
+
customFields?: any;
|
|
50
|
+
|
|
51
|
+
/** 影响范围 */
|
|
52
|
+
impact?: string;
|
|
53
|
+
|
|
54
|
+
/** 紧急程度 */
|
|
55
|
+
urgency?: string;
|
|
56
|
+
|
|
57
|
+
/** 关联资源 */
|
|
58
|
+
relatedAssets?: any[];
|
|
59
|
+
|
|
60
|
+
/** 标签 */
|
|
61
|
+
tags?: string[];
|
|
62
|
+
|
|
63
|
+
/** 请求人部门 */
|
|
64
|
+
requesterDepartment?: string;
|
|
65
|
+
|
|
66
|
+
/** 处理人部门 */
|
|
67
|
+
assigneeDepartment?: string;
|
|
68
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Entity, Column } from 'typeorm';
|
|
2
|
+
/**
|
|
3
|
+
* 工单附件实体
|
|
4
|
+
* 用于存储工单的附件信息
|
|
5
|
+
*/
|
|
6
|
+
@Entity({
|
|
7
|
+
name: "ticket_attachments"
|
|
8
|
+
})
|
|
9
|
+
export class TicketAttachment {
|
|
10
|
+
id?: number;
|
|
11
|
+
/* 工单ID */
|
|
12
|
+
@Column({
|
|
13
|
+
type: "int",
|
|
14
|
+
nullable: false
|
|
15
|
+
})
|
|
16
|
+
ticketId?: number;
|
|
17
|
+
/* 上传人ID */
|
|
18
|
+
@Column({
|
|
19
|
+
type: "varchar",
|
|
20
|
+
length: 50,
|
|
21
|
+
nullable: false
|
|
22
|
+
})
|
|
23
|
+
uploaderId?: string = "";
|
|
24
|
+
/* 文件名称 */
|
|
25
|
+
@Column({
|
|
26
|
+
type: "varchar",
|
|
27
|
+
length: 255,
|
|
28
|
+
nullable: false
|
|
29
|
+
})
|
|
30
|
+
fileName?: string = "";
|
|
31
|
+
/* 文件路径 */
|
|
32
|
+
@Column({
|
|
33
|
+
type: "varchar",
|
|
34
|
+
length: 500,
|
|
35
|
+
nullable: false
|
|
36
|
+
})
|
|
37
|
+
filePath?: string = "";
|
|
38
|
+
/* 文件大小(字节) */
|
|
39
|
+
@Column({
|
|
40
|
+
type: "bigint",
|
|
41
|
+
nullable: false
|
|
42
|
+
})
|
|
43
|
+
fileSize?: number;
|
|
44
|
+
/* 文件类型 */
|
|
45
|
+
@Column({
|
|
46
|
+
type: "varchar",
|
|
47
|
+
length: 100,
|
|
48
|
+
nullable: false
|
|
49
|
+
})
|
|
50
|
+
fileType?: string = "";
|
|
51
|
+
/* 文件描述 */
|
|
52
|
+
@Column({
|
|
53
|
+
type: "text",
|
|
54
|
+
nullable: true
|
|
55
|
+
})
|
|
56
|
+
description: string = "";
|
|
57
|
+
/* 创建时间 */
|
|
58
|
+
createdAt?: Date = new Date();
|
|
59
|
+
/* 更新时间 */
|
|
60
|
+
updatedAt?: Date = new Date();
|
|
61
|
+
/* 删除时间 */
|
|
62
|
+
@Column({
|
|
63
|
+
type: "timestamp",
|
|
64
|
+
nullable: true
|
|
65
|
+
})
|
|
66
|
+
deletedAt: Date = new Date();
|
|
67
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Entity, Column } from 'typeorm';
|
|
2
|
+
/**
|
|
3
|
+
* 工单评论实体
|
|
4
|
+
* 用于存储工单的评论和回复信息
|
|
5
|
+
*/
|
|
6
|
+
@Entity({
|
|
7
|
+
name: "ticket_comments"
|
|
8
|
+
})
|
|
9
|
+
export class TicketComment {
|
|
10
|
+
id?: number;
|
|
11
|
+
/* 工单ID */
|
|
12
|
+
@Column({
|
|
13
|
+
type: "int",
|
|
14
|
+
nullable: false
|
|
15
|
+
})
|
|
16
|
+
ticketId?: number;
|
|
17
|
+
/* 评论人ID */
|
|
18
|
+
@Column({
|
|
19
|
+
type: "varchar",
|
|
20
|
+
length: 50,
|
|
21
|
+
nullable: false
|
|
22
|
+
})
|
|
23
|
+
userId?: string = "";
|
|
24
|
+
/* 评论内容 */
|
|
25
|
+
@Column({
|
|
26
|
+
type: "text",
|
|
27
|
+
nullable: false
|
|
28
|
+
})
|
|
29
|
+
content?: string = "";
|
|
30
|
+
/* 父评论ID(用于回复) */
|
|
31
|
+
@Column({
|
|
32
|
+
type: "int",
|
|
33
|
+
nullable: true
|
|
34
|
+
})
|
|
35
|
+
parentId: number = 0;
|
|
36
|
+
/* 评论类型 */
|
|
37
|
+
@Column({
|
|
38
|
+
type: "varchar",
|
|
39
|
+
length: 20,
|
|
40
|
+
default: "comment"
|
|
41
|
+
})
|
|
42
|
+
type?: string = "comment";
|
|
43
|
+
/* 是否内部评论 */
|
|
44
|
+
@Column({
|
|
45
|
+
type: "boolean",
|
|
46
|
+
default: false
|
|
47
|
+
})
|
|
48
|
+
isInternal?: boolean;
|
|
49
|
+
/* 创建时间 */
|
|
50
|
+
createdAt?: Date = new Date();
|
|
51
|
+
/* 更新时间 */
|
|
52
|
+
updatedAt?: Date = new Date();
|
|
53
|
+
/* 删除时间 */
|
|
54
|
+
@Column({
|
|
55
|
+
type: "timestamp",
|
|
56
|
+
nullable: true
|
|
57
|
+
})
|
|
58
|
+
deletedAt: Date = new Date();
|
|
59
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 工单评价数据模型
|
|
3
|
+
* @type Model
|
|
4
|
+
*/
|
|
5
|
+
class TicketEvaluation {
|
|
6
|
+
/** 评价ID */
|
|
7
|
+
id?: string;
|
|
8
|
+
|
|
9
|
+
/** 工单ID */
|
|
10
|
+
ticketId?: string;
|
|
11
|
+
|
|
12
|
+
/** 评价人 */
|
|
13
|
+
evaluator?: string;
|
|
14
|
+
|
|
15
|
+
/** 总体满意度:5-非常满意、4-满意、3-一般、2-不满意、1-非常不满意 */
|
|
16
|
+
overallSatisfaction?: number;
|
|
17
|
+
|
|
18
|
+
/** 响应速度评分 */
|
|
19
|
+
responseSpeedScore?: number;
|
|
20
|
+
|
|
21
|
+
/** 解决质量评分 */
|
|
22
|
+
solutionQualityScore?: number;
|
|
23
|
+
|
|
24
|
+
/** 服务态度评分 */
|
|
25
|
+
serviceAttitudeScore?: number;
|
|
26
|
+
|
|
27
|
+
/** 评价意见 */
|
|
28
|
+
comments?: string;
|
|
29
|
+
|
|
30
|
+
/** 评价时间 */
|
|
31
|
+
evaluatedAt?: string;
|
|
32
|
+
|
|
33
|
+
/** 是否已审核 */
|
|
34
|
+
reviewed?: boolean;
|
|
35
|
+
|
|
36
|
+
/** 审核人 */
|
|
37
|
+
reviewer?: string;
|
|
38
|
+
|
|
39
|
+
/** 审核回复 */
|
|
40
|
+
reviewReply?: string;
|
|
41
|
+
|
|
42
|
+
/** 审核时间 */
|
|
43
|
+
reviewedAt?: string;
|
|
44
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Entity, Column } from 'typeorm';
|
|
2
|
+
/**
|
|
3
|
+
* 工单历史记录实体
|
|
4
|
+
* 用于存储工单的操作历史记录
|
|
5
|
+
*/
|
|
6
|
+
@Entity({
|
|
7
|
+
name: "ticket_histories"
|
|
8
|
+
})
|
|
9
|
+
export class TicketHistory {
|
|
10
|
+
id?: number;
|
|
11
|
+
/* 工单ID */
|
|
12
|
+
@Column({
|
|
13
|
+
type: "int",
|
|
14
|
+
nullable: false
|
|
15
|
+
})
|
|
16
|
+
ticketId?: number;
|
|
17
|
+
/* 操作人ID111 */
|
|
18
|
+
@Column({
|
|
19
|
+
type: "varchar",
|
|
20
|
+
length: 50,
|
|
21
|
+
nullable: false
|
|
22
|
+
})
|
|
23
|
+
userId?: string = "";
|
|
24
|
+
/* 操作类型 */
|
|
25
|
+
@Column({
|
|
26
|
+
type: "varchar",
|
|
27
|
+
length: 50,
|
|
28
|
+
nullable: false
|
|
29
|
+
})
|
|
30
|
+
action?: string = "";
|
|
31
|
+
/* 操作描述 */
|
|
32
|
+
@Column({
|
|
33
|
+
type: "text",
|
|
34
|
+
nullable: false
|
|
35
|
+
})
|
|
36
|
+
description?: string = "";
|
|
37
|
+
/* 变更前的值 */
|
|
38
|
+
@Column({
|
|
39
|
+
type: "json",
|
|
40
|
+
nullable: true
|
|
41
|
+
})
|
|
42
|
+
oldValue: any = {};
|
|
43
|
+
/* 变更后的值 */
|
|
44
|
+
@Column({
|
|
45
|
+
type: "json",
|
|
46
|
+
nullable: true
|
|
47
|
+
})
|
|
48
|
+
newValue: any = {};
|
|
49
|
+
/* 变更字段 */
|
|
50
|
+
@Column({
|
|
51
|
+
type: "varchar",
|
|
52
|
+
length: 100,
|
|
53
|
+
nullable: true
|
|
54
|
+
})
|
|
55
|
+
fieldName: string = "";
|
|
56
|
+
/* IP地址 */
|
|
57
|
+
@Column({
|
|
58
|
+
type: "varchar",
|
|
59
|
+
length: 50,
|
|
60
|
+
nullable: true
|
|
61
|
+
})
|
|
62
|
+
ipAddress: string = "";
|
|
63
|
+
/* 用户代理 */
|
|
64
|
+
@Column({
|
|
65
|
+
type: "text",
|
|
66
|
+
nullable: true
|
|
67
|
+
})
|
|
68
|
+
userAgent: string = "";
|
|
69
|
+
/* 创建时间 */
|
|
70
|
+
createdAt?: Date = new Date();
|
|
71
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 工单列表查询参数
|
|
3
|
+
* 用于查询工单列表时的参数定义
|
|
4
|
+
*/
|
|
5
|
+
export class TicketListParams {
|
|
6
|
+
/* 页码 */
|
|
7
|
+
page: number = 1;
|
|
8
|
+
/* 每页数量 */
|
|
9
|
+
pageSize: number = 10;
|
|
10
|
+
/* 工单状态 */
|
|
11
|
+
statusId: number = 0;
|
|
12
|
+
/* 优先级 */
|
|
13
|
+
priorityId: number = 0;
|
|
14
|
+
/* 分类 */
|
|
15
|
+
categoryId: number = 0;
|
|
16
|
+
/* 创建人ID */
|
|
17
|
+
creatorId: string = "";
|
|
18
|
+
/* 处理人ID */
|
|
19
|
+
assigneeId: string = "";
|
|
20
|
+
/* 关键词搜索 */
|
|
21
|
+
keyword: string = "";
|
|
22
|
+
/* 开始时间 */
|
|
23
|
+
startDate: Date = new Date();
|
|
24
|
+
/* 结束时间 */
|
|
25
|
+
endDate: Date = new Date();
|
|
26
|
+
/* 排序字段 */
|
|
27
|
+
sortBy: string = "createdAt";
|
|
28
|
+
/* 排序方式 */
|
|
29
|
+
sortOrder: string = "DESC";
|
|
30
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Entity, Column } from 'typeorm';
|
|
2
|
+
/**
|
|
3
|
+
* 工单优先级实体
|
|
4
|
+
* 用于管理工单的优先级设置
|
|
5
|
+
*/
|
|
6
|
+
@Entity({
|
|
7
|
+
name: "ticket_priorities"
|
|
8
|
+
})
|
|
9
|
+
export class TicketPriority {
|
|
10
|
+
id?: number;
|
|
11
|
+
/* 优先级名称 */
|
|
12
|
+
@Column({
|
|
13
|
+
type: "varchar",
|
|
14
|
+
length: 50,
|
|
15
|
+
nullable: false
|
|
16
|
+
})
|
|
17
|
+
name?: string = "";
|
|
18
|
+
/* 优先级描述 */
|
|
19
|
+
@Column({
|
|
20
|
+
type: "text",
|
|
21
|
+
nullable: true
|
|
22
|
+
})
|
|
23
|
+
description: string = "";
|
|
24
|
+
/* 优先级级别 */
|
|
25
|
+
@Column({
|
|
26
|
+
type: "int",
|
|
27
|
+
nullable: false
|
|
28
|
+
})
|
|
29
|
+
level?: number;
|
|
30
|
+
/* 优先级颜色 */
|
|
31
|
+
@Column({
|
|
32
|
+
type: "varchar",
|
|
33
|
+
length: 20,
|
|
34
|
+
nullable: false
|
|
35
|
+
})
|
|
36
|
+
color?: string = "";
|
|
37
|
+
/* 响应时间(分钟) */
|
|
38
|
+
@Column({
|
|
39
|
+
type: "int",
|
|
40
|
+
nullable: true
|
|
41
|
+
})
|
|
42
|
+
responseTime: number = 0;
|
|
43
|
+
/* 解决时间(分钟) */
|
|
44
|
+
@Column({
|
|
45
|
+
type: "int",
|
|
46
|
+
nullable: true
|
|
47
|
+
})
|
|
48
|
+
resolutionTime: number = 0;
|
|
49
|
+
/* 排序 */
|
|
50
|
+
@Column({
|
|
51
|
+
type: "int",
|
|
52
|
+
default: 0
|
|
53
|
+
})
|
|
54
|
+
sortOrder?: number;
|
|
55
|
+
/* 是否启用 */
|
|
56
|
+
@Column({
|
|
57
|
+
type: "boolean",
|
|
58
|
+
default: true
|
|
59
|
+
})
|
|
60
|
+
isActive?: boolean = true;
|
|
61
|
+
/* 创建时间 */
|
|
62
|
+
createdAt?: Date = new Date();
|
|
63
|
+
/* 更新时间 */
|
|
64
|
+
updatedAt?: Date = new Date();
|
|
65
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 工单处理记录数据模型
|
|
3
|
+
* @type Model
|
|
4
|
+
*/
|
|
5
|
+
class TicketRecord {
|
|
6
|
+
/** 记录ID */
|
|
7
|
+
id?: string;
|
|
8
|
+
|
|
9
|
+
/** 工单ID */
|
|
10
|
+
ticketId?: string;
|
|
11
|
+
|
|
12
|
+
/** 操作类型:create-创建、assign-分配、transfer-转派、process-处理、resolve-解决、close-关闭、cancel-取消 */
|
|
13
|
+
action?: string;
|
|
14
|
+
|
|
15
|
+
/** 操作人 */
|
|
16
|
+
operator?: string;
|
|
17
|
+
|
|
18
|
+
/** 操作内容 */
|
|
19
|
+
content?: string;
|
|
20
|
+
|
|
21
|
+
/** 附件列表 */
|
|
22
|
+
attachments?: any[];
|
|
23
|
+
|
|
24
|
+
/** 处理耗时(分钟) */
|
|
25
|
+
timeSpent?: number;
|
|
26
|
+
|
|
27
|
+
/** 创建时间 */
|
|
28
|
+
createdAt?: string;
|
|
29
|
+
|
|
30
|
+
/** 操作前状态 */
|
|
31
|
+
oldStatus?: string;
|
|
32
|
+
|
|
33
|
+
/** 操作后状态 */
|
|
34
|
+
newStatus?: string;
|
|
35
|
+
|
|
36
|
+
/** 操作前处理人 */
|
|
37
|
+
oldAssignee?: string;
|
|
38
|
+
|
|
39
|
+
/** 操作后处理人 */
|
|
40
|
+
newAssignee?: string;
|
|
41
|
+
|
|
42
|
+
/** 是否内部记录 */
|
|
43
|
+
isInternal?: boolean;
|
|
44
|
+
|
|
45
|
+
/** 是否可见给请求人 */
|
|
46
|
+
visibleToRequester?: boolean;
|
|
47
|
+
}
|