hl-core 0.0.7-beta.9 → 0.0.8
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/.prettierrc +2 -1
- package/api/index.ts +66 -47
- package/api/interceptors.ts +4 -4
- package/components/Button/Btn.vue +7 -2
- package/components/Button/ScrollButtons.vue +6 -0
- package/components/Complex/ContentBlock.vue +5 -0
- package/components/{Layout → Dialog}/Dialog.vue +3 -27
- package/components/Dialog/FamilyDialog.vue +39 -0
- package/components/Form/FormBlock.vue +114 -0
- package/components/Form/FormSection.vue +18 -0
- package/components/Form/FormTextSection.vue +20 -0
- package/components/Form/FormToggle.vue +52 -0
- package/components/Form/ProductConditionsBlock.vue +68 -0
- package/components/Input/EmptyFormField.vue +5 -0
- package/components/Input/FileInput.vue +71 -0
- package/components/Input/FormInput.vue +171 -0
- package/components/Input/PanelInput.vue +133 -0
- package/components/Input/RoundedInput.vue +35 -36
- package/components/Layout/Drawer.vue +18 -16
- package/components/Layout/Header.vue +4 -18
- package/components/Layout/Loader.vue +1 -7
- package/components/Layout/SettingsPanel.vue +17 -37
- package/components/List/ListEmpty.vue +22 -0
- package/components/Menu/MenuNav.vue +22 -20
- package/components/Menu/MenuNavItem.vue +6 -6
- package/components/Pages/Anketa.vue +333 -0
- package/components/Pages/Auth.vue +91 -0
- package/components/Pages/Documents.vue +108 -0
- package/components/Pages/MemberForm.vue +1138 -0
- package/components/Pages/ProductAgreement.vue +18 -0
- package/components/Pages/ProductConditions.vue +349 -0
- package/components/Panel/PanelItem.vue +2 -4
- package/components/Panel/PanelSelectItem.vue +20 -0
- package/components/Transitions/FadeTransition.vue +5 -0
- package/composables/classes.ts +299 -253
- package/composables/constants.ts +14 -7
- package/composables/index.ts +55 -60
- package/composables/styles.ts +31 -7
- package/layouts/default.vue +46 -26
- package/layouts/full.vue +2 -12
- package/nuxt.config.ts +3 -0
- package/package.json +13 -10
- package/pages/500.vue +40 -12
- package/plugins/helperFunctionsPlugins.ts +6 -2
- package/plugins/storePlugin.ts +6 -5
- package/store/data.store.js +781 -1880
- package/store/member.store.ts +291 -0
- package/store/messages.ts +66 -51
- package/store/rules.js +26 -28
- package/types/index.ts +250 -0
- package/composables/models.ts +0 -43
- /package/store/{form.store.js → form.store.ts} +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="w-full px-[10px] pt-[14px] flex flex-col gap-2" :class="[$libStyles.scrollPage]" v-if="formStore.signedDocumentList && formStore.signedDocumentList.length">
|
|
3
|
+
<base-content-block v-for="document of formStore.signedDocumentList as DocumentItem[]" :key="document.id" :class="[$libStyles.textSimple]">
|
|
4
|
+
<h5 class="text-center font-medium mb-4">
|
|
5
|
+
{{ document.fileTypeName }}
|
|
6
|
+
</h5>
|
|
7
|
+
<div :class="[$libStyles.whiteBg, $libStyles.rounded]" class="p-2 h-12 flex items-center relative">
|
|
8
|
+
<span class="ml-2">{{ document.fileName }}</span>
|
|
9
|
+
<i
|
|
10
|
+
class="transition-all cursor-pointer mdi mdi-dots-vertical pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
|
|
11
|
+
:class="[$libStyles.greenTextHover]"
|
|
12
|
+
@click="openPanel(document)"
|
|
13
|
+
></i>
|
|
14
|
+
</div>
|
|
15
|
+
</base-content-block>
|
|
16
|
+
</section>
|
|
17
|
+
<base-list-empty v-else></base-list-empty>
|
|
18
|
+
<Teleport v-if="$dataStore.panelAction === null" to="#panel-actions">
|
|
19
|
+
<base-fade-transition>
|
|
20
|
+
<div :class="[$libStyles.flexColNav]">
|
|
21
|
+
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Открыть" @click="getFile('view')"></base-btn>
|
|
22
|
+
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Скачать" @click="getFile('download')"></base-btn>
|
|
23
|
+
</div>
|
|
24
|
+
</base-fade-transition>
|
|
25
|
+
</Teleport>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script lang="ts">
|
|
29
|
+
import { DocumentItem } from '@/composables/classes';
|
|
30
|
+
|
|
31
|
+
export default defineComponent({
|
|
32
|
+
setup() {
|
|
33
|
+
const dataStore = useDataStore();
|
|
34
|
+
const formStore = useFormStore();
|
|
35
|
+
const currentDocument = ref<DocumentItem>(new DocumentItem());
|
|
36
|
+
const documentLoading = ref<boolean>(false);
|
|
37
|
+
|
|
38
|
+
const currentState = reactive<{ action: string; text: string }>({
|
|
39
|
+
action: '',
|
|
40
|
+
text: '',
|
|
41
|
+
});
|
|
42
|
+
const object_list = computed(() => Object.values(formStore.signedDocumentList));
|
|
43
|
+
const unSignedList = computed(() => document_list.value.filter(doc => doc.signed === false || doc.signed === null));
|
|
44
|
+
const document_list = computed(() =>
|
|
45
|
+
object_list.value.filter(obj => {
|
|
46
|
+
if (obj.fileTypeCode === '19' || obj.fileTypeCode === '5') {
|
|
47
|
+
return obj;
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const openPanel = async (document: DocumentItem) => {
|
|
53
|
+
dataStore.panelAction = null;
|
|
54
|
+
dataStore.panel.title = document.fileTypeName!;
|
|
55
|
+
currentDocument.value = document;
|
|
56
|
+
dataStore.panel.open = true;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
watch(
|
|
60
|
+
() => document_list.value,
|
|
61
|
+
() => {
|
|
62
|
+
if (document_list.value.length > 1 && unSignedList.value.length) {
|
|
63
|
+
currentState.action = 'submit';
|
|
64
|
+
currentState.text = 'Все документы подписаны';
|
|
65
|
+
} else {
|
|
66
|
+
currentState.action = 'upload';
|
|
67
|
+
currentState.text = 'Сохранить';
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
immediate: true,
|
|
72
|
+
},
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
const getFile = async (type: FileActions) => {
|
|
76
|
+
if (currentDocument.value) {
|
|
77
|
+
documentLoading.value = true;
|
|
78
|
+
const fileExtension = currentDocument.value.fileName!.match(/\.([0-9a-z]+)(?:[\?#]|$)/i)![1];
|
|
79
|
+
await dataStore.getFile(currentDocument.value, type, fileExtension);
|
|
80
|
+
documentLoading.value = false;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const onInit = async () => {
|
|
85
|
+
await dataStore.getDicFileTypeList();
|
|
86
|
+
await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
onInit();
|
|
90
|
+
|
|
91
|
+
onUnmounted(() => {
|
|
92
|
+
dataStore.panel.open = false;
|
|
93
|
+
dataStore.panelAction = null;
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
// State
|
|
98
|
+
formStore,
|
|
99
|
+
documentLoading,
|
|
100
|
+
DocumentItem,
|
|
101
|
+
|
|
102
|
+
// Functions
|
|
103
|
+
openPanel,
|
|
104
|
+
getFile,
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
</script>
|