shared-ritm 1.1.30 → 1.1.32
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 +38351 -19381
- package/dist/shared-ritm.umd.js +67 -57
- package/package.json +1 -1
- package/src/api/services/FileService.ts +2 -2
- package/src/api/services/RepairsService.ts +94 -94
- package/src/common/app-sheet/AppSheet.vue +114 -114
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@ import ApiService, { ResponseApi } from '@/api/settings/ApiService'
|
|
|
2
2
|
import { Api_Files_Responsible_Dto } from '@/api/types/Api_Files'
|
|
3
3
|
|
|
4
4
|
class FileService extends ApiService {
|
|
5
|
-
public
|
|
6
|
-
return
|
|
5
|
+
public uploadFile(data: FormData): Promise<ResponseApi<Api_Files_Responsible_Dto>> {
|
|
6
|
+
return this.post<FormData, any>(`/upload-file`, data, { headers: { 'Content-Type': 'multipart/form-data' } })
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -1,94 +1,94 @@
|
|
|
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<null, void>(`/repairs/${id}/finish`, null)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
public finishPreparationProject(id: string) {
|
|
47
|
-
return this.post<null, void>(`/repairs/${id}/finish_preparation`, null)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
public moveRepairToCurrent(id: string) {
|
|
51
|
-
return this.post<any, void>(`/repairs/transfer_repair_plan_to_current`, {
|
|
52
|
-
repairs: [id],
|
|
53
|
-
})
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
public moveArchiveToCurrent(id: string) {
|
|
57
|
-
return this.post<any, void>(`/repairs/transfer_repair_archive_to_current`, {
|
|
58
|
-
repairs_ids: [id],
|
|
59
|
-
})
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
public moveRepairToApr(id: string) {
|
|
63
|
-
return this.post<any, void>(`/repairs/transfer_repair_current_to_plan`, {
|
|
64
|
-
repairs: [id],
|
|
65
|
-
})
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
public moveRepairToArchive(id: string) {
|
|
69
|
-
return this.post<any, void>(`/repairs/transfer_repair_current_to_archive`, {
|
|
70
|
-
repairs_ids: [id],
|
|
71
|
-
})
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
public restoreRepair(id: string) {
|
|
75
|
-
return this.post<any, void>(`/restore_repair`, {
|
|
76
|
-
repairs_ids: [id],
|
|
77
|
-
})
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
public updateRepair(payload: Api_Update_Repair, id: string) {
|
|
81
|
-
return this.put<Api_Update_Repair, void>(`/repairs/${id}`, payload)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
public deleteRepair(id: string) {
|
|
85
|
-
return this.delete<any>(`/repairs/${id}`)
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
let api: RepairsService
|
|
90
|
-
|
|
91
|
-
export default function useRepairsService() {
|
|
92
|
-
if (!api) api = new RepairsService()
|
|
93
|
-
return api
|
|
94
|
-
}
|
|
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<null, void>(`/repairs/${id}/finish`, null)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public finishPreparationProject(id: string) {
|
|
47
|
+
return this.post<null, void>(`/repairs/${id}/finish_preparation`, null)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public moveRepairToCurrent(id: string) {
|
|
51
|
+
return this.post<any, void>(`/repairs/transfer_repair_plan_to_current`, {
|
|
52
|
+
repairs: [id],
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public moveArchiveToCurrent(id: string) {
|
|
57
|
+
return this.post<any, void>(`/repairs/transfer_repair_archive_to_current`, {
|
|
58
|
+
repairs_ids: [id],
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
public moveRepairToApr(id: string) {
|
|
63
|
+
return this.post<any, void>(`/repairs/transfer_repair_current_to_plan`, {
|
|
64
|
+
repairs: [id],
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public moveRepairToArchive(id: string) {
|
|
69
|
+
return this.post<any, void>(`/repairs/transfer_repair_current_to_archive`, {
|
|
70
|
+
repairs_ids: [id],
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
public restoreRepair(id: string) {
|
|
75
|
+
return this.post<any, void>(`/restore_repair`, {
|
|
76
|
+
repairs_ids: [id],
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
public updateRepair(payload: Api_Update_Repair, id: string) {
|
|
81
|
+
return this.put<Api_Update_Repair, void>(`/repairs/${id}`, payload)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
public deleteRepair(id: string) {
|
|
85
|
+
return this.delete<any>(`/repairs/${id}`)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
let api: RepairsService
|
|
90
|
+
|
|
91
|
+
export default function useRepairsService() {
|
|
92
|
+
if (!api) api = new RepairsService()
|
|
93
|
+
return api
|
|
94
|
+
}
|
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-dialog
|
|
3
|
-
ref="DialogRef"
|
|
4
|
-
:model-value="true"
|
|
5
|
-
:position="'right'"
|
|
6
|
-
:class="$style['sheet-dialog']"
|
|
7
|
-
full-height
|
|
8
|
-
full-width
|
|
9
|
-
>
|
|
10
|
-
<template v-if="type === 'details'">
|
|
11
|
-
<q-card>
|
|
12
|
-
<div class="wrapper">
|
|
13
|
-
<div class="sheet-header">
|
|
14
|
-
<h2>{{ title }}</h2>
|
|
15
|
-
<div class="close-button">
|
|
16
|
-
<q-btn v-close-popup dense flat icon="close" />
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
<div v-if="loading" class="loader">
|
|
20
|
-
<q-spinner-audio v-if="loading" class="loader-spinner" size="md" :thickness="3" color="primary" />
|
|
21
|
-
</div>
|
|
22
|
-
<slot v-else />
|
|
23
|
-
</div>
|
|
24
|
-
</q-card>
|
|
25
|
-
</template>
|
|
26
|
-
<template v-if="type === 'custom'">
|
|
27
|
-
<div v-if="loading" class="custom-wrapper">
|
|
28
|
-
<div class="loader">
|
|
29
|
-
<q-spinner-audio v-if="loading" class="loader-spinner" size="md" :thickness="3" color="primary" />
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
<slot v-else />
|
|
33
|
-
</template>
|
|
34
|
-
</q-dialog>
|
|
35
|
-
</template>
|
|
36
|
-
|
|
37
|
-
<script setup lang="ts">
|
|
38
|
-
import { computed, defineEmits, defineProps, withDefaults } from 'vue'
|
|
39
|
-
|
|
40
|
-
interface DialogProps {
|
|
41
|
-
dialogRef: any
|
|
42
|
-
loading?: boolean
|
|
43
|
-
title?: string
|
|
44
|
-
width?: string
|
|
45
|
-
type?: 'details' | 'custom'
|
|
46
|
-
tabs?: any[]
|
|
47
|
-
currentTabName?: string
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const props = withDefaults(defineProps<DialogProps>(), {
|
|
51
|
-
title: '',
|
|
52
|
-
width: '976px',
|
|
53
|
-
type: 'details',
|
|
54
|
-
loading: false,
|
|
55
|
-
tabs: () => [],
|
|
56
|
-
currentTabName: '',
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
const emit = defineEmits(['update:dialogRef', 'update:currentTabName'])
|
|
60
|
-
|
|
61
|
-
const DialogRef = computed({
|
|
62
|
-
get() {
|
|
63
|
-
return props.dialogRef
|
|
64
|
-
},
|
|
65
|
-
set(value) {
|
|
66
|
-
emit('update:dialogRef', value)
|
|
67
|
-
},
|
|
68
|
-
})
|
|
69
|
-
</script>
|
|
70
|
-
|
|
71
|
-
<style lang="scss" scoped>
|
|
72
|
-
.custom-wrapper {
|
|
73
|
-
width: v-bind(width);
|
|
74
|
-
background-color: white;
|
|
75
|
-
}
|
|
76
|
-
.wrapper {
|
|
77
|
-
display: flex;
|
|
78
|
-
flex-direction: column;
|
|
79
|
-
gap: 1rem;
|
|
80
|
-
width: v-bind(width);
|
|
81
|
-
height: 100vh;
|
|
82
|
-
min-height: 100vh;
|
|
83
|
-
position: relative;
|
|
84
|
-
padding: 2rem 2rem 4rem 2rem;
|
|
85
|
-
background-color: #7991ad32;
|
|
86
|
-
font-family: 'NunitoSansFont', sans-serif;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.sheet-header {
|
|
90
|
-
display: flex;
|
|
91
|
-
justify-content: space-between;
|
|
92
|
-
align-items: center;
|
|
93
|
-
h2 {
|
|
94
|
-
font-size: 36px;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
.loader {
|
|
98
|
-
min-width: 976px;
|
|
99
|
-
&-spinner {
|
|
100
|
-
position: absolute;
|
|
101
|
-
top: 50%;
|
|
102
|
-
left: 50%;
|
|
103
|
-
z-index: 4;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
</style>
|
|
107
|
-
|
|
108
|
-
<style lang="scss" module>
|
|
109
|
-
.sheet-dialog {
|
|
110
|
-
:global(.q-dialog__inner--minimized) {
|
|
111
|
-
padding: 0;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-dialog
|
|
3
|
+
ref="DialogRef"
|
|
4
|
+
:model-value="true"
|
|
5
|
+
:position="'right'"
|
|
6
|
+
:class="$style['sheet-dialog']"
|
|
7
|
+
full-height
|
|
8
|
+
full-width
|
|
9
|
+
>
|
|
10
|
+
<template v-if="type === 'details'">
|
|
11
|
+
<q-card>
|
|
12
|
+
<div class="wrapper">
|
|
13
|
+
<div class="sheet-header">
|
|
14
|
+
<h2>{{ title }}</h2>
|
|
15
|
+
<div class="close-button">
|
|
16
|
+
<q-btn v-close-popup dense flat icon="close" />
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div v-if="loading" class="loader">
|
|
20
|
+
<q-spinner-audio v-if="loading" class="loader-spinner" size="md" :thickness="3" color="primary" />
|
|
21
|
+
</div>
|
|
22
|
+
<slot v-else />
|
|
23
|
+
</div>
|
|
24
|
+
</q-card>
|
|
25
|
+
</template>
|
|
26
|
+
<template v-if="type === 'custom'">
|
|
27
|
+
<div v-if="loading" class="custom-wrapper">
|
|
28
|
+
<div class="loader">
|
|
29
|
+
<q-spinner-audio v-if="loading" class="loader-spinner" size="md" :thickness="3" color="primary" />
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<slot v-else />
|
|
33
|
+
</template>
|
|
34
|
+
</q-dialog>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script setup lang="ts">
|
|
38
|
+
import { computed, defineEmits, defineProps, withDefaults } from 'vue'
|
|
39
|
+
|
|
40
|
+
interface DialogProps {
|
|
41
|
+
dialogRef: any
|
|
42
|
+
loading?: boolean
|
|
43
|
+
title?: string
|
|
44
|
+
width?: string
|
|
45
|
+
type?: 'details' | 'custom'
|
|
46
|
+
tabs?: any[]
|
|
47
|
+
currentTabName?: string
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const props = withDefaults(defineProps<DialogProps>(), {
|
|
51
|
+
title: '',
|
|
52
|
+
width: '976px',
|
|
53
|
+
type: 'details',
|
|
54
|
+
loading: false,
|
|
55
|
+
tabs: () => [],
|
|
56
|
+
currentTabName: '',
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
const emit = defineEmits(['update:dialogRef', 'update:currentTabName'])
|
|
60
|
+
|
|
61
|
+
const DialogRef = computed({
|
|
62
|
+
get() {
|
|
63
|
+
return props.dialogRef
|
|
64
|
+
},
|
|
65
|
+
set(value) {
|
|
66
|
+
emit('update:dialogRef', value)
|
|
67
|
+
},
|
|
68
|
+
})
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<style lang="scss" scoped>
|
|
72
|
+
.custom-wrapper {
|
|
73
|
+
width: v-bind(width);
|
|
74
|
+
background-color: white;
|
|
75
|
+
}
|
|
76
|
+
.wrapper {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
gap: 1rem;
|
|
80
|
+
width: v-bind(width);
|
|
81
|
+
height: 100vh;
|
|
82
|
+
min-height: 100vh;
|
|
83
|
+
position: relative;
|
|
84
|
+
padding: 2rem 2rem 4rem 2rem;
|
|
85
|
+
background-color: #7991ad32;
|
|
86
|
+
font-family: 'NunitoSansFont', sans-serif;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.sheet-header {
|
|
90
|
+
display: flex;
|
|
91
|
+
justify-content: space-between;
|
|
92
|
+
align-items: center;
|
|
93
|
+
h2 {
|
|
94
|
+
font-size: 36px;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
.loader {
|
|
98
|
+
min-width: 976px;
|
|
99
|
+
&-spinner {
|
|
100
|
+
position: absolute;
|
|
101
|
+
top: 50%;
|
|
102
|
+
left: 50%;
|
|
103
|
+
z-index: 4;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
107
|
+
|
|
108
|
+
<style lang="scss" module>
|
|
109
|
+
.sheet-dialog {
|
|
110
|
+
:global(.q-dialog__inner--minimized) {
|
|
111
|
+
padding: 0;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
</style>
|