Commit 6cbd49d1 by cocomilk2012
parents 5aadb276 012856c6
......@@ -5,5 +5,7 @@ VUE_APP_BASE_URL= http://organization.test.hrs100.cn:18080
VUE_APP_USERINFO_URL=http://106.120.107.145:7778/v1/qqxb/user/api
VUE_APP_SALARY_URL=http://salary.test-api.qqxb.jinsehuaqin.com:8800
# https开关
VUE_APP_OPEN_HTTPS=false
......@@ -2,6 +2,40 @@
* 员工相关接口
*/
export interface EmployeeInterface {
<<<<<<< HEAD
getUserInfo(params: any): Promise<any>;
getCityList(params: any): Promise<any>; // 获取城市列表
getDispatchList(params: any): Promise<any>; //根据身份证获取用户所属派遣公司列表
getDispatchInfo(params: any): Promise<any>; //通过身份证号和派遣公司ID拿到派遣员工的信息(劳务派遣首页数据)
getWorkInfoList(params: any): Promise<any>; //获取工作信息列表
getWorkInfoDetail(params: any): Promise<any>; //获取工作信息详情
updateWorkInfo(params: any): Promise<any>; //修改工作信息
addWorkInfo(params: any): Promise<any>; //新增工作信息
deleteWorkInfo(params: any): Promise<any>; //新增工作信息
getPersonInfo(params: any): Promise<any>; //获取个人信息
savePersonInfo(params: any): Promise<any>; //保存个人信息
getContactInfo(params: any): Promise<any>; //获取联系信息
saveContactInfo(params: any): Promise<any>; //保存联系信息
getSocialInfo(params: any): Promise<any>; //获取社保信息
saveSocialInfo(params: any): Promise<any>; //保存社保信息
getWageCardInfo(params: any): Promise<any>; //获取工资卡信息
saveWageCardInfo(params: any): Promise<any>; //保存工资卡信息
getEduExperience(params: any): Promise<any>; //获取教育经历
getEduExperienceDetial(params: any): Promise<any>; //获取教育信息详情
addEduExperience(params: any): Promise<any>; //新增教育信息
updateEduExperience(params: any): Promise<any>; //修改教育信息
deleteEduExperience(params: any): Promise<any>; //删除教育信息
getTechnologyExperience(params: any): Promise<any>; //获取技术特长
updateTechnologyExperience(params: any): Promise<any>; //修改技术特长
getSalaryInfo(params: any): Promise<any>; //通过身份证号和派遣公司ID拿到派遣员工的工资条信息
getFiles(params:any):Promise<any>;// 获取文件
setFiles(params:any):Promise<any>;// 设置文件
delFiles(params:any):Promise<any>;// 删除文件
putFiles(params:any):Promise<any>;// 提交文件
tranFiles(params:any):Promise<any>;//上传文件转短连接
getAgileWorker(params: any): Promise<any>; //灵活用工
=======
getUserInfo(params: any): Promise<any>;
getCityList(params: any): Promise<any>; // 获取城市列表
getDispatchList(params: any): Promise<any>; //根据身份证获取用户所属派遣公司列表
......@@ -34,4 +68,5 @@ export interface EmployeeInterface {
putFiles(params: any): Promise<any>; // 提交文件
getAgileWorker(params: any): Promise<any>; //灵活用工
>>>>>>> 6bd7a7d232d6d1b182fc7cff1cd6136fd5df5b70
}
......@@ -11,7 +11,7 @@ class EmployeeService implements EmployeeInterface {
* 请求头信息
*/
private header: any;
private headerUp: any;
/**
* 当前版本
*/
......@@ -29,6 +29,7 @@ class EmployeeService implements EmployeeInterface {
// 获取登录token
store.getters.getAccessToken.then((res: any) => {
this.header = { Authorization: `Bearer ${res}` };
this.headerUp ={ Authorization: `Bearer ${res}`,'Content-Type':'multipart/form-data;charset=UTF-8'}
});
// store.getters.getUserInfo.then((res: any) => {
// // console.log(res);
......@@ -320,6 +321,16 @@ class EmployeeService implements EmployeeInterface {
/**
*
* base64转短连接
* @param params
*/
public tranFiles(params: any): Promise<any> {
let url = urls.salaryUrl + `/general/person/upload`;
return request.post(url, params, this.headerUp);
}
/**
*
* 提交文件
* @param params
*/
......
......@@ -9,10 +9,15 @@ class Urls {
employeeUrl: String = process.env.VUE_APP_BASE_URL;
/**
*
* 获取用户信息
*/
userInfoUrl: String = process.env.VUE_APP_USERINFO_URL;
/**
* 个人中心
*/
salaryUrl: String = process.env.VUE_APP_SALARY_URL;
}
......
......@@ -19,7 +19,7 @@
</van-uploader>
<div class="upload-detil">
<p>身份证首页</p>
<!-- <a :href="hrefIdFront" download="文件模板.txt">
<van-icon name="down" color="#5e6066" class="down" />
</a>-->
......@@ -444,261 +444,466 @@ export default class Information extends Vue {
// 身份证正面5
async afterRead5(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "5"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res);
// file.edfId="115"
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "5"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 身份证反面6
async afterRead6(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "6"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
// file.edfId="116"
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "6"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 毕业证照片7
async afterRead7(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "7"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "7"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 学位证照片8
async afterRead8(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "8"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "8"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 个人简历9
async afterRead9(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "9"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "9"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 上家公司离职证明10
async afterRead10(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "10"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "10"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 户口首页11
async afterRead11(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "11"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "11"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 户口本人页12
async afterRead12(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "12"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "12"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 入职登记表签字上传13
async afterRead13(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "13"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "13"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 银行卡照片14
async afterRead14(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "14"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "14"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 入职体检表15
async afterRead15(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "15"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "15"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 其他1 16
async afterRead16(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "16"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "16"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 其他2 17
async afterRead17(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "17"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "17"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 其他3 18
async afterRead18(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "18"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "18"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 其他4 19
async afterRead19(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "19"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "19"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 其他5 20
async afterRead20(file: any) {
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: file.content,
fileTypeId: "20"
}
};
this.$server.EmployeeService.setFiles(params)
let formdata = new FormData();
formdata.append("file", file.file);
this.$server.EmployeeService.tranFiles(formdata)
.then(res => {
Toast.success("保存成功");
console.log(res.data.url);
let params = {
edId: this.$route.query.ed_id,
req: {
attachment: res.data.url,
fileTypeId: "20"
}
};
console.log(params);
this.$server.EmployeeService.setFiles(params)
.then(res => {
Toast.success("保存成功");
console.log(res);
file.edfId = res.edfId;
})
.catch(error => {});
})
.catch(error => {});
.catch(error => {
});
}
// 删除文件
......@@ -725,12 +930,12 @@ export default class Information extends Vue {
window.location.href = href;
}
async downloadExcel(){
console.log(12313);
let a = document.createElement('a')
a.href ="http://file.qinqinxiaobao.com/1/20200612/6b3167ef-930f-4af7-8ded-3879a928341c.txt"
a.click();
}
// async downloadExcel(){
// console.log(12313);
// let a = document.createElement('a')
// a.href ="http://file.qinqinxiaobao.com/1/20200612/6b3167ef-930f-4af7-8ded-3879a928341c.txt"
// a.click();
// }
// 底部提交按钮
// updateContactInfo_click() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment