hl-core 0.0.7-beta.7 → 0.0.7-beta.9
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 +275 -3
- package/components/Input/RoundedInput.vue +5 -0
- package/components/Layout/Drawer.vue +42 -0
- package/components/Layout/Loader.vue +9 -0
- package/components/Layout/SettingsPanel.vue +55 -67
- package/components/Menu/MenuNav.vue +22 -4
- package/components/Menu/MenuNavItem.vue +2 -1
- package/components/Panel/PanelItem.vue +7 -0
- package/composables/classes.ts +138 -27
- package/composables/constants.ts +2 -0
- package/composables/index.ts +43 -0
- package/layouts/default.vue +8 -1
- package/layouts/full.vue +8 -1
- package/package.json +2 -1
- package/plugins/helperFunctionsPlugins.ts +2 -0
- package/store/data.store.js +2646 -235
- package/store/messages.ts +101 -3
- package/components/Layout/Panel.vue +0 -33
package/api/index.ts
CHANGED
|
@@ -8,13 +8,25 @@ enum Methods {
|
|
|
8
8
|
|
|
9
9
|
export class ApiClass {
|
|
10
10
|
baseURL: string | undefined;
|
|
11
|
-
|
|
11
|
+
productUrl: string | undefined;
|
|
12
|
+
|
|
13
|
+
constructor(baseURL?: string | undefined, productUrl?: string | undefined) {
|
|
12
14
|
this.baseURL = baseURL;
|
|
15
|
+
this.productUrl = productUrl;
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
private async axiosCall(config: AxiosRequestConfig) {
|
|
16
|
-
const
|
|
17
|
-
|
|
19
|
+
const dataStore = useDataStore();
|
|
20
|
+
if (
|
|
21
|
+
(dataStore.isEFO && this.baseURL) ||
|
|
22
|
+
(!dataStore.isEFO && this.baseURL && this.productUrl)
|
|
23
|
+
) {
|
|
24
|
+
const { data } = await useAxios(this.baseURL as string).request(config);
|
|
25
|
+
return data;
|
|
26
|
+
} else {
|
|
27
|
+
console.error('No Axios baseURL or productURL');
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
18
30
|
}
|
|
19
31
|
|
|
20
32
|
async loginUser(data: {
|
|
@@ -70,6 +82,13 @@ export class ApiClass {
|
|
|
70
82
|
});
|
|
71
83
|
}
|
|
72
84
|
|
|
85
|
+
async getAdditionalTaxCountries() {
|
|
86
|
+
return this.axiosCall({
|
|
87
|
+
method: Methods.GET,
|
|
88
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=507777',
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
73
92
|
// Область
|
|
74
93
|
async getStates() {
|
|
75
94
|
return this.axiosCall({
|
|
@@ -157,6 +176,52 @@ export class ApiClass {
|
|
|
157
176
|
});
|
|
158
177
|
}
|
|
159
178
|
|
|
179
|
+
async definedAnswers(filter: string) {
|
|
180
|
+
return this.axiosCall({
|
|
181
|
+
method: Methods.GET,
|
|
182
|
+
url: `/ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${filter}`,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
async setSurvey(surveyData: any) {
|
|
187
|
+
return this.axiosCall({
|
|
188
|
+
method: Methods.POST,
|
|
189
|
+
data: surveyData,
|
|
190
|
+
url: `/${this.productUrl}/api/Application/SetAnketa`,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
async getQuestionRefs(id: string | number) {
|
|
195
|
+
return this.axiosCall({
|
|
196
|
+
method: Methods.GET,
|
|
197
|
+
url: `/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${id}`,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
async getProcessIndexRate(processCode: string | number) {
|
|
202
|
+
return this.axiosCall({
|
|
203
|
+
method: Methods.GET,
|
|
204
|
+
url: `/Arm/api/Dictionary/ProcessIndexRate/${processCode}`,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
async getAdditionalInsuranceTermsAnswers(
|
|
209
|
+
processCode: string | number,
|
|
210
|
+
questionId: string,
|
|
211
|
+
) {
|
|
212
|
+
return this.axiosCall({
|
|
213
|
+
method: Methods.GET,
|
|
214
|
+
url: `/Arm/api/Dictionary/ProcessCoverTypeSum/${processCode}/${questionId}`,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
async getProcessPaymentPeriod(processCode: string | number) {
|
|
219
|
+
return this.axiosCall({
|
|
220
|
+
method: Methods.GET,
|
|
221
|
+
url: `/Arm/api/Dictionary/ProcessPaymentPeriod/${processCode}`,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
160
225
|
async getContragentById(id: any) {
|
|
161
226
|
return this.axiosCall({
|
|
162
227
|
method: Methods.GET,
|
|
@@ -286,4 +351,211 @@ export class ApiClass {
|
|
|
286
351
|
timeout: 10000,
|
|
287
352
|
});
|
|
288
353
|
}
|
|
354
|
+
|
|
355
|
+
async startApplication(data: any) {
|
|
356
|
+
return this.axiosCall({
|
|
357
|
+
method: Methods.POST,
|
|
358
|
+
url: `/${this.productUrl}/api/Application/StartApplication`,
|
|
359
|
+
data: data,
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
async getApplicationData(id: string) {
|
|
364
|
+
return this.axiosCall({
|
|
365
|
+
url: `/${this.productUrl}/api/Application/applicationData?Id=${id} `,
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
async getCalculation(id: string) {
|
|
370
|
+
return this.axiosCall({
|
|
371
|
+
method: Methods.POST,
|
|
372
|
+
url: `/${this.productUrl}/api/Application/Calculator?processInstanceId=${id}`,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
async setApplication(data: any) {
|
|
377
|
+
return this.axiosCall({
|
|
378
|
+
method: Methods.POST,
|
|
379
|
+
url: `/${this.productUrl}/api/Application/SetApplicationData`,
|
|
380
|
+
data,
|
|
381
|
+
responseType: 'blob',
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
async generatePdfDocument(data: any) {
|
|
386
|
+
return await this.axiosCall({
|
|
387
|
+
method: Methods.POST,
|
|
388
|
+
url: `/Arm/api/Bpm/GeneratePdfDocument`,
|
|
389
|
+
responseType: 'blob',
|
|
390
|
+
data: data,
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
async deleteFile(data: any) {
|
|
395
|
+
return this.axiosCall({
|
|
396
|
+
method: Methods.POST,
|
|
397
|
+
url: '/Arm/api/File/DeleteFiles',
|
|
398
|
+
data: data,
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
async uploadFiles(data: any) {
|
|
403
|
+
return this.axiosCall({
|
|
404
|
+
method: Methods.POST,
|
|
405
|
+
url: '/Arm/api/File/UploadFiles',
|
|
406
|
+
headers: {
|
|
407
|
+
'Content-Type': 'multipart/form-data',
|
|
408
|
+
},
|
|
409
|
+
data: data,
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
async sendTask(data: any) {
|
|
414
|
+
return this.axiosCall({
|
|
415
|
+
method: Methods.POST,
|
|
416
|
+
url: `/${this.productUrl}/api/Application/SendTask`,
|
|
417
|
+
data: data,
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
async setMember(whichMember: string, data: any) {
|
|
422
|
+
return this.axiosCall({
|
|
423
|
+
method: Methods.POST,
|
|
424
|
+
url: `/Arm/api/BpmMembers/Set${whichMember}`,
|
|
425
|
+
data: data,
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
async deleteMember(whichMember: string, id: number | string) {
|
|
430
|
+
return this.axiosCall({
|
|
431
|
+
method: Methods.POST,
|
|
432
|
+
url: `/Arm/api/BpmMembers/Delete${whichMember}/${id}`,
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
async getInvoiceData(processInstanceId: string) {
|
|
437
|
+
return this.axiosCall({
|
|
438
|
+
method: Methods.GET,
|
|
439
|
+
url: `/Arm/api/Invoice/InvoiceData?processInstanceId=${processInstanceId}`,
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
async createInvoice(processInstanceId: string, amount: number | string) {
|
|
444
|
+
return this.axiosCall({
|
|
445
|
+
method: Methods.POST,
|
|
446
|
+
url: `/Arm/api/Invoice/CreateInvoice/${processInstanceId}/${amount}`,
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
async sendToEpay(processInstanceId: string) {
|
|
451
|
+
return this.axiosCall({
|
|
452
|
+
method: Methods.POST,
|
|
453
|
+
url: `/Arm/api/Invoice/SendToEpay/${processInstanceId}`,
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
async signToDocument(data: any) {
|
|
458
|
+
return this.axiosCall({
|
|
459
|
+
method: Methods.POST,
|
|
460
|
+
url: '/Arm/api/Bpm/SignDocument',
|
|
461
|
+
data: data,
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
async getSignedDocList(data: any) {
|
|
466
|
+
return this.axiosCall({
|
|
467
|
+
method: Methods.POST,
|
|
468
|
+
url: '/Arm/api/File/List',
|
|
469
|
+
data: data,
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
async reCalculate(data: any) {
|
|
474
|
+
return this.axiosCall({
|
|
475
|
+
method: Methods.POST,
|
|
476
|
+
url: `/${this.productUrl}/api/Application/Recalculate`,
|
|
477
|
+
data: data,
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
async getValidateClientESBD(data: any) {
|
|
482
|
+
return this.axiosCall({
|
|
483
|
+
method: Methods.POST,
|
|
484
|
+
url: '/externalservices/api/ExternalServices/GetValidateClientEsbd',
|
|
485
|
+
data: data,
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
async isClaimTask(taskId: string) {
|
|
490
|
+
return this.axiosCall({
|
|
491
|
+
method: Methods.POST,
|
|
492
|
+
url: '/Arm/api/Bpm/IsClaimTask',
|
|
493
|
+
params: { TaskId: taskId },
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
async claimTask(taskId: string) {
|
|
498
|
+
return this.axiosCall({
|
|
499
|
+
method: Methods.POST,
|
|
500
|
+
url: '/Arm/api/Bpm/ClaimTaskUser',
|
|
501
|
+
params: { TaskId: taskId },
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
async getContragentFromGBDFL(data: any) {
|
|
506
|
+
return this.axiosCall({
|
|
507
|
+
method: Methods.POST,
|
|
508
|
+
url: '/externalservices/api/ExternalServices/GetGbdflToken',
|
|
509
|
+
data: data,
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
async getProcessTariff(code: number | string = 5) {
|
|
514
|
+
return this.axiosCall({ url: `/arm/api/Dictionary/ProcessTariff/${code}` });
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
async setConfirmation(data: any) {
|
|
518
|
+
return this.axiosCall({
|
|
519
|
+
method: Methods.POST,
|
|
520
|
+
url: '/Arm/api/UnderwritingCouncil/SetConfirmation',
|
|
521
|
+
data: data,
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
async getUnderwritingCouncilData(id: string | number) {
|
|
526
|
+
return this.axiosCall({
|
|
527
|
+
method: Methods.GET,
|
|
528
|
+
url: `/Arm/api/UnderwritingCouncil/ApplicationData?Id=${id}`,
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
async sendUnderwritingCouncilTask(data: any) {
|
|
533
|
+
return this.axiosCall({
|
|
534
|
+
method: Methods.POST,
|
|
535
|
+
url: '/arm/api/UnderwritingCouncil/SendTask',
|
|
536
|
+
data: data,
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
async filterManagerByRegion(dictName: string, filterName: string) {
|
|
541
|
+
return this.axiosCall({
|
|
542
|
+
method: Methods.GET,
|
|
543
|
+
url: `/ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
async setINSISWorkData(data: any) {
|
|
548
|
+
return this.axiosCall({
|
|
549
|
+
method: Methods.POST,
|
|
550
|
+
url: `/arm/api/Bpm/SetInsisWorkData`,
|
|
551
|
+
data: data,
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
async searchAgentByName(name: string) {
|
|
556
|
+
return this.axiosCall({
|
|
557
|
+
method: Methods.GET,
|
|
558
|
+
url: `/ekk/api/ContragentInsis/AgentByName?fullName=${name}`,
|
|
559
|
+
});
|
|
560
|
+
}
|
|
289
561
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<v-text-field
|
|
3
3
|
class="rounded-input"
|
|
4
4
|
v-model="fieldModel"
|
|
5
|
+
v-maska="maska"
|
|
5
6
|
:rules="rules"
|
|
6
7
|
:loading="loading"
|
|
7
8
|
:placeholder="placeholder"
|
|
@@ -55,6 +56,10 @@ export default defineComponent({
|
|
|
55
56
|
type: String,
|
|
56
57
|
default: 'Поле',
|
|
57
58
|
},
|
|
59
|
+
maska: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: '',
|
|
62
|
+
},
|
|
58
63
|
hint: {
|
|
59
64
|
type: String,
|
|
60
65
|
default: '',
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-navigation-drawer
|
|
3
|
+
v-model="$dataStore[whichPanel].open"
|
|
4
|
+
:temporary="$dataStore[whichPanel].overlay"
|
|
5
|
+
location="right"
|
|
6
|
+
class="sm:!w-[400px] lg:!relative"
|
|
7
|
+
:class="[
|
|
8
|
+
$dataStore[whichPanel].overlay ? 'lg:!hidden' : '',
|
|
9
|
+
$dataStore[whichPanel].open ? '!w-full lg:!w-[420px]' : 'lg:!w-[0px]',
|
|
10
|
+
]"
|
|
11
|
+
>
|
|
12
|
+
<base-header
|
|
13
|
+
:title="panelTitle"
|
|
14
|
+
:has-back="true"
|
|
15
|
+
back-icon="mdi-close"
|
|
16
|
+
class="justify-center"
|
|
17
|
+
@onBack="$dataStore[whichPanel].open = false"
|
|
18
|
+
></base-header>
|
|
19
|
+
<div>
|
|
20
|
+
<slot></slot>
|
|
21
|
+
</div>
|
|
22
|
+
</v-navigation-drawer>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts">
|
|
26
|
+
export default defineComponent({
|
|
27
|
+
name: 'BasePanel',
|
|
28
|
+
props: {
|
|
29
|
+
panelTitle: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: '',
|
|
32
|
+
},
|
|
33
|
+
whichPanel: {
|
|
34
|
+
type: String as PropType<'settings' | 'panel'>,
|
|
35
|
+
default: 'panel',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
setup() {
|
|
39
|
+
return {};
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
</script>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-progress-circular
|
|
3
3
|
:size="size"
|
|
4
|
+
:width="width"
|
|
4
5
|
:indeterminate="indeterminate"
|
|
5
6
|
:color="color"
|
|
6
7
|
:bg-color="bgColor"
|
|
@@ -15,10 +16,18 @@ export default defineComponent({
|
|
|
15
16
|
type: Number,
|
|
16
17
|
default: 40,
|
|
17
18
|
},
|
|
19
|
+
width: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 4,
|
|
22
|
+
},
|
|
18
23
|
indeterminate: {
|
|
19
24
|
type: Boolean,
|
|
20
25
|
default: true,
|
|
21
26
|
},
|
|
27
|
+
overlay: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true,
|
|
30
|
+
},
|
|
22
31
|
color: {
|
|
23
32
|
type: String,
|
|
24
33
|
default: '#FAB31C',
|
|
@@ -1,72 +1,60 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
class="
|
|
41
|
-
>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
:label="$dataStore.user.roles?.join(', ')"
|
|
48
|
-
></v-text-field>
|
|
49
|
-
<i class="mdi mdi-account-outline text-2xl text-[#A0B3D8]"></i>
|
|
50
|
-
</span>
|
|
51
|
-
<span
|
|
52
|
-
class="transition-all h-[64px] px-4 flex justify-between items-center border-b-[1px] cursor-pointer hover:border-b-[#A0B3D8]"
|
|
53
|
-
@click="dialog = true"
|
|
54
|
-
>
|
|
55
|
-
Выход
|
|
2
|
+
<base-drawer :panel-title="$dataStore.menu.title" which-panel="settings">
|
|
3
|
+
<base-panel-item>
|
|
4
|
+
<v-btn
|
|
5
|
+
size="x-small"
|
|
6
|
+
icon="mdi-minus"
|
|
7
|
+
color="#A0B3D8"
|
|
8
|
+
class="text-white"
|
|
9
|
+
variant="flat"
|
|
10
|
+
></v-btn>
|
|
11
|
+
Шрифт
|
|
12
|
+
<v-btn
|
|
13
|
+
size="x-small"
|
|
14
|
+
icon="mdi-plus"
|
|
15
|
+
color="#A0B3D8"
|
|
16
|
+
class="text-white"
|
|
17
|
+
variant="flat"
|
|
18
|
+
></v-btn>
|
|
19
|
+
</base-panel-item>
|
|
20
|
+
<base-panel-item>
|
|
21
|
+
<v-text-field
|
|
22
|
+
v-model="$dataStore.user.fullName"
|
|
23
|
+
:readonly="true"
|
|
24
|
+
hide-details
|
|
25
|
+
variant="plain"
|
|
26
|
+
:label="$dataStore.user.roles?.join(', ')"
|
|
27
|
+
></v-text-field>
|
|
28
|
+
<i class="mdi mdi-account-outline text-2xl text-[#A0B3D8]"></i
|
|
29
|
+
></base-panel-item>
|
|
30
|
+
<base-panel-item
|
|
31
|
+
v-for="panelItem of dataStore.settings.items"
|
|
32
|
+
:key="panelItem.title"
|
|
33
|
+
class="cursor-pointer"
|
|
34
|
+
@click="panelItem.action ? panelItem.action() : null"
|
|
35
|
+
>
|
|
36
|
+
{{ panelItem.title }}
|
|
37
|
+
<i
|
|
38
|
+
v-if="panelItem.icon"
|
|
39
|
+
class="mdi text-xl text-[#A0B3D8]"
|
|
40
|
+
:class="[panelItem.icon]"
|
|
41
|
+
></i>
|
|
42
|
+
</base-panel-item>
|
|
43
|
+
<base-panel-item @click="dialog = true" class="cursor-pointer">
|
|
44
|
+
Выход
|
|
45
|
+
<i class="mdi mdi-logout text-xl text-[#A0B3D8]"></i>
|
|
46
|
+
</base-panel-item>
|
|
56
47
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
</base-dialog>
|
|
68
|
-
</div>
|
|
69
|
-
</v-navigation-drawer>
|
|
48
|
+
<base-dialog
|
|
49
|
+
v-model="dialog"
|
|
50
|
+
:title="$t('dialog.exit')"
|
|
51
|
+
:subtitle="$t('dialog.dataWillClear')"
|
|
52
|
+
actions="default"
|
|
53
|
+
@yes="logoutUser"
|
|
54
|
+
@no="dialog = false"
|
|
55
|
+
>
|
|
56
|
+
</base-dialog
|
|
57
|
+
></base-drawer>
|
|
70
58
|
</template>
|
|
71
59
|
|
|
72
60
|
<script lang="ts" setup>
|
|
@@ -27,10 +27,11 @@
|
|
|
27
27
|
!!item.title &&
|
|
28
28
|
selected.title === item.title
|
|
29
29
|
"
|
|
30
|
-
@click="pickItem(item)"
|
|
30
|
+
@click.left="pickItem(item)"
|
|
31
|
+
@click.middle="openTab(item)"
|
|
31
32
|
>
|
|
32
33
|
</base-menu-nav-item>
|
|
33
|
-
<hr v-if="item.
|
|
34
|
+
<hr v-if="item.hasLine" class="mt-[10px]" />
|
|
34
35
|
</div>
|
|
35
36
|
</div>
|
|
36
37
|
</transition>
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
|
|
42
43
|
<script lang="ts">
|
|
43
44
|
import { MenuItem } from '@/composables/classes';
|
|
45
|
+
import { RouteLocationNormalized } from 'vue-router';
|
|
44
46
|
|
|
45
47
|
export default defineComponent({
|
|
46
48
|
props: {
|
|
@@ -76,13 +78,29 @@ export default defineComponent({
|
|
|
76
78
|
emits: ['update:modelValue', 'onLink', 'onBack', 'onMore', 'clicked'],
|
|
77
79
|
setup(props, { emit }) {
|
|
78
80
|
const dataStore = useDataStore();
|
|
81
|
+
const router = useRouter();
|
|
82
|
+
|
|
79
83
|
const pickItem = (item: MenuItem) => {
|
|
80
84
|
if (item.title !== dataStore.menu.selectedItem.title) {
|
|
81
85
|
emit('update:modelValue', item);
|
|
82
|
-
item.link
|
|
86
|
+
if (typeof item.link === 'object') {
|
|
87
|
+
if (item.link && 'name' in item.link) {
|
|
88
|
+
router.push(item.link as RouteLocationNormalized);
|
|
89
|
+
} else {
|
|
90
|
+
dataStore.showToaster('warning', 'Отсутствует ссылка для перехода');
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
item.link ? emit('onLink', item) : emit('clicked', item);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const openTab = (item: MenuItem) => {
|
|
98
|
+
if (item.url) {
|
|
99
|
+
window.open(item.url, '_blank', 'noreferrer');
|
|
83
100
|
}
|
|
84
101
|
};
|
|
85
|
-
|
|
102
|
+
|
|
103
|
+
return { pickItem, openTab };
|
|
86
104
|
},
|
|
87
105
|
});
|
|
88
106
|
</script>
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
$libStyles.rounded,
|
|
7
7
|
$libStyles.textSimple,
|
|
8
8
|
]"
|
|
9
|
-
class="h-[60px] flex items-center hover:bg-[#A0B3D8] hover:!text-white pl-4 cursor-pointer transition-all"
|
|
9
|
+
class="h-[60px] flex items-center justify-between hover:bg-[#A0B3D8] hover:!text-white pl-4 cursor-pointer transition-all"
|
|
10
10
|
>
|
|
11
11
|
<span>{{ menuItem.title }}</span>
|
|
12
|
+
<i v-if="menuItem.icon" class="mdi text-xl pr-4" :class="[menuItem.icon]"></i>
|
|
12
13
|
<v-tooltip
|
|
13
14
|
v-if="menuItem.description"
|
|
14
15
|
activator="parent"
|