Merge branch 'ASTRA-78' into 'master'
WIP Добавил отображение данных в режиме просмотра See merge request andrusyakka/urban-couscous!365
This commit is contained in:
@@ -35,6 +35,11 @@
|
|||||||
--bg-event-green-color-0: #cdf0e5
|
--bg-event-green-color-0: #cdf0e5
|
||||||
--bg-event-green-color-1: #92e8be
|
--bg-event-green-color-1: #92e8be
|
||||||
--bg-event-red-color: #e93131
|
--bg-event-red-color: #e93131
|
||||||
|
--bg-heat-color: #ffdad2
|
||||||
|
--bg-cold-color: #e4efff
|
||||||
|
--font-heat-color: #773122
|
||||||
|
--font-cold-color: #3b3e6c
|
||||||
|
--bg-yellow-warning: #ffb931
|
||||||
--bg-event-red-color-0: #f8c1c1
|
--bg-event-red-color-0: #f8c1c1
|
||||||
--bg-event-red-color-1: #f49898
|
--bg-event-red-color-1: #f49898
|
||||||
--bg-event-yellow-color: #e5e931
|
--bg-event-yellow-color: #e5e931
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
medical-form-wrapper(:title="data.title")
|
medical-form-wrapper(:title="data.title", :is-edit="isEdit", :open-edit="openEdit", :cancel="cancelEdit")
|
||||||
.thermometry-wrapper.grid.gap-x-20.gap-y-5
|
.thermometry-wrapper.grid.gap-x-20.gap-y-5
|
||||||
.flex.flex-col.gap-y-4.items-start(v-if="isEdit" v-for="thermometry in configThermometry.temperature")
|
.flex.flex-col.gap-y-4.items-start(v-if="isEdit" v-for="(thermometry, key) in thermometryData")
|
||||||
span.font-semibold.text-smm {{ thermometry.title }}
|
span.font-semibold.text-smm {{ data.config.temperature[key].title }}
|
||||||
base-input.w-full(
|
base-input.w-full(
|
||||||
v-model="dataThermometry[thermometry.name].temperature",
|
v-model="thermometry.temperature",
|
||||||
type="number"
|
type="number"
|
||||||
label="Температура"
|
label="Температура"
|
||||||
outlined
|
outlined
|
||||||
@@ -14,29 +14,47 @@
|
|||||||
)
|
)
|
||||||
.flex.flex-col.gap-y-2.w-full
|
.flex.flex-col.gap-y-2.w-full
|
||||||
base-input.w-full(
|
base-input.w-full(
|
||||||
v-model="dataThermometry[thermometry.name].result",
|
v-model="thermometry.result",
|
||||||
label="Результат"
|
label="Результат"
|
||||||
outlined
|
outlined
|
||||||
text-color="black"
|
text-color="black"
|
||||||
placeholder="Введите диагноз..."
|
placeholder="Введите диагноз..."
|
||||||
|
max="40"
|
||||||
)
|
)
|
||||||
.results-wrapper.flex.flex-col.rounded.w-full.px-3.py-3
|
.results-wrapper.flex.flex-col.rounded.w-full.px-4.py-2
|
||||||
.result.flex.w-full.justify-between.items-center(v-for="result in configThermometry.results")
|
.result.flex.w-full.justify-between.items-center.h-9(v-for="result in data.config.results")
|
||||||
.flex.gap-x-4
|
.flex.gap-x-4
|
||||||
q-radio(
|
q-radio(
|
||||||
v-model="dataThermometry[thermometry.name].result"
|
v-model="thermometry.result"
|
||||||
:val="result.value"
|
:val="result.value"
|
||||||
:label="result.value"
|
:label="result.value"
|
||||||
|
size="30px"
|
||||||
|
dense
|
||||||
checked-icon="check_box"
|
checked-icon="check_box"
|
||||||
unchecked-icon="check_box_outline_blank"
|
unchecked-icon="check_box_outline_blank"
|
||||||
)
|
)
|
||||||
.alert-icon.flex.justify-center.items-center.rounded.w-6.h-6(v-if="result.alert")
|
.alert-icon.flex.justify-center.items-center.rounded.w-6.h-6(v-if="result.colorWarning")
|
||||||
q-icon(size="13" name="warning_amber")
|
q-icon(size="13px" name="warning_amber")
|
||||||
|
.flex.flex-col.gap-y-2.items-start(v-else)
|
||||||
|
.flex.gap-x-1.h-8(v-for="(thermometry, key) in thermometryData")
|
||||||
|
.flex.h-full.w-20.justify-center.items-center.gap-x-1.rounded(
|
||||||
|
:style="{'background-color': data.config.temperature[key].bg, 'color': data.config.temperature[key].color}"
|
||||||
|
)
|
||||||
|
q-icon(size="18px", :name="data.config.temperature[key].icon")
|
||||||
|
span.text-smm.font-medium {{ `${thermometry.temperature}º` }}
|
||||||
|
.flex.items-center.h-full.px-3.font-medium.text-smm.rounded(
|
||||||
|
v-if="thermometry.result",
|
||||||
|
:style="{'background-color': 'var(--bg-light-grey)'}") {{ thermometry.result }}
|
||||||
|
.flex.items-center.justify-center.rounded.w-8.h-full(
|
||||||
|
v-if="data.config.results.find((el) => el.value === thermometry.result)?.colorWarning",
|
||||||
|
:style="{'background-color': data.config.results.find((el) => el.value === thermometry.result).colorWarning, 'color': 'white'}")
|
||||||
|
q-icon(size="20px" name="warning_amber")
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MedicalFormWrapper from "@/pages/newMedicalCard/components/MedicalFormWrapper.vue";
|
import MedicalFormWrapper from "@/pages/newMedicalCard/components/MedicalFormWrapper.vue";
|
||||||
import BaseInput from "@/components/base/BaseInput.vue";
|
import BaseInput from "@/components/base/BaseInput.vue";
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ThermometryForm",
|
name: "ThermometryForm",
|
||||||
@@ -46,53 +64,22 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isEdit: true,
|
isEdit: false,
|
||||||
dataThermometry: {
|
|
||||||
cold: {
|
|
||||||
temperature: null,
|
|
||||||
result: "Реакция нормальная",
|
|
||||||
},
|
|
||||||
heat: {
|
|
||||||
temperature: 50,
|
|
||||||
result: "Повышенная чувствительность",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
configThermometry: {
|
|
||||||
temperature: [
|
|
||||||
{
|
|
||||||
name: "cold",
|
|
||||||
title: "Реакция на холод",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "heat",
|
|
||||||
title: "Реакция на тепло",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
results: [
|
|
||||||
{
|
|
||||||
value: "Нет реакции",
|
|
||||||
alert: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: "Слабая реакция",
|
|
||||||
alert: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: "Реакция нормальная",
|
|
||||||
alert: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: "Повышенная чувствительность",
|
|
||||||
alert: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: "Непереносимость",
|
|
||||||
alert: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState({
|
||||||
|
thermometryData: (state) => state.medical.protocolThermometry,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openEdit() {
|
||||||
|
this.isEdit = true;
|
||||||
|
},
|
||||||
|
cancelEdit() {
|
||||||
|
this.isEdit = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -110,4 +97,6 @@ export default {
|
|||||||
color: var(--font-grey-color)
|
color: var(--font-grey-color)
|
||||||
.result
|
.result
|
||||||
border-bottom: 1px solid var(--bg-light-grey)
|
border-bottom: 1px solid var(--bg-light-grey)
|
||||||
|
&:last-child
|
||||||
|
border: none
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -666,5 +666,42 @@ export const protocolForms = [
|
|||||||
component: "ThermometryForm",
|
component: "ThermometryForm",
|
||||||
key: "thermometry",
|
key: "thermometry",
|
||||||
state: "thermometry",
|
state: "thermometry",
|
||||||
|
config: {
|
||||||
|
temperature: {
|
||||||
|
cold: {
|
||||||
|
title: "Реакция на холод",
|
||||||
|
color: "var(--font-cold-color)",
|
||||||
|
bg: "var(--bg-cold-color)",
|
||||||
|
icon: "ac_unit",
|
||||||
|
},
|
||||||
|
heat: {
|
||||||
|
title: "Реакция на тепло",
|
||||||
|
color: "var(--font-heat-color)",
|
||||||
|
bg: "var(--bg-heat-color)",
|
||||||
|
icon: "local_fire_department",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
results: [
|
||||||
|
{
|
||||||
|
value: "Нет реакции",
|
||||||
|
colorWarning: "var(--border-red-color)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "Слабая реакция",
|
||||||
|
colorWarning: "var(--bg-yellow-warning)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "Реакция нормальная",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "Повышенная чувствительность",
|
||||||
|
colorWarning: "var(--bg-yellow-warning)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "Непереносимость",
|
||||||
|
colorWarning: "var(--border-red-color)",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -131,6 +131,16 @@ const state = () => ({
|
|||||||
hygieneIndex: 2,
|
hygieneIndex: 2,
|
||||||
KPUIndex: 3,
|
KPUIndex: 3,
|
||||||
},
|
},
|
||||||
|
protocolThermometry: {
|
||||||
|
cold: {
|
||||||
|
temperature: 22,
|
||||||
|
result: "Нет реакции",
|
||||||
|
},
|
||||||
|
heat: {
|
||||||
|
temperature: 50,
|
||||||
|
result: "Повышенная чувствительность",
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const getters = {
|
const getters = {
|
||||||
|
|||||||
Reference in New Issue
Block a user