Merge pull request #193 from dderbentsov/UC-157
WIP Сделана анимация загрузки и отображения details, карточек и переключателя календаря
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
img.icon-wrapper.cursor-pointer(src="@/assets/icons/lock.svg")
|
img.icon-wrapper.cursor-pointer(src="@/assets/icons/lock.svg")
|
||||||
column-header-checkbox
|
column-header-checkbox
|
||||||
.body.pl-1
|
.body.pl-1
|
||||||
|
transition-group(name="card", tag="div")
|
||||||
calendar-event-card(
|
calendar-event-card(
|
||||||
v-for="event in dayEvents",
|
v-for="event in dayEvents",
|
||||||
:key="event.id",
|
:key="event.id",
|
||||||
@@ -132,4 +133,21 @@ export default {
|
|||||||
|
|
||||||
.owner-name
|
.owner-name
|
||||||
color: var(--font-dark-blue-color)
|
color: var(--font-dark-blue-color)
|
||||||
|
|
||||||
|
.card-enter-from
|
||||||
|
opacity: 0
|
||||||
|
pointer-events: none
|
||||||
|
|
||||||
|
.card-enter-active
|
||||||
|
transition: 0.3s ease
|
||||||
|
|
||||||
|
.card-leave-to
|
||||||
|
opacity: 0
|
||||||
|
pointer-events: none
|
||||||
|
|
||||||
|
.card-leave-active
|
||||||
|
transition: 0.3s ease
|
||||||
|
|
||||||
|
.card-move
|
||||||
|
transition: 0.3s ease
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.layout-switch-wrapper.inline-block
|
.layout-switch-wrapper.inline-block
|
||||||
button#day.py-2.px-3(
|
button#day.py-2.px-3.transition.duration-200.ease-linear(
|
||||||
:class="dayLayoutState",
|
:class="dayLayoutState",
|
||||||
@click="changeSelectedLayout"
|
@click="changeSelectedLayout"
|
||||||
) День
|
) День
|
||||||
button#week.py-2.px-3(
|
button#week.py-2.px-3.transition.duration-200.ease-linear(
|
||||||
:class="weekLayoutState",
|
:class="weekLayoutState",
|
||||||
@click="changeSelectedLayout"
|
@click="changeSelectedLayout"
|
||||||
) Неделя
|
) Неделя
|
||||||
|
|||||||
@@ -1,6 +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="{flexDirection:settings[section].rowFlex && 'row', width: settings[section].width + 'px', height: settings[section].height + 'px', background: changeBackground}"
|
:style="{width: settings[section].width + 'px', 'min-height': settings[section].height + 'px', background: changeBackground}",
|
||||||
)
|
)
|
||||||
.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}}
|
||||||
@@ -14,10 +14,11 @@
|
|||||||
:size="20"
|
:size="20"
|
||||||
)
|
)
|
||||||
.icon-ok.text-xsm(class="pt-[3px]")
|
.icon-ok.text-xsm(class="pt-[3px]")
|
||||||
.edit.icon-edit.cursor-pointer.text-sm(
|
.edit.cursor-pointer(
|
||||||
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-2px
|
||||||
.flex.relative
|
.flex.relative
|
||||||
base-button(
|
base-button(
|
||||||
v-if="settings[section].addFile",
|
v-if="settings[section].addFile",
|
||||||
@@ -25,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",
|
||||||
@@ -59,13 +60,46 @@
|
|||||||
:add-new-additional="addDocAdditional",
|
:add-new-additional="addDocAdditional",
|
||||||
:save-additional="saveDocs"
|
:save-additional="saveDocs"
|
||||||
)
|
)
|
||||||
.section-body.w-full.flex.flex-col.px-4.pt-3.pb-4.gap-y-4(
|
transition(name="section", mode="out-in")
|
||||||
v-if="this.isData || this.isAddress || this.isAttachments"
|
.flex.justify-center.items-center(
|
||||||
|
v-if="sectionDataPresence",
|
||||||
|
:style="{height: settings[section].voidHeight + 'px'}",
|
||||||
|
)
|
||||||
|
base-loader(
|
||||||
|
:width="60",
|
||||||
|
:height="60"
|
||||||
|
)
|
||||||
|
.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}",
|
||||||
|
:style="{height: settings[section].voidHeight + 'px'}"
|
||||||
|
)
|
||||||
|
.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}}
|
||||||
|
.flex(v-if="settings[section].options && !isChange")
|
||||||
|
span.text-sm.w-fit(:style="{fontWeight:key === 'numba'&&600}") {{key === 'issued_by_date' ? formattedDate : item}}
|
||||||
|
.copy.icon-copy.cursor-pointer.pl-4(
|
||||||
|
v-if="key === 'numba'",
|
||||||
|
@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.gap-y-4
|
||||||
.flex.flex-col(v-for="(item, key) in sectionInfo", class="gap-y-1.5")
|
.flex.flex-col(v-for="(item, key) in sectionInfo", class="gap-y-1.5")
|
||||||
span.title-section.font-semibold.text-xs(
|
span.title-section.font-semibold.text-xs(
|
||||||
v-if="settings[section].options") {{settings[section].options[key]}}
|
v-if="settings[section].options",
|
||||||
|
) {{settings[section].options[key]}}
|
||||||
span.title-section.font-semibold.text-xs(v-if="item.header") {{item.header}}
|
span.title-section.font-semibold.text-xs(v-if="item.header") {{item.header}}
|
||||||
client-detail-input.text-sm.w-max-fit(
|
client-detail-input.text-sm.w-max-fit(
|
||||||
v-if="section!=='docs' && isChange && settings[section].options[key] !== 'Дата выдачи'",
|
v-if="section!=='docs' && isChange && settings[section].options[key] !== 'Дата выдачи'",
|
||||||
@@ -83,12 +117,6 @@
|
|||||||
v-if="item.copy",
|
v-if="item.copy",
|
||||||
@click="() => copyValue(item)"
|
@click="() => copyValue(item)"
|
||||||
)
|
)
|
||||||
.flex(v-if="settings[section].options && !isChange")
|
|
||||||
span.text-sm.w-fit(:style="{fontWeight:key === 'numba'&&600}") {{key === 'issued_by_date' ? formattedDate : item}}
|
|
||||||
.copy.icon-copy.cursor-pointer.pl-4(
|
|
||||||
v-if="key === 'numba'",
|
|
||||||
@click="() => copyValue(item)"
|
|
||||||
)
|
|
||||||
.separation.flex.items-center.justify-center.relative.mt-10px.mb(
|
.separation.flex.items-center.justify-center.relative.mt-10px.mb(
|
||||||
v-if="section === 'addresses' && isChange",
|
v-if="section === 'addresses' && isChange",
|
||||||
class="gap-y-1.5"
|
class="gap-y-1.5"
|
||||||
@@ -97,8 +125,6 @@
|
|||||||
.text-separation.span.text-sm.separator.px-2 или
|
.text-separation.span.text-sm.separator.px-2 или
|
||||||
.flex.flex-col.gap-y-4(v-if="section === 'addresses' && isChange")
|
.flex.flex-col.gap-y-4(v-if="section === 'addresses' && isChange")
|
||||||
client-detail-section-address(:dope-address="dopeAddress")
|
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")
|
.flex.items-center(v-if="item.title")
|
||||||
.icon-cancel.cancel.cursor-pointer.pr-3.text-xsm(
|
.icon-cancel.cancel.cursor-pointer.pr-3.text-xsm(
|
||||||
v-if="isChange",
|
v-if="isChange",
|
||||||
@@ -110,7 +136,8 @@
|
|||||||
span.text-sm {{item.title}}
|
span.text-sm {{item.title}}
|
||||||
span.text-sm(v-if="item.document") {{`.${item?.document?.substr(item.document.lastIndexOf(".") + 1)}`}}
|
span.text-sm(v-if="item.document") {{`.${item?.document?.substr(item.document.lastIndexOf(".") + 1)}`}}
|
||||||
.section-add.flex.justify-center.items-center.cursor-pointer(
|
.section-add.flex.justify-center.items-center.cursor-pointer(
|
||||||
v-else,
|
v-else
|
||||||
|
:style="{height: settings[section].voidHeight + 'px'}"
|
||||||
@click="openAddDoc"
|
@click="openAddDoc"
|
||||||
) Добавить данные
|
) Добавить данные
|
||||||
</template>
|
</template>
|
||||||
@@ -131,6 +158,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: {
|
||||||
@@ -144,6 +172,7 @@ export default {
|
|||||||
TableCreatePackageDoc,
|
TableCreatePackageDoc,
|
||||||
TableAddingNewDoc,
|
TableAddingNewDoc,
|
||||||
TableChoiceAddingDoc,
|
TableChoiceAddingDoc,
|
||||||
|
BaseLoader,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
saveNewDoc: Function,
|
saveNewDoc: Function,
|
||||||
@@ -199,6 +228,12 @@ export default {
|
|||||||
? this.sectionInfo.issued_by_date.split("-").reverse().join(".")
|
? this.sectionInfo.issued_by_date.split("-").reverse().join(".")
|
||||||
: "";
|
: "";
|
||||||
},
|
},
|
||||||
|
sectionDataPresence() {
|
||||||
|
if (this.section === "docs") {
|
||||||
|
return this.sectionInfo[0]?.initialization;
|
||||||
|
}
|
||||||
|
return Object.keys(this.sectionInfo).length === 0;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openAddDoc() {
|
openAddDoc() {
|
||||||
@@ -375,6 +410,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
|
||||||
@@ -386,9 +423,33 @@ export default {
|
|||||||
|
|
||||||
.section-add
|
.section-add
|
||||||
height: 100%
|
height: 100%
|
||||||
min-height: 64px
|
|
||||||
color: var(--btn-blue-color)
|
color: var(--btn-blue-color)
|
||||||
|
|
||||||
|
.closed-add .section-add
|
||||||
|
max-height: 0
|
||||||
|
|
||||||
|
.closed-body .section-body
|
||||||
|
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,
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ export const detail = {
|
|||||||
issued_by_date: "Дата",
|
issued_by_date: "Дата",
|
||||||
},
|
},
|
||||||
width: 280,
|
width: 280,
|
||||||
|
voidHeight: 244,
|
||||||
},
|
},
|
||||||
snils: {
|
snils: {
|
||||||
title: "СНИЛС",
|
title: "СНИЛС",
|
||||||
@@ -162,12 +163,14 @@ export const detail = {
|
|||||||
join_adress: "Введите адрес целиком",
|
join_adress: "Введите адрес целиком",
|
||||||
},
|
},
|
||||||
width: 292,
|
width: 292,
|
||||||
|
voidHeight: 86,
|
||||||
},
|
},
|
||||||
docs: {
|
docs: {
|
||||||
title: "Документы",
|
title: "Документы",
|
||||||
height: 280,
|
height: 280,
|
||||||
width: 360,
|
width: 360,
|
||||||
addFile: true,
|
addFile: true,
|
||||||
|
voidHeight: 236,
|
||||||
},
|
},
|
||||||
additional: {
|
additional: {
|
||||||
title: "Дополнительные данные",
|
title: "Дополнительные данные",
|
||||||
|
|||||||
Reference in New Issue
Block a user