Commit 5775e840 by 展昭

getDispatchList

parent 0a7a72ee
...@@ -80,21 +80,26 @@ export default class Index extends Vue { ...@@ -80,21 +80,26 @@ export default class Index extends Vue {
private position: string = ""; private position: string = "";
private entry_date: string = ""; private entry_date: string = "";
private id_no: string = ""; private id_no: string = "";
private ed_id: string = "8"; private sp_id: string = "";
private ed_id: string = "";
created() { created() {
const id_no = this.$route.query.id_no as string; const id_no = this.$route.query.id_no as string;
this.id_no = window.atob(encodeURI(id_no)); this.id_no = window.atob(encodeURI(id_no));
let params={ this.sp_id = this.$route.query.sp_id as string;
spId:1,
idNo:this.$route.query.id_no let params = {
} spId: this.sp_id,
this.$server.EmployeeService.getDispatchInfo(params).then(res=>{ idNo: this.id_no
console.log(res) };
}).catch(error=>{
console.log(error) this.$server.EmployeeService.getDispatchInfo(params)
}) .then(res => {
console.log(res);
})
.catch(error => {
console.log(error);
});
} }
} }
</script> </script>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<p>可查看专项订单服务,使用职场小工具</p> <p>可查看专项订单服务,使用职场小工具</p>
</div> </div>
</a>--> </a>-->
<a class="si-child" id="dispatch-employee" @click="toIndex"> <a class="si-child" id="dispatch-employee" @click="toIndex_click">
<img src="../assets/images/agent/company-employee.png" alt /> <img src="../assets/images/agent/company-employee.png" alt />
<div class="si-child-desc"> <div class="si-child-desc">
<h4>我是派遣员工</h4> <h4>我是派遣员工</h4>
...@@ -37,17 +37,24 @@ export default class SelectIdentity extends Vue { ...@@ -37,17 +37,24 @@ export default class SelectIdentity extends Vue {
this.$router.push({ name: "FlexEmployee", query: { id_no: this.id_no } }); this.$router.push({ name: "FlexEmployee", query: { id_no: this.id_no } });
} }
private toIndex(): void { private toIndex(sp_id: string): void {
this.$router.push({ name: "Index", query: { id_no: this.id_no } }); this.$router.push({
name: "Index",
query: { id_no: this.id_no, sp_id: sp_id }
});
// this.$router.push({ name: "ChooseCompany", query: { id_no: this.id_no } }); // this.$router.push({ name: "ChooseCompany", query: { id_no: this.id_no } });
} }
private toIndex_click(): void {
const sp_id: string = "";
this.toIndex(sp_id);
}
async created() { async created() {
await this.$server.EmployeeService.getUserInfo({}) await this.$server.EmployeeService.getUserInfo({})
.then(res => { .then(res => {
if (res.data && res.data.uthStatus && res.data.uthStatus > 0) { if (res.data && res.data.uthStatus && res.data.uthStatus > 0) {
this.id_no = res.data.personalIdCardNo; this.id_no = res.data.personalIdCardNo;
console.log("this.id_no=", this.id_no);
} else { } else {
//TODO: 跳转到实名认证 //TODO: 跳转到实名认证
} }
...@@ -55,6 +62,13 @@ export default class SelectIdentity extends Vue { ...@@ -55,6 +62,13 @@ export default class SelectIdentity extends Vue {
.catch(err => { .catch(err => {
console.log("err=", err); console.log("err=", err);
}); });
this.$server.EmployeeService.getDispatchList({ idNo: this.id_no })
.then(res => {
console.log("getDispatchList res=", res);
})
.catch(err => {
console.log("err=", err);
});
} }
} }
</script> </script>
......
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