WIP Сделала сайдбар общей информации
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template lang="pug">
|
||||
.w-full
|
||||
medical-card-header(v-model="currentMenuItem")
|
||||
.w-full.h-full
|
||||
medical-card-header.mb-2(v-model="currentMenuItem")
|
||||
component(
|
||||
v-if="currentMenuItem",
|
||||
v-bind:is="currentMenuItem",
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
<script>
|
||||
import MedicalCardHeader from "@/pages/newMedicalCard/components/MedicalCardHeader.vue";
|
||||
import BasicDataForm from "@/pages/newMedicalCard/components/BasicDataForm.vue";
|
||||
import MedicalCardBaseInfo from "@/pages/newMedicalCard/components/MedicalCardBaseInfo.vue";
|
||||
export default {
|
||||
name: "TheMedicalCard",
|
||||
components: { MedicalCardHeader, BasicDataForm },
|
||||
components: { MedicalCardHeader, MedicalCardBaseInfo },
|
||||
data() {
|
||||
return {
|
||||
currentMenuItem: "BasicDataForm",
|
||||
currentMenuItem: "MedicalCardBaseInfo",
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
26
src/pages/newMedicalCard/components/MedicalCardBaseInfo.vue
Normal file
26
src/pages/newMedicalCard/components/MedicalCardBaseInfo.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template lang="pug">
|
||||
.base-info-wrapper.w-full.flex.gap-x-2
|
||||
medical-card-sidebar(v-model="currentMenuItem")
|
||||
component(
|
||||
v-if="currentMenuItem",
|
||||
v-bind:is="currentMenuItem"
|
||||
)
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MedicalCardSidebar from "@/pages/newMedicalCard/components/MedicalCardSidebar.vue";
|
||||
import BasicDataForm from "@/pages/newMedicalCard/components/BasicDataForm.vue";
|
||||
export default {
|
||||
name: "MedicalCardBaseInfo",
|
||||
components: { MedicalCardSidebar, BasicDataForm },
|
||||
data() {
|
||||
return {
|
||||
currentMenuItem: "BasicDataForm",
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="sass" scoped>
|
||||
.base-info-wrapper
|
||||
height: 79.7%
|
||||
</style>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template lang="pug">
|
||||
.patient-info.pt-4.pr-6.flex.flex-col.justify-between
|
||||
.patient-info.pt-4.pr-6.flex.flex-col.justify-between.rounded
|
||||
.ml-6.flex.justify-between
|
||||
q-breadcrumbs
|
||||
template(v-slot:separator)
|
||||
@@ -90,7 +90,7 @@ export default {
|
||||
{
|
||||
title: "Общая информация",
|
||||
id: "basic",
|
||||
component: "BasicDataForm",
|
||||
component: "MedicalCardBaseInfo",
|
||||
},
|
||||
{
|
||||
title: "Журнал посещений",
|
||||
@@ -149,9 +149,8 @@ export default {
|
||||
<style scoped lang="sass">
|
||||
.patient-info
|
||||
width: 83.2%
|
||||
height: 190px
|
||||
height: 18.7%
|
||||
background-color: var(--default-white)
|
||||
border-radius: 4px
|
||||
.menu-item
|
||||
color: var(--font-grey-color)
|
||||
border-bottom: 1px solid transparent
|
||||
|
||||
74
src/pages/newMedicalCard/components/MedicalCardSidebar.vue
Normal file
74
src/pages/newMedicalCard/components/MedicalCardSidebar.vue
Normal file
@@ -0,0 +1,74 @@
|
||||
<template lang="pug">
|
||||
.sidebar-wrapper.h-full.rounded.px-2.py-6.flex.flex-col
|
||||
.menu-item.text-base.px-4.py-3.rounded(
|
||||
v-for="item in menuItem",
|
||||
:key="item.id",
|
||||
:id="item.id",
|
||||
@click="selectItem(item)",
|
||||
:class="{'menu-item-active': item.component === modelValue}"
|
||||
) {{item.title}}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { v_model } from "@/shared/mixins/v-model";
|
||||
export default {
|
||||
name: "MedicalCardSidebar",
|
||||
mixins: [v_model],
|
||||
data() {
|
||||
return {
|
||||
menuItem: [
|
||||
{
|
||||
title: "Основные данные",
|
||||
id: "basic-data",
|
||||
component: "BasicDataForm",
|
||||
},
|
||||
{
|
||||
title: "Протоколы первичного осмотра",
|
||||
id: "protocols",
|
||||
component: "Protocols",
|
||||
},
|
||||
{
|
||||
title: "Доверенное лицо",
|
||||
id: "trusted-person",
|
||||
component: "TrustedPerson",
|
||||
},
|
||||
{
|
||||
title: "Аллергии",
|
||||
id: "allergies",
|
||||
component: "Allergies",
|
||||
},
|
||||
{
|
||||
title: "Состояние здоровья",
|
||||
id: "health-status",
|
||||
component: "HealthStatus",
|
||||
},
|
||||
{
|
||||
title: "История болезней",
|
||||
id: "medical-history",
|
||||
component: "MedicalHistory",
|
||||
},
|
||||
{
|
||||
title: "Зубная формула",
|
||||
id: "dental-formula",
|
||||
component: "DentalFormula",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selectItem(item) {
|
||||
this.value = item?.component;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="sass" scoped>
|
||||
.sidebar-wrapper
|
||||
width: 16.3%
|
||||
background-color: var(--default-white)
|
||||
.menu-item
|
||||
color: var(--font-grey-color)
|
||||
.menu-item-active, .menu-item:hover
|
||||
color: var(--btn-blue-color)
|
||||
background-color: var(--bg-ligth-blue-color)
|
||||
</style>
|
||||
Reference in New Issue
Block a user