Commit 8a24eabc authored by zhangderong's avatar zhangderong

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

parent ec0fb0fe
......@@ -141,7 +141,7 @@
<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: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: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>
......@@ -351,6 +351,8 @@ export default {
resumeBTn:false,
isShowPdf:true,
showOriginalDisabled:true,
OriginalContent:'',
StandardContent:'',
showStandardDisabled:false,
errorMassage:'',
interviewee: [],
......@@ -451,11 +453,14 @@ export default {
this.name=res.data.body.resume.ownerName
})
},
clearPDF: function () {
document.getElementById("container").innerHTML = "";
clearPDF: function (OriginalContent) {
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) {
var scale = 1.5; //随意设置的
var viewport = page.getViewport(scale);
......@@ -475,17 +480,16 @@ export default {
};
var renderTask = page.render(renderContext);
renderTask.then(function () {
console.log('Page rendered');
});
});
},
// 展示合同
showPDF : function (data) {
showPDF : function ( OriginalContent) {
let vm = this
if (data) {
if ( this.OriginalContent) {
var obj = {
// url: '../../static/test.pdf', // 得到的是数据时使用data属性
data:data,
data: this.OriginalContent,
cMapUrl: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.0.943/cmaps/',
cMapPacked: true
};
......@@ -512,7 +516,8 @@ export default {
this.clearPDF();
let vm =this
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 {
this.contentName=''
},
showOriginal(){
this.addCss()
this.getData()
// this.addCss()
// this.remove()
// document.querySelector('#app').style['overflow-x']='hidden'
this.showPDF()
this.isShowPdf=true
this.showOriginalDisabled=true
......@@ -757,9 +763,8 @@ export default {
},
showStandard(){
this.isShowPdf=false
this.addCss()
// this.showOriginalDisabled=false
console.log(84377847)
// this.addCss()
// document.querySelector('#app').style['overflow-x']='hidden'
this.clearPDF()
this.showStandardDisabled=true
this.showOriginalDisabled=false
......@@ -982,7 +987,7 @@ export default {
this.boxIsShow=true
this.judeBtn()
this.addCss()
this.getData()
await this.getData()
this.clearPDF()
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