shared-ritm 1.1.4 → 1.1.5
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/package.json +9 -10
- package/src/App.vue +0 -2411
- package/src/api/services/AuthService.ts +0 -41
- package/src/api/services/GanttService.ts +0 -17
- package/src/api/services/MetricsService.ts +0 -101
- package/src/api/services/ProjectsService.ts +0 -57
- package/src/api/services/RepairsService.ts +0 -82
- package/src/api/services/TasksService.ts +0 -27
- package/src/api/settings/ApiService.ts +0 -124
- package/src/api/types/Api_Metrics.ts +0 -0
- package/src/api/types/Api_Projects.ts +0 -33
- package/src/api/types/Api_Repairs.ts +0 -57
- package/src/api/types/Api_Tasks.ts +0 -124
- package/src/common/app-button/AppButton.vue +0 -173
- package/src/common/app-checkbox/AppCheckbox.vue +0 -26
- package/src/common/app-date-picker/AppDatePicker.vue +0 -66
- package/src/common/app-icon/AppIcon.vue +0 -104
- package/src/common/app-input/AppInput.vue +0 -147
- package/src/common/app-input-search/AppInputSearch.vue +0 -170
- package/src/common/app-layout/AppLayout.vue +0 -62
- package/src/common/app-layout/components/AppLayoutHeader.vue +0 -124
- package/src/common/app-loader/index.vue +0 -43
- package/src/common/app-page-layout/AppPageLayout.vue +0 -122
- package/src/common/app-select/AppSelect.vue +0 -157
- package/src/common/app-sheet/AppSheet.vue +0 -114
- package/src/common/app-sidebar/AppSidebar.vue +0 -167
- package/src/common/app-sidebar/components/SidebarMenu.vue +0 -29
- package/src/common/app-sidebar/components/SidebarMenuItem.vue +0 -137
- package/src/common/app-toggle/AppToggle.vue +0 -23
- package/src/common/app-wrapper/AppWrapper.vue +0 -28
- package/src/global.d.ts +0 -1
- package/src/icons/components/arrow-down-icon.vue +0 -25
- package/src/icons/components/arrow-frame-icon.vue +0 -19
- package/src/icons/components/arrow-square.vue +0 -22
- package/src/icons/header/flashIcon.vue +0 -24
- package/src/icons/header/notificationIcon.vue +0 -18
- package/src/icons/header/searchStatusIcon.vue +0 -24
- package/src/icons/header/smallCapsIcon.vue +0 -34
- package/src/icons/sidebar/assign-module-icon.vue +0 -36
- package/src/icons/sidebar/instrument-history-icon.vue +0 -32
- package/src/icons/sidebar/instrument-order-icon.vue +0 -38
- package/src/icons/sidebar/instrument-work-zone-icon.vue +0 -18
- package/src/icons/sidebar/instruments-icon.vue +0 -45
- package/src/icons/sidebar/logo-icon.vue +0 -15
- package/src/icons/sidebar/logout-icon.vue +0 -13
- package/src/icons/sidebar/modules-icon.vue +0 -16
- package/src/icons/sidebar/notifications-icon.vue +0 -24
- package/src/icons/sidebar/order-icon.vue +0 -44
- package/src/icons/sidebar/pass-icon.vue +0 -38
- package/src/icons/sidebar/positions-icon.vue +0 -42
- package/src/icons/sidebar/preorder-icon.vue +0 -19
- package/src/icons/sidebar/projects-icon.vue +0 -31
- package/src/icons/sidebar/repair-object-icon.vue +0 -18
- package/src/icons/sidebar/repairs-icon.vue +0 -20
- package/src/icons/sidebar/roles-icon.vue +0 -26
- package/src/icons/sidebar/status-history-icon.vue +0 -24
- package/src/icons/sidebar/tasks-icon.vue +0 -28
- package/src/icons/sidebar/tasks_tasks-icon.vue +0 -39
- package/src/icons/sidebar/tasks_today-icon.vue +0 -27
- package/src/icons/sidebar/teams-icon.vue +0 -32
- package/src/icons/sidebar/user-icon.vue +0 -18
- package/src/icons/sidebar/users-icon.vue +0 -46
- package/src/icons/sidebar/videosources-icon.vue +0 -19
- package/src/icons/sidebar/videowall-icon.vue +0 -13
- package/src/icons/sidebar/videozones-icon.vue +0 -21
- package/src/icons/sidebar/warehouses-icon.vue +0 -43
- package/src/icons/sidebar/workshop-icon.vue +0 -100
- package/src/icons/sidebar/workzones-icon.vue +0 -22
- package/src/index.ts +0 -57
- package/src/main.ts +0 -15
- package/src/quasar-user-options.ts +0 -17
- package/src/shared/fonts/Montserrat-Bold.ttf +0 -0
- package/src/shared/fonts/Montserrat.ttf +0 -0
- package/src/shared/fonts/NunitoSansFont.ttf +0 -0
- package/src/shared/fonts/NunitoSans_7pt-Bold.ttf +0 -0
- package/src/shared/styles/general.css +0 -96
- package/src/shims-vue.d.ts +0 -5
- package/src/styles/variables.sass +0 -12
- package/src/utils/notification.ts +0 -13
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-layout :class="$style.layout" view="lHh LpR fFf">
|
|
3
|
-
<!-- <div v-if="logged" :class="$style['loader-backdrop']">-->
|
|
4
|
-
<!-- <q-spinner size="md" color="white" :class="$style['loader-spinner']" />-->
|
|
5
|
-
<!-- </div>-->
|
|
6
|
-
<app-loader :loading="logged" size="md" :thickness="3" :backdrop="true" />
|
|
7
|
-
<slot name="drawer"></slot>
|
|
8
|
-
<slot name="header"></slot>
|
|
9
|
-
<q-page-container :class="{ container: container }" @wheel="mouseMove">
|
|
10
|
-
<q-page>
|
|
11
|
-
<slot></slot>
|
|
12
|
-
|
|
13
|
-
<slot name="page-bottom"></slot>
|
|
14
|
-
</q-page>
|
|
15
|
-
</q-page-container>
|
|
16
|
-
|
|
17
|
-
<slot name="footer"></slot>
|
|
18
|
-
</q-layout>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script lang="ts" setup>
|
|
22
|
-
import { defineProps } from 'vue'
|
|
23
|
-
import AppLoader from '@/common/app-loader/index.vue'
|
|
24
|
-
interface LayoutProps {
|
|
25
|
-
logged: boolean
|
|
26
|
-
console?: boolean
|
|
27
|
-
container?: boolean
|
|
28
|
-
padding?: string
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const props = defineProps<LayoutProps>()
|
|
32
|
-
|
|
33
|
-
function mouseMove(e: any) {
|
|
34
|
-
const content = document.getElementById('content')
|
|
35
|
-
const scrollable = e.target
|
|
36
|
-
if (content && !scrollable.closest('#content')) {
|
|
37
|
-
content.scrollBy({ top: e.deltaY })
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
<style lang="scss" module>
|
|
43
|
-
.layout {
|
|
44
|
-
position: relative;
|
|
45
|
-
background: linear-gradient(235deg, #87caff 9.16%, #5386d3 45.8%, #0b3f8e 92.27%);
|
|
46
|
-
}
|
|
47
|
-
//.loader {
|
|
48
|
-
// &-backdrop {
|
|
49
|
-
// width: 100%;
|
|
50
|
-
// height: 100%;
|
|
51
|
-
// background-color: rgba(255, 255, 255, 0.45);
|
|
52
|
-
// position: absolute;
|
|
53
|
-
// z-index: 9999;
|
|
54
|
-
// }
|
|
55
|
-
// &-spinner {
|
|
56
|
-
// position: absolute;
|
|
57
|
-
// top: 50%;
|
|
58
|
-
// left: 50%;
|
|
59
|
-
// z-index: 2;
|
|
60
|
-
// }
|
|
61
|
-
//}
|
|
62
|
-
</style>
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-header :class="[$style.header, { [$style[`header-full`]]: fullWidth }]">
|
|
3
|
-
<q-toolbar :class="$style.toolbar">
|
|
4
|
-
<!-- <app-input-search v-model.trim="text" type="text" label="Поиск по системе" :class="$style['header-search']" />-->
|
|
5
|
-
<div :class="$style['action-buttons']">
|
|
6
|
-
<slot name="filters-actions"></slot>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<div :class="$style['action-buttons']">
|
|
10
|
-
<slot name="action-buttons"></slot>
|
|
11
|
-
|
|
12
|
-
<app-button icon="person" text-color="black" :label="shortName" rounded :class="$style['button-person']" />
|
|
13
|
-
<!-- <app-button :class="$style.button" rounded>-->
|
|
14
|
-
<!-- <small-caps-icon />-->
|
|
15
|
-
<!-- </app-button>-->
|
|
16
|
-
<!-- <app-button :class="$style.button" rounded>-->
|
|
17
|
-
<!-- <search-status-icon />-->
|
|
18
|
-
<!-- </app-button>-->
|
|
19
|
-
<!-- <app-button @click="counter++" :class="$style.button" rounded :badge="`+${counter}`" badge-color="#3F8CFF">-->
|
|
20
|
-
<!-- <flash-icon />-->
|
|
21
|
-
<!-- </app-button>-->
|
|
22
|
-
<!-- <app-button :class="$style.button" rounded>-->
|
|
23
|
-
<!-- <notification-icon />-->
|
|
24
|
-
<!-- </app-button>-->
|
|
25
|
-
</div>
|
|
26
|
-
</q-toolbar>
|
|
27
|
-
</q-header>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script lang="ts" setup>
|
|
31
|
-
import { computed, defineProps } from 'vue'
|
|
32
|
-
//import AppInput from '@/common/app-input-search/AppInputSearch.vue'
|
|
33
|
-
import AppButton from '@/common/app-button/AppButton.vue'
|
|
34
|
-
import { b } from 'vite/dist/node/types.d-aGj9QkWt'
|
|
35
|
-
|
|
36
|
-
//import SmallCapsIcon from '@/icons/header/smallCapsIcon.vue'
|
|
37
|
-
//import SearchStatusIcon from '@/icons/header/searchStatusIcon.vue'
|
|
38
|
-
//import FlashIcon from '@/icons/header/flashIcon.vue'
|
|
39
|
-
//import NotificationIcon from '@/icons/header/notificationIcon.vue'
|
|
40
|
-
interface Props {
|
|
41
|
-
userData: any
|
|
42
|
-
fullWidth?: boolean
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const props = defineProps<Props>()
|
|
46
|
-
|
|
47
|
-
// const counter = ref(1)
|
|
48
|
-
const shortName = computed(
|
|
49
|
-
() =>
|
|
50
|
-
`${props.userData?.last_name} ${props.userData?.first_name?.[0]}. ${props.userData?.patronymic?.[0] || ''} ${
|
|
51
|
-
props.userData?.patronymic?.[0] ? '.' : ''
|
|
52
|
-
}`,
|
|
53
|
-
)
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<style lang="scss" module>
|
|
57
|
-
.header {
|
|
58
|
-
height: 100px;
|
|
59
|
-
background: transparent;
|
|
60
|
-
margin: 0 auto;
|
|
61
|
-
max-width: 1300px;
|
|
62
|
-
}
|
|
63
|
-
.header-full {
|
|
64
|
-
max-width: 100%;
|
|
65
|
-
padding: 0 20px;
|
|
66
|
-
}
|
|
67
|
-
.toolbar {
|
|
68
|
-
padding: 0;
|
|
69
|
-
min-height: 100%;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.header-search {
|
|
73
|
-
width: 412px;
|
|
74
|
-
font-size: 16px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.action-buttons {
|
|
78
|
-
flex: 1;
|
|
79
|
-
position: relative;
|
|
80
|
-
display: flex;
|
|
81
|
-
align-items: center;
|
|
82
|
-
column-gap: 16px;
|
|
83
|
-
justify-content: end;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.button {
|
|
87
|
-
padding: 12px;
|
|
88
|
-
background: white;
|
|
89
|
-
transition: all 0.3s ease, color 0.3s ease;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.button-person {
|
|
93
|
-
padding: 10px 14px;
|
|
94
|
-
background: white;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
@media (max-width: 1440px) {
|
|
98
|
-
.header {
|
|
99
|
-
height: 100px;
|
|
100
|
-
background: transparent;
|
|
101
|
-
margin: 0 auto;
|
|
102
|
-
max-width: 874px;
|
|
103
|
-
}
|
|
104
|
-
.header-search {
|
|
105
|
-
width: 343px;
|
|
106
|
-
font-size: 16px;
|
|
107
|
-
}
|
|
108
|
-
.action-buttons {
|
|
109
|
-
position: relative;
|
|
110
|
-
display: flex;
|
|
111
|
-
align-items: center;
|
|
112
|
-
column-gap: 8px;
|
|
113
|
-
}
|
|
114
|
-
.button {
|
|
115
|
-
padding: 10px;
|
|
116
|
-
background: white;
|
|
117
|
-
transition: all 0.3s ease, color 0.3s ease;
|
|
118
|
-
}
|
|
119
|
-
.button-person {
|
|
120
|
-
padding: 8px 10px;
|
|
121
|
-
background: white;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
</style>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="{ 'loader-backdrop': backdrop && loading }">
|
|
3
|
-
<q-spinner v-if="loading" :size="size" class="loader-spinner" :thickness="thickness" />
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script setup lang="ts">
|
|
8
|
-
interface Props {
|
|
9
|
-
backdrop: boolean
|
|
10
|
-
loading: boolean
|
|
11
|
-
thickness: number
|
|
12
|
-
size: string
|
|
13
|
-
}
|
|
14
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
15
|
-
backdrop: false,
|
|
16
|
-
loading: false,
|
|
17
|
-
thickness: 2,
|
|
18
|
-
size: 'md',
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
// <app-loader :loading="logged" :backdrop="true" />
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<style scoped lang="scss">
|
|
25
|
-
.loader {
|
|
26
|
-
&-backdrop {
|
|
27
|
-
top: 0;
|
|
28
|
-
bottom: 0;
|
|
29
|
-
left: 0;
|
|
30
|
-
right: 0;
|
|
31
|
-
background-color: rgba(255, 255, 255, 0.45);
|
|
32
|
-
position: absolute;
|
|
33
|
-
z-index: 9999;
|
|
34
|
-
}
|
|
35
|
-
&-spinner {
|
|
36
|
-
position: absolute;
|
|
37
|
-
color: #3f8cff;
|
|
38
|
-
top: 44%;
|
|
39
|
-
left: 48%;
|
|
40
|
-
z-index: 9999;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
</style>
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
<template lang="pug">
|
|
2
|
-
q-page#content(:class="$style['page-container']")
|
|
3
|
-
q-toolbar(:class="$style['toolbar']")
|
|
4
|
-
q-toolbar-title(:class="$style.title") {{ title }}
|
|
5
|
-
div(:class="$style['action-buttons']")
|
|
6
|
-
app-button(
|
|
7
|
-
rounded
|
|
8
|
-
:class="$style['button-new']"
|
|
9
|
-
:label="'Новый ремонт'"
|
|
10
|
-
@click="emits('create-repair')"
|
|
11
|
-
color="#fff"
|
|
12
|
-
icon="add"
|
|
13
|
-
)
|
|
14
|
-
app-button(rounded :class="$style['button-video-wall']" @click="emits('routing-to-video-wall')")
|
|
15
|
-
video-wall-icon
|
|
16
|
-
span Видеостена
|
|
17
|
-
app-button(rounded :class="$style.button" @click="openFullScreenWidgets")
|
|
18
|
-
q-tooltip на весь экран
|
|
19
|
-
q-icon(name="open_in_full")
|
|
20
|
-
//app-button(rounded :class="$style.button")
|
|
21
|
-
// graph-icon
|
|
22
|
-
//app-button(rounded :class="$style.button")
|
|
23
|
-
// time-line-icon
|
|
24
|
-
slot
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<script setup lang="ts">
|
|
28
|
-
import { defineProps, defineEmits, defineAsyncComponent } from 'vue'
|
|
29
|
-
import AppButton from '@/common/app-button/AppButton.vue'
|
|
30
|
-
import { useQuasar } from 'quasar'
|
|
31
|
-
import VideoWallIcon from '@/icons/page-header/videoWallIcon.vue'
|
|
32
|
-
|
|
33
|
-
const $q = useQuasar()
|
|
34
|
-
|
|
35
|
-
const FullScreenDialog = defineAsyncComponent(() => import('@/components/dialogs/full-screen-widgets/index.vue'))
|
|
36
|
-
// import GraphIcon from '@/icons/page-header/graphIcon.vue'
|
|
37
|
-
// import TimeLineIcon from '@/icons/page-header/timeLineIcon.vue'
|
|
38
|
-
interface Props {
|
|
39
|
-
title: string
|
|
40
|
-
}
|
|
41
|
-
const props = defineProps<Props>()
|
|
42
|
-
const emits = defineEmits(['create-repair', ''])
|
|
43
|
-
|
|
44
|
-
const openFullScreenWidgets = () => {
|
|
45
|
-
$q.dialog({
|
|
46
|
-
component: FullScreenDialog,
|
|
47
|
-
})
|
|
48
|
-
}
|
|
49
|
-
</script>
|
|
50
|
-
<style module lang="scss">
|
|
51
|
-
.toolbar {
|
|
52
|
-
padding: 0;
|
|
53
|
-
margin-top: 16px;
|
|
54
|
-
}
|
|
55
|
-
.page-container {
|
|
56
|
-
padding: 0 4px 0 0;
|
|
57
|
-
max-width: 1300px;
|
|
58
|
-
margin: 0 auto;
|
|
59
|
-
max-height: 600px;
|
|
60
|
-
overflow: auto;
|
|
61
|
-
&::-webkit-scrollbar-thumb {
|
|
62
|
-
height: 88px;
|
|
63
|
-
background-color: #d3dbeb;
|
|
64
|
-
border-radius: 6px;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
.button {
|
|
68
|
-
padding: 12px;
|
|
69
|
-
background: white;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.button-new {
|
|
73
|
-
padding: 12px 18px;
|
|
74
|
-
background: #3f8cff;
|
|
75
|
-
}
|
|
76
|
-
.button-video-wall {
|
|
77
|
-
padding: 10px 18px;
|
|
78
|
-
background: white;
|
|
79
|
-
span {
|
|
80
|
-
color: #3f8cff;
|
|
81
|
-
margin-left: 8px;
|
|
82
|
-
font-size: 16px;
|
|
83
|
-
font-weight: 700;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
.title {
|
|
87
|
-
color: #fff;
|
|
88
|
-
font-family: Montserrat, sans-serif;
|
|
89
|
-
font-size: 32px;
|
|
90
|
-
font-style: normal;
|
|
91
|
-
font-weight: 700;
|
|
92
|
-
line-height: normal;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.action-buttons {
|
|
96
|
-
position: relative;
|
|
97
|
-
display: flex;
|
|
98
|
-
align-items: center;
|
|
99
|
-
column-gap: 16px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
@media (max-width: 1440px) {
|
|
103
|
-
.page-container {
|
|
104
|
-
max-width: 874px;
|
|
105
|
-
}
|
|
106
|
-
.action-buttons {
|
|
107
|
-
column-gap: 8px;
|
|
108
|
-
}
|
|
109
|
-
.title {
|
|
110
|
-
font-size: 24px;
|
|
111
|
-
line-height: normal;
|
|
112
|
-
}
|
|
113
|
-
.button {
|
|
114
|
-
padding: 10px;
|
|
115
|
-
background: white;
|
|
116
|
-
}
|
|
117
|
-
.button-new {
|
|
118
|
-
padding: 10px 12px;
|
|
119
|
-
background: #3f8cff;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
</style>
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-select
|
|
3
|
-
ref="select"
|
|
4
|
-
v-model="selected"
|
|
5
|
-
:options="filteredOptions"
|
|
6
|
-
:option-value="optionValue"
|
|
7
|
-
:option-label="optionLabel"
|
|
8
|
-
emit-value
|
|
9
|
-
map-options
|
|
10
|
-
:disable="isDisabled"
|
|
11
|
-
:multiple="multiple"
|
|
12
|
-
outlined
|
|
13
|
-
stack-label
|
|
14
|
-
:use-input="search"
|
|
15
|
-
:class="[$style.select]"
|
|
16
|
-
:label="label"
|
|
17
|
-
input-debounce="100"
|
|
18
|
-
:popup-content-class="$style['app-select__menu']"
|
|
19
|
-
:clearable="clearable"
|
|
20
|
-
rounded
|
|
21
|
-
autocomplete=""
|
|
22
|
-
@filter="filterFn"
|
|
23
|
-
>
|
|
24
|
-
<template v-if="multiple" #selected-item="scope">
|
|
25
|
-
<q-chip
|
|
26
|
-
v-if="scope.opt"
|
|
27
|
-
removable
|
|
28
|
-
class="q-ma-none"
|
|
29
|
-
dense
|
|
30
|
-
:tabindex="scope.tabindex"
|
|
31
|
-
color="white"
|
|
32
|
-
text-color="secondary"
|
|
33
|
-
@remove="scope.removeAtIndex(scope.index)"
|
|
34
|
-
>
|
|
35
|
-
{{ scope.opt[`${optionLabel}`] }}
|
|
36
|
-
</q-chip>
|
|
37
|
-
</template>
|
|
38
|
-
<template #no-option>
|
|
39
|
-
<q-item>{{ emptyText }}</q-item>
|
|
40
|
-
</template>
|
|
41
|
-
<q-item v-if="!lcText && type()">{{ placeholder }}</q-item>
|
|
42
|
-
</q-select>
|
|
43
|
-
</template>
|
|
44
|
-
<script setup lang="ts">
|
|
45
|
-
import { computed, defineEmits, defineProps, ref, Ref } from 'vue'
|
|
46
|
-
|
|
47
|
-
import { QSelect } from 'quasar'
|
|
48
|
-
|
|
49
|
-
type Option = Record<string, any>
|
|
50
|
-
|
|
51
|
-
interface AppQSelectProps {
|
|
52
|
-
modelValue: any
|
|
53
|
-
options: Option[]
|
|
54
|
-
placeholder: string
|
|
55
|
-
emptyText: string
|
|
56
|
-
optionLabel?: string
|
|
57
|
-
optionValue?: string
|
|
58
|
-
label?: string
|
|
59
|
-
multiple?: boolean
|
|
60
|
-
borderColor: string
|
|
61
|
-
isDisabled?: boolean
|
|
62
|
-
clearable?: boolean
|
|
63
|
-
search?: boolean
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const props = defineProps<AppQSelectProps>()
|
|
67
|
-
const select = ref({})
|
|
68
|
-
const emit = defineEmits(['update:modelValue'])
|
|
69
|
-
const selected = computed({
|
|
70
|
-
get() {
|
|
71
|
-
return props.modelValue
|
|
72
|
-
},
|
|
73
|
-
set(value) {
|
|
74
|
-
emit('update:modelValue', value)
|
|
75
|
-
},
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
const type = () => {
|
|
79
|
-
if (Array.isArray(selected.value) && !selected.value.length) return true
|
|
80
|
-
return typeof selected.value === 'string' && !selected.value
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const lcText: Ref<string> = ref('')
|
|
84
|
-
const filteredOptions = computed(() => {
|
|
85
|
-
return props.options.filter(x => x[props?.optionLabel || 'label'].toLowerCase().includes(lcText.value))
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
function filterFn(val: string, update: (arg0: () => void) => void) {
|
|
89
|
-
update(() => {
|
|
90
|
-
lcText.value = val.toLowerCase()
|
|
91
|
-
})
|
|
92
|
-
}
|
|
93
|
-
</script>
|
|
94
|
-
<style module lang="scss">
|
|
95
|
-
.wrap {
|
|
96
|
-
position: relative;
|
|
97
|
-
|
|
98
|
-
&:global(.--option-tree) {
|
|
99
|
-
cursor: pointer;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.select {
|
|
104
|
-
&:global(.q-field--outlined.q-field--rounded .q-field__control) {
|
|
105
|
-
border-radius: 14px;
|
|
106
|
-
}
|
|
107
|
-
&:global(.q-field--outlined .q-field__control:before) {
|
|
108
|
-
border-color: v-bind(borderColor);
|
|
109
|
-
}
|
|
110
|
-
&:global(.q-select .q-field__input) {
|
|
111
|
-
padding: 0 6px;
|
|
112
|
-
}
|
|
113
|
-
//&:global(.q-field--filled .q-field__control) {
|
|
114
|
-
// //color: red;
|
|
115
|
-
//}
|
|
116
|
-
//&:global(.q-field--filled.q-field--focused .q-field__control) {
|
|
117
|
-
//}
|
|
118
|
-
//&:global(.q-field--filled .q-field__control:after) {
|
|
119
|
-
// left: 8px;
|
|
120
|
-
// right: 8px;
|
|
121
|
-
//}
|
|
122
|
-
&:global(.q-field--outlined .q-item) {
|
|
123
|
-
color: #1d1d1d;
|
|
124
|
-
position: absolute;
|
|
125
|
-
padding: 0 4px;
|
|
126
|
-
top: 18px;
|
|
127
|
-
left: 0;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.append-wrapper {
|
|
132
|
-
display: flex;
|
|
133
|
-
align-items: center;
|
|
134
|
-
column-gap: 4px;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.menu-wrap {
|
|
138
|
-
padding: 8px;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.search-wrapper {
|
|
142
|
-
position: sticky;
|
|
143
|
-
top: 0;
|
|
144
|
-
padding: 4px;
|
|
145
|
-
background: var(--main-bg);
|
|
146
|
-
z-index: 1;
|
|
147
|
-
}
|
|
148
|
-
.app-select__menu {
|
|
149
|
-
border-radius: 14px;
|
|
150
|
-
.q-item__label {
|
|
151
|
-
word-break: break-word;
|
|
152
|
-
}
|
|
153
|
-
&:global(.q-menu) {
|
|
154
|
-
max-height: 200px !important;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
</style>
|
|
@@ -1,114 +0,0 @@
|
|
|
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>
|