Merge branch 'ASTRA-139' into 'master'
[WIP] Фикс багов и скролла страницы медкартотчек See merge request andrusyakka/urban-couscous!491
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
)
|
)
|
||||||
.form-wrapper.flex.flex-col.overflow-y-auto(
|
.form-wrapper.flex.flex-col.overflow-y-auto(
|
||||||
@scroll="scrollTo",
|
@scroll="scrollTo",
|
||||||
|
id="scroll",
|
||||||
:class="{'default-form': patientsData.length <= 3}"
|
:class="{'default-form': patientsData.length <= 3}"
|
||||||
)
|
)
|
||||||
.patient.flex.items-center.p-4.justify-between(
|
.patient.flex.items-center.p-4.justify-between(
|
||||||
@@ -91,6 +92,14 @@ export default {
|
|||||||
return (this.isGradient = false);
|
return (this.isGradient = false);
|
||||||
this.isGradient = true;
|
this.isGradient = true;
|
||||||
},
|
},
|
||||||
|
checkScroll() {
|
||||||
|
let elem = document.getElementById("scroll");
|
||||||
|
if (Math.abs(elem.scrollHeight - elem.clientHeight - elem.scrollTop))
|
||||||
|
this.isGradient = true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.checkScroll();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -123,6 +132,7 @@ export default {
|
|||||||
border-bottom: 1px solid var(--gray-secondary)
|
border-bottom: 1px solid var(--gray-secondary)
|
||||||
border-right: 1px solid var(--gray-secondary)
|
border-right: 1px solid var(--gray-secondary)
|
||||||
margin-right: 8px
|
margin-right: 8px
|
||||||
|
height: 77px
|
||||||
&:last-child
|
&:last-child
|
||||||
border-bottom: none
|
border-bottom: none
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
medcard-form-wrapper(title="Недавно просмотренные медкарты")
|
medcard-form-wrapper.relative(title="Недавно просмотренные медкарты")
|
||||||
.form-wrapper.flex.flex-col.overflow-y-auto(
|
.form-wrapper.flex.flex-col.overflow-y-auto(
|
||||||
@scroll="scrollTo",
|
@scroll="scrollTo",
|
||||||
:class="{'default-params': viewPatients.length <= 3}"
|
id="scroll-view",
|
||||||
|
:class="{'default-form': viewPatients.length <= 3}"
|
||||||
)
|
)
|
||||||
.patient.flex.items-center.p-4.justify-between(
|
.patient.flex.items-center.p-4.justify-between(
|
||||||
v-for="(patient, index) in viewPatients",
|
v-for="(patient, index) in viewPatients",
|
||||||
:class="{'default-params': viewPatients.length <= 3}"
|
:class="{'default-patient': viewPatients.length <= 3}"
|
||||||
)
|
)
|
||||||
.flex.text-base.font-medium.gap-x-3
|
.flex.text-base.font-medium.gap-x-3
|
||||||
img.h-11.w-11.object-cover.rounded-full(:src="patient.avatar")
|
img.h-11.w-11.object-cover.rounded-full(:src="patient.avatar")
|
||||||
@@ -58,6 +59,11 @@ export default {
|
|||||||
return (this.isGradient = false);
|
return (this.isGradient = false);
|
||||||
this.isGradient = true;
|
this.isGradient = true;
|
||||||
},
|
},
|
||||||
|
checkScroll() {
|
||||||
|
let elem = document.getElementById("scroll-view");
|
||||||
|
if (Math.abs(elem.scrollHeight - elem.clientHeight - elem.scrollTop) < 1)
|
||||||
|
this.isGradient = true;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
patientsData: {
|
patientsData: {
|
||||||
@@ -68,6 +74,16 @@ export default {
|
|||||||
this.viewPatients.push(...JSON.parse(localStorage.getItem("view")));
|
this.viewPatients.push(...JSON.parse(localStorage.getItem("view")));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
viewPatients: {
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
handler() {
|
||||||
|
if (this.viewPatients.length > 3) this.checkScroll();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.checkScroll();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -95,26 +111,26 @@ export default {
|
|||||||
pointer-events: none
|
pointer-events: none
|
||||||
|
|
||||||
.patient
|
.patient
|
||||||
border-bottom: 1px solid var(--gray-scondary)
|
border-bottom: 1px solid var(--gray-secondary)
|
||||||
border-right: 1px solid var(--gray-scondary)
|
border-right: 1px solid var(--gray-secondary)
|
||||||
margin-right: 8px
|
margin-right: 8px
|
||||||
|
height: 77px
|
||||||
&:last-child
|
&:last-child
|
||||||
border-bottom: none
|
border-bottom: none
|
||||||
|
|
||||||
.default-params
|
.default-form
|
||||||
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
|
margin-right: 0px
|
||||||
&:last-child
|
&:last-child
|
||||||
border-bottom: none
|
border-bottom: none
|
||||||
|
|
||||||
|
.default-patient
|
||||||
|
margin-right: 0px
|
||||||
|
border-right: none
|
||||||
|
&:last-child
|
||||||
|
border-bottom: 1px solid var(--gray-secondary)
|
||||||
|
|
||||||
.btn
|
.btn
|
||||||
border: 1px solid var(--gray-scondary)
|
border: 1px solid var(--gray-secondary)
|
||||||
color: var(--font-grey-color)
|
color: var(--font-grey-color)
|
||||||
background: var(--bg-light-grey)
|
background: var(--bg-light-grey)
|
||||||
|
|
||||||
|
|||||||
@@ -9,10 +9,7 @@
|
|||||||
)
|
)
|
||||||
img(:src="arrow")
|
img(:src="arrow")
|
||||||
.form.flex.p-4
|
.form.flex.p-4
|
||||||
base-button(
|
base-button(width="100%", @click="createForm")
|
||||||
width="100%",
|
|
||||||
@click="createForm",
|
|
||||||
)
|
|
||||||
q-icon.plus(name="app:plus", size="24px", left)
|
q-icon.plus(name="app:plus", size="24px", left)
|
||||||
span Создать запись
|
span Создать запись
|
||||||
.flex.flex-col.gap-y-px
|
.flex.flex-col.gap-y-px
|
||||||
@@ -51,17 +48,10 @@
|
|||||||
placeholder="Найти пациента...",
|
placeholder="Найти пациента...",
|
||||||
:width="160"
|
:width="160"
|
||||||
size="S",
|
size="S",
|
||||||
:iconLeft="!foundPerson",
|
icon-left
|
||||||
iconRight
|
|
||||||
)
|
)
|
||||||
template(v-slot:iconLeft)
|
template(v-slot:iconLeft)
|
||||||
q-icon.input-icon(name="app:search", size="16px")
|
q-icon.input-icon(name="app:search", size="16px")
|
||||||
template(v-slot:iconRight)
|
|
||||||
q-icon.cursor-pointer.input-icon(
|
|
||||||
@click="copyValue(foundPerson)"
|
|
||||||
name="app:copy",
|
|
||||||
size="16px"
|
|
||||||
)
|
|
||||||
q-btn.ml-2(
|
q-btn.ml-2(
|
||||||
@click="sortPerson(elem.data)",
|
@click="sortPerson(elem.data)",
|
||||||
:class="sortingClass",
|
:class="sortingClass",
|
||||||
@@ -74,7 +64,7 @@
|
|||||||
)
|
)
|
||||||
.flex.items-center.gap-x-2
|
.flex.items-center.gap-x-2
|
||||||
.all-icon.flex.items-center.justify-center
|
.all-icon.flex.items-center.justify-center
|
||||||
q-icon.icon-patients(name="app:patients", size="24px")
|
q-icon.icon-patients(name="app:patients", size="24px")
|
||||||
.flex.flex-col.font-medium
|
.flex.flex-col.font-medium
|
||||||
.text-smm Все
|
.text-smm Все
|
||||||
.grey-color.text.text-xsx {{ elem.data?.length + " пациентов" }}
|
.grey-color.text.text-xsx {{ elem.data?.length + " пациентов" }}
|
||||||
|
|||||||
@@ -74,17 +74,10 @@
|
|||||||
placeholder="Найти пациента...",
|
placeholder="Найти пациента...",
|
||||||
:width="160"
|
:width="160"
|
||||||
size="S",
|
size="S",
|
||||||
:iconLeft="!foundPerson",
|
icon-left
|
||||||
iconRight
|
|
||||||
)
|
)
|
||||||
template(v-slot:iconLeft)
|
template(v-slot:iconLeft)
|
||||||
q-icon.input-icon(name="app:search", size="16px")
|
q-icon.input-icon(name="app:search", size="16px")
|
||||||
template(v-slot:iconRight)
|
|
||||||
q-icon.cursor-pointer.input-icon(
|
|
||||||
@click="copyValue(foundPerson)"
|
|
||||||
name="app:copy",
|
|
||||||
size="16px"
|
|
||||||
)
|
|
||||||
q-btn.ml-2(
|
q-btn.ml-2(
|
||||||
@click="sortPerson(patientsData)",
|
@click="sortPerson(patientsData)",
|
||||||
:style="{width: '32px', height: '32px', border: '1px solid var(--gray-secondary)'}",
|
:style="{width: '32px', height: '32px', border: '1px solid var(--gray-secondary)'}",
|
||||||
@@ -195,9 +188,6 @@ export default {
|
|||||||
"green-color": priority === 3,
|
"green-color": priority === 3,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
copyValue(text) {
|
|
||||||
navigator.clipboard.writeText(text);
|
|
||||||
},
|
|
||||||
checkPerson(index, arr) {
|
checkPerson(index, arr) {
|
||||||
arr.map((e) => {
|
arr.map((e) => {
|
||||||
if (e.id === index) e.check = !e.check;
|
if (e.id === index) e.check = !e.check;
|
||||||
|
|||||||
@@ -114,8 +114,8 @@ export const patientList = [
|
|||||||
check: false,
|
check: false,
|
||||||
view: false,
|
view: false,
|
||||||
viewDate: "",
|
viewDate: "",
|
||||||
reception: "26.07.2023",
|
reception: "28.07.2023",
|
||||||
time: { from: "11:00", to: "18:00" },
|
time: { from: "11:00", to: "12:00" },
|
||||||
priority: 1,
|
priority: 1,
|
||||||
phone: "+7 (910) 623–32–23",
|
phone: "+7 (910) 623–32–23",
|
||||||
email: "gaevaia@yandex.ru",
|
email: "gaevaia@yandex.ru",
|
||||||
@@ -132,8 +132,8 @@ export const patientList = [
|
|||||||
check: false,
|
check: false,
|
||||||
view: false,
|
view: false,
|
||||||
viewDate: "",
|
viewDate: "",
|
||||||
reception: "26.07.2023",
|
reception: "28.07.2023",
|
||||||
time: { from: "05:00", to: "06:00" },
|
time: { from: "12:00", to: "13:00" },
|
||||||
priority: 1,
|
priority: 1,
|
||||||
phone: "+7 (910) 623–32–23",
|
phone: "+7 (910) 623–32–23",
|
||||||
email: "gaevaia@yandex.ru",
|
email: "gaevaia@yandex.ru",
|
||||||
@@ -150,8 +150,8 @@ export const patientList = [
|
|||||||
check: false,
|
check: false,
|
||||||
view: false,
|
view: false,
|
||||||
viewDate: "",
|
viewDate: "",
|
||||||
reception: "26.07.2023",
|
reception: "28.07.2023",
|
||||||
time: { from: "18:00", to: "19:00" },
|
time: { from: "13:00", to: "14:00" },
|
||||||
priority: 1,
|
priority: 1,
|
||||||
phone: "+7 (910) 623–32–23",
|
phone: "+7 (910) 623–32–23",
|
||||||
email: "gaevaia@yandex.ru",
|
email: "gaevaia@yandex.ru",
|
||||||
@@ -168,8 +168,8 @@ export const patientList = [
|
|||||||
check: false,
|
check: false,
|
||||||
view: false,
|
view: false,
|
||||||
viewDate: "",
|
viewDate: "",
|
||||||
reception: "26.07.2023",
|
reception: "28.07.2023",
|
||||||
time: { from: "19:00", to: "20:00" },
|
time: { from: "14:00", to: "16:00" },
|
||||||
priority: 1,
|
priority: 1,
|
||||||
phone: "+7 (910) 623–32–23",
|
phone: "+7 (910) 623–32–23",
|
||||||
email: "gaevaia@yandex.ru",
|
email: "gaevaia@yandex.ru",
|
||||||
@@ -186,8 +186,8 @@ export const patientList = [
|
|||||||
check: false,
|
check: false,
|
||||||
view: false,
|
view: false,
|
||||||
viewDate: "",
|
viewDate: "",
|
||||||
reception: "27.07.2023",
|
reception: "28.07.2023",
|
||||||
time: { from: "11:00", to: "14:00" },
|
time: { from: "16:00", to: "20:00" },
|
||||||
priority: 1,
|
priority: 1,
|
||||||
phone: "+7 (910) 623–32–23",
|
phone: "+7 (910) 623–32–23",
|
||||||
email: "gaevaia@yandex.ru",
|
email: "gaevaia@yandex.ru",
|
||||||
|
|||||||
Reference in New Issue
Block a user