Commit 767162bb authored by 李苏's avatar 李苏 💬

大屏数据变更

parent 63cc5851
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
padding: .1rem .2rem .1rem .2rem; padding: .1rem .2rem .1rem .2rem;
} }
.center .center-left{ .center .center-left{
width: 25%; width: 30%;
padding: .1rem; padding: .1rem;
/* border: 1px solid red;*/ /* border: 1px solid red;*/
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
margin-top: 0.1rem; margin-top: 0.1rem;
} }
.center .center-cen{ .center .center-cen{
width: 50%; width: 40%;
padding: .1rem; padding: .1rem;
} }
.center .center-cen .cen-top{ .center .center-cen .cen-top{
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
} }
.center .center-right{ .center .center-right{
width: 25%; width: 30%;
padding: .1rem; padding: .1rem;
} }
...@@ -308,7 +308,7 @@ ...@@ -308,7 +308,7 @@
display: block; display: block;
float: left; float: left;
height: .2rem; height: .2rem;
width: 12.5%; width: 14.28%;
/*background: red;*/ /*background: red;*/
/*margin: 15px 10px 10px 10px;*/ /*margin: 15px 10px 10px 10px;*/
/*padding: 20px;*/ /*padding: 20px;*/
...@@ -365,7 +365,7 @@ ...@@ -365,7 +365,7 @@
display: inline-block; display: inline-block;
/* float: left; */ /* float: left; */
/* height: 20px; */ /* height: 20px; */
width: 12.5%; width: 14.28%;
color: #ffffff; color: #ffffff;
float: left; float: left;
overflow: hidden; overflow: hidden;
......
/* 获取真实数据 */ /* 获取真实数据 */
//时段产量 //时段产量
function apisetTimeProductionEchart(myChartSdcl){ function apisetTimeProductionEchart(myChartSdcl){
HTTP.post("querySdcl", {}, function(result) { HTTP.post("queryWeekPcsl", {}, function(result) {
if (result['success']) { if (result['success']) {
let data={} let data={}
data.xseriesList=result.data.records.xseriesList||[] data.xseriesList=result.data.records.map(e=>new Date(e.pcrq).toLocaleDateString().split('/').join('-').slice(5))
data.timeperiodMount=result.data.records.timeperiodMount||[] data.timeperiodMount=result.data.records.map(e=>e.wgsl)
console.log(data)
setTimeProductionEchart(myChartSdcl,data); /*时段产量*/ setTimeProductionEchart(myChartSdcl,data); /*时段产量*/
} else { } else {
console.log("请求失败") console.log("请求失败")
...@@ -125,7 +126,7 @@ ...@@ -125,7 +126,7 @@
"</span>"+ "</span>"+
"<span>"+djid+"</span>"+ "<span>"+djid+"</span>"+
"<span>"+wlxxCode+"</span>"+ "<span>"+wlxxCode+"</span>"+
"<span>"+wlxxName+"</span>"+ // "<span>"+wlxxName+"</span>"+
"<span>"+pcsl+"</span>"+ "<span>"+pcsl+"</span>"+
"<span>"+wgsl+"</span>"+ "<span>"+wgsl+"</span>"+
"<span>"+ywrq+"</span>"+ "<span>"+ywrq+"</span>"+
...@@ -162,7 +163,7 @@ ...@@ -162,7 +163,7 @@
$($point[index]).css("background-color","skyblue"); $($point[index]).css("background-color","skyblue");
shdata.s++ shdata.s++
} }
$($point1[index]).html(e.itemId) $($point1[index]).html(e.name)
}) })
setchartJdshCirle(chartJdshCirle,shdata) setchartJdshCirle(chartJdshCirle,shdata)
} else { } else {
......
...@@ -1940,6 +1940,7 @@ $(function () { ...@@ -1940,6 +1940,7 @@ $(function () {
}); });
/*时段产量图表*/ /*时段产量图表*/
function setTimeProductionEchart(chart,apidata) { function setTimeProductionEchart(chart,apidata) {
console.log(apidata)
if(apidata){ if(apidata){
var list=[] var list=[]
apidata.xseriesList.forEach(function(e,index){ apidata.xseriesList.forEach(function(e,index){
...@@ -2022,7 +2023,7 @@ function setTimeProductionEchart(chart,apidata) { ...@@ -2022,7 +2023,7 @@ function setTimeProductionEchart(chart,apidata) {
type: 'category', type: 'category',
data: dateList, data: dateList,
axisLabel: { axisLabel: {
interval: 1, interval: 0,
tooltip: { tooltip: {
show: true, show: true,
}, },
...@@ -2031,26 +2032,26 @@ function setTimeProductionEchart(chart,apidata) { ...@@ -2031,26 +2032,26 @@ function setTimeProductionEchart(chart,apidata) {
fontSize: 12 fontSize: 12
}, },
color: 'rgba(255,255,255,0.6)', color: 'rgba(255,255,255,0.6)',
formatter:function(value){ // formatter:function(value){
var str = ""; // var str = "";
var num = 6; //每行显示字数 // var num = 4; //每行显示字数
var valLength = value.length; //该项x轴字数 // var valLength = value.length; //该项x轴字数
var rowNum = Math.ceil(valLength / num); // 行数 // var rowNum = Math.ceil(valLength / num); // 行数
if(rowNum > 1) { // if(rowNum > 1) {
for(var i = 0; i < rowNum; i++) { // for(var i = 0; i < rowNum; i++) {
var temp = ""; // var temp = "";
var start = i * num; // var start = i * num;
var end = start + num; // var end = start + num;
temp = value.substring(start, end) + "\n"; // temp = value.substring(start, end) + "\n";
str += temp; // str += temp;
} // }
return str; // return str;
} else { // } else {
return value; // return value;
} // }
} // }
}, },
axisTick: { axisTick: {
show: false show: false
...@@ -2064,6 +2065,8 @@ function setTimeProductionEchart(chart,apidata) { ...@@ -2064,6 +2065,8 @@ function setTimeProductionEchart(chart,apidata) {
}, },
yAxis: [{ yAxis: [{
type: 'value', type: 'value',
min: 0.0,
max: 50.0,
splitLine: { splitLine: {
show: false, show: false,
lineStyle: { lineStyle: {
......
...@@ -32,7 +32,9 @@ ...@@ -32,7 +32,9 @@
</div> </div>
<div class="header-img"></div> <div class="header-img"></div>
</div> </div>
<div class="header-right fl"></div> <div class="header-right fl" style="line-height: 1.05rem;text-align:center;">
<span>温度:22°C</span>&nbsp;&nbsp;<span>湿度:12%rh</span>
</div>
<div class="header-bottom fl"></div> <div class="header-bottom fl"></div>
</div> </div>
...@@ -41,7 +43,7 @@ ...@@ -41,7 +43,7 @@
<div class="center-left fl"> <div class="center-left fl">
<div class="left-top rightTop border"> <div class="left-top rightTop border">
<!--<h1 id="ceshi">数据可视化</h1>--> <!--<h1 id="ceshi">数据可视化</h1>-->
<div class="title">时段产量</div> <div class="title">产量</div>
<div class="bottom-b"> <div class="bottom-b">
<div id="chartSdcl" class="allnav"></div> <div id="chartSdcl" class="allnav"></div>
</div> </div>
...@@ -114,7 +116,6 @@ ...@@ -114,7 +116,6 @@
<span>序号</span> <span>序号</span>
<span>订单号</span> <span>订单号</span>
<span>物料</span> <span>物料</span>
<span>描述</span>
<span>计划</span> <span>计划</span>
<span>完工</span> <span>完工</span>
<span>订单时间</span> <span>订单时间</span>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</div> </div>
</div> </div>
<div class="left-bottom rightTop border"> <div class="left-bottom rightTop border">
<div class="title">时段产量</div> <div class="title">产量</div>
<div class="bottom-b"> <div class="bottom-b">
<div id="chartSdcl" class="allnav"></div> <div id="chartSdcl" class="allnav"></div>
</div> </div>
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<span>序号</span> <span>序号</span>
<span>订单号</span> <span>订单号</span>
<span>物料</span> <span>物料</span>
<span>描述</span> <!-- <span>描述</span> -->
<span>计划</span> <span>计划</span>
<span>完工</span> <span>完工</span>
<span>订单时间</span> <span>订单时间</span>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</video> </video>
</div> </div>
<div class="cen-bottom rightTop border" style="width: calc(50% - 0.1rem);float: left;margin-right: 0.1rem"> <div class="cen-bottom rightTop border" style="width: calc(50% - 0.1rem);float: left;margin-right: 0.1rem">
<div class="title">时段产量</div> <div class="title">产量</div>
<div class="bottom-b"> <div class="bottom-b">
<div id="chartSdcl" class="allnav"></div> <div id="chartSdcl" class="allnav"></div>
</div> </div>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<span>序号</span> <span>序号</span>
<span>订单号</span> <span>订单号</span>
<span>物料</span> <span>物料</span>
<span>描述</span> <!-- <span>描述</span> -->
<span>计划</span> <span>计划</span>
<span>完工</span> <span>完工</span>
<span>订单时间</span> <span>订单时间</span>
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<span>序号</span> <span>序号</span>
<span>订单号</span> <span>订单号</span>
<span>物料</span> <span>物料</span>
<span>描述</span> <!-- <span>描述</span> -->
<span>计划</span> <span>计划</span>
<span>完工</span> <span>完工</span>
<span>订单时间</span> <span>订单时间</span>
...@@ -235,7 +235,7 @@ ...@@ -235,7 +235,7 @@
</div> </div>
</div> </div>
<div class="right-bottom rightTop border"> <div class="right-bottom rightTop border">
<div class="title">时段产量</div> <div class="title">产量</div>
<div class="bottom-b"> <div class="bottom-b">
<div id="chartSdcl" class="allnav"></div> <div id="chartSdcl" class="allnav"></div>
</div> </div>
......
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