[WIP] Фикс стилей, загрузки документов и фото на форме данных обследования, фикс багов
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user