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
70e36a68
authored
Jun 23, 2020
by
cocomilk2012
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
工资条列表页
工资条详情页接口报错
parent
59acd45e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
197 additions
and
243 deletions
src/servicesImpl/employee/employeeImpl.ts
src/utils/method.ts
src/views/Home.vue
src/views/PaySlips.vue
src/servicesImpl/employee/employeeImpl.ts
View file @
70e36a68
...
@@ -274,8 +274,8 @@ class EmployeeService implements EmployeeInterface {
...
@@ -274,8 +274,8 @@ class EmployeeService implements EmployeeInterface {
public
getSalaryInfo
(
params
:
any
):
Promise
<
any
>
{
public
getSalaryInfo
(
params
:
any
):
Promise
<
any
>
{
let
url
=
let
url
=
urls
.
employeeUrl
+
urls
.
employeeUrl
+
`/api/user/dispatch/companies/
${
params
.
idNo
}
/employee/
${
params
.
spId
}
/payroll`
;
`/api/user/dispatch/companies/
${
params
.
spId
}
/employee/
${
params
.
idNo
}
/payroll`
;
return
request
.
get
(
url
,
params
,
this
.
header
);
return
request
.
get
(
url
,
{},
this
.
header
,
false
);
}
}
/**
/**
...
...
src/utils/method.ts
View file @
70e36a68
import
http
from
'./http'
;
import
http
from
'./http'
;
import
{
GetCommonPms
}
from
'@/utils/public'
;
import
{
GetCommonPms
}
from
'@/utils/public'
;
class
Request
{
class
Request
{
/**
/**
* GET 请求
* GET 请求
* @param url 请求链接
* @param url 请求链接
* @param params 请求参数
* @param params 请求参数
* @param headers 请求头信息
* @param headers 请求头信息
*/
*/
public
get
(
public
get
(
url
:
string
,
params
:
any
=
{},
headers
:
any
=
{}):
Promise
<
any
>
{
url
:
string
,
return
new
Promise
((
resolve
,
reject
)
=>
{
params
:
any
=
{},
resolve
(
http
.
get
(
`
${
url
}
?
${
GetCommonPms
()}
`
,
{
headers
:
any
=
{},
params
:
params
,
special
:
boolean
=
false
headers
:
headers
):
Promise
<
any
>
{
}));
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
(
http
.
get
(
`
${
url
}
?
${
GetCommonPms
(
special
)}
`
,
{
params
:
params
,
headers
:
headers
,
})
})
}
);
});
}
/**
/**
*
*
* POST 请求
* POST 请求
* @param url 请求链接
* @param url 请求链接
* @param params 请求参数
* @param params 请求参数
* @param headers 请求头信息
* @param headers 请求头信息
*/
*/
public
post
(
url
:
string
,
params
:
any
=
{},
headers
:
any
=
{},
special
:
boolean
=
false
)
{
public
post
(
return
new
Promise
((
resolve
,
reject
)
=>
{
url
:
string
,
resolve
(
http
.
post
(
`
${
url
}
?
${
GetCommonPms
(
special
)}
`
,
params
,
{
headers
:
headers
}));
params
:
any
=
{},
headers
:
any
=
{},
special
:
boolean
=
false
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
(
http
.
post
(
`
${
url
}
?
${
GetCommonPms
(
special
)}
`
,
params
,
{
headers
:
headers
,
})
})
}
);
});
}
/**
*
* PUT 请求
* @param url 请求链接
* @param params 请求参数
* @param headers 请求头信息
*/
public
put
(
url
:
string
,
params
:
any
=
{},
headers
:
any
=
{})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
(
http
.
put
(
`
${
url
}
?
${
GetCommonPms
()}
`
,
params
,
{
headers
:
headers
})
);
});
}
/**
/**
*
*
* PUT 请求
* DELETE 请求
* @param url 请求链接
* @param url 请求链接
* @param params 请求参数
* @param params 请求参数
* @param headers 请求头信息
* @param headers 请求头信息
*/
*/
public
put
(
url
:
string
,
params
:
any
=
{},
headers
:
any
=
{})
{
public
delete
(
url
:
string
,
params
:
any
=
{},
headers
:
any
=
{})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
(
http
.
put
(
`
${
url
}
?
${
GetCommonPms
()}
`
,
params
,
{
headers
:
headers
}));
resolve
(
http
.
delete
(
`
${
url
}
?
${
GetCommonPms
()}
`
,
{
params
:
params
,
headers
:
headers
,
})
})
}
);
});
/**
}
*
* DELETE 请求
* @param url 请求链接
* @param params 请求参数
* @param headers 请求头信息
*/
public
delete
(
url
:
string
,
params
:
any
=
{},
headers
:
any
=
{})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
(
http
.
delete
(
`
${
url
}
?
${
GetCommonPms
()}
`
,
{
params
:
params
,
headers
:
headers
}));
})
}
}
}
export
default
new
Request
();
export
default
new
Request
();
\ No newline at end of file
src/views/Home.vue
deleted
100644 → 0
View file @
59acd45e
<
template
>
<div
class=
"home"
>
<img
alt=
"Vue logo"
src=
"../assets/logo.png"
/>
</div>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
"vue"
;
import
{
Component
}
from
"vue-property-decorator"
;
import
{
formatDate
,
CheckPlatform
}
from
"@/utils/public"
;
@
Component
({
name
:
"Home"
,
components
:
{}
})
export
default
class
Home
extends
Vue
{
private
list
:
any
=
[];
created
()
{
this
.
$server
.
EmployeeService
.
getUserInfo
({}).
then
(
res
=>
{
console
.
log
(
res
);
});
}
}
</
script
>
\ No newline at end of file
src/views/PaySlips.vue
View file @
70e36a68
This diff is collapsed.
Click to expand it.
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