Commit fcbbb753 by e

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

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