mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 13:51:06 +03:30
new correction
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
@vdropzone-error = "error"
|
||||
class="WM-Relative" >
|
||||
<div class="dropzone-custom-content">
|
||||
<!-- <h3 class="dropzone-custom-title">فایل مورد نظر خود را در این قسمت آپلود کنید</h3> -->
|
||||
<div class="subtitle">Upload images here</div>
|
||||
<h3 class="dropzone-custom-title">Upload your files here</h3>
|
||||
<div class="subtitle">image or pdf or word</div>
|
||||
</div>
|
||||
</vue-dropzone>
|
||||
</div>
|
||||
@@ -33,7 +33,7 @@
|
||||
},
|
||||
data: () => ({
|
||||
dropzoneOptions: {
|
||||
url: '/api/UploadImage',
|
||||
url: '/api/UploadFile',
|
||||
thumbnailWidth: 150,
|
||||
maxFilesize: 2,
|
||||
headers: { "Authorization": `Bearer ${TokenService.getToken()}` },
|
||||
@@ -48,7 +48,7 @@
|
||||
let vm = this;
|
||||
if (vm.Images != null) {
|
||||
vm.Images.forEach(function(image, key){
|
||||
var file = { name: image.file_name, size:'1024', type: 'jpg', id: image.id};
|
||||
var file = { name: image.file_name, size:'1024', type: ' ', id: image.id};
|
||||
vm.$refs.myVueDropzone.manuallyAddFile(file, '/'+image.path);
|
||||
});
|
||||
}
|
||||
@@ -69,7 +69,7 @@
|
||||
}
|
||||
},
|
||||
sending(file, xhr, form_data) {
|
||||
form_data.append('image', file);
|
||||
form_data.append('file', file);
|
||||
form_data.append('model_id', this.ModelID);
|
||||
form_data.append('model_type', this.ModelType);
|
||||
form_data.append('batch_id', this.BatchID);
|
||||
@@ -87,7 +87,7 @@
|
||||
formdata.append('model_id', this.ModelID);
|
||||
formdata.append('model_type', this.ModelType);
|
||||
formdata.append('batch_id', this.BatchID);
|
||||
let result = await ApiService.post(urls.deleteImage,formdata);
|
||||
let result = await ApiService.post(urls.deleteFile,formdata);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -139,8 +139,14 @@
|
||||
<hr class="v-divider theme--light" />
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-for="(img, key) in data.images" :key="key">
|
||||
<img :src="'/'+img.path" style="width: 100%" />
|
||||
<v-flex xs12 md6 sm6 v-for="(file, key) in data.files" :key="key">
|
||||
<template v-if="file.file_type == 'document'">
|
||||
<a target="_blank" :href="'/'+file.path"><v-icon class="mr-2 caption">fas fa-check</v-icon>{{ file.file_name }}</a>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<img :src="'/'+file.path" style="width: 100%" />
|
||||
</template>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
|
||||
Reference in New Issue
Block a user