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 @@
+
+ .flex.w-full
+ .flex.w-full.flex-col.gap-y-2(v-if="getProtocol")
+ .header.h-fit.flex.w-full.py-5.pr-5.pl-6.rounded.justify-between.items-center
+ span.text-xxl.font-bold {{`Зубная формула ${moment(getProtocol.start).format("YYYY")} года`}}
+ .flex.gap-x-2
+ q-btn.button(
+ icon="app:edit",
+ size="14px",
+ padding="0",
+ @click="openEdit",
+ )
+ q-btn.button(
+ icon="print",
+ size="20px",
+ padding="0"
+ )
+ q-btn.button(
+ icon="app:basket",
+ size="14px",
+ padding="0",
+ @click="deleteFormula",
+ )
+ .wrapper-form.rounded.relative
+ tooth-formula-form(
+ :data="formulaConfig",
+ no-top-buttons,
+ :is-outside-edit="isEdit"
+ @updateIsEdit="updateIsEdit",
+ )
+ .protocol-link.flex.absolute.gap-x-2.items-center.cursor-pointer(@click="goToProtocol")
+ span.font-medium Перейти к протоколу первичного осмотра
+ q-icon(
+ name="east",
+ size="24px"
+ )
+ .flex.w-full.h-full.items-center.justify-center(v-else)
+ span.text-xxl.font-bold(:style="{color: 'var(--font-grey-color)'}") Выберите осмотр
+
+
+
+
+
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 @@
.list-wrapper.h-full.flex.gap-y-1.flex-col
- .p-4.rounded.background
+ .background.h-72px.flex.w-full.justify-between.items-center.p-4.rounded
+ span.text-2xl.font-bold Осмотры
q-btn(
+ v-if="createInspection"
color="primary",
size="16px",
- label="Создать осмотр",
no-caps,
icon="add",
- :style="{width: '100%', height: '40px'}"
+ :style="{width: '40px', height: '40px'}"
padding="0",
@click="changeShownCreateModal(true)"
)
- .p-4.rounded.background.list
+ .p-4.rounded.background.list.flex.flex-col.gap-y-6
.flex
base-select(
:style="{flex: 1}",
@@ -26,13 +27,12 @@
:class="sortingClass",
@click="invertSorting"
)
- .flex.py-4.w-full.color-grey.text-base.justify-center
- span.opacity-50 {{ `Осмотров: ${sortingProtocols?.length}` }}
.flex.flex-col.gap-y-2
medical-protocol-card(
v-for="protocol in sortingProtocols", :key="protocol.id",
:protocol-data="protocol",
- @click="openInspection"
+ :no-fill-indicator="noFillIndicator",
+ @click="() => openInspection(protocol.id)"
)
base-modal(
v-model="showModal",
@@ -63,6 +63,7 @@ export default {
props: {
openInspection: Function,
createInspection: Function,
+ noFillIndicator: Boolean,
},
data() {
return {
diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsWrapper.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsWrapper.vue
index bc2152e..a8d83a4 100644
--- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsWrapper.vue
+++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsWrapper.vue
@@ -17,6 +17,10 @@ export default {
fillInspection: false,
};
},
+ props: {
+ openProtocol: Boolean,
+ clearProps: Function,
+ },
methods: {
...mapActions({
getProtocolData: "getProtocolData",
@@ -36,6 +40,17 @@ export default {
});
},
},
+ watch: {
+ openProtocol: {
+ immediate: true,
+ handler(value) {
+ this.inspection = value;
+ },
+ },
+ },
+ unmounted() {
+ this.clearProps();
+ },
};
diff --git a/src/pages/newMedicalCard/components/MedicalBaseInfo.vue b/src/pages/newMedicalCard/components/MedicalBaseInfo.vue
index 98c6067..4082e28 100644
--- a/src/pages/newMedicalCard/components/MedicalBaseInfo.vue
+++ b/src/pages/newMedicalCard/components/MedicalBaseInfo.vue
@@ -3,7 +3,9 @@
medical-sidebar(v-model="currentMenuItem")
component(
v-if="currentMenuItem",
- v-bind:is="currentMenuItem"
+ v-bind="{...componentProps, updateCurrentItem:updateCurrentItem, clearProps:clearProps}"
+ :is="currentMenuItem",
+ @update-current-item="updateCurrentItem"
)
@@ -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 = {};
+ },
+ },
};