Commit 8a24eabc authored by zhangderong's avatar zhangderong

在非特定渠道,隐藏部分按钮

parent ec0fb0fe
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<div class="resumeDetail-right" v-show="this.showBtn!=1"> <div class="resumeDetail-right" v-show="this.showBtn!=1">
<div class="testResume"> <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 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:20px 0 20px 15px;font-size:14px" :disabled="showStandardDisabled" @click="showStandard" v-if="resumeBTn==true">标准简历</Button><br>
<Button type="primary" size='small' style="width:150px;height:34px;margin:0 0 0 15px;font-size:14px" @click="downloadONE(detialID)" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Button><br> <Button type="primary" size='small' style="width:150px;height:34px;margin:0 0 0 15px;font-size:14px" @click="downloadONE(detialID)" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Button><br>
<Button type="primary" size='small' style="width:150px;height:34px;margin:20px 0 0 15px;font-size:14px" @click="transpond" >转发给面试官</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> <p style="margin-top:40px;font-size:16px">当前简历状态:<span style="color:#0092FF" >{{detailStatus[detailSta]}}</span></p>
...@@ -351,6 +351,8 @@ export default { ...@@ -351,6 +351,8 @@ export default {
resumeBTn:false, resumeBTn:false,
isShowPdf:true, isShowPdf:true,
showOriginalDisabled:true, showOriginalDisabled:true,
OriginalContent:'',
StandardContent:'',
showStandardDisabled:false, showStandardDisabled:false,
errorMassage:'', errorMassage:'',
interviewee: [], interviewee: [],
...@@ -451,11 +453,14 @@ export default { ...@@ -451,11 +453,14 @@ export default {
this.name=res.data.body.resume.ownerName this.name=res.data.body.resume.ownerName
}) })
}, },
clearPDF: function () { clearPDF: function (OriginalContent) {
document.getElementById("container").innerHTML = ""; if(this.OriginalContent!==''){
document.getElementById("container").innerHTML = "";
}
}, },
// 渲染合同 // 渲染合同
renderPDF: function (pdf, pageNumber) { renderPDF: function (pdf, pageNumber,OriginalContent) {
if(this.OriginalContent!==''){}
pdf.getPage(pageNumber).then(function (page) { pdf.getPage(pageNumber).then(function (page) {
var scale = 1.5; //随意设置的 var scale = 1.5; //随意设置的
var viewport = page.getViewport(scale); var viewport = page.getViewport(scale);
...@@ -475,17 +480,16 @@ export default { ...@@ -475,17 +480,16 @@ export default {
}; };
var renderTask = page.render(renderContext); var renderTask = page.render(renderContext);
renderTask.then(function () { renderTask.then(function () {
console.log('Page rendered');
}); });
}); });
}, },
// 展示合同 // 展示合同
showPDF : function (data) { showPDF : function ( OriginalContent) {
let vm = this let vm = this
if (data) { if ( this.OriginalContent) {
var obj = { var obj = {
// url: '../../static/test.pdf', // 得到的是数据时使用data属性 // url: '../../static/test.pdf', // 得到的是数据时使用data属性
data:data, data: this.OriginalContent,
cMapUrl: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.0.943/cmaps/', cMapUrl: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.0.943/cmaps/',
cMapPacked: true cMapPacked: true
}; };
...@@ -512,7 +516,8 @@ export default { ...@@ -512,7 +516,8 @@ export default {
this.clearPDF(); this.clearPDF();
let vm =this let vm =this
var array = new Uint8Array(data.data);// 将二进制流数据转换成 Uint8Array (pdf支持的数据格式) var array = new Uint8Array(data.data);// 将二进制流数据转换成 Uint8Array (pdf支持的数据格式)
vm.showPDF(array) this.OriginalContent=new Uint8Array(data.data);
vm.showPDF(this.OriginalContent)
}) })
}, },
// 下载简历 // 下载简历
...@@ -748,8 +753,9 @@ export default { ...@@ -748,8 +753,9 @@ export default {
this.contentName='' this.contentName=''
}, },
showOriginal(){ showOriginal(){
this.addCss() // this.addCss()
this.getData() // this.remove()
// document.querySelector('#app').style['overflow-x']='hidden'
this.showPDF() this.showPDF()
this.isShowPdf=true this.isShowPdf=true
this.showOriginalDisabled=true this.showOriginalDisabled=true
...@@ -757,9 +763,8 @@ export default { ...@@ -757,9 +763,8 @@ export default {
}, },
showStandard(){ showStandard(){
this.isShowPdf=false this.isShowPdf=false
this.addCss() // this.addCss()
// this.showOriginalDisabled=false // document.querySelector('#app').style['overflow-x']='hidden'
console.log(84377847)
this.clearPDF() this.clearPDF()
this.showStandardDisabled=true this.showStandardDisabled=true
this.showOriginalDisabled=false this.showOriginalDisabled=false
...@@ -982,7 +987,7 @@ export default { ...@@ -982,7 +987,7 @@ export default {
this.boxIsShow=true this.boxIsShow=true
this.judeBtn() this.judeBtn()
this.addCss() this.addCss()
this.getData() await this.getData()
this.clearPDF() this.clearPDF()
await this.judeShowPdf() await this.judeShowPdf()
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment