From d7c304fbeeb3af1b8d8ad3247708926e9aef9fd7 Mon Sep 17 00:00:00 2001 From: DwCay Date: Tue, 4 Jul 2023 18:09:23 +0300 Subject: [PATCH] =?UTF-8?q?[WIP]=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D1=83=20?= =?UTF-8?q?=D0=97=D1=83=D0=B1=D0=BD=D1=8B=D1=85=20=D1=84=D0=BE=D1=80=D0=BC?= =?UTF-8?q?=D1=83=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DentalFormulas/FormulasPageWrapper.vue | 104 ++++++++++++++++++ .../Forms/ToothFormula/ToothFormulaForm.vue | 44 +++++--- .../MedicalProtocolCard.vue | 2 + .../MedicalProtocolsList.vue | 15 +-- .../MedicalProtocolsWrapper.vue | 15 +++ .../components/MedicalBaseInfo.vue | 16 ++- .../MedicalDentalFormulasWrapper.vue | 38 +++++++ .../components/MedicalFormWrapper.vue | 7 +- .../newMedicalCard/utils/medicalConfig.js | 4 +- src/store/modules/medicalCard.js | 6 + 10 files changed, 224 insertions(+), 27 deletions(-) create mode 100644 src/pages/newMedicalCard/components/DentalFormulas/FormulasPageWrapper.vue create mode 100644 src/pages/newMedicalCard/components/MedicalDentalFormulasWrapper.vue diff --git a/src/pages/newMedicalCard/components/DentalFormulas/FormulasPageWrapper.vue b/src/pages/newMedicalCard/components/DentalFormulas/FormulasPageWrapper.vue new file mode 100644 index 0000000..7954284 --- /dev/null +++ b/src/pages/newMedicalCard/components/DentalFormulas/FormulasPageWrapper.vue @@ -0,0 +1,104 @@ + + + + + diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaForm.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaForm.vue index 8f42da8..d95dca9 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaForm.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaForm.vue @@ -4,6 +4,7 @@ :is-edit="isEdit", :open-edit="openEdit", :cancel="cancelEdit", + :no-top-buttons="noTopButtons" ) .flex.flex-col.gap-y-4 .flex.gap-x-7px.rounded.py-7px.px-3.w-fit(:style="{'backgroundColor': isEdit ? 'var(--default-white)': 'var(--bg-light-grey)'}") @@ -32,20 +33,19 @@ v-model="filtredTooths", :data="protocol[data.state]", ) - template(v-slot:right-corner) - .flex.flex-toogle.h-10.p-1.rounded(:style="{'backgroundColor': 'var(--bg-light-grey)'}") - q-btn.w-12.h-full.rounded( - size="12px", - :style="{'backgroundColor': !isShowSecondView ? 'var(--bg-aqua-blue)' : 'var(--bg-light-grey)'}", - @click="()=>{ isShowSecondView=false }", - ) - img(:src="teeth") - q-btn.w-12.h-full.rounded( - size="12px", - :style="{'backgroundColor': isShowSecondView ? 'var(--bg-aqua-blue)' : 'var(--bg-light-grey)'}", - @click="()=>{isShowSecondView=true }", - ) - img(:src="teeth_2") + .toogle.flex.flex-toogle.h-10.p-1.rounded.absolute + q-btn.w-12.h-full.rounded( + size="12px", + :style="{'backgroundColor': !isShowSecondView ? 'var(--bg-aqua-blue)' : 'var(--bg-light-grey)'}", + @click="()=>{ isShowSecondView=false }", + ) + img(:src="teeth") + q-btn.w-12.h-full.rounded( + size="12px", + :style="{'backgroundColor': isShowSecondView ? 'var(--bg-aqua-blue)' : 'var(--bg-light-grey)'}", + @click="()=>{isShowSecondView=true }", + ) + img(:src="teeth_2") + + diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolCard.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolCard.vue index 1aefa04..47a37a3 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolCard.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolCard.vue @@ -8,6 +8,7 @@ .rounded-full.h-1.w-1.background-grey span.align-middle {{ `${time?.start} - ${time?.end}` }} .flex.items-center.justify-center.h-6.w-6.rounded( + v-if="!noFillIndicator", :style="statusСolors" ) img.teeth-icon(src="@/assets/icons/teeth.svg") @@ -32,6 +33,7 @@ export default { components: { BaseAvatar }, props: { protocolData: Object, + noFillIndicator: Boolean, }, computed: { avatar() { diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsList.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsList.vue index 66fea65..181d092 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsList.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsList.vue @@ -1,17 +1,18 @@ @@ -14,6 +16,7 @@ import MedicalAllergiesWrapper from "@/pages/newMedicalCard/components/MedicalAl import MedicalConfidantWrapper from "@/pages/newMedicalCard/components/MedicalConfidantWrapper.vue"; import MedicalHealthStateWrapper from "@/pages/newMedicalCard/components/MedicalHealthStateWrapper.vue"; import MedicalProtocolsWrapper from "@/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsWrapper.vue"; +import MedicalDentalFormulasWrapper from "@/pages/newMedicalCard/components/MedicalDentalFormulasWrapper.vue"; export default { name: "MedicalBaseInfo", components: { @@ -23,12 +26,23 @@ export default { MedicalConfidantWrapper, MedicalHealthStateWrapper, MedicalProtocolsWrapper, + MedicalDentalFormulasWrapper, }, data() { return { + componentProps: {}, currentMenuItem: "MedicalBasicDataWrapper", }; }, + methods: { + updateCurrentItem(item, props) { + this.currentMenuItem = item; + this.componentProps = { ...props }; + }, + clearProps() { + this.componentProps = {}; + }, + }, };