[WIP] Добавил форму отображения Клинического диагноза, отсортировал формы в соответствии с дизайном

This commit is contained in:
megavrilinvv
2023-06-23 15:58:58 +03:00
parent 7aa90a1fea
commit 0c3c64e9d5
3 changed files with 360 additions and 166 deletions

View File

@@ -0,0 +1,147 @@
<template lang="pug">
medical-form-wrapper(
:title="data.title",
:is-edit="change",
:open-edit="openCard",
:cancel="closeCard",
:tag="fillInspection || change"
)
.protocol-body.flex.flex-col
.flex.gap-x-4(:style="{height: change || fillInspection ? '300px' : ''}")
.flex.flex-col.gap-y-1(:class="{'edit-form': change || fillInspection}")
.tag-wrap.flex.gap-x-1.gap-y-1(v-if="!fillInspection && selected")
.tag.flex.items-center.px-3.text-smm(
v-if="selected",
v-for="item in selected",
:key="item.id"
:class="{'pointer': change || fillInspection}"
) {{item.label + " - " + item.text}}
.filter.flex.flex-col.gap-y-4.relative(v-if="change || fillInspection")
.flex.gap-x-2
base-input(placeholder="Поиск", outlined, :width="452", iconLeft)
q-icon(
name="app:icon-search",
size="20px",
style="color: var(--font-grey-color)"
)
.button
q-btn(
icon="filter_alt",
:style="{width: '40px', height: '40px', color: 'var(--font-grey-color)'}",
padding="0"
)
.button
q-btn(
icon="app:sort-number",
:style="{width: '40px', height: '40px', color: 'var(--font-grey-color)'}",
padding="0"
)
.field.flex.flex-col.overflow-y-scroll.gap-y-1(v-if="data.results.diseases")
.letter.flex.items-center.font-bold.text-base Некоторые инфекционные и паразитарные болезни
.checkbox.flex.gap-x-2.items-center(v-for="disease in data.results.diseases")
q-checkbox(
dense,
v-model="selected",
:val="disease",
:style="{border: 'none', width: '16px', height: '16px'}"
)
.name.font-semibold.text-smm {{ disease.label }}
.name.font-medium.text-smm {{ disease.text }}
</template>
<script>
import BaseButton from "@/components/base/BaseButton.vue";
import BaseInput from "@/components/base/BaseInput.vue";
import MedicalFormWrapper from "@/pages/newMedicalCard/components/MedicalFormWrapper.vue";
export default {
name: "ClinicalForm",
components: { BaseButton, BaseInput, MedicalFormWrapper },
props: { data: Object, fillInspection: Boolean },
data() {
return {
change: false,
selected: [{ id: 0, label: "В00.09", text: "Простой герпес" }],
};
},
methods: {
openCard() {
this.change = true;
},
closeCard() {
this.change = false;
},
},
};
</script>
<style lang="sass" scoped>
.protocol-body
background: var(--default-white)
border-radius: 4px
.icon
background: var(--bg-light-grey)
.open-header
justify-content: space-between
.edit-form
width: 580px
padding: 4px
border: 1px solid var(--border-light-grey-color)
border-radius: 4px
.tag
height: 32px
background: var(--bg-light-grey)
border-radius: 4px
.tag-wrap
flex-wrap: wrap !important
.filter
border: 1px solid var(--border-light-grey-color)
border-radius: 4px
padding: 16px 16px 0
width: 580px
.button
display: flex
align-items: center
width: 40px
height: 40px
justify-content: center
cursor: pointer
border-radius: 4px
background: var(--bg-light-grey)
.field
margin-right: -10px
&::-webkit-scrollbar-track:vertical
margin-bottom: 12px
&::-webkit-scrollbar
width: 4px
.checkbox
border-bottom: 1px solid var(--bg-light-grey)
min-height: 36px
.letter
color: var(--font-grey-color)
height: 34px
.name
width: fit-content
color: var(--font-dark-blue-color)
.pointer
cursor: pointer
.q-checkbox :deep(.q-checkbox__bg)
border-radius: 4px
border: 1.5px solid var(--font-grey-color)
.q-checkbox :deep(.q-checkbox__inner:before)
background: none !important
</style>

View File

@@ -43,12 +43,14 @@ import IndexForm from "@/pages/newMedicalCard/components/InitialInspectionProtoc
import MainFactorsForm from "@/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/MainFactorsForm.vue";
import ToothFormulaForm from "@/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaForm.vue";
import { protocolForms } from "@/pages/newMedicalCard/utils/medicalConfig.js";
import ClinicalForm from "./Forms/ClinicalForm.vue";
export default {
name: "MedicalProtocolsInspection",
components: {
MedicalFormTag,
DataForm,
DiseaseForm,
ClinicalForm,
BaseButton,
IndexForm,
MainFactorsForm,