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

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">
.medical-wrapper.rounded
.medical-wrapper.rounded.h-full
list-header(@search="getMedcards")
list-contents(
:medicalCards="medicalCards",

View File

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

View File

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