shared-ritm 1.2.117 → 1.2.119

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.
@@ -1,6 +1,6 @@
1
1
  import ApiService from '../settings/ApiService';
2
2
  import { ResponseApi } from '../types/Api_Service';
3
- import { Api_Project_Dto } from '../types/Api_Projects';
3
+ import { Api_Project_Add_Root_Intervals_Payload, Api_Project_Dto } from '../types/Api_Projects';
4
4
  declare class ProjectsService extends ApiService {
5
5
  fetchProjectById(id: string): Promise<Api_Project_Dto>;
6
6
  createProject(params: any): Promise<Api_Project_Dto>;
@@ -16,6 +16,8 @@ declare class ProjectsService extends ApiService {
16
16
  fetchProjectTeamList(id: string): Promise<ResponseApi<any>>;
17
17
  deleteProject(id: string): Promise<any>;
18
18
  getDynamicProgressWidget(id: string): Promise<any>;
19
+ removeRootIntervals(): Promise<void>;
20
+ addRootIntervals(projectId: string, payload: Api_Project_Add_Root_Intervals_Payload): Promise<void>;
19
21
  }
20
22
  export default function useProjectsService(): ProjectsService;
21
23
  export {};
@@ -1,6 +1,6 @@
1
1
  import ApiService from '../settings/ApiService';
2
2
  import { ResponseApi } from '@/api/types/Api_Service';
3
- import { Api_Video_Source_Create, Api_Video_Source_Search, Api_Work_Zone, Api_Work_Zone_Search } from '@/api/types/Api_Video';
3
+ import { Api_Video_Source_By_Repair, Api_Video_Source_Create, Api_Video_Source_Search, Api_Work_Zone, Api_Work_Zone_Search } from '@/api/types/Api_Video';
4
4
  declare class VideoService extends ApiService {
5
5
  startVideoAnalytics(): Promise<boolean>;
6
6
  reloadVideoAnalytics(ids: string[]): Promise<any>;
@@ -27,6 +27,7 @@ declare class VideoService extends ApiService {
27
27
  status: number;
28
28
  }>;
29
29
  deleteVideoSource(id: string): Promise<void>;
30
+ fetchListRepairsVideoSource(params?: any): Promise<Api_Video_Source_By_Repair[]>;
30
31
  }
31
32
  export default function useVideoService(): VideoService;
32
33
  export {};
@@ -49,3 +49,7 @@ export type Api_Project_Dto = {
49
49
  category: Api_Project_Category;
50
50
  repair: Api_Project_Repair | null;
51
51
  };
52
+ export type Api_Project_Add_Root_Intervals_Payload = {
53
+ history: number;
54
+ with_status_in_progress: number;
55
+ };
@@ -26,20 +26,21 @@ export type Api_Equipment_Full_Dto = {
26
26
  repair_frequency: number;
27
27
  repair_range: number;
28
28
  };
29
+ export type Api_Work_Zone_By_Tasks = {
30
+ coordinates: {
31
+ x0: number;
32
+ x1: number;
33
+ y0: number;
34
+ y1: number;
35
+ };
36
+ id: string;
37
+ tasks: unknown[];
38
+ title: string;
39
+ };
29
40
  export type Api_Task_Video_Source = {
30
41
  id: string;
31
42
  name: string;
32
- work_zones_by_tasks: Array<{
33
- coordinates: {
34
- x0: number;
35
- x1: number;
36
- y0: number;
37
- y1: number;
38
- };
39
- id: string;
40
- tasks: unknown[];
41
- title: string;
42
- }>;
43
+ work_zones_by_tasks: Api_Work_Zone_By_Tasks[];
43
44
  };
44
45
  export type Api_Task_Video_Source_Stream = {
45
46
  id: string;
@@ -1,4 +1,5 @@
1
1
  import { Api_Status_DTO } from '@/api/types/Api_Tasks';
2
+ import { Api_Work_Zone_By_Tasks } from '@/api/types/Api_Repairs';
2
3
  export type Api_Video_Source = {
3
4
  id: string;
4
5
  name: string;
@@ -64,7 +65,7 @@ export type Api_Work_Zone_Task = {
64
65
  fact_start_date: null | string;
65
66
  fact_end_date: null | string;
66
67
  time_to_complete_sec: number | null;
67
- status: Api_Status_DTO[];
68
+ status: Api_Status_DTO;
68
69
  usage_users: Api_Work_Zone_Usage_User[];
69
70
  };
70
71
  export type Api_Work_Zone_Coords = {
@@ -116,3 +117,17 @@ export type Api_Video_Source_Create = {
116
117
  video_source_ids?: string[];
117
118
  snapshot?: string;
118
119
  };
120
+ export type Api_Video_Source_By_Repair_Project = {
121
+ id: string;
122
+ name: string;
123
+ deadline: string;
124
+ };
125
+ export type Api_Video_Source_By_Repair = {
126
+ list_video_source: {
127
+ id: string;
128
+ name: string;
129
+ url: string;
130
+ work_zones_by_tasks: Api_Work_Zone_By_Tasks[];
131
+ }[];
132
+ project: Api_Video_Source_By_Repair_Project;
133
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.2.117",
3
+ "version": "1.2.119",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -1,72 +1,79 @@
1
- import ApiService from '../settings/ApiService'
2
-
3
- import { ResponseApi } from '../types/Api_Service'
4
- import { Api_Project_Dto } from '../types/Api_Projects'
5
-
6
- class ProjectsService extends ApiService {
7
- public async fetchProjectById(id: string): Promise<Api_Project_Dto> {
8
- return this.get(`/projects/${id}`)
9
- }
10
-
11
- public createProject(params: any): Promise<Api_Project_Dto> {
12
- return this.post<any, Api_Project_Dto>('/projects', params)
13
- }
14
-
15
- public editProject(id: string, params: any): Promise<Api_Project_Dto> {
16
- return this.put<any, Api_Project_Dto>(`/projects/${id}`, params)
17
- }
18
-
19
- public fetchProjects(params: any): Promise<ResponseApi<Api_Project_Dto[]>> {
20
- return this.get(`/search/projects`, { params })
21
- }
22
-
23
- public cloneProject(project: Api_Project_Dto): Promise<Api_Project_Dto> {
24
- return this.post<Api_Project_Dto, Api_Project_Dto>(`projects/${project.id}/clone`, project)
25
- }
26
-
27
- public archiveProject(id: string, data: any): Promise<ResponseApi<any>> {
28
- return this.put<any, ResponseApi<any>>(`/projects/${id}`, data)
29
- }
30
-
31
- public unArchiveProject(id: string, data: any): Promise<ResponseApi<any>> {
32
- return this.put<any, ResponseApi<any>>(`/projects/${id}`, data)
33
- }
34
-
35
- public moveAprProject(id: string): Promise<ResponseApi<any>> {
36
- return this.post<any, ResponseApi<any>>('repairs/move_plan_to_real', {
37
- repairs: [id],
38
- })
39
- }
40
- public restoreProject(id: string): Promise<ResponseApi<any>> {
41
- return this.post<any, ResponseApi<any>>('/restore_project', { projects_ids: [id] })
42
- }
43
-
44
- public importTasks(payload: any): Promise<ResponseApi<any>> {
45
- return this.post<any, ResponseApi<any>>('tasks/import', payload)
46
- }
47
-
48
- public importKtd(payload: any): Promise<ResponseApi<any>> {
49
- return this.post<any, ResponseApi<any>>('/parse_ktd', payload, {
50
- headers: { 'Content-Type': 'multipart/form-data' },
51
- })
52
- }
53
-
54
- public fetchProjectTeamList(id: string): Promise<ResponseApi<any>> {
55
- return this.put<any, ResponseApi<any>>(`/projects/${id}`, null)
56
- }
57
-
58
- public deleteProject(id: string): Promise<any> {
59
- return this.delete<ResponseApi<any>>(`/projects/${id}`)
60
- }
61
-
62
- public getDynamicProgressWidget(id: string): Promise<any> {
63
- return this.get<ResponseApi<any>>(`repairs/get_repair_list_dynamics_performance?repair_id_list[]=${id}`)
64
- }
65
- }
66
-
67
- let api: ProjectsService
68
-
69
- export default function useProjectsService() {
70
- if (!api) api = new ProjectsService()
71
- return api
72
- }
1
+ import ApiService from '../settings/ApiService'
2
+
3
+ import { ResponseApi } from '../types/Api_Service'
4
+ import { Api_Project_Add_Root_Intervals_Payload, Api_Project_Dto } from '../types/Api_Projects'
5
+
6
+ class ProjectsService extends ApiService {
7
+ public async fetchProjectById(id: string): Promise<Api_Project_Dto> {
8
+ return this.get(`/projects/${id}`)
9
+ }
10
+
11
+ public createProject(params: any): Promise<Api_Project_Dto> {
12
+ return this.post<any, Api_Project_Dto>('/projects', params)
13
+ }
14
+
15
+ public editProject(id: string, params: any): Promise<Api_Project_Dto> {
16
+ return this.put<any, Api_Project_Dto>(`/projects/${id}`, params)
17
+ }
18
+
19
+ public fetchProjects(params: any): Promise<ResponseApi<Api_Project_Dto[]>> {
20
+ return this.get(`/search/projects`, { params })
21
+ }
22
+
23
+ public cloneProject(project: Api_Project_Dto): Promise<Api_Project_Dto> {
24
+ return this.post<Api_Project_Dto, Api_Project_Dto>(`projects/${project.id}/clone`, project)
25
+ }
26
+
27
+ public archiveProject(id: string, data: any): Promise<ResponseApi<any>> {
28
+ return this.put<any, ResponseApi<any>>(`/projects/${id}`, data)
29
+ }
30
+
31
+ public unArchiveProject(id: string, data: any): Promise<ResponseApi<any>> {
32
+ return this.put<any, ResponseApi<any>>(`/projects/${id}`, data)
33
+ }
34
+
35
+ public moveAprProject(id: string): Promise<ResponseApi<any>> {
36
+ return this.post<any, ResponseApi<any>>('repairs/move_plan_to_real', {
37
+ repairs: [id],
38
+ })
39
+ }
40
+ public restoreProject(id: string): Promise<ResponseApi<any>> {
41
+ return this.post<any, ResponseApi<any>>('/restore_project', { projects_ids: [id] })
42
+ }
43
+
44
+ public importTasks(payload: any): Promise<ResponseApi<any>> {
45
+ return this.post<any, ResponseApi<any>>('tasks/import', payload)
46
+ }
47
+
48
+ public importKtd(payload: any): Promise<ResponseApi<any>> {
49
+ return this.post<any, ResponseApi<any>>('/parse_ktd', payload, {
50
+ headers: { 'Content-Type': 'multipart/form-data' },
51
+ })
52
+ }
53
+
54
+ public fetchProjectTeamList(id: string): Promise<ResponseApi<any>> {
55
+ return this.put<any, ResponseApi<any>>(`/projects/${id}`, null)
56
+ }
57
+
58
+ public deleteProject(id: string): Promise<any> {
59
+ return this.delete<ResponseApi<any>>(`/projects/${id}`)
60
+ }
61
+
62
+ public getDynamicProgressWidget(id: string): Promise<any> {
63
+ return this.get<ResponseApi<any>>(`repairs/get_repair_list_dynamics_performance?repair_id_list[]=${id}`)
64
+ }
65
+
66
+ public removeRootIntervals(): Promise<void> {
67
+ return this.post<null, void>(`/delete/fake/projects`, null)
68
+ }
69
+ public addRootIntervals(projectId: string, payload: Api_Project_Add_Root_Intervals_Payload): Promise<void> {
70
+ return this.post<Api_Project_Add_Root_Intervals_Payload, void>(`/set/fake/projects/${projectId}`, payload)
71
+ }
72
+ }
73
+
74
+ let api: ProjectsService
75
+
76
+ export default function useProjectsService() {
77
+ if (!api) api = new ProjectsService()
78
+ return api
79
+ }
@@ -1,6 +1,7 @@
1
1
  import ApiService from '../settings/ApiService'
2
2
  import { ResponseApi } from '@/api/types/Api_Service'
3
3
  import {
4
+ Api_Video_Source_By_Repair,
4
5
  Api_Video_Source_Create,
5
6
  Api_Video_Source_Search,
6
7
  Api_Work_Zone,
@@ -56,6 +57,10 @@ class VideoService extends ApiService {
56
57
  public async deleteVideoSource(id: string): Promise<void> {
57
58
  await this.delete(`/horizon/video-source/${id}`)
58
59
  }
60
+
61
+ public async fetchListRepairsVideoSource(params?: any): Promise<Api_Video_Source_By_Repair[]> {
62
+ return await this.get('work_zone/get_list_video_source_by_repair', { params })
63
+ }
59
64
  }
60
65
 
61
66
  let api: VideoService
@@ -53,3 +53,8 @@ export type Api_Project_Dto = {
53
53
  category: Api_Project_Category
54
54
  repair: Api_Project_Repair | null
55
55
  }
56
+
57
+ export type Api_Project_Add_Root_Intervals_Payload = {
58
+ history: number
59
+ with_status_in_progress: number
60
+ }
@@ -1,115 +1,117 @@
1
- export type Api_Team = {
2
- id: string
3
- display_name: string
4
- }
5
-
6
- export type Api_Equipment_Short_Dto = {
7
- id: string
8
- name: string
9
- }
10
-
11
- export type Api_Repairs = {
12
- id: string
13
- name: string
14
- }
15
-
16
- export type Api_Projects = {
17
- id: string
18
- name: string
19
- }
20
-
21
- export type OptionFilters = {
22
- teams?: Api_Team[]
23
- equipments?: Api_Equipment_Short_Dto[]
24
- }
25
-
26
- export type Api_Equipment_Full_Dto = {
27
- id: string
28
- model: null | string
29
- name: string
30
- registration_number: string
31
- repair_frequency: number
32
- repair_range: number
33
- }
34
-
35
- export type Api_Task_Video_Source = {
36
- id: string
37
- name: string
38
- work_zones_by_tasks: Array<{
39
- coordinates: { x0: number; x1: number; y0: number; y1: number }
40
- id: string
41
- tasks: unknown[]
42
- title: string
43
- }>
44
- }
45
-
46
- export type Api_Task_Video_Source_Stream = {
47
- id: string
48
- name: string
49
- url: string
50
- width: number
51
- height: number
52
- fps: string
53
- login: string
54
- password: string
55
- comment: unknown
56
- work_zones: unknown[]
57
- video_source: unknown[]
58
- related_video_sources: unknown[]
59
- interactive_zones: unknown
60
- domed: boolean
61
- snapshot_path: string
62
- shapes: unknown[]
63
- }
64
-
65
- export type Api_Create_Repair_With_Equipments = {
66
- name: string
67
- display_name: string
68
- description?: string
69
- equipment_id: string
70
- power_output_MWh?: number
71
- cost_per_MWh?: number
72
- category: number
73
- user_id_list?: string[]
74
- team_id_list?: string[]
75
- }
76
-
77
- export type Api_Create_Repair_With_Template = Omit<Api_Create_Repair_With_Equipments, 'category' | 'equipment_id'> & {
78
- repair_template_id: string
79
- plan_start_date: string
80
- task_id_list: string[]
81
- }
82
-
83
- export type Api_Update_Repair = {
84
- name?: string
85
- display_name?: string
86
- description?: string | null
87
- power_output_MWh?: number | null
88
- cost_per_MWh?: number | null
89
- category?: number
90
- user_id_list?: string[]
91
- team_id_list?: string[]
92
- }
93
-
94
- export type Api_Repair_Dto = {
95
- id: string
96
- name: string
97
- display_name: string
98
- description: string
99
- start_date: string
100
- end_date: string
101
- projects: Api_Projects[]
102
- equipments: Api_Equipment_Full_Dto[]
103
- }
104
-
105
- export type Api_Repair_Template = {
106
- id: string
107
- repair_seconds: number
108
- equipment: Pick<Api_Equipment_Full_Dto, 'id' | 'name' | 'registration_number'>
109
- category: {
110
- display_name: string
111
- name: string
112
- code: number
113
- }
114
- task_list: string
115
- }
1
+ export type Api_Team = {
2
+ id: string
3
+ display_name: string
4
+ }
5
+
6
+ export type Api_Equipment_Short_Dto = {
7
+ id: string
8
+ name: string
9
+ }
10
+
11
+ export type Api_Repairs = {
12
+ id: string
13
+ name: string
14
+ }
15
+
16
+ export type Api_Projects = {
17
+ id: string
18
+ name: string
19
+ }
20
+
21
+ export type OptionFilters = {
22
+ teams?: Api_Team[]
23
+ equipments?: Api_Equipment_Short_Dto[]
24
+ }
25
+
26
+ export type Api_Equipment_Full_Dto = {
27
+ id: string
28
+ model: null | string
29
+ name: string
30
+ registration_number: string
31
+ repair_frequency: number
32
+ repair_range: number
33
+ }
34
+
35
+ export type Api_Work_Zone_By_Tasks = {
36
+ coordinates: { x0: number; x1: number; y0: number; y1: number }
37
+ id: string
38
+ tasks: unknown[]
39
+ title: string
40
+ }
41
+
42
+ export type Api_Task_Video_Source = {
43
+ id: string
44
+ name: string
45
+ work_zones_by_tasks: Api_Work_Zone_By_Tasks[]
46
+ }
47
+
48
+ export type Api_Task_Video_Source_Stream = {
49
+ id: string
50
+ name: string
51
+ url: string
52
+ width: number
53
+ height: number
54
+ fps: string
55
+ login: string
56
+ password: string
57
+ comment: unknown
58
+ work_zones: unknown[]
59
+ video_source: unknown[]
60
+ related_video_sources: unknown[]
61
+ interactive_zones: unknown
62
+ domed: boolean
63
+ snapshot_path: string
64
+ shapes: unknown[]
65
+ }
66
+
67
+ export type Api_Create_Repair_With_Equipments = {
68
+ name: string
69
+ display_name: string
70
+ description?: string
71
+ equipment_id: string
72
+ power_output_MWh?: number
73
+ cost_per_MWh?: number
74
+ category: number
75
+ user_id_list?: string[]
76
+ team_id_list?: string[]
77
+ }
78
+
79
+ export type Api_Create_Repair_With_Template = Omit<Api_Create_Repair_With_Equipments, 'category' | 'equipment_id'> & {
80
+ repair_template_id: string
81
+ plan_start_date: string
82
+ task_id_list: string[]
83
+ }
84
+
85
+ export type Api_Update_Repair = {
86
+ name?: string
87
+ display_name?: string
88
+ description?: string | null
89
+ power_output_MWh?: number | null
90
+ cost_per_MWh?: number | null
91
+ category?: number
92
+ user_id_list?: string[]
93
+ team_id_list?: string[]
94
+ }
95
+
96
+ export type Api_Repair_Dto = {
97
+ id: string
98
+ name: string
99
+ display_name: string
100
+ description: string
101
+ start_date: string
102
+ end_date: string
103
+ projects: Api_Projects[]
104
+ equipments: Api_Equipment_Full_Dto[]
105
+ }
106
+
107
+ export type Api_Repair_Template = {
108
+ id: string
109
+ repair_seconds: number
110
+ equipment: Pick<Api_Equipment_Full_Dto, 'id' | 'name' | 'registration_number'>
111
+ category: {
112
+ display_name: string
113
+ name: string
114
+ code: number
115
+ }
116
+ task_list: string
117
+ }
@@ -1,4 +1,5 @@
1
1
  import { Api_Status_DTO } from '@/api/types/Api_Tasks'
2
+ import { Api_Work_Zone_By_Tasks } from '@/api/types/Api_Repairs'
2
3
 
3
4
  export type Api_Video_Source = {
4
5
  id: string
@@ -68,7 +69,7 @@ export type Api_Work_Zone_Task = {
68
69
  fact_start_date: null | string
69
70
  fact_end_date: null | string
70
71
  time_to_complete_sec: number | null
71
- status: Api_Status_DTO[]
72
+ status: Api_Status_DTO
72
73
  usage_users: Api_Work_Zone_Usage_User[]
73
74
  }
74
75
 
@@ -121,3 +122,19 @@ export type Api_Video_Source_Create = {
121
122
  video_source_ids?: string[]
122
123
  snapshot?: string
123
124
  }
125
+
126
+ export type Api_Video_Source_By_Repair_Project = {
127
+ id: string
128
+ name: string
129
+ deadline: string
130
+ }
131
+
132
+ export type Api_Video_Source_By_Repair = {
133
+ list_video_source: {
134
+ id: string
135
+ name: string
136
+ url: string
137
+ work_zones_by_tasks: Api_Work_Zone_By_Tasks[]
138
+ }[]
139
+ project: Api_Video_Source_By_Repair_Project
140
+ }
@@ -3,7 +3,10 @@
3
3
  <q-toolbar :class="$style.toolbar">
4
4
  <h1>{{ pageTitle }}</h1>
5
5
  <div :class="$style['action-buttons']">
6
- <p v-if="settingsMenuItems?.find(x => x.name === 'root-on' && x.isShow)" style="color: red">Root-режим</p>
6
+ <div v-if="settingsMenuItems?.find(x => x.name === 'root-on' && x.isShow)" :class="$style['root-mode']">
7
+ <h1>Включен Root-режим</h1>
8
+ </div>
9
+
7
10
  <div :class="$style['person']" @click="clickProfile">
8
11
  <app-icon name="person-icon" />
9
12
  <div :class="$style['person__info']">
@@ -147,6 +150,25 @@ onClickOutside(refMenuSettings, () => (isSettingsOpened.value = false))
147
150
  background: white;
148
151
  }
149
152
 
153
+ .root-mode {
154
+ display: flex;
155
+ align-items: center;
156
+ background-color: red;
157
+ padding: 14px;
158
+ border-radius: 10px;
159
+ box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2), 0 2px 2px rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12);
160
+ cursor: pointer;
161
+ user-select: none;
162
+ h1 {
163
+ font-size: 16px;
164
+ font-weight: 600;
165
+ font-family: 'Nunito Sans', sans-serif;
166
+ }
167
+ &:active {
168
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 4px 4px rgba(0, 0, 0, 0.2), 0 6px 2px -5px rgba(0, 0, 0, 0.2);
169
+ }
170
+ }
171
+
150
172
  .person {
151
173
  display: flex;
152
174
  align-items: center;