Merge branch 'ASTRA-139' into 'master'

Resolve ASTRA-139

See merge request andrusyakka/urban-couscous!487
This commit is contained in:
Vasiliy Gavrilin
2023-07-26 14:13:40 +00:00
9 changed files with 333 additions and 100 deletions

View File

@@ -1,6 +1,6 @@
<template lang="pug">
medcard-form-wrapper(v-if="patient", title="Пациент на приеме", title-link="Медкарта")
.flex.flex-col
.flex.flex-col.h-full
.header.flex.px-6.py-5.justify-between
.flex.text-base.font-medium.gap-x-3
img.h-14.w-14.object-cover.rounded-full(:src="patient?.avatar")
@@ -12,16 +12,15 @@
.priority.flex(:class="choiceClass(patient.priority)")
.text-smm(:class="choiceColor(patient.priority)") {{choicePriority(patient.priority)}}
.grey-color.text-smm Приоритет
.flex
.data.flex.w-full.h-full(v-for="item in data")
.flex.flex-col.px-6.py-4.gap-y-6
.text-m.font-bold {{item.title}}
.flex.flex-col.text-smm
.grey-color {{item.text1}}
.font-medium {{item.first}}
.flex.flex-col.text-smm
.grey-color {{item.text2}}
.font-medium {{item.second}}
.flex.h-full
.data.flex.w-full.h-full.flex-col.px-6.py-4.gap-y-6.overflow-hidden(v-for="item in data")
.text-m.font-bold {{item.title}}
.flex.flex-col.text-smm.overflow-hidden.relative.gap-y-1
.grey-color {{item.firstLabel}}
.insurance.flex.font-medium {{item.firstDescription}}
.flex.flex-col.text-smm.gap-y-1
.grey-color {{item.secondLabel}}
.font-medium {{item.secondDescription}}
</template>
<script>
@@ -48,9 +47,9 @@ export default {
{ name: "Низский", id: 3, class: "low-priority" },
],
data: [
{ title: "Запись", text1: "Дата", text2: "Время" },
{ title: "Данные", text1: "Телефон", text2: "Email" },
{ title: "Страхование", text1: "Компания", text2: "Полис" },
{ title: "Запись", firstLabel: "Дата", secondLabel: "Время" },
{ title: "Данные", firstLabel: "Телефон", secondLabel: "Email" },
{ title: "Страхование", firstLabel: "Компания", secondLabel: "Полис" },
],
};
},
@@ -75,15 +74,15 @@ export default {
deep: true,
immediate: true,
handler() {
this.data[0].first = moment().format("DD MMMM");
this.data[0].second =
this.data[0].firstDescription = moment().format("DD MMMM");
this.data[0].secondDescription =
this.patient?.time?.from + "-" + this.patient?.time?.to;
this.data[1].first = this.patient?.phone;
this.data[1].second = this.patient?.email;
this.data[1].firstDescription = this.patient?.phone;
this.data[1].secondDescription = this.patient?.email;
this.data[2].first = this.patient?.company;
this.data[2].second = this.patient?.policy;
this.data[2].firstDescription = this.patient?.company;
this.data[2].secondDescription = this.patient?.policy;
},
},
},
@@ -101,8 +100,28 @@ export default {
.data
border-right: 1px solid var(--gray-scondary)
&:first-child
max-width: 154px
&:last-child
@media (max-width: 1820px)
max-width: 282px
border-right: none
max-width: 214px
.insurance
width: 209px
overflow: hidden
&:after
content: ""
text-align: right
position: absolute
bottom: 0
right: 0
width: 72px
height: 24px
background: linear-gradient(270deg, #FFF 0%, rgba(255, 255, 255, 0.24) 50.73%, rgba(255, 255, 255, 0.00) 100%)
pointer-events: none
@media (max-width: 1820px)
width: 234px
.high-priority
background: var(--system-color-red)

View File

@@ -2,22 +2,36 @@
medcard-form-wrapper.relative(
title="Пациенты на сегодня",
:quantity="patientsData.length",
:link="redirectCalendar",
title-link="Календарь"
)
.form-wrapper.flex.flex-col.overflow-y-auto(@scroll="scrollTo")
.patient.flex.items-center.gap-x-6.p-4(v-for="(patient, index) in patientsData")
.form-wrapper.flex.flex-col.overflow-y-auto(
@scroll="scrollTo",
:class="{'default-form': patientsData.length <= 3}"
)
.patient.flex.items-center.p-4.justify-between(
v-for="(patient, index) in patientsData",
:class="{'default-patient': patientsData.length <= 3}",
@click="changeView(patient.id)"
)
.flex.text-base.font-medium.gap-x-3
img.h-11.w-11.object-cover.rounded-full(:src="patient.avatar")
.flex.flex-col.justify-center
.flex.flex-col.justify-center.gap-y-1
.name.flex.relative {{trimName(patient.last_name, patient.first_name, patient.patronymic)}}
.gradient.flex.absolute
.grey-color.text-smm {{patient.birthday}}
.flex.flex-col.justify-center
.flex.flex-col.justify-center.w-full(:style="{width: '140px'}")
.text-m.font-bold {{patient.time.from + " - " + patient.time.to}}
.grey-color.font-medium.text-smm(
:class="{'red-color': !index}"
) {{index ? "Время посещения" : "Скоро прием" }}
.flex
q-btn.btn(
icon="app:medcard",
size="18px",
dense,
padding="8px",
style="color: var(--font-grey-color); background: var(--bg-light-grey)"
)
.gradient-name.flex.absolute(v-if="isGradient")
</template>
@@ -38,8 +52,12 @@ export default {
if (a.time.from < b.time.from) return -1;
return 0;
})
.filter(({ reception }) => reception === moment().format("DD.MM.YYYY")),
isGradient: true,
.filter(
(e) =>
e.reception === moment().format("DD.MM.YYYY") &&
e.time.from > moment().format("HH:MM")
),
isGradient: false,
};
},
methods: {
@@ -48,6 +66,20 @@ export default {
if (fullName.length > 30) return fullName.slice(0, 30);
return fullName;
},
changeView(id) {
let view = [];
this.patientsData.map((e) => {
if (e.id === id) {
e.view = true;
view.push(e);
e.viewDate = moment().format("DD.MM.YYYY");
}
});
localStorage.view = JSON.stringify(view);
},
redirectCalendar() {
this.$router.push("/calendar");
},
scrollTo(event) {
if (
Math.abs(
@@ -74,6 +106,18 @@ export default {
.name
width: 272px
&:after
content: ""
text-align: right
position: absolute
bottom: 0
right: 0
width: 72px
height: 24px
background: linear-gradient(270deg, #FFF 0%, rgba(255, 255, 255, 0.24) 50.73%, rgba(255, 255, 255, 0.00) 100%)
pointer-events: none
@media (max-width: 1820px)
width: 340px
.patient
border-bottom: 1px solid var(--gray-scondary)
@@ -82,13 +126,16 @@ export default {
&:last-child
border-bottom: none
.gradient
background: linear-gradient(90deg, #FFF 0%, rgba(255, 255, 255, 0.24) 50.73%, rgba(255, 255, 255, 0.00) 100%)
width: 72px
height: 24px
right: 0
top: 0
transform: rotate(180deg)
.default-patient
margin-right: 0px
border-right: none
&:last-child
border-bottom: 1px solid var(--gray-scondary)
.default-form
margin-right: 0px
&:last-child
border-bottom: none
.gradient-name
background: linear-gradient(180deg, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)
@@ -97,6 +144,11 @@ export default {
bottom: 0
left: 0
.btn
border: 1px solid var(--gray-scondary)
color: var(--font-grey-color)
background: var(--bg-light-grey)
.grey-color
color: var(--font-grey-color)

View File

@@ -1,14 +1,141 @@
<template lang="pug">
medcard-form-wrapper(title="Недавно просмотренные медкарты")
.form-wrapper.flex.flex-col.overflow-y-auto(
@scroll="scrollTo",
:class="{'default-params': viewPatients.length <= 3}"
)
.patient.flex.items-center.p-4.justify-between(
v-for="(patient, index) in viewPatients",
:class="{'default-params': viewPatients.length <= 3}"
)
.flex.text-base.font-medium.gap-x-3
img.h-11.w-11.object-cover.rounded-full(:src="patient.avatar")
.flex.flex-col.justify-center.gap-y-1
.name.flex.relative {{trimName(patient.last_name, patient.first_name, patient.patronymic)}}
.grey-color.text-smm {{"Медкарта #" + patient.id}}
.flex.flex-col.font-medium.text-m.gap-y-1(:style="{width: '140px'}")
span {{patient.viewDate}}
.grey-color.text-smm Дата просмотра
.flex
q-btn.btn(
icon="app:medcard",
size="18px",
dense,
padding="8px",
style="color: var(--font-grey-color); background: var(--bg-light-grey)"
)
.gradient-name.flex.absolute(v-if="isGradient")
</template>
<script>
import MedcardFormWrapper from "@/pages/medcards/components/MedcardFormWrapper.vue";
import { patientList } from "@/pages/newCalendar/utils/calendarConfig";
export default {
name: "ViewedMedicalRecordsForm",
components: { MedcardFormWrapper },
data() {
return {
viewPatients: [],
patientsData: patientList.find(({ label }) => label === "Пациенты").data,
isGradient: false,
};
},
methods: {
trimName(last, first, patronymic) {
let fullName = last + " " + first + " " + patronymic;
if (fullName.length > 30) return fullName.slice(0, 30);
return fullName;
},
scrollTo(event) {
if (
Math.abs(
event.currentTarget.scrollHeight -
event.currentTarget.clientHeight -
event.currentTarget.scrollTop
) < 1
)
return (this.isGradient = false);
this.isGradient = true;
},
},
watch: {
patientsData: {
immediate: true,
deep: true,
handler() {
if (localStorage.getItem("view"))
this.viewPatients.push(...JSON.parse(localStorage.getItem("view")));
},
},
},
};
</script>
<style lang="sass" scoped></style>
<style lang="sass" scoped>
.form-wrapper
margin-right: 8px
&::-webkit-scrollbar
width: 4px
&::-webkit-scrollbar-track:vertical
margin-top: 16px
margin-bottom: 16px
.name
width: 272px
&:after
content: ""
text-align: right
position: absolute
bottom: 0
right: 0
width: 72px
height: 24px
background: linear-gradient(270deg, #FFF 0%, rgba(255, 255, 255, 0.24) 50.73%, rgba(255, 255, 255, 0.00) 100%)
pointer-events: none
.patient
border-bottom: 1px solid var(--gray-scondary)
border-right: 1px solid var(--gray-scondary)
margin-right: 8px
&:last-child
border-bottom: none
.default-params
margin-right: 0px
border-right: none
&:last-child
border-bottom: 1px solid var(--gray-scondary)
.default-params.form-wrapper
border-right: none
margin-right: 0px
&:last-child
border-bottom: none
.btn
border: 1px solid var(--gray-scondary)
color: var(--font-grey-color)
background: var(--bg-light-grey)
.gradient
background: linear-gradient(90deg, #FFF 0%, rgba(255, 255, 255, 0.24) 50.73%, rgba(255, 255, 255, 0.00) 100%)
width: 72px
height: 24px
right: 0
top: 0
transform: rotate(180deg)
.gradient-name
background: linear-gradient(180deg, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)
width: 580px
height: 43px
bottom: 0
left: 0
.grey-color
color: var(--font-grey-color)
.red-color
color: var(--system-color-red)
</style>

View File

@@ -1,5 +1,5 @@
<template lang="pug">
.form-wrapper.flex.flex-col.w-full.rounded
.wrapper.flex.flex-col.w-full.rounded
.header.flex.items-center.text-sm.font-bold.justify-between.w-full.px-6.py-5
.left-side.flex.gap-x-2.items-center
span {{title}}
@@ -22,7 +22,7 @@ export default {
</script>
<style lang="sass" scoped>
.form-wrapper
.wrapper
height: 360px
background: var(--default-white)
color: var(--font-dark-blue-color)

View File

@@ -2,7 +2,7 @@
.table-wrapper.flex.gap-x-2
todays-patients-form
current-patient-form
viewed-medical-records-form
viewed-medical-records-form.viev
</template>
<script>
@@ -20,4 +20,8 @@ export default {
};
</script>
<style lang="sass" scoped></style>
<style lang="sass" scoped>
.viev
@media (max-width: 1820px)
display: none
</style>

View File

@@ -17,6 +17,7 @@
span Создать запись
.flex.flex-col.gap-y-px
q-expansion-item.expansion.font-bold.text-xm(
expand-icon="app:down-arrow",
v-for="(elem, index) in patientList",
expand-separator,
:label="elem.label",
@@ -301,6 +302,10 @@ export default {
.expansion :deep(.q-focus-helper)
display: none
.expansion
&:deep(path)
fill: var(--font-dark-blue-color)
.person-wrapper
overflow-y: auto
margin-right: -10px

View File

@@ -43,8 +43,7 @@
<script>
import * as moment from "moment/moment";
import {
recordingStatuses,
medicalСardStatuses,
statuses,
networks,
} from "@/pages/newCalendar/utils/calendarConfig.js";
import { trimName } from "@/pages/newCalendar/utils/calendarFunctions.js";
@@ -80,12 +79,12 @@ export default {
return !this.bodyClass?.["flex-col"] && !this.expandedType;
},
recordingStatus() {
return recordingStatuses.find(
return statuses[0].data.find(
(elem) => elem.value === this.record?.status
);
},
medicalСardStatus() {
return medicalСardStatuses.find(
return statuses[1].data.find(
(elem) => elem.value === this.record?.medicalCard?.status
);
},

View File

@@ -52,7 +52,7 @@ import { trimName } from "@/pages/newCalendar/utils/calendarFunctions.js";
import {
recordList,
recordPreviewConfig,
recordingStatuses,
statuses,
} from "@/pages/newCalendar/utils/calendarConfig.js";
export default {
name: "CalendarRecordPreview",
@@ -93,14 +93,12 @@ export default {
return this.start?.format("HH:mm") + " " + this.end?.format("HH:mm");
},
statusLabel() {
return recordingStatuses.find(
(elem) => elem.value === this.record?.status
).label;
return statuses[0].data.find((elem) => elem.value === this.record?.status)
.label;
},
statusIcon() {
return recordingStatuses.find(
(elem) => elem.value === this.record?.status
).icon;
return statuses[0].data.find((elem) => elem.value === this.record?.status)
.icon;
},
memberData() {
return this.record?.member;

View File

@@ -42,44 +42,51 @@ export const networks = [
},
];
export const recordingStatuses = [
export const statuses = [
{
label: "Не принят",
icon: not_accepted,
value: "not_accepted",
name: "recording",
data: [
{
label: "Не принят",
icon: not_accepted,
value: "not_accepted",
},
{
label: "Принят",
icon: accepted,
value: "accepted",
},
{
label: "Отказ",
icon: rejected,
value: "rejected",
},
{
label: "На приеме",
icon: reception,
value: "reception",
},
],
},
{
label: "Принят",
icon: accepted,
value: "accepted",
},
{
label: "Отказ",
icon: rejected,
value: "rejected",
},
{
label: "На приеме",
icon: reception,
value: "reception",
},
];
export const medicalСardStatuses = [
{
label: "Не заполнена",
icon: not_filled,
value: "not_filled",
},
{
label: "Частично заполнена",
icon: partially_filled,
value: "partially_filled",
},
{
label: "Заполнена",
icon: filled,
value: "filled",
name: "medicalCard",
data: [
{
label: "Не заполнена",
icon: not_filled,
value: "not_filled",
},
{
label: "Частично заполнена",
icon: partially_filled,
value: "partially_filled",
},
{
label: "Заполнена",
icon: filled,
value: "filled",
},
],
},
];
@@ -119,8 +126,10 @@ export const patientList = [
birthday: "28.03.1980",
avatar: personImage,
check: false,
reception: "25.07.2023",
time: { from: "12:00", to: "23:00" },
view: false,
viewDate: "",
reception: "26.07.2023",
time: { from: "11:00", to: "18:00" },
priority: 1,
phone: "+7 (910) 6233223",
email: "gaevaia@yandex.ru",
@@ -135,8 +144,10 @@ export const patientList = [
birthday: "01.03.1975",
avatar: personImage,
check: false,
reception: "25.07.2023",
time: { from: "11:00", to: "12:00" },
view: false,
viewDate: "",
reception: "26.07.2023",
time: { from: "05:00", to: "06:00" },
priority: 1,
phone: "+7 (910) 6233223",
email: "gaevaia@yandex.ru",
@@ -151,8 +162,10 @@ export const patientList = [
birthday: "13.07.1999",
avatar: personImage,
check: false,
reception: "25.07.2023",
time: { from: "14:00", to: "16:00" },
view: false,
viewDate: "",
reception: "26.07.2023",
time: { from: "18:00", to: "19:00" },
priority: 1,
phone: "+7 (910) 6233223",
email: "gaevaia@yandex.ru",
@@ -161,14 +174,16 @@ export const patientList = [
},
{
id: 3,
first_name: "Самвел",
first_name: "Самвелиуслим",
last_name: "Акопян",
patronymic: "Робертович",
birthday: "11.11.1991",
avatar: personImage,
check: false,
reception: "27.07.2023",
time: { from: "12:00", to: "14:00" },
view: false,
viewDate: "",
reception: "26.07.2023",
time: { from: "19:00", to: "20:00" },
priority: 1,
phone: "+7 (910) 6233223",
email: "gaevaia@yandex.ru",
@@ -183,6 +198,8 @@ export const patientList = [
birthday: "12.03.1989",
avatar: personImage,
check: false,
view: false,
viewDate: "",
reception: "27.07.2023",
time: { from: "11:00", to: "14:00" },
priority: 1,
@@ -199,6 +216,8 @@ export const patientList = [
birthday: "23.07.1949",
avatar: personImage,
check: false,
view: false,
viewDate: "",
reception: "28.07.2023",
time: { from: "18:00", to: "19:00" },
priority: 1,
@@ -215,7 +234,9 @@ export const patientList = [
birthday: "12.11.1995",
avatar: personImage,
check: false,
reception: "25.07.2023",
view: false,
viewDate: "",
reception: "26.07.2023",
time: { from: "16:00", to: "17:00" },
priority: 0,
phone: "+7 (910) 6233223",
@@ -231,7 +252,9 @@ export const patientList = [
birthday: "15.05.1989",
avatar: personImage,
check: false,
reception: "25.07.2023",
view: false,
viewDate: "",
reception: "26.07.2023",
time: { from: "20:00", to: "21:00" },
priority: 1,
phone: "+7 (910) 6233223",
@@ -247,8 +270,10 @@ export const patientList = [
birthday: "13.07.2000",
avatar: personImage,
check: false,
reception: "31.06.2023",
time: { from: "12:00", to: "14:00" },
view: false,
viewDate: "",
reception: "26.06.2023",
time: { from: "22:00", to: "23:00" },
priority: 1,
phone: "+7 (910) 6233223",
email: "gaevaia@yandex.ru",
@@ -263,8 +288,10 @@ export const patientList = [
birthday: "12.12.1986",
avatar: personImage,
check: false,
reception: "30.07.2023",
time: { from: "12:00", to: "14:00" },
view: false,
viewDate: "",
reception: "25.07.2023",
time: { from: "22:00", to: "23:00" },
priority: 1,
phone: "+7 (910) 6233223",
email: "gaevaia@yandex.ru",
@@ -279,6 +306,8 @@ export const patientList = [
birthday: "13.03.1979",
avatar: personImage,
check: false,
view: false,
viewDate: "",
reception: "27.07.2023",
time: { from: "09:00", to: "10:00" },
priority: 1,