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",