shared-ritm 1.3.126 → 1.3.128
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/dist/index.css +1 -1
- package/dist/shared-ritm.es.js +1643 -1619
- package/dist/shared-ritm.umd.js +105 -105
- package/dist/types/api/services/MetricsService.d.ts +3 -2
- package/dist/types/api/types/Api_Metrics.d.ts +21 -0
- package/package.json +1 -1
- package/src/api/services/MetricsService.ts +6 -2
- package/src/api/types/Api_Metrics.ts +23 -0
- package/src/common/app-datepicker/AppDatepicker.vue +4 -1
- package/src/common/app-input-new/AppInputNew.vue +6 -1
- package/src/common/app-select/AppSelect.vue +11 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ApiService from '../settings/ApiService';
|
|
2
2
|
import { ResponseApi } from '../types/Api_Service';
|
|
3
|
-
import { Api_Metrics_Instruments_Plan, Api_Metrics_Performance, Api_Metrics_Personnel_Plan, Api_Metrics_Personnel_Plan_Project, Api_Metrics_Personnel_Plan_Project_Body, Api_Metrics_Task_Project, Api_Metrics_Unused_Personnel } from '@/api/types/Api_Metrics';
|
|
3
|
+
import { Api_Metrics_Instruments_Plan, Api_Metrics_Performance, Api_Metrics_Personnel_Plan, Api_Metrics_Personnel_Plan_Project, Api_Metrics_Personnel_Plan_Project_Body, Api_Metrics_Task_By_Status, Api_Metrics_Task_Project, Api_Metrics_Unused_Personnel } from '@/api/types/Api_Metrics';
|
|
4
4
|
declare class MetricsService extends ApiService {
|
|
5
5
|
fetchPieProjects(queryString: string): Promise<ResponseApi<any>>;
|
|
6
6
|
fetchPieTasks(queryString: string): Promise<ResponseApi<any>>;
|
|
@@ -30,7 +30,7 @@ declare class MetricsService extends ApiService {
|
|
|
30
30
|
fetchPieWorkZone(queryString: string): Promise<any>;
|
|
31
31
|
fetchWorkZoneInfo(queryString: string): Promise<any>;
|
|
32
32
|
fetchPieAllTasks(queryString: string): Promise<any>;
|
|
33
|
-
fetchPieAllTasksInfo(
|
|
33
|
+
fetchPieAllTasksInfo(params: any): Promise<Api_Metrics_Task_By_Status>;
|
|
34
34
|
fetchPersonnelPlan(params: any): Promise<Api_Metrics_Personnel_Plan>;
|
|
35
35
|
fetchPersonnelPlanProjects(body: Api_Metrics_Personnel_Plan_Project_Body): Promise<Api_Metrics_Personnel_Plan_Project[]>;
|
|
36
36
|
fetchInstrumentsPlan(params: any): Promise<Api_Metrics_Instruments_Plan[]>;
|
|
@@ -39,6 +39,7 @@ declare class MetricsService extends ApiService {
|
|
|
39
39
|
status_name: string;
|
|
40
40
|
}): Promise<Api_Metrics_Task_Project[]>;
|
|
41
41
|
fetchWarehouseByCompliance(params: string): Promise<any>;
|
|
42
|
+
fetchEquipmentTree(params: string): Promise<any>;
|
|
42
43
|
}
|
|
43
44
|
export default function useMetricsService(): MetricsService;
|
|
44
45
|
export {};
|
|
@@ -75,4 +75,25 @@ export type Api_Metrics_Performance_User = {
|
|
|
75
75
|
export type Api_Metrics_Task_Project = {
|
|
76
76
|
id: string;
|
|
77
77
|
name: string;
|
|
78
|
+
period_start: string;
|
|
79
|
+
period_end: string;
|
|
80
|
+
};
|
|
81
|
+
export type Api_Metrics_Task = {
|
|
82
|
+
id: string;
|
|
83
|
+
name: string;
|
|
84
|
+
expired: boolean;
|
|
85
|
+
has_subtasks: boolean;
|
|
86
|
+
is_critical_path: boolean;
|
|
87
|
+
state_id: string | null;
|
|
88
|
+
time_of_delay: number | null;
|
|
89
|
+
video_source_id: string | null;
|
|
90
|
+
deleted_at?: string | null;
|
|
91
|
+
};
|
|
92
|
+
export type Api_Metrics_Task_By_Status = {
|
|
93
|
+
status: {
|
|
94
|
+
id: string | null;
|
|
95
|
+
name: string;
|
|
96
|
+
title: string;
|
|
97
|
+
};
|
|
98
|
+
tasks: Api_Metrics_Task[];
|
|
78
99
|
};
|
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
Api_Metrics_Personnel_Plan,
|
|
7
7
|
Api_Metrics_Personnel_Plan_Project,
|
|
8
8
|
Api_Metrics_Personnel_Plan_Project_Body,
|
|
9
|
+
Api_Metrics_Task_By_Status,
|
|
9
10
|
Api_Metrics_Task_Project,
|
|
10
11
|
Api_Metrics_Unused_Personnel,
|
|
11
12
|
} from '@/api/types/Api_Metrics'
|
|
@@ -122,8 +123,8 @@ class MetricsService extends ApiService {
|
|
|
122
123
|
return await this.get('repairs/metrics/get_list_task_group_by_status' + '?' + queryString)
|
|
123
124
|
}
|
|
124
125
|
|
|
125
|
-
public async fetchPieAllTasksInfo(
|
|
126
|
-
return await this.get('repairs/metrics/get_list_task_by_status'
|
|
126
|
+
public async fetchPieAllTasksInfo(params: any): Promise<Api_Metrics_Task_By_Status> {
|
|
127
|
+
return await this.get('repairs/metrics/get_list_task_by_status', { params })
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
public fetchPersonnelPlan(params: any): Promise<Api_Metrics_Personnel_Plan> {
|
|
@@ -150,6 +151,9 @@ class MetricsService extends ApiService {
|
|
|
150
151
|
public async fetchWarehouseByCompliance(params: string): Promise<any> {
|
|
151
152
|
return await this.get(`repairs/metrics/get_warehouse_by_compliance?${params}`)
|
|
152
153
|
}
|
|
154
|
+
public async fetchEquipmentTree(params: string): Promise<any> {
|
|
155
|
+
return await this.get(`repairs/equipments/get_equipment_tree_repaired_not_repaired?${params}`)
|
|
156
|
+
}
|
|
153
157
|
}
|
|
154
158
|
|
|
155
159
|
let api: MetricsService
|
|
@@ -86,4 +86,27 @@ export type Api_Metrics_Performance_User = {
|
|
|
86
86
|
export type Api_Metrics_Task_Project = {
|
|
87
87
|
id: string
|
|
88
88
|
name: string
|
|
89
|
+
period_start: string
|
|
90
|
+
period_end: string
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type Api_Metrics_Task = {
|
|
94
|
+
id: string
|
|
95
|
+
name: string
|
|
96
|
+
expired: boolean
|
|
97
|
+
has_subtasks: boolean
|
|
98
|
+
is_critical_path: boolean
|
|
99
|
+
state_id: string | null
|
|
100
|
+
time_of_delay: number | null
|
|
101
|
+
video_source_id: string | null
|
|
102
|
+
deleted_at?: string | null
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type Api_Metrics_Task_By_Status = {
|
|
106
|
+
status: {
|
|
107
|
+
id: string | null
|
|
108
|
+
name: string
|
|
109
|
+
title: string
|
|
110
|
+
}
|
|
111
|
+
tasks: Api_Metrics_Task[]
|
|
89
112
|
}
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
:label="label"
|
|
8
8
|
:required="required"
|
|
9
9
|
:rules="rules"
|
|
10
|
-
:error="error"
|
|
10
|
+
:error="isError || error"
|
|
11
11
|
:disable="disabled"
|
|
12
|
+
:hide-bottom-space="hideBottomSpace"
|
|
12
13
|
placeholder="Выберите дату"
|
|
13
14
|
>
|
|
14
15
|
<q-popup-proxy v-if="!disabled" class="datepicker__wrapper" @update:model-value="updateError">
|
|
@@ -49,6 +50,8 @@ interface Props {
|
|
|
49
50
|
disabled?: boolean
|
|
50
51
|
required?: boolean
|
|
51
52
|
timeFormat?: string
|
|
53
|
+
hideBottomSpace?: boolean
|
|
54
|
+
isError?: boolean
|
|
52
55
|
}
|
|
53
56
|
const props = withDefaults(defineProps<Props>(), {
|
|
54
57
|
label: '',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="app-input-new">
|
|
2
|
+
<div class="app-input-new" :class="{ hideBottomSpace }">
|
|
3
3
|
<label v-if="label" class="app-input-new__label">
|
|
4
4
|
{{ label }}
|
|
5
5
|
<span v-if="required" class="required">*</span>
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
:loading="loading"
|
|
21
21
|
:maxlength="maxlength"
|
|
22
22
|
:counter="counter"
|
|
23
|
+
:hide-bottom-space="hideBottomSpace"
|
|
23
24
|
@blur="emit('blur')"
|
|
24
25
|
>
|
|
25
26
|
<slot />
|
|
@@ -123,6 +124,10 @@ const copyToClipboard = () => {
|
|
|
123
124
|
flex-direction: column;
|
|
124
125
|
margin-bottom: 15px;
|
|
125
126
|
|
|
127
|
+
&.hideBottomSpace {
|
|
128
|
+
margin-bottom: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
126
131
|
&__label {
|
|
127
132
|
font-size: 14px;
|
|
128
133
|
font-weight: 700;
|
|
@@ -22,7 +22,13 @@
|
|
|
22
22
|
autocomplete=""
|
|
23
23
|
@filter="filterFn"
|
|
24
24
|
>
|
|
25
|
-
<template v-if="multiple" #selected
|
|
25
|
+
<template v-if="multiple && hideChips" #selected>
|
|
26
|
+
<div v-if="Array.isArray(selected) && selected.length" class="q-field__input">
|
|
27
|
+
<span class="selected-counter">Выбрано: {{ selected.length }} </span>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<template v-else-if="multiple" #selected-item="scope">
|
|
26
32
|
<q-chip
|
|
27
33
|
v-if="scope.opt"
|
|
28
34
|
removable
|
|
@@ -63,6 +69,7 @@ interface AppQSelectProps {
|
|
|
63
69
|
clearable?: boolean
|
|
64
70
|
search?: boolean
|
|
65
71
|
dataTest?: string
|
|
72
|
+
hideChips?: boolean
|
|
66
73
|
}
|
|
67
74
|
|
|
68
75
|
const props = defineProps<AppQSelectProps>()
|
|
@@ -78,8 +85,9 @@ const selected = computed({
|
|
|
78
85
|
})
|
|
79
86
|
|
|
80
87
|
const type = () => {
|
|
81
|
-
if (Array.isArray(selected.value)
|
|
82
|
-
|
|
88
|
+
if (Array.isArray(selected.value) || props.multiple) return !selected.value?.length
|
|
89
|
+
|
|
90
|
+
return !selected.value
|
|
83
91
|
}
|
|
84
92
|
|
|
85
93
|
const lcText: Ref<string> = ref('')
|