shared-ritm 1.0.23 → 1.0.25
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 +5511 -3327
- package/dist/shared-ritm.umd.js +7 -7
- package/dist/types/index.d.ts +4 -1
- package/package.json +1 -1
- package/src/App.vue +105 -1
- package/src/common/app-icon/AppIcon.vue +104 -0
- package/src/common/app-input/AppInput.vue +21 -61
- package/src/common/app-input-search/AppInputSearch.vue +168 -0
- package/src/common/app-layout/components/AppLayoutHeader.vue +2 -2
- package/src/common/app-page-layout/AppPageLayout.vue +122 -0
- package/src/common/app-sidebar/AppSidebar.vue +2 -2
- package/src/common/app-sidebar/components/SidebarMenuItem.vue +3 -3
- package/src/common/app-toggle/index.vue +23 -0
- package/src/icons/components/arrow-down-icon.vue +25 -0
- package/src/icons/components/arrow-frame-icon.vue +19 -0
- package/src/icons/components/arrow-square.vue +22 -0
- package/src/icons/sidebar/assign-module-icon.vue +36 -0
- package/src/icons/sidebar/instrument-history-icon.vue +32 -0
- package/src/icons/sidebar/instrument-order-icon.vue +38 -0
- package/src/icons/sidebar/instrument-work-zone-icon.vue +18 -0
- package/src/icons/sidebar/instruments-icon.vue +45 -0
- package/src/icons/sidebar/logo-icon.vue +15 -0
- package/src/icons/sidebar/logout-icon.vue +13 -0
- package/src/icons/sidebar/modules-icon.vue +16 -0
- package/src/icons/sidebar/notifications-icon.vue +24 -0
- package/src/icons/sidebar/order-icon.vue +44 -0
- package/src/icons/sidebar/pass-icon.vue +38 -0
- package/src/icons/sidebar/positions-icon.vue +42 -0
- package/src/icons/sidebar/preorder-icon.vue +19 -0
- package/src/icons/sidebar/projects-icon.vue +31 -0
- package/src/icons/sidebar/repair-object-icon.vue +18 -0
- package/src/icons/sidebar/repairs-icon.vue +20 -0
- package/src/icons/sidebar/roles-icon.vue +26 -0
- package/src/icons/sidebar/status-history-icon.vue +24 -0
- package/src/icons/sidebar/tasks-icon.vue +28 -0
- package/src/icons/sidebar/tasks_tasks-icon.vue +39 -0
- package/src/icons/sidebar/tasks_today-icon.vue +27 -0
- package/src/icons/sidebar/teams-icon.vue +32 -0
- package/src/icons/sidebar/user-icon.vue +18 -0
- package/src/icons/sidebar/users-icon.vue +46 -0
- package/src/icons/sidebar/videosources-icon.vue +19 -0
- package/src/icons/sidebar/videowall-icon.vue +13 -0
- package/src/icons/sidebar/videozones-icon.vue +21 -0
- package/src/icons/sidebar/warehouses-icon.vue +43 -0
- package/src/icons/sidebar/workshop-icon.vue +100 -0
- package/src/icons/sidebar/workzones-icon.vue +22 -0
- package/src/index.ts +4 -2
- package/src/common/app-test-button/AppTestButton.vue +0 -11
package/dist/types/index.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import AppButton from '@/common/app-button/AppButton.vue';
|
|
2
|
+
import AppInputSearch from '@/common/app-input-search/AppInputSearch.vue';
|
|
2
3
|
import AppInput from '@/common/app-input/AppInput.vue';
|
|
4
|
+
import AppToggle from '@/common/app-toggle/index.vue';
|
|
3
5
|
import AppLayout from '@/common/app-layout/AppLayout.vue';
|
|
4
6
|
import AppSelect from '@/common/app-select/AppSelect.vue';
|
|
5
7
|
import AppWrapper from '@/common/app-wrapper/AppWrapper.vue';
|
|
8
|
+
import AppSidebar from '@/common/app-sidebar/AppSidebar.vue';
|
|
6
9
|
import useGanttService from '@/api/services/GanttService';
|
|
7
10
|
import useMetricsService from '@/api/services/MetricsService';
|
|
8
11
|
import useProjectsService from '@/api/services/ProjectsService';
|
|
9
12
|
import useRepairsService from '@/api/services/RepairsService';
|
|
10
13
|
import useTasksService from '@/api/services/TasksService';
|
|
11
|
-
export { AppButton, AppInput, AppLayout, AppSelect, AppWrapper };
|
|
14
|
+
export { AppButton, AppInput, AppToggle, AppInputSearch, AppLayout, AppSelect, AppWrapper, AppSidebar };
|
|
12
15
|
export { useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService };
|
|
13
16
|
export * from '@/api/types/Api_Repairs';
|
|
14
17
|
export * from '@/api/types/Api_Tasks';
|
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,8 +1,112 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<app-
|
|
2
|
+
<app-layout :logged="false">
|
|
3
|
+
<template #header>
|
|
4
|
+
<!-- <app-layout-header />-->
|
|
5
|
+
</template>
|
|
6
|
+
<template #drawer>
|
|
7
|
+
<app-sidebar :is-drawer="true" :menu-items="menuItems" />
|
|
8
|
+
</template>
|
|
9
|
+
<app-button label="asad" color="primary" />
|
|
10
|
+
<app-input v-model="test" type="text" />
|
|
11
|
+
</app-layout>
|
|
3
12
|
</template>
|
|
4
13
|
|
|
5
14
|
<script setup lang="ts">
|
|
6
15
|
import AppButton from '@/common/app-button/AppButton.vue'
|
|
16
|
+
import AppInput from '@/common/app-input/AppInput.vue'
|
|
17
|
+
import { ref } from 'vue'
|
|
18
|
+
import AppSidebar from '@/common/app-sidebar/AppSidebar.vue'
|
|
19
|
+
import AppLayout from '@/common/app-layout/AppLayout.vue'
|
|
20
|
+
//import AppLayoutHeader from '@/common/app-layout/components/AppLayoutHeader.vue'
|
|
21
|
+
const test = ref('sdf')
|
|
22
|
+
const menuItems = ref([
|
|
23
|
+
{ name: 'profile', icon: 'user-icon', label: 'Мой профиль', to: '/profile' },
|
|
24
|
+
{
|
|
25
|
+
name: 'repairs-icon',
|
|
26
|
+
icon: 'repairs-icon',
|
|
27
|
+
label: 'Ремонты',
|
|
28
|
+
to: '',
|
|
29
|
+
items: [
|
|
30
|
+
{ name: 'repairs/', icon: 'repairs-icon', label: 'Ремонты', to: '/repairs/' },
|
|
31
|
+
{ name: 'equipment', icon: 'videozones-icon', label: 'Оборудование', to: '/equipment' },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
{ name: 'projects', icon: 'projects-icon', label: 'Проекты', to: '/projects' },
|
|
35
|
+
{ name: 'projects-and-tasks', icon: 'projects-icon', label: 'Проекты и задачи', to: '/projects-and-tasks' },
|
|
36
|
+
{
|
|
37
|
+
name: 'tasks-icon',
|
|
38
|
+
icon: 'tasks-icon',
|
|
39
|
+
label: 'Задачник',
|
|
40
|
+
to: '',
|
|
41
|
+
items: [
|
|
42
|
+
{ name: 'tasks', icon: 'tasks_tasks-icon', label: 'Рабочие задания', to: '/tasks' },
|
|
43
|
+
{ name: 'my-tasks-today', icon: 'tasks_today-icon', label: 'Мои рабочие задания', to: '/my-tasks-today' },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'instruments-icon',
|
|
48
|
+
icon: 'instruments-icon',
|
|
49
|
+
label: 'Инструменты',
|
|
50
|
+
to: '',
|
|
51
|
+
items: [
|
|
52
|
+
{ name: 'instruments', icon: 'repairs-icon', label: 'Инструменты', to: '/instruments' },
|
|
53
|
+
{ name: 'warehouses', icon: 'warehouses-icon', label: 'Инструменты на складе', to: '/warehouses' },
|
|
54
|
+
{ name: 'workshop', icon: 'workshop-icon', label: 'Мастерская', to: '/workshop' },
|
|
55
|
+
{
|
|
56
|
+
name: 'instrument-work-zone',
|
|
57
|
+
icon: 'instrument-work-zone-icon',
|
|
58
|
+
label: 'Зоны проведения работ',
|
|
59
|
+
to: '/instrument-work-zone',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'order-icon',
|
|
65
|
+
icon: 'order-icon',
|
|
66
|
+
label: 'Заказ',
|
|
67
|
+
to: '',
|
|
68
|
+
items: [
|
|
69
|
+
{ name: 'instrument-preorder', icon: 'preorder-icon', label: 'Предзаказ', to: '/instrument-preorder' },
|
|
70
|
+
{ name: 'instrument-order', icon: 'instrument-order-icon', label: 'Заказы МТР', to: '/instrument-order' },
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
{ name: 'modules', icon: 'modules-icon', label: 'Модули', to: '/modules' },
|
|
74
|
+
{
|
|
75
|
+
name: 'instrument-history',
|
|
76
|
+
icon: 'instrument-history-icon',
|
|
77
|
+
label: 'История применения',
|
|
78
|
+
to: '/instrument-history',
|
|
79
|
+
},
|
|
80
|
+
{ name: 'status-history', icon: 'status-history-icon', label: 'История статусов', to: '/status-history' },
|
|
81
|
+
{ name: 'pass', icon: 'pass-icon', label: 'Присвоить метку', to: '/pass' },
|
|
82
|
+
{ name: 'assign-module', icon: 'assign-module-icon', label: 'Выдать МТР', to: '/assign-module' },
|
|
83
|
+
{
|
|
84
|
+
name: 'users-icon',
|
|
85
|
+
icon: 'users-icon',
|
|
86
|
+
label: 'Пользователи',
|
|
87
|
+
to: '',
|
|
88
|
+
items: [
|
|
89
|
+
{ name: 'users', icon: 'user-icon', label: 'Пользователи', to: '/users' },
|
|
90
|
+
{ name: 'positions', icon: 'positions-icon', label: 'Должности', to: '/positions' },
|
|
91
|
+
{ name: 'roles', icon: 'roles-icon', label: 'Роли', to: '/roles' },
|
|
92
|
+
{ name: 'teams', icon: 'teams-icon', label: 'Команды', to: '/teams' },
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'workzones-icon',
|
|
97
|
+
icon: 'workzones-icon',
|
|
98
|
+
label: 'Зоны работ',
|
|
99
|
+
to: '',
|
|
100
|
+
items: [
|
|
101
|
+
{ name: 'work-zone', icon: 'videozones-icon', label: 'Видео зоны', to: '/work-zone' },
|
|
102
|
+
{ name: 'video-source', icon: 'videosources-icon', label: 'Источники видео', to: '/video-source' },
|
|
103
|
+
{ name: 'video-wall', icon: 'videowall-icon', label: 'Видео стена', to: '/video-wall' },
|
|
104
|
+
{ name: 'checkpoints', icon: 'modules-icon', label: 'Контрольные точки', to: '/checkpoints' },
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
{ name: 'video-sync', icon: 'videozones-icon', label: 'Разметка видеозоны', to: '/video-sync' },
|
|
108
|
+
{ name: 'notifications', icon: 'notifications-icon', label: 'Уведомления', to: '/notifications' },
|
|
109
|
+
{ name: 'sign-out', icon: 'logout-icon', label: 'Выход', to: '/sign-out' },
|
|
110
|
+
])
|
|
7
111
|
</script>
|
|
8
112
|
<style lang="scss"></style>
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component :is="sideBarIcon" :tag="tag" :class="[$style['app-icon']]" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import ProjectsIcon from '@/icons/sidebar/projects-icon.vue'
|
|
7
|
+
import RepairsIcon from '@/icons/sidebar/repairs-icon.vue'
|
|
8
|
+
import InstrumentHistoryIcon from '@/icons/sidebar/instrument-history-icon.vue'
|
|
9
|
+
import RepairObjectIcon from '@/icons/sidebar/repair-object-icon.vue'
|
|
10
|
+
import StatusHistoryIcon from '@/icons/sidebar/status-history-icon.vue'
|
|
11
|
+
import PassIcon from '@/icons/sidebar/pass-icon.vue'
|
|
12
|
+
import AssignModuleIcon from '@/icons/sidebar/assign-module-icon.vue'
|
|
13
|
+
import UsersIcon from '@/icons/sidebar/users-icon.vue'
|
|
14
|
+
import UserIcon from '@/icons/sidebar/user-icon.vue'
|
|
15
|
+
import WorkzonesIcon from '@/icons/sidebar/workzones-icon.vue'
|
|
16
|
+
import LogoutIcon from '@/icons/sidebar/logout-icon.vue'
|
|
17
|
+
import LogoIcon from '@/icons/sidebar/logo-icon.vue'
|
|
18
|
+
import TasksIcon from '@/icons/sidebar/tasks-icon.vue'
|
|
19
|
+
import InstrumentsIcon from '@/icons/sidebar/instruments-icon.vue'
|
|
20
|
+
import OrderIcon from '@/icons/sidebar/order-icon.vue'
|
|
21
|
+
import ModulesIcon from '@/icons/sidebar/modules-icon.vue'
|
|
22
|
+
import NotificationsIcon from '@/icons/sidebar/notifications-icon.vue'
|
|
23
|
+
import VideozonesIcon from '@/icons/sidebar/videozones-icon.vue'
|
|
24
|
+
import InstrumentWorkZoneIcon from '@/icons/sidebar/instrument-work-zone-icon.vue'
|
|
25
|
+
import WorkshopIcon from '@/icons/sidebar/workshop-icon.vue'
|
|
26
|
+
import WarehousesIcon from '@/icons/sidebar/warehouses-icon.vue'
|
|
27
|
+
import TeamsIcon from '@/icons/sidebar/teams-icon.vue'
|
|
28
|
+
import RolesIcon from '@/icons/sidebar/roles-icon.vue'
|
|
29
|
+
import PositionsIcon from '@/icons/sidebar/positions-icon.vue'
|
|
30
|
+
import InstrumentOrderIcon from '@/icons/sidebar/instrument-order-icon.vue'
|
|
31
|
+
import PreorderIcon from '@/icons/sidebar/preorder-icon.vue'
|
|
32
|
+
import VideowallIcon from '@/icons/sidebar/videowall-icon.vue'
|
|
33
|
+
import VideosourcesIcon from '@/icons/sidebar/videosources-icon.vue'
|
|
34
|
+
import Tasks_tasksIcon from '@/icons/sidebar/tasks_tasks-icon.vue'
|
|
35
|
+
import Tasks_todayIcon from '@/icons/sidebar/tasks_today-icon.vue'
|
|
36
|
+
import ArrowFrameIcon from '@/icons/components/arrow-frame-icon.vue'
|
|
37
|
+
|
|
38
|
+
import { computed, defineProps } from 'vue'
|
|
39
|
+
|
|
40
|
+
interface Props {
|
|
41
|
+
size?: string | undefined
|
|
42
|
+
tag?: string | undefined
|
|
43
|
+
name: string
|
|
44
|
+
color?: string | undefined
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
48
|
+
tag: '',
|
|
49
|
+
name: '',
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
function toPascalCase(str: string): string {
|
|
53
|
+
if (!str) return ''
|
|
54
|
+
return str
|
|
55
|
+
.split('-')
|
|
56
|
+
.map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
57
|
+
.join('')
|
|
58
|
+
}
|
|
59
|
+
const sideBarIcon = computed(
|
|
60
|
+
() =>
|
|
61
|
+
({
|
|
62
|
+
ProjectsIcon,
|
|
63
|
+
RepairsIcon,
|
|
64
|
+
RepairObjectIcon,
|
|
65
|
+
InstrumentHistoryIcon,
|
|
66
|
+
StatusHistoryIcon,
|
|
67
|
+
PassIcon,
|
|
68
|
+
AssignModuleIcon,
|
|
69
|
+
UsersIcon,
|
|
70
|
+
UserIcon,
|
|
71
|
+
WorkzonesIcon,
|
|
72
|
+
LogoutIcon,
|
|
73
|
+
LogoIcon,
|
|
74
|
+
TasksIcon,
|
|
75
|
+
InstrumentsIcon,
|
|
76
|
+
OrderIcon,
|
|
77
|
+
ModulesIcon,
|
|
78
|
+
NotificationsIcon,
|
|
79
|
+
VideozonesIcon,
|
|
80
|
+
InstrumentWorkZoneIcon,
|
|
81
|
+
WorkshopIcon,
|
|
82
|
+
WarehousesIcon,
|
|
83
|
+
TeamsIcon,
|
|
84
|
+
RolesIcon,
|
|
85
|
+
PositionsIcon,
|
|
86
|
+
InstrumentOrderIcon,
|
|
87
|
+
PreorderIcon,
|
|
88
|
+
VideowallIcon,
|
|
89
|
+
VideosourcesIcon,
|
|
90
|
+
Tasks_tasksIcon,
|
|
91
|
+
Tasks_todayIcon,
|
|
92
|
+
ArrowFrameIcon,
|
|
93
|
+
}[toPascalCase(props.name)]),
|
|
94
|
+
)
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<style module lang="scss">
|
|
98
|
+
.app-icon {
|
|
99
|
+
stroke: v-bind(color);
|
|
100
|
+
fill: none;
|
|
101
|
+
width: v-bind(size);
|
|
102
|
+
height: v-bind(size);
|
|
103
|
+
}
|
|
104
|
+
</style>
|
|
@@ -1,37 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<q-input
|
|
3
3
|
v-model="value"
|
|
4
|
+
:class="inputClasses"
|
|
4
5
|
standout
|
|
5
6
|
outlined
|
|
6
|
-
clearable
|
|
7
7
|
dense
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
:type="type"
|
|
8
|
+
:type="inputType"
|
|
9
|
+
autocomplete="h87h58g7h8hd"
|
|
11
10
|
:readonly="readonly || field"
|
|
12
|
-
:placeholder="label"
|
|
13
11
|
>
|
|
14
|
-
<template #prepend>
|
|
15
|
-
<q-icon>
|
|
16
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
17
|
-
<path
|
|
18
|
-
d="M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z"
|
|
19
|
-
stroke="#404650"
|
|
20
|
-
stroke-width="1.5"
|
|
21
|
-
stroke-linecap="round"
|
|
22
|
-
stroke-linejoin="round"
|
|
23
|
-
/>
|
|
24
|
-
<path d="M22 22L20 20" stroke="#3F8CFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
25
|
-
</svg>
|
|
26
|
-
</q-icon>
|
|
27
|
-
</template>
|
|
28
12
|
</q-input>
|
|
29
13
|
</template>
|
|
30
14
|
|
|
31
15
|
<script lang="ts" setup>
|
|
32
|
-
import { defineProps, defineEmits, computed, withDefaults } from 'vue'
|
|
33
|
-
|
|
34
|
-
import { ValidationRule, VueClassProp, VueStyleProp } from 'quasar/dist/types/api'
|
|
16
|
+
import { defineProps, defineEmits, computed, ref, withDefaults } from 'vue'
|
|
35
17
|
|
|
36
18
|
interface AppQInputProps {
|
|
37
19
|
name?: string | undefined
|
|
@@ -43,7 +25,7 @@ interface AppQInputProps {
|
|
|
43
25
|
error?: boolean | undefined
|
|
44
26
|
errorMessage?: string | undefined
|
|
45
27
|
noErrorIcon?: boolean | undefined
|
|
46
|
-
rules?:
|
|
28
|
+
rules?: any | undefined
|
|
47
29
|
reactiveRules?: boolean | undefined
|
|
48
30
|
lazyRules?: boolean | 'ondemand' | undefined
|
|
49
31
|
label?: string | undefined
|
|
@@ -62,7 +44,6 @@ interface AppQInputProps {
|
|
|
62
44
|
filled?: boolean | undefined
|
|
63
45
|
outlined?: boolean | undefined
|
|
64
46
|
borderless?: boolean | undefined
|
|
65
|
-
bordered?: boolean | undefined
|
|
66
47
|
standout?: boolean | string | undefined
|
|
67
48
|
labelSlot?: boolean | undefined
|
|
68
49
|
bottomSlots?: boolean | undefined
|
|
@@ -93,8 +74,8 @@ interface AppQInputProps {
|
|
|
93
74
|
debounce?: string | number | undefined
|
|
94
75
|
maxlength?: string | number | undefined
|
|
95
76
|
autogrow?: boolean | undefined
|
|
96
|
-
inputClass?:
|
|
97
|
-
inputStyle?:
|
|
77
|
+
inputClass?: any | undefined
|
|
78
|
+
inputStyle?: any | undefined
|
|
98
79
|
onClear?: (value: any) => void
|
|
99
80
|
'onUpdate:modelValue'?: (value: string | number | null) => void
|
|
100
81
|
onFocus?: (evt: Event) => void
|
|
@@ -107,14 +88,8 @@ interface AppInputProps extends AppQInputProps {
|
|
|
107
88
|
required?: boolean
|
|
108
89
|
datePicker?: boolean
|
|
109
90
|
timePicker?: boolean
|
|
110
|
-
dateLocale?: any
|
|
111
91
|
withIcon?: boolean
|
|
112
|
-
iconName?: string
|
|
113
|
-
iconColor?: string
|
|
114
92
|
withButton?: boolean
|
|
115
|
-
buttonIcon?: string
|
|
116
|
-
buttonTooltip?: string
|
|
117
|
-
clearTooltip?: string
|
|
118
93
|
withArrow?: boolean
|
|
119
94
|
}
|
|
120
95
|
|
|
@@ -126,6 +101,11 @@ const props = withDefaults(defineProps<AppInputProps>(), {
|
|
|
126
101
|
})
|
|
127
102
|
|
|
128
103
|
const emit = defineEmits(['update:modelValue', 'button-click', 'clear', 'focus', 'blur', 'click'])
|
|
104
|
+
const passwordVisibility = ref(false)
|
|
105
|
+
const inputType = computed(() => {
|
|
106
|
+
if (props.type === 'password') return passwordVisibility.value ? 'text' : 'password'
|
|
107
|
+
return props.type || 'text'
|
|
108
|
+
})
|
|
129
109
|
|
|
130
110
|
const value = computed({
|
|
131
111
|
get: () =>
|
|
@@ -135,34 +115,14 @@ const value = computed({
|
|
|
135
115
|
set: (newValue: any) => emit('update:modelValue', props.type === 'number' ? +newValue : newValue),
|
|
136
116
|
})
|
|
137
117
|
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
118
|
+
const inputClasses = computed(() => {
|
|
119
|
+
return {
|
|
120
|
+
'app-input': true,
|
|
121
|
+
'--required': props.required,
|
|
122
|
+
'--field': props.field,
|
|
123
|
+
'input-number-without-arrow': inputType.value === 'number' && !props.withArrow,
|
|
124
|
+
}
|
|
125
|
+
})
|
|
142
126
|
</script>
|
|
143
127
|
|
|
144
|
-
<style lang="scss"
|
|
145
|
-
.app-input {
|
|
146
|
-
&:global(.q-field--outlined .q-field__control) {
|
|
147
|
-
border-radius: 14px;
|
|
148
|
-
height: 48px;
|
|
149
|
-
align-items: center;
|
|
150
|
-
padding: 0 16px;
|
|
151
|
-
color: #87caff;
|
|
152
|
-
}
|
|
153
|
-
:global(.q-field__control-container) {
|
|
154
|
-
margin-left: 8px;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
@media (max-width: 1440px) {
|
|
158
|
-
.app-input {
|
|
159
|
-
&:global(.q-field--outlined .q-field__control) {
|
|
160
|
-
height: 40px;
|
|
161
|
-
padding: 0 12px;
|
|
162
|
-
}
|
|
163
|
-
:global(.q-field__control-container) {
|
|
164
|
-
margin-left: 6px;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
</style>
|
|
128
|
+
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-input
|
|
3
|
+
v-model="value"
|
|
4
|
+
standout
|
|
5
|
+
outlined
|
|
6
|
+
clearable
|
|
7
|
+
dense
|
|
8
|
+
bg-color="white"
|
|
9
|
+
:class="[$style['app-input'], itemClasses]"
|
|
10
|
+
:type="type"
|
|
11
|
+
:readonly="readonly || field"
|
|
12
|
+
:placeholder="label"
|
|
13
|
+
>
|
|
14
|
+
<template #prepend>
|
|
15
|
+
<q-icon>
|
|
16
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
17
|
+
<path
|
|
18
|
+
d="M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z"
|
|
19
|
+
stroke="#404650"
|
|
20
|
+
stroke-width="1.5"
|
|
21
|
+
stroke-linecap="round"
|
|
22
|
+
stroke-linejoin="round"
|
|
23
|
+
/>
|
|
24
|
+
<path d="M22 22L20 20" stroke="#3F8CFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
25
|
+
</svg>
|
|
26
|
+
</q-icon>
|
|
27
|
+
</template>
|
|
28
|
+
</q-input>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script lang="ts" setup>
|
|
32
|
+
import { defineProps, defineEmits, computed, withDefaults } from 'vue'
|
|
33
|
+
|
|
34
|
+
import { ValidationRule, VueClassProp, VueStyleProp } from 'quasar/dist/types/api'
|
|
35
|
+
|
|
36
|
+
interface AppQInputProps {
|
|
37
|
+
name?: string | undefined
|
|
38
|
+
mask?: string | undefined
|
|
39
|
+
fillMask?: boolean | string | undefined
|
|
40
|
+
reverseFillMask?: boolean | undefined
|
|
41
|
+
unmaskedValue?: boolean | undefined
|
|
42
|
+
modelValue: string | number | null | undefined
|
|
43
|
+
error?: boolean | undefined
|
|
44
|
+
errorMessage?: string | undefined
|
|
45
|
+
noErrorIcon?: boolean | undefined
|
|
46
|
+
rules?: ValidationRule[] | undefined
|
|
47
|
+
reactiveRules?: boolean | undefined
|
|
48
|
+
lazyRules?: boolean | 'ondemand' | undefined
|
|
49
|
+
label?: string | undefined
|
|
50
|
+
stackLabel?: boolean | undefined
|
|
51
|
+
hint?: string | undefined
|
|
52
|
+
hideHint?: boolean | undefined
|
|
53
|
+
prefix?: string | undefined
|
|
54
|
+
suffix?: string | undefined
|
|
55
|
+
labelColor?: string | undefined
|
|
56
|
+
color?: string | undefined
|
|
57
|
+
bgColor?: string | undefined
|
|
58
|
+
dark?: boolean | undefined
|
|
59
|
+
loading?: boolean | undefined
|
|
60
|
+
clearable?: boolean | undefined
|
|
61
|
+
clearIcon?: string | undefined
|
|
62
|
+
filled?: boolean | undefined
|
|
63
|
+
outlined?: boolean | undefined
|
|
64
|
+
borderless?: boolean | undefined
|
|
65
|
+
bordered?: boolean | undefined
|
|
66
|
+
standout?: boolean | string | undefined
|
|
67
|
+
labelSlot?: boolean | undefined
|
|
68
|
+
bottomSlots?: boolean | undefined
|
|
69
|
+
hideBottomSpace?: boolean | undefined
|
|
70
|
+
counter?: boolean | undefined
|
|
71
|
+
rounded?: boolean | undefined
|
|
72
|
+
square?: boolean | undefined
|
|
73
|
+
dense?: boolean | undefined
|
|
74
|
+
itemAligned?: boolean | undefined
|
|
75
|
+
disable?: boolean | undefined
|
|
76
|
+
readonly?: boolean | undefined
|
|
77
|
+
autofocus?: boolean | undefined
|
|
78
|
+
for?: string | undefined
|
|
79
|
+
shadowText?: string | undefined
|
|
80
|
+
type?:
|
|
81
|
+
| 'text'
|
|
82
|
+
| 'password'
|
|
83
|
+
| 'textarea'
|
|
84
|
+
| 'email'
|
|
85
|
+
| 'search'
|
|
86
|
+
| 'tel'
|
|
87
|
+
| 'file'
|
|
88
|
+
| 'number'
|
|
89
|
+
| 'url'
|
|
90
|
+
| 'time'
|
|
91
|
+
| 'date'
|
|
92
|
+
| undefined
|
|
93
|
+
debounce?: string | number | undefined
|
|
94
|
+
maxlength?: string | number | undefined
|
|
95
|
+
autogrow?: boolean | undefined
|
|
96
|
+
inputClass?: VueClassProp | undefined
|
|
97
|
+
inputStyle?: VueStyleProp | undefined
|
|
98
|
+
onClear?: (value: any) => void
|
|
99
|
+
'onUpdate:modelValue'?: (value: string | number | null) => void
|
|
100
|
+
onFocus?: (evt: Event) => void
|
|
101
|
+
onBlur?: (evt: Event) => void
|
|
102
|
+
onClick?: (evt: Event) => void
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
interface AppInputProps extends AppQInputProps {
|
|
106
|
+
field?: boolean
|
|
107
|
+
required?: boolean
|
|
108
|
+
datePicker?: boolean
|
|
109
|
+
timePicker?: boolean
|
|
110
|
+
dateLocale?: any
|
|
111
|
+
withIcon?: boolean
|
|
112
|
+
iconName?: string
|
|
113
|
+
iconColor?: string
|
|
114
|
+
withButton?: boolean
|
|
115
|
+
buttonIcon?: string
|
|
116
|
+
buttonTooltip?: string
|
|
117
|
+
clearTooltip?: string
|
|
118
|
+
withArrow?: boolean
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const props = withDefaults(defineProps<AppInputProps>(), {
|
|
122
|
+
dense: true,
|
|
123
|
+
outlined: true,
|
|
124
|
+
error: undefined,
|
|
125
|
+
modelValue: '',
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
const emit = defineEmits(['update:modelValue', 'button-click', 'clear', 'focus', 'blur', 'click'])
|
|
129
|
+
|
|
130
|
+
const value = computed({
|
|
131
|
+
get: () =>
|
|
132
|
+
props.modelValue !== null && props.modelValue !== undefined && props.type === 'number'
|
|
133
|
+
? +props.modelValue
|
|
134
|
+
: props.modelValue,
|
|
135
|
+
set: (newValue: any) => emit('update:modelValue', props.type === 'number' ? +newValue : newValue),
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
const itemClasses = computed(() => ({
|
|
139
|
+
'--dense': props.dense,
|
|
140
|
+
'--bordered': props.bordered,
|
|
141
|
+
}))
|
|
142
|
+
</script>
|
|
143
|
+
|
|
144
|
+
<style lang="scss" module>
|
|
145
|
+
.app-input {
|
|
146
|
+
&:global(.q-field--outlined .q-field__control) {
|
|
147
|
+
border-radius: 14px;
|
|
148
|
+
height: 48px;
|
|
149
|
+
align-items: center;
|
|
150
|
+
padding: 0 16px;
|
|
151
|
+
color: #87caff;
|
|
152
|
+
}
|
|
153
|
+
:global(.q-field__control-container) {
|
|
154
|
+
margin-left: 8px;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
@media (max-width: 1440px) {
|
|
158
|
+
.app-input {
|
|
159
|
+
&:global(.q-field--outlined .q-field__control) {
|
|
160
|
+
height: 40px;
|
|
161
|
+
padding: 0 12px;
|
|
162
|
+
}
|
|
163
|
+
:global(.q-field__control-container) {
|
|
164
|
+
margin-left: 6px;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<q-header :class="$style.header">
|
|
3
3
|
<q-toolbar :class="$style.toolbar">
|
|
4
|
-
<!-- <app-input v-model.trim="text" type="text" label="Поиск по системе" :class="$style['header-search']" />-->
|
|
4
|
+
<!-- <app-input-search v-model.trim="text" type="text" label="Поиск по системе" :class="$style['header-search']" />-->
|
|
5
5
|
<div :class="$style['action-buttons']">
|
|
6
6
|
<slot name="filters-actions"></slot>
|
|
7
7
|
</div>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<script lang="ts" setup>
|
|
31
31
|
import { computed } from 'vue'
|
|
32
|
-
//import AppInput from '@/common/app-input/
|
|
32
|
+
//import AppInput from '@/common/app-input-search/AppInputSearch.vue'
|
|
33
33
|
import AppButton from '@/common/app-button/AppButton.vue'
|
|
34
34
|
import { storeToRefs } from 'pinia'
|
|
35
35
|
import { useAuthStore } from '@/pinia/auth/useAuthStore'
|