diff --git a/src/assets/rules/rulesInput.js b/src/assets/rules/rulesInput.js
new file mode 100644
index 0000000..a144124
--- /dev/null
+++ b/src/assets/rules/rulesInput.js
@@ -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);
+};
diff --git a/src/components/base/BaseDetailInfo.vue b/src/components/base/BaseDetailInfo.vue
index 6691b4c..4c5ab78 100644
--- a/src/components/base/BaseDetailInfo.vue
+++ b/src/components/base/BaseDetailInfo.vue
@@ -1,10 +1,15 @@
- .section-wrapper.flex.flex-col.h-fit.cursor-pointer(:style="{height: `${height}px`}")
- .section-header.flex.items-center.justify-between.pl-4.pr-3.py-4.mb-3
+ .section-wrapper.flex.flex-col.h-fit.cursor-pointer
+ .section-header.flex.items-center.justify-between.pl-4.pr-3.py-3
span.text-sm.font-semibold.whitespace-normal {{title}}
- .flex.flex-col.items-center.gap-y-4.px-4
- slot(v-if="!isNoData")
+ .flex.gap-y-4.px-4.py-3(
+ :style="{height: `${height}px`}"
+ v-if="!isNoData"
+ :class="{'flex-col': !directionRow}"
+ )
+ slot
.section-add.flex.justify-center.items-center.cursor-pointer(
+ :style="{height: `${height}px`}"
v-if="isNoData"
@click="openAddDoc"
) Добавить данные
@@ -17,6 +22,7 @@ export default {
title: String,
height: Number,
data: Object,
+ directionRow: Boolean,
},
data() {
return {
diff --git a/src/components/base/BaseDetailInput.vue b/src/components/base/BaseDetailInput.vue
index c1ae22f..a8dd5c0 100644
--- a/src/components/base/BaseDetailInput.vue
+++ b/src/components/base/BaseDetailInput.vue
@@ -3,17 +3,19 @@
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")
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]")
.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)
diff --git a/src/pages/medicalCard/utils/medicalConfig.js b/src/pages/medicalCard/utils/medicalConfig.js
index be748ba..e376957 100644
--- a/src/pages/medicalCard/utils/medicalConfig.js
+++ b/src/pages/medicalCard/utils/medicalConfig.js
@@ -24,7 +24,7 @@ export const medicalDetailConfig = {
},
],
identity_document: {
- height: 366,
+ height: 316,
title: "Паспортные данные",
fields: [
{
@@ -51,7 +51,7 @@ export const medicalDetailConfig = {
],
},
registration_address: {
- height: 135,
+ height: 85,
title: "Адрес регистрации",
fields: [
{
@@ -62,7 +62,7 @@ export const medicalDetailConfig = {
],
},
temporary_address: {
- height: 135,
+ height: 85,
title: "Адрес проживания",
fields: [
{
@@ -73,7 +73,7 @@ export const medicalDetailConfig = {
],
},
snils: {
- height: 135,
+ height: 85,
title: "СНИЛС",
fields: [
{
@@ -85,7 +85,7 @@ export const medicalDetailConfig = {
],
},
policy: {
- height: 210,
+ height: 162,
title: "ПОЛИС",
fields: [
{
@@ -101,7 +101,7 @@ export const medicalDetailConfig = {
],
},
policy_organization: {
- height: 135,
+ height: 85,
title: "Страховая организация",
fields: [
{
@@ -112,7 +112,7 @@ export const medicalDetailConfig = {
],
},
additional: {
- height: 275,
+ height: 218,
title: "Дополнительная информация",
fields: [
{
@@ -135,14 +135,26 @@ export const medicalDetailConfig = {
],
},
agreement_form: {
- height: 163,
+ height: 121,
title:
"Информированное добровольное согласие на виды медицинских вмешательств, включенные в Перечень определенных видов медицинских вмешательств:",
fields: [
{
label: "agreement",
title: "Получено",
- type: "check_box",
+ type: "radio",
+ items: [
+ {
+ id: "1",
+ label: "Да",
+ value: true,
+ },
+ {
+ id: "2",
+ label: "Нет",
+ value: false,
+ },
+ ],
},
{
label: "agreement_date",