Фикс багов

This commit is contained in:
megavrilinvv
2023-07-27 14:27:00 +03:00
parent 20b9ad129b
commit a4d6d3ac00
7 changed files with 139 additions and 62 deletions

View File

@@ -36,9 +36,10 @@ export default {
patient: patientList
.find(({ label }) => label === "Пациенты")
.data.find(
({ time }) =>
time.from <= moment().format("HH:MM") &&
time.to >= moment().format("HH:MM")
(e) =>
e.time.from <= moment().format("HH:MM") &&
e.time.to >= moment().format("HH:MM") &&
e.reception === moment().format("DD.MM.YYYY")
),
prioritys: [
{ name: "Без приоритета", id: 0, class: "none-priority" },
@@ -62,7 +63,7 @@ export default {
},
choiceColor(priority) {
return {
"grey-color": !priority,
"none-priority": !priority,
"red-color": priority === 1,
"blue-color": priority === 2,
"green-color": priority === 3,

View File

@@ -29,7 +29,16 @@
v-for="item in elem.data"
)
.status.flex.items-center.gap-x-1.px-2
img(:src="item.icon")
q-icon(
v-if="elem.label === 'Первичная медкарта'"
:name="item.icon",
size="20px",
:class="choiceClass(item.id, 'medcard')"
)
.priority.rounded-full.flex.mr-1.5px(
v-if="elem.label === 'Статус приема'",
:class="choiceClass(item.id, 'priority')"
)
span {{item.name}}
.flex.flex-col.px-4.pt-6px.pb-0(:class="choiceState()", v-else)
.flex.flex-col.gap-y-2
@@ -46,13 +55,12 @@
iconRight
)
template(v-slot:iconLeft)
q-icon(name="app:icon-search", size="16px", style="color: var(--font-grey-color)")
q-icon.input-icon(name="app:search", size="16px")
template(v-slot:iconRight)
q-icon.cursor-pointer(
q-icon.cursor-pointer.input-icon(
@click="copyValue(foundPerson)"
name="app:icon-copy",
size="16px",
style="color: var(--font-grey-color)"
name="app:copy",
size="16px"
)
q-btn.ml-2(
@click="sortPerson(elem.data)",
@@ -66,7 +74,7 @@
)
.flex.items-center.gap-x-2
.all-icon.flex.items-center.justify-center
calendar-sidebar-svg.p-6px(name-svg="group", active)
q-icon.icon-patients(name="app:patients", size="24px")
.flex.flex-col.font-medium
.text-smm Все
.grey-color.text.text-xsx {{ elem.data?.length + " пациентов" }}
@@ -80,7 +88,7 @@
img.h-10.w-10.object-cover.rounded-full(:src="person.avatar")
.flex.flex-col.font-medium
.text-smm {{trimOwnerName(person.last_name, person.first_name, person.patronymic)}}
.grey-color.text-xsx {{person.birthday}}
.grey-color.text-xsx {{trimBirthday(person.birthday)}}
img.h-6.w-6(v-if="person.check", :src="icon_ok")
.gradient.flex.absolute(v-if="isGradient")
</template>
@@ -94,6 +102,7 @@ import { patientList } from "@/pages/newCalendar/utils/calendarConfig.js";
import { trimName } from "@/pages/newCalendar/utils/calendarFunctions.js";
import BaseButton from "@/components/base/BaseButton.vue";
import CalendarSidebarSvg from "@/pages/newCalendar/components/CalendarSidebarSvg.vue";
import * as moment from "moment";
export default {
name: "CalendarOpenSidebar",
@@ -125,6 +134,23 @@ export default {
},
},
methods: {
choiceClass(priority, name) {
if (name === "priority")
return {
"none-priority": !priority,
"red-color": priority === 1,
"blue-color": priority === 2,
"green-color": priority === 3,
};
return {
medcard: !priority,
"medcard-orange": priority === 1,
"medcard-green": priority === 2,
};
},
trimBirthday(birthday) {
return moment(birthday, "DD MM YYYY").format("DD MMMM YYYY");
},
choiceState() {
let num = 0;
let isPrimary = false;
@@ -293,6 +319,13 @@ export default {
&:hover
opacity: 0.6
.input-icon :deep(path)
fill: var(--font-grey-color) !important
.priority
height: 15px
width: 15px
.grey-color
color: var(--font-grey-color)
@@ -306,6 +339,18 @@ export default {
&:deep(path)
fill: var(--font-dark-blue-color)
.none-priority
border: 1.5px solid var(--font-grey-color)
.red-color
background: var(--system-color-red)
.blue-color
background: var(--btn-blue-color)
.green-color
background: var(--system-color-green)
.person-wrapper
overflow-y: auto
margin-right: -10px
@@ -361,6 +406,19 @@ export default {
.on-left
margin-right: 8px
.plus :deep(path)
fill: var(--default-white)
.medcard :deep(path)
fill: var(--font-grey-color)
.medcard-orange :deep(path)
fill: var(--bg-yellow-warning)
.medcard-green :deep(path)
fill: var(--system-color-green)
.icon-patients :deep(path)
fill: var(--btn-blue-color)
</style>

View File

@@ -39,7 +39,7 @@
.status.flex.items-center.gap-x-1.font-medium.text-smm.rounded.h-7.px-2(
v-for="status in patientData.statuses"
)
img(:src="status.icon")
.priority.rounded-full.flex.mr-1.5px(:class="choiceClass(status.id)")
span {{status.name}}
q-menu(
v-if="svg.name === 'medcard'",
@@ -53,7 +53,7 @@
.status.flex.items-center.gap-x-1.font-medium.text-smm.rounded.h-7.px-2(
v-for="medical in medicalData"
)
img(:src="medical.icon")
q-icon(:name="medical.icon", size="20px")
span {{medical.name}}
q-menu.overflow-hidden(
v-if="svg.name === 'group'",
@@ -78,13 +78,12 @@
iconRight
)
template(v-slot:iconLeft)
q-icon(name="app:icon-search", size="16px", style="color: var(--font-grey-color)")
q-icon.input-icon(name="app:search", size="16px")
template(v-slot:iconRight)
q-icon.cursor-pointer(
q-icon.cursor-pointer.input-icon(
@click="copyValue(foundPerson)"
name="app:icon-copy",
size="16px",
style="color: var(--font-grey-color)"
name="app:copy",
size="16px"
)
q-btn.ml-2(
@click="sortPerson(patientsData)",
@@ -99,6 +98,7 @@
)
.flex.items-center.gap-x-2
.all-icon.flex.items-center.justify-center
//- q-icon(name="app:patients")
calendar-sidebar-svg.p-6px(name-svg="group", active)
.flex.flex-col.font-medium
.text-smm Все
@@ -113,12 +113,13 @@
img.h-10.w-10.object-cover.rounded-full(:src="person.avatar")
.flex.flex-col.font-medium
.text-smm {{trimOwnerName(person.last_name, person.first_name, person.patronymic)}}
.grey-color.text.text-xsx {{person.birthday}}
.grey-color.text.text-xsx {{trimBirthday(person.birthday)}}
img.h-6.w-6(v-if="person.check", :src="icon_ok")
.gradient.flex.absolute(v-if="isGradient")
</template>
<script>
import * as moment from "moment";
import arrow from "@/assets/icons/double_left_arrow.svg";
import icon_ok from "@/assets/icons/icon_ok.svg";
import sort_word from "@/assets/icons/sort_word.svg";
@@ -186,6 +187,14 @@ export default {
if (e.name === name) e.active = !e.active;
});
},
choiceClass(priority) {
return {
"none-priority": !priority,
"red-color": priority === 1,
"blue-color": priority === 2,
"green-color": priority === 3,
};
},
copyValue(text) {
navigator.clipboard.writeText(text);
},
@@ -207,6 +216,9 @@ export default {
this.foundPerson.toLowerCase()
);
},
trimBirthday(birthday) {
return moment(birthday, "DD MM YYYY").format("DD MMMM YYYY");
},
choiceData(arr) {
return this.foundPerson ? this.sortData : arr;
},
@@ -280,7 +292,6 @@ export default {
.status
height: 40px
width: 100%
&:hover
height: 40px
background: var(--gray-thirdly)
@@ -319,6 +330,9 @@ export default {
.input :deep(.q-field__append)
padding-left: 6px
.input-icon :deep(path)
fill: var(--font-grey-color)
.separator
transition: 0.1s
opacity: 0
@@ -378,6 +392,23 @@ export default {
.plus :deep(path)
fill: var(--default-white)
.priority
height: 15px
width: 15px
.none-priority
border: 1.5px solid var(--font-grey-color)
.red-color
background: var(--system-color-red)
.blue-color
background: var(--btn-blue-color)
.green-color
background: var(--system-color-green)
.button-svg
&:hover
.svg :deep(.hover)

View File

@@ -1,13 +1,13 @@
<template lang="pug">
svg(:width="configSize[nameSvg].width" :height="configSize[nameSvg].height" :viewBox="`0 0 ${configSize[nameSvg].width} ${configSize[nameSvg].height}`" fill="none" xmlns="http://www.w3.org/2000/svg")
g(v-if="nameSvg === 'round'")
g.hover(v-if="nameSvg === 'round'", :opacity="active ? '1' : '0.6'")
path(opacity="0.6" fill-rule="evenodd" clip-rule="evenodd" d="M7.5 20C7.5 26.9036 13.0964 32.5 20 32.5C26.9036 32.5 32.5 26.9036 32.5 20C32.5 13.0964 26.9036 7.5 20 7.5C13.0964 7.5 7.5 13.0964 7.5 20ZM20 5C11.7157 5 5 11.7157 5 20C5 28.2843 11.7157 35 20 35C28.2843 35 35 28.2843 35 20C35 11.7157 28.2843 5 20 5Z" :fill="active ? '#4772F2' : '#9294A7'")
path.hover(:opacity="active ? '1' : '0.6'" d="M10 20C10 14.4772 14.4772 10 20 10C25.5228 10 30 14.4772 30 20C30 25.5228 25.5228 30 20 30C14.4772 30 10 25.5228 10 20Z" :fill="active ? '#4772F2' : '#9294A7'")
g(v-if="nameSvg === 'medcard'")
path.hover(:opacity="active ? '1' : '0.6'" fill-rule="evenodd" clip-rule="evenodd" d="M14.221 7.30769C14.4088 6.00296 15.5381 5 16.9032 5H23.0968C24.4619 5 25.5912 6.00296 25.779 7.30769H29.2903C30.7868 7.30769 32 8.51308 32 10V32.3077C32 33.7946 30.7868 35 29.2903 35H10.7097C9.21317 35 8 33.7946 8 32.3077V10C8 8.51308 9.21316 7.30769 10.7097 7.30769H14.221ZM16.9032 7.30769C16.6894 7.30769 16.5161 7.47989 16.5161 7.69231V9.23077C16.5161 9.44319 16.6894 9.61538 16.9032 9.61538H23.0968C23.3106 9.61538 23.4839 9.44319 23.4839 9.23077V7.69231C23.4839 7.47989 23.3106 7.30769 23.0968 7.30769H16.9032Z" :fill="active ? '#4772F2' : '#9294A7'")
g(v-if="nameSvg === 'group'")
path.hover(:opacity="active ? '1' : '0.6'" fill-rule="evenodd" clip-rule="evenodd" d="M0 23.6157C0 20.3869 2.6735 17.7695 5.97143 17.7695H16.0286C19.3265 17.7695 22 20.3869 22 23.6157V24.8464C22 26.036 21.015 27.0003 19.8 27.0003H2.2C0.984974 27.0003 0 26.036 0 24.8464V23.6157Z" :fill="active ? '#4772F2' : '#9294A7'")
path.hover(:opacity="active ? '1' : '0.6'" d="M17.1272 8.68044C17.1272 12.0644 14.3839 14.8077 11 14.8077C7.616 14.8077 4.87275 12.0644 4.87275 8.68044C4.87275 5.29647 7.616 2.55322 11 2.55322C14.3839 2.55322 17.1272 5.29647 17.1272 8.68044Z" :fill="active ? '#4772F2' : '#9294A7'")
path(d="M10 20C10 14.4772 14.4772 10 20 10C25.5228 10 30 14.4772 30 20C30 25.5228 25.5228 30 20 30C14.4772 30 10 25.5228 10 20Z" :fill="active ? '#4772F2' : '#9294A7'")
g.hover(v-if="nameSvg === 'medcard'", :opacity="active ? '1' : '0.6'")
path(fill-rule="evenodd" clip-rule="evenodd" d="M14.221 7.30769C14.4088 6.00296 15.5381 5 16.9032 5H23.0968C24.4619 5 25.5912 6.00296 25.779 7.30769H29.2903C30.7868 7.30769 32 8.51308 32 10V32.3077C32 33.7946 30.7868 35 29.2903 35H10.7097C9.21317 35 8 33.7946 8 32.3077V10C8 8.51308 9.21316 7.30769 10.7097 7.30769H14.221ZM16.9032 7.30769C16.6894 7.30769 16.5161 7.47989 16.5161 7.69231V9.23077C16.5161 9.44319 16.6894 9.61538 16.9032 9.61538H23.0968C23.3106 9.61538 23.4839 9.44319 23.4839 9.23077V7.69231C23.4839 7.47989 23.3106 7.30769 23.0968 7.30769H16.9032Z" :fill="active ? '#4772F2' : '#9294A7'")
g.hover(v-if="nameSvg === 'group'", :opacity="active ? '1' : '0.6'")
path(fill-rule="evenodd" clip-rule="evenodd" d="M0 23.6157C0 20.3869 2.6735 17.7695 5.97143 17.7695H16.0286C19.3265 17.7695 22 20.3869 22 23.6157V24.8464C22 26.036 21.015 27.0003 19.8 27.0003H2.2C0.984974 27.0003 0 26.036 0 24.8464V23.6157Z" :fill="active ? '#4772F2' : '#9294A7'")
path(d="M17.1272 8.68044C17.1272 12.0644 14.3839 14.8077 11 14.8077C7.616 14.8077 4.87275 12.0644 4.87275 8.68044C4.87275 5.29647 7.616 2.55322 11 2.55322C14.3839 2.55322 17.1272 5.29647 17.1272 8.68044Z" :fill="active ? '#4772F2' : '#9294A7'")
g(opacity="0.6")
path(d="M20.3457 12.077H27.66C30.0584 12.077 32.0028 14.04 32.0028 16.4616V17.3847C32.0028 18.2768 31.2865 19.0001 30.4028 19.0001H23.6888C22.357 16.8586 20.129 15.3317 17.5488 14.8961C18.2892 14.1192 18.8898 13.2091 19.3081 12.2029C19.6406 12.1206 19.9881 12.077 20.3457 12.077Z" :fill="active ? '#4772F2' : '#9294A7'")
path(d="M24.0677 9.83683C26.5477 9.83683 28.5582 7.82634 28.5582 5.34627C28.5582 2.8662 26.5477 0.855713 24.0677 0.855713C21.5876 0.855713 19.5771 2.8662 19.5771 5.34627C19.5771 7.82634 21.5876 9.83683 24.0677 9.83683Z" :fill="active ? '#4772F2' : '#9294A7'")

View File

@@ -3,9 +3,6 @@ import accepted from "@/assets/icons/status_accepted.svg";
import not_accepted from "@/assets/icons/status_not_accepted.svg";
import rejected from "@/assets/icons/status_rejected.svg";
import reception from "@/assets/icons/status_reception.svg";
import filled from "@/assets/icons/medcard_filled.svg";
import partially_filled from "@/assets/icons/medcard_partially_filled.svg";
import not_filled from "@/assets/icons/medcard_not_filled.svg";
export const networks = [
{
@@ -47,25 +44,14 @@ export const statuses = [
name: "recording",
data: [
{
id: 0,
label: "Не принят",
icon: not_accepted,
value: "not_accepted",
},
{
label: "Принят",
icon: accepted,
value: "accepted",
},
{
label: "Отказ",
icon: rejected,
value: "rejected",
},
{
label: "На приеме",
icon: reception,
value: "reception",
},
{ id: 1, label: "Принят", icon: accepted, value: "accepted" },
{ id: 2, label: "Отказ", icon: rejected, value: "rejected" },
{ id: 3, label: "На приеме", icon: reception, value: "reception" },
],
},
{
@@ -73,17 +59,17 @@ export const statuses = [
data: [
{
label: "Не заполнена",
icon: not_filled,
icon: "app:medcard",
value: "not_filled",
},
{
label: "Частично заполнена",
icon: partially_filled,
icon: "app:medcard-orange",
value: "partially_filled",
},
{
label: "Заполнена",
icon: filled,
icon: "app:medcard-green",
value: "filled",
},
],
@@ -97,10 +83,10 @@ export const patientList = [
label: "Статус приема",
id: 0,
data: [
{ name: "Не принят", icon: not_accepted },
{ name: "Принят", icon: accepted },
{ name: "Отказ", icon: rejected },
{ name: "На приеме", icon: reception },
{ id: 0, name: "Без приоритета" },
{ id: 1, name: "Высокий" },
{ id: 2, name: "Средний" },
{ id: 3, name: "Низский" },
],
choice: false,
},
@@ -108,9 +94,9 @@ export const patientList = [
label: "Первичная медкарта",
id: 1,
data: [
{ name: "Не заполнена", icon: not_filled },
{ name: "Частично заполнена", icon: partially_filled },
{ name: "Заполнена", icon: filled },
{ id: 0, name: "Не заполнена", icon: "app:medcard" },
{ id: 1, name: "Частично заполнена", icon: "app:medcard-orange" },
{ id: 2, name: "Заполнена", icon: "app:medcard-green" },
],
choice: false,
},
@@ -376,10 +362,10 @@ export const patientData = {
},
],
statuses: [
{ name: "Не принят", icon: not_accepted, check: true },
{ name: "Принят", icon: accepted, check: false },
{ name: "Отказ", icon: rejected, check: false },
{ name: "На приеме", icon: reception, check: false },
{ id: 0, name: "Не принят", icon: not_accepted, check: true },
{ id: 1, name: "Принят", icon: accepted, check: false },
{ id: 2, name: "Отказ", icon: rejected, check: false },
{ id: 3, name: "На приеме", icon: reception, check: false },
],
arrSvg: [
{ name: "round", text: "Статус приема", active: false },