Commit fcbbb753 by e

Merge branch 'master' of gitlab.corp.qinqinxiaobao.com:frontend_vue/qqxb-self-service

parents 6b007941 ecd18f1d
...@@ -11,23 +11,35 @@ ...@@ -11,23 +11,35 @@
<script lang="ts"> <script lang="ts">
import "../assets/css/labor.css"; import "../assets/css/labor.css";
import Vue from "vue"; import Vue from "vue";
import { Icon } from 'vant'; import { Icon } from "vant";
import { Component } from "vue-property-decorator"; import { Component } from "vue-property-decorator";
@Component({ @Component({
components:{ components: {
[Icon.name]: Icon [Icon.name]: Icon
} }
}) })
export default class workInfo extends Vue { export default class workInfo extends Vue {
created() { private dispatch_list: any[] = [];
let params = { private id_no_encrytion: string = this.$route.query.id_no as string;
idNo: this.$route.query.idNo
}; // get id_no():string{
this.$server.EmployeeService.getDispatchList(params).then(res => { // return window.atob(decodeURI(this.id_no_encrytion));
console.log(res); // }
});
} // private async getDispatchList() {
// await this.$server.EmployeeService.getDispatchList({ idNo: this.id_no })
// .then(res => {
// this.dispatch_list = res;
// })
// .catch(err => {
// console.log("err=", err);
// });
// }
// created() {
// //this.getDispatchList();
// }
} }
</script> </script>
......
...@@ -32,44 +32,78 @@ import { Component, Vue } from "vue-property-decorator"; ...@@ -32,44 +32,78 @@ import { Component, Vue } from "vue-property-decorator";
}) })
export default class SelectIdentity extends Vue { export default class SelectIdentity extends Vue {
private id_no: string = ""; private id_no: string = "";
private dispatch_list: any[] = [];
get id_no_encrytion(): string {
return encodeURI(window.btoa(this.id_no));
}
private toFlex(): void { private toFlex(): void {
this.$router.push({ name: "FlexEmployee", query: { id_no: this.id_no } }); this.$router.push({
name: "FlexEmployee",
query: { id_no: this.id_no_encrytion }
});
} }
private toIndex(sp_id: string): void { private toIndex(sp_id: string): void {
this.$router.push({ this.$router.push({
name: "Index", name: "Index",
query: { id_no: this.id_no, sp_id: sp_id } query: { id_no: this.id_no_encrytion, 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 ChooseCompany() {
this.$router.push({
name: "ChooseCompany",
query: { id_no: this.id_no_encrytion }
});
}
private toIndex_click(): void { private toIndex_click(): void {
const sp_id: string = ""; this.ChooseCompany();
this.toIndex(sp_id); // if (this.dispatch_list && this.dispatch_list.length > 1) {
// this.ChooseCompany();
// }
// if (this.dispatch_list && this.dispatch_list.length == 1) {
// const sp_id: string = this.dispatch_list[0].id as string;
// this.toIndex(sp_id);
// }
} }
async created() { private async getUserInfo() {
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) {
console.log("2", res.data.personalIdCardNo);
this.id_no = res.data.personalIdCardNo; this.id_no = res.data.personalIdCardNo;
} else { } else {
//TODO: 跳转到实名认证 //TODO: 跳转到实名认证
console.log("跳转到实名认证", res);
} }
}) })
.catch(err => { .catch(err => {
console.log("err=", err); console.log("err=", err);
}); });
this.$server.EmployeeService.getDispatchList({ idNo: this.id_no }) }
private async getDispatchList() {
await this.$server.EmployeeService.getDispatchList({ idNo: this.id_no })
.then(res => { .then(res => {
console.log("getDispatchList res=", res); console.log("getDispatchList res=", res);
this.dispatch_list = res;
}) })
.catch(err => { .catch(err => {
console.log("err=", err); console.log("err=", err);
}); });
} }
async created() {
await this.getUserInfo();
if (this.id_no) {
await this.getDispatchList();
}
}
} }
</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