shared-ritm 1.3.132 → 1.3.133
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 +14558 -12665
- package/dist/shared-ritm.umd.js +600 -597
- package/dist/types/api/services/UserService.d.ts +9 -1
- package/dist/types/api/types/Api_User.d.ts +24 -0
- package/package.json +5 -1
- package/src/api/services/AuthService.ts +67 -67
- package/src/api/services/UserService.ts +151 -129
- package/src/api/types/Api_User.ts +186 -161
- package/src/common/app-select/AppSelect.vue +167 -167
|
@@ -1,161 +1,186 @@
|
|
|
1
|
-
import { Api_Tasks_Status_Dto } from '@/api/types/Api_Tasks'
|
|
2
|
-
import { Api_Instrument } from '@/api/types/Api_Instruments'
|
|
3
|
-
import { Api_Search_User_Passes, Api_Search_User_Positions } from '@/api/types/Api_Search'
|
|
4
|
-
|
|
5
|
-
export type
|
|
6
|
-
id: string
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
1
|
+
import { Api_Tasks_Status_Dto } from '@/api/types/Api_Tasks'
|
|
2
|
+
import { Api_Instrument } from '@/api/types/Api_Instruments'
|
|
3
|
+
import { Api_Search_User_Passes, Api_Search_User_Positions } from '@/api/types/Api_Search'
|
|
4
|
+
|
|
5
|
+
export type Api_Visitor_Dto = {
|
|
6
|
+
id: string
|
|
7
|
+
entry_at: string
|
|
8
|
+
exit_at: null | string
|
|
9
|
+
in_zone: boolean
|
|
10
|
+
is_auto: boolean
|
|
11
|
+
user: {
|
|
12
|
+
id: string
|
|
13
|
+
email: string
|
|
14
|
+
full_name: string
|
|
15
|
+
divisions: string
|
|
16
|
+
}
|
|
17
|
+
task: {
|
|
18
|
+
id: string
|
|
19
|
+
name: string
|
|
20
|
+
state_id: string
|
|
21
|
+
project_id: string
|
|
22
|
+
status: {
|
|
23
|
+
id: string
|
|
24
|
+
name: string
|
|
25
|
+
title: string
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type Api_User_Team = {
|
|
31
|
+
id: string
|
|
32
|
+
name: string
|
|
33
|
+
display_name: string
|
|
34
|
+
description: string
|
|
35
|
+
created_at: string
|
|
36
|
+
updated_at: string
|
|
37
|
+
pivot?: {
|
|
38
|
+
team_id: string
|
|
39
|
+
user_id: string
|
|
40
|
+
}
|
|
41
|
+
roles?: Api_User_Role[]
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type Api_User_Team_Search = {
|
|
45
|
+
id: string
|
|
46
|
+
name: string
|
|
47
|
+
display_name: string
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type Api_User_Photo = {
|
|
51
|
+
id: string
|
|
52
|
+
name: string
|
|
53
|
+
path: string
|
|
54
|
+
type: string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type Api_User_Archive_History_Item = {
|
|
58
|
+
user_id: string
|
|
59
|
+
responsible_id: string
|
|
60
|
+
archived_at: string
|
|
61
|
+
reason: string | null
|
|
62
|
+
restored_at: string | null
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type Api_User_Task = {
|
|
66
|
+
id: string
|
|
67
|
+
name: string
|
|
68
|
+
project_id: string
|
|
69
|
+
status: Api_Tasks_Status_Dto
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type Api_User = {
|
|
73
|
+
id: string
|
|
74
|
+
RFID: string
|
|
75
|
+
avatar: unknown | null
|
|
76
|
+
avatar_id: string | null
|
|
77
|
+
change_password: string
|
|
78
|
+
created_at: string
|
|
79
|
+
updated_at: string
|
|
80
|
+
deleted_at: string | null
|
|
81
|
+
dismissal_at: string | null
|
|
82
|
+
email_verified_at: string
|
|
83
|
+
divisions: string
|
|
84
|
+
email: string
|
|
85
|
+
face_recognition_id: string | null
|
|
86
|
+
first_name: string
|
|
87
|
+
full_name: string
|
|
88
|
+
last_name: string
|
|
89
|
+
patronymic: string
|
|
90
|
+
personnel_number: number
|
|
91
|
+
phone: string
|
|
92
|
+
profession: string
|
|
93
|
+
teams: Api_User_Team[]
|
|
94
|
+
photos: Api_User_Photo[]
|
|
95
|
+
archiveHistory: Api_User_Archive_History_Item[]
|
|
96
|
+
assigned_tasks?: Api_User_Task[]
|
|
97
|
+
responsible_tasks?: Api_User_Task[]
|
|
98
|
+
passes?: Api_Search_User_Passes[]
|
|
99
|
+
positions: Api_Search_User_Positions[]
|
|
100
|
+
warehouses?: Partial<Api_User_Warehouse>[]
|
|
101
|
+
brigades: { id: string; name: string }[]
|
|
102
|
+
password_change_available_at: string
|
|
103
|
+
password_change_due_at: string
|
|
104
|
+
password_last_changed_at: string
|
|
105
|
+
has_video_analytics_photo?: boolean
|
|
106
|
+
calc_performance_median?: number | null
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type Api_User_Change_Password_Payload = {
|
|
110
|
+
email: string
|
|
111
|
+
password: string
|
|
112
|
+
currentPassword: string
|
|
113
|
+
passwordConfirmation: string
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type Api_User_Create = {
|
|
117
|
+
last_name?: string
|
|
118
|
+
first_name?: string
|
|
119
|
+
patronymic?: string
|
|
120
|
+
email?: string
|
|
121
|
+
phone?: string
|
|
122
|
+
divisions?: string
|
|
123
|
+
positions?: [string]
|
|
124
|
+
teams?: {
|
|
125
|
+
team_id: string
|
|
126
|
+
roles: string[]
|
|
127
|
+
}[]
|
|
128
|
+
current_password?: string
|
|
129
|
+
password?: string
|
|
130
|
+
password_confirmation?: string
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export type Api_User_Permission = {
|
|
134
|
+
id: string
|
|
135
|
+
name: string
|
|
136
|
+
display_name: string
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export type Api_User_Role = {
|
|
140
|
+
id: string
|
|
141
|
+
name: string
|
|
142
|
+
display_name: string
|
|
143
|
+
permissions?: Api_User_Permission[]
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export type Api_User_Position_Type = 'admin' | 'worker' | null
|
|
147
|
+
|
|
148
|
+
export type Api_User_Position = {
|
|
149
|
+
id: string
|
|
150
|
+
name: string
|
|
151
|
+
display_name: string
|
|
152
|
+
description?: string
|
|
153
|
+
type?: Api_User_Position_Type
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export type Api_User_Delete_Body = {
|
|
157
|
+
user_id: string
|
|
158
|
+
archive_reason?: string
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export type Api_User_Delete_Photos_Body = {
|
|
162
|
+
user_id: string
|
|
163
|
+
photos?: string[]
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type Api_User_Warehouse = Pick<
|
|
167
|
+
Api_Instrument,
|
|
168
|
+
| 'id'
|
|
169
|
+
| 'RFID'
|
|
170
|
+
| 'instrument_type'
|
|
171
|
+
| 'inventory_number'
|
|
172
|
+
| 'location'
|
|
173
|
+
| 'misplacement'
|
|
174
|
+
| 'module'
|
|
175
|
+
| 'name'
|
|
176
|
+
| 'responsible'
|
|
177
|
+
| 'status'
|
|
178
|
+
| 'storage'
|
|
179
|
+
| 'updated_at'
|
|
180
|
+
> & {
|
|
181
|
+
issued_in: string | null
|
|
182
|
+
registry: {
|
|
183
|
+
id: string
|
|
184
|
+
title: string
|
|
185
|
+
} | null
|
|
186
|
+
}
|
|
@@ -1,167 +1,167 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-select
|
|
3
|
-
ref="select"
|
|
4
|
-
v-model="selected"
|
|
5
|
-
:data-test="dataTest"
|
|
6
|
-
:options="filteredOptions"
|
|
7
|
-
:option-value="optionValue"
|
|
8
|
-
:option-label="optionLabel"
|
|
9
|
-
emit-value
|
|
10
|
-
map-options
|
|
11
|
-
:disable="isDisabled"
|
|
12
|
-
:multiple="multiple"
|
|
13
|
-
outlined
|
|
14
|
-
stack-label
|
|
15
|
-
:use-input="search"
|
|
16
|
-
:class="[$style.select]"
|
|
17
|
-
:label="label"
|
|
18
|
-
input-debounce="100"
|
|
19
|
-
:popup-content-class="$style['app-select__menu']"
|
|
20
|
-
:clearable="clearable"
|
|
21
|
-
rounded
|
|
22
|
-
autocomplete=""
|
|
23
|
-
@filter="filterFn"
|
|
24
|
-
>
|
|
25
|
-
<template v-if="multiple && hideChips" #selected>
|
|
26
|
-
<div v-if="Array.isArray(selected) && selected.length" class="q-field__input">
|
|
27
|
-
<span class="selected-counter">Выбрано: {{ selected.length }} </span>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<template v-else-if="multiple" #selected-item="scope">
|
|
32
|
-
<q-chip
|
|
33
|
-
v-if="scope.opt"
|
|
34
|
-
removable
|
|
35
|
-
class="q-ma-none"
|
|
36
|
-
dense
|
|
37
|
-
:tabindex="scope.tabindex"
|
|
38
|
-
color="white"
|
|
39
|
-
text-color="secondary"
|
|
40
|
-
@remove="scope.removeAtIndex(scope.index)"
|
|
41
|
-
>
|
|
42
|
-
{{ scope.opt[`${optionLabel}`] }}
|
|
43
|
-
</q-chip>
|
|
44
|
-
</template>
|
|
45
|
-
<template #no-option>
|
|
46
|
-
<q-item>{{ emptyText }}</q-item>
|
|
47
|
-
</template>
|
|
48
|
-
<q-item v-if="!lcText && type()">{{ placeholder }}</q-item>
|
|
49
|
-
</q-select>
|
|
50
|
-
</template>
|
|
51
|
-
<script setup lang="ts">
|
|
52
|
-
import { computed, defineEmits, defineProps, ref, Ref } from 'vue'
|
|
53
|
-
|
|
54
|
-
import { QSelect } from 'quasar'
|
|
55
|
-
|
|
56
|
-
type Option = Record<string, any>
|
|
57
|
-
|
|
58
|
-
interface AppQSelectProps {
|
|
59
|
-
modelValue: any
|
|
60
|
-
options: Option[]
|
|
61
|
-
placeholder: string
|
|
62
|
-
emptyText: string
|
|
63
|
-
optionLabel?: string
|
|
64
|
-
optionValue?: string
|
|
65
|
-
label?: string
|
|
66
|
-
multiple?: boolean
|
|
67
|
-
borderColor: string
|
|
68
|
-
isDisabled?: boolean
|
|
69
|
-
clearable?: boolean
|
|
70
|
-
search?: boolean
|
|
71
|
-
dataTest?: string
|
|
72
|
-
hideChips?: boolean
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
const props = defineProps<AppQSelectProps>()
|
|
76
|
-
const select = ref({})
|
|
77
|
-
const emit = defineEmits(['update:modelValue'])
|
|
78
|
-
const selected = computed({
|
|
79
|
-
get() {
|
|
80
|
-
return props.modelValue
|
|
81
|
-
},
|
|
82
|
-
set(value) {
|
|
83
|
-
emit('update:modelValue', value)
|
|
84
|
-
},
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
const type = () => {
|
|
88
|
-
if (Array.isArray(selected.value) || props.multiple) return !selected.value?.length
|
|
89
|
-
|
|
90
|
-
return !selected.value
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const lcText: Ref<string> = ref('')
|
|
94
|
-
const filteredOptions = computed(() => {
|
|
95
|
-
return props.options.filter(x => (x[props?.optionLabel || 'label'] || '-').toLowerCase().includes(lcText.value))
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
function filterFn(val: string, update: (arg0: () => void) => void) {
|
|
99
|
-
update(() => {
|
|
100
|
-
lcText.value = val.toLowerCase()
|
|
101
|
-
})
|
|
102
|
-
}
|
|
103
|
-
</script>
|
|
104
|
-
<style module lang="scss">
|
|
105
|
-
.wrap {
|
|
106
|
-
position: relative;
|
|
107
|
-
|
|
108
|
-
&:global(.--option-tree) {
|
|
109
|
-
cursor: pointer;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.select {
|
|
114
|
-
&:global(.q-field--outlined.q-field--rounded .q-field__control) {
|
|
115
|
-
border-radius: 14px;
|
|
116
|
-
}
|
|
117
|
-
&:global(.q-field--outlined .q-field__control:before) {
|
|
118
|
-
border-color: v-bind(borderColor);
|
|
119
|
-
}
|
|
120
|
-
&:global(.q-select .q-field__input) {
|
|
121
|
-
padding: 0 6px;
|
|
122
|
-
}
|
|
123
|
-
//&:global(.q-field--filled .q-field__control) {
|
|
124
|
-
// //color: red;
|
|
125
|
-
//}
|
|
126
|
-
//&:global(.q-field--filled.q-field--focused .q-field__control) {
|
|
127
|
-
//}
|
|
128
|
-
//&:global(.q-field--filled .q-field__control:after) {
|
|
129
|
-
// left: 8px;
|
|
130
|
-
// right: 8px;
|
|
131
|
-
//}
|
|
132
|
-
&:global(.q-field--outlined .q-item) {
|
|
133
|
-
color: #1d1d1d;
|
|
134
|
-
position: absolute;
|
|
135
|
-
padding: 0 4px;
|
|
136
|
-
top: 18px;
|
|
137
|
-
left: 0;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.append-wrapper {
|
|
142
|
-
display: flex;
|
|
143
|
-
align-items: center;
|
|
144
|
-
column-gap: 4px;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.menu-wrap {
|
|
148
|
-
padding: 8px;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.search-wrapper {
|
|
152
|
-
position: sticky;
|
|
153
|
-
top: 0;
|
|
154
|
-
padding: 4px;
|
|
155
|
-
background: var(--main-bg);
|
|
156
|
-
z-index: 1;
|
|
157
|
-
}
|
|
158
|
-
.app-select__menu {
|
|
159
|
-
border-radius: 14px;
|
|
160
|
-
.q-item__label {
|
|
161
|
-
word-break: break-word;
|
|
162
|
-
}
|
|
163
|
-
&:global(.q-menu) {
|
|
164
|
-
max-height: 200px !important;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-select
|
|
3
|
+
ref="select"
|
|
4
|
+
v-model="selected"
|
|
5
|
+
:data-test="dataTest"
|
|
6
|
+
:options="filteredOptions"
|
|
7
|
+
:option-value="optionValue"
|
|
8
|
+
:option-label="optionLabel"
|
|
9
|
+
emit-value
|
|
10
|
+
map-options
|
|
11
|
+
:disable="isDisabled"
|
|
12
|
+
:multiple="multiple"
|
|
13
|
+
outlined
|
|
14
|
+
stack-label
|
|
15
|
+
:use-input="search"
|
|
16
|
+
:class="[$style.select]"
|
|
17
|
+
:label="label"
|
|
18
|
+
input-debounce="100"
|
|
19
|
+
:popup-content-class="$style['app-select__menu']"
|
|
20
|
+
:clearable="clearable"
|
|
21
|
+
rounded
|
|
22
|
+
autocomplete=""
|
|
23
|
+
@filter="filterFn"
|
|
24
|
+
>
|
|
25
|
+
<template v-if="multiple && hideChips" #selected>
|
|
26
|
+
<div v-if="Array.isArray(selected) && selected.length" class="q-field__input">
|
|
27
|
+
<span class="selected-counter">Выбрано: {{ selected.length }} </span>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<template v-else-if="multiple" #selected-item="scope">
|
|
32
|
+
<q-chip
|
|
33
|
+
v-if="scope.opt"
|
|
34
|
+
removable
|
|
35
|
+
class="q-ma-none"
|
|
36
|
+
dense
|
|
37
|
+
:tabindex="scope.tabindex"
|
|
38
|
+
color="white"
|
|
39
|
+
text-color="secondary"
|
|
40
|
+
@remove="scope.removeAtIndex(scope.index)"
|
|
41
|
+
>
|
|
42
|
+
{{ scope.opt[`${optionLabel}`] }}
|
|
43
|
+
</q-chip>
|
|
44
|
+
</template>
|
|
45
|
+
<template #no-option>
|
|
46
|
+
<q-item>{{ emptyText }}</q-item>
|
|
47
|
+
</template>
|
|
48
|
+
<q-item v-if="!lcText && type()">{{ placeholder }}</q-item>
|
|
49
|
+
</q-select>
|
|
50
|
+
</template>
|
|
51
|
+
<script setup lang="ts">
|
|
52
|
+
import { computed, defineEmits, defineProps, ref, Ref } from 'vue'
|
|
53
|
+
|
|
54
|
+
import { QSelect } from 'quasar'
|
|
55
|
+
|
|
56
|
+
type Option = Record<string, any>
|
|
57
|
+
|
|
58
|
+
interface AppQSelectProps {
|
|
59
|
+
modelValue: any
|
|
60
|
+
options: Option[]
|
|
61
|
+
placeholder: string
|
|
62
|
+
emptyText: string
|
|
63
|
+
optionLabel?: string
|
|
64
|
+
optionValue?: string
|
|
65
|
+
label?: string
|
|
66
|
+
multiple?: boolean
|
|
67
|
+
borderColor: string
|
|
68
|
+
isDisabled?: boolean
|
|
69
|
+
clearable?: boolean
|
|
70
|
+
search?: boolean
|
|
71
|
+
dataTest?: string
|
|
72
|
+
hideChips?: boolean
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const props = defineProps<AppQSelectProps>()
|
|
76
|
+
const select = ref({})
|
|
77
|
+
const emit = defineEmits(['update:modelValue'])
|
|
78
|
+
const selected = computed({
|
|
79
|
+
get() {
|
|
80
|
+
return props.modelValue
|
|
81
|
+
},
|
|
82
|
+
set(value) {
|
|
83
|
+
emit('update:modelValue', value)
|
|
84
|
+
},
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
const type = () => {
|
|
88
|
+
if (Array.isArray(selected.value) || props.multiple) return !selected.value?.length
|
|
89
|
+
|
|
90
|
+
return !selected.value
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const lcText: Ref<string> = ref('')
|
|
94
|
+
const filteredOptions = computed(() => {
|
|
95
|
+
return props.options.filter(x => (x[props?.optionLabel || 'label'] || '-').toLowerCase().includes(lcText.value))
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
function filterFn(val: string, update: (arg0: () => void) => void) {
|
|
99
|
+
update(() => {
|
|
100
|
+
lcText.value = val.toLowerCase()
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
</script>
|
|
104
|
+
<style module lang="scss">
|
|
105
|
+
.wrap {
|
|
106
|
+
position: relative;
|
|
107
|
+
|
|
108
|
+
&:global(.--option-tree) {
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.select {
|
|
114
|
+
&:global(.q-field--outlined.q-field--rounded .q-field__control) {
|
|
115
|
+
border-radius: 14px;
|
|
116
|
+
}
|
|
117
|
+
&:global(.q-field--outlined .q-field__control:before) {
|
|
118
|
+
border-color: v-bind(borderColor);
|
|
119
|
+
}
|
|
120
|
+
&:global(.q-select .q-field__input) {
|
|
121
|
+
padding: 0 6px;
|
|
122
|
+
}
|
|
123
|
+
//&:global(.q-field--filled .q-field__control) {
|
|
124
|
+
// //color: red;
|
|
125
|
+
//}
|
|
126
|
+
//&:global(.q-field--filled.q-field--focused .q-field__control) {
|
|
127
|
+
//}
|
|
128
|
+
//&:global(.q-field--filled .q-field__control:after) {
|
|
129
|
+
// left: 8px;
|
|
130
|
+
// right: 8px;
|
|
131
|
+
//}
|
|
132
|
+
&:global(.q-field--outlined .q-item) {
|
|
133
|
+
color: #1d1d1d;
|
|
134
|
+
position: absolute;
|
|
135
|
+
padding: 0 4px;
|
|
136
|
+
top: 18px;
|
|
137
|
+
left: 0;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.append-wrapper {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
column-gap: 4px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.menu-wrap {
|
|
148
|
+
padding: 8px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.search-wrapper {
|
|
152
|
+
position: sticky;
|
|
153
|
+
top: 0;
|
|
154
|
+
padding: 4px;
|
|
155
|
+
background: var(--main-bg);
|
|
156
|
+
z-index: 1;
|
|
157
|
+
}
|
|
158
|
+
.app-select__menu {
|
|
159
|
+
border-radius: 14px;
|
|
160
|
+
.q-item__label {
|
|
161
|
+
word-break: break-word;
|
|
162
|
+
}
|
|
163
|
+
&:global(.q-menu) {
|
|
164
|
+
max-height: 200px !important;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
</style>
|