<%@ page language="java" contentType="text/html; charset=UTF-8"
|
pageEncoding="UTF-8"%>
|
<%@page import="builder.Manager"%>
|
<%@page import="ng.db.*"%>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<html>
|
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="expires" content="0">
|
<meta http-equiv="pragma" content="no-cache">
|
<meta http-equiv="cache-control" content="no-cache">
|
<script src="../js/main.js"></script>
|
|
<title>丝印线</title>
|
</head>
|
<style>
|
body {
|
height: 100%;
|
width: 100%;
|
flex-wrap: nowrap;
|
}
|
|
.page-scroll {
|
height: 100%;
|
}
|
|
.page-scroll .el-scrollbar__wrap {
|
overflow-x: hidden;
|
}
|
|
.el-table__header {
|
height: 20%;
|
|
}
|
|
#app {
|
width: 100%;
|
height: 100%;
|
}
|
|
#app1 {
|
width: 60%;
|
position: absolute;
|
left: 2%;
|
top: 3%;
|
}
|
|
#youtu {
|
height: 50%;
|
width: 30%;
|
position: absolute;
|
right: 2%;
|
top: 2%;
|
text-align: center;
|
line-height: 275px;
|
}
|
|
#time {
|
height: 50%;
|
width: 30%;
|
position: absolute;
|
top: 50%;
|
}
|
|
#har {
|
width: 99%;
|
position: absolute;
|
height: 2%;
|
top: 53%;
|
background-color: darkgrey;
|
}
|
|
#app2 {
|
width: 96%;
|
height: 36%;
|
position: absolute;
|
left: 2%;
|
top: 62%;
|
}
|
|
.chart-wrap {
|
width: 50%;
|
height: 100%;
|
float: left;
|
}
|
|
#time {
|
width: 50%;
|
height: 5%;
|
position: absolute;
|
left: 2%;
|
top: 35%;
|
}
|
|
#time2 {
|
width: 50%;
|
height: 10%;
|
position: absolute;
|
left: 2%;
|
top: 42%;
|
}
|
</style>
|
|
<body>
|
<div id='app' @mousemove="onmouseMove" v-loading="loading" element-loading-background="white">
|
<div id="mains" v-show="this.global.pollingIndex==0">
|
<div id='app1' style="width: 60%;height:33%;float: right;padding: 0;background-color: white;">
|
<show-table :tablehead="tableHead" :tabledata="tableData"></show-table>
|
|
</div>
|
<div id='time'>
|
<div style="margin-top: 5%;height: 3%;">
|
当前进度:<el-progress :text-inside="true" :stroke-width="26" :percentage="ratio"></el-progress>
|
</div>
|
|
|
</div>
|
<div id='youtu'>
|
<img class="imgCenter" alt="" :src="tableData[0]['11_route']">
|
</div>
|
<div id='har'></div>
|
<div id='app2' >
|
<!-- <show-table :tablehead="tableHead2" :tabledata="tableData2"></show-table> -->
|
<div id="chart-wrap0" class="chart-wrap"></div>
|
<div id="chart-wrap1" class="chart-wrap"></div>
|
</div>
|
</div>
|
<screen-photo :id="this.machineScreen" :intime="this.global.timer"
|
v-show="this.global.pollingIndex==1"
|
>
|
</screen-photo>
|
|
</div>
|
|
</body>
|
<script type="text/javascript">
|
let app = new Vue({
|
el: '#app',
|
mixins: [mixin],
|
data: {
|
storage: null,
|
val: {
|
title:{
|
text:'',
|
left:'center'
|
},
|
tooltip: {
|
trigger: 'axis',
|
axisPointer: {
|
type: 'shadow'
|
}
|
},
|
grid: {
|
left: '3%',
|
right: '4%',
|
bottom: '3%',
|
containLabel: true
|
},
|
xAxis: [{
|
type: 'category',
|
data: ['7/1', '7/2', '7/3', '7/4', '7/5', '7/6', '7/7'],
|
axisLine: {
|
lineStyle: {
|
color: 'rgb(30, 144, 255)'
|
}
|
},
|
axisLabel: {
|
color: 'rgb(30, 144, 255)'
|
},
|
splitLine: {
|
lineStyle: {
|
color: 'rgb(30, 144, 255)',
|
type: 'dashed'
|
}
|
}
|
}],
|
yAxis: [{
|
type: "value",
|
name: "能耗",
|
nameTextStyle: {
|
color: "rgb(30, 144, 255)",
|
fontSize: 12,
|
padding: [0, 0, 0, -30], //name文字位置 对应 上右下左
|
},
|
splitLine: {
|
// 网格线
|
show: false,
|
lineStyle: { //分割线
|
color: "rgb(180, 180, 180)",
|
width: 1,
|
type: "dashed" //dotted:虚线 solid:实线
|
}
|
},
|
axisLabel: {
|
// 轴文字
|
color: "rgb(30, 144, 255)",
|
fontSize: 12,
|
},
|
},
|
|
],
|
series: [{
|
name: '能耗',
|
type: 'bar',
|
barWidth: '80%',
|
data: [220, 152, 200, 334, 390, 330, 220],
|
itemStyle: {
|
color: 'rgb(180, 180, 180)'
|
}
|
},
|
|
]
|
},
|
machineLocal:<%= request.getParameter("local")%>,
|
machineScreen:null,
|
|
tableHead: [{}],
|
selectdate1: '',
|
selectdate2: '',
|
tableData: [{}],
|
show: true,
|
showGlassType: '',
|
showGlassIndex: 0,
|
machineElectric:[{}],
|
machineWater:[{}],
|
loading:true,
|
ratio:0
|
|
},
|
methods: {
|
echarsInit(type) {
|
let HisArr=[]
|
let datas=type==0?this.machineElectric:this.machineWater
|
for(let i=0;i<datas.length;i++){
|
if(i>1){
|
break
|
}
|
if(type==0){
|
HisArr[i] = this.$echarts.init(document.getElementById('chart-wrap'+i));
|
}else{
|
HisArr[i] = this.$echarts.init(document.getElementById('chart-wrap'));
|
}
|
}
|
if(type==0){
|
this.val.yAxis[0].name="电耗";
|
this.val.series[0].name='电耗(kw·h)'
|
this.val.series[0].itemStyle.color='rgb(84,112,198)'
|
}else{
|
this.val.yAxis[0].name="水耗";
|
this.val.series[0].name='水耗(m³)'
|
this.val.series[0].itemStyle.color='#00ff00'
|
}
|
let danwei=type==0?"(kw·h)":'(m³)'
|
|
for(let i in datas){
|
if(i>1){
|
break
|
}
|
this.val.title.text=datas[i]["0_machine_name"]+danwei
|
this.val.xAxis[0].data=datas[i]["6_shijian"].split(',');
|
this.val.series[0].data=datas[i]["5_jiqidianliang"].split(',');
|
HisArr[i].setOption(this.val);
|
}
|
},
|
},
|
computed: {
|
|
},
|
watch:{
|
machineElectric(){
|
if(Object.keys(this.machineElectric[0]).length==0){
|
return
|
}
|
|
this.echarsInit(0)
|
this.loading=false
|
},
|
tableHead(newVal,oldVal){
|
delete newVal[0]['7_parts_change']
|
delete newVal[0]['0_machine_name']
|
|
newVal[0]['8_ratio']='直通率'
|
//newVal[0]['9_work_state']='状态'
|
},
|
tableData(){
|
this.ratio=this.tableData[0]['8_ratio']*1
|
|
}
|
},
|
async mounted() {
|
let sql=""
|
let flag=2
|
|
sql="{call AXJ_a_largeScreen_order_tableHead_select()}"
|
await this.loadAjxss('大屏丝印表头查询',sql,flag,"tableHead")
|
await this.getTableData('丝印') // 丝印
|
await this.getMachineElectric('丝印','5')
|
this.onmouseMove()
|
|
},
|
created() {
|
switch (this.machineLocal) {
|
case 0:
|
this.machineScreen=8
|
break;
|
case 1:
|
this.machineScreen=8
|
break;
|
}
|
},
|
|
})
|
|
|
|
|
</script>
|
|
|
</html>
|