|
|
|
@ -45,7 +45,7 @@
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-model-item label="出生日期" prop="birthday">
|
|
|
|
|
<a-date-picker v-model="form.birthday" />
|
|
|
|
|
<a-date-picker v-model="form.birthday" value-format="YYYY-MM-DD HH:mm:ss"/>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
@ -72,15 +72,19 @@
|
|
|
|
|
:action="`${$upload}`"
|
|
|
|
|
:headers="uploadHeaders"
|
|
|
|
|
list-type="picture-card"
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
:file-list="idcardfileList"
|
|
|
|
|
@preview="handlePreview"
|
|
|
|
|
@change="handleChange"
|
|
|
|
|
@change="idcardhandleChange"
|
|
|
|
|
>
|
|
|
|
|
<div v-if="fileList.length < 2">
|
|
|
|
|
<a-icon type="plus" />
|
|
|
|
|
<div v-if="idcardfileList.length < 2">
|
|
|
|
|
<!-- <a-icon type="plus" /> -->
|
|
|
|
|
<a-icon :type="imgLoading ? 'loading' : 'plus'" />
|
|
|
|
|
<div class="ant-upload-text">点击上传</div>
|
|
|
|
|
</div>
|
|
|
|
|
</a-upload>
|
|
|
|
|
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
|
|
|
|
|
<img alt="example" style="width: 100%" :src="previewImage" />
|
|
|
|
|
</a-modal>
|
|
|
|
|
<span style="color: #00000073"
|
|
|
|
|
>单张最多不超过4M,最多上传2张,支持JPG,PNG格式</span
|
|
|
|
|
>
|
|
|
|
@ -162,7 +166,7 @@
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<div @click="u1pload">其他信息</div>
|
|
|
|
|
<div>其他信息</div>
|
|
|
|
|
<a-divider></a-divider>
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
@ -205,7 +209,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { insertManageUser,departmentList,uploadManageUserIdCard,manageUserInfo,EditManageUser } from "@/api/basic/department";
|
|
|
|
|
import { insertManageUser,departmentList,manageUserInfo,EditManageUser } from "@/api/basic/department";
|
|
|
|
|
import store from "@/store";
|
|
|
|
|
function getBase64(file) {
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
@ -238,12 +242,12 @@ export default {
|
|
|
|
|
this.form.idCard = data.idCard
|
|
|
|
|
this.form.tel = data.tel
|
|
|
|
|
this.telephoneNum = data.tel
|
|
|
|
|
// this.form.birthday = this.formatDate(data.birthday/1000,'yyyy-MM-dd hh:mm:ss')
|
|
|
|
|
this.form.birthday = data.birthday
|
|
|
|
|
this.form.password = data.password
|
|
|
|
|
this.form.email = data.email
|
|
|
|
|
this.form.address = data.address
|
|
|
|
|
this.form.idCardImgUrls = data.idCardImgUrls
|
|
|
|
|
// this.form.entryDate = this.formatDate(data.entryDate/1000,'yyyy-MM-dd hh:mm:ss')
|
|
|
|
|
this.form.entryDate = data.entryDate
|
|
|
|
|
this.form.salary = data.salary
|
|
|
|
|
this.form.emergencyContact = data.emergencyContact
|
|
|
|
|
this.form.emergencyContactNumber = data.emergencyContactNumber
|
|
|
|
@ -272,12 +276,12 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
previewVisible: false,
|
|
|
|
|
previewImage: "",
|
|
|
|
|
imgLoading: false,
|
|
|
|
|
treeData:[],
|
|
|
|
|
cascVal:[],
|
|
|
|
|
telephoneNum:"",
|
|
|
|
|
uploadHeaders: {
|
|
|
|
|
"manage-login-token": store.getters.getToken,
|
|
|
|
|
'Content-Type': 'multipart/form-data'
|
|
|
|
|
},
|
|
|
|
|
sexOption: [
|
|
|
|
|
{
|
|
|
|
@ -303,7 +307,7 @@ export default {
|
|
|
|
|
password: "",
|
|
|
|
|
email: "",
|
|
|
|
|
address: "",
|
|
|
|
|
idCardImgUrls: "",
|
|
|
|
|
idCardImgUrls: [],
|
|
|
|
|
departmentId: "",
|
|
|
|
|
departmentIdPath: "",
|
|
|
|
|
positionId: "",
|
|
|
|
@ -335,7 +339,8 @@ export default {
|
|
|
|
|
{ required: true, message: "请选择入职时间", trigger: "change" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
fileList: [],
|
|
|
|
|
idcardfileList: [],
|
|
|
|
|
fileList:[]
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
@ -407,13 +412,13 @@ export default {
|
|
|
|
|
handleCancel() {
|
|
|
|
|
this.previewVisible = false;
|
|
|
|
|
},
|
|
|
|
|
handleChange({ fileList }) {
|
|
|
|
|
this.fileList = fileList;
|
|
|
|
|
},
|
|
|
|
|
u1pload(){
|
|
|
|
|
uploadManageUserIdCard().then((res) => {console.log(res);})
|
|
|
|
|
idcardhandleChange(info) {
|
|
|
|
|
this.idcardfileList = info.fileList
|
|
|
|
|
if(info.file.status === 'done'){
|
|
|
|
|
this.form.idCardImgUrls.push(info.file.response.data)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|