Убрала лишнее

This commit is contained in:
Daria Golova
2023-08-15 16:32:46 +03:00
parent ee6c3e795b
commit 689a6bf0b6
3 changed files with 10 additions and 49 deletions

View File

@@ -1,5 +1,5 @@
<template lang="pug"> <template lang="pug">
.medical-wrapper.rounded .medical-wrapper.rounded.h-full
list-header(@search="getMedcards") list-header(@search="getMedcards")
list-contents( list-contents(
:medicalCards="medicalCards", :medicalCards="medicalCards",

View File

@@ -1,6 +1,6 @@
<template lang="pug"> <template lang="pug">
.scroll-wrapper .scroll-wrapper
.list-wrapper.rounded.w-full.bg-white(id="listWrapper") .list-wrapper.rounded.w-full.bg-white.h-full
.w-full.h-full.flex.items-center.justify-center(v-if="dataStatus.title !== 'found'") .w-full.h-full.flex.items-center.justify-center(v-if="dataStatus.title !== 'found'")
.flex.flex-col.gap-y-2.h-96.items-center .flex.flex-col.gap-y-2.h-96.items-center
img.image(:src="dataStatus.img") img.image(:src="dataStatus.img")
@@ -12,7 +12,6 @@
:key="field.title", :key="field.title",
:style="headerStyle(field)" :style="headerStyle(field)"
) {{ field.title }} ) {{ field.title }}
.h-full.w-8(v-if="scrollPresence")
.body.w-full .body.w-full
row( row(
v-for="medcard in medicalCards", v-for="medcard in medicalCards",
@@ -38,24 +37,10 @@ export default {
headerConfig: searchListConfig, headerConfig: searchListConfig,
}; };
}, },
computed: {
scrollPresence() {
const listWrapper = document.getElementById("listWrapper");
return listWrapper?.offsetHeight - 56 * this.medicalCards?.length < 0;
},
},
methods: { methods: {
headerStyle(field) { 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 { return {
width: width, width: field.width,
"justify-content": field.title === "Do" ? "center" : "", "justify-content": field.title === "Do" ? "center" : "",
}; };
}, },
@@ -69,9 +54,6 @@ export default {
overflow-y: hidden overflow-y: hidden
.list-wrapper .list-wrapper
overflow: hidden overflow: hidden
height: calc(100vh - 16px - 56px - 72px)
//display: flex
//flex-direction: column
min-width: min-content min-width: min-content
.header .header
background-color: var(--gray-thirdly) background-color: var(--gray-thirdly)

View File

@@ -1,52 +1,31 @@
export const searchListConfig = [ export const searchListConfig = [
{ {
title: "ФИО", title: "ФИО",
advancedScrollWidth: "518px", width: "550px",
advancedWidth: "550px",
compressedScrollWidth: "400px",
compressedWidth: "400px",
}, },
{ {
title: "Дата рождения", title: "Дата рождения",
advancedScrollWidth: "220px", width: "220px",
advancedWidth: "220px",
compressedScrollWidth: "170px",
compressedWidth: "160px",
}, },
{ {
title: "Приоритет", title: "Приоритет",
advancedScrollWidth: "220px", width: "220px",
advancedWidth: "220px",
compressedScrollWidth: "140px",
compressedWidth: "140px",
}, },
{ {
title: "№ медкарты", title: "№ медкарты",
advancedScrollWidth: "280px", width: "280px",
advancedWidth: "280px",
compressedScrollWidth: "194px",
compressedWidth: "220px",
}, },
{ {
title: "Дата создания", title: "Дата создания",
advancedScrollWidth: "215px", width: "215px",
advancedWidth: "215px",
compressedScrollWidth: "170px",
compressedWidth: "160px",
}, },
{ {
title: "Процент заполнения", title: "Процент заполнения",
advancedScrollWidth: "295px", width: "295px",
advancedWidth: "295px",
compressedScrollWidth: "194px",
compressedWidth: "220px",
}, },
{ {
title: "Do", title: "Do",
advancedScrollWidth: "60px", width: "60px",
advancedWidth: "60px",
compressedScrollWidth: "60px",
compressedWidth: "60px",
}, },
]; ];