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
47043396
authored
Jun 24, 2020
by
xws
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
9aed871f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
251 additions
and
27 deletions
.env.development
package-lock.json
src/services/employee/employeeService.ts
src/servicesImpl/employee/employeeImpl.ts
src/utils/urls.ts
src/views/Information.vue
.env.development
View file @
47043396
...
...
@@ -5,5 +5,7 @@ VUE_APP_BASE_URL= http://organization.test.hrs100.cn:18080
VUE_APP_USERINFO_URL=http://106.120.107.145:7778/v1/qqxb/user/api
VUE_APP_SALARY_URL=http://salary.test-api.qqxb.jinsehuaqin.com:8800
# https开关
VUE_APP_OPEN_HTTPS=false
package-lock.json
View file @
47043396
...
...
@@ -7144,7 +7144,8 @@
"version"
:
"2.2.2"
,
"resolved"
:
"https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz"
,
"integrity"
:
"sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg=="
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
"pify"
:
{
"version"
:
"4.0.1"
,
...
...
src/services/employee/employeeService.ts
View file @
47043396
...
...
@@ -31,7 +31,7 @@ export interface EmployeeInterface {
setFiles
(
params
:
any
):
Promise
<
any
>
;
// 设置文件
delFiles
(
params
:
any
):
Promise
<
any
>
;
// 删除文件
putFiles
(
params
:
any
):
Promise
<
any
>
;
// 提交文件
tranFiles
(
params
:
any
):
Promise
<
any
>
;
//上传文件转短连接
getAgileWorker
(
params
:
any
):
Promise
<
any
>
;
//灵活用工
}
src/servicesImpl/employee/employeeImpl.ts
View file @
47043396
...
...
@@ -11,7 +11,7 @@ class EmployeeService implements EmployeeInterface {
* 请求头信息
*/
private
header
:
any
;
private
headerUp
:
any
;
/**
* 当前版本
*/
...
...
@@ -29,6 +29,7 @@ class EmployeeService implements EmployeeInterface {
// 获取登录token
store
.
getters
.
getAccessToken
.
then
((
res
:
any
)
=>
{
this
.
header
=
{
Authorization
:
`Bearer
${
res
}
`
};
this
.
headerUp
=
{
Authorization
:
`Bearer
${
res
}
`
,
'Content-Type'
:
'multipart/form-data;charset=UTF-8'
}
});
// store.getters.getUserInfo.then((res: any) => {
// // console.log(res);
...
...
@@ -310,6 +311,16 @@ class EmployeeService implements EmployeeInterface {
/**
*
* base64转短连接
* @param params
*/
public
tranFiles
(
params
:
any
):
Promise
<
any
>
{
let
url
=
urls
.
salaryUrl
+
`/general/person/upload`
;
return
request
.
post
(
url
,
params
,
this
.
headerUp
);
}
/**
*
* 提交文件
* @param params
*/
...
...
src/utils/urls.ts
View file @
47043396
...
...
@@ -9,10 +9,15 @@ class Urls {
employeeUrl
:
String
=
process
.
env
.
VUE_APP_BASE_URL
;
/**
*
* 获取用户信息
*/
userInfoUrl
:
String
=
process
.
env
.
VUE_APP_USERINFO_URL
;
/**
* 个人中心
*/
salaryUrl
:
String
=
process
.
env
.
VUE_APP_SALARY_URL
;
}
...
...
src/views/Information.vue
View file @
47043396
...
...
@@ -444,261 +444,466 @@ export default class Information extends Vue {
// 身份证正面5
async
afterRead5
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"5"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
// file.edfId="115"
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 身份证反面6
async
afterRead6
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"6"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
// file.edfId="116"
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 毕业证照片7
async
afterRead7
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"7"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 学位证照片8
async
afterRead8
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"8"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 个人简历9
async
afterRead9
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"9"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 上家公司离职证明10
async
afterRead10
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"10"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 户口首页11
async
afterRead11
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"11"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 户口本人页12
async
afterRead12
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"12"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 入职登记表签字上传13
async
afterRead13
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"13"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 银行卡照片14
async
afterRead14
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"14"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 入职体检表15
async
afterRead15
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"15"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 其他1 16
async
afterRead16
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"16"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 其他2 17
async
afterRead17
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"17"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 其他3 18
async
afterRead18
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"18"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 其他4 19
async
afterRead19
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"19"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 其他5 20
async
afterRead20
(
file
:
any
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
file
);
this
.
$server
.
EmployeeService
.
tranFiles
(
formdata
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
.
url
);
let
params
=
{
edId
:
this
.
$route
.
query
.
ed_id
,
req
:
{
attachment
:
file
.
content
,
attachment
:
res
.
data
.
url
,
fileTypeId
:
"20"
}
};
console
.
log
(
params
);
this
.
$server
.
EmployeeService
.
setFiles
(
params
)
.
then
(
res
=>
{
Toast
.
success
(
"保存成功"
);
console
.
log
(
res
);
file
.
edfId
=
res
.
edfId
;
})
.
catch
(
error
=>
{});
})
.
catch
(
error
=>
{
});
}
// 删除文件
...
...
@@ -725,12 +930,12 @@ export default class Information extends Vue {
window
.
location
.
href
=
href
;
}
async
downloadExcel
(){
console
.
log
(
12313
);
let
a
=
document
.
createElement
(
'a'
)
a
.
href
=
"http://file.qinqinxiaobao.com/1/20200612/6b3167ef-930f-4af7-8ded-3879a928341c.txt"
a
.
click
();
}
//
async downloadExcel(){
//
console.log(12313);
//
let a = document.createElement('a')
//
a.href ="http://file.qinqinxiaobao.com/1/20200612/6b3167ef-930f-4af7-8ded-3879a928341c.txt"
//
a.click();
//
}
// 底部提交按钮
// updateContactInfo_click() {
...
...
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