multi file upload 1401-03-24
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "dragbleUpload"
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -10,7 +10,7 @@ export const printWindow = (innerHTML = document.getElementById('printContent')
|
|||||||
|
|
||||||
// Open the print window
|
// Open the print window
|
||||||
const WinPrint = window.open('', '', 'left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0')
|
const WinPrint = window.open('', '', 'left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0')
|
||||||
WinPrint.document.write('<!DOCTYPE html><html><head>' +
|
WinPrint.document.write('<!DOCTYPE html><html dir="rtl"><head>' +
|
||||||
stylesHtml +
|
stylesHtml +
|
||||||
'<title>چاپ اطلاعات</title>' +
|
'<title>چاپ اطلاعات</title>' +
|
||||||
'</head><body>' +
|
'</head><body>' +
|
||||||
@@ -20,8 +20,8 @@ export const printWindow = (innerHTML = document.getElementById('printContent')
|
|||||||
WinPrint.document.close()
|
WinPrint.document.close()
|
||||||
WinPrint.focus()
|
WinPrint.focus()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// WinPrint.print()
|
WinPrint.print()
|
||||||
// WinPrint.close()
|
WinPrint.close()
|
||||||
}, 600)
|
}, 600)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -343,7 +343,7 @@
|
|||||||
<div>تاریخ به روز رسانی : {{ personalInformation.uaj }}</div>
|
<div>تاریخ به روز رسانی : {{ personalInformation.uaj }}</div>
|
||||||
<div>شغل متقاضی : {{ personalInformation.job_title }}</div>
|
<div>شغل متقاضی : {{ personalInformation.job_title }}</div>
|
||||||
<div>نام پدر : {{ personalInformation.father_name }}</div>
|
<div>نام پدر : {{ personalInformation.father_name }}</div>
|
||||||
<div>تاریخ تولد : {{ personalInformation.birth_date }}</div>
|
<div>تاریخ تولد : {{ personalInformation.birth_date | jdate }}</div>
|
||||||
<div>جنسیت : {{ personalInformation.gender_str }}</div>
|
<div>جنسیت : {{ personalInformation.gender_str }}</div>
|
||||||
<div>وضعیت تاهل : {{ personalInformation.marriage_sts_str }}</div>
|
<div>وضعیت تاهل : {{ personalInformation.marriage_sts_str }}</div>
|
||||||
<div>شماره شناسنامه : {{ personalInformation.iden_id }}</div>
|
<div>شماره شناسنامه : {{ personalInformation.iden_id }}</div>
|
||||||
@@ -967,7 +967,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
prsonalFileList: [],
|
prsonalFileList: [],
|
||||||
file_id: undefined,
|
file_ids: [],
|
||||||
showMosahebeModal: false,
|
showMosahebeModal: false,
|
||||||
showInformationModal: false,
|
showInformationModal: false,
|
||||||
showAddMosahebeModal: false,
|
showAddMosahebeModal: false,
|
||||||
@@ -1041,12 +1041,13 @@ export default {
|
|||||||
},
|
},
|
||||||
fileUpload({fileList, event, file}) {
|
fileUpload({fileList, event, file}) {
|
||||||
if (file.response && file.response.id) {
|
if (file.response && file.response.id) {
|
||||||
this.file_id = file.response.id;
|
this.file_ids = fileList.map(x => x.id || x.response.id)
|
||||||
}
|
}
|
||||||
this.prsonalFileList = fileList;
|
this.prsonalFileList = fileList;
|
||||||
},
|
/*if (file.response && file.response.id) {
|
||||||
fileRemove() {
|
this.file_id = file.response.id;
|
||||||
this.file_id = null
|
}
|
||||||
|
this.prsonalFileList = fileList;*/
|
||||||
},
|
},
|
||||||
showAddMosahebe(id) {
|
showAddMosahebe(id) {
|
||||||
this.showAddMosahebeModal = true;
|
this.showAddMosahebeModal = true;
|
||||||
@@ -1130,12 +1131,19 @@ export default {
|
|||||||
this.current--;
|
this.current--;
|
||||||
},
|
},
|
||||||
async showDetails(record) {
|
async showDetails(record) {
|
||||||
if (record.file) {
|
console.clear()
|
||||||
console.log("%c yess", "color:blue")
|
console.log(record)
|
||||||
this.file_id = record.file.id
|
if (record.file_ids) {
|
||||||
this.prsonalFileList.push(
|
this.file_ids = record.file_ids
|
||||||
{uid: record.file.id, name: record.file.filename, status: 'done', url: record.file.storage}
|
this.prsonalFileList = record.file_list.map(x => {
|
||||||
)
|
return {
|
||||||
|
uid: x.id,
|
||||||
|
id: x.id,
|
||||||
|
name: x.filename,
|
||||||
|
status: 'done',
|
||||||
|
url: x.storage
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|||||||
@@ -270,7 +270,7 @@
|
|||||||
<a-row>
|
<a-row>
|
||||||
<a-form-item label="تلفن ثابت">
|
<a-form-item label="تلفن ثابت">
|
||||||
<input class="ant-input" autocomplete="off"
|
<input class="ant-input" autocomplete="off"
|
||||||
v-decorator="['phone',{initialValue: null,rules: [{ required: true, message: 'تلفن ثابت را وارد نمایید' },{pattern:/^((\+98|0098|98|0)\d{2})?\d{8}$/g,message:'تلفن وارد شده معتبر نیست.'}]}]">
|
v-decorator="['phone',{initialValue: null,rules: [{ required: false, message: 'تلفن ثابت را وارد نمایید' },{pattern:/^((\+98|0098|98|0)\d{2})?\d{8}$/g,message:'تلفن وارد شده معتبر نیست.'}]}]">
|
||||||
<!--<feather-icon style="direction: ltr !important;" icon="PhoneIcon" slot="addonAfter" class="pt-1" svgClasses="w-5 h-5" />-->
|
<!--<feather-icon style="direction: ltr !important;" icon="PhoneIcon" slot="addonAfter" class="pt-1" svgClasses="w-5 h-5" />-->
|
||||||
<!-- </a-input>-->
|
<!-- </a-input>-->
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -285,7 +285,7 @@
|
|||||||
<a-row>
|
<a-row>
|
||||||
<a-form-item label="تلفن ضروری">
|
<a-form-item label="تلفن ضروری">
|
||||||
<input class="ant-input" style="direction: rtl !important;"
|
<input class="ant-input" style="direction: rtl !important;"
|
||||||
v-decorator="['phone_emergency',{initialValue: null,rules: [{ required: true, message: 'تلفن ضروری را وارد نمایید' },{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},{max: 11,message:'تلفن ضروری حد اکثر 11 رقم است'}]}]">
|
v-decorator="['phone_emergency',{initialValue: null,rules: [{ required: false, message: 'تلفن ضروری را وارد نمایید' },{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},{max: 11,message:'تلفن ضروری حد اکثر 11 رقم است'}]}]">
|
||||||
<!-- <feather-icon style="direction: ltr !important;" icon="MailIcon" slot="addonAfter" class="pt-1" svgClasses="w-5 h-5" />-->
|
<!-- <feather-icon style="direction: ltr !important;" icon="MailIcon" slot="addonAfter" class="pt-1" svgClasses="w-5 h-5" />-->
|
||||||
<!-- </a-input>-->
|
<!-- </a-input>-->
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -524,12 +524,11 @@
|
|||||||
|
|
||||||
<div class="dropbox">
|
<div class="dropbox">
|
||||||
<a-upload-dragger
|
<a-upload-dragger
|
||||||
:multiple="false"
|
:multiple="true"
|
||||||
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
|
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:default-file-list="fileList"
|
:default-file-list="fileList"
|
||||||
@change="changeDocumentUpload"
|
@change="changeDocumentUpload"
|
||||||
:remove="handleRemoveDocument"
|
|
||||||
>
|
>
|
||||||
<p class="ant-upload-drag-icon">
|
<p class="ant-upload-drag-icon">
|
||||||
<a-icon type="inbox"/>
|
<a-icon type="inbox"/>
|
||||||
@@ -814,7 +813,7 @@ export default {
|
|||||||
marriage_sts: 1,
|
marriage_sts: 1,
|
||||||
},
|
},
|
||||||
fileList: [],
|
fileList: [],
|
||||||
file_id: undefined,
|
file_ids: [],
|
||||||
current: 0,
|
current: 0,
|
||||||
from: this.$form.createForm(this, {name: 'coordinated'}),
|
from: this.$form.createForm(this, {name: 'coordinated'}),
|
||||||
formEdu: this.$form.createForm(this, {name: 'coordinated'}),
|
formEdu: this.$form.createForm(this, {name: 'coordinated'}),
|
||||||
@@ -860,6 +859,8 @@ export default {
|
|||||||
this.formWork.resetFields()
|
this.formWork.resetFields()
|
||||||
this.formFirst.resetFields()
|
this.formFirst.resetFields()
|
||||||
this.current = 0
|
this.current = 0
|
||||||
|
this.birth_day = ''
|
||||||
|
this.fileList = []
|
||||||
},
|
},
|
||||||
setMarriage_sts(event) {
|
setMarriage_sts(event) {
|
||||||
this.flags.marriage_sts = event.target.value
|
this.flags.marriage_sts = event.target.value
|
||||||
@@ -867,15 +868,12 @@ export default {
|
|||||||
setGender(event) {
|
setGender(event) {
|
||||||
this.flags.gender = event.target.value
|
this.flags.gender = event.target.value
|
||||||
},
|
},
|
||||||
changeDocumentUpload({fileList, event, file}) {
|
changeDocumentUpload({fileList, file}) {
|
||||||
if (file.response && file.response.id) {
|
if (file.response && file.response.id) {
|
||||||
this.file_id = file.response.id;
|
this.file_ids = fileList.map(x => x.response.id)
|
||||||
}
|
}
|
||||||
this.fileList = fileList;
|
this.fileList = fileList;
|
||||||
},
|
},
|
||||||
handleRemoveDocument() {
|
|
||||||
this.file_id = null
|
|
||||||
},
|
|
||||||
|
|
||||||
deleteCity(index) {
|
deleteCity(index) {
|
||||||
this.jobsList.splice(index, 1);
|
this.jobsList.splice(index, 1);
|
||||||
@@ -917,7 +915,7 @@ export default {
|
|||||||
values.model = this.formFirst.getFieldsValue();
|
values.model = this.formFirst.getFieldsValue();
|
||||||
values.birth_date = this.birth_day;
|
values.birth_date = this.birth_day;
|
||||||
values.work = this.work;
|
values.work = this.work;
|
||||||
values.file_id = this.file_id;
|
values.file_ids = this.file_ids;
|
||||||
values.training = this.educational;
|
values.training = this.educational;
|
||||||
values.academic = this.edu;
|
values.academic = this.edu;
|
||||||
values.family = this.family;
|
values.family = this.family;
|
||||||
|
|||||||
Reference in New Issue
Block a user