Merge branch 'UC-208' into 'master'
WIP Поправил таблицу зубной формулы и доработал формы информации о клиенте See merge request andrusyakka/urban-couscous!270
This commit is contained in:
5
src/assets/rules/rulesInput.js
Normal file
5
src/assets/rules/rulesInput.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import { dentalСonditionMap } from "@/pages/medicalCard/utils/medicalConfig";
|
||||||
|
const dentalCondition = dentalСonditionMap.map((den) => den.name);
|
||||||
|
export const ruleDentalCondition = (val) => {
|
||||||
|
return dentalCondition.includes(val);
|
||||||
|
};
|
||||||
@@ -1,10 +1,15 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.section-wrapper.flex.flex-col.h-fit.cursor-pointer(:style="{height: `${height}px`}")
|
.section-wrapper.flex.flex-col.h-fit.cursor-pointer
|
||||||
.section-header.flex.items-center.justify-between.pl-4.pr-3.py-4.mb-3
|
.section-header.flex.items-center.justify-between.pl-4.pr-3.py-3
|
||||||
span.text-sm.font-semibold.whitespace-normal {{title}}
|
span.text-sm.font-semibold.whitespace-normal {{title}}
|
||||||
.flex.flex-col.items-center.gap-y-4.px-4
|
.flex.gap-y-4.px-4.py-3(
|
||||||
slot(v-if="!isNoData")
|
:style="{height: `${height}px`}"
|
||||||
|
v-if="!isNoData"
|
||||||
|
:class="{'flex-col': !directionRow}"
|
||||||
|
)
|
||||||
|
slot
|
||||||
.section-add.flex.justify-center.items-center.cursor-pointer(
|
.section-add.flex.justify-center.items-center.cursor-pointer(
|
||||||
|
:style="{height: `${height}px`}"
|
||||||
v-if="isNoData"
|
v-if="isNoData"
|
||||||
@click="openAddDoc"
|
@click="openAddDoc"
|
||||||
) Добавить данные
|
) Добавить данные
|
||||||
@@ -17,6 +22,7 @@ export default {
|
|||||||
title: String,
|
title: String,
|
||||||
height: Number,
|
height: Number,
|
||||||
data: Object,
|
data: Object,
|
||||||
|
directionRow: Boolean,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -3,17 +3,19 @@
|
|||||||
span.title-section.font-semibold.text-xs(v-if="field.title" ) {{field.title}}
|
span.title-section.font-semibold.text-xs(v-if="field.title" ) {{field.title}}
|
||||||
.flex.items-center(v-if="field.type === 'text' || field.type === 'textarea'" class="gap-x-2.5")
|
.flex.items-center(v-if="field.type === 'text' || field.type === 'textarea'" class="gap-x-2.5")
|
||||||
span.w-4.icon(v-if="field.icon" :class="field.icon")
|
span.w-4.icon(v-if="field.icon" :class="field.icon")
|
||||||
base-input(v-model="data[field.label]" :with-icon="field.copy", outlined)
|
base-input(v-model="data[field.label]" :with-icon="field.copy" outlined)
|
||||||
.flex.items-center(v-if="field.copy && data[field.label]")
|
.flex.items-center(v-if="field.copy && data[field.label]")
|
||||||
.copy.icon-copy.cursor-pointer(@click="() => copyValue(data[field.label])")
|
.copy.icon-copy.cursor-pointer(@click="() => copyValue(data[field.label])")
|
||||||
base-input(v-if="field.type === 'date'" v-model="data[field.label]")
|
base-input(v-if="field.type === 'date'" type="date" v-model="data[field.label]" outlined)
|
||||||
|
base-radio-buttons-group(v-if="field.type === 'radio'" v-model="data[field.label]" :items="field.items" size="xs" :column-gap="14" direction-column)
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseInput from "@/components/base/BaseInput.vue";
|
import BaseInput from "@/components/base/BaseInput.vue";
|
||||||
|
import BaseRadioButtonsGroup from "@/components/base/BaseRadioButtonsGroup.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "BaseDetailInput",
|
name: "BaseDetailInput",
|
||||||
components: { BaseInput },
|
components: { BaseInput, BaseRadioButtonsGroup },
|
||||||
props: {
|
props: {
|
||||||
value: String,
|
value: String,
|
||||||
field: Object,
|
field: Object,
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
:bg-color="filled ? '' : 'white'",
|
:bg-color="filled ? '' : 'white'",
|
||||||
:disable="disabled",
|
:disable="disabled",
|
||||||
:rules="rule",
|
:rules="rule",
|
||||||
|
:lazy-rules="lazyRule",
|
||||||
|
:item-aligned="itemAligned",
|
||||||
|
:no-error-icon="noErrorIcon",
|
||||||
:mask="mask",
|
:mask="mask",
|
||||||
:maxlength="maxLength",
|
:maxlength="maxLength",
|
||||||
:autogrow="autogrow",
|
:autogrow="autogrow",
|
||||||
@@ -62,6 +65,9 @@ export default {
|
|||||||
maxLength: Number,
|
maxLength: Number,
|
||||||
textColor: String,
|
textColor: String,
|
||||||
rule: Array,
|
rule: Array,
|
||||||
|
lazyRule: [Boolean, String],
|
||||||
|
noErrorIcon: Boolean,
|
||||||
|
itemAligned: Boolean,
|
||||||
modelValue: [String, Date],
|
modelValue: [String, Date],
|
||||||
placeholder: String,
|
placeholder: String,
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
)
|
)
|
||||||
q-option-group.flex(
|
q-option-group.flex(
|
||||||
class="q-gutter-md",
|
class="q-gutter-md",
|
||||||
:style="{ columnGap: columnGap + 'px', rowGap: rowGap + 'px' }"
|
:style="{ columnGap: columnGap + 'px', rowGap: rowGap + 'px', flexDirection: directionColumn ? 'column' : 'row' }"
|
||||||
:size="size",
|
:size="size",
|
||||||
:options="items",
|
:options="items",
|
||||||
type="radio",
|
type="radio",
|
||||||
@@ -22,7 +22,7 @@ export default {
|
|||||||
components: { BaseInputContainer },
|
components: { BaseInputContainer },
|
||||||
emits: ["update:modelValue"],
|
emits: ["update:modelValue"],
|
||||||
props: {
|
props: {
|
||||||
modelValue: String,
|
modelValue: [String, Boolean],
|
||||||
radioButtonsLabel: String,
|
radioButtonsLabel: String,
|
||||||
items: {
|
items: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
|||||||
@@ -5,9 +5,10 @@
|
|||||||
v-model="value",
|
v-model="value",
|
||||||
:options="items",
|
:options="items",
|
||||||
:disable="disable",
|
:disable="disable",
|
||||||
:behavior="behavior",
|
:hide-dropdown-icon="hideDropdownIcon"
|
||||||
|
:borderless="borderless",
|
||||||
|
:outlined="outlined",
|
||||||
bg-color="white",
|
bg-color="white",
|
||||||
outlined,
|
|
||||||
dense,
|
dense,
|
||||||
emit-value,
|
emit-value,
|
||||||
map-options
|
map-options
|
||||||
@@ -37,7 +38,13 @@ export default {
|
|||||||
components: { BaseMenu, BaseInputContainer },
|
components: { BaseMenu, BaseInputContainer },
|
||||||
props: {
|
props: {
|
||||||
placeholder: String,
|
placeholder: String,
|
||||||
|
hideDropdownIcon: Boolean,
|
||||||
|
borderless: Boolean,
|
||||||
modelValue: [Object, String],
|
modelValue: [Object, String],
|
||||||
|
outlined: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
items: {
|
items: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
|
|||||||
@@ -80,6 +80,12 @@
|
|||||||
base-detail-info(
|
base-detail-info(
|
||||||
:title="configData.agreement_form.title"
|
:title="configData.agreement_form.title"
|
||||||
:height="configData.agreement_form.height"
|
:height="configData.agreement_form.height"
|
||||||
|
direction-row
|
||||||
|
)
|
||||||
|
base-detail-input(
|
||||||
|
v-for="field in configData.agreement_form.fields"
|
||||||
|
:field="field"
|
||||||
|
:data="medicalDataInit.agreement_form"
|
||||||
)
|
)
|
||||||
.flex.flex-col(class="px-92px gap-y-60px")
|
.flex.flex-col(class="px-92px gap-y-60px")
|
||||||
.flex.flex-col(class="gap-y-2.5")
|
.flex.flex-col(class="gap-y-2.5")
|
||||||
@@ -92,6 +98,7 @@
|
|||||||
color="primary",
|
color="primary",
|
||||||
label="Сохранить",
|
label="Сохранить",
|
||||||
padding="8px 24px",
|
padding="8px 24px",
|
||||||
|
@click="validateFormMedical"
|
||||||
no-caps
|
no-caps
|
||||||
)
|
)
|
||||||
</template>
|
</template>
|
||||||
@@ -180,6 +187,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
validateFormMedical() {
|
||||||
|
console.log(this.medicalDataInit);
|
||||||
|
},
|
||||||
saveDataMedical(data) {
|
saveDataMedical(data) {
|
||||||
this.numberCard = data?.number && data.number;
|
this.numberCard = data?.number && data.number;
|
||||||
const confidant = data ? data["confidant"] : undefined;
|
const confidant = data ? data["confidant"] : undefined;
|
||||||
@@ -267,6 +277,17 @@ export default {
|
|||||||
display: grid
|
display: grid
|
||||||
grid-template-columns: 280px 292px 180px 360px 463px
|
grid-template-columns: 280px 292px 180px 360px 463px
|
||||||
gap: 16px
|
gap: 16px
|
||||||
|
padding: 0 20px 20px 0
|
||||||
|
overflow-x: auto
|
||||||
|
&::-webkit-scrollbar
|
||||||
|
height: 4px
|
||||||
|
width: 4px
|
||||||
|
&::-webkit-scrollbar-track
|
||||||
|
background-color: rgba(211, 212, 220, 0.5)
|
||||||
|
border-radius: 8px
|
||||||
|
&::-webkit-scrollbar-thumb
|
||||||
|
border-radius: 8px
|
||||||
|
background-color: var(--btn-blue-color)
|
||||||
.card-upper
|
.card-upper
|
||||||
border-bottom: 1px solid var(--border-light-grey-color)
|
border-bottom: 1px solid var(--border-light-grey-color)
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -37,4 +37,14 @@ export default {
|
|||||||
.wrapper
|
.wrapper
|
||||||
border: 1.5px solid var(--border-light-grey-color)
|
border: 1.5px solid var(--border-light-grey-color)
|
||||||
border-radius: 4px
|
border-radius: 4px
|
||||||
|
overflow: auto
|
||||||
|
&::-webkit-scrollbar
|
||||||
|
height: 4px
|
||||||
|
width: 4px
|
||||||
|
&::-webkit-scrollbar-track
|
||||||
|
background-color: rgba(211, 212, 220, 0.5)
|
||||||
|
border-radius: 8px
|
||||||
|
&::-webkit-scrollbar-thumb
|
||||||
|
border-radius: 8px
|
||||||
|
background-color: var(--btn-blue-color)
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,32 +1,51 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
//TODO: Поправить бордеры у таблицы
|
//TODO: Поправить бордеры у таблицы
|
||||||
.table-formula.flex.border-collapse(:class="{'rounded-t': data.name === 'upperJaw', 'rounded-b': data.name === 'lowerJaw'}")
|
.table-formula.flex.border-collapse
|
||||||
.flex.flex-col.border-collapse
|
.flex.flex-col.border-collapse
|
||||||
.cell-number.flex.w-52.h-50px.font-bold.text-lg.justify-center.items-center.border-collapse(v-for="row in data.rowMap") {{row.label}}
|
.cell-grey.flex.w-52.h-50px.font-bold.text-lg.justify-center.items-center.border-collapse(v-for="row in data.rowMap") {{row.label}}
|
||||||
.flex.flex-col.border-collapse(v-for="tooth in data.columns")
|
.flex.flex-col.border-collapse(v-for="tooth in data.columns")
|
||||||
.cell.flex.w-50px.h-50px.font-bold.text-2xl.justify-center.items-center.border-collapse(v-for="row in data.rowMap" :class="{'cell-number': row.name === 'tooth_number'}")
|
.cell.flex.w-50px.h-50px.font-bold.text-2xl.justify-center.items-center(v-for="(row, index) in data.rowMap" :class="{'cell-grey': row.name === 'tooth_number'}")
|
||||||
span(v-if="row.name === 'tooth_number'") {{tooth[row.name]}}
|
span(v-if="row.name === 'tooth_number'") {{tooth[row.name]}}
|
||||||
input.w-8.outline-0(v-if="row.name === 'dental_condition'" v-model="tooth[row.name]" maxlength="2")
|
base-input.pl-4.pr-2(v-if="row.name === 'dental_condition'" v-model="tooth[row.name]" :rules="[ruleCondition]" :max-length="2" borderless no-error-icon)
|
||||||
input.w-8.outline-0(v-if="row.name === 'tooth_mobility'" v-model="tooth[row.name]" maxlength="3")
|
label.flex.w-full.h-full.justify-center.items-center.cursor-pointer(v-if="row.name === 'tooth_mobility'")
|
||||||
|
base-select.pl-4.pr-4(v-model="tooth[row.name]" :id="`${row.name}_${index}`" :items="mobilityMap" :outlined="false" menu-anchor="bottom start" borderless hide-dropdown-icon)
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { ruleDentalCondition } from "@/assets/rules/rulesInput";
|
||||||
|
import BaseInput from "@/components/base/BaseInput.vue";
|
||||||
|
import BaseSelect from "@/components/base/BaseSelect.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "MedicalFormulaTable",
|
name: "MedicalFormulaTable",
|
||||||
|
components: { BaseInput, BaseSelect },
|
||||||
props: {
|
props: {
|
||||||
data: Object,
|
data: Object,
|
||||||
rowMap: Array,
|
rowMap: Array,
|
||||||
condition: Array,
|
condition: Array,
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
ruleCondition: ruleDentalCondition,
|
||||||
|
mobilityMap: [
|
||||||
|
{ id: 1, label: "I" },
|
||||||
|
{ id: 2, label: "II" },
|
||||||
|
{ id: 3, label: "III" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="sass" scoped>
|
<style lang="sass" scoped>
|
||||||
.table-formula
|
.table-formula
|
||||||
border: 2px solid var(--font-black-color)
|
border-left: 1.5px solid var(--font-black-color)
|
||||||
|
border-top: 1.5px solid var(--font-black-color)
|
||||||
.cell
|
.cell
|
||||||
border: 1px solid var(--font-black-color)
|
border-bottom: 1.5px solid black
|
||||||
.cell-number
|
border-right: 1.5px solid black
|
||||||
|
.cell-grey
|
||||||
@extend .cell
|
@extend .cell
|
||||||
background-color: var(--border-light-grey-color)
|
background-color: var(--border-light-grey-color)
|
||||||
|
.not-border
|
||||||
|
border: none
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export const medicalDetailConfig = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
identity_document: {
|
identity_document: {
|
||||||
height: 366,
|
height: 316,
|
||||||
title: "Паспортные данные",
|
title: "Паспортные данные",
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
@@ -51,7 +51,7 @@ export const medicalDetailConfig = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
registration_address: {
|
registration_address: {
|
||||||
height: 135,
|
height: 85,
|
||||||
title: "Адрес регистрации",
|
title: "Адрес регистрации",
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
@@ -62,7 +62,7 @@ export const medicalDetailConfig = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
temporary_address: {
|
temporary_address: {
|
||||||
height: 135,
|
height: 85,
|
||||||
title: "Адрес проживания",
|
title: "Адрес проживания",
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
@@ -73,7 +73,7 @@ export const medicalDetailConfig = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
snils: {
|
snils: {
|
||||||
height: 135,
|
height: 85,
|
||||||
title: "СНИЛС",
|
title: "СНИЛС",
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
@@ -85,7 +85,7 @@ export const medicalDetailConfig = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
policy: {
|
policy: {
|
||||||
height: 210,
|
height: 162,
|
||||||
title: "ПОЛИС",
|
title: "ПОЛИС",
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
@@ -101,7 +101,7 @@ export const medicalDetailConfig = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
policy_organization: {
|
policy_organization: {
|
||||||
height: 135,
|
height: 85,
|
||||||
title: "Страховая организация",
|
title: "Страховая организация",
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
@@ -112,7 +112,7 @@ export const medicalDetailConfig = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
additional: {
|
additional: {
|
||||||
height: 275,
|
height: 218,
|
||||||
title: "Дополнительная информация",
|
title: "Дополнительная информация",
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
@@ -135,14 +135,26 @@ export const medicalDetailConfig = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
agreement_form: {
|
agreement_form: {
|
||||||
height: 163,
|
height: 121,
|
||||||
title:
|
title:
|
||||||
"Информированное добровольное согласие на виды медицинских вмешательств, включенные в Перечень определенных видов медицинских вмешательств:",
|
"Информированное добровольное согласие на виды медицинских вмешательств, включенные в Перечень определенных видов медицинских вмешательств:",
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
label: "agreement",
|
label: "agreement",
|
||||||
title: "Получено",
|
title: "Получено",
|
||||||
type: "check_box",
|
type: "radio",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
id: "1",
|
||||||
|
label: "Да",
|
||||||
|
value: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "2",
|
||||||
|
label: "Нет",
|
||||||
|
value: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "agreement_date",
|
label: "agreement_date",
|
||||||
|
|||||||
Reference in New Issue
Block a user