From ee6c3e795bcf7214f03a7da275cab7f36d1bc721 Mon Sep 17 00:00:00 2001 From: Daria Golova Date: Tue, 15 Aug 2023 11:09:34 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=D0=B0=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D1=83=20=D0=BC?= =?UTF-8?q?=D0=B5=D0=B4=D0=BA=D0=B0=D1=80=D1=82=D1=8B=20=D0=B8=20=D0=B4?= =?UTF-8?q?=D0=B0=D1=82=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/MedicalCardSearchList.vue | 20 ++++---- src/pages/medcards/utils/medcardsConfig.js | 47 +++++++++++-------- .../newCalendar/components/CalendarHeader.vue | 4 +- 3 files changed, 41 insertions(+), 30 deletions(-) diff --git a/src/pages/medcards/components/MedicalCardSearchList.vue b/src/pages/medcards/components/MedicalCardSearchList.vue index ae9a699..5ef3c3e 100644 --- a/src/pages/medcards/components/MedicalCardSearchList.vue +++ b/src/pages/medcards/components/MedicalCardSearchList.vue @@ -40,20 +40,22 @@ export default { }, computed: { scrollPresence() { - return this.medicalCards.length > 9; + const listWrapper = document.getElementById("listWrapper"); + return listWrapper?.offsetHeight - 56 * this.medicalCards?.length < 0; }, }, methods: { headerStyle(field) { + const advancedScreen = + window.innerWidth === 1920 && window.innerHeight === 1080; + let width; + if (this.scrollPresence) + width = advancedScreen + ? field.advancedScrollWidth + : field.compressedScrollWidth; + else width = advancedScreen ? field.advancedWidth : field.compressedWidth; return { - width: - !this.scrollPresence && field.spareWidth - ? field.spareWidth - : field.width, - "min-width": - this.scrollPresence && field.compressedMinWidth - ? field.compressedMinWidth - : field.minWidth, + width: width, "justify-content": field.title === "Do" ? "center" : "", }; }, diff --git a/src/pages/medcards/utils/medcardsConfig.js b/src/pages/medcards/utils/medcardsConfig.js index 117547d..a663d02 100644 --- a/src/pages/medcards/utils/medcardsConfig.js +++ b/src/pages/medcards/utils/medcardsConfig.js @@ -1,43 +1,52 @@ export const searchListConfig = [ { title: "ФИО", - width: "518px", - minWidth: "400px", - spareWidth: "550px", + advancedScrollWidth: "518px", + advancedWidth: "550px", + compressedScrollWidth: "400px", + compressedWidth: "400px", }, { title: "Дата рождения", - width: "220px", - minWidth: "160px", - compressedMinWidth: "170px", + advancedScrollWidth: "220px", + advancedWidth: "220px", + compressedScrollWidth: "170px", + compressedWidth: "160px", }, { title: "Приоритет", - width: "220px", - minWidth: "140px", + advancedScrollWidth: "220px", + advancedWidth: "220px", + compressedScrollWidth: "140px", + compressedWidth: "140px", }, { title: "№ медкарты", - width: "280px", - minWidth: "220px", - compressedMinWidth: "194px", + advancedScrollWidth: "280px", + advancedWidth: "280px", + compressedScrollWidth: "194px", + compressedWidth: "220px", }, { title: "Дата создания", - width: "215px", - minWidth: "160px", - compressedMinWidth: "170px", + advancedScrollWidth: "215px", + advancedWidth: "215px", + compressedScrollWidth: "170px", + compressedWidth: "160px", }, { title: "Процент заполнения", - width: "295px", - minWidth: "220px", - compressedMinWidth: "194px", + advancedScrollWidth: "295px", + advancedWidth: "295px", + compressedScrollWidth: "194px", + compressedWidth: "220px", }, { title: "Do", - width: "60px", - minWidth: "60px", + advancedScrollWidth: "60px", + advancedWidth: "60px", + compressedScrollWidth: "60px", + compressedWidth: "60px", }, ]; diff --git a/src/pages/newCalendar/components/CalendarHeader.vue b/src/pages/newCalendar/components/CalendarHeader.vue index dc1f491..0318466 100644 --- a/src/pages/newCalendar/components/CalendarHeader.vue +++ b/src/pages/newCalendar/components/CalendarHeader.vue @@ -22,7 +22,7 @@ ) base-input.search( size="M" - :width="300", + :width="350", v-model="currentWeek", ) .h-5.w-5.flex.items-center.justify-center @@ -36,7 +36,7 @@ transition-show="scale", transition-hide="scale" self="top middle", - :offset="[118, 14]" + :offset="[140, 8]" ) base-calendar( v-model="dates",