shared-ritm 1.2.57 → 1.2.59
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/README.md +103 -103
- package/dist/index.css +1 -1
- package/dist/shared-ritm.es.js +1639 -1629
- package/dist/shared-ritm.umd.js +7 -7
- package/dist/types/api/services/VideoService.d.ts +6 -0
- package/dist/types/index.d.ts +2 -1
- package/package.json +63 -63
- package/src/App.vue +2461 -2461
- package/src/api/services/AuthService.ts +58 -58
- package/src/api/services/FileService.ts +15 -15
- package/src/api/services/GanttService.ts +17 -17
- package/src/api/services/MetricsService.ts +109 -109
- package/src/api/services/ProjectsService.ts +67 -67
- package/src/api/services/RepairsService.ts +100 -100
- package/src/api/services/TasksService.ts +137 -137
- package/src/api/services/VideoService.ts +14 -0
- package/src/api/settings/ApiService.ts +128 -128
- package/src/api/types/Api_Controls.ts +72 -72
- package/src/api/types/Api_Files.ts +1 -1
- package/src/api/types/Api_Projects.ts +55 -55
- package/src/api/types/Api_Repairs.ts +93 -93
- package/src/api/types/Api_Tasks.ts +155 -155
- package/src/common/app-button/AppButton.vue +173 -173
- package/src/common/app-checkbox/AppCheckbox.vue +26 -26
- package/src/common/app-date-picker/AppDatePicker.vue +81 -81
- package/src/common/app-dialogs/AppConfirmDialog.vue +99 -99
- package/src/common/app-dropdown/AppDropdown.vue +31 -31
- package/src/common/app-icon/AppIcon.vue +108 -108
- package/src/common/app-input/AppInput.vue +148 -147
- package/src/common/app-input-search/AppInputSearch.vue +174 -174
- package/src/common/app-layout/AppLayout.vue +84 -84
- package/src/common/app-layout/components/AppLayoutHeader.vue +246 -246
- package/src/common/app-layout/components/AppLayoutPage.vue +16 -16
- package/src/common/app-loader/index.vue +43 -43
- package/src/common/app-page-layout/AppPageLayout.vue +122 -122
- package/src/common/app-select/AppSelect.vue +157 -157
- package/src/common/app-sheet/AppSheet.vue +120 -120
- package/src/common/app-sidebar/AppSidebar.vue +168 -168
- package/src/common/app-sidebar/components/SidebarMenu.vue +37 -37
- package/src/common/app-sidebar/components/SidebarMenuItem.vue +148 -148
- package/src/common/app-table/controllers/useColumnSelector.ts +38 -38
- package/src/common/app-toggle/AppToggle.vue +23 -23
- package/src/common/app-wrapper/AppWrapper.vue +28 -28
- package/src/global.d.ts +1 -1
- package/src/icons/components/arrow-down-icon.vue +25 -25
- package/src/icons/components/arrow-frame-icon.vue +19 -19
- package/src/icons/components/arrow-square.vue +22 -22
- package/src/icons/components/table-filter-icon.vue +30 -30
- package/src/icons/dialogs/RemoveIcon.vue +12 -12
- package/src/icons/dialogs/SafetyIcon.vue +12 -12
- package/src/icons/header/NotificationIcon.vue +18 -18
- package/src/icons/header/PersonIcon.vue +11 -11
- package/src/icons/header/SettingIcon.vue +14 -14
- package/src/icons/header/flashIcon.vue +24 -24
- package/src/icons/header/searchStatusIcon.vue +24 -24
- package/src/icons/header/smallCapsIcon.vue +34 -34
- package/src/icons/sidebar/assign-module-icon.vue +36 -36
- package/src/icons/sidebar/instrument-history-icon.vue +32 -32
- package/src/icons/sidebar/instrument-order-icon.vue +38 -38
- package/src/icons/sidebar/instrument-work-zone-icon.vue +18 -18
- package/src/icons/sidebar/instruments-icon.vue +45 -45
- package/src/icons/sidebar/logo-icon.vue +15 -15
- package/src/icons/sidebar/logout-icon.vue +13 -13
- package/src/icons/sidebar/modules-icon.vue +16 -16
- package/src/icons/sidebar/notifications-icon.vue +24 -24
- package/src/icons/sidebar/order-icon.vue +44 -44
- package/src/icons/sidebar/pass-icon.vue +38 -38
- package/src/icons/sidebar/positions-icon.vue +42 -42
- package/src/icons/sidebar/preorder-icon.vue +19 -19
- package/src/icons/sidebar/projects-icon.vue +31 -31
- package/src/icons/sidebar/repair-object-icon.vue +18 -18
- package/src/icons/sidebar/repairs-icon.vue +20 -20
- package/src/icons/sidebar/roles-icon.vue +26 -26
- package/src/icons/sidebar/status-history-icon.vue +24 -24
- package/src/icons/sidebar/tasks-icon.vue +28 -28
- package/src/icons/sidebar/tasks_tasks-icon.vue +39 -39
- package/src/icons/sidebar/tasks_today-icon.vue +27 -27
- package/src/icons/sidebar/teams-icon.vue +32 -32
- package/src/icons/sidebar/user-icon.vue +18 -18
- package/src/icons/sidebar/users-icon.vue +46 -46
- package/src/icons/sidebar/videosources-icon.vue +19 -19
- package/src/icons/sidebar/videowall-icon.vue +13 -13
- package/src/icons/sidebar/videozones-icon.vue +21 -21
- package/src/icons/sidebar/warehouses-icon.vue +43 -43
- package/src/icons/sidebar/workshop-icon.vue +100 -100
- package/src/icons/sidebar/workzones-icon.vue +22 -22
- package/src/icons/task/attention-icon.vue +13 -13
- package/src/icons/task/clock-icon.vue +10 -10
- package/src/icons/task/delete-icon.vue +10 -10
- package/src/icons/task/fire-icon.vue +16 -16
- package/src/index.ts +2 -0
- package/src/main.ts +28 -28
- package/src/quasar-user-options.ts +17 -17
- package/src/router/index.ts +10 -10
- package/src/shared/fonts/Inter_18pt-Black.ttf +0 -0
- package/src/shared/fonts/Inter_18pt-Bold.ttf +0 -0
- package/src/shared/fonts/Inter_18pt-Regular.ttf +0 -0
- package/src/shared/fonts/Inter_18pt-SemiBold.ttf +0 -0
- package/src/shared/styles/general.css +125 -96
- package/src/shims-vue.d.ts +5 -5
- package/src/styles/variables.sass +12 -12
- package/src/utils/confirm.ts +12 -12
- package/src/utils/notification.ts +9 -9
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
import ApiService, { ResponseApi } from '@/api/settings/ApiService'
|
|
2
|
-
import {
|
|
3
|
-
Api_Create_Repair_With_Equipments,
|
|
4
|
-
Api_Equipment_Full_Dto,
|
|
5
|
-
Api_Repair_Dto,
|
|
6
|
-
Api_Update_Repair,
|
|
7
|
-
OptionFilters,
|
|
8
|
-
} from '@/api/types/Api_Repairs'
|
|
9
|
-
|
|
10
|
-
class RepairsService extends ApiService {
|
|
11
|
-
public fetchFilters(fullParams: string): Promise<OptionFilters> {
|
|
12
|
-
return this.get(`get_list_repair?smart=1&${fullParams}`)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
public fetchRepairs(
|
|
16
|
-
isQuery: boolean,
|
|
17
|
-
queries?: string,
|
|
18
|
-
hasTeams?: boolean | string,
|
|
19
|
-
teamsFilter?: string,
|
|
20
|
-
typeFilter?: string,
|
|
21
|
-
): Promise<ResponseApi<Api_Repair_Dto[]>> {
|
|
22
|
-
return this.get(
|
|
23
|
-
'get_list_repair' +
|
|
24
|
-
(isQuery
|
|
25
|
-
? `${queries}&per_page=100000${typeFilter ? '&' + typeFilter : ''}&${!hasTeams ? teamsFilter : ''}`
|
|
26
|
-
: `?per_page=100000${typeFilter ? '&' + typeFilter : ''}&${teamsFilter}`),
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
public fetchEquipment(): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
|
|
31
|
-
return this.get('repairs/equipment/list?per_page=100000')
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
public createRepair(payload: Api_Create_Repair_With_Equipments) {
|
|
35
|
-
return this.post<Api_Create_Repair_With_Equipments, any>('/repairs/equipments', payload)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
public startRepair(id: string): Promise<void> {
|
|
39
|
-
return this.post<null, void>(`/repairs/${id}/start`, null)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
public finishRepair(id: string) {
|
|
43
|
-
return this.post<any, void>(`/repairs/complete_repair_list`, {
|
|
44
|
-
repairIdList: [id],
|
|
45
|
-
})
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
public finishPreparationProject(id: string) {
|
|
49
|
-
return this.post<null, void>(`/repairs/${id}/finish_preparation`, null)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
public moveRepairToCurrent(id: string) {
|
|
53
|
-
return this.post<any, void>(`/repairs/transfer_repair_plan_to_current`, {
|
|
54
|
-
repairs: [id],
|
|
55
|
-
})
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
public moveArchiveToCurrent(id: string) {
|
|
59
|
-
return this.post<any, void>(`/repairs/transfer_repair_archive_to_current`, {
|
|
60
|
-
repairs_ids: [id],
|
|
61
|
-
})
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
public moveRepairToApr(id: string) {
|
|
65
|
-
return this.post<any, void>(`/repairs/transfer_repair_current_to_plan`, {
|
|
66
|
-
repairs: [id],
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
public moveRepairToArchive(id: string) {
|
|
71
|
-
return this.post<any, void>(`/repairs/transfer_repair_current_to_archive`, {
|
|
72
|
-
repairs_ids: [id],
|
|
73
|
-
})
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
public restoreRepair(id: string) {
|
|
77
|
-
return this.post<any, void>(`/restore_repair`, {
|
|
78
|
-
repairs_ids: [id],
|
|
79
|
-
})
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
public updateRepair(payload: Api_Update_Repair, id: string) {
|
|
83
|
-
return this.put<Api_Update_Repair, void>(`/repairs/${id}`, payload)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
public copyRepair(id: string) {
|
|
87
|
-
return this.post<null, any>(`/repairs/${id}/clone`, null)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
public deleteRepair(id: string) {
|
|
91
|
-
return this.delete<any>(`/repairs/${id}`)
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
let api: RepairsService
|
|
96
|
-
|
|
97
|
-
export default function useRepairsService() {
|
|
98
|
-
if (!api) api = new RepairsService()
|
|
99
|
-
return api
|
|
100
|
-
}
|
|
1
|
+
import ApiService, { ResponseApi } from '@/api/settings/ApiService'
|
|
2
|
+
import {
|
|
3
|
+
Api_Create_Repair_With_Equipments,
|
|
4
|
+
Api_Equipment_Full_Dto,
|
|
5
|
+
Api_Repair_Dto,
|
|
6
|
+
Api_Update_Repair,
|
|
7
|
+
OptionFilters,
|
|
8
|
+
} from '@/api/types/Api_Repairs'
|
|
9
|
+
|
|
10
|
+
class RepairsService extends ApiService {
|
|
11
|
+
public fetchFilters(fullParams: string): Promise<OptionFilters> {
|
|
12
|
+
return this.get(`get_list_repair?smart=1&${fullParams}`)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public fetchRepairs(
|
|
16
|
+
isQuery: boolean,
|
|
17
|
+
queries?: string,
|
|
18
|
+
hasTeams?: boolean | string,
|
|
19
|
+
teamsFilter?: string,
|
|
20
|
+
typeFilter?: string,
|
|
21
|
+
): Promise<ResponseApi<Api_Repair_Dto[]>> {
|
|
22
|
+
return this.get(
|
|
23
|
+
'get_list_repair' +
|
|
24
|
+
(isQuery
|
|
25
|
+
? `${queries}&per_page=100000${typeFilter ? '&' + typeFilter : ''}&${!hasTeams ? teamsFilter : ''}`
|
|
26
|
+
: `?per_page=100000${typeFilter ? '&' + typeFilter : ''}&${teamsFilter}`),
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public fetchEquipment(): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
|
|
31
|
+
return this.get('repairs/equipment/list?per_page=100000')
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public createRepair(payload: Api_Create_Repair_With_Equipments) {
|
|
35
|
+
return this.post<Api_Create_Repair_With_Equipments, any>('/repairs/equipments', payload)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public startRepair(id: string): Promise<void> {
|
|
39
|
+
return this.post<null, void>(`/repairs/${id}/start`, null)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public finishRepair(id: string) {
|
|
43
|
+
return this.post<any, void>(`/repairs/complete_repair_list`, {
|
|
44
|
+
repairIdList: [id],
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public finishPreparationProject(id: string) {
|
|
49
|
+
return this.post<null, void>(`/repairs/${id}/finish_preparation`, null)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public moveRepairToCurrent(id: string) {
|
|
53
|
+
return this.post<any, void>(`/repairs/transfer_repair_plan_to_current`, {
|
|
54
|
+
repairs: [id],
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public moveArchiveToCurrent(id: string) {
|
|
59
|
+
return this.post<any, void>(`/repairs/transfer_repair_archive_to_current`, {
|
|
60
|
+
repairs_ids: [id],
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
public moveRepairToApr(id: string) {
|
|
65
|
+
return this.post<any, void>(`/repairs/transfer_repair_current_to_plan`, {
|
|
66
|
+
repairs: [id],
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public moveRepairToArchive(id: string) {
|
|
71
|
+
return this.post<any, void>(`/repairs/transfer_repair_current_to_archive`, {
|
|
72
|
+
repairs_ids: [id],
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public restoreRepair(id: string) {
|
|
77
|
+
return this.post<any, void>(`/restore_repair`, {
|
|
78
|
+
repairs_ids: [id],
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
public updateRepair(payload: Api_Update_Repair, id: string) {
|
|
83
|
+
return this.put<Api_Update_Repair, void>(`/repairs/${id}`, payload)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
public copyRepair(id: string) {
|
|
87
|
+
return this.post<null, any>(`/repairs/${id}/clone`, null)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public deleteRepair(id: string) {
|
|
91
|
+
return this.delete<any>(`/repairs/${id}`)
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
let api: RepairsService
|
|
96
|
+
|
|
97
|
+
export default function useRepairsService() {
|
|
98
|
+
if (!api) api = new RepairsService()
|
|
99
|
+
return api
|
|
100
|
+
}
|
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
import ApiService, { ResponseApi } from '@/api/settings/ApiService'
|
|
2
|
-
import {
|
|
3
|
-
Api_Task_Close_Reason,
|
|
4
|
-
Api_Task_Instrument_Dto,
|
|
5
|
-
Api_Task_Instrument_From_Warehouse,
|
|
6
|
-
Api_Task_Module_Instrument_Condition,
|
|
7
|
-
Api_Tasks_Dto,
|
|
8
|
-
Api_Tasks_Task_Dto,
|
|
9
|
-
} from '@/api/types/Api_Tasks'
|
|
10
|
-
import { Api_Equipment_Full_Dto, Api_Task_Video_Source, Api_Task_Video_Source_Stream } from '@/api/types/Api_Repairs'
|
|
11
|
-
|
|
12
|
-
class TasksService extends ApiService {
|
|
13
|
-
public async fetchTaskById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>> {
|
|
14
|
-
return await this.get(`/tasks/${id}`)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
public async fetchTasksList(params: any): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
18
|
-
return await this.get('/list/tasks/search', { params })
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
public async fetchSubtasksList(id: string): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
22
|
-
return await this.get(`/task/${id}/subtasks/list`)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
public async fetchTaskBranch(id: string): Promise<ResponseApi<any>> {
|
|
26
|
-
return await this.get(`/get_list_task_branch?task_id=${id}`)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
public async fetchInstrumentsList(params: any): Promise<ResponseApi<any[]>> {
|
|
30
|
-
return await this.get('admin/instruments', { params })
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
public async fetchInstrumentTypeListWithPreparedWarehouse(params: {
|
|
34
|
-
page: number
|
|
35
|
-
per_page: number
|
|
36
|
-
'filterList[taskId]'?: string | undefined
|
|
37
|
-
search?: string
|
|
38
|
-
}): Promise<Api_Task_Instrument_From_Warehouse[]> {
|
|
39
|
-
return await this.get('/instrument_type/get_instrument_type_list_with_prepared_warehouse', { params })
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
public async fetchInstrumentsEquivalentList(params: any): Promise<ResponseApi<Api_Task_Instrument_Dto[]>> {
|
|
43
|
-
return await this.get('tasks/instrument/list', { params })
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
public async fetchDiffInstruments(params: any): Promise<ResponseApi<Api_Task_Module_Instrument_Condition>> {
|
|
47
|
-
return await this.get(`tasks/${params.taskId}/fill/module`, { params })
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
public async replaceInstruments(payload: any): Promise<ResponseApi<any>> {
|
|
51
|
-
return await this.post(`/instruments/equivalent/attach`, payload)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
public async fetchTaskUsagePersonal(params: any): Promise<ResponseApi<unknown[]>> {
|
|
55
|
-
return await this.get(`tasks/${params.taskId}/usage/users`, { params })
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
public async fetchTaskUsageInstrument(params: any): Promise<ResponseApi<unknown[]>> {
|
|
59
|
-
return await this.get(`tasks/${params.taskId}/usage/instruments`, { params })
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
public fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
|
|
63
|
-
return this.get('repairs/equipment/list', { params })
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
public fetchTaskVideoSources(params: any): Promise<ResponseApi<Api_Task_Video_Source[]>> {
|
|
67
|
-
return this.get('work_zone/get_list_video_source', { params })
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
public fetchTaskVideoSourcesStream(params: any): Promise<ResponseApi<Api_Task_Video_Source_Stream[]>> {
|
|
71
|
-
return this.get('horizon/video-source', { params })
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
public createWorkZone(payload: any): Promise<unknown> {
|
|
75
|
-
return this.post('admin/work-zones', payload)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
public async createTask(payload: any): Promise<ResponseApi<any>> {
|
|
79
|
-
return await this.post(`tasks`, payload)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
public async editTask(payload: any): Promise<ResponseApi<any>> {
|
|
83
|
-
return await this.put(`tasks/${payload.taskId}`, payload.data)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
public async mergeTask(payload: { name: string; tasks_id: string[] }): Promise<ResponseApi<any>> {
|
|
87
|
-
return await this.post(`tasks/merge`, payload)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
public async deleteTask(id: string): Promise<any> {
|
|
91
|
-
return await this.delete(`tasks/${id}`)
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
public async changeStatus(payload: { taskId: string; data: unknown }): Promise<unknown> {
|
|
95
|
-
const { taskId, data } = payload
|
|
96
|
-
return await this.put(`task/${taskId}/change-status`, data)
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
public async uploadComment(payload: unknown): Promise<unknown> {
|
|
100
|
-
return await this.post('comments', payload)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
public async deleteComment(commentId: string): Promise<unknown> {
|
|
104
|
-
return await this.delete(`comments/${commentId}`)
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
public async editComment(payload: { commentId: string; data: unknown }): Promise<unknown> {
|
|
108
|
-
const { commentId, data } = payload
|
|
109
|
-
return await this.put(`comments/${commentId}`, data)
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
public async saveMetrics(payload: unknown): Promise<unknown> {
|
|
113
|
-
return await this.put('/update_quality_metrics', payload)
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
public async checkReasonForStatus(payload: { task_Id: string; data: unknown }): Promise<Api_Task_Close_Reason> {
|
|
117
|
-
return await this.post('/tasks/check_reason_for_task', payload)
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
public async verifyTaskStatus(payload: { task_id: string; data: unknown }): Promise<unknown> {
|
|
121
|
-
const { task_id, data } = payload
|
|
122
|
-
return await this.get(`/task/${task_id}/change-status/verification`, {
|
|
123
|
-
params: data,
|
|
124
|
-
})
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
public async checkBranchBeforeCloseTask(payload: { task_Id: string }): Promise<unknown> {
|
|
128
|
-
return await this.post(`/check_branch_before_close_task`, payload)
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
let api: TasksService
|
|
133
|
-
|
|
134
|
-
export default function useTasksService() {
|
|
135
|
-
if (!api) api = new TasksService()
|
|
136
|
-
return api
|
|
137
|
-
}
|
|
1
|
+
import ApiService, { ResponseApi } from '@/api/settings/ApiService'
|
|
2
|
+
import {
|
|
3
|
+
Api_Task_Close_Reason,
|
|
4
|
+
Api_Task_Instrument_Dto,
|
|
5
|
+
Api_Task_Instrument_From_Warehouse,
|
|
6
|
+
Api_Task_Module_Instrument_Condition,
|
|
7
|
+
Api_Tasks_Dto,
|
|
8
|
+
Api_Tasks_Task_Dto,
|
|
9
|
+
} from '@/api/types/Api_Tasks'
|
|
10
|
+
import { Api_Equipment_Full_Dto, Api_Task_Video_Source, Api_Task_Video_Source_Stream } from '@/api/types/Api_Repairs'
|
|
11
|
+
|
|
12
|
+
class TasksService extends ApiService {
|
|
13
|
+
public async fetchTaskById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>> {
|
|
14
|
+
return await this.get(`/tasks/${id}`)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public async fetchTasksList(params: any): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
18
|
+
return await this.get('/list/tasks/search', { params })
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
public async fetchSubtasksList(id: string): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
22
|
+
return await this.get(`/task/${id}/subtasks/list`)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public async fetchTaskBranch(id: string): Promise<ResponseApi<any>> {
|
|
26
|
+
return await this.get(`/get_list_task_branch?task_id=${id}`)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public async fetchInstrumentsList(params: any): Promise<ResponseApi<any[]>> {
|
|
30
|
+
return await this.get('admin/instruments', { params })
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public async fetchInstrumentTypeListWithPreparedWarehouse(params: {
|
|
34
|
+
page: number
|
|
35
|
+
per_page: number
|
|
36
|
+
'filterList[taskId]'?: string | undefined
|
|
37
|
+
search?: string
|
|
38
|
+
}): Promise<Api_Task_Instrument_From_Warehouse[]> {
|
|
39
|
+
return await this.get('/instrument_type/get_instrument_type_list_with_prepared_warehouse', { params })
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public async fetchInstrumentsEquivalentList(params: any): Promise<ResponseApi<Api_Task_Instrument_Dto[]>> {
|
|
43
|
+
return await this.get('tasks/instrument/list', { params })
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public async fetchDiffInstruments(params: any): Promise<ResponseApi<Api_Task_Module_Instrument_Condition>> {
|
|
47
|
+
return await this.get(`tasks/${params.taskId}/fill/module`, { params })
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public async replaceInstruments(payload: any): Promise<ResponseApi<any>> {
|
|
51
|
+
return await this.post(`/instruments/equivalent/attach`, payload)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public async fetchTaskUsagePersonal(params: any): Promise<ResponseApi<unknown[]>> {
|
|
55
|
+
return await this.get(`tasks/${params.taskId}/usage/users`, { params })
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public async fetchTaskUsageInstrument(params: any): Promise<ResponseApi<unknown[]>> {
|
|
59
|
+
return await this.get(`tasks/${params.taskId}/usage/instruments`, { params })
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
public fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
|
|
63
|
+
return this.get('repairs/equipment/list', { params })
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
public fetchTaskVideoSources(params: any): Promise<ResponseApi<Api_Task_Video_Source[]>> {
|
|
67
|
+
return this.get('work_zone/get_list_video_source', { params })
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public fetchTaskVideoSourcesStream(params: any): Promise<ResponseApi<Api_Task_Video_Source_Stream[]>> {
|
|
71
|
+
return this.get('horizon/video-source', { params })
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
public createWorkZone(payload: any): Promise<unknown> {
|
|
75
|
+
return this.post('admin/work-zones', payload)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
public async createTask(payload: any): Promise<ResponseApi<any>> {
|
|
79
|
+
return await this.post(`tasks`, payload)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
public async editTask(payload: any): Promise<ResponseApi<any>> {
|
|
83
|
+
return await this.put(`tasks/${payload.taskId}`, payload.data)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
public async mergeTask(payload: { name: string; tasks_id: string[] }): Promise<ResponseApi<any>> {
|
|
87
|
+
return await this.post(`tasks/merge`, payload)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public async deleteTask(id: string): Promise<any> {
|
|
91
|
+
return await this.delete(`tasks/${id}`)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
public async changeStatus(payload: { taskId: string; data: unknown }): Promise<unknown> {
|
|
95
|
+
const { taskId, data } = payload
|
|
96
|
+
return await this.put(`task/${taskId}/change-status`, data)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
public async uploadComment(payload: unknown): Promise<unknown> {
|
|
100
|
+
return await this.post('comments', payload)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
public async deleteComment(commentId: string): Promise<unknown> {
|
|
104
|
+
return await this.delete(`comments/${commentId}`)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
public async editComment(payload: { commentId: string; data: unknown }): Promise<unknown> {
|
|
108
|
+
const { commentId, data } = payload
|
|
109
|
+
return await this.put(`comments/${commentId}`, data)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
public async saveMetrics(payload: unknown): Promise<unknown> {
|
|
113
|
+
return await this.put('/update_quality_metrics', payload)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
public async checkReasonForStatus(payload: { task_Id: string; data: unknown }): Promise<Api_Task_Close_Reason> {
|
|
117
|
+
return await this.post('/tasks/check_reason_for_task', payload)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
public async verifyTaskStatus(payload: { task_id: string; data: unknown }): Promise<unknown> {
|
|
121
|
+
const { task_id, data } = payload
|
|
122
|
+
return await this.get(`/task/${task_id}/change-status/verification`, {
|
|
123
|
+
params: data,
|
|
124
|
+
})
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
public async checkBranchBeforeCloseTask(payload: { task_Id: string }): Promise<unknown> {
|
|
128
|
+
return await this.post(`/check_branch_before_close_task`, payload)
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
let api: TasksService
|
|
133
|
+
|
|
134
|
+
export default function useTasksService() {
|
|
135
|
+
if (!api) api = new TasksService()
|
|
136
|
+
return api
|
|
137
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import ApiService from '@/api/settings/ApiService'
|
|
2
|
+
|
|
3
|
+
class VideoService extends ApiService {
|
|
4
|
+
public async startVideoAnalytics(): Promise<boolean> {
|
|
5
|
+
return await this.post('/statanly/start', null)
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let api: VideoService
|
|
10
|
+
|
|
11
|
+
export default function useVideoService() {
|
|
12
|
+
if (!api) api = new VideoService()
|
|
13
|
+
return api
|
|
14
|
+
}
|