WIP Сделана анимация загрузки details
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.section-wrapper.flex.flex-col.h-fit.cursor-pointer(
|
.section-wrapper.flex.flex-col.h-fit.cursor-pointer(
|
||||||
:style="{width: settings[section].width + 'px', 'min-height': settings[section].height + 'px', background: changeBackground}",
|
:style="{width: settings[section].width + 'px', 'min-height': settings[section].height + 'px', background: changeBackground}",
|
||||||
:class="sectionAnimationClasses",
|
|
||||||
@click="output(section)"
|
|
||||||
)
|
)
|
||||||
.section-header.flex.items-center.justify-between.pl-4.pr-3(:class="{small:settings[section].rowFlex}")
|
.section-header.flex.items-center.justify-between.pl-4.pr-3(:class="{small:settings[section].rowFlex}")
|
||||||
span.text-sm.font-semibold.whitespace-nowrap {{settings[section].title}}
|
span.text-sm.font-semibold.whitespace-nowrap {{settings[section].title}}
|
||||||
@@ -20,6 +18,7 @@
|
|||||||
v-if="!isChange && (this.isData || this.isAddress || this.isAttachments)",
|
v-if="!isChange && (this.isData || this.isAddress || this.isAttachments)",
|
||||||
@click="changeClientData"
|
@click="changeClientData"
|
||||||
)
|
)
|
||||||
|
.icon-edit.text-base.mt-1
|
||||||
.flex.relative
|
.flex.relative
|
||||||
base-button(
|
base-button(
|
||||||
v-if="settings[section].addFile",
|
v-if="settings[section].addFile",
|
||||||
@@ -27,9 +26,9 @@
|
|||||||
:rounded="true",
|
:rounded="true",
|
||||||
:outlined="true",
|
:outlined="true",
|
||||||
:added="true",
|
:added="true",
|
||||||
:size="24"
|
:size="20"
|
||||||
)
|
)
|
||||||
.icon-plus(class="pt-[2px]")
|
.icon-plus.text-sm(class="pt-[2px]")
|
||||||
base-popup.right-3.top-5(
|
base-popup.right-3.top-5(
|
||||||
v-if="section === 'docs' && isOpenAddingWrap",
|
v-if="section === 'docs' && isOpenAddingWrap",
|
||||||
v-click-outside="closePopup",
|
v-click-outside="closePopup",
|
||||||
@@ -61,60 +60,85 @@
|
|||||||
:add-new-additional="addDocAdditional",
|
:add-new-additional="addDocAdditional",
|
||||||
:save-additional="saveDocs"
|
:save-additional="saveDocs"
|
||||||
)
|
)
|
||||||
.section-body.flex.flex-col.gap-y-4.px-4(
|
transition(name="section", mode="out-in")
|
||||||
:class="{'pt-3 pb-4': isData || isAddress || isAttachments}",
|
.flex.justify-center.items-center(
|
||||||
)
|
v-if="sectionDataPresence",
|
||||||
.flex.flex-col.gap-y-4
|
:style="{height: settings[section].voidHeight + 'px'}"
|
||||||
.flex.flex-col(v-for="(item, key) in sectionInfo", class="gap-y-1.5")
|
)
|
||||||
span.title-section.font-semibold.text-xs(
|
base-loader(
|
||||||
v-if="settings[section].options") {{settings[section].options[key]}}
|
:width="60",
|
||||||
span.title-section.font-semibold.text-xs(v-if="item.header") {{item.header}}
|
:height="60"
|
||||||
client-detail-input.text-sm.w-max-fit(
|
)
|
||||||
v-if="section!=='docs' && isChange && settings[section].options[key] !== 'Дата выдачи'",
|
.section-body.flex.flex-col.gap-y-4.px-4(
|
||||||
:style="{fontWeight:key === 'numba'&&600}",
|
v-else-if="(this.isData || this.isAddress || this.isAttachments) && !isChange",
|
||||||
v-model:value="sectionInfo[key]",
|
:class="{'pt-3 pb-4': isData || isAddress || isAttachments}",
|
||||||
:rows="section ==='pass' ? 2 : 1",
|
)
|
||||||
:placeholder="settings[section].placeholder[key]"
|
.flex.flex-col.gap-y-4
|
||||||
:sharp="settings[section].sharps[key] && section === 'pass' ? settings[section].sharps[key] : ''"
|
.flex.flex-col(v-for="(item, key) in sectionInfo", class="gap-y-1.5")
|
||||||
)
|
span.title-section.font-semibold.text-xs(v-if="settings[section].options") {{settings[section].options[key]}}
|
||||||
base-input-date.input.text-sm(
|
span.title-section.font-semibold.text-xs(v-if="item.header") {{item.header}}
|
||||||
v-else-if="isChange && section !== 'docs'",
|
.flex(v-if="settings[section].options && !isChange")
|
||||||
v-model:value="sectionInfo.issued_by_date"
|
span.text-sm.w-fit(:style="{fontWeight:key === 'numba'&&600}") {{key === 'issued_by_date' ? formattedDate : item}}
|
||||||
)
|
.copy.icon-copy.cursor-pointer.pl-4(
|
||||||
.copy.icon-copy.cursor-pointer(
|
v-if="key === 'numba'",
|
||||||
v-if="item.copy",
|
@click="() => copyValue(item)"
|
||||||
@click="() => copyValue(item)"
|
)
|
||||||
|
.flex(v-if="item.name && !isChange")
|
||||||
|
span.text-sm.w-fit {{item.title}}
|
||||||
|
.flex.items-center(v-if="item.title")
|
||||||
|
.flex.gap-x-2.items-center
|
||||||
|
img(:src="iconDictionary[item?.document?.substr(item.document.lastIndexOf('.') + 1)]")
|
||||||
|
span.text-sm {{item.title}}
|
||||||
|
span.text-sm(v-if="item.document") {{`.${item?.document?.substr(item.document.lastIndexOf(".") + 1)}`}}
|
||||||
|
.section-body.flex.flex-col.gap-y-4.px-4(
|
||||||
|
v-else-if="(this.isData || this.isAddress || this.isAttachments) && isChange",
|
||||||
|
:class="{'pt-3 pb-4': isData || isAddress || isAttachments}",
|
||||||
|
)
|
||||||
|
.flex.flex-col.gap-y-4
|
||||||
|
.flex.flex-col(v-for="(item, key) in sectionInfo", class="gap-y-1.5")
|
||||||
|
span.title-section.font-semibold.text-xs(
|
||||||
|
v-if="settings[section].options",
|
||||||
|
) {{settings[section].options[key]}}
|
||||||
|
span.title-section.font-semibold.text-xs(v-if="item.header") {{item.header}}
|
||||||
|
client-detail-input.text-sm.w-max-fit(
|
||||||
|
v-if="section!=='docs' && isChange && settings[section].options[key] !== 'Дата выдачи'",
|
||||||
|
:style="{fontWeight:key === 'numba'&&600}",
|
||||||
|
v-model:value="sectionInfo[key]",
|
||||||
|
:rows="section ==='pass' ? 2 : 1",
|
||||||
|
:placeholder="settings[section].placeholder[key]"
|
||||||
|
:sharp="settings[section].sharps[key] && section === 'pass' ? settings[section].sharps[key] : ''"
|
||||||
)
|
)
|
||||||
.flex(v-if="settings[section].options && !isChange")
|
base-input-date.input.text-sm(
|
||||||
span.text-sm.w-fit(:style="{fontWeight:key === 'numba'&&600}") {{key === 'issued_by_date' ? formattedDate : item}}
|
v-else-if="isChange && section !== 'docs'",
|
||||||
.copy.icon-copy.cursor-pointer.pl-4(
|
v-model:value="sectionInfo.issued_by_date"
|
||||||
v-if="key === 'numba'",
|
|
||||||
@click="() => copyValue(item)"
|
|
||||||
)
|
)
|
||||||
.separation.flex.items-center.justify-center.relative.mt-10px.mb(
|
.copy.icon-copy.cursor-pointer(
|
||||||
v-if="section === 'addresses' && isChange",
|
v-if="item.copy",
|
||||||
class="gap-y-1.5"
|
@click="() => copyValue(item)"
|
||||||
)
|
)
|
||||||
.line.absolute
|
.separation.flex.items-center.justify-center.relative.mt-10px.mb(
|
||||||
.text-separation.span.text-sm.separator.px-2 или
|
v-if="section === 'addresses' && isChange",
|
||||||
.flex.flex-col.gap-y-4(v-if="section === 'addresses' && isChange")
|
class="gap-y-1.5"
|
||||||
client-detail-section-address(:dope-address="dopeAddress")
|
|
||||||
.flex(v-if="item.name && !isChange")
|
|
||||||
span.text-sm.w-fit {{item.title}}
|
|
||||||
.flex.items-center(v-if="item.title")
|
|
||||||
.icon-cancel.cancel.cursor-pointer.pr-3.text-xsm(
|
|
||||||
v-if="isChange",
|
|
||||||
:id="item.id",
|
|
||||||
@click="deleteDoc(item.id)"
|
|
||||||
)
|
)
|
||||||
.flex.gap-x-2.items-center
|
.line.absolute
|
||||||
img(:src="iconDictionary[item?.document?.substr(item.document.lastIndexOf('.') + 1)]")
|
.text-separation.span.text-sm.separator.px-2 или
|
||||||
span.text-sm {{item.title}}
|
.flex.flex-col.gap-y-4(v-if="section === 'addresses' && isChange")
|
||||||
span.text-sm(v-if="item.document") {{`.${item?.document?.substr(item.document.lastIndexOf(".") + 1)}`}}
|
client-detail-section-address(:dope-address="dopeAddress")
|
||||||
.section-add.flex.justify-center.items-center.cursor-pointer(
|
.flex.items-center(v-if="item.title")
|
||||||
:style="{height: settings[section].voidHeight + 'px'}"
|
.icon-cancel.cancel.cursor-pointer.pr-3.text-xsm(
|
||||||
@click="openAddDoc"
|
v-if="isChange",
|
||||||
) Добавить данные
|
:id="item.id",
|
||||||
|
@click="deleteDoc(item.id)"
|
||||||
|
)
|
||||||
|
.flex.gap-x-2.items-center
|
||||||
|
img(:src="iconDictionary[item?.document?.substr(item.document.lastIndexOf('.') + 1)]")
|
||||||
|
span.text-sm {{item.title}}
|
||||||
|
span.text-sm(v-if="item.document") {{`.${item?.document?.substr(item.document.lastIndexOf(".") + 1)}`}}
|
||||||
|
.section-add.flex.justify-center.items-center.cursor-pointer(
|
||||||
|
v-else
|
||||||
|
:style="{height: settings[section].voidHeight + 'px'}"
|
||||||
|
@click="openAddDoc"
|
||||||
|
) Добавить данные
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -133,6 +157,7 @@ import pdfIcon from "@/assets/icons/pdf.svg";
|
|||||||
import wordIcon from "@/assets/icons/word.svg";
|
import wordIcon from "@/assets/icons/word.svg";
|
||||||
import exelIcon from "@/assets/icons/exel.svg";
|
import exelIcon from "@/assets/icons/exel.svg";
|
||||||
import * as moment from "moment";
|
import * as moment from "moment";
|
||||||
|
import BaseLoader from "@/components/Loader/BaseLoader.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "ClientDetailInfoSection",
|
name: "ClientDetailInfoSection",
|
||||||
components: {
|
components: {
|
||||||
@@ -146,6 +171,7 @@ export default {
|
|||||||
TableCreatePackageDoc,
|
TableCreatePackageDoc,
|
||||||
TableAddingNewDoc,
|
TableAddingNewDoc,
|
||||||
TableChoiceAddingDoc,
|
TableChoiceAddingDoc,
|
||||||
|
BaseLoader,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
saveNewDoc: Function,
|
saveNewDoc: Function,
|
||||||
@@ -211,11 +237,14 @@ export default {
|
|||||||
"closed-body": true,
|
"closed-body": true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
sectionDataPresence() {
|
||||||
|
if (this.section === "docs") {
|
||||||
|
return this.sectionInfo[0]?.initialization;
|
||||||
|
}
|
||||||
|
return Object.keys(this.sectionInfo).length === 0;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
output(section) {
|
|
||||||
console.log(section);
|
|
||||||
},
|
|
||||||
openAddDoc() {
|
openAddDoc() {
|
||||||
this.isChange = true;
|
this.isChange = true;
|
||||||
if (this.section === "pass") {
|
if (this.section === "pass") {
|
||||||
@@ -379,9 +408,7 @@ export default {
|
|||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
|
||||||
.section-body
|
.section-body
|
||||||
max-height: 500px
|
overflow-y: auto
|
||||||
transition: 0.3s ease all
|
|
||||||
overflow: hidden
|
|
||||||
&::-webkit-scrollbar
|
&::-webkit-scrollbar
|
||||||
width: 4px
|
width: 4px
|
||||||
&::-webkit-scrollbar-track
|
&::-webkit-scrollbar-track
|
||||||
@@ -392,6 +419,8 @@ export default {
|
|||||||
background-color: var(--btn-blue-color)
|
background-color: var(--btn-blue-color)
|
||||||
|
|
||||||
.edit
|
.edit
|
||||||
|
width: 20px
|
||||||
|
height: 20px
|
||||||
color: var(--btn-blue-color)
|
color: var(--btn-blue-color)
|
||||||
&:hover
|
&:hover
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
@@ -402,10 +431,7 @@ export default {
|
|||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
|
||||||
.section-add
|
.section-add
|
||||||
height: calc(100% - 44px)
|
height: 100%
|
||||||
max-height: 100%
|
|
||||||
overflow: hidden
|
|
||||||
transition: 0.3s ease all
|
|
||||||
color: var(--btn-blue-color)
|
color: var(--btn-blue-color)
|
||||||
|
|
||||||
.closed-add .section-add
|
.closed-add .section-add
|
||||||
@@ -414,6 +440,25 @@ export default {
|
|||||||
.closed-body .section-body
|
.closed-body .section-body
|
||||||
max-height: 0
|
max-height: 0
|
||||||
|
|
||||||
|
.section-enter-from
|
||||||
|
opacity: 0
|
||||||
|
transform: translateY(0px)
|
||||||
|
pointer-events: none
|
||||||
|
|
||||||
|
.section-enter-active
|
||||||
|
transition: 0.3s ease
|
||||||
|
|
||||||
|
.section-leave-to
|
||||||
|
opacity: 0
|
||||||
|
transform: translateY(0px)
|
||||||
|
pointer-events: none
|
||||||
|
|
||||||
|
.section-leave-active
|
||||||
|
transition: 0.3s ease
|
||||||
|
|
||||||
|
.section-move
|
||||||
|
transition: 0.3s ease
|
||||||
|
|
||||||
.line
|
.line
|
||||||
width: 100%
|
width: 100%
|
||||||
height: 1px
|
height: 1px
|
||||||
|
|||||||
@@ -146,7 +146,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
dataIdentityDocument: {},
|
dataIdentityDocument: {},
|
||||||
dataAddress: {},
|
dataAddress: {},
|
||||||
dataAttachments: [],
|
dataAttachments: [
|
||||||
|
{
|
||||||
|
initialization: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
dataDetail: {},
|
dataDetail: {},
|
||||||
isOpenDetailInfo: false,
|
isOpenDetailInfo: false,
|
||||||
isOpenPopup: false,
|
isOpenPopup: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user