<%@ page contentType="text/html;charset=UTF-8"%>
|
|
<html>
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<style>
|
html,body{
|
width: 100%;
|
height: 100%;
|
padding: 0;
|
margin: 0;
|
}
|
#header1 {
|
width: 100%;
|
height: 7%;
|
background-color: white;
|
display: inline-block;
|
text-align: center;
|
font-size: 50px;
|
}
|
#header {
|
width: 100%;
|
height: 90%;
|
background-color: white;
|
margin-top: 2%;
|
}
|
#footer {
|
width: 100%;
|
height: 70%;
|
|
}
|
#main1 {
|
width: 100%;
|
height: 30%;
|
display: flex;
|
}
|
#main3 {
|
width: 100%;
|
height: 70%;
|
display: flex;
|
}
|
#main2 {
|
width: 50%;
|
height: 100%;
|
|
}
|
#main4 {
|
width: 50%;
|
height: 100%;
|
}
|
#main1-1 {
|
width: 100%;
|
height: 25%;
|
font-size: 40px;
|
}
|
#main1-2 {
|
width: 100%;
|
height: 25%;
|
font-size: 50px;
|
}
|
#main3-1 {
|
width: 50%;
|
height: 100%;
|
}
|
#main3-2 {
|
width: 50%;
|
height: 100%;
|
|
}
|
#main4-1 {
|
width: 100%;
|
height: 30%;
|
|
}
|
#main4-2 {
|
width: 100%;
|
height: 30%;
|
|
}
|
#main4-3 {
|
width: 100%;
|
height: 30%;
|
|
}
|
#main1-1-1 {
|
font-size: 50px;
|
margin-top: 2%;
|
}
|
#main1-2-1 {
|
font-size: 50px;
|
margin-top: 2%;
|
}
|
#main3-1-1 {
|
width: 100%;
|
height: 20%;
|
}
|
#main3-1-2 {
|
width: 100%;
|
height: 80%;
|
}
|
#main3-2-1 {
|
width: 100%;
|
height: 20%;
|
}
|
#main3-2-2 {
|
width: 100%;
|
height: 80%;
|
}
|
|
|
|
</style>
|
<title>大屏显示</title>
|
</head>
|
<body>
|
<div id="app" style="width: 99%;height: 99%;background-color: white;">
|
<div id="header1" v-for='items1 in shuzu1'><span>{{items1['5_machineType']}}工序</span></div>
|
<div id="header">
|
<div id="main1" v-for='items1 in shuzu1'>
|
<div id="main1-1">当前订单号:
|
<div id="main1-1-1" >{{items1['0_order_id']}}</div>
|
</div>
|
<div id="main1-2">当前产品号:
|
<div id="main1-2-1">{{items1['1_recipe_no']}}</div>
|
</div>
|
<div id="main1-2">当班计划数量:
|
<div id="main1-2-1">{{items1['8_smallglass_sum']}}</div>
|
</div>
|
<div id="main1-2">当班完成数量:
|
<div id="main1-2-1">{{items1['2_smallglass_completed']}} </div>
|
</div>
|
</div>
|
<div id="main3">
|
<div id="main4"></div>
|
<div id="main2"></div>
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<script src="../js/jquery-3.4.1.min.js"></script>
|
<script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
<script src="../js/vue.min.js"></script>
|
<script src="../js/axios.min.js"></script>
|
<script src="../js/mixins.js"></script>
|
<script src="../js/echarts.min.js"></script>
|
|
<script>
|
Vue.prototype.$echarts = echarts;
|
Vue.prototype.$http= axios;
|
let app = new Vue({
|
el:'#app',
|
mixins:[mixin],
|
data:{
|
shuzu:[{}],
|
shuzu1:[{}],
|
shuzu2:[{}],
|
machineElectric:[{}],
|
machineWater:[{}],
|
type:'',
|
|
|
|
|
|
val1: {
|
borderColor:'#082352',
|
title: {
|
// text: '成品库存',
|
// left: '290px',
|
// top: '0px'
|
text:'合格率',//主标题文本
|
left:'center',
|
top:'45%',
|
left:'50%',
|
textStyle:{
|
color:'#454c5c',
|
align:'center'
|
},
|
subtextStyle:{
|
fontFamily : "微软雅黑",
|
color:'#6c7a89',
|
}
|
|
},
|
|
tooltip: {
|
trigger: 'item',
|
textStyle:{
|
}
|
},
|
legend: {
|
// orient: 'vertical',
|
left: 'left',
|
textStyle:{
|
|
}
|
},
|
textStyle:{
|
|
},
|
series: [
|
{
|
|
type: 'pie',
|
radius : ['40%','70%'],
|
center: ['50%', '50%'],
|
minAngle:'15',
|
label: {
|
// position: 'inside',
|
show: true,
|
formatter(param) {
|
// correct the percentage
|
return param.name + ' (' + param.percent + '%)';
|
}
|
},
|
data: [
|
{ value: 300, name: '成品',itemStyle:{color:'#53a2ff'} },
|
{ value: 700, name: '次品',itemStyle:{color:'darkseagreen'} }
|
],
|
itemStyle: {
|
normal:{
|
label:{
|
show:true,
|
//formatter: "{b} :\n {c} \n ({d}%)",
|
formatter: "{b} :\n ({d}%)",
|
position:"inner"
|
}
|
}
|
}
|
|
}
|
]
|
},
|
|
},
|
methods:{
|
|
dingdanxiangqing(){
|
let HisArr="";
|
HisArr = this.$echarts.init(document.getElementById('main2'));
|
let a = {
|
value: this.shuzu1[0]['6_qualified'],
|
|
name: "成品",
|
itemStyle: { color: '#53a2ff' },
|
label:{fontSize:30}
|
|
}
|
let b = {
|
value: this.shuzu1[0]['7_qualified_not'],
|
name: "次品",
|
itemStyle: { color: 'darkseagreen' },
|
label:{fontSize:30}
|
|
}
|
this.val1.title.text="合格率"
|
this.val1.title.top="45%"
|
this.val1.title.left="45%"
|
this.val1.title.textStyle.fontSize=30
|
this.val1.series[0].data[0]=a
|
this.val1.series[0].data[1]=b
|
|
|
HisArr.setOption(this.val1);
|
this.loading=false
|
},
|
dingdanxiangqing1(){
|
let HisArr="";
|
HisArr = this.$echarts.init(document.getElementById('main4'));
|
let a = {
|
value: this.shuzu1[0]['2_smallglass_completed'],
|
|
name: "已完成",
|
itemStyle: { color: '#53a2ff' },
|
label:{fontSize:30}
|
|
|
}
|
let b = {
|
value: this.shuzu1[0]['3_smallglass_processing'],
|
name: "未完成",
|
itemStyle: { color: 'darkseagreen' },
|
label:{fontSize:30}
|
|
}
|
this.val1.title.text="订单加工"
|
this.val1.title.top="45%"
|
this.val1.title.left="45%"
|
this.val1.title.textStyle.fontSize=30
|
this.val1.series[0].data[0]=a
|
this.val1.series[0].data[1]=b
|
HisArr.setOption(this.val1);
|
this.loading=false
|
},
|
|
},
|
watch:{
|
|
shuzu1(){
|
this.dingdanxiangqing(),
|
this.dingdanxiangqing1()
|
}
|
|
},
|
async mounted(){
|
let type=''
|
let machineLocal=<%= request.getParameter("local")%>
|
if (machineLocal==0) {
|
type='瑕疵1'
|
}else if(machineLocal==1){
|
type='瑕疵2'
|
}else if(machineLocal==2){
|
type='瑕疵3'
|
}
|
let sql=""
|
let flag=2
|
sql="{call AXJ_dapingxianshi_dingdanshuju2('"+type+"')}"
|
this.loadAjxss('大屏总订单数据',sql,flag,"shuzu1")
|
|
|
await setInterval(()=>{
|
|
sql="{call AXJ_dapingxianshi_dingdanshuju2('"+type+"')}"
|
this.interValLoadAjxs('大屏总订单数据',sql,flag,"shuzu1")
|
},5000)
|
|
|
|
|
|
}
|
|
})
|
|
|
|
</script>
|
</body>
|
</html>
|