WIP Сделано удаление, breadcrumbs
This commit is contained in:
@@ -410,7 +410,7 @@ export default {
|
|||||||
"handler-click-popup",
|
"handler-click-popup",
|
||||||
"medical",
|
"medical",
|
||||||
this.client.id,
|
this.client.id,
|
||||||
this.client?.medical_history[0]?.id
|
this.client?.medical_history?.find((elem) => elem?.id)?.id
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
transmitDeleteClient() {
|
transmitDeleteClient() {
|
||||||
@@ -453,7 +453,7 @@ export default {
|
|||||||
this.lackAttachments = this.dataAttachments[0]?.id ? true : false;
|
this.lackAttachments = this.dataAttachments[0]?.id ? true : false;
|
||||||
},
|
},
|
||||||
saveNote(data) {
|
saveNote(data) {
|
||||||
this.dataNotes = data?.note.filter((e) => e?.deleted_flg === false);
|
this.dataNotes = data?.note.filter((e) => !e?.deleted_flg);
|
||||||
if (this.dataNotes[0]) {
|
if (this.dataNotes[0]) {
|
||||||
this.lackNotes = true;
|
this.lackNotes = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -715,7 +715,7 @@ export default {
|
|||||||
(el) =>
|
(el) =>
|
||||||
el.priority === this.client.priority ||
|
el.priority === this.client.priority ||
|
||||||
this.client.priority === el.id
|
this.client.priority === el.id
|
||||||
).text,
|
)?.text,
|
||||||
phone: {
|
phone: {
|
||||||
id:
|
id:
|
||||||
this.client.contacts.find((el) => el.kind === "PHONE")?.id ||
|
this.client.contacts.find((el) => el.kind === "PHONE")?.id ||
|
||||||
@@ -741,8 +741,8 @@ export default {
|
|||||||
avatar: this.client.first_name
|
avatar: this.client.first_name
|
||||||
? this.client.last_name[0] + this.client.first_name[0]
|
? this.client.last_name[0] + this.client.first_name[0]
|
||||||
: this.client.last_name.substr(0, 2),
|
: this.client.last_name.substr(0, 2),
|
||||||
color: this.client.color,
|
color: this.client?.color,
|
||||||
photo: this.client.photo,
|
photo: this.client?.photo,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.flex.box-border.px-4.items-center.w-full.gap-x-2(:style="{ width : width + 'px'}")
|
.flex.box-border.px-4.items-center.w-full.gap-x-2(:style="{ width : width + 'px'}")
|
||||||
.flex.gap-x-2.items-center(v-if="!isOpenChange")
|
.flex.gap-x-2.items-center(v-if="!isOpenChange")
|
||||||
.dot.w-2.h-2(:style="{ backgroundColor: prioritySettings.settings.find((el) => el.text == value.priority).color }")
|
.dot.w-2.h-2(:style="{ backgroundColor: prioritySettings.settings.find((el) => el.text == value.priority)?.color }")
|
||||||
span.text-sm(:style="{ color: prioritySettings.settings.find((el) => el.text == value.priority).color }") {{value.priority}}
|
span.text-sm(:style="{ color: prioritySettings.settings.find((el) => el.text == value.priority)?.color }") {{value?.priority}}
|
||||||
.flex.gap-x-2.text-sm(class="w-[164px]")
|
.flex.gap-x-2.text-sm(class="w-[164px]")
|
||||||
base-select(
|
base-select(
|
||||||
v-if="isOpenChange",
|
v-if="isOpenChange",
|
||||||
|
|||||||
@@ -1,24 +1,45 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.w-full.h-full
|
.w-full.h-full
|
||||||
medical-card-header.mb-2(v-model="currentMenuItem")
|
medical-card-header.mb-2(
|
||||||
|
v-model="currentMenuItem",
|
||||||
|
:change-shown-remove-modal="changeShownRemoveModal",
|
||||||
|
)
|
||||||
component(
|
component(
|
||||||
v-if="currentMenuItem",
|
v-if="currentMenuItem",
|
||||||
v-bind:is="currentMenuItem",
|
v-bind:is="currentMenuItem",
|
||||||
)
|
)
|
||||||
|
base-modal(
|
||||||
|
v-model="isShownRemoveModal",
|
||||||
|
title="Удаление медкарты"
|
||||||
|
)
|
||||||
|
medical-card-remove-modal(:change-shown-remove-modal="changeShownRemoveModal")
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MedicalCardHeader from "@/pages/newMedicalCard/components/MedicalCardHeader.vue";
|
import MedicalCardHeader from "@/pages/newMedicalCard/components/MedicalCardHeader.vue";
|
||||||
import MedicalCardBaseInfo from "@/pages/newMedicalCard/components/MedicalCardBaseInfo.vue";
|
import MedicalCardBaseInfo from "@/pages/newMedicalCard/components/MedicalCardBaseInfo.vue";
|
||||||
|
import BaseModal from "@/components/base/BaseModal.vue";
|
||||||
|
import MedicalCardRemoveModal from "@/pages/newMedicalCard/components/MedicalCardRemoveModal.vue";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
export default {
|
export default {
|
||||||
name: "TheMedicalCard",
|
name: "TheMedicalCard",
|
||||||
components: { MedicalCardHeader, MedicalCardBaseInfo },
|
components: {
|
||||||
|
MedicalCardHeader,
|
||||||
|
MedicalCardBaseInfo,
|
||||||
|
BaseModal,
|
||||||
|
MedicalCardRemoveModal,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentMenuItem: "MedicalCardBaseInfo",
|
currentMenuItem: "MedicalCardBaseInfo",
|
||||||
|
isShownRemoveModal: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
changeShownRemoveModal(value) {
|
||||||
|
this.isShownRemoveModal = value;
|
||||||
|
},
|
||||||
|
},
|
||||||
computed: mapState({
|
computed: mapState({
|
||||||
medical: (state) => state.medical.medicalCard,
|
medical: (state) => state.medical.medicalCard,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -8,14 +8,15 @@
|
|||||||
name="app:long-arrow",
|
name="app:long-arrow",
|
||||||
color="grey",
|
color="grey",
|
||||||
)
|
)
|
||||||
q-breadcrumbs-el(label="Календарь")
|
q-breadcrumbs-el(:label="routes[routingHistory.state.back]")
|
||||||
q-breadcrumbs-el(:label="`Медкарта #${medicalCardData?.number}`")
|
q-breadcrumbs-el(:label="`${routes[routingHistory.state.current]} #${medicalCardData?.number}`")
|
||||||
q-btn(
|
q-btn(
|
||||||
flat,
|
flat,
|
||||||
text-color="grey",
|
text-color="grey",
|
||||||
no-caps,
|
no-caps,
|
||||||
padding="6px"
|
padding="6px"
|
||||||
size="md"
|
size="md"
|
||||||
|
@click="changeShownRemoveModal(true)",
|
||||||
)
|
)
|
||||||
q-icon(left, name="app:basket", size="16px")
|
q-icon(left, name="app:basket", size="16px")
|
||||||
span Удалить медкарту
|
span Удалить медкарту
|
||||||
@@ -83,42 +84,29 @@
|
|||||||
import { v_model } from "@/shared/mixins/v-model";
|
import { v_model } from "@/shared/mixins/v-model";
|
||||||
import { column } from "@/pages/clients/utils/tableConfig.js";
|
import { column } from "@/pages/clients/utils/tableConfig.js";
|
||||||
import * as moment from "moment/moment";
|
import * as moment from "moment/moment";
|
||||||
|
import {
|
||||||
|
headerMenuItem,
|
||||||
|
routesDictionary,
|
||||||
|
} from "@/pages/newMedicalCard/utils/configMedical.js";
|
||||||
export default {
|
export default {
|
||||||
name: "MedicalCardHeader",
|
name: "MedicalCardHeader",
|
||||||
mixins: [v_model],
|
mixins: [v_model],
|
||||||
|
props: {
|
||||||
|
changeShownRemoveModal: Function,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menuItem: [
|
menuItem: headerMenuItem,
|
||||||
{
|
routes: routesDictionary,
|
||||||
title: "Общая информация",
|
|
||||||
id: "basic",
|
|
||||||
component: "MedicalCardBaseInfo",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Журнал посещений",
|
|
||||||
id: "session-log",
|
|
||||||
component: "SessionLog",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Планы лечения",
|
|
||||||
id: "treatment-plans",
|
|
||||||
component: "TreatmentPlans",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Статистика",
|
|
||||||
id: "statistics",
|
|
||||||
component: "Statistics",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "История контактов",
|
|
||||||
id: "contact-history",
|
|
||||||
component: "ContactHistory",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
url: "https://astra-dev.dopcore.com",
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
routingHistory() {
|
||||||
|
return this.$store.state.routingHistory;
|
||||||
|
},
|
||||||
|
url() {
|
||||||
|
return this.$store.state.url;
|
||||||
|
},
|
||||||
medicalCardData() {
|
medicalCardData() {
|
||||||
return this.$store.state.medical.medicalCard;
|
return this.$store.state.medical.medicalCard;
|
||||||
},
|
},
|
||||||
@@ -177,6 +165,7 @@ export default {
|
|||||||
.patient-info
|
.patient-info
|
||||||
width: 83.2%
|
width: 83.2%
|
||||||
height: 18.7%
|
height: 18.7%
|
||||||
|
min-height: 190px
|
||||||
background-color: var(--default-white)
|
background-color: var(--default-white)
|
||||||
.menu-item
|
.menu-item
|
||||||
color: var(--font-grey-color)
|
color: var(--font-grey-color)
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<template lang="pug">
|
||||||
|
.modal
|
||||||
|
.text.mt-4.mb-6.text-base Вы действительно хотите удалить медкарту?
|
||||||
|
.flex.gap-x-3
|
||||||
|
q-btn(
|
||||||
|
label="Отменить",
|
||||||
|
no-caps,
|
||||||
|
outline,
|
||||||
|
color="primary",
|
||||||
|
padding="10px 24px",
|
||||||
|
@click="changeShownRemoveModal(false)"
|
||||||
|
)
|
||||||
|
q-btn(
|
||||||
|
label="Удалить",
|
||||||
|
no-caps,
|
||||||
|
outline,
|
||||||
|
style="color: var(--border-red-color)",
|
||||||
|
padding="10px 24px",
|
||||||
|
@click="removeMedicalCard"
|
||||||
|
)
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "MedicalCardRemoveModal",
|
||||||
|
props: {
|
||||||
|
changeShownRemoveModal: Function,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
removeMedicalCard() {
|
||||||
|
this.changeShownRemoveModal(false);
|
||||||
|
this.$store.dispatch("removeMedicalCardData");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped lang="sass">
|
||||||
|
.modal
|
||||||
|
width: 350px
|
||||||
|
.text
|
||||||
|
color: var(--font-grey-color)
|
||||||
|
</style>
|
||||||
@@ -11,48 +11,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { v_model } from "@/shared/mixins/v-model";
|
import { v_model } from "@/shared/mixins/v-model";
|
||||||
|
import { baseInfoMenu } from "@/pages/newMedicalCard/utils/configMedical.js";
|
||||||
export default {
|
export default {
|
||||||
name: "MedicalCardSidebar",
|
name: "MedicalCardSidebar",
|
||||||
mixins: [v_model],
|
mixins: [v_model],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menuItem: [
|
menuItem: baseInfoMenu,
|
||||||
{
|
|
||||||
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: {
|
methods: {
|
||||||
|
|||||||
@@ -109,3 +109,75 @@ export const genderOptions = [
|
|||||||
label: "Женский",
|
label: "Женский",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const headerMenuItem = [
|
||||||
|
{
|
||||||
|
title: "Общая информация",
|
||||||
|
id: "basic",
|
||||||
|
component: "MedicalCardBaseInfo",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Журнал посещений",
|
||||||
|
id: "session-log",
|
||||||
|
component: "SessionLog",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Планы лечения",
|
||||||
|
id: "treatment-plans",
|
||||||
|
component: "TreatmentPlans",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Статистика",
|
||||||
|
id: "statistics",
|
||||||
|
component: "Statistics",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "История контактов",
|
||||||
|
id: "contact-history",
|
||||||
|
component: "ContactHistory",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export const baseInfoMenu = [
|
||||||
|
{
|
||||||
|
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",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export const routesDictionary = {
|
||||||
|
"/clients": "Клиенты",
|
||||||
|
"/calendar": "Календарь",
|
||||||
|
"/medical-card": "Медкарта",
|
||||||
|
};
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import medical from "./modules/medicalCard";
|
|||||||
export default createStore({
|
export default createStore({
|
||||||
state: {
|
state: {
|
||||||
url: "https://astra-dev.dopcore.com",
|
url: "https://astra-dev.dopcore.com",
|
||||||
|
routingHistory: window.history,
|
||||||
},
|
},
|
||||||
modules: {
|
modules: {
|
||||||
medical,
|
medical,
|
||||||
|
|||||||
@@ -90,6 +90,19 @@ const actions = {
|
|||||||
returnInitData({ commit }) {
|
returnInitData({ commit }) {
|
||||||
commit("setBasicData");
|
commit("setBasicData");
|
||||||
},
|
},
|
||||||
|
removeMedicalCardData({ commit, rootState }) {
|
||||||
|
fetchWrapper
|
||||||
|
.del(
|
||||||
|
`medical_card/medical_history/${localStorage.getItem(
|
||||||
|
"medicalId"
|
||||||
|
)}/delete/`
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
rootState.routingHistory.back();
|
||||||
|
commit("setMedicalCard", {});
|
||||||
|
localStorage.removeItem("medicalId");
|
||||||
|
});
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
|
|||||||
Reference in New Issue
Block a user