|
|
@ -1,6 +1,8 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="mod-config container "> |
|
|
<div class="mod-config container "> |
|
|
<div class="pdfMenu" > |
|
|
<div class="pdfMenu" > |
|
|
|
|
|
<div v-bind:style="{ width: '100%', height: '10%', backgroundColor: color }"></div> |
|
|
|
|
|
<!-- <button v-on:click="changeColor">Change Color</button>--> |
|
|
<h1 style="color: white">SOP指导书 派工单|{{seqNo}}</h1> |
|
|
<h1 style="color: white">SOP指导书 派工单|{{seqNo}}</h1> |
|
|
</div> |
|
|
</div> |
|
|
<div class="pdf-wrapper" ref="pdfWrapper"> |
|
|
<div class="pdf-wrapper" ref="pdfWrapper"> |
|
|
@ -42,6 +44,7 @@ |
|
|
data () { |
|
|
data () { |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
|
|
|
color:'yellow', |
|
|
tvId:this.$route.query.ip?this.$route.query.ip:'TV001', |
|
|
tvId:this.$route.query.ip?this.$route.query.ip:'TV001', |
|
|
operator:'', |
|
|
operator:'', |
|
|
seqNo:'', |
|
|
seqNo:'', |
|
|
@ -99,6 +102,16 @@ |
|
|
} |
|
|
} |
|
|
this.badUrl=this.packageUrl+this.badList[this.badPage-1].attaFileNameDb; |
|
|
this.badUrl=this.packageUrl+this.badList[this.badPage-1].attaFileNameDb; |
|
|
}, |
|
|
}, |
|
|
|
|
|
changeColor(type){ |
|
|
|
|
|
if(type==='1'){ |
|
|
|
|
|
this.color='green' |
|
|
|
|
|
}else if(type==='2'){ |
|
|
|
|
|
this.color='yellow' |
|
|
|
|
|
}else { |
|
|
|
|
|
this.color='yellow' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
getPDF(){ |
|
|
getPDF(){ |
|
|
let data={ |
|
|
let data={ |
|
|
tvId: this.tvId |
|
|
tvId: this.tvId |
|
|
@ -112,6 +125,7 @@ |
|
|
this.badList=[]; |
|
|
this.badList=[]; |
|
|
this.seqNo='无'; |
|
|
this.seqNo='无'; |
|
|
this.operator='无'; |
|
|
this.operator='无'; |
|
|
|
|
|
this.changeColor('2') |
|
|
}else if(this.seqNo!=data.data.nowSeqNo) { |
|
|
}else if(this.seqNo!=data.data.nowSeqNo) { |
|
|
this.sopUrl=''; |
|
|
this.sopUrl=''; |
|
|
this.badUrl=''; |
|
|
this.badUrl=''; |
|
|
@ -123,6 +137,7 @@ |
|
|
this.badPage=1; |
|
|
this.badPage=1; |
|
|
this.sopMax=data.sop.length; |
|
|
this.sopMax=data.sop.length; |
|
|
this.badMax=data.bad.length; |
|
|
this.badMax=data.bad.length; |
|
|
|
|
|
this.changeColor(data.data.colourFlag) |
|
|
if(this.sopList.length>0){ |
|
|
if(this.sopList.length>0){ |
|
|
this.sopUrl=this.packageUrl+this.sopList[0].attaFileNameDb; |
|
|
this.sopUrl=this.packageUrl+this.sopList[0].attaFileNameDb; |
|
|
} |
|
|
} |
|
|
@ -134,6 +149,7 @@ |
|
|
this.badList=data.bad; |
|
|
this.badList=data.bad; |
|
|
this.sopMax=data.sop.length; |
|
|
this.sopMax=data.sop.length; |
|
|
this.badMax=data.bad.length; |
|
|
this.badMax=data.bad.length; |
|
|
|
|
|
this.changeColor(data.data.colourFlag) |
|
|
} |
|
|
} |
|
|
// console.log("SOP:"+ this.sopUrl) |
|
|
// console.log("SOP:"+ this.sopUrl) |
|
|
// console.log("不良:"+ this.badUrl) |
|
|
// console.log("不良:"+ this.badUrl) |
|
|
@ -147,6 +163,7 @@ |
|
|
this.badList=[]; |
|
|
this.badList=[]; |
|
|
this.seqNo='无'; |
|
|
this.seqNo='无'; |
|
|
this.operator='无'; |
|
|
this.operator='无'; |
|
|
|
|
|
this.changeColor('2') |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|