From cd5d7b8a664517b46b31b5899a8d0b2bf03fb841 Mon Sep 17 00:00:00 2001 From: megavrilinvv Date: Fri, 19 May 2023 14:30:56 +0300 Subject: [PATCH] =?UTF-8?q?[WIP]=20=D0=A4=D0=B8=D0=BA=D1=81=20=D1=81=D1=82?= =?UTF-8?q?=D0=B8=D0=BB=D0=B5=D0=B9,=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83?= =?UTF-8?q?=D0=B7=D0=BA=D0=B8=20=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=82=D0=BE=D0=B2=20=D0=B8=20=D1=84=D0=BE=D1=82=D0=BE=20=D0=BD?= =?UTF-8?q?=D0=B0=20=D1=84=D0=BE=D1=80=D0=BC=D0=B5=20=D0=B4=D0=B0=D0=BD?= =?UTF-8?q?=D0=BD=D1=8B=D1=85=20=D0=BE=D0=B1=D1=81=D0=BB=D0=B5=D0=B4=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F,=20=D1=84=D0=B8=D0=BA=D1=81=20?= =?UTF-8?q?=D0=B1=D0=B0=D0=B3=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icons/layers.svg | 3 ++ .../Forms/DataForm.vue | 39 ++++++++++++------- .../Forms/DiseaseForm.vue | 7 ++-- .../Forms/MedicalFormTag.vue | 14 ++++++- .../components/MedicalFormWrapper.vue | 15 +++++-- .../newMedicalCard/utils/medicalConfig.js | 1 - 6 files changed, 54 insertions(+), 25 deletions(-) create mode 100644 src/assets/icons/layers.svg diff --git a/src/assets/icons/layers.svg b/src/assets/icons/layers.svg new file mode 100644 index 0000000..daf6ca4 --- /dev/null +++ b/src/assets/icons/layers.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/DataForm.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/DataForm.vue index a2cde87..f67cfe2 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/DataForm.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/DataForm.vue @@ -4,17 +4,19 @@ :is-edit="change", :open-edit="openCard", :cancel="closeCard", - :tag="fillInspection || change" + :tag="fillInspection || change", + template ) .protocol-body.flex.flex-col .flex.items-center.gap-x-11px(:class="{'open-header': change || fillInspection}") .flex.flex-col.gap-y-4(:class="{'changed': change || fillInspection}") .flex.flex-col.gap-y-1(:class="{'open-textarea': change || fillInspection}") .tag-wrap.flex.gap-x-1.gap-y-1(v-if="!fillInspection") - .tag.flex.items-center.px-3.cursor-pointer.font-medium.text-smm( + .tag.flex.items-center.px-3.font-medium.text-smm( + :class="{'pointer': fillInspection || change}" v-for="tag in data.results.tags", :key="tag.id" ) {{tag.label}} - base-input.px-3(v-if="change || fillInspection", type="textarea", autogrow, borderless, placeholder="Введите жалобу...") + base-input.px-3(v-if="change || fillInspection", type="textarea", autogrow, borderless, placeholder="Введите данные...") template(v-if="!(change || fillInspection)", v-for="file in data.results.files") .wrap.flex.flex-col.gap-1.gap-y-3(v-if="file?.data?.length") .title.font-semibold.text-smm.mb-2 {{file.name}} @@ -58,21 +60,20 @@ :style="{border: 'none', width: '16px', height: '16px'}" ) .name.flex.items-center.font-medium.text-smm {{ name?.label }} - .protocol-data.flex.gap-x-20(v-if="change || fillInspection") - .flex.flex-col.gap-y-3(v-for="file in data.results.files") + .flex.gap-x-20.w-full(v-if="change || fillInspection") + .flex.flex-col.gap-y-3.w-full(v-for="file in data.results.files") .title.text-smm.font-semibold {{file.name}} - .download.flex.relative - base-input( + .download.flex.relative.w-full + base-input.w-full( @update:model-value="(e) => addNewFiles(e, file.name)", doc, - :width="548", type="file", id="upload", :accept="checkedName(file.name) ? '.xlsx, .xls, .doc, .docx, .pdf, .odt' : 'image/*'", borderless, multiple ) - .text.flex.flex-col.items-center.justify-center.absolute.font-medium.text-smm + .text.flex.flex-col.items-center.justify-center.absolute.font-medium.text-smm.w-full span {{checkedName(file.name) ? 'Загрузите документ' : 'Загрузите скан документа'}} label.label.cursor-pointer(for="upload") с компьютера span или перетащите его в это поле @@ -139,11 +140,20 @@ export default { this.change = false; }, addNewDoc(arr) { - this.data.results.files.find((e) => e.name === "Документы").data = [ - ...arr, - ]; + let doc = [...arr]; + if ( + this.data.iconDictionary[ + doc[0]?.name.substr(doc[0].name.lastIndexOf(".") + 1) + ] + ) + this.data.results.files.find((e) => e.name === "Документы").data = [ + ...this.data.results.files.find((e) => e.name === "Документы").data, + ...arr, + ]; }, addNewScan(arr) { + let scan = [...arr]; + if (scan[0].type.split("/")[0] !== "image") return; [...arr].forEach((file) => { const reader = new FileReader(); reader.onload = (e) => { @@ -251,14 +261,12 @@ export default { background: none !important .download - width: 548px height: 62px border: 1px dashed var(--border-light-grey-color) border-radius: 4px cursor: pointer .text - width: 548px height: 62px cursor: pointer color: var(--font-grey-color) @@ -282,6 +290,9 @@ export default { .wrap flex-wrap: wrap !important +.pointer + cursor: pointer + .scan-field height: 56px background: var(--bg-light-grey) diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/DiseaseForm.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/DiseaseForm.vue index fba6c28..5ad2a70 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/DiseaseForm.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/DiseaseForm.vue @@ -7,16 +7,15 @@ :tag="fillInspection || change" ) .disease-body.flex - .flex.flex-col.gap-y-17px(v-if="fillInspection || change") + .flex.flex-col.gap-y-17px.w-full(v-if="fillInspection || change") .flex.-ml-2 q-checkbox.text-smm.font-medium(v-model="data.results.checked" label="Без особенностей" size="36px") - .textarea.flex - base-input( + .textarea.flex.w-full + base-input.w-full( v-model="data.results.text", type="textarea", outlined, resize="vertical", - :width="1176", placeholder="Введите данные..." ) .font-medium.text-smm(v-else) {{data.results?.text}} diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/MedicalFormTag.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/MedicalFormTag.vue index fc6fd72..991ea21 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/MedicalFormTag.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/MedicalFormTag.vue @@ -11,9 +11,13 @@ .flex.gap-x-4(:style="{height: change || fillInspection ? '300px' : ''}") .flex.flex-col.gap-y-1(:class="{'open-textarea': change || fillInspection}") .tag-wrap.flex.gap-x-1.gap-y-1(v-if="!fillInspection") - .tag.flex.items-center.px-3.cursor-pointer.text-smm(v-for="tag in data.results.tags" :key="tag.id") {{tag.label}} + .tag.flex.items-center.px-3.text-smm( + v-for="tag in data.results.tags", + :key="tag.id" + :class="{'pointer': change || fillInspection}" + ) {{tag.label}} base-input.px-3(v-if="change || fillInspection", type="textarea", autogrow, borderless, placeholder="Введите жалобу...") - .filter.flex.flex-col.gap-y-4(v-if="change || fillInspection") + .filter.flex.flex-col.gap-y-4.relative(v-if="change || fillInspection") .flex.gap-x-2 base-input(placeholder="Поиск", outlined, :width="232", iconLeft) q-icon( @@ -44,6 +48,9 @@ :style="{border: 'none', width: '16px', height: '16px'}" ) .name.flex.items-center.font-medium.text-smm {{ name?.label }} + .flex.h-10.w-10.absolute.right-4.bottom-4 + q-btn(color="primary", dense, padding="4px 12px") + q-icon(name="app:icon-plus", size="17px") diff --git a/src/pages/newMedicalCard/utils/medicalConfig.js b/src/pages/newMedicalCard/utils/medicalConfig.js index c7842aa..8891482 100644 --- a/src/pages/newMedicalCard/utils/medicalConfig.js +++ b/src/pages/newMedicalCard/utils/medicalConfig.js @@ -727,7 +727,6 @@ export const protocolForms = [ key: "data", state: "data", results: { - title: "Данные обследования", tags: [ { id: 1, label: "Боль при приеме сладкой пищи" }, { id: 2, label: "Жжение языка" },