Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
recruiting-management
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
recruiting-management
Commits
9b1a2ee6
Commit
9b1a2ee6
authored
Oct 14, 2019
by
zhangderong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PDF展示原件测试
parent
09add4c6
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
47726 additions
and
197 deletions
+47726
-197
resume.server.js
src/api/resume.server.js
+14
-0
interview.vue
src/page/interview/interview.vue
+3
-2
allResume.vue
src/page/resume/allResume.vue
+1
-1
channel.vue
src/page/resume/channel.vue
+1
-1
resumeDetail.vue
src/page/resume/resumeDetail.vue
+296
-182
QRcode.vue
src/page/system/QRcode.vue
+8
-1
upload.vue
src/page/upload/upload.vue
+10
-9
index.js
src/router/index.js
+0
-1
pdf.js
static/pdf/pdf.js
+8021
-0
pdf.worker.js
static/pdf/pdf.worker.js
+39372
-0
No files found.
src/api/resume.server.js
View file @
9b1a2ee6
...
...
@@ -131,4 +131,18 @@ export function forwardResume(params) {
'
Content-Type
'
:
'
application/json
'
}})
}
export
function
getPdf
(
parmars
)
{
return
axios
.
get
(
`
${
sapi
}
/api/resume/getResumePdfByResumeId/
${
parmars
.
uid
}
`
,{
responseType
:
'
arraybuffer
'
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
}
})
}
// 是否展示原件的PDF
export
function
isShowPDF
(
parmars
)
{
return
axios
.
get
(
`
${
sapi
}
/api/resume//isShowOriPdf/
${
parmars
.
uid
}
`
,
{
headers
:
{
'
Content-Type
'
:
'
application/json
'
}})
}
src/page/interview/interview.vue
View file @
9b1a2ee6
...
...
@@ -15,12 +15,12 @@
<span
style=
"margin-left:10px;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;display:inline-block;cursor:pointer"
@
click=
"Seedetail(item.id, item.uid,item.flowStatus)"
>
{{
item
.
ownerName
}}
|
</span>
<span
@
click=
"Seedetail(item.id, item.uid ,item.flowStatus)"
style=
"overflow: hidden;text-overflow:ellipsis;white-space: nowrap;display:inline-block;cursor:pointer"
>
{{
item
.
ownerMobile
}}
|
</span>
<span
@
click=
"Seedetail(item.id, item.uid,item.flowStatus)"
style=
"overflow: hidden;text-overflow:ellipsis;white-space: nowrap;display:inline-block;width:20%;cursor:pointer"
>
{{
item
.
ownerExpectTitles
}}
</span>
<span
style=
"color:#2d8cf0;float:right;margin-right:
35px
;cursor:pointer"
@
click=
"updateInterview(item.id,item.interviewerName,item.seeTime,item.inviterName)"
>
更改约面信息
</span>
<span
style=
"color:#2d8cf0;float:right;margin-right:
5%
;cursor:pointer"
@
click=
"updateInterview(item.id,item.interviewerName,item.seeTime,item.inviterName)"
>
更改约面信息
</span>
</p>
<p
style=
"margin-top:8px;color:Grey"
>
<span
style=
"margin-left:10px;display:inline-block;width:22%;"
>
邀约人:
{{
item
.
inviterName
}}
</span>
<span
style=
"margin-left:7%;display:inline-block;width:22%;"
>
面试官:
{{
item
.
interviewerName
}}
</span>
<span
style=
"float:right;margin-right:
35px
"
>
面试时间:
{{
item
.
seeTime
}}
</span>
<span
style=
"float:right;margin-right:
5%
"
>
面试时间:
{{
item
.
seeTime
}}
</span>
</p>
</div>
<div
class=
"contentState"
>
...
...
@@ -768,6 +768,7 @@ font-size: 14px;
width
:
100%
;
background
:
#EDEDED
;
overflow
:
hidden
;
min-width
:
1200px
;
}
.interview-left
{
height
:
100%
;
...
...
src/page/resume/allResume.vue
View file @
9b1a2ee6
...
...
@@ -313,7 +313,7 @@
<Button
type=
'primary'
@
click=
'emailModalPush'
>
取消
</Button>
<Button
type=
'primary'
@
click=
'submit'
v-show=
"this.isShowAll==false"
>
发送
</Button>
<Button
type=
'primary'
@
click=
'submit'
v-show=
"this.isShowAll==true"
>
添加并发送
</Button>
<
Checkbox
v-model=
"formInline.sendWeixin"
class=
'wechat'
><span>
微信通知面试官
</span></Checkbox
>
<
!--
<Checkbox
v-model=
"formInline.sendWeixin"
class=
'wechat'
><span>
微信通知面试官
</span></Checkbox>
--
>
</div>
</Modal>
<Modal
...
...
src/page/resume/channel.vue
View file @
9b1a2ee6
...
...
@@ -333,7 +333,7 @@
<Button
type=
'primary'
@
click=
'emailModalPush'
>
取消
</Button>
<Button
type=
'primary'
@
click=
'submit'
v-show=
"this.isShowAll==false"
>
发送
</Button>
<Button
type=
'primary'
@
click=
'submit'
v-show=
"this.isShowAll==true"
>
添加并发送
</Button>
<
Checkbox
v-model=
"formInline.sendWeixin"
class=
'wechat'
><span>
微信通知面试官
</span></Checkbox
>
<
!--
<Checkbox
v-model=
"formInline.sendWeixin"
class=
'wechat'
><span>
微信通知面试官
</span></Checkbox>
--
>
</div>
</Modal>
<Modal
...
...
src/page/resume/resumeDetail.vue
View file @
9b1a2ee6
<
template
>
<div
class=
"resumeDetail"
>
<div
class=
"resumeDetail-left"
>
<div
class=
"pdfShow"
v-if=
"isShowPdf==true"
>
<div
id=
"container"
style=
"width:100%;height:100%"
v-if=
"isShowPdf==true"
></div>
</div>
<div
class=
"resumeDetail-left"
v-if=
"isShowPdf==false"
>
<div
class=
"personalInformation"
v-show=
"JSON.stringify(resume)!=='
{}'">
<p
class=
"detailTitel"
>
<span>
...
...
@@ -137,6 +140,8 @@
</div>
<div
class=
"resumeDetail-right"
v-show=
"this.showBtn!=1"
>
<div
class=
"testResume"
>
<Button
type=
"primary"
size=
'small'
style=
"width:150px;height:34px;margin:20px 0 0 15px;font-size:14px"
:disabled=
"showOriginalDisabled"
@
click=
"showOriginal"
v-if=
"resumeBTn==true"
>
原始简历
</Button><br>
<Button
type=
"primary"
size=
'small'
style=
"width:150px;height:34px;margin:20px 0 20px 15px;font-size:14px"
:disabled=
"showStandardDisabled"
@
click=
"showStandard"
>
标准简历
</Button><br>
<Button
type=
"primary"
size=
'small'
style=
"width:150px;height:34px;margin:0 0 0 15px;font-size:14px"
@
click=
"downloadONE(detialID)"
>
下
载
</Button><br>
<Button
type=
"primary"
size=
'small'
style=
"width:150px;height:34px;margin:20px 0 0 15px;font-size:14px"
@
click=
"transpond"
>
转发给面试官
</Button><br>
<p
style=
"margin-top:40px;font-size:16px"
>
当前简历状态:
<span
style=
"color:#0092FF"
>
{{
detailStatus
[
detailSta
]
}}
</span></p>
...
...
@@ -225,7 +230,7 @@
<Button
type=
'primary'
@
click=
'emailModalPush'
>
取消
</Button>
<Button
type=
'primary'
@
click=
'submit'
>
发送
</Button>
<!--
<Button
type=
'primary'
@
click=
'submit'
v-show=
"this.isShowAll==true"
>
添加并发送
</Button>
-->
<
Checkbox
v-model=
"formInline.sendWeixin"
class=
'wechat'
><span>
微信通知面试官
</span></Checkbox
>
<
!--
<Checkbox
v-model=
"formInline.sendWeixin"
class=
'wechat'
><span>
微信通知面试官
</span></Checkbox>
--
>
</div>
</Modal>
<Modal
...
...
@@ -315,7 +320,9 @@
</
template
>
<
script
>
import
moment
from
'
moment
'
import
{
seedetail
,
updatastatus
,
TODORes
,
sendEmail
,
getEmailMoo
,
getEmailContent
,
uploadimage
,
findCompanyEmailByKey
,
forwardResume
}
from
'
../../api/resume.server
'
// import moment from '../../../static/1.pdf'
require
(
'
../../../static/pdf/pdf.js
'
)
import
{
seedetail
,
updatastatus
,
TODORes
,
sendEmail
,
getEmailMoo
,
getEmailContent
,
uploadimage
,
findCompanyEmailByKey
,
forwardResume
,
getPdf
,
isShowPDF
}
from
'
../../api/resume.server
'
import
localStorage
from
'
../../service/localstorage.service.js
'
import
{
sapi
...
...
@@ -341,6 +348,10 @@ export default {
modal12
:
false
,
modal13
:
false
,
boxIsShow
:
false
,
resumeBTn
:
false
,
isShowPdf
:
true
,
showOriginalDisabled
:
true
,
showStandardDisabled
:
false
,
errorMassage
:
''
,
interviewee
:
[],
contentName
:
''
,
...
...
@@ -439,6 +450,70 @@ export default {
this
.
reList
=
res
.
data
.
body
.
reList
this
.
name
=
res
.
data
.
body
.
resume
.
ownerName
})
},
clearPDF
:
function
()
{
document
.
getElementById
(
"
container
"
).
innerHTML
=
""
;
},
// 渲染合同
renderPDF
:
function
(
pdf
,
pageNumber
)
{
pdf
.
getPage
(
pageNumber
).
then
(
function
(
page
)
{
var
scale
=
1.5
;
//随意设置的
var
viewport
=
page
.
getViewport
(
scale
);
// Prepare canvas using PDF page dimensions
// var canvas = document.getElementById('the-canvas');
var
canvas
=
document
.
createElement
(
'
canvas
'
);
canvas
.
setAttribute
(
"
id
"
,
"
the-canvas-
"
+
pageNumber
);
var
element
=
document
.
getElementById
(
"
container
"
);
element
.
appendChild
(
canvas
);
var
context
=
canvas
.
getContext
(
'
2d
'
);
canvas
.
height
=
viewport
.
height
;
canvas
.
width
=
viewport
.
width
;
// Render PDF page into canvas context
var
renderContext
=
{
canvasContext
:
context
,
viewport
:
viewport
};
var
renderTask
=
page
.
render
(
renderContext
);
renderTask
.
then
(
function
()
{
console
.
log
(
'
Page rendered
'
);
});
});
},
// 展示合同
showPDF
:
function
(
data
)
{
let
vm
=
this
if
(
data
)
{
var
obj
=
{
// url: '../../static/test.pdf', // 得到的是数据时使用data属性
data
:
data
,
cMapUrl
:
'
https://cdn.jsdelivr.net/npm/pdfjs-dist@2.0.943/cmaps/
'
,
cMapPacked
:
true
};
PDFJS
.
workerSrc
=
'
../../static/pdf/pdf.worker.js
'
var
loadingTask
=
PDFJS
.
getDocument
(
obj
);
loadingTask
.
promise
.
then
(
function
(
pdf
)
{
var
total
=
pdf
.
numPages
;
for
(
var
i
=
0
;
i
<
total
;
i
++
)
{
var
pageNumber
=
i
+
1
;
// 如果你有node(vue ag...)环境,那么请用async/await替换掉
setTimeout
(
vm
.
renderPDF
(
pdf
,
pageNumber
),
10
);
}
},
function
(
reason
)
{
// PDF loading error
console
.
error
(
reason
);
});
}
},
getData
(){
let
params
=
{
uid
:
this
.
$route
.
query
.
id
}
getPdf
(
params
).
then
(
data
=>
{
// 调接口获取数据(二进制流数据)
this
.
clearPDF
();
let
vm
=
this
var
array
=
new
Uint8Array
(
data
.
data
);
// 将二进制流数据转换成 Uint8Array (pdf支持的数据格式)
vm
.
showPDF
(
array
)
})
},
// 下载简历
downloadONE
(
doid
){
...
...
@@ -671,6 +746,35 @@ export default {
},
delInterviewee
(
name
){
this
.
contentName
=
''
},
showOriginal
(){
this
.
getData
()
this
.
showPDF
()
this
.
isShowPdf
=
true
this
.
showOriginalDisabled
=
true
this
.
showStandardDisabled
=
false
},
showStandard
(){
this
.
isShowPdf
=
false
// this.showOriginalDisabled=false
console
.
log
(
84377847
)
this
.
clearPDF
()
this
.
showStandardDisabled
=
true
this
.
showOriginalDisabled
=
false
},
judeShowPdf
(){
let
parmars
=
{
uid
:
this
.
$route
.
query
.
id
}
isShowPDF
(
parmars
).
then
(
res
=>
{
if
(
res
.
data
.
body
==
true
){
this
.
isShowPdf
=
true
this
.
resumeBTn
=
true
}
else
{
this
.
isShowPdf
=
false
this
.
resumeBTn
=
false
}
})
},
// 确认发送邮件
// _debounce(confireSendEmail,500),
...
...
@@ -869,14 +973,16 @@ export default {
},
remove
(){
document
.
querySelector
(
'
#app
'
).
style
.
removeProperty
(
'
overflow-x
'
)
}
},
mounted
(){
async
mounted
(){
this
.
getDETAIL
()
this
.
boxIsShow
=
true
this
.
judeBtn
()
this
.
addCss
()
this
.
getData
()
this
.
clearPDF
()
await
this
.
judeShowPdf
()
},
beforeDestroy
(){
this
.
remove
()
...
...
@@ -896,6 +1002,12 @@ export default {
min-height
:
200px
/* border: 1px solid #999 */
}
.pdfShow
{
float
:
left
;
width
:
860px
;
min-height
:
200px
;
/* border: 1px solid black */
}
.pic
img
{
width
:
60px
;
height
:
60px
...
...
@@ -913,7 +1025,7 @@ export default {
/* margin-left: 200px */
}
.resumeDetail-right
{
float
:
lef
t
;
float
:
righ
t
;
width
:
230px
;
}
.wechat
{
...
...
@@ -942,24 +1054,26 @@ export default {
}
.bassMassage
{
display
:
inline-block
;
width
:
3
22
px
;
width
:
3
60
px
;
float
:
left
;
margin-left
:
30px
;
font-size
:
14px
;
margin-top
:
20px
margin-top
:
20px
;
/* border:1px solid black; */
}
.bassMassageRight
{
display
:
inline-block
;
width
:
3
22
px
;
width
:
3
60
px
;
float
:
left
;
font-size
:
14px
;
margin-top
:
20px
;
margin-left
:
20px
;
/* border:1px solid black; */
}
.testResume
{
position
:
fixed
;
/* float: left; */
top
:
2
80px
;
top
:
2
0%
;
width
:
200px
;
/* border: 1px solid black; */
margin-left
:
20px
...
...
src/page/system/QRcode.vue
View file @
9b1a2ee6
...
...
@@ -6,6 +6,13 @@
<img
:src=
"url"
style=
"width:100%;height:100%"
>
</div>
<p
class=
"xiazai"
@
click=
"downPic"
>
下载
</p>
<!--
<p
style=
"margin-top:40px"
><span>
请点击
</span>
<a
href=
"http://192.168.28.10:7086/acceptInterview?isResufe=false"
style=
"text-decoration:none;width:100px;height:30px;background:#0092ff;color:white;display:inline-block; text-align: center;line-height:30px;border-radius:5px!important"
>
接受面试安排
</a>
或
<a
href=
"http://192.168.28.10:7086/acceptInterview?isResufe=true"
style=
"text-decoration:none;width:100px;height:30px;display:inline-block; text-align: center;line-height:30px;border-radius:5px!important;border:1px solid #0092ff;"
>
拒绝面试安排
</a>
,
<span>
将您的反馈告知我们。
</span>
</p>
-->
</div>
</
template
>
<
script
>
...
...
src/page/upload/upload.vue
View file @
9b1a2ee6
...
...
@@ -11,12 +11,12 @@
:class=
"['prefixCls' + '-input']"
@
change=
"handleChange"
:multiple=
"true"
:format=
"['
html','doc','pdf','txt','docx
']"
:format=
"['
word','pdf
']"
:accept=
"accept"
>
<Button
@
click=
'selFiles'
style=
'width:20%;margin-top:40px;margin-left:-4px;color:black'
>
选择文件
</Button>
<div
class=
'contentTips'
>
<p
style=
"font-size:12px;margin-left:5%;text-align:
left;height:40px;line-height:40px;width:90%;display:inline-block;margin-top:30px"
>
单个文件不能大于2MB,支持html,doc,docx,txt,pdf等
格式,暂时不支持压缩格式
</p>
<p
style=
"font-size:12px;margin-left:5%;text-align:
center;height:40px;line-height:40px;width:90%;display:inline-block;margin-top:30px"
>
单个文件不能大于2MB,仅支持word,pdf
格式,暂时不支持压缩格式
</p>
<p
style=
"font-size:12px;margin-left:2%;text-align:center;height:40px;line-height:40px;width:90%"
>
支持最多二十份简历批量上传
</p>
</div>
<Button
@
click=
'uploadBtn'
style=
'width:20%;margin-left:38%;margin-top:30px'
type=
'primary'
>
上传
</Button>
...
...
@@ -227,7 +227,7 @@ import {uploadFile} from '../../service/ajax'
filetile
:
'
上传中请稍后...
'
,
totalSize
:
null
,
uploadModal
:
false
,
accept
:
'
.
html,.doc,.docx,.txt
,.pdf
'
,
accept
:
'
.
word
,.pdf
'
,
fileSize
:
2048
,
progressStatus
:
{
'
0
'
:
'
active
'
,
...
...
@@ -399,8 +399,8 @@ import {uploadFile} from '../../service/ajax'
},
// 获取上传批次号
getnumber
(){
getuploadNumber
().
then
(
res
=>
{
this
.
batchNum
=
res
.
data
.
body
return
getuploadNumber
().
then
(
res
=>
{
this
.
batchNum
=
res
.
data
.
body
})
},
//改变页码
...
...
@@ -417,6 +417,7 @@ import {uploadFile} from '../../service/ajax'
page
=
typeof
(
page
)
==
'
number
'
?
page
:
1
this
.
searchInfo
.
pageIndex
=
page
this
.
pageIndex
=
page
console
.
log
(
this
.
batchNum
,
899898989
)
let
parmars
=
{
pageSize
:
this
.
searchInfo
.
pageSize
,
pageIndex
:
this
.
searchInfo
.
pageIndex
,
...
...
@@ -479,9 +480,9 @@ import {uploadFile} from '../../service/ajax'
})
},
},
mounted
(){
this
.
getnumber
()
this
.
serchlist
()
async
mounted
(){
await
this
.
getnumber
()
this
.
serchlist
()
}
}
</
script
>
...
...
src/router/index.js
View file @
9b1a2ee6
...
...
@@ -17,7 +17,6 @@ const upload = r => require.ensure([], () => r(require('@/page/upload/upload.vue
const
sweepCode
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/page/sweepCode/sweepCode.vue
'
)),
'
sweepCode
'
);
const
editor
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/components/editor.vue
'
)),
'
editor
'
);
const
getimage
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'
@/components/getimage.vue
'
)),
'
getimage
'
);
//z注释
Vue
.
use
(
Router
);
...
...
static/pdf/pdf.js
0 → 100644
View file @
9b1a2ee6
This diff is collapsed.
Click to expand it.
static/pdf/pdf.worker.js
0 → 100644
View file @
9b1a2ee6
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