From 888181f990608ab6316b547eac53436b85bd5feb Mon Sep 17 00:00:00 2001 From: DwCay Date: Mon, 3 Jul 2023 18:49:09 +0300 Subject: [PATCH] =?UTF-8?q?[WIP]=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BD=D0=BE=D0=B2=D0=BE=D0=B9=20=D0=B7=D0=B0=D0=BF?= =?UTF-8?q?=D0=B8=D1=81=D0=B8,=20=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D0=B1=D0=B0=D0=B3=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/sass/variables.sass | 1 + src/components/base/BaseDownload.vue | 28 +++-- src/components/base/BaseInput.vue | 6 +- .../HealthState/HealthStateCreateModal.vue | 80 +++++++++++-- .../HealthState/HealthStateForm.vue | 107 ++++++++---------- src/store/modules/medicalCard.js | 53 ++++----- 6 files changed, 160 insertions(+), 115 deletions(-) diff --git a/src/assets/sass/variables.sass b/src/assets/sass/variables.sass index 8bcbcbd..b057174 100644 --- a/src/assets/sass/variables.sass +++ b/src/assets/sass/variables.sass @@ -24,6 +24,7 @@ --bg-btn-icons-color: rgba(215, 217, 255, 0.6) --font-grey-color: #9294a7 --font-grey-color-0: #85858b + --font-dark-grey-color: #7a88a8 --border-grey-color: #c2c2c2 --border-light-grey-color: #d3d4dc --bg-light-grey: #eff1f4 diff --git a/src/components/base/BaseDownload.vue b/src/components/base/BaseDownload.vue index 3139b34..550232d 100644 --- a/src/components/base/BaseDownload.vue +++ b/src/components/base/BaseDownload.vue @@ -2,18 +2,6 @@ label.download.flex.cursor-pointer.relative.items-center.justify-center.rounded( :style="{height: `${height}px`, width: width ? `${width}px` : '100%'}" ) - q-icon.absolute( - v-if="withIcon", - name="app:download", - size="24px" - ) - .flex.flex-col.items-center.justify-center.absolute.font-medium.text-smm.w-full( - v-else, - :style="{color: 'var(--font-grey-color)'}" - ) - span {{`Загрузите ${titleType}`}} - label(:style="{color: 'var(--btn-blue-color)'}") с компьютера - span или перетащите его в это поле base-input( @change="(e) => addNewFiles(e)", doc, @@ -24,6 +12,18 @@ borderless, :multiple="multiple" ) + q-icon.absolute( + v-if="withIcon", + name="app:download", + :size="sizeIcon" + ) + .flex.flex-col.items-center.justify-center.absolute.font-medium.text-smm.w-full( + v-else, + :style="{color: 'var(--font-grey-color)'}" + ) + span {{`Загрузите ${titleType}`}} + label.pointer-events-none.cursor-pointer(:style="{color: 'var(--btn-blue-color)'}") с компьютера + span или перетащите его в это поле - - diff --git a/src/store/modules/medicalCard.js b/src/store/modules/medicalCard.js index 554b1ff..be8913b 100644 --- a/src/store/modules/medicalCard.js +++ b/src/store/modules/medicalCard.js @@ -128,7 +128,7 @@ const state = () => ({ }, ], protocolData: null, - healthState: getters.getHealthStateData(), + healthState: null, }); const getters = { @@ -396,49 +396,22 @@ const getters = { id: 1, date: "2023-02-22", pictures: [], - comments: [ - { - text: "Пациент склонен к преувеличению фактов", - }, - { - text: "Пациент отказывался заполнять карту", - }, - { - text: "Тяжело идет на контакт", - }, - ], + comment: + "Пациент склонен к преувеличению фактов\nПациент отказывался заполнять карту\nТяжело идет на контакт", }, { id: 2, date: "2022-02-22", pictures: [], - comments: [ - { - text: "Пациент склонен к преувеличению фактов", - }, - { - text: "Пациент отказывался заполнять карту", - }, - { - text: "Тяжело идет на контакт", - }, - ], + comment: + "Пациент склонен к преувеличению фактов\nПациент отказывался заполнять карту\nТяжело идет на контакт", }, { id: 3, date: "2021-02-22", pictures: [], - comments: [ - { - text: "Пациент склонен к преувеличению фактов", - }, - { - text: "Пациент отказывался заполнять карту", - }, - { - text: "Тяжело идет на контакт", - }, - ], + comment: + "Пациент склонен к преувеличению фактов\nПациент отказывался заполнять карту\nТяжело идет на контакт", }, ]; }, @@ -448,6 +421,9 @@ const actions = { deleteItemData({ commit }, props) { commit("setDataWithouDeleted", props); }, + addNewListData({ commit }, props) { + commit("setNewListData", props); + }, getBenefitData({ commit }) { fetchWrapper.get("general/benefit/").then((res) => { commit("setBenefitData", res.results); @@ -474,6 +450,7 @@ const actions = { commit("setDocumentsData"); commit("setAllergiesData"); commit("setConfidantData"); + commit("setHealthStateData"); commit("setEventsPersonData", res.person.id); }); }, @@ -519,6 +496,9 @@ const mutations = { (item) => item.id !== props.itemId ); }, + setNewListData(state, props) { + state[props.stateKey] = [...state[props.stateKey], props.data]; + }, setBenefitData(state, data) { state.benefitData = data; }, @@ -561,6 +541,11 @@ const mutations = { } } }, + setHealthStateData(state) { + state.healthState = JSON.parse( + JSON.stringify(this.getters.getHealthStateData) + ); + }, }; export default {