shared-ritm 1.1.48 → 1.1.50
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/shared-ritm.es.js +48692 -39207
- package/dist/shared-ritm.umd.js +77 -72
- package/package.json +1 -1
- package/src/App.vue +2441 -2439
- package/src/api/services/TasksService.ts +48 -48
- package/src/common/app-dropdown/AppDropdown.vue +29 -0
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import ApiService, { ResponseApi } from '@/api/settings/ApiService'
|
|
2
|
-
import { Api_Tasks_Dto, Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks'
|
|
3
|
-
import { Api_Equipment_Full_Dto } from '@/api/types/Api_Repairs'
|
|
4
|
-
|
|
5
|
-
class TasksService extends ApiService {
|
|
6
|
-
public async fetchTaskById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>> {
|
|
7
|
-
return await this.get(`/tasks/${id}`)
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
public async fetchTasksList(params: any): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
11
|
-
return await this.get('/list/tasks/search', { params })
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public async fetchSubtasksList(id: string): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
15
|
-
return await this.get(`/task/${id}/subtasks/list`)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public async fetchTaskBranch(id: string): Promise<ResponseApi<any>> {
|
|
19
|
-
return await this.get(`/get_list_task_branch?task_id=${id}`)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
public async fetchInstrumentsList(params: any): Promise<ResponseApi<any[]>> {
|
|
23
|
-
return await this.get(`admin/instruments`, { params })
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
|
|
27
|
-
return this.get('repairs/equipment/list', { params })
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
public async createTask(payload: any): Promise<ResponseApi<any>> {
|
|
31
|
-
return await this.post(`tasks`, payload)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
public async mergeTask(payload: { name: string; tasks_id: string[] }): Promise<ResponseApi<any>> {
|
|
35
|
-
return await this.post(`tasks/merge`, payload)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
public async deleteTask(id: string): Promise<any> {
|
|
39
|
-
return await this.delete(`tasks/${id}`)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
let api: TasksService
|
|
44
|
-
|
|
45
|
-
export default function useTasksService() {
|
|
46
|
-
if (!api) api = new TasksService()
|
|
47
|
-
return api
|
|
48
|
-
}
|
|
1
|
+
import ApiService, { ResponseApi } from '@/api/settings/ApiService'
|
|
2
|
+
import { Api_Tasks_Dto, Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks'
|
|
3
|
+
import { Api_Equipment_Full_Dto } from '@/api/types/Api_Repairs'
|
|
4
|
+
|
|
5
|
+
class TasksService extends ApiService {
|
|
6
|
+
public async fetchTaskById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>> {
|
|
7
|
+
return await this.get(`/tasks/${id}`)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public async fetchTasksList(params: any): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
11
|
+
return await this.get('/list/tasks/search', { params })
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public async fetchSubtasksList(id: string): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
15
|
+
return await this.get(`/task/${id}/subtasks/list`)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public async fetchTaskBranch(id: string): Promise<ResponseApi<any>> {
|
|
19
|
+
return await this.get(`/get_list_task_branch?task_id=${id}`)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
public async fetchInstrumentsList(params: any): Promise<ResponseApi<any[]>> {
|
|
23
|
+
return await this.get(`admin/instruments`, { params })
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
|
|
27
|
+
return this.get('repairs/equipment/list', { params })
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public async createTask(payload: any): Promise<ResponseApi<any>> {
|
|
31
|
+
return await this.post(`tasks`, payload)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public async mergeTask(payload: { name: string; tasks_id: string[] }): Promise<ResponseApi<any>> {
|
|
35
|
+
return await this.post(`tasks/merge`, payload)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public async deleteTask(id: string): Promise<any> {
|
|
39
|
+
return await this.delete(`tasks/${id}`)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let api: TasksService
|
|
44
|
+
|
|
45
|
+
export default function useTasksService() {
|
|
46
|
+
if (!api) api = new TasksService()
|
|
47
|
+
return api
|
|
48
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-btn-dropdown :color="color" :content-style="{ width: '200px', minWidth: '200px' }">
|
|
3
|
+
<template #label>
|
|
4
|
+
<slot name="label">
|
|
5
|
+
{{ label }}
|
|
6
|
+
</slot>
|
|
7
|
+
</template>
|
|
8
|
+
<template #default>
|
|
9
|
+
<slot name="content" />
|
|
10
|
+
</template>
|
|
11
|
+
</q-btn-dropdown>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
interface Props {
|
|
16
|
+
label?: string
|
|
17
|
+
color?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const props = defineProps<Props>()
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<style scoped lang="scss">
|
|
24
|
+
.q-btn {
|
|
25
|
+
&:before {
|
|
26
|
+
box-shadow: none;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
</style>
|