Commit 8eb78347 authored by 李苏's avatar 李苏 💬

新增测试反馈index

parent 31a93d57
.n-item {background:rgb(57, 52, 86);}
.null-item {background:#FFFFFF;}
.ok-item {background:-webkit-gradient(linear, left top, right top, from(#42d79b), to(#a6e25f));background:linear-gradient(90deg, #42d79b, #a6e25f);}
.nok-item {background:-webkit-gradient(linear, left top, right top, from(#ff0000), to(#ff007f));background:linear-gradient(90deg, #ff0000, #ff007f);}
#kwrkbcs div{
font-size: 14px;
}
#kwrkbcs li{
font-size: 14px;
}
#kwrkb05 div{
font-size: 14px;
}
#kwrkb05 li{
font-size: 14px;
}
#kwrkb06 div{
font-size: 14px;
}
#kwrkb06 li{
font-size: 14px;
}
#kwrkbcs{
height: 100%;
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items:stretch
}
#kwrkbcs div {
box-sizing:border-box;
}
#kwrkbcs .toptitle{
height: 50px;
width: 100%;
background-color: #00aaff;
color: #FFFFFF;text-align: center;line-height: 50px;
}
#kwrkbcs .left{
height: calc(100% - 60px);
width: 40%;
}
#kwrkbcs .right{
height: calc(100% - 60px);
width: calc(60% - 10px);
border: #EEEEEE 1px solid;
}
#kwrkbcs .rightPdf{
height: 100%;
width: 100%;
}
#kwrkbcs .cbinfor{
width: 100%;
height: 60%;
}
#kwrkbcs .tab{
width: 100%;
height: 40%;
padding-top: 10px;
}
#kwrkbcs .cpif{
width: 100%;
height: 40%;
border: 1px solid #EEEEEE;
}
#kwrkbcs .cprz{
width: 100%;
height: 60%;
border: 1px solid #EEEEEE;
}
#kwrkbcs .cpiftop{
width: 100%;
height: 40px;
border-bottom: 1px solid #EEEEEE;
line-height: 40px;
display: flex;
justify-content: center;
}
#kwrkbcs .cpifbot{
height: calc(100% - 40px);
}
#kwrkbcs .ery{
width: 50%;
height: 50%;
display: flex;
align-items: center;
}
#kwrkbcs .ery span {
padding-left: 20px;
display: inline-block;
width: 70px;
}
#kwrkbcs .tipul>li{
width: 150px;
padding-left: 20px;
float: left;
line-height: 50px;
}
#kwrkbcs .tipuli2{
float: right!important;
}
#kwrkbcs .maintab{
height: 100%;
width: 100%;
overflow: auto;
border: 0.5px solid #EEEEEE;
}
#kwrkbcs .showtab{
height: 100%;
width: 100%;
}
.easyuitext{
padding-left: 10px;
height: 30px;
border: 0.5px solid #D3D3D3;
}
#kwrkbcs .wid70{
width: 70%;
}
#kwrkbcs .cardList-wrapper .card-item:nth-child(1){background:-webkit-gradient(linear, left top, right top, from(#5171fd), to(#c97afd));background:linear-gradient(90deg, #5171fd, #c97afd);-webkit-box-shadow:0 5px 10px #c97afd;box-shadow:0 5px 10px #c97afd;}
#kwrkbcs .cardList-wrapper .card-item:nth-child(2){background:-webkit-gradient(linear, left top, right top, from(#3dadf6), to(#737bfc));background:linear-gradient(90deg, #3dadf6, #737bfc);-webkit-box-shadow:0 5px 10px #737bfc;box-shadow:0 5px 10px #737bfc;}
#kwrkbcs .cardList-wrappers {background:-webkit-gradient(linear, left top, right top, from(#ea677c), to(#ef9b5f));background:linear-gradient(90deg, #ea677c, #ef9b5f);-webkit-box-shadow:0 5px 10px #ef9b5f;box-shadow:0 5px 10px #ef9b5f;}
#kwrkbcs .cardList-wrapper .card-item:nth-child(3){background:-webkit-gradient(linear, left top, right top, from(#42d79b), to(#a6e25f));background:linear-gradient(90deg, #42d79b, #a6e25f);-webkit-box-shadow:0 5px 10px #a6e25f;box-shadow:0 5px 10px #a6e25f;}
/* 界面5css */
#kwrkb05{
height: 100%;
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items:stretch
}
#kwrkb05 div {
box-sizing:border-box;
}
#kwrkb05 .toptitle{
height: 50px;
width: 100%;
background-color: #00aaff;
color: #FFFFFF;text-align: center;line-height: 50px;
}
#kwrkb05 .left{
height: calc(100% - 60px);
width: 40%;
}
#kwrkb05 .right{
height: calc(100% - 60px);
width: calc(60% - 10px);
border: #EEEEEE 1px solid;
}
#kwrkb05 .rightPdf{
height: 100%;
width: 100%;
}
#kwrkb05 .cbinfor{
width: 100%;
height: 50%;
}
#kwrkb05 .tab{
width: 100%;
height: 50%;
padding-top: 10px;
}
#kwrkb05 .cpif{
width: 100%;
height: 100%;
border: 1px solid #EEEEEE;
}
/* .cprz{
width: 100%;
height: 60%;
border: 1px solid #EEEEEE;
} */
#kwrkb05 .cpiftop{
width: 100%;
height: 40px;
border-bottom: 1px solid #EEEEEE;
line-height: 40px;
display: flex;
justify-content: center;
}
#kwrkb05 .cpifbot{
height: calc(100% - 40px);
}
#kwrkb05 .ery{
width: 100%;
height: 20%;
display: flex;
align-items: center;
}
#kwrkb05 .ery span {
padding-left: 20px;
display: inline-block;
width: 70px;
}
#kwrkb05 .tipul>li{
width: 150px;
padding-left: 20px;
float: left;
line-height: 50px;
}
#kwrkb05 .tipuli2{
float: right!important;
}
#kwrkb05 .maintab{
height: 100%;
width: 100%;
overflow: auto;
border: 0.5px solid #EEEEEE;
}
#kwrkb05 .showtab{
height: 100%;
width: 100%;
}
/* 看板6样式 */
#kwrkb06{
height: 100%;
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items:stretch
}
#kwrkb06 div {
box-sizing:border-box;
}
#kwrkb06 .toptitle{
height: 50px;
width: 100%;
background-color: #00aaff;
color: #FFFFFF;text-align: center;line-height: 50px;
}
#kwrkb06 .left{
height: calc(100% - 60px);
width: 40%;
}
#kwrkb06 .right{
height: calc(100% - 60px);
width: calc(60% - 10px);
border: #EEEEEE 1px solid;
}
#kwrkb06 .rightPdf{
height: 100%;
width: 100%;
}
#kwrkb06 .cbinfor{
width: 100%;
height: 45%;
}
#kwrkb06 .tab{
width: 100%;
height: 55%;
padding-top: 10px;
}
#kwrkb06 .cpif{
width: 100%;
height: 100%;
border: 1px solid #EEEEEE;
}
/* .cprz{
width: 100%;
height: 60%;
border: 1px solid #EEEEEE;
} */
#kwrkb06 .cpiftop{
width: 100%;
height: 40px;
border-bottom: 1px solid #EEEEEE;
line-height: 40px;
display: flex;
justify-content: center;
}
#kwrkb06 .cpifbot{
height: calc(100% - 40px);
}
#kwrkb06 .ery{
width: 100%;
height: 20%;
display: flex;
align-items: center;
}
#kwrkb06 .ery span {
padding-left: 20px;
display: inline-block;
width: 70px;
}
#kwrkb06 .tipul>li{
width: 150px;
padding-left: 20px;
float: left;
line-height: 50px;
}
#kwrkb06 .tipuli2{
float: right!important;
}
#kwrkb06 .maintab{
height: 50%;
width: 100%;
overflow: auto;
border: 0.5px solid #EEEEEE;
}
#kwrkb06 .mainsp{
height: 50%;
width: 100%;
}
#kwrkb06 .showtab{
height: 100%;
width: 100%;
}
\ No newline at end of file
<script src="js/pdfshow.js" type="text/javascript" charset="utf-8"></script>
<script src="js/dbenlarge.js" type="text/javascript" charset="utf-8"></script>
<script src="js/gethash.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="css/csfk.css"/>
<style type="text/css">
.errdialog{
min-width:35%;
/* width: 35%; */
height: 40px;
text-align: center;
line-height: 40px;
position: absolute;
top: 50px;
right: 50%;
color: #FFFFFF;
background-color: rgba(255,0,0,0.5);
transform: translateX(50%);
border-radius: 5px;
}
</style>
<div>
<div class="btn-group" >
<button id="btnqh1" type="button" class="btn btn-default" style="color: white;position: absolute;right: 5px;z-index: 9999999999;height: 50px;width: 200px;border: 0 solid #00AAFF;background-color: #00AAFF;display: none;">切换风格</button>
</div>
</div>
<script type="text/javascript">
/* 通用代码 */
const pdfUr="kmes/gpfk/queryPdfByWoidAndZpgx"
var urlo="kmes/gpfkfj/queryFjBybzgx/"+window.bzlx+"/O"
var urlt="kmes/gpfkfj/queryFjBybzgx/"+window.bzlx+"/T"
var urlm="kmes/gpfkfj/queryFjBybzgx/"+window.bzlx+"/M"
/* 初始化工序 */
function csfk_getgx(e){
let that=e
that.gx=window.gxname||"获取失败"
}
/* 大屏内部弹框 */
function screenAlert(dom,msg,timeNum){
let getdom=$(dom)
getdom.css('position','relative')
let dialog="<div class='errdialog'>"+msg+"</div>"
getdom.prepend(dialog)
setTimeout(function(){
$('.errdialog').remove();
},timeNum)
}
/* 时间 */
function csfk_pagetime(w){
let that=w
let nowtime
nowtime=new Date().getTime()
that.systime=new Date(nowtime).Format("yyyy-MM-dd hh:mm")
that.sivtimer=setInterval(function(){
nowtime=new Date().getTime()
that.systime=new Date(nowtime).Format("yyyy-MM-dd hh:mm")
},20000)
}
/* 日志事件汇总,写在请求内部或者单独拿出 */
function csfk_wrz(o,msg,type){
let that=o
if(type!='error'){
$(that.el).find(".rz").append("<br>>" + "<span>" +msg+"</sapn>")
that.addtop = that.addtop + 600
$(that.el).find(".rz").scrollTop(that.addtop)
}else{
$(that.el).find(".rz").append("<br>>" + "<span style='color: red;'>" +msg+"</sapn>")
that.addtop = that.addtop + 600
$(that.el).find(".rz").scrollTop(that.addtop)
}
/* this.xlh="" */
}
/* 反馈技计数 */
function csfk_apigetjs(s){
let that=s
gas.post('kmes/gpfk/getDailyInfo',{"bzgxid":window.bzlx}, function(res){
if(res.data&&res.data.records){
that.fksl=res.data.records.fksl||0
that.hg=res.data.records.hgsl||0
that.ng=res.data.records.bhgsl||0
}else{
let msg=res.message||"当前计数获取失败"
csfk_wrz(that,msg,'error')
}
});
}
/* newcsfk */
function csfk_apicsfk(e){
let that=e
return new Promise(function(y,n){
gas.post('kmes/gpfk/csfk ',{"sncode":that.xlh,"bzgxid":window.bzlx||"","wosncode":that.wosncode||""}, function(res){
if(res.data&&res.data.records){
/* 赋值操作 */
// that.hg= res.data.records.hgsl||0;
// that.ng= res.data.records.bhgsl||0;
that.gd = res.data.records.woDjid;
that.cpsn = res.data.records.wosnCode;
that.ph = res.data.records.wlxxCode;
let woid = res.data.records.woDjid;
that.fkid = res.data.records.id;
y(woid)
/** wobom查询 **/
if(res.data.records.sntype=="WOSNID")
{
that.wosncode=that.xlh
let msg=res.message||"查询WOSNID:"+that.wosncode+"成功"
csfk_wrz(that,msg)
}else if(res.data.records.sntype=="OKBZ"){
that.isok="OK"
// that.hg=res.data.records.hgsl||0;
// that.ng=res.data.records.bhgsl||0;
}else if(res.data.records.sntype=="NGBZ"){
that.isok="NG"
// that.hg=res.data.records.hgsl||0;
// that.ng=res.data.records.bhgsl||0;
}
that.xlh=""
/* 日志操作 */
/* pdf地址 */
}else{
let msg=res.message||"查询该序列号:"+that.xlh+"失败"
that.xlh=""
csfk_wrz(that,msg,'error')
screenAlert(that.el,msg,2000)
}
});
})
}
/* 总体扫描封装 */
function csfk_csfk(t){
let that=t
if(that.xlh=="logout")
{
csfk_wrz(that,"即将退出系统")
localStorage.clear();
window.location.href ="loginscan_view";
return
}
csfk_wrz(that,"正在查询序列号:"+that.xlh)
csfk_apicsfk(that).then(function(s){
csfk_pdfshow(that,s)
csfk_apigetjs(that)
})
}
/* csfk */
function csfk_seccsfk(t,type){
let that=t
gas.post('kmes/gpfk/csfk',{"fkid":that.fkid, "hgsn":that.xlh}, function(res){
if(res.data&&res.data.records){
if(type=="ok"){
that.isok="OK"
that.hg=res.data.records.hgsl||0;
that.ng=res.data.records.bhgsl||0;
}else if(type=="ng"){
that.isok="NG"
that.hg=res.data.records.hgsl||0;
that.ng=res.data.records.bhgsl||0;
}
}
else{
let msg=res.message||"操作执行失败"
csfk_wrz(that,msg,"error")
}
});
}
/* pdfshow gxid登录页传进来 */
function csfk_pdfshow(e,woid){
let that=e
let newpdfurl=pdfUr+"/"+woid+"/"+window.bzlx
if (newpdfurl!=that.pdfurl){
that.pdfurl=newpdfurl
if(that.sivpdf){
clearInterval(that.sivpdf)
}
pdfshow(that.pdfurl, that.pdfdom, 10000).then(e => {
that.sivpdf = e
})
}
}
</script>
<div id="kwrkbcs">
<!-- 顶部信息条 -->
<div class="toptitle" >
<ul class="tipul" style="height: 100%;">
<li>{{username}}</li>
<li class="tipuli2" style="width: 250px;">{{systime}}</li>
<li class="tipuli2" style="margin-right: 200px;display: none;">计数: <span style="font-size: 16px;">{{fksl}}</span></li>
<li class="tipuli2">当前工序:{{gx}}</li>
</ul>
</div>
<!-- 左侧信息条 -->
<div class="left" style="width: 30%;">
<!-- 左上信息表 -->
<div class="cbinfor">
<div class="cpif">
<!-- top -->
<div class="cpiftop" style="display: flex;align-items: center;">
<span>序列号</span>&nbsp;&nbsp;<input class="easyuitext " style="width: 84%;" v-model="xlh" @keydown="scanxlh()" name="xlh" placeholder="请扫码条码" />
</div>
<!-- bot -->
<div class="cpifbot" style="display: flex;flex-wrap: wrap;">
<div class="ery">
<span>工序</span><input class="easyuitext wid70" v-model="gx" name="gx" />
</div>
<div class="ery">
<span>工单</span><input class="easyuitext wid70" v-model="gd" name="gd" />
</div>
<div class="ery">
<span>SN</span><input class="easyuitext wid70" v-model="cpsn" name="cpsn" />
</div>
<div class="ery">
<span>品号</span><input class="easyuitext wid70" v-model="ph" name="ph" />
</div>
</div>
</div>
<!-- 日志 -->
<div class="cprz" >
<div style="height: 100%;display: flex;align-items: center;justify-content: center;">
<div class="cardList-wrapper" style="width: 55%;height: 100%;background-color: #FFFFFF;color: #FFFFFF;display: flex;flex-wrap: wrap;justify-content:space-around;align-items: center;">
<div class="" style="height: 45%;width: 90%;display: flex;align-items: center;justify-content: center;color: #FFFFFF;background-color: #00AAFF!important;">
<span style="font-size: 20px;font-weight: 800;">合格数量:{{hg}}</span>
</div>
<div class="" style="height: 45%;width: 90%;display: flex;align-items: center;justify-content: center;color: #FFFFFF;background-color: #FEC041!important;">
<span style="font-size: 20px;font-weight: 800;">NG数量:{{ng}}</span>
</div>
</div>
<div
:class="{'ok-item' : isok=='OK','nok-item' : isok=='NG','null-item': isok!='OK'&&isok!='NG'}"
class="" style="width: 40%;height: 95%;color: white;display: flex;align-items: center;justify-content: center;font-size: 30px;">
<b style="font-size: 60px;">{{isok}}</b>
</div>
</div>
</div>
</div>
<!-- 左下表格 -->
<div class="tab">
<div class="maintab">
<div style="height: 20px;line-height: 20px;background-color: grey;color: white;text-align: center;">
日志
</div>
<div style="height: calc(100% - 20px);display: flex;">
<div class="rz" style="width: 100%;height: 100%;background-color: #393456;color: #FFFFFF;overflow: auto;">
</div>
</div>
</div>
</div>
</div>
<!-- 右侧信息pdf -->
<div class="right" style="width: 45%;">
<canvas id="gpjypdf" class="rightPdf"></canvas>
</div>
<!-- new右侧 -->
<div class="right" style="width: 25%;">
<div style="height: 50%;overflow: hidden;">
<video width="100%" height="100%" :src="urlm" controls muted autoplay="autoplay" loop="loop">
</video>
</div>
<div ref="scrollmain" style="height: 50%;overflow: auto;border-bottom: 1px solid #EEEEEE;">
<canvas id="csfkpdf" ref="scroll" style="width: 100%;height: 160%;" ></canvas>
</div>
</div>
</div>
<script type="text/javascript">
let Vkwrkbcs= new Vue({
el:"#kwrkbcs",
mounted() {
csfk_getgx(this)
csfk_apigetjs(this)
dbenlarge('kwrkbcs',1,this.isFocus())
// this.sivpdf=
this.initpage()
this.scroll()
this.gettime()
this.appdestory()
},
destroyed() {
clearInterval(this.sivdestory)
clearInterval(this.sivpdf)
clearInterval(this.sivtimer)
clearInterval(this.sivrpdf)
clearInterval(this.sivscroll)
},
data:function(){
return{
urlm:urlm,
fksl:0,
isok:"",
username:localStorage.getItem("username"),
pm:"",
ng:0,
hg:0,
pdfdom:"kwrkbcspdf",
el:"#kwrkbcs",
addtop:0,
xlh:"",
gx:"",
gd:"",
cpsn:"",
ph:"",
systime:"",
tabdata:[],
sivtimer:null,//时间计数器
sivpdf:null,
sivdestory:null,
sivrpdf:null,
sivscroll:null
}
},
methods:{
scroll(){
/* test */
// pdfshow(urlo,'gpjypdf', 10000).then(e => {
// that.sivpdf = e
// })
/* test */
pdfshow(urlt,'csfkpdf', 10000).then(e => {
that.sivrpdf = e
})
const mainData=this.$refs.scrollmain
const divData =this.$refs.scroll
this.sivscroll=setInterval(() => {
mainData.scrollTop += 1
if (mainData.clientHeight + mainData.scrollTop+10 > mainData.scrollHeight) {
mainData.scrollTop = 0
}
}, 100)
},
// 扫码接口
apiscanxlh(){
let that=this
csfk_csfk(that)
},
isFocus(){
let $xlh=$(this.el).find('input[name="xlh"]')
$xlh.focus()
},
// 扫码事件
scanxlh(e){
var evt = window.event || e;
if (evt.keyCode == 13) {
this.apiscanxlh()
}
},
// 初始化页面
initpage(){
},
/* 展示时间 */
gettime(){
let that = this
csfk_pagetime(that)
},
appdestory(){
let that=this
this.sivdestory=setInterval(function(){
if(!$("#kwrkbcs").height()){
Vkwrkbcs.$destroy()
}
},3000)
}
}
})
</script>
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