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

添加接口

parent 4a65bae7
/* 获取真实数据 */
function apiCurProZtsl(chart){
HTTP.post("queryCurProZtsl", {}, function(result) {
if (result['success']) {
let data=result.data.records
let newdata=[]
newdata.push(data["KWELL002"]||0)
newdata.push(data["KWELL003"]||0)
newdata.push(data["KWELL004"]||0)
newdata.push(data["KWELL005"]||0)
setproduceEchart(chart,newdata)
} else {
console.log("请求失败")
}
});
}
//安全生产天数
function apigetscts(dom){
HTTP.post("querySafeDays", {}, function(result) {
if (result['success']) {
let data=result.data.records
dom.text("安全生产天数"+data||'0'+"天")
} else {
console.log("请求失败")
}
});
}
//时段产量
function apisetTimeProductionEchart(myChartSdcl){
HTTP.post("queryWeekPcsl", {}, function(result) {
......
......@@ -2025,7 +2025,7 @@ chart.setOption(option, true);
}
/*在制品状态图表*/
function setproduceEchart(chart) {
function setproduceEchart(chart,apidata) {
option = {
barWidth: 30,
color: ["#A2E9FF", "#409eff"],
......@@ -2081,7 +2081,7 @@ function setproduceEchart(chart) {
},
series: [
{
data: [120, 200, 150, 80],
data: apidata||[120, 200, 150, 80],
type: 'bar',
label: {
show: true,
......
......@@ -31,7 +31,7 @@
<div style="width: 100%;height: 50%;">
数字化柔性自动生产车间看板
</div>
<div style="width: 100%;font-size: .2rem;height: .3rem;line-height: .3rem;margin-top: -0.2rem;">
<div id="aqscts" style="width: 100%;font-size: .2rem;height: .3rem;line-height: .3rem;margin-top: -0.2rem;">
安全生产天数:0
</div>
</div>
......@@ -371,6 +371,8 @@
}
/* 调用 */
function getAlldata(){
apigetscts($("#aqscts"))
apiCurProZtsl(chartTzzp)
apisetRpcHglEchart(chartRpcdcsj,'rcl')
// apisetTimeProductionEchart(myChartSdcl)
// apisetDailyDataEchart(chartRpcdcsj)
......
......@@ -43,7 +43,7 @@
<div style="width: 100%;height: 50%;">
数字化柔性自动生产车间看板
</div>
<div style="width: 100%;font-size: .2rem;height: .3rem;line-height: .3rem;margin-top: -0.2rem;">
<div id="aqscts" style="width: 100%;font-size: .2rem;height: .3rem;line-height: .3rem;margin-top: -0.2rem;">
安全生产天数:0
</div>
</div>
......@@ -388,6 +388,7 @@
chartJdshCirle.resize()
}
function getAlldata(){
apigetscts($("#aqscts"))
apisetTimeProductionEchart(myChartSdcl)
apisetDailyDataEchart(chartRpcdcsj)
apisetPieDailyChart(chartRjh)
......
......@@ -17,7 +17,7 @@
<div style="width: 100%;height: 50%;">
数字化柔性自动生产车间看板
</div>
<div style="width: 100%;font-size: .2rem;height: .3rem;line-height: .3rem;margin-top: -0.2rem;">
<div id="aqscts" style="width: 100%;font-size: .2rem;height: .3rem;line-height: .3rem;margin-top: -0.2rem;">
安全生产天数:0
</div>
</div>
......@@ -275,6 +275,7 @@
});
getVideo()
function getAlldata(){
apigetscts($("#aqscts"))
apisetTimeProductionEchart(myChartSdcl)
apisetDailyDataEchart(chartRpcdcsj)
apisetPieDailyChart(chartRjh)
......
......@@ -31,7 +31,7 @@
<div style="width: 100%;height: 50%;">
数字化柔性自动生产车间看板
</div>
<div style="width: 100%;font-size: .2rem;height: .3rem;line-height: .3rem;margin-top: -0.2rem;">
<div id="aqscts" style="width: 100%;font-size: .2rem;height: .3rem;line-height: .3rem;margin-top: -0.2rem;">
安全生产天数:0
</div>
</div>
......@@ -332,6 +332,7 @@
chartJdshCirle.resize()
}
function getAlldata(){
apigetscts($("#aqscts"))
apisetTimeProductionEchart(myChartSdcl)
apisetPieDailyChart(chartRjh)
apisetPieDailyCharty(chartYjh)
......
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