Commit a9618466 authored by 李苏's avatar 李苏 💬

大屏接口调整对接

parent 00928b60
......@@ -40,8 +40,10 @@ ul,ol{
.allnav{
height: 100%;
}
#chartJdshCirle{
height: 1.6rem!important;
width: 1.6rem!important;
}
/*第三栏头部*/
.rightTop{
width: 100%;
......
......@@ -141,23 +141,30 @@
});
}
/* 静电手环 */
function apiqueryringpoint(){
function apiqueryringpoint(chartJdshCirle){
let $point=$(".allnav-right ul li").children()
let $point1=$(".allnav-right ul li>div").children()
console.log($point)
let shdata={}
shdata.g=0
shdata.r=0
shdata.s=0
HTTP.post("/mes/kmes/point/queryringpoint", {}, function(result) {
if (result['success']) {
let data=result.data.records
data.forEach(function(e,index){
if(e.value==0){
shdata.g++
$($point[index]).css("background-color","greenyellow");
}else if(e.value==1){
$($point[index]).css("background-color","red");
shdata.r++
}else{
$($point[index]).css("background-color","skyblue");
shdata.s++
}
$($point1[index]).html(e.itemId)
})
setchartJdshCirle(chartJdshCirle,shdata)
} else {
console.log("请求失败")
}
......
......@@ -2206,7 +2206,51 @@ function setDailyDataEchart(chart,apidata) {
chart.setOption(ops,true);
}
/* 手环展示 */
function setchartJdshCirle(chartJdshCirle,apidata){
var option = {
color:['greenyellow','red','skyblue'],
tooltip: {
trigger: 'item'
},
legend: {
top: '5%',
left: 'center'
},
series: [
{
type: 'pie',
radius: ['40%', '70%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 10,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: true,
fontSize: '40',
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [
{ value: apidata.g||0},
{ value: apidata.r||0},
{ value: apidata.s||0},
]
}
]
};
chartJdshCirle.setOption(option);
}
/*合格率*/
function setHglEchart(chart,apidata) {
......
......@@ -57,7 +57,7 @@
<div class="bottom-b">
<div id="chartJdsh" class="allnav">
<div class="allnav-left">
<div class="circle circle-normal" id="chartJdshCirle" ></div>
<div class="circle " id="chartJdshCirle" ></div>
<ul class="allnav-circle">
<li>
<span class="circle circle-small circle-normal"></span>
......@@ -320,7 +320,7 @@
var chartHgl=echarts.init(document.getElementById("chartHgl"));
var chartRjh=echarts.init(document.getElementById("chartRjh"));
var chartYjh=echarts.init(document.getElementById("chartYjh"));
var chartJdshCirle=$("#chartJdshCirle");
var chartJdshCirle=echarts.init(document.getElementById("chartJdshCirle"));
setTimeProductionEchart(myChartSdcl); /*时段产量*/
setDailyDataEchart(chartRpcdcsj); /*日排产达成数据*/
// setHglEchart(chartHgl);/*合格率*/
......@@ -330,6 +330,7 @@
speed: 60, //数值越大,速度越慢
rowHeight: 46 //li的高度
});
/* 调用 */
function getAlldata(){
apisetTimeProductionEchart(myChartSdcl)
......@@ -338,7 +339,7 @@
apisetPieDailyCharty(chartYjh)
apisetHglEchart(chartHgl)
apiqueryWo()
apiqueryringpoint()
apiqueryringpoint(chartJdshCirle)
}
getAlldata()
getVideo()
......
......@@ -74,15 +74,15 @@
<div class="bottom-b">
<div id="chartJdsh" class="allnav">
<div class="allnav-left">
<div class="circle circle-normal" id="chartJdshCirle" ></div>
<div class="circle" id="chartJdshCirle" ></div>
<ul class="allnav-circle">
<li>
<span class="circle circle-small circle-normal"></span>
<span>正常</span>
</li>
<li>
<span class="circle circle-small circle-close"></span>
<span>关闭</span>
<span class="circle circle-small circle-info"></span>
<span>警告</span>
</li>
<li>
<span class="circle circle-small circle-offine"></span>
......@@ -347,7 +347,7 @@
var chartHgl=echarts.init(document.getElementById("chartHgl"));
var chartRjh=echarts.init(document.getElementById("chartRjh"));
var chartYjh=echarts.init(document.getElementById("chartYjh"));
var chartJdshCirle=$("#chartJdshCirle");
var chartJdshCirle=echarts.init(document.getElementById("chartJdshCirle"));
setTimeProductionEchart(myChartSdcl); /*时段产量*/
setDailyDataEchart(chartRpcdcsj); /*日排产达成数据*/
setHglEchart(chartHgl);/*合格率*/
......@@ -368,7 +368,7 @@
apisetPieDailyCharty(chartYjh)
apisetHglEchart(chartHgl)
apiqueryWo()
apiqueryringpoint()
apiqueryringpoint(chartJdshCirle)
apiqueryWorkingWO()
}
apiqueryWorkingWO()
......
......@@ -256,7 +256,6 @@
var chartHgl=echarts.init(document.getElementById("chartHgl"));
var chartRjh=echarts.init(document.getElementById("chartRjh"));
var chartYjh=echarts.init(document.getElementById("chartYjh"));
var chartJdshCirle=$("#chartJdshCirle");
setTimeProductionEchart(myChartSdcl); /*时段产量*/
setDailyDataEchart(chartRpcdcsj); /*日排产达成数据*/
setHglEchart(chartHgl);/*合格率*/
......
......@@ -193,7 +193,7 @@
<div class="bottom-b">
<div id="chartJdsh" class="allnav">
<div class="allnav-left">
<div class="circle circle-normal" id="chartJdshCirle" ></div>
<div class="circle" id="chartJdshCirle" ></div>
<ul class="allnav-circle">
<li>
<span class="circle circle-small circle-normal"></span>
......@@ -296,7 +296,7 @@
var chartRjh=echarts.init(document.getElementById("chartRjh"));
var chartYjh=echarts.init(document.getElementById("chartYjh"));
var chartHgl=echarts.init(document.getElementById("chartRpcHgl"));
var chartJdshCirle=$("#chartJdshCirle");
var chartJdshCirle=echarts.init(document.getElementById("chartJdshCirle"));
setTimeProductionEchart(myChartSdcl); /*时段产量*/
setRpcHglEchart(chartHgl);/*日排产&合格率*/
setPieDailyChart(chartRjh,80);/*日计划*/
......@@ -312,7 +312,7 @@
apisetPieDailyCharty(chartYjh)
apisetRpcHglEchart(chartHgl)
apiqueryWo()
apiqueryringpoint()
apiqueryringpoint(chartJdshCirle)
}
getAlldata()
getVideo()
......
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