Merge branch 'ASTRA-81' into 'master'
[WIP] Добавил данные в конфиг, переписал компонент с набором тэгов See merge request andrusyakka/urban-couscous!376
This commit is contained in:
@@ -159,6 +159,14 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
fillInspection: {
|
||||||
|
immediate: true,
|
||||||
|
handler(newVal) {
|
||||||
|
if (newVal) this.change = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
:is-edit="change",
|
:is-edit="change",
|
||||||
:open-edit="openCard",
|
:open-edit="openCard",
|
||||||
:cancel="closeCard",
|
:cancel="closeCard",
|
||||||
|
:tag="fillInspection || change"
|
||||||
)
|
)
|
||||||
.disease-body.flex
|
.disease-body.flex
|
||||||
.flex.flex-col.gap-y-17px(v-if="fillInspection || change")
|
.flex.flex-col.gap-y-17px(v-if="fillInspection || change")
|
||||||
@@ -31,7 +32,6 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
data: Object,
|
data: Object,
|
||||||
fillInspection: Boolean,
|
fillInspection: Boolean,
|
||||||
inspection: Boolean,
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return { change: false };
|
return { change: false };
|
||||||
@@ -44,6 +44,14 @@ export default {
|
|||||||
this.change = false;
|
this.change = false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
fillInspection: {
|
||||||
|
immediate: true,
|
||||||
|
handler(newVal) {
|
||||||
|
if (newVal) this.change = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,19 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
medical-form-wrapper(
|
medical-form-wrapper(
|
||||||
v-for="(item, index) in list[0].data",
|
:title="data.title",
|
||||||
:key="item.id"
|
:is-edit="change",
|
||||||
:title="item.name",
|
:open-edit="openCard",
|
||||||
:is-edit="item?.change",
|
:cancel="closeCard"
|
||||||
:open-edit="()=>openCard(index)",
|
:tag="fillInspection || change"
|
||||||
:cancel="()=>closeCard(index)"
|
|
||||||
:tag="fillInspection || item?.change"
|
|
||||||
)
|
)
|
||||||
.protocol-body.flex.flex-col
|
.protocol-body.flex.flex-col
|
||||||
.flex.items-center.gap-x-11px(:class="{'open-header': item.change || fillInspection}")
|
.flex.items-center.gap-x-11px(:class="{'open-header': change || fillInspection}")
|
||||||
.flex.gap-x-4(:style="{height: item.change || fillInspection ? '300px' : ''}")
|
.flex.gap-x-4(:style="{height: change || fillInspection ? '300px' : ''}")
|
||||||
.flex.flex-col.gap-y-1(:class="{'open-textarea': item.change || fillInspection}")
|
.flex.flex-col.gap-y-1(:class="{'open-textarea': change || fillInspection}")
|
||||||
.tag-wrap.flex.gap-x-1.gap-y-1(v-if="!fillInspection")
|
.tag-wrap.flex.gap-x-1.gap-y-1(v-if="!fillInspection")
|
||||||
.tag.flex.items-center.px-3.cursor-pointer.text-smm(v-for="tag in item.tags" :key="tag.id") {{tag.label}}
|
.tag.flex.items-center.px-3.cursor-pointer.text-smm(v-for="tag in data.results.tags" :key="tag.id") {{tag.label}}
|
||||||
base-input.px-3(v-if="item.change || fillInspection", type="textarea", autogrow, borderless, placeholder="Введите жалобу...")
|
base-input.px-3(v-if="change || fillInspection", type="textarea", autogrow, borderless, placeholder="Введите жалобу...")
|
||||||
.filter.flex.flex-col.gap-y-4(v-if="item.change || fillInspection")
|
.filter.flex.flex-col.gap-y-4(v-if="change || fillInspection")
|
||||||
.flex.gap-x-2
|
.flex.gap-x-2
|
||||||
base-input(placeholder="Поиск", outlined, :width="232", iconLeft)
|
base-input(placeholder="Поиск", outlined, :width="232", iconLeft)
|
||||||
q-icon(
|
q-icon(
|
||||||
@@ -35,8 +33,8 @@
|
|||||||
:style="{width: '40px', height: '40px', color: 'var(--font-grey-color)'}",
|
:style="{width: '40px', height: '40px', color: 'var(--font-grey-color)'}",
|
||||||
padding="0"
|
padding="0"
|
||||||
)
|
)
|
||||||
.field.flex.flex-col.overflow-y-scroll(v-if="item.complaints")
|
.field.flex.flex-col.overflow-y-scroll(v-if="data.results.complaints")
|
||||||
.checkbox.flex.flex-col(v-for="complaint in textSorting(item.complaints)")
|
.checkbox.flex.flex-col(v-for="complaint in textSorting(data.results.complaints)")
|
||||||
.letter.flex.items-center.font-bold.justify-center {{ complaint.sym }}
|
.letter.flex.items-center.font-bold.justify-center {{ complaint.sym }}
|
||||||
.line.flex.gap-x-4.h-9.items-center(v-for="name in complaint?.array")
|
.line.flex.gap-x-4.h-9.items-center(v-for="name in complaint?.array")
|
||||||
q-checkbox(
|
q-checkbox(
|
||||||
@@ -56,15 +54,10 @@ import MedicalFormWrapper from "@/pages/newMedicalCard/components/MedicalFormWra
|
|||||||
export default {
|
export default {
|
||||||
name: "MedicalFormTag",
|
name: "MedicalFormTag",
|
||||||
components: { BaseButton, BaseInput, MedicalFormWrapper },
|
components: { BaseButton, BaseInput, MedicalFormWrapper },
|
||||||
props: {
|
props: { data: Object, abc: Array, fillInspection: Boolean },
|
||||||
abc: Array,
|
|
||||||
list: Array,
|
|
||||||
fillInspection: Boolean,
|
|
||||||
openCard: Function,
|
|
||||||
closeCard: Function,
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
change: false,
|
||||||
selected: [],
|
selected: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -84,6 +77,20 @@ export default {
|
|||||||
});
|
});
|
||||||
return srt;
|
return srt;
|
||||||
},
|
},
|
||||||
|
openCard() {
|
||||||
|
this.change = true;
|
||||||
|
},
|
||||||
|
closeCard() {
|
||||||
|
this.change = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
fillInspection: {
|
||||||
|
immediate: true,
|
||||||
|
handler(newVal) {
|
||||||
|
if (newVal) this.change = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -22,14 +22,7 @@
|
|||||||
:style="{width: '40px', height: '40px', color: 'var(--font-grey-color)'}",
|
:style="{width: '40px', height: '40px', color: 'var(--font-grey-color)'}",
|
||||||
padding="0"
|
padding="0"
|
||||||
)
|
)
|
||||||
medical-form-tag(
|
|
||||||
v-if="inspection || fillInspection",
|
|
||||||
:list="list",
|
|
||||||
:abc="abc",
|
|
||||||
:fill-inspection="fillInspection"
|
|
||||||
:open-card="openCard",
|
|
||||||
:close-card="closeCard"
|
|
||||||
)
|
|
||||||
div(v-for="form in protocolForms", :key="form.key", v-if="inspection || fillInspection")
|
div(v-for="form in protocolForms", :key="form.key", v-if="inspection || fillInspection")
|
||||||
component(v-bind:is="form.component", :data="form", :fill-inspection="fillInspection", :abc="abc")
|
component(v-bind:is="form.component", :data="form", :fill-inspection="fillInspection", :abc="abc")
|
||||||
.protocol.flex.justify-between.p-6(v-if="fillInspection")
|
.protocol.flex.justify-between.p-6(v-if="fillInspection")
|
||||||
@@ -68,43 +61,6 @@ export default {
|
|||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
label: "Первичный осмотр 2023 года",
|
label: "Первичный осмотр 2023 года",
|
||||||
data: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
change: false,
|
|
||||||
name: "Жалобы",
|
|
||||||
tags: [
|
|
||||||
{ id: 1, label: "Боль при приеме сладкой пищи" },
|
|
||||||
{ id: 2, label: "Жжение языка" },
|
|
||||||
{ id: 3, label: "Кровоточивость десен" },
|
|
||||||
{ id: 4, label: "Лечение у ортодонта не проводилось" },
|
|
||||||
{ id: 5, label: "Ранее зубы лечили в ЛПУ" },
|
|
||||||
{ id: 6, label: "Удаление зуба" },
|
|
||||||
],
|
|
||||||
complaints: [
|
|
||||||
{ id: 1, label: "Ранее зубы лечили в ЛПУ" },
|
|
||||||
{ id: 2, label: "Жжение языка" },
|
|
||||||
{ id: 3, label: "Кровоточивость десен" },
|
|
||||||
{ id: 4, label: "Лечение у ортодонта не проводилось" },
|
|
||||||
{ id: 5, label: "Уныние зуба" },
|
|
||||||
{ id: 6, label: "Боль при приеме сладкой пищи" },
|
|
||||||
{ id: 7, label: "Удаление зуба" },
|
|
||||||
{ id: 2, label: "Жжение языка" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
change: false,
|
|
||||||
name: "Аллергологический анамнез",
|
|
||||||
tags: [],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
change: false,
|
|
||||||
name: "Принимаемые лекарственные препараты",
|
|
||||||
tags: [],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
abc: [
|
abc: [
|
||||||
@@ -142,14 +98,6 @@ export default {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
openCard(index) {
|
|
||||||
this.list[0].data[index].change = true;
|
|
||||||
},
|
|
||||||
closeCard(index) {
|
|
||||||
this.list[0].data[index].change = false;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -566,6 +566,59 @@ export const mapEventStatus = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const protocolForms = [
|
export const protocolForms = [
|
||||||
|
{
|
||||||
|
title: "Жалобы",
|
||||||
|
component: "MedicalFormTag",
|
||||||
|
key: "complaints",
|
||||||
|
state: "complaints",
|
||||||
|
results: {
|
||||||
|
tags: [
|
||||||
|
{ id: 1, label: "Боль при приеме сладкой пищи" },
|
||||||
|
{ id: 2, label: "Жжение языка" },
|
||||||
|
{ id: 3, label: "Кровоточивость десен" },
|
||||||
|
{ id: 4, label: "Лечение у ортодонта не проводилось" },
|
||||||
|
{ id: 5, label: "Ранее зубы лечили в ЛПУ" },
|
||||||
|
{ id: 6, label: "Удаление зуба" },
|
||||||
|
],
|
||||||
|
complaints: [
|
||||||
|
{ id: 1, label: "Ранее зубы лечили в ЛПУ" },
|
||||||
|
{ id: 2, label: "Жжение языка" },
|
||||||
|
{ id: 3, label: "Кровоточивость десен" },
|
||||||
|
{ id: 4, label: "Лечение у ортодонта не проводилось" },
|
||||||
|
{ id: 5, label: "Кровоточивость зуба" },
|
||||||
|
{ id: 6, label: "Боль при приеме сладкой пищи" },
|
||||||
|
{ id: 7, label: "Удаление зуба" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Аллергологический анамнез",
|
||||||
|
component: "MedicalFormTag",
|
||||||
|
key: "anamnesis",
|
||||||
|
state: "anamnesis",
|
||||||
|
results: {
|
||||||
|
tags: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Перенесенные и сопутствующие заболевания",
|
||||||
|
component: "MedicalFormTag",
|
||||||
|
key: "illnesses",
|
||||||
|
state: "illnesses",
|
||||||
|
results: {
|
||||||
|
tags: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Принимаемые лекарственные препараты",
|
||||||
|
component: "MedicalFormTag",
|
||||||
|
key: "medications",
|
||||||
|
state: "medications",
|
||||||
|
results: {
|
||||||
|
tags: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "Прикус",
|
title: "Прикус",
|
||||||
component: "IndexForm",
|
component: "IndexForm",
|
||||||
|
|||||||
Reference in New Issue
Block a user