Commit 042ca33b authored by Kimber's avatar Kimber

'update'

parent cd385997
...@@ -90,18 +90,18 @@ ...@@ -90,18 +90,18 @@
<div class="flex-1 ml15 flex-text ovh"> <div class="flex-1 ml15 flex-text ovh">
<!-- 视频监控 --> <!-- 视频监控 -->
<div class="flex-1"> <div class="flex-1">
<!-- 井下24小时人数变化趋势 --> <!-- 矿山24小时人数变化趋势 -->
<div> <div>
<!-- <div class="relative"> <!-- <div class="relative">
<img class="wp100" style="height: 52px;" src="../static/sub-title-1-s.png" alt=""> <img class="wp100" style="height: 52px;" src="../static/sub-title-1-s.png" alt="">
<div class="poa-cover"> <div class="poa-cover">
<div class="ml40 f20 color-theme" style="margin-top: -4px;">井下24小时人数变化趋势</div> <div class="ml40 f20 color-theme" style="margin-top: -4px;">矿山24小时人数变化趋势</div>
</div> </div>
</div> --> </div> -->
<div class="relative"> <div class="relative">
<img class="wp100" style="height: 0px;" src="../static/sub-title-1-s.png" alt=""> <img class="wp100" style="height: 0px;" src="../static/sub-title-1-s.png" alt="">
<div class=""> <div class="">
<div class="mb20 f20 color-theme" >井下24小时人数变化趋势</div> <div class="mb20 f20 color-theme" >矿山24小时人数变化趋势</div>
</div> </div>
</div> </div>
<!-- <div class="flex-text" style="height: 0px;"> <!-- <div class="flex-text" style="height: 0px;">
...@@ -338,6 +338,12 @@ ...@@ -338,6 +338,12 @@
myChart.clear() // 定时刷新 实际不刷新 演示用 myChart.clear() // 定时刷新 实际不刷新 演示用
// 绘制图表 // 绘制图表
myChart.setOption({ myChart.setOption({
legend: {
textStyle: {
color: '#fff', // 设置字体颜色
fontSize: 14 // 设置字体大小
}
},
xAxis: { xAxis: {
data: ["01时", "02时", "03时", "04时", "05时", "06时", "07时", "08时", "09时", "10时", "11时", "12时", "13时", "14时", "15时", "16时", "17时", "18时", "19时", "20时", "21时", "22时", "23时", "24时"], data: ["01时", "02时", "03时", "04时", "05时", "06时", "07时", "08时", "09时", "10时", "11时", "12时", "13时", "14时", "15时", "16时", "17时", "18时", "19时", "20时", "21时", "22时", "23时", "24时"],
axisLine: { lineStyle: { color: '#a3e4f5' } }, axisLine: { lineStyle: { color: '#a3e4f5' } },
...@@ -402,17 +408,17 @@ ...@@ -402,17 +408,17 @@
} }
], ],
series: [ series: [
//{
// name: "人数",
// type: "line",
// smooth: true,
// data: [180, 210, 150, 280, 235, 500, 390, 410, 150, 180, 210, 150, 280, 235, 500, //390, 410, 150, 180, 210, 150, 280, 235, 500],
// itemStyle: {
// color: '#6dd1b9'
// }
//},
{ {
name: "人数", name: "井下",
type: "line",
smooth: true,
data: [180, 210, 150, 280, 235, 500, 390, 410, 150, 180, 210, 150, 280, 235, 500, 390, 410, 150, 180, 210, 150, 280, 235, 500],
itemStyle: {
color: '#6dd1b9'
}
},
{
name: "人数",
type: "line", type: "line",
smooth: true, smooth: true,
data: [60, 90, 80, 100, 60, 65, 45, 50, 48, 60, 90, 80, 100, 60, 65, 45, 50, 48, 60, 90, 80, 100, 60, 65], data: [60, 90, 80, 100, 60, 65, 45, 50, 48, 60, 90, 80, 100, 60, 65, 45, 50, 48, 60, 90, 80, 100, 60, 65],
...@@ -421,13 +427,13 @@ ...@@ -421,13 +427,13 @@
} }
}, },
{ {
name: "人数", name: "地上",
type: "line", type: "line",
smooth: true, smooth: true,
data: [55, 48, 40, 60, 50, 55, 58, 63, 50, 55, 48, 40, 60, 50, 55, 58, 63, 50, 55, 48, 40, 60, 50, 55], data: [55, 48, 40, 60, 50, 55, 58, 63, 50, 55, 48, 40, 60, 50, 55, 58, 63, 50, 55, 48, 40, 60, 50, 55],
itemStyle: { itemStyle: {
color: '#fca83b' color: '#fca83b'
} }
} }
] ]
}); });
......
...@@ -219,6 +219,9 @@ ...@@ -219,6 +219,9 @@
}, },
methods: { methods: {
changeSensor(item) { changeSensor(item) {
console.log('changeSensor ________________ ', item);
this.currentSensorId = item.equipNo || 'test' this.currentSensorId = item.equipNo || 'test'
this.getTableList() this.getTableList()
this.getChartsData(); this.getChartsData();
...@@ -264,6 +267,12 @@ ...@@ -264,6 +267,12 @@
}, },
getChartsData() { getChartsData() {
console.log('getChartsData ________________ ', 1111111111);
const yAxisOption = { const yAxisOption = {
name: "人数", name: "人数",
type: "line", type: "line",
...@@ -380,7 +389,6 @@ ...@@ -380,7 +389,6 @@
}); });
// 视频列表 // 视频列表
Axiosx.get(host + '/data/mp/imghistory', { Axiosx.get(host + '/data/mp/imghistory', {
params: { params: {
...@@ -397,14 +405,16 @@ ...@@ -397,14 +405,16 @@
chartsOption.yAxis[1].max = max chartsOption.yAxis[1].max = max
chartsOption.yAxis[1].min = -max chartsOption.yAxis[1].min = -max
} }
chartsOption.xAxis.data = result.xData.data chartsOption.xAxis.data = result.xData.data
var colors = ['#7CB5EC', '#90ED7D', '#F7A35C', '#8085E9'];
chartsOption.series = result.yData.map((item, index) => { chartsOption.series = result.yData.map((item, index) => {
var tempObj = JSON.parse(JSON.stringify(yAxisOption)); var tempObj = JSON.parse(JSON.stringify(yAxisOption));
tempObj.data = item.data tempObj.data = item.data
tempObj.name = item.name tempObj.name = item.name
tempObj.itemStyle.color = colors[index];
tempObj.markLine.data = item.alarm tempObj.markLine.data = item.alarm
return tempObj return tempObj
}) })
......
...@@ -92,11 +92,11 @@ export default { ...@@ -92,11 +92,11 @@ export default {
}, },
created() { created() {
this.dataList = [ this.dataList = [
{id:1, name:'应急管理', defIcon:'icon1.png', actIcon:'icon2.png', hover: false}, {id:5, name:'生态环境', defIcon:'icon5.png', actIcon:'icon6.png', hover: false},
{id:2, name:'电子档案馆', defIcon:'icon9.png', actIcon:'icon10.png', hover: false}, {id:2, name:'电子档案馆', defIcon:'icon9.png', actIcon:'icon10.png', hover: false},
{id:3, name:'自然资源', defIcon:'icon3.png', actIcon:'icon4.png', hover: false}, {id:3, name:'自然资源', defIcon:'icon3.png', actIcon:'icon4.png', hover: false},
{id:4, name:'水利系统', defIcon:'icon7.png', actIcon:'icon8.png', hover: false}, {id:4, name:'水利系统', defIcon:'icon7.png', actIcon:'icon8.png', hover: false},
{id:5, name:'生态环境', defIcon:'icon5.png', actIcon:'icon6.png', hover: false}, {id:1, name:'应急管理', defIcon:'icon1.png', actIcon:'icon2.png', hover: false},
] ]
// // 按照不同域名加载不同页面样式(企业、应急局),加载完毕后再显示页面 // // 按照不同域名加载不同页面样式(企业、应急局),加载完毕后再显示页面
// const host = window.location.host; // const host = window.location.host;
...@@ -125,7 +125,7 @@ export default { ...@@ -125,7 +125,7 @@ export default {
} else if (type === "自然资源") { } else if (type === "自然资源") {
// location.href = process.env.NODE_ENV + '' // location.href = process.env.NODE_ENV + ''
// location.href = 'http://192.168.3.226:8057/datav/natural.html' // location.href = 'http://192.168.3.226:8057/datav/natural.html'
location.href = host + "/datav/natural.html"; //location.href = host + "/datav/natural.html";
} else if (type === "水利系统") { } else if (type === "水利系统") {
// location.href = host + "/datav/watersource.html"; // location.href = host + "/datav/watersource.html";
} else if (type === "电子档案馆") { } else if (type === "电子档案馆") {
......
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