hl-core 0.0.7-beta.0 → 0.0.7-beta.2
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/api/index.ts +288 -0
- package/api/interceptors.ts +29 -0
- package/components/Button/Btn.vue +52 -0
- package/components/Button/SortArrow.vue +21 -0
- package/components/Complex/Content.vue +5 -0
- package/components/Complex/Page.vue +32 -0
- package/components/Input/RoundedInput.vue +139 -0
- package/components/Layout/Dialog.vue +80 -0
- package/components/Layout/Header.vue +34 -0
- package/components/Layout/Loader.vue +32 -0
- package/components/Menu/MenuNav.vue +68 -0
- package/components/Menu/MenuNavItem.vue +30 -0
- package/composables/axios.ts +11 -0
- package/composables/classes.ts +923 -0
- package/composables/constants.ts +50 -0
- package/composables/index.ts +129 -1
- package/composables/styles.ts +13 -4
- package/layouts/clear.vue +3 -0
- package/layouts/default.vue +9 -0
- package/models/index.ts +23 -0
- package/nuxt.config.ts +24 -5
- package/package.json +11 -4
- package/plugins/helperFunctionsPlugins.ts +5 -1
- package/plugins/storePlugin.ts +0 -2
- package/plugins/vuetifyPlugin.ts +10 -0
- package/store/data.store.js +1125 -2
- package/store/form.store.js +8 -0
- package/store/messages.ts +4 -3
- package/components/Button/GreenBtn.vue +0 -33
- package/store/app.store.js +0 -12
package/api/index.ts
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { useAxios } from '@/composables/axios';
|
|
2
|
+
import { AxiosRequestConfig } from 'axios';
|
|
3
|
+
|
|
4
|
+
enum Methods {
|
|
5
|
+
GET = 'GET',
|
|
6
|
+
POST = 'POST',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class ApiClass {
|
|
10
|
+
baseURL: string | undefined;
|
|
11
|
+
constructor(baseURL: string | undefined) {
|
|
12
|
+
this.baseURL = baseURL;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
private async axiosCall(config: AxiosRequestConfig) {
|
|
16
|
+
const { data } = await useAxios(this.baseURL as string).request(config);
|
|
17
|
+
return data;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async loginUser(data: {
|
|
21
|
+
login: string;
|
|
22
|
+
password: string;
|
|
23
|
+
numAttempt: number;
|
|
24
|
+
}) {
|
|
25
|
+
return this.axiosCall({
|
|
26
|
+
method: Methods.POST,
|
|
27
|
+
url: '/identity/api/Account/login',
|
|
28
|
+
data: data,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async getNewAccessToken({
|
|
33
|
+
refreshToken,
|
|
34
|
+
accessToken,
|
|
35
|
+
}: {
|
|
36
|
+
refreshToken: string;
|
|
37
|
+
accessToken: string;
|
|
38
|
+
}) {
|
|
39
|
+
return this.axiosCall({
|
|
40
|
+
method: Methods.POST,
|
|
41
|
+
url: '/identity/api/Account/refresh',
|
|
42
|
+
headers: {
|
|
43
|
+
'X-Refresh-Token': refreshToken,
|
|
44
|
+
'X-Access-Token': accessToken,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Страна
|
|
50
|
+
async getCountries() {
|
|
51
|
+
return this.axiosCall({
|
|
52
|
+
method: Methods.GET,
|
|
53
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Country',
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Страна гражданства
|
|
58
|
+
async getCitizenshipCountries() {
|
|
59
|
+
return this.axiosCall({
|
|
60
|
+
method: Methods.GET,
|
|
61
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500012',
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Страна налогового резидетства
|
|
66
|
+
async getTaxCountries() {
|
|
67
|
+
return this.axiosCall({
|
|
68
|
+
method: Methods.GET,
|
|
69
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500014',
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Область
|
|
74
|
+
async getStates() {
|
|
75
|
+
return this.axiosCall({
|
|
76
|
+
method: Methods.GET,
|
|
77
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/State',
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Регион
|
|
82
|
+
async getRegions() {
|
|
83
|
+
return this.axiosCall({
|
|
84
|
+
method: Methods.GET,
|
|
85
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Region',
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Город
|
|
90
|
+
async getCities() {
|
|
91
|
+
return this.axiosCall({
|
|
92
|
+
method: Methods.GET,
|
|
93
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/CityVillage',
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Вид населенного пункта
|
|
98
|
+
async getLocalityTypes() {
|
|
99
|
+
return this.axiosCall({
|
|
100
|
+
method: Methods.GET,
|
|
101
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/LocalityType',
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Тип документа
|
|
106
|
+
async getDocumentTypes() {
|
|
107
|
+
return this.axiosCall({
|
|
108
|
+
method: Methods.GET,
|
|
109
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/DocumentTypePhys',
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Кем выдано
|
|
114
|
+
async getDocumentIssuers() {
|
|
115
|
+
return this.axiosCall({
|
|
116
|
+
method: Methods.GET,
|
|
117
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/DocIssuer',
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Признак резидентства
|
|
122
|
+
async getResidents() {
|
|
123
|
+
return this.axiosCall({
|
|
124
|
+
method: Methods.GET,
|
|
125
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500011',
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Код сектора экономики
|
|
130
|
+
async getSectorCode() {
|
|
131
|
+
return this.axiosCall({
|
|
132
|
+
method: Methods.GET,
|
|
133
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500003',
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Семейное положение
|
|
138
|
+
async getFamilyStatuses() {
|
|
139
|
+
return this.axiosCall({
|
|
140
|
+
method: Methods.GET,
|
|
141
|
+
url: '/Arm/api/Dictionary/GetDictionaryItems/DicFamilyStatus',
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Степень родства
|
|
146
|
+
async getRelationTypes() {
|
|
147
|
+
return this.axiosCall({
|
|
148
|
+
method: Methods.GET,
|
|
149
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Relation',
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
async getContragent(queryData: any) {
|
|
154
|
+
return this.axiosCall({
|
|
155
|
+
method: Methods.GET,
|
|
156
|
+
url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName${queryData.middleName}`,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
async getContragentById(id: any) {
|
|
161
|
+
return this.axiosCall({
|
|
162
|
+
method: Methods.GET,
|
|
163
|
+
url: `/Ekk/api/Contragentinsis/Contragent?PersonId=${id}`,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
async saveContragent(data: any) {
|
|
168
|
+
return this.axiosCall({
|
|
169
|
+
method: Methods.POST,
|
|
170
|
+
url: `/Ekk/api/Contragentinsis/SaveContragent`,
|
|
171
|
+
data: data,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
async getFile(id: any) {
|
|
176
|
+
return await this.axiosCall({
|
|
177
|
+
method: Methods.GET,
|
|
178
|
+
url: `/Arm/api/File/DownloadFile/${id}`,
|
|
179
|
+
responseType: 'arraybuffer',
|
|
180
|
+
headers: {
|
|
181
|
+
'Content-Type': 'application/pdf',
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
async getDicFileTypeList() {
|
|
187
|
+
return this.axiosCall({
|
|
188
|
+
method: Methods.GET,
|
|
189
|
+
url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
async getContrAgentData(personId: any) {
|
|
194
|
+
return this.axiosCall({
|
|
195
|
+
method: Methods.GET,
|
|
196
|
+
url: `/Ekk/api/Contragentinsis/Questionaries?PersonId=${personId}`,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
async getContrAgentContacts(personId: any) {
|
|
201
|
+
return this.axiosCall({
|
|
202
|
+
method: Methods.GET,
|
|
203
|
+
url: `/Ekk/api/Contragentinsis/Contacts?PersonId=${personId}`,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
async getContrAgentDocuments(personId: any) {
|
|
208
|
+
return this.axiosCall({
|
|
209
|
+
method: Methods.GET,
|
|
210
|
+
url: `/Ekk/api/Contragentinsis/Documents?PersonId=${personId}`,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
async getContrAgentAddress(personId: any) {
|
|
215
|
+
return this.axiosCall({
|
|
216
|
+
method: Methods.GET,
|
|
217
|
+
url: `/Ekk/api/Contragentinsis/Address?PersonId=${personId}`,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
async getTaskList(data: any) {
|
|
222
|
+
return this.axiosCall({
|
|
223
|
+
method: Methods.POST,
|
|
224
|
+
url: `/Arm/api/Bpm/TaskList`,
|
|
225
|
+
data: data,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
async getProcessHistory(id: any) {
|
|
230
|
+
return this.axiosCall({
|
|
231
|
+
url: `/Arm/api/Bpm/GetProcessHistory?processInstanceId=${id}`,
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
async sendSms(data: any) {
|
|
236
|
+
return this.axiosCall({
|
|
237
|
+
baseURL: import.meta.env.VITE_SMS_SERVICE as string,
|
|
238
|
+
method: Methods.POST,
|
|
239
|
+
url: '/message',
|
|
240
|
+
data: data,
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
async getUserGroups() {
|
|
245
|
+
return this.axiosCall({
|
|
246
|
+
method: Methods.GET,
|
|
247
|
+
url: '/Arm/api/Bpm/TaskGroups',
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
async getDictionaryItems(dictName: string) {
|
|
252
|
+
return this.axiosCall({
|
|
253
|
+
method: Methods.GET,
|
|
254
|
+
url: `/ekk/api/ContragentInsis/DictionaryItems/${dictName}`,
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
async getOtpStatus(data: any) {
|
|
259
|
+
return this.axiosCall({
|
|
260
|
+
method: Methods.POST,
|
|
261
|
+
url: '/Arm/api/Otp/OtpLifeStatus',
|
|
262
|
+
data: data,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
async sendOtp(data: any) {
|
|
267
|
+
return this.axiosCall({
|
|
268
|
+
method: Methods.POST,
|
|
269
|
+
url: '/Arm/api/Otp/Get',
|
|
270
|
+
data: data,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
async checkOtp(data: any) {
|
|
275
|
+
return this.axiosCall({
|
|
276
|
+
method: Methods.POST,
|
|
277
|
+
url: '/Arm/api/Otp/Check',
|
|
278
|
+
data: data,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
async getProcessList() {
|
|
283
|
+
return this.axiosCall({
|
|
284
|
+
method: Methods.GET,
|
|
285
|
+
url: '/Arm/api/Bpm/ProcessList',
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
|
|
3
|
+
export default function (axios: AxiosInstance) {
|
|
4
|
+
axios.interceptors.request.use(
|
|
5
|
+
request => {
|
|
6
|
+
const dataStore = useDataStore();
|
|
7
|
+
request.headers.Authorization = `Bearer ${dataStore.accessToken}`;
|
|
8
|
+
return request;
|
|
9
|
+
},
|
|
10
|
+
error => {
|
|
11
|
+
return Promise.reject(error);
|
|
12
|
+
},
|
|
13
|
+
);
|
|
14
|
+
axios.interceptors.response.use(
|
|
15
|
+
response => {
|
|
16
|
+
return response;
|
|
17
|
+
},
|
|
18
|
+
error => {
|
|
19
|
+
const dataStore = useDataStore();
|
|
20
|
+
const router = useRouter();
|
|
21
|
+
if (error.response.status === 401) {
|
|
22
|
+
dataStore.$reset();
|
|
23
|
+
localStorage.clear();
|
|
24
|
+
router.push({ name: 'Auth', query: { error: 401 } });
|
|
25
|
+
}
|
|
26
|
+
return Promise.reject(error);
|
|
27
|
+
},
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
type="button"
|
|
4
|
+
class="transition-all"
|
|
5
|
+
@click="$emit('clicked')"
|
|
6
|
+
:disabled="disabled"
|
|
7
|
+
:class="[
|
|
8
|
+
disabled ? 'disabled' : '',
|
|
9
|
+
classes,
|
|
10
|
+
btn,
|
|
11
|
+
$libStyles[`btnH${$capitalize(size)}` as keyof typeof $libStyles],
|
|
12
|
+
]"
|
|
13
|
+
>
|
|
14
|
+
{{ text }}
|
|
15
|
+
</button>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
export default defineComponent({
|
|
20
|
+
name: 'BaseBtn',
|
|
21
|
+
props: {
|
|
22
|
+
text: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: 'Кнопка',
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: 'md',
|
|
29
|
+
},
|
|
30
|
+
classes: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: '',
|
|
33
|
+
},
|
|
34
|
+
disabled: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false,
|
|
37
|
+
},
|
|
38
|
+
btn: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: new Styles().blueBtn,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
setup(props) {},
|
|
45
|
+
});
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<style scoped>
|
|
49
|
+
.disabled {
|
|
50
|
+
opacity: 0.3;
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<i
|
|
3
|
+
class="transition-all mdi mdi-menu-down text-2xl"
|
|
4
|
+
:class="[$dataStore.isColumnAsc[sortKey] === false ? 'mdi-rotate-180' : '']"
|
|
5
|
+
:style="{
|
|
6
|
+
opacity: $dataStore.isColumnAsc[sortKey] === null ? 0 : 1,
|
|
7
|
+
}"
|
|
8
|
+
></i>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: 'BaseSortArrow',
|
|
14
|
+
props: {
|
|
15
|
+
sortKey: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: null,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<base-content class="flex-col" :class="[$libStyles.whiteBg]">
|
|
3
|
+
<base-header
|
|
4
|
+
class="justify-start pl-14"
|
|
5
|
+
:has-back="hasBack"
|
|
6
|
+
:back-icon="backIcon"
|
|
7
|
+
:title="title"
|
|
8
|
+
@onBack="$emit('onBack')"
|
|
9
|
+
></base-header>
|
|
10
|
+
<slot></slot>
|
|
11
|
+
</base-content>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script lang="ts">
|
|
15
|
+
export default defineComponent({
|
|
16
|
+
props: {
|
|
17
|
+
hasBack: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
backIcon: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'mdi-arrow-left',
|
|
24
|
+
},
|
|
25
|
+
title: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: '',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
emits: ['onBack'],
|
|
31
|
+
});
|
|
32
|
+
</script>
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-text-field
|
|
3
|
+
class="rounded-input"
|
|
4
|
+
v-model="fieldModel"
|
|
5
|
+
:rules="rules"
|
|
6
|
+
:loading="loading"
|
|
7
|
+
:placeholder="placeholder"
|
|
8
|
+
:type="type"
|
|
9
|
+
:variant="variant"
|
|
10
|
+
:clear-icon="clearIcon"
|
|
11
|
+
:color="color"
|
|
12
|
+
:hint="hint"
|
|
13
|
+
:clearable="clearable"
|
|
14
|
+
:disabled="disabled"
|
|
15
|
+
:prepend-inner-icon="prependIcon ? prependIcon : ''"
|
|
16
|
+
:append-icon="appendIcon ? appendIcon : ''"
|
|
17
|
+
:bg-color="bgColor ? bgColor : ''"
|
|
18
|
+
@keyup.enter.prevent="submitted"
|
|
19
|
+
>
|
|
20
|
+
<template v-if="loading" #loader>
|
|
21
|
+
<v-progress-linear
|
|
22
|
+
:active="loading"
|
|
23
|
+
:color="color"
|
|
24
|
+
absolute
|
|
25
|
+
height="1"
|
|
26
|
+
indeterminate
|
|
27
|
+
></v-progress-linear>
|
|
28
|
+
</template>
|
|
29
|
+
</v-text-field>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script lang="ts">
|
|
33
|
+
import { InputTypes } from '@/models';
|
|
34
|
+
|
|
35
|
+
export default defineComponent({
|
|
36
|
+
name: 'BaseRoundedInput',
|
|
37
|
+
props: {
|
|
38
|
+
modelValue: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: '',
|
|
41
|
+
},
|
|
42
|
+
loading: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false,
|
|
45
|
+
},
|
|
46
|
+
clearable: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: true,
|
|
49
|
+
},
|
|
50
|
+
disabled: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
54
|
+
placeholder: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: 'Поле',
|
|
57
|
+
},
|
|
58
|
+
hint: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: '',
|
|
61
|
+
},
|
|
62
|
+
rules: {
|
|
63
|
+
type: Array<any>,
|
|
64
|
+
default: [],
|
|
65
|
+
},
|
|
66
|
+
type: {
|
|
67
|
+
type: String as PropType<InputTypes>,
|
|
68
|
+
default: 'text',
|
|
69
|
+
},
|
|
70
|
+
variant: {
|
|
71
|
+
type: String as PropType<
|
|
72
|
+
'solo' | 'filled' | 'outlined' | 'plain' | 'underlined'
|
|
73
|
+
>,
|
|
74
|
+
default: 'solo',
|
|
75
|
+
},
|
|
76
|
+
color: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: '#009c73',
|
|
79
|
+
},
|
|
80
|
+
clearIcon: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: 'mdi-close',
|
|
83
|
+
},
|
|
84
|
+
prependIcon: {
|
|
85
|
+
type: String,
|
|
86
|
+
},
|
|
87
|
+
appendIcon: {
|
|
88
|
+
type: String,
|
|
89
|
+
},
|
|
90
|
+
bgColor: {
|
|
91
|
+
type: String,
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
emits: ['update:modelValue', 'submitted'],
|
|
95
|
+
|
|
96
|
+
setup(props, { emit }) {
|
|
97
|
+
const fieldModel = ref(props.modelValue || '');
|
|
98
|
+
|
|
99
|
+
const updateValue = (event: any) => {
|
|
100
|
+
emit('update:modelValue', fieldModel.value);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const submitted = (event: any) => {
|
|
104
|
+
emit('submitted', event);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
watch(
|
|
108
|
+
fieldModel,
|
|
109
|
+
() => {
|
|
110
|
+
updateValue(fieldModel.value);
|
|
111
|
+
},
|
|
112
|
+
{ immediate: true },
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
fieldModel,
|
|
117
|
+
submitted,
|
|
118
|
+
};
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
</script>
|
|
122
|
+
|
|
123
|
+
<style>
|
|
124
|
+
.rounded-input input:focus {
|
|
125
|
+
border: none !important;
|
|
126
|
+
outline: none !important;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.rounded-input .v-field {
|
|
130
|
+
border-radius: 8px;
|
|
131
|
+
border: 1px solid #dadada;
|
|
132
|
+
box-shadow: none;
|
|
133
|
+
font-size: 14px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.rounded-input .v-field--error {
|
|
137
|
+
border-color: #ff5449;
|
|
138
|
+
}
|
|
139
|
+
</style>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-dialog v-model="fieldModel">
|
|
3
|
+
<v-card
|
|
4
|
+
class="self-center w-full sm:w-3/4 md:w-2/3 lg:w-2/4 xl:w-[600px] rounded-lg !p-2"
|
|
5
|
+
>
|
|
6
|
+
<v-card-title>
|
|
7
|
+
<slot v-if="!title" name="title"></slot>
|
|
8
|
+
{{ title }}
|
|
9
|
+
</v-card-title>
|
|
10
|
+
<v-card-subtitle>
|
|
11
|
+
<slot v-if="!subtitle" name="subtitle"></slot>
|
|
12
|
+
{{ subtitle }}
|
|
13
|
+
</v-card-subtitle>
|
|
14
|
+
<v-card-text>
|
|
15
|
+
<slot v-if="text" name="content"></slot>
|
|
16
|
+
{{ text }}
|
|
17
|
+
</v-card-text>
|
|
18
|
+
<v-card-actions class="gap-[16px]">
|
|
19
|
+
<slot name="actions"></slot>
|
|
20
|
+
</v-card-actions>
|
|
21
|
+
</v-card>
|
|
22
|
+
</v-dialog>
|
|
23
|
+
</template>
|
|
24
|
+
<script lang="ts">
|
|
25
|
+
export default defineComponent({
|
|
26
|
+
name: 'BaseDialog',
|
|
27
|
+
props: {
|
|
28
|
+
modelValue: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false,
|
|
31
|
+
},
|
|
32
|
+
title: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: '',
|
|
35
|
+
},
|
|
36
|
+
subtitle: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: '',
|
|
39
|
+
},
|
|
40
|
+
text: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: '',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
emits: ['update:modelValue', 'submitted'],
|
|
46
|
+
setup(props, { emit }) {
|
|
47
|
+
const fieldModel = ref(props.modelValue);
|
|
48
|
+
|
|
49
|
+
const updateValue = (event: boolean) => {
|
|
50
|
+
fieldModel.value = event;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const submitted = (event: any) => {
|
|
54
|
+
emit('submitted', event);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
watch(
|
|
58
|
+
fieldModel,
|
|
59
|
+
() => {
|
|
60
|
+
emit('update:modelValue', fieldModel.value);
|
|
61
|
+
},
|
|
62
|
+
{ immediate: true },
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
watch(
|
|
66
|
+
() => props.modelValue,
|
|
67
|
+
() => {
|
|
68
|
+
fieldModel.value = props.modelValue;
|
|
69
|
+
},
|
|
70
|
+
{ immediate: true },
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
fieldModel,
|
|
75
|
+
submitted,
|
|
76
|
+
updateValue,
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
</script>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header
|
|
3
|
+
class="relative w-full h-[70px] text-center font-medium align-middle flex items-center border-b-[1px]"
|
|
4
|
+
:class="[$libStyles.blueBgLight, $libStyles.textSimple]"
|
|
5
|
+
>
|
|
6
|
+
<i
|
|
7
|
+
v-if="hasBack"
|
|
8
|
+
@click="$emit('onBack')"
|
|
9
|
+
class="absolute left-5 mdi text-lg cursor-pointer"
|
|
10
|
+
:class="[backIcon]"
|
|
11
|
+
></i>
|
|
12
|
+
{{ title }}
|
|
13
|
+
</header>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts">
|
|
17
|
+
export default defineComponent({
|
|
18
|
+
props: {
|
|
19
|
+
hasBack: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false,
|
|
22
|
+
},
|
|
23
|
+
backIcon: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'mdi-arrow-left',
|
|
26
|
+
},
|
|
27
|
+
title: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: '',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
emits: ['onBack'],
|
|
33
|
+
});
|
|
34
|
+
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-progress-circular
|
|
3
|
+
:size="size"
|
|
4
|
+
:indeterminate="indeterminate"
|
|
5
|
+
:color="color"
|
|
6
|
+
:bg-color="bgColor"
|
|
7
|
+
></v-progress-circular>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
export default defineComponent({
|
|
12
|
+
name: 'BaseLoader',
|
|
13
|
+
props: {
|
|
14
|
+
size: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 40,
|
|
17
|
+
},
|
|
18
|
+
indeterminate: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true,
|
|
21
|
+
},
|
|
22
|
+
color: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: '#FAB31C',
|
|
25
|
+
},
|
|
26
|
+
bgColor: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: '#009C73',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
</script>
|