shared-ritm 1.3.36 → 1.3.38-alpha.0
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 +15284 -14832
- package/dist/shared-ritm.umd.js +564 -564
- package/dist/types/api/services/AuthService.d.ts +1 -0
- package/dist/types/api/services/ControlsService.d.ts +3 -0
- package/dist/types/api/services/EquipmentService.d.ts +15 -5
- package/dist/types/api/services/GanttService.d.ts +22 -0
- package/dist/types/api/services/InstrumentsService.d.ts +6 -1
- package/dist/types/api/services/MetricsService.d.ts +5 -1
- package/dist/types/api/services/RepairsService.d.ts +1 -1
- package/dist/types/api/services/TasksService.d.ts +3 -2
- package/dist/types/api/services/UserIssueService.d.ts +15 -0
- package/dist/types/api/services/UserService.d.ts +2 -1
- package/dist/types/api/services/VideoService.d.ts +2 -1
- package/dist/types/api/settings/ApiService.d.ts +7 -3
- package/dist/types/api/types/Api_Auth.d.ts +15 -0
- package/dist/types/api/types/Api_Controls.d.ts +1 -0
- package/dist/types/api/types/Api_Equipment.d.ts +45 -0
- package/dist/types/api/types/Api_Instruments.d.ts +24 -0
- package/dist/types/api/types/Api_Metrics.d.ts +69 -0
- package/dist/types/api/types/Api_Repairs.d.ts +14 -1
- package/dist/types/api/types/Api_Search.d.ts +1 -0
- package/dist/types/api/types/Api_Tasks.d.ts +1 -0
- package/dist/types/api/types/Api_User.d.ts +12 -0
- package/dist/types/api/types/Api_User_Issue.d.ts +33 -0
- package/dist/types/api/types/Api_Video.d.ts +5 -4
- package/dist/types/common/app-button/Button.stories.d.ts +13 -0
- package/dist/types/common/app-checkbox/Checkbox.stories.d.ts +12 -0
- package/dist/types/common/app-date-picker/DatePicker.stories.d.ts +7 -0
- package/dist/types/common/app-datepicker/Datepicker.stories.d.ts +10 -0
- package/dist/types/common/app-dialogs/Confirm.stories.d.ts +8 -0
- package/dist/types/common/app-dropdown/Dropdown.stories.d.ts +8 -0
- package/dist/types/common/app-file/File.stories.d.ts +8 -0
- package/dist/types/common/app-icon/Icon.stories.d.ts +7 -0
- package/dist/types/common/app-input/Input.stories.d.ts +9 -0
- package/dist/types/common/app-input-new/InputNew.stories.d.ts +12 -0
- package/dist/types/common/app-input-search/InputSearch.stories.d.ts +8 -0
- package/dist/types/common/app-loader/Loader.stories.d.ts +8 -0
- package/dist/types/common/app-select/Select.stories.d.ts +7 -0
- package/dist/types/common/app-table/components/ModalSelect.stories.d.ts +10 -0
- package/dist/types/common/app-toggle/Toggle.stories.d.ts +12 -0
- package/dist/types/configs/storybook.d.ts +1 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/utils/files.d.ts +2 -0
- package/package.json +1 -1
- package/src/api/services/AuthService.ts +53 -53
- package/src/api/services/BrigadesService.ts +32 -32
- package/src/api/services/GanttService.ts +23 -23
- package/src/api/services/ModulesService.ts +27 -27
- package/src/api/services/ProjectsService.ts +83 -83
- package/src/api/services/ScheduleService.ts +69 -69
- package/src/api/services/SearchService.ts +22 -22
- package/src/api/services/TasksService.ts +157 -157
- package/src/api/services/VideoService.ts +5 -0
- package/src/api/settings/ApiService.ts +125 -124
- package/src/api/types/Api_Brigades.ts +36 -36
- package/src/api/types/Api_Modules.ts +21 -21
- package/src/api/types/Api_Projects.ts +62 -62
- package/src/api/types/Api_Schedule.ts +64 -64
- package/src/api/types/Api_Tasks.ts +376 -375
- package/src/api/types/Api_Video.ts +7 -4
- package/src/common/app-checkbox/AppCheckbox.vue +26 -26
- package/src/common/app-datepicker/AppDatepicker.vue +218 -218
- package/src/common/app-dialogs/AppConfirmDialog.vue +109 -109
- package/src/common/app-dropdown/AppDropdown.vue +37 -37
- package/src/common/app-icon/AppIcon.vue +108 -108
- package/src/common/app-input/AppInput.vue +148 -148
- package/src/common/app-layout/AppLayout.vue +84 -84
- package/src/common/app-layout/components/AppLayoutHeader.vue +273 -273
- package/src/common/app-select/AppSelect.vue +159 -159
- package/src/common/app-sidebar/components/SidebarMenuItem.vue +149 -149
- package/src/common/app-table/AppTableLayout.vue +137 -137
- package/src/common/app-table/components/TableModal.vue +367 -367
- package/src/common/app-table/controllers/useBaseTable.ts +45 -45
- package/src/common/app-table/controllers/useColumnSelector.ts +45 -45
- package/src/common/app-toggle/AppToggle.vue +24 -24
- package/src/common/app-wrapper/AppWrapper.vue +28 -28
- package/src/icons/dialogs/SafetyIcon.vue +12 -12
- package/src/shared/styles/general.css +124 -124
- package/src/utils/helpers.ts +59 -59
- package/dist/types/api/services/ComentsServise.d.ts +0 -10
- package/dist/types/api/services/PhotoService.d.ts +0 -53
- package/dist/types/api/types/Api_Users.d.ts +0 -43
|
@@ -1,148 +1,148 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-input
|
|
3
|
-
v-model="value"
|
|
4
|
-
:class="[inputClasses, $style['app-input']]"
|
|
5
|
-
standout
|
|
6
|
-
outlined
|
|
7
|
-
dense
|
|
8
|
-
:rules="rules"
|
|
9
|
-
:type="inputType"
|
|
10
|
-
autocomplete="h87h58g7h8hd"
|
|
11
|
-
:readonly="readonly || field"
|
|
12
|
-
:disable="disabled"
|
|
13
|
-
:placeholder="placeholder"
|
|
14
|
-
>
|
|
15
|
-
</q-input>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script lang="ts" setup>
|
|
19
|
-
import { defineProps, defineEmits, computed, ref, withDefaults } from 'vue'
|
|
20
|
-
|
|
21
|
-
interface AppQInputProps {
|
|
22
|
-
name?: string | undefined
|
|
23
|
-
mask?: string | undefined
|
|
24
|
-
fillMask?: boolean | string | undefined
|
|
25
|
-
reverseFillMask?: boolean | undefined
|
|
26
|
-
unmaskedValue?: boolean | undefined
|
|
27
|
-
modelValue: string | number | null | undefined
|
|
28
|
-
error?: boolean | undefined
|
|
29
|
-
errorMessage?: string | undefined
|
|
30
|
-
noErrorIcon?: boolean | undefined
|
|
31
|
-
rules?: any | undefined
|
|
32
|
-
reactiveRules?: boolean | undefined
|
|
33
|
-
lazyRules?: boolean | 'ondemand' | undefined
|
|
34
|
-
label?: string | undefined
|
|
35
|
-
stackLabel?: boolean | undefined
|
|
36
|
-
hint?: string | undefined
|
|
37
|
-
hideHint?: boolean | undefined
|
|
38
|
-
prefix?: string | undefined
|
|
39
|
-
suffix?: string | undefined
|
|
40
|
-
labelColor?: string | undefined
|
|
41
|
-
color?: string | undefined
|
|
42
|
-
bgColor?: string | undefined
|
|
43
|
-
dark?: boolean | undefined
|
|
44
|
-
loading?: boolean | undefined
|
|
45
|
-
clearable?: boolean | undefined
|
|
46
|
-
clearIcon?: string | undefined
|
|
47
|
-
filled?: boolean | undefined
|
|
48
|
-
outlined?: boolean | undefined
|
|
49
|
-
borderless?: boolean | undefined
|
|
50
|
-
standout?: boolean | string | undefined
|
|
51
|
-
labelSlot?: boolean | undefined
|
|
52
|
-
bottomSlots?: boolean | undefined
|
|
53
|
-
hideBottomSpace?: boolean | undefined
|
|
54
|
-
counter?: boolean | undefined
|
|
55
|
-
rounded?: boolean | undefined
|
|
56
|
-
square?: boolean | undefined
|
|
57
|
-
dense?: boolean | undefined
|
|
58
|
-
itemAligned?: boolean | undefined
|
|
59
|
-
disable?: boolean | undefined
|
|
60
|
-
readonly?: boolean | undefined
|
|
61
|
-
autofocus?: boolean | undefined
|
|
62
|
-
for?: string | undefined
|
|
63
|
-
shadowText?: string | undefined
|
|
64
|
-
type?:
|
|
65
|
-
| 'text'
|
|
66
|
-
| 'password'
|
|
67
|
-
| 'textarea'
|
|
68
|
-
| 'email'
|
|
69
|
-
| 'search'
|
|
70
|
-
| 'tel'
|
|
71
|
-
| 'file'
|
|
72
|
-
| 'number'
|
|
73
|
-
| 'url'
|
|
74
|
-
| 'time'
|
|
75
|
-
| 'date'
|
|
76
|
-
| undefined
|
|
77
|
-
debounce?: string | number | undefined
|
|
78
|
-
disabled?: boolean | undefined
|
|
79
|
-
maxlength?: string | number | undefined
|
|
80
|
-
autogrow?: boolean | undefined
|
|
81
|
-
inputClass?: any | undefined
|
|
82
|
-
inputStyle?: any | undefined
|
|
83
|
-
onClear?: (value: any) => void
|
|
84
|
-
'onUpdate:modelValue'?: (value: string | number | null) => void
|
|
85
|
-
onFocus?: (evt: Event) => void
|
|
86
|
-
onBlur?: (evt: Event) => void
|
|
87
|
-
onClick?: (evt: Event) => void
|
|
88
|
-
placeholder?: string | undefined
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
interface AppInputProps extends AppQInputProps {
|
|
92
|
-
field?: boolean
|
|
93
|
-
required?: boolean
|
|
94
|
-
datePicker?: boolean
|
|
95
|
-
timePicker?: boolean
|
|
96
|
-
withIcon?: boolean
|
|
97
|
-
withButton?: boolean
|
|
98
|
-
withArrow?: boolean
|
|
99
|
-
borderColor?: string
|
|
100
|
-
borderRadius?: string
|
|
101
|
-
borderWidth?: string
|
|
102
|
-
width?: string
|
|
103
|
-
height?: string
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
const props = withDefaults(defineProps<AppInputProps>(), {
|
|
107
|
-
dense: true,
|
|
108
|
-
outlined: true,
|
|
109
|
-
error: undefined,
|
|
110
|
-
modelValue: '',
|
|
111
|
-
borderRadius: '8px',
|
|
112
|
-
borderWidth: '1px',
|
|
113
|
-
width: 'auto',
|
|
114
|
-
height: 'auto',
|
|
115
|
-
})
|
|
116
|
-
|
|
117
|
-
const emit = defineEmits(['update:modelValue', 'button-click', 'clear', 'focus', 'blur', 'click'])
|
|
118
|
-
const passwordVisibility = ref(false)
|
|
119
|
-
const inputType = computed(() => {
|
|
120
|
-
if (props.type === 'password') return passwordVisibility.value ? 'text' : 'password'
|
|
121
|
-
return props.type || 'text'
|
|
122
|
-
})
|
|
123
|
-
|
|
124
|
-
const value = computed({
|
|
125
|
-
get: () =>
|
|
126
|
-
props.modelValue !== null && props.modelValue !== undefined && props.type === 'number'
|
|
127
|
-
? +props.modelValue
|
|
128
|
-
: props.modelValue,
|
|
129
|
-
set: (newValue: any) => emit('update:modelValue', props.type === 'number' ? +newValue : newValue),
|
|
130
|
-
})
|
|
131
|
-
|
|
132
|
-
const inputClasses = computed(() => {
|
|
133
|
-
return {
|
|
134
|
-
'app-input': true,
|
|
135
|
-
'--required': props.required,
|
|
136
|
-
'--field': props.field,
|
|
137
|
-
'input-number-without-arrow': inputType.value === 'number' && !props.withArrow,
|
|
138
|
-
}
|
|
139
|
-
})
|
|
140
|
-
</script>
|
|
141
|
-
|
|
142
|
-
<style module lang="scss">
|
|
143
|
-
.app-input {
|
|
144
|
-
&:global(.q-field--dense .q-field__control) {
|
|
145
|
-
height: v-bind(height);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-input
|
|
3
|
+
v-model="value"
|
|
4
|
+
:class="[inputClasses, $style['app-input']]"
|
|
5
|
+
standout
|
|
6
|
+
outlined
|
|
7
|
+
dense
|
|
8
|
+
:rules="rules"
|
|
9
|
+
:type="inputType"
|
|
10
|
+
autocomplete="h87h58g7h8hd"
|
|
11
|
+
:readonly="readonly || field"
|
|
12
|
+
:disable="disabled"
|
|
13
|
+
:placeholder="placeholder"
|
|
14
|
+
>
|
|
15
|
+
</q-input>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script lang="ts" setup>
|
|
19
|
+
import { defineProps, defineEmits, computed, ref, withDefaults } from 'vue'
|
|
20
|
+
|
|
21
|
+
interface AppQInputProps {
|
|
22
|
+
name?: string | undefined
|
|
23
|
+
mask?: string | undefined
|
|
24
|
+
fillMask?: boolean | string | undefined
|
|
25
|
+
reverseFillMask?: boolean | undefined
|
|
26
|
+
unmaskedValue?: boolean | undefined
|
|
27
|
+
modelValue: string | number | null | undefined
|
|
28
|
+
error?: boolean | undefined
|
|
29
|
+
errorMessage?: string | undefined
|
|
30
|
+
noErrorIcon?: boolean | undefined
|
|
31
|
+
rules?: any | undefined
|
|
32
|
+
reactiveRules?: boolean | undefined
|
|
33
|
+
lazyRules?: boolean | 'ondemand' | undefined
|
|
34
|
+
label?: string | undefined
|
|
35
|
+
stackLabel?: boolean | undefined
|
|
36
|
+
hint?: string | undefined
|
|
37
|
+
hideHint?: boolean | undefined
|
|
38
|
+
prefix?: string | undefined
|
|
39
|
+
suffix?: string | undefined
|
|
40
|
+
labelColor?: string | undefined
|
|
41
|
+
color?: string | undefined
|
|
42
|
+
bgColor?: string | undefined
|
|
43
|
+
dark?: boolean | undefined
|
|
44
|
+
loading?: boolean | undefined
|
|
45
|
+
clearable?: boolean | undefined
|
|
46
|
+
clearIcon?: string | undefined
|
|
47
|
+
filled?: boolean | undefined
|
|
48
|
+
outlined?: boolean | undefined
|
|
49
|
+
borderless?: boolean | undefined
|
|
50
|
+
standout?: boolean | string | undefined
|
|
51
|
+
labelSlot?: boolean | undefined
|
|
52
|
+
bottomSlots?: boolean | undefined
|
|
53
|
+
hideBottomSpace?: boolean | undefined
|
|
54
|
+
counter?: boolean | undefined
|
|
55
|
+
rounded?: boolean | undefined
|
|
56
|
+
square?: boolean | undefined
|
|
57
|
+
dense?: boolean | undefined
|
|
58
|
+
itemAligned?: boolean | undefined
|
|
59
|
+
disable?: boolean | undefined
|
|
60
|
+
readonly?: boolean | undefined
|
|
61
|
+
autofocus?: boolean | undefined
|
|
62
|
+
for?: string | undefined
|
|
63
|
+
shadowText?: string | undefined
|
|
64
|
+
type?:
|
|
65
|
+
| 'text'
|
|
66
|
+
| 'password'
|
|
67
|
+
| 'textarea'
|
|
68
|
+
| 'email'
|
|
69
|
+
| 'search'
|
|
70
|
+
| 'tel'
|
|
71
|
+
| 'file'
|
|
72
|
+
| 'number'
|
|
73
|
+
| 'url'
|
|
74
|
+
| 'time'
|
|
75
|
+
| 'date'
|
|
76
|
+
| undefined
|
|
77
|
+
debounce?: string | number | undefined
|
|
78
|
+
disabled?: boolean | undefined
|
|
79
|
+
maxlength?: string | number | undefined
|
|
80
|
+
autogrow?: boolean | undefined
|
|
81
|
+
inputClass?: any | undefined
|
|
82
|
+
inputStyle?: any | undefined
|
|
83
|
+
onClear?: (value: any) => void
|
|
84
|
+
'onUpdate:modelValue'?: (value: string | number | null) => void
|
|
85
|
+
onFocus?: (evt: Event) => void
|
|
86
|
+
onBlur?: (evt: Event) => void
|
|
87
|
+
onClick?: (evt: Event) => void
|
|
88
|
+
placeholder?: string | undefined
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface AppInputProps extends AppQInputProps {
|
|
92
|
+
field?: boolean
|
|
93
|
+
required?: boolean
|
|
94
|
+
datePicker?: boolean
|
|
95
|
+
timePicker?: boolean
|
|
96
|
+
withIcon?: boolean
|
|
97
|
+
withButton?: boolean
|
|
98
|
+
withArrow?: boolean
|
|
99
|
+
borderColor?: string
|
|
100
|
+
borderRadius?: string
|
|
101
|
+
borderWidth?: string
|
|
102
|
+
width?: string
|
|
103
|
+
height?: string
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const props = withDefaults(defineProps<AppInputProps>(), {
|
|
107
|
+
dense: true,
|
|
108
|
+
outlined: true,
|
|
109
|
+
error: undefined,
|
|
110
|
+
modelValue: '',
|
|
111
|
+
borderRadius: '8px',
|
|
112
|
+
borderWidth: '1px',
|
|
113
|
+
width: 'auto',
|
|
114
|
+
height: 'auto',
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
const emit = defineEmits(['update:modelValue', 'button-click', 'clear', 'focus', 'blur', 'click'])
|
|
118
|
+
const passwordVisibility = ref(false)
|
|
119
|
+
const inputType = computed(() => {
|
|
120
|
+
if (props.type === 'password') return passwordVisibility.value ? 'text' : 'password'
|
|
121
|
+
return props.type || 'text'
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
const value = computed({
|
|
125
|
+
get: () =>
|
|
126
|
+
props.modelValue !== null && props.modelValue !== undefined && props.type === 'number'
|
|
127
|
+
? +props.modelValue
|
|
128
|
+
: props.modelValue,
|
|
129
|
+
set: (newValue: any) => emit('update:modelValue', props.type === 'number' ? +newValue : newValue),
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
const inputClasses = computed(() => {
|
|
133
|
+
return {
|
|
134
|
+
'app-input': true,
|
|
135
|
+
'--required': props.required,
|
|
136
|
+
'--field': props.field,
|
|
137
|
+
'input-number-without-arrow': inputType.value === 'number' && !props.withArrow,
|
|
138
|
+
}
|
|
139
|
+
})
|
|
140
|
+
</script>
|
|
141
|
+
|
|
142
|
+
<style module lang="scss">
|
|
143
|
+
.app-input {
|
|
144
|
+
&:global(.q-field--dense .q-field__control) {
|
|
145
|
+
height: v-bind(height);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
</style>
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-layout :class="$style.layout" view="lHh LpR fFf">
|
|
3
|
-
<div v-if="logged" :class="$style['loader-backdrop']">
|
|
4
|
-
<app-loader :loading="logged" size="md" :thickness="3" :backdrop="true" />
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
<slot name="drawer" />
|
|
8
|
-
<slot name="header" :style="marginLeft" />
|
|
9
|
-
|
|
10
|
-
<q-page-container :class="{ container: container }" @wheel="mouseMove">
|
|
11
|
-
<slot name="content" :style="marginLeft" />
|
|
12
|
-
</q-page-container>
|
|
13
|
-
|
|
14
|
-
<slot name="footer" />
|
|
15
|
-
</q-layout>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script lang="ts" setup>
|
|
19
|
-
import { computed, defineProps, nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
|
|
20
|
-
import AppLoader from '@/common/app-loader/index.vue'
|
|
21
|
-
interface LayoutProps {
|
|
22
|
-
logged: boolean
|
|
23
|
-
console?: boolean
|
|
24
|
-
container?: boolean
|
|
25
|
-
padding?: string
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const props = defineProps<LayoutProps>()
|
|
29
|
-
|
|
30
|
-
const hasPaddingLeft = ref(false)
|
|
31
|
-
|
|
32
|
-
function mouseMove(e: any) {
|
|
33
|
-
const content = document.getElementById('content')
|
|
34
|
-
const scrollable = e.target
|
|
35
|
-
if (content && !scrollable.closest('#content')) {
|
|
36
|
-
content.scrollBy({ top: e.deltaY })
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const marginLeft = computed(() => {
|
|
41
|
-
return hasPaddingLeft.value ? { 'margin-left': '0px' } : { 'margin-left': '72px' }
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
function checkPaddingLeft() {
|
|
45
|
-
const el = document.querySelector('.q-page-container') as HTMLElement | null
|
|
46
|
-
|
|
47
|
-
if (el) {
|
|
48
|
-
nextTick(() => {
|
|
49
|
-
const observer = new ResizeObserver(() => {
|
|
50
|
-
hasPaddingLeft.value = window.getComputedStyle(el).paddingLeft !== '0px'
|
|
51
|
-
})
|
|
52
|
-
observer.observe(el)
|
|
53
|
-
onBeforeUnmount(() => observer.disconnect())
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
onMounted(() => {
|
|
59
|
-
checkPaddingLeft()
|
|
60
|
-
})
|
|
61
|
-
</script>
|
|
62
|
-
|
|
63
|
-
<style lang="scss" module>
|
|
64
|
-
.layout {
|
|
65
|
-
position: relative;
|
|
66
|
-
background: linear-gradient(235deg, #87caff 9.16%, #5386d3 45.8%, #0b3f8e 92.27%);
|
|
67
|
-
}
|
|
68
|
-
.loader {
|
|
69
|
-
&-backdrop {
|
|
70
|
-
width: 100%;
|
|
71
|
-
height: 100%;
|
|
72
|
-
background-color: rgba(255, 255, 255, 0.1);
|
|
73
|
-
position: absolute;
|
|
74
|
-
right: 0;
|
|
75
|
-
z-index: 2999;
|
|
76
|
-
}
|
|
77
|
-
&-spinner {
|
|
78
|
-
position: absolute;
|
|
79
|
-
top: 50%;
|
|
80
|
-
left: 50%;
|
|
81
|
-
z-index: 2;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-layout :class="$style.layout" view="lHh LpR fFf">
|
|
3
|
+
<div v-if="logged" :class="$style['loader-backdrop']">
|
|
4
|
+
<app-loader :loading="logged" size="md" :thickness="3" :backdrop="true" />
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<slot name="drawer" />
|
|
8
|
+
<slot name="header" :style="marginLeft" />
|
|
9
|
+
|
|
10
|
+
<q-page-container :class="{ container: container }" @wheel="mouseMove">
|
|
11
|
+
<slot name="content" :style="marginLeft" />
|
|
12
|
+
</q-page-container>
|
|
13
|
+
|
|
14
|
+
<slot name="footer" />
|
|
15
|
+
</q-layout>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script lang="ts" setup>
|
|
19
|
+
import { computed, defineProps, nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
|
|
20
|
+
import AppLoader from '@/common/app-loader/index.vue'
|
|
21
|
+
interface LayoutProps {
|
|
22
|
+
logged: boolean
|
|
23
|
+
console?: boolean
|
|
24
|
+
container?: boolean
|
|
25
|
+
padding?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const props = defineProps<LayoutProps>()
|
|
29
|
+
|
|
30
|
+
const hasPaddingLeft = ref(false)
|
|
31
|
+
|
|
32
|
+
function mouseMove(e: any) {
|
|
33
|
+
const content = document.getElementById('content')
|
|
34
|
+
const scrollable = e.target
|
|
35
|
+
if (content && !scrollable.closest('#content')) {
|
|
36
|
+
content.scrollBy({ top: e.deltaY })
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const marginLeft = computed(() => {
|
|
41
|
+
return hasPaddingLeft.value ? { 'margin-left': '0px' } : { 'margin-left': '72px' }
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
function checkPaddingLeft() {
|
|
45
|
+
const el = document.querySelector('.q-page-container') as HTMLElement | null
|
|
46
|
+
|
|
47
|
+
if (el) {
|
|
48
|
+
nextTick(() => {
|
|
49
|
+
const observer = new ResizeObserver(() => {
|
|
50
|
+
hasPaddingLeft.value = window.getComputedStyle(el).paddingLeft !== '0px'
|
|
51
|
+
})
|
|
52
|
+
observer.observe(el)
|
|
53
|
+
onBeforeUnmount(() => observer.disconnect())
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
onMounted(() => {
|
|
59
|
+
checkPaddingLeft()
|
|
60
|
+
})
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<style lang="scss" module>
|
|
64
|
+
.layout {
|
|
65
|
+
position: relative;
|
|
66
|
+
background: linear-gradient(235deg, #87caff 9.16%, #5386d3 45.8%, #0b3f8e 92.27%);
|
|
67
|
+
}
|
|
68
|
+
.loader {
|
|
69
|
+
&-backdrop {
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
73
|
+
position: absolute;
|
|
74
|
+
right: 0;
|
|
75
|
+
z-index: 2999;
|
|
76
|
+
}
|
|
77
|
+
&-spinner {
|
|
78
|
+
position: absolute;
|
|
79
|
+
top: 50%;
|
|
80
|
+
left: 50%;
|
|
81
|
+
z-index: 2;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
</style>
|