Merge branch 'ASTRA-121' into 'master'
Resolve ASTRA-121 See merge request andrusyakka/urban-couscous!451
This commit is contained in:
@@ -107,6 +107,12 @@ export default {
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
modelValue: {
|
||||
immediate: true,
|
||||
handler(value) {
|
||||
this.protocolData[this.data.state] = value;
|
||||
},
|
||||
},
|
||||
state: {
|
||||
immediate: true,
|
||||
handler(value) {
|
||||
|
||||
@@ -48,8 +48,10 @@
|
||||
)
|
||||
.name.flex.items-center.font-medium.text-smm {{ name }}
|
||||
.flex.h-10.w-10.absolute.right-4.bottom-4
|
||||
q-btn(color="primary", dense, padding="4px 12px")
|
||||
q-btn(@click="showModal = true", color="primary", dense, padding="4px 12px")
|
||||
q-icon(name="app:icon-plus", size="17px")
|
||||
base-modal(v-model="showModal", title="Создание тега")
|
||||
tag-creation-form
|
||||
.flex(v-if="data.title === 'Осмотр полости рта' && (fillInspection || change)", :style="{color: 'var(--btn-blue-color)'}")
|
||||
q-btn(no-caps, flat padding="2px 4px")
|
||||
q-icon(left, name="app:plus", size="11px")
|
||||
@@ -60,15 +62,24 @@
|
||||
import BaseButton from "@/components/base/BaseButton.vue";
|
||||
import BaseInput from "@/components/base/BaseInput.vue";
|
||||
import MedicalFormWrapper from "@/pages/newMedicalCard/components/MedicalFormWrapper.vue";
|
||||
import TagCreationForm from "@/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/TagCreationForm.vue";
|
||||
import { mapState } from "vuex";
|
||||
import BaseModal from "@/components/base/BaseModal.vue";
|
||||
|
||||
export default {
|
||||
name: "MedicalFormTag",
|
||||
components: { BaseButton, BaseInput, MedicalFormWrapper },
|
||||
components: {
|
||||
BaseButton,
|
||||
BaseInput,
|
||||
MedicalFormWrapper,
|
||||
TagCreationForm,
|
||||
BaseModal,
|
||||
},
|
||||
props: { data: Object, abc: Array, fillInspection: Boolean },
|
||||
data() {
|
||||
return {
|
||||
change: false,
|
||||
showModal: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<template lang="pug">
|
||||
.wrapper.flex.flex-col
|
||||
.flex.flex-col
|
||||
.buttons-group.flex
|
||||
q-btn(
|
||||
color="primary",
|
||||
outline,
|
||||
size="16px",
|
||||
no-caps,
|
||||
label="Отмена",
|
||||
:style="{width: '100%', height: '40px'}",
|
||||
padding="10px 24px"
|
||||
)
|
||||
q-btn(
|
||||
color="primary",
|
||||
size="16px",
|
||||
no-caps,
|
||||
label="Создать"
|
||||
:style="{width: '100%', height: '40px'}",
|
||||
padding="10px 24px"
|
||||
)
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "TagCreationForm",
|
||||
data() {
|
||||
return {
|
||||
model: null,
|
||||
options: [
|
||||
{ label: "Какая-то категория 1" },
|
||||
{ label: "Какая-то категория 2" },
|
||||
{ label: "Какая-то категория 3" },
|
||||
{ label: "Какая-то категория 4" },
|
||||
],
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
.buttons-group
|
||||
padding: 16px 168px 0px 32px
|
||||
border-top: 1px solid var(--border-light-grey-color)
|
||||
margin-left: -40px
|
||||
margin-right: -40px
|
||||
column-gap: 7px
|
||||
</style>
|
||||
@@ -43,7 +43,9 @@ import MainFactorsForm from "@/pages/newMedicalCard/components/InitialInspection
|
||||
import ToothFormulaForm from "@/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaForm.vue";
|
||||
import { protocolForms } from "@/pages/newMedicalCard/utils/medicalConfig.js";
|
||||
import ClinicalForm from "./Forms/ClinicalForm.vue";
|
||||
import { mapGetters, mapState } from "vuex";
|
||||
import { mapState } from "vuex";
|
||||
import { removeEmptyFields } from "@/shared/utils/changesObjects";
|
||||
import toothFormula from "@/store/modules/toothFormula";
|
||||
|
||||
export default {
|
||||
name: "MedicalProtocolsInspection",
|
||||
@@ -60,6 +62,7 @@ export default {
|
||||
props: { inspection: Boolean, fillInspection: Boolean },
|
||||
data() {
|
||||
return {
|
||||
initToothFormula: toothFormula.stateInit,
|
||||
percent: 0,
|
||||
protocolForms: protocolForms,
|
||||
list: [
|
||||
@@ -107,34 +110,64 @@ export default {
|
||||
...mapState({
|
||||
protocolData: (state) => state.medical.protocolData,
|
||||
}),
|
||||
...mapGetters({
|
||||
protocolDataGet: "getInitProtocol",
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
interestСalculation() {
|
||||
const getTypeOf = (obj) => {
|
||||
return {}.toString.call(obj).slice(8, -1);
|
||||
};
|
||||
let sum = 0;
|
||||
for (let a in this.protocolData) {
|
||||
if (
|
||||
Array.isArray(this.protocolData[a]) &&
|
||||
this.protocolData[a].length > 0
|
||||
)
|
||||
sum += 1;
|
||||
|
||||
if (this.protocolData[a] && typeof this.protocolData[a] === "string")
|
||||
sum += 1;
|
||||
|
||||
if (
|
||||
getTypeOf(this.protocolData[a]) === "Object" &&
|
||||
Object.keys(this.protocolData[a]).length
|
||||
)
|
||||
sum += 1;
|
||||
setPercent(data, sum) {
|
||||
switch (data) {
|
||||
case "KPUIndex":
|
||||
case "bite":
|
||||
case "hygieneIndex":
|
||||
if (this.protocolData[data]) sum += 1;
|
||||
break;
|
||||
case "anamnesis":
|
||||
case "cavity":
|
||||
case "clinical":
|
||||
case "complaints":
|
||||
case "illnesses":
|
||||
case "inspection":
|
||||
case "medications":
|
||||
case "survey":
|
||||
if (this.protocolData[data].length) sum += 1;
|
||||
break;
|
||||
case "data": {
|
||||
if (this.protocolData[data].complaints.length) sum += 0.5;
|
||||
this.protocolData[data].files.forEach((e) => {
|
||||
if (e.data.length) sum += 0.25;
|
||||
});
|
||||
break;
|
||||
}
|
||||
sum = Math.ceil(17 / sum);
|
||||
this.percent = sum > 1 ? sum * 10 : sum * 100;
|
||||
case "disease":
|
||||
case "preliminary":
|
||||
if (this.protocolData[data].text || this.protocolData[data].change)
|
||||
sum += 1;
|
||||
break;
|
||||
case "thermometry": {
|
||||
let obj = removeEmptyFields(this.protocolData[data]);
|
||||
for (let el in obj) {
|
||||
if (obj[el].result) sum += 0.25;
|
||||
if (obj[el].value) sum += 0.25;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "tonometry": {
|
||||
let obj = removeEmptyFields(this.protocolData[data]);
|
||||
for (let el in obj) if (obj[el].value) sum += 0.5;
|
||||
break;
|
||||
}
|
||||
case "toothFormula":
|
||||
if (
|
||||
JSON.stringify(this.initToothFormula) !==
|
||||
JSON.stringify(this.protocolData[data])
|
||||
)
|
||||
sum += 1;
|
||||
break;
|
||||
}
|
||||
return sum;
|
||||
},
|
||||
interestСalculation() {
|
||||
let sum = 0;
|
||||
for (let data in this.protocolData) sum = this.setPercent(data, sum);
|
||||
this.percent = Math.round((100 * Math.round(sum)) / 17);
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -753,7 +753,6 @@ export const protocolForms = [
|
||||
"Киста в глазу",
|
||||
"Красные пятна на языке",
|
||||
"Фингал под глазом",
|
||||
"Гематома на щеке",
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -374,7 +374,7 @@ const getters = {
|
||||
},
|
||||
toothFormula: {
|
||||
lacticBite: toothFormula.state.lacticBite,
|
||||
formula: toothFormula.state.formula,
|
||||
formula: JSON.parse(JSON.stringify(toothFormula.state.formula)),
|
||||
},
|
||||
data: {
|
||||
complaints: [
|
||||
@@ -427,7 +427,7 @@ const getters = {
|
||||
preliminary: { text: null },
|
||||
toothFormula: {
|
||||
lacticBite: toothFormula.stateInit.lacticBite,
|
||||
formula: toothFormula.stateInit.formula,
|
||||
formula: JSON.parse(JSON.stringify(toothFormula.stateInit.formula)),
|
||||
},
|
||||
data: {
|
||||
complaints: [],
|
||||
|
||||
Reference in New Issue
Block a user