Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
frontend
/
qqxb-self-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
affbeb43
authored
Jun 16, 2020
by
展昭
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
3e8ed6ae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
28 deletions
README.md
src/views/ChooseCompany.vue
src/views/SelectIdentity.vue
README.md
View file @
affbeb43
...
...
@@ -27,3 +27,7 @@ yarn run lint
### Customize configuration
See
[
Configuration Reference
](
https://cli.vuejs.org/config/
)
.
必要参数
authcode
\ No newline at end of file
src/views/ChooseCompany.vue
View file @
affbeb43
<
template
>
<div
class=
"main main-company"
id=
"main_company"
>
<div
class=
"company-item-box"
>
<p
class=
"company-name"
coId=
"id"
></p>
<div
class=
"company-item-box"
v-for=
"(item,index) in dispatch_list"
:key=
"index"
>
<p
class=
"company-name"
@
click=
"toCompany_click(item.id)"
>
{{
item
.
fullName
}}
</p>
<img
src=
"../assets/images/right_arrow.png"
alt=
"进入派遣公司"
title=
"进入派遣公司"
/>
</div>
</div>
</
template
>
...
...
@@ -21,25 +25,35 @@ import { Component } from "vue-property-decorator";
})
export
default
class
workInfo
extends
Vue
{
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();
// }
private
id_no_encrytion
:
any
=
""
;
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
=>
{
console
.
log
(
"res="
,
res
);
this
.
dispatch_list
=
res
;
})
.
catch
(
err
=>
{
console
.
log
(
"err="
,
err
);
});
}
private
async
toCompany_click
(
id
:
string
)
{
this
.
$router
.
push
({
name
:
"Index"
,
query
:
{
id_no
:
this
.
id_no_encrytion
,
sp_id
:
id
}
});
}
created
()
{
this
.
id_no_encrytion
=
this
.
$route
.
query
.
id_no
;
console
.
log
(
this
.
id_no_encrytion
);
this
.
getDispatchList
();
}
}
</
script
>
...
...
src/views/SelectIdentity.vue
View file @
affbeb43
...
...
@@ -7,7 +7,7 @@
<p>
可查看专项订单服务,使用职场小工具
</p>
</div>
</a>
-->
<a
class=
"si-child"
id=
"dispatch-employee"
@
click=
"toIndex_click"
>
<a
v-if=
"company_num>0"
class=
"si-child"
id=
"dispatch-employee"
@
click=
"toIndex_click"
>
<img
src=
"../assets/images/agent/dispatch-employee.png"
alt
/>
<div
class=
"si-child-desc"
>
<h4>
我是派遣员工
</h4>
...
...
@@ -38,6 +38,10 @@ export default class SelectIdentity extends Vue {
return
encodeURI
(
window
.
btoa
(
this
.
id_no
));
}
get
company_num
():
number
{
return
this
.
dispatch_list
.
length
;
}
private
toFlex
():
void
{
this
.
$router
.
push
({
name
:
"FlexEmployee"
,
...
...
@@ -50,7 +54,6 @@ export default class SelectIdentity extends Vue {
name
:
"Index"
,
query
:
{
id_no
:
this
.
id_no_encrytion
,
sp_id
:
sp_id
}
});
// this.$router.push({ name: "ChooseCompany", query: { id_no: this.id_no } });
}
private
ChooseCompany
()
{
...
...
@@ -61,13 +64,11 @@ export default class SelectIdentity extends Vue {
}
private
toIndex_click
():
void
{
console
.
log
(
this
.
dispatch_list
);
if
(
this
.
dispatch_list
&&
this
.
dispatch_list
.
length
>
1
)
{
if
(
this
.
company_num
>
1
)
{
this
.
ChooseCompany
();
}
if
(
this
.
dispatch_list
&&
this
.
dispatch_list
.
length
==
1
)
{
if
(
this
.
company_num
==
1
)
{
const
sp_id
:
string
=
this
.
dispatch_list
[
0
].
id
as
string
;
this
.
toIndex
(
sp_id
);
}
...
...
@@ -77,7 +78,6 @@ export default class SelectIdentity extends Vue {
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: 跳转到实名认证
...
...
@@ -88,6 +88,7 @@ export default class SelectIdentity extends Vue {
console
.
log
(
"err="
,
err
);
});
}
private
async
getDispatchList
()
{
await
this
.
$server
.
EmployeeService
.
getDispatchList
({
idNo
:
this
.
id_no
})
.
then
(
res
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment