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
fcbbb753
authored
Jun 09, 2020
by
e
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of gitlab.corp.qinqinxiaobao.com:frontend_vue/qqxb-self-service
parents
6b007941
ecd18f1d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
18 deletions
src/views/ChooseCompany.vue
src/views/SelectIdentity.vue
src/views/ChooseCompany.vue
View file @
fcbbb753
...
...
@@ -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
>
...
...
src/views/SelectIdentity.vue
View file @
fcbbb753
...
...
@@ -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
>
...
...
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