shared-ritm 1.2.122 → 1.2.124
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 +281 -275
- package/dist/shared-ritm.umd.js +4 -4
- package/dist/types/api/services/ControlsService.d.ts +1 -0
- package/dist/types/api/types/Api_Controls.d.ts +10 -0
- package/package.json +1 -1
- package/src/App.vue +2461 -2461
- package/src/api/services/AuthService.ts +53 -53
- package/src/api/services/CommentsService.ts +24 -24
- package/src/api/services/ControlsService.ts +69 -65
- package/src/api/services/FileService.ts +17 -17
- package/src/api/services/GanttService.ts +17 -17
- package/src/api/services/MetricsService.ts +110 -110
- package/src/api/services/ProjectsService.ts +79 -79
- package/src/api/services/RepairsService.ts +119 -119
- package/src/api/services/TasksService.ts +145 -145
- package/src/api/types/Api_Auth.ts +86 -86
- package/src/api/types/Api_Comment.ts +40 -40
- package/src/api/types/Api_Controls.ts +82 -72
- package/src/api/types/Api_Files.ts +7 -7
- package/src/api/types/Api_Projects.ts +60 -60
- package/src/api/types/Api_Service.ts +9 -9
- package/src/api/types/Api_Tasks.ts +319 -319
- 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-datepicker/AppDatepicker.vue +165 -165
- 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 -148
- 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 +273 -273
- 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/components/TablePagination.vue +152 -152
- package/src/common/app-table/controllers/useColumnSelector.ts +38 -38
- package/src/common/app-table/controllers/useTableModel.ts +102 -93
- package/src/common/app-toggle/AppToggle.vue +24 -24
- 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 +123 -123
- package/src/main.ts +28 -28
- package/src/quasar-user-options.ts +17 -17
- package/src/router/index.ts +10 -10
- package/src/shared/styles/general.css +124 -124
- package/src/shims-vue.d.ts +5 -5
- package/src/utils/confirm.ts +12 -12
- package/src/utils/faceApiHelper.ts +132 -132
- package/src/utils/helpers.ts +59 -59
- package/src/utils/notification.ts +9 -9
- package/dist/types/api/services/ComentsServise.d.ts +0 -10
- package/dist/types/api/services/PhotoService.d.ts +0 -53
- package/dist/types/api/types/Api_Users.d.ts +0 -43
package/src/utils/helpers.ts
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
// Эти все функции есть в квазаре, меняйте на них
|
|
2
|
-
/**
|
|
3
|
-
* Сравнивает два значения на глубокое равенство.
|
|
4
|
-
* Поддерживает массивы, объекты и примитивы.
|
|
5
|
-
*/
|
|
6
|
-
export function isEqual(a: any, b: any): boolean {
|
|
7
|
-
if (Array.isArray(a) && Array.isArray(b)) {
|
|
8
|
-
if (a.length !== b.length) return false
|
|
9
|
-
return a.every((item, i) => isEqual(item, b[i]))
|
|
10
|
-
}
|
|
11
|
-
if (typeof a === 'object' && typeof b === 'object') {
|
|
12
|
-
return JSON.stringify(a) === JSON.stringify(b)
|
|
13
|
-
}
|
|
14
|
-
return a === b
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Нормализует значение:
|
|
19
|
-
* - Если передан массив объектов, возвращает массив `.value` или сам объект.
|
|
20
|
-
* - Если передан объект, возвращает `.value` или сам объект.
|
|
21
|
-
* - Если примитив — возвращает без изменений.
|
|
22
|
-
*/
|
|
23
|
-
export function normalizeValue(val: any): any {
|
|
24
|
-
if (Array.isArray(val)) {
|
|
25
|
-
return val.map(v => (typeof v === 'object' && v !== null ? v.value ?? v : v))
|
|
26
|
-
}
|
|
27
|
-
return typeof val === 'object' && val !== null ? val.value ?? val : val
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Генерирует UUID v4.
|
|
32
|
-
* Используется для идентификаторов временных сущностей.
|
|
33
|
-
*/
|
|
34
|
-
export function uuidv4(): string {
|
|
35
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
36
|
-
const r = (Math.random() * 16) | 0
|
|
37
|
-
const v = c === 'x' ? r : (r & 0x3) | 0x8
|
|
38
|
-
return v.toString(16)
|
|
39
|
-
})
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function base64ToBlob(base64Data: string) {
|
|
43
|
-
const parts = base64Data.split(';base64,')
|
|
44
|
-
const contentType = parts[0].split(':')[1]
|
|
45
|
-
const byteCharacters = atob(parts[1])
|
|
46
|
-
const byteArrays: any[] = []
|
|
47
|
-
|
|
48
|
-
for (let offset = 0; offset < byteCharacters.length; offset += 1024) {
|
|
49
|
-
const slice = byteCharacters.slice(offset, offset + 1024)
|
|
50
|
-
const byteNumbers = new Array(slice.length)
|
|
51
|
-
for (let i = 0; i < slice.length; i++) {
|
|
52
|
-
byteNumbers[i] = slice.charCodeAt(i)
|
|
53
|
-
}
|
|
54
|
-
const byteArray = new Uint8Array(byteNumbers)
|
|
55
|
-
byteArrays.push(byteArray)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return new Blob(byteArrays, { type: contentType })
|
|
59
|
-
}
|
|
1
|
+
// Эти все функции есть в квазаре, меняйте на них
|
|
2
|
+
/**
|
|
3
|
+
* Сравнивает два значения на глубокое равенство.
|
|
4
|
+
* Поддерживает массивы, объекты и примитивы.
|
|
5
|
+
*/
|
|
6
|
+
export function isEqual(a: any, b: any): boolean {
|
|
7
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
8
|
+
if (a.length !== b.length) return false
|
|
9
|
+
return a.every((item, i) => isEqual(item, b[i]))
|
|
10
|
+
}
|
|
11
|
+
if (typeof a === 'object' && typeof b === 'object') {
|
|
12
|
+
return JSON.stringify(a) === JSON.stringify(b)
|
|
13
|
+
}
|
|
14
|
+
return a === b
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Нормализует значение:
|
|
19
|
+
* - Если передан массив объектов, возвращает массив `.value` или сам объект.
|
|
20
|
+
* - Если передан объект, возвращает `.value` или сам объект.
|
|
21
|
+
* - Если примитив — возвращает без изменений.
|
|
22
|
+
*/
|
|
23
|
+
export function normalizeValue(val: any): any {
|
|
24
|
+
if (Array.isArray(val)) {
|
|
25
|
+
return val.map(v => (typeof v === 'object' && v !== null ? v.value ?? v : v))
|
|
26
|
+
}
|
|
27
|
+
return typeof val === 'object' && val !== null ? val.value ?? val : val
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Генерирует UUID v4.
|
|
32
|
+
* Используется для идентификаторов временных сущностей.
|
|
33
|
+
*/
|
|
34
|
+
export function uuidv4(): string {
|
|
35
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
36
|
+
const r = (Math.random() * 16) | 0
|
|
37
|
+
const v = c === 'x' ? r : (r & 0x3) | 0x8
|
|
38
|
+
return v.toString(16)
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function base64ToBlob(base64Data: string) {
|
|
43
|
+
const parts = base64Data.split(';base64,')
|
|
44
|
+
const contentType = parts[0].split(':')[1]
|
|
45
|
+
const byteCharacters = atob(parts[1])
|
|
46
|
+
const byteArrays: any[] = []
|
|
47
|
+
|
|
48
|
+
for (let offset = 0; offset < byteCharacters.length; offset += 1024) {
|
|
49
|
+
const slice = byteCharacters.slice(offset, offset + 1024)
|
|
50
|
+
const byteNumbers = new Array(slice.length)
|
|
51
|
+
for (let i = 0; i < slice.length; i++) {
|
|
52
|
+
byteNumbers[i] = slice.charCodeAt(i)
|
|
53
|
+
}
|
|
54
|
+
const byteArray = new Uint8Array(byteNumbers)
|
|
55
|
+
byteArrays.push(byteArray)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return new Blob(byteArrays, { type: contentType })
|
|
59
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { QNotifyCreateOptions } from 'quasar'
|
|
2
|
-
|
|
3
|
-
export type NotificationType = 'danger' | 'success' | 'warning' | 'info' | 'default'
|
|
4
|
-
|
|
5
|
-
export const notificationSettings = (type: NotificationType, message: string): QNotifyCreateOptions => ({
|
|
6
|
-
message,
|
|
7
|
-
color: type === 'danger' ? 'red' : type === 'success' ? 'green' : type === 'warning' ? 'orange' : 'white',
|
|
8
|
-
position: 'top-right',
|
|
9
|
-
})
|
|
1
|
+
import { QNotifyCreateOptions } from 'quasar'
|
|
2
|
+
|
|
3
|
+
export type NotificationType = 'danger' | 'success' | 'warning' | 'info' | 'default'
|
|
4
|
+
|
|
5
|
+
export const notificationSettings = (type: NotificationType, message: string): QNotifyCreateOptions => ({
|
|
6
|
+
message,
|
|
7
|
+
color: type === 'danger' ? 'red' : type === 'success' ? 'green' : type === 'warning' ? 'orange' : 'white',
|
|
8
|
+
position: 'top-right',
|
|
9
|
+
})
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import ApiService from '@/api/settings/ApiService'
|
|
2
|
-
import { Api_Comment_Request_Dto } from '@/api/types/Api_Comment'
|
|
3
|
-
import { Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks'
|
|
4
|
-
declare class CommentsService extends ApiService {
|
|
5
|
-
uploadComment(payload: Api_Comment_Request_Dto): Promise<Api_Tasks_Task_Dto>
|
|
6
|
-
deleteComment(commentId: string): Promise<unknown>
|
|
7
|
-
editComment(payload: { commentId: string; data: unknown }): Promise<unknown>
|
|
8
|
-
}
|
|
9
|
-
export default function useCommentsService(): CommentsService
|
|
10
|
-
export {}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as faceapi from 'face-api.js'
|
|
2
|
-
declare class PhotoService {
|
|
3
|
-
getVideoStreamConfig(
|
|
4
|
-
width: number,
|
|
5
|
-
height: number,
|
|
6
|
-
): {
|
|
7
|
-
audio: boolean
|
|
8
|
-
video: {
|
|
9
|
-
width: {
|
|
10
|
-
min: number
|
|
11
|
-
ideal: number
|
|
12
|
-
}
|
|
13
|
-
height: {
|
|
14
|
-
min: number
|
|
15
|
-
ideal: number
|
|
16
|
-
}
|
|
17
|
-
facingMode: string
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
getContourCoordinate(
|
|
21
|
-
width: number,
|
|
22
|
-
height: number,
|
|
23
|
-
): {
|
|
24
|
-
x: number
|
|
25
|
-
y: number
|
|
26
|
-
width: number
|
|
27
|
-
height: number
|
|
28
|
-
}
|
|
29
|
-
getBoxData(box: any): {
|
|
30
|
-
x: any
|
|
31
|
-
y: any
|
|
32
|
-
width: any
|
|
33
|
-
height: any
|
|
34
|
-
} | null
|
|
35
|
-
setStylesForCanvas(canvasContainer: any): void
|
|
36
|
-
checkFaceInclusion(frame: any, face: any): boolean
|
|
37
|
-
getFaceDetections(videoRef: any): Promise<
|
|
38
|
-
faceapi.WithFaceExpressions<
|
|
39
|
-
faceapi.WithFaceLandmarks<
|
|
40
|
-
{
|
|
41
|
-
detection: faceapi.FaceDetection
|
|
42
|
-
},
|
|
43
|
-
faceapi.FaceLandmarks68
|
|
44
|
-
>
|
|
45
|
-
>[]
|
|
46
|
-
>
|
|
47
|
-
getCanvas(videoRef: any): HTMLCanvasElement
|
|
48
|
-
getResizedAndDetection(canvas: any, detections: any, ctx: any, videoWidth: number, videoHeight: number): void
|
|
49
|
-
getFaceSnapshot(inputImage: any, box: any): Promise<string | null>
|
|
50
|
-
initModels(): Promise<void>
|
|
51
|
-
}
|
|
52
|
-
export default function usePhotoService(): PhotoService
|
|
53
|
-
export {}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export type Api_Search_User_Passes = {
|
|
2
|
-
id: string
|
|
3
|
-
type: string
|
|
4
|
-
uuid: string
|
|
5
|
-
}
|
|
6
|
-
export type Api_Search_User_Positions = {
|
|
7
|
-
id: string
|
|
8
|
-
name: string
|
|
9
|
-
display_name: string
|
|
10
|
-
description: string
|
|
11
|
-
}
|
|
12
|
-
export type Api_Search_User_Roles = {
|
|
13
|
-
id: string
|
|
14
|
-
name: string
|
|
15
|
-
display_name: string
|
|
16
|
-
}
|
|
17
|
-
export type Api_Search_User_Teams = {
|
|
18
|
-
id: string
|
|
19
|
-
name: string
|
|
20
|
-
display_name: string
|
|
21
|
-
roles: Api_Search_User_Roles[]
|
|
22
|
-
}
|
|
23
|
-
export type Api_Search_User_Photos = {
|
|
24
|
-
id: string
|
|
25
|
-
name: string
|
|
26
|
-
path: string
|
|
27
|
-
type: string
|
|
28
|
-
}
|
|
29
|
-
export type Api_Search_User = {
|
|
30
|
-
id: string
|
|
31
|
-
full_name: string
|
|
32
|
-
last_name: string
|
|
33
|
-
first_name: string
|
|
34
|
-
patronymic: string
|
|
35
|
-
email: string
|
|
36
|
-
phone: string
|
|
37
|
-
divisions: string
|
|
38
|
-
personnel_number: string
|
|
39
|
-
passes: Api_Search_User_Passes[]
|
|
40
|
-
positions: Api_Search_User_Positions[]
|
|
41
|
-
teams: Api_Search_User_Teams[]
|
|
42
|
-
photos: Api_Search_User_Photos[]
|
|
43
|
-
}
|