Merge branch 'ASTRA-121' into 'master'

Фикс багов с отображением индексов и ASTRA-132

See merge request andrusyakka/urban-couscous!456
This commit is contained in:
Vasiliy Gavrilin
2023-06-30 09:49:12 +00:00
4 changed files with 26 additions and 20 deletions

View File

@@ -13,10 +13,10 @@
.tag-wrap.flex.gap-x-1.gap-y-1 .tag-wrap.flex.gap-x-1.gap-y-1
.tag.flex.items-center.px-3.text-smm( .tag.flex.items-center.px-3.text-smm(
v-if="protocolData[data.state]", v-if="protocolData[data.state]",
v-for="item in protocolData[data.state]", v-for="item in findData(data.results.diseases)",
:key="item.id" :key="item.id"
:class="{'pointer': change || fillInspection}" :class="{'pointer': change || fillInspection}"
) {{item.label + " - " + item.text}} ) {{item.label + " - " + item.value}}
.filter.flex.flex-col.gap-y-4.relative(v-if="change || fillInspection") .filter.flex.flex-col.gap-y-4.relative(v-if="change || fillInspection")
.flex.gap-x-2 .flex.gap-x-2
base-input(placeholder="Поиск", outlined, :width="452", iconLeft) base-input(placeholder="Поиск", outlined, :width="452", iconLeft)
@@ -40,9 +40,9 @@
.field.flex.flex-col.overflow-y-scroll.gap-y-1(v-if="data.results.diseases") .field.flex.flex-col.overflow-y-scroll.gap-y-1(v-if="data.results.diseases")
.letter.flex.items-center.font-bold.text-base Некоторые инфекционные и паразитарные болезни .letter.flex.items-center.font-bold.text-base Некоторые инфекционные и паразитарные болезни
.checkbox.flex.gap-x-2.items-center(v-for="disease in data.results.diseases") .checkbox.flex.gap-x-2.items-center(v-for="disease in data.results.diseases")
q-checkbox(dense, v-model="protocolData[data.state]", :val="disease") q-checkbox(dense, v-model="protocolData[data.state]", :val="disease.label")
.name.font-semibold.text-smm {{ disease.label }} .name.font-semibold.text-smm {{ disease.label }}
.name.font-medium.text-smm {{ disease.text }} .name.font-medium.text-smm {{ disease.value }}
</template> </template>
<script> <script>
@@ -66,6 +66,18 @@ export default {
}), }),
}, },
methods: { methods: {
findData(data) {
let arr = [];
if (!data) return;
this.protocolData[this.data.state].forEach((e) => {
data.forEach((el) => {
if (e === el.label) {
arr.push(el);
}
});
});
return arr;
},
openCard() { openCard() {
this.change = true; this.change = true;
}, },

View File

@@ -110,7 +110,7 @@ export default {
modelValue: { modelValue: {
immediate: true, immediate: true,
handler(value) { handler(value) {
this.protocolData[this.data.state] = value; if (this.fillInspection) this.protocolData[this.data.state] = value;
}, },
}, },
state: { state: {

View File

@@ -1267,40 +1267,34 @@ export const protocolForms = [
state: "clinical", state: "clinical",
results: { results: {
diseases: [ diseases: [
{ label: "В00.09", value: "Простой герпес" },
{ {
id: 1,
label: "В00.10", label: "В00.10",
text: "Простой герпес лица", value: "Простой герпес лица",
}, },
{ {
id: 2,
label: "В00.11", label: "В00.11",
text: "Простой герпес губы", value: "Простой герпес губы",
}, },
{ {
id: 3,
label: "В00.2Х", label: "В00.2Х",
text: "Герпетический гингивостоматит", value: "Герпетический гингивостоматит",
}, },
{ {
id: 4,
label: "В02.20", label: "В02.20",
text: "Постгерпетическая невралгия тройничного нерва", value: "Постгерпетическая невралгия тройничного нерва",
}, },
{ {
id: 5,
label: "В02.21", label: "В02.21",
text: "Постгерпетическая невралгия других черепных нервов", value: "Постгерпетическая невралгия других черепных нервов",
}, },
{ {
id: 6,
label: "В02.22", label: "В02.22",
text: "Постгерпетическая невралгия двойного нерва", value: "Постгерпетическая невралгия двойного нерва",
}, },
{ {
id: 7,
label: "В02.23", label: "В02.23",
text: "Простой герпес нижней губы", value: "Простой герпес нижней губы",
}, },
], ],
}, },

View File

@@ -341,7 +341,7 @@ const getters = {
{ name: "Сканы", data: [] }, { name: "Сканы", data: [] },
], ],
}, },
clinical: [{ id: 0, label: "В00.09", text: "Простой герпес" }], clinical: ["В00.09"],
}; };
}, },
getInitProtocol() { getInitProtocol() {