shared-ritm 1.3.29 → 1.3.31

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.
@@ -38,6 +38,7 @@ declare class VideoService extends ApiService {
38
38
  fetchVisualizationDataLink(params?: Record<string, string>): Promise<string>;
39
39
  updateVisualizationData(params?: Record<string, string>): Promise<number>;
40
40
  deleteFrameFromVideo(id: string): Promise<void>;
41
+ sendEvent(params?: Record<string, any>): Promise<number>;
41
42
  }
42
43
  export default function useVideoService(): VideoService;
43
44
  export {};
@@ -1,4 +1,4 @@
1
- import { Api_Status_DTO } from '@/api/types/Api_Tasks';
1
+ import { Api_Status_DTO, Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks';
2
2
  import { Api_Work_Zone_By_Tasks } from '@/api/types/Api_Repairs';
3
3
  export type Api_Video_Source = {
4
4
  id: string;
@@ -102,7 +102,7 @@ export type Api_Video_Source_Search = {
102
102
  url: string;
103
103
  video_source: Api_Video_Source_Search[];
104
104
  width: number;
105
- work_zones: unknown[];
105
+ work_zones: Api_Video_Source_Work_Zone[];
106
106
  };
107
107
  export type Api_Video_Source_Create = {
108
108
  fps: string;
@@ -183,3 +183,13 @@ export type Api_Video_Combination = {
183
183
  };
184
184
  origin_data: Api_Video_Combination_Origin;
185
185
  };
186
+ export type Api_Video_Source_Work_Zone_Task = Pick<Api_Tasks_Task_Dto, 'id' | 'fact_end_date' | 'fact_start_date' | 'deadline' | 'expired' | 'name' | 'plan_date' | 'responsible' | 'status' | 'time_to_complete_sec'> & {
187
+ power_output_MWh: number | null;
188
+ cost_per_MWh: number | null;
189
+ };
190
+ export type Api_Video_Source_Work_Zone = Pick<Api_Work_Zone_Search, 'id' | 'detect_face' | 'detect_helmet' | 'detect_mask' | 'detect_work_time' | 'detect_work_zone' | 'is_parent' | 'name' | 'x0' | 'x1' | 'y0' | 'y1' | 'video_source_id' | 'parent_id' | 'type' | 'title'> & {
191
+ power_output_MWh: number | null;
192
+ cost_per_MWh: number | null;
193
+ points: unknown[];
194
+ tasks: Api_Video_Source_Work_Zone_Task[];
195
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.3.29",
3
+ "version": "1.3.31",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -98,6 +98,11 @@ class VideoService extends ApiService {
98
98
  public async deleteFrameFromVideo(id: string): Promise<void> {
99
99
  await this.delete(`horizon/video-source/delete/fragment/video/training/${id}`)
100
100
  }
101
+
102
+ // Для тестирования ws видеостены
103
+ public async sendEvent(params?: Record<string, any>): Promise<number> {
104
+ return await this.post('alerts_callback_url', params)
105
+ }
101
106
  }
102
107
 
103
108
  let api: VideoService
@@ -1,4 +1,4 @@
1
- import { Api_Status_DTO } from '@/api/types/Api_Tasks'
1
+ import { Api_Status_DTO, Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks'
2
2
  import { Api_Work_Zone_By_Tasks } from '@/api/types/Api_Repairs'
3
3
 
4
4
  export type Api_Video_Source = {
@@ -106,7 +106,7 @@ export type Api_Video_Source_Search = {
106
106
  url: string
107
107
  video_source: Api_Video_Source_Search[]
108
108
  width: number
109
- work_zones: unknown[]
109
+ work_zones: Api_Video_Source_Work_Zone[]
110
110
  }
111
111
 
112
112
  export type Api_Video_Source_Create = {
@@ -196,3 +196,45 @@ export type Api_Video_Combination = {
196
196
  }
197
197
  origin_data: Api_Video_Combination_Origin
198
198
  }
199
+
200
+ export type Api_Video_Source_Work_Zone_Task = Pick<
201
+ Api_Tasks_Task_Dto,
202
+ | 'id'
203
+ | 'fact_end_date'
204
+ | 'fact_start_date'
205
+ | 'deadline'
206
+ | 'expired'
207
+ | 'name'
208
+ | 'plan_date'
209
+ | 'responsible'
210
+ | 'status'
211
+ | 'time_to_complete_sec'
212
+ > & {
213
+ power_output_MWh: number | null
214
+ cost_per_MWh: number | null
215
+ }
216
+
217
+ export type Api_Video_Source_Work_Zone = Pick<
218
+ Api_Work_Zone_Search,
219
+ | 'id'
220
+ | 'detect_face'
221
+ | 'detect_helmet'
222
+ | 'detect_mask'
223
+ | 'detect_work_time'
224
+ | 'detect_work_zone'
225
+ | 'is_parent'
226
+ | 'name'
227
+ | 'x0'
228
+ | 'x1'
229
+ | 'y0'
230
+ | 'y1'
231
+ | 'video_source_id'
232
+ | 'parent_id'
233
+ | 'type'
234
+ | 'title'
235
+ > & {
236
+ power_output_MWh: number | null
237
+ cost_per_MWh: number | null
238
+ points: unknown[]
239
+ tasks: Api_Video_Source_Work_Zone_Task[]
240
+ }
@@ -16,7 +16,7 @@
16
16
  @click="onDialogOK"
17
17
  />
18
18
  <app-button
19
- data-test="cancel-button"
19
+ data-test="close-button"
20
20
  :class="$style['footer__btn--cancel']"
21
21
  label="Отменить"
22
22
  @click="onDialogHide"
@@ -25,15 +25,11 @@ export function useColumnSelector(allColumns: ColumnConfig[], fixedColumnNames:
25
25
  },
26
26
  cancel: {
27
27
  label: 'Отмена',
28
- attrs: {
29
- 'data-test': 'cancel-button',
30
- },
28
+ 'data-test': 'cancel-button',
31
29
  },
32
30
  ok: {
33
31
  label: 'Ок',
34
- attrs: {
35
- 'data-test': 'ok-button',
36
- },
32
+ 'data-test': 'ok-button',
37
33
  },
38
34
  persistent: true,
39
35
  }).onOk((val: string[]) => {