Commit 1c34c412 by 红发

电站效率改为电站发电量

月突发时间修改为设备故障统计
parent 505d39e1
This diff is collapsed. Click to expand it.
...@@ -372,15 +372,7 @@ ...@@ -372,15 +372,7 @@
var map = new ol.Map({ var map = new ol.Map({
target: 'map-container', target: 'map-container',
layers: [ layers: [
// new ol.layer.Tile({
// id: "tileSatellite",
// type: "raster",
// // source: new XYZ({
// source: new ol.source.XYZ({
// // url: "/map/{z}/{x}/{y}.png",
// url: "http://t3.tianditu.com/DataServer?T=img_w&tk=eff9a8168f2e8158b71581813ff99d80&x={x}&y={y}&l={z}",
// }),
// }),
new ol.layer.Tile({ new ol.layer.Tile({
id: "bla", id: "bla",
type: "raster", type: "raster",
...@@ -401,22 +393,7 @@ ...@@ -401,22 +393,7 @@
maxZoom: 20, maxZoom: 20,
}) })
}); });
// {
// "type": "Feature",
// "properties": {
// "id": 1,
// "Name": "国家电投澄城璞地光伏发电站",
// "Desc": null,
// "Address": null
// },
// "geometry": {
// "type": "Point",
// "coordinates": [
// 109.989707717209782,
// 35.130936020636923
// ]
// }
// }
let stationMarker = new ol.Feature({ let stationMarker = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([109.989707717209782, 35.130936020636923])), geometry: new ol.geom.Point(ol.proj.fromLonLat([109.989707717209782, 35.130936020636923])),
name: "国家电投澄城璞地光伏发电站", name: "国家电投澄城璞地光伏发电站",
...@@ -542,7 +519,7 @@ ...@@ -542,7 +519,7 @@
<!-- 右侧面板 --> <!-- 右侧面板 -->
<div class="sudden"> <div class="sudden">
<h4>月突发事件</h4> <h4>故障数量统计</h4>
<!-- <img src="./images/lift1.png" alt=""> --> <!-- <img src="./images/lift1.png" alt=""> -->
<div id="emergency" style="width: 440px;height: 350px;margin-top: -45px;"></div> <div id="emergency" style="width: 440px;height: 350px;margin-top: -45px;"></div>
</div> </div>
...@@ -555,7 +532,7 @@ ...@@ -555,7 +532,7 @@
</div> </div>
<!-- 发电量功率展示 --> <!-- 发电量功率展示 -->
<div class="capacity"> <div class="capacity">
<h4>电站效率</h4> <h4>电站发电量</h4>
<div class="perform"> <div class="perform">
<div class="finishing"> <div class="finishing">
<div id="predict" style="width: 130px;height: 130px;"></div> <div id="predict" style="width: 130px;height: 130px;"></div>
...@@ -581,10 +558,7 @@ ...@@ -581,10 +558,7 @@
</div> </div>
<!-- <div class="accumulated" id="aggregate-value">累计发电量:0万kWh</div> --> <!-- <div class="accumulated" id="aggregate-value">累计发电量:0万kWh</div> -->
</div> </div>
<!-- 底部效果 -->
<!-- <div class="footer">
<img src="./images/bottom.png" alt="">
</div> -->
<script type="text/javascript"> <script type="text/javascript">
// 获取当前时间 // 获取当前时间
...@@ -679,13 +653,7 @@ ...@@ -679,13 +653,7 @@
labelLine: { labelLine: {
show: false, show: false,
}, },
// data: [
// { value: 348, name: '维修工单' },
// { value: 735, name: '巡检工单' },
// { value: 580, name: '完结工单' },
// { value: 484, name: '待办工单' },
// { value: 300, name: '新增工单' },
// ]
data: orderData data: orderData
} }
] ]
...@@ -696,7 +664,7 @@ ...@@ -696,7 +664,7 @@
} }
</script> </script>
<!-- 突发事件 --> <!-- 设备故障统计 -->
<script type="text/javascript"> <script type="text/javascript">
var emergencyDom = document.getElementById('emergency'); var emergencyDom = document.getElementById('emergency');
...@@ -718,10 +686,10 @@ ...@@ -718,10 +686,10 @@
// 获取当前月份天数 // 获取当前月份天数
var days = getDays()[0] - getDays()[1]; var days = getDays()[0] - getDays()[1];
console.log(days); console.log(days);
let daysList = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '14', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'] let daysList = [ '逆变器', '箱变', '汇流箱']
// let showDataList = [10, 52, 20, 34, 30, 33, 22, 10, 52, 20, 34, 39, 30, 20, 2, 10, 52, 20, 33, 30, 30, 20, 10, 2, 40, 34, 9, 37, 70, 10, 23]
let showDataList = Array(days).fill(0) let showDataList = Array(days).fill(0)
let emergencyOption = { let emergencyOption = {
color: '#0079fe', color: '#0079fe',
tooltip: { tooltip: {
...@@ -740,8 +708,7 @@ ...@@ -740,8 +708,7 @@
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
// data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '14', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'], data: daysList,
data: daysList.slice(0, days),
axisTick: { axisTick: {
alignWithLabel: true alignWithLabel: true
}, },
...@@ -791,12 +758,71 @@ ...@@ -791,12 +758,71 @@
], ],
series: [ series: [
{ {
name: '今日突发事件', name: '危机',
type: 'bar',
itemStyle: {
normal: {
show: true,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#f7734e'
}, {
offset: 1,
color: '#e12945'
}]),
// barBorderRadius: 50,
borderWidth: 0,
}
},
zlevel: 2,
barWidth: '10%',
data: [8, 15, 10]
},
{
name: '紧急',
type: 'bar', type: 'bar',
barWidth: '60%', barWidth: '10%',
// data: [10, 52, 20, 34, 30, 33, 22, 10, 52, 20, 34, 39, 30, 20, 2, 10, 52, 20, 33, 30, 30, 20, 10, 2, 40, 34, 9, 37, 70, 10, 23], itemStyle: {
data: showDataList.slice(0, days), normal: {
show: true,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#96d668'
}, {
offset: 1,
color: '#01babc'
}]),
// barBorderRadius: 50,
borderWidth: 0,
}
},
zlevel: 2,
barGap: '100%',
data: [8, 17, 26]
}, },
{
name: '一般',
type: 'bar',
barWidth: '10%',
itemStyle: {
normal: {
show: true,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#1a98f8'
}, {
offset: 1,
color: '#7049f0'
}]),
// barBorderRadius: 50,
borderWidth: 0,
}
},
zlevel: 2,
barGap: '100%',
data: [8, 17, 26]
}
] ]
}; };
...@@ -1623,38 +1649,7 @@ ...@@ -1623,38 +1649,7 @@
}); });
} }
// 更新突发事件数据
function updateEmergencyData() {
loadDataStatus.updateEmergencyData = true
$.ajax({
type: "GET",
url: "/api/blade-inspectionWorkOrder/inspectionWorkOrder/list?type=4&current=1&size=100",
success: function (result) {
console.log('updateEmergencyData', result);
let records = result.data.records
// res 为当前天数列表,全部为0
let currDays = getDays()[0] - getDays()[1]
let res = new Array(currDays).fill(0)
let currMonth = new Date().getMonth() + 1
records.forEach(item => {
// 获取 item.createTime 的月份并检查是否为当前月份
let createTime = new Date(item.createTime)
let createMonth = createTime.getMonth() + 1
if (createMonth == currMonth) {
res[createTime.getDate() - 1] += 1
}
});
console.log('res', res);
emergencyOption.xAxis[0].data = daysList.slice(0, currDays)
emergencyOption.series[0].data = res.slice(0, currDays)
emergencyChart.setOption(emergencyOption);
},
// 失败或者超时的回调函数
error: function (xhr, status, error) {
loadDataStatus.updateEmergencyData = false
}
});
}
// 更新全部工单完成率 // 更新全部工单完成率
// api/blade-deviceAccount/deviceAccount/list?current=1&size=10 // api/blade-deviceAccount/deviceAccount/list?current=1&size=10
......
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