shared-ritm 1.2.52 → 1.2.54
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 +4971 -4952
- package/dist/shared-ritm.umd.js +7 -7
- package/package.json +1 -1
- package/src/App.vue +2461 -2461
- package/src/api/services/AuthService.ts +58 -58
- package/src/api/services/ControlsService.ts +64 -64
- package/src/api/services/FileService.ts +15 -15
- package/src/api/services/TasksService.ts +137 -137
- package/src/api/settings/ApiService.ts +128 -128
- package/src/api/types/Api_Controls.ts +72 -72
- package/src/common/app-button/AppButton.vue +173 -173
- package/src/common/app-date-picker/AppDatePicker.vue +81 -81
- package/src/common/app-icon/AppIcon.vue +108 -108
- package/src/common/app-input/AppInput.vue +147 -147
- 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 +246 -246
- 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-sidebar/AppSidebar.vue +168 -168
- package/src/common/app-sidebar/components/SidebarMenu.vue +37 -37
- package/src/common/app-table/AppTable.vue +2 -2
- package/src/common/app-table/AppTableLayout.vue +24 -24
- package/src/common/app-table/components/ModalSelect.vue +264 -215
- package/src/common/app-table/components/TableModal.vue +357 -357
- package/src/common/app-table/controllers/useBaseTable.ts +42 -42
- 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/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/index.ts +84 -84
- package/src/main.ts +28 -28
- package/src/quasar-user-options.ts +17 -17
- package/src/router/index.ts +10 -10
- package/src/shims-vue.d.ts +5 -5
|
@@ -1,122 +1,122 @@
|
|
|
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
|
+
<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,168 +1,168 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-drawer
|
|
3
|
-
:key="`${drawer}`"
|
|
4
|
-
v-model="drawer"
|
|
5
|
-
:class="$style.drawer"
|
|
6
|
-
:mini="isSidebarMini"
|
|
7
|
-
:overlay="!isFixSidebar"
|
|
8
|
-
:width="drawerWidth"
|
|
9
|
-
:mini-width="drawerMiniWidth"
|
|
10
|
-
:breakpoint="960"
|
|
11
|
-
show-if-above
|
|
12
|
-
@mouseover="toggleSidebarMini(false)"
|
|
13
|
-
@mouseout="toggleSidebarMini(true)"
|
|
14
|
-
>
|
|
15
|
-
<template v-if="isTablet">
|
|
16
|
-
<q-item :class="$style['tablet-logo']">
|
|
17
|
-
<q-item-section avatar>
|
|
18
|
-
<q-btn
|
|
19
|
-
round
|
|
20
|
-
unelevated
|
|
21
|
-
:class="$style['tablet-logo__btn']"
|
|
22
|
-
:icon="tabletLogoBtn"
|
|
23
|
-
@click="openDrawerIsTablet()"
|
|
24
|
-
/>
|
|
25
|
-
</q-item-section>
|
|
26
|
-
<q-item-section :class="$style['logo__text']">РИТМ</q-item-section>
|
|
27
|
-
</q-item>
|
|
28
|
-
</template>
|
|
29
|
-
<template v-else>
|
|
30
|
-
<q-item :class="$style.logo">
|
|
31
|
-
<q-item-section avatar>
|
|
32
|
-
<app-icon name="logo-icon" />
|
|
33
|
-
</q-item-section>
|
|
34
|
-
<q-item-section :class="$style['logo__text']">РИТМ</q-item-section>
|
|
35
|
-
</q-item>
|
|
36
|
-
<q-btn
|
|
37
|
-
dense
|
|
38
|
-
round
|
|
39
|
-
unelevated
|
|
40
|
-
class="q-mini-drawer-hide"
|
|
41
|
-
:class="$style['minify-btn']"
|
|
42
|
-
icon="chevron_left"
|
|
43
|
-
@click="isFixSidebar = !isFixSidebar"
|
|
44
|
-
>
|
|
45
|
-
<q-tooltip>Закрепить сайдбар</q-tooltip>
|
|
46
|
-
</q-btn>
|
|
47
|
-
</template>
|
|
48
|
-
<sidebar-menu :main="main" :menu-items="menuItems" :minify="isSidebarMini" :is-route-active="isRouteActive" />
|
|
49
|
-
<q-item v-ripple :class="$style['menu-exit']" clickable @click="logout()">
|
|
50
|
-
<q-item-section avatar>
|
|
51
|
-
<app-icon :name="'logout-icon'" color="white" size="24px" />
|
|
52
|
-
</q-item-section>
|
|
53
|
-
<q-item-section :class="$style['menu-exit__label']">Выход</q-item-section>
|
|
54
|
-
</q-item>
|
|
55
|
-
</q-drawer>
|
|
56
|
-
</template>
|
|
57
|
-
|
|
58
|
-
<script setup lang="ts">
|
|
59
|
-
import { computed, defineProps, defineEmits, ref, watch, withDefaults } from 'vue'
|
|
60
|
-
import SidebarMenu from './components/SidebarMenu.vue'
|
|
61
|
-
|
|
62
|
-
import { useQuasar } from 'quasar'
|
|
63
|
-
import AppIcon from '@/common/app-icon/AppIcon.vue'
|
|
64
|
-
|
|
65
|
-
interface Props {
|
|
66
|
-
isDrawer: boolean
|
|
67
|
-
minify?: boolean
|
|
68
|
-
menuItems?: any[]
|
|
69
|
-
main?: boolean
|
|
70
|
-
isRouteActive: (item: any) => boolean
|
|
71
|
-
}
|
|
72
|
-
const emits = defineEmits(['logout'])
|
|
73
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
74
|
-
main: false,
|
|
75
|
-
menuItems: () => [],
|
|
76
|
-
})
|
|
77
|
-
const $q = useQuasar()
|
|
78
|
-
|
|
79
|
-
const drawer = ref(true)
|
|
80
|
-
const isSidebarMini = ref(true)
|
|
81
|
-
const isFixSidebar = ref(false)
|
|
82
|
-
|
|
83
|
-
const isTablet = computed(() => $q.screen.lt.lg)
|
|
84
|
-
const tabletLogoBtn = computed(() => (isSidebarMini.value ? 'menu' : 'close'))
|
|
85
|
-
const drawerWidth = computed(() => (isTablet.value ? 250 : 275))
|
|
86
|
-
const drawerMiniWidth = computed(() => (isTablet.value ? 47 : 72))
|
|
87
|
-
|
|
88
|
-
function toggleSidebarMini(value: boolean): void {
|
|
89
|
-
if (!isFixSidebar.value && !isTablet.value) isSidebarMini.value = value
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function openDrawerIsTablet() {
|
|
93
|
-
isFixSidebar.value = !isFixSidebar.value
|
|
94
|
-
isSidebarMini.value = !isSidebarMini.value
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function logout(): void {
|
|
98
|
-
emits('logout')
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
watch(
|
|
102
|
-
() => isTablet.value,
|
|
103
|
-
(value: boolean) => {
|
|
104
|
-
isFixSidebar.value = value
|
|
105
|
-
},
|
|
106
|
-
)
|
|
107
|
-
</script>
|
|
108
|
-
|
|
109
|
-
<style lang="scss" module>
|
|
110
|
-
.drawer {
|
|
111
|
-
display: flex;
|
|
112
|
-
flex-direction: column;
|
|
113
|
-
height: 100vh;
|
|
114
|
-
background: linear-gradient(184deg, #0b3f8e 9.62%, #5386d3 59.23%, #5386d3 91.63%);
|
|
115
|
-
border-right: 1px solid #e4e6e8;
|
|
116
|
-
&::-webkit-scrollbar {
|
|
117
|
-
height: 4px;
|
|
118
|
-
width: 4px;
|
|
119
|
-
}
|
|
120
|
-
&::-webkit-scrollbar-thumb {
|
|
121
|
-
width: 4px;
|
|
122
|
-
height: 4px;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
.logo {
|
|
126
|
-
display: flex;
|
|
127
|
-
justify-content: center;
|
|
128
|
-
margin: 24px 0;
|
|
129
|
-
&__text {
|
|
130
|
-
color: white;
|
|
131
|
-
font-size: 20px;
|
|
132
|
-
font-weight: 700;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
.tablet-logo {
|
|
136
|
-
border-bottom: 1px solid white;
|
|
137
|
-
&__btn {
|
|
138
|
-
color: white;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.minify-btn {
|
|
143
|
-
background: #0b3f8e;
|
|
144
|
-
color: white;
|
|
145
|
-
position: absolute;
|
|
146
|
-
top: 25px;
|
|
147
|
-
right: -17px;
|
|
148
|
-
|
|
149
|
-
&:global(.--mini) {
|
|
150
|
-
:global(.q-icon) {
|
|
151
|
-
transform: rotate(180deg);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.menu-exit {
|
|
157
|
-
border-top: 1px solid white;
|
|
158
|
-
:global(.q-item__section--avatar) {
|
|
159
|
-
min-width: 24px;
|
|
160
|
-
}
|
|
161
|
-
&__label {
|
|
162
|
-
color: #fff;
|
|
163
|
-
font-family: 'Nunito Sans', sans-serif;
|
|
164
|
-
font-size: 16px;
|
|
165
|
-
font-weight: 300;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-drawer
|
|
3
|
+
:key="`${drawer}`"
|
|
4
|
+
v-model="drawer"
|
|
5
|
+
:class="$style.drawer"
|
|
6
|
+
:mini="isSidebarMini"
|
|
7
|
+
:overlay="!isFixSidebar"
|
|
8
|
+
:width="drawerWidth"
|
|
9
|
+
:mini-width="drawerMiniWidth"
|
|
10
|
+
:breakpoint="960"
|
|
11
|
+
show-if-above
|
|
12
|
+
@mouseover="toggleSidebarMini(false)"
|
|
13
|
+
@mouseout="toggleSidebarMini(true)"
|
|
14
|
+
>
|
|
15
|
+
<template v-if="isTablet">
|
|
16
|
+
<q-item :class="$style['tablet-logo']">
|
|
17
|
+
<q-item-section avatar>
|
|
18
|
+
<q-btn
|
|
19
|
+
round
|
|
20
|
+
unelevated
|
|
21
|
+
:class="$style['tablet-logo__btn']"
|
|
22
|
+
:icon="tabletLogoBtn"
|
|
23
|
+
@click="openDrawerIsTablet()"
|
|
24
|
+
/>
|
|
25
|
+
</q-item-section>
|
|
26
|
+
<q-item-section :class="$style['logo__text']">РИТМ</q-item-section>
|
|
27
|
+
</q-item>
|
|
28
|
+
</template>
|
|
29
|
+
<template v-else>
|
|
30
|
+
<q-item :class="$style.logo">
|
|
31
|
+
<q-item-section avatar>
|
|
32
|
+
<app-icon name="logo-icon" />
|
|
33
|
+
</q-item-section>
|
|
34
|
+
<q-item-section :class="$style['logo__text']">РИТМ</q-item-section>
|
|
35
|
+
</q-item>
|
|
36
|
+
<q-btn
|
|
37
|
+
dense
|
|
38
|
+
round
|
|
39
|
+
unelevated
|
|
40
|
+
class="q-mini-drawer-hide"
|
|
41
|
+
:class="$style['minify-btn']"
|
|
42
|
+
icon="chevron_left"
|
|
43
|
+
@click="isFixSidebar = !isFixSidebar"
|
|
44
|
+
>
|
|
45
|
+
<q-tooltip>Закрепить сайдбар</q-tooltip>
|
|
46
|
+
</q-btn>
|
|
47
|
+
</template>
|
|
48
|
+
<sidebar-menu :main="main" :menu-items="menuItems" :minify="isSidebarMini" :is-route-active="isRouteActive" />
|
|
49
|
+
<q-item v-ripple :class="$style['menu-exit']" clickable @click="logout()">
|
|
50
|
+
<q-item-section avatar>
|
|
51
|
+
<app-icon :name="'logout-icon'" color="white" size="24px" />
|
|
52
|
+
</q-item-section>
|
|
53
|
+
<q-item-section :class="$style['menu-exit__label']">Выход</q-item-section>
|
|
54
|
+
</q-item>
|
|
55
|
+
</q-drawer>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script setup lang="ts">
|
|
59
|
+
import { computed, defineProps, defineEmits, ref, watch, withDefaults } from 'vue'
|
|
60
|
+
import SidebarMenu from './components/SidebarMenu.vue'
|
|
61
|
+
|
|
62
|
+
import { useQuasar } from 'quasar'
|
|
63
|
+
import AppIcon from '@/common/app-icon/AppIcon.vue'
|
|
64
|
+
|
|
65
|
+
interface Props {
|
|
66
|
+
isDrawer: boolean
|
|
67
|
+
minify?: boolean
|
|
68
|
+
menuItems?: any[]
|
|
69
|
+
main?: boolean
|
|
70
|
+
isRouteActive: (item: any) => boolean
|
|
71
|
+
}
|
|
72
|
+
const emits = defineEmits(['logout'])
|
|
73
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
74
|
+
main: false,
|
|
75
|
+
menuItems: () => [],
|
|
76
|
+
})
|
|
77
|
+
const $q = useQuasar()
|
|
78
|
+
|
|
79
|
+
const drawer = ref(true)
|
|
80
|
+
const isSidebarMini = ref(true)
|
|
81
|
+
const isFixSidebar = ref(false)
|
|
82
|
+
|
|
83
|
+
const isTablet = computed(() => $q.screen.lt.lg)
|
|
84
|
+
const tabletLogoBtn = computed(() => (isSidebarMini.value ? 'menu' : 'close'))
|
|
85
|
+
const drawerWidth = computed(() => (isTablet.value ? 250 : 275))
|
|
86
|
+
const drawerMiniWidth = computed(() => (isTablet.value ? 47 : 72))
|
|
87
|
+
|
|
88
|
+
function toggleSidebarMini(value: boolean): void {
|
|
89
|
+
if (!isFixSidebar.value && !isTablet.value) isSidebarMini.value = value
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function openDrawerIsTablet() {
|
|
93
|
+
isFixSidebar.value = !isFixSidebar.value
|
|
94
|
+
isSidebarMini.value = !isSidebarMini.value
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function logout(): void {
|
|
98
|
+
emits('logout')
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
watch(
|
|
102
|
+
() => isTablet.value,
|
|
103
|
+
(value: boolean) => {
|
|
104
|
+
isFixSidebar.value = value
|
|
105
|
+
},
|
|
106
|
+
)
|
|
107
|
+
</script>
|
|
108
|
+
|
|
109
|
+
<style lang="scss" module>
|
|
110
|
+
.drawer {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
height: 100vh;
|
|
114
|
+
background: linear-gradient(184deg, #0b3f8e 9.62%, #5386d3 59.23%, #5386d3 91.63%);
|
|
115
|
+
border-right: 1px solid #e4e6e8;
|
|
116
|
+
&::-webkit-scrollbar {
|
|
117
|
+
height: 4px;
|
|
118
|
+
width: 4px;
|
|
119
|
+
}
|
|
120
|
+
&::-webkit-scrollbar-thumb {
|
|
121
|
+
width: 4px;
|
|
122
|
+
height: 4px;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
.logo {
|
|
126
|
+
display: flex;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
margin: 24px 0;
|
|
129
|
+
&__text {
|
|
130
|
+
color: white;
|
|
131
|
+
font-size: 20px;
|
|
132
|
+
font-weight: 700;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
.tablet-logo {
|
|
136
|
+
border-bottom: 1px solid white;
|
|
137
|
+
&__btn {
|
|
138
|
+
color: white;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.minify-btn {
|
|
143
|
+
background: #0b3f8e;
|
|
144
|
+
color: white;
|
|
145
|
+
position: absolute;
|
|
146
|
+
top: 25px;
|
|
147
|
+
right: -17px;
|
|
148
|
+
|
|
149
|
+
&:global(.--mini) {
|
|
150
|
+
:global(.q-icon) {
|
|
151
|
+
transform: rotate(180deg);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.menu-exit {
|
|
157
|
+
border-top: 1px solid white;
|
|
158
|
+
:global(.q-item__section--avatar) {
|
|
159
|
+
min-width: 24px;
|
|
160
|
+
}
|
|
161
|
+
&__label {
|
|
162
|
+
color: #fff;
|
|
163
|
+
font-family: 'Nunito Sans', sans-serif;
|
|
164
|
+
font-size: 16px;
|
|
165
|
+
font-weight: 300;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
</style>
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.wrapper">
|
|
3
|
-
<sidebar-menu-item
|
|
4
|
-
v-for="(item, index) in menuItems"
|
|
5
|
-
:key="index"
|
|
6
|
-
:item="item"
|
|
7
|
-
:main="main"
|
|
8
|
-
:minify="minify"
|
|
9
|
-
:is-route-active="isRouteActive"
|
|
10
|
-
/>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script lang="ts" setup>
|
|
15
|
-
import { defineProps } from 'vue'
|
|
16
|
-
import SidebarMenuItem from './SidebarMenuItem.vue'
|
|
17
|
-
|
|
18
|
-
interface Props {
|
|
19
|
-
menuItems?: any[]
|
|
20
|
-
minify?: boolean
|
|
21
|
-
main: boolean
|
|
22
|
-
isRouteActive: (item: any) => boolean
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const props = defineProps<Props>()
|
|
26
|
-
</script>
|
|
27
|
-
|
|
28
|
-
<style lang="scss" module>
|
|
29
|
-
.wrapper {
|
|
30
|
-
overflow-y: auto;
|
|
31
|
-
overflow-x: hidden;
|
|
32
|
-
flex-grow: 1;
|
|
33
|
-
:global(.q-item) {
|
|
34
|
-
min-height: 54px;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.wrapper">
|
|
3
|
+
<sidebar-menu-item
|
|
4
|
+
v-for="(item, index) in menuItems"
|
|
5
|
+
:key="index"
|
|
6
|
+
:item="item"
|
|
7
|
+
:main="main"
|
|
8
|
+
:minify="minify"
|
|
9
|
+
:is-route-active="isRouteActive"
|
|
10
|
+
/>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script lang="ts" setup>
|
|
15
|
+
import { defineProps } from 'vue'
|
|
16
|
+
import SidebarMenuItem from './SidebarMenuItem.vue'
|
|
17
|
+
|
|
18
|
+
interface Props {
|
|
19
|
+
menuItems?: any[]
|
|
20
|
+
minify?: boolean
|
|
21
|
+
main: boolean
|
|
22
|
+
isRouteActive: (item: any) => boolean
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const props = defineProps<Props>()
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style lang="scss" module>
|
|
29
|
+
.wrapper {
|
|
30
|
+
overflow-y: auto;
|
|
31
|
+
overflow-x: hidden;
|
|
32
|
+
flex-grow: 1;
|
|
33
|
+
:global(.q-item) {
|
|
34
|
+
min-height: 54px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
</style>
|
|
@@ -19,7 +19,7 @@ interface TableEmits {
|
|
|
19
19
|
const emit = defineEmits<TableEmits>()
|
|
20
20
|
|
|
21
21
|
const props = defineProps<{
|
|
22
|
-
rows:
|
|
22
|
+
rows: any[]
|
|
23
23
|
columns: any[]
|
|
24
24
|
columnFilters: Ref<Record<string, string | string[] | undefined>>
|
|
25
25
|
filterMenus: Ref<Record<string, boolean>>
|
|
@@ -63,7 +63,7 @@ watch(
|
|
|
63
63
|
<q-page class="flex flex-col" style="min-height: 100%">
|
|
64
64
|
<q-table
|
|
65
65
|
v-model:selected="selected"
|
|
66
|
-
:rows="rows
|
|
66
|
+
:rows="rows"
|
|
67
67
|
:columns="columns"
|
|
68
68
|
row-key="id"
|
|
69
69
|
flat
|