@@ -32,7 +32,7 @@ import * as echarts from 'echarts'
let myChart4 = null
let myChart5 = null
-const myChart6 = null
+let myChart6 = null
export default {
props: {
id: {
@@ -46,12 +46,12 @@ export default {
default() {
return ''
}
- }
+ },
},
data() {
return {
config: config,
- info: {}
+ info: {},
}
},
mounted() {
@@ -73,7 +73,7 @@ export default {
'/map/getById',
{
id: this.id,
- TYPE: this.type
+ TYPE: this.type,
}
).then((data) => {
this.listLoading = false
@@ -96,7 +96,7 @@ export default {
textStyle: {
fontWeight: 'normal',
fontSize: 16,
- color: '#fff'
+ color: "#fff"
}
},
series: {
@@ -123,60 +123,60 @@ export default {
axisTick: {
show: true,
splitNumber: 5,
- lineStyle: {
- color: '#fff'
+ lineStyle:{
+ color:'#fff'
}
},
splitLine: {
length: 10,
lineStyle: {
width: 5,
- color: '#fff'
+ color:'#fff'
}
},
axisLabel: {
formatter: function(e) {
- switch (e + '') {
- case '0':
- return '北'
- case '45':
- return '东北'
- case '135':
- return '东南'
- case '225':
- return '西南'
- case '315':
- return '西北'
- case '360':
- return '北'
- case '180':
- return '南'
- case '90':
- return '东'
- case '270':
- return '西'
+ switch (e + "") {
+ case "0":
+ return "北";
+ case "45":
+ return "东北";
+ case "135":
+ return "东南";
+ case "225":
+ return "西南"
+ case "315":
+ return "西北";
+ case "360":
+ return "北";
+ case "180":
+ return "南";
+ case "90":
+ return "东";
+ case "270":
+ return "西";
default:
- return e
+ return e;
}
},
distance: -60,
textStyle: {
fontSize: 14,
- fontWeight: '',
- color: '#fff'
+ fontWeight: "",
+ color:'#fff'
}
},
pointer: {
show: true,
- length: '80%',
- width: 5
+ length:'80%',
+ width:5
},
detail: {
formatter: function(param) {
- var level = ''
- if (param > 0 && param < 90) {
+ var level = '';
+ if (param > 0 && param < 90){
level = '东北'
- } else if (param > 90 && param < 180) {
+ } else if (param > 90 && param < 180){
level = '东南'
} else if (param > 180 && param < 270) {
level = '西南'
@@ -191,44 +191,45 @@ export default {
} else if (param == 180) {
level = '正南'
}
- return '当前风向:' + level + '(' + param + '°)'
+ return "当前风向:"+level + "(" + param + "°)";
},
offsetCenter: [0, 190],
textStyle: {
fontSize: 14,
- color: '#fff'
+ color:'#fff'
}
},
data: [data.pd.WINDDIRECTION]
}
- }
+ };
myChart4.setOption(option)
},
initEcharts2(data) {
myChart5 = echarts.init(document.querySelector('#main5'))
- var value = data.pd.TEMPERATURE
- var kd = []
- // 刻度使用柱状图模拟,短设置3,长的设置5;构造一个数据
+ var value = data.pd.TEMPERATURE;
+ var kd = [];
+// 刻度使用柱状图模拟,短设置3,长的设置5;构造一个数据
for (var i = 0, len = 130; i <= len; i++) {
if (i > 100 || i < 30) {
kd.push('0')
} else {
if (i % 5 === 0) {
- kd.push('5')
+ kd.push('5');
} else {
- kd.push('3')
+ kd.push('3');
}
}
+
}
// console.log(kd)
- // 因为柱状初始化为0,温度存在负值,所以,原本的0-100,改为0-130,0-30用于表示负值
+// 因为柱状初始化为0,温度存在负值,所以,原本的0-100,改为0-130,0-30用于表示负值
function getData(value) {
- return [Number(value) + 30]
+ return [Number(value) + 30];
}
console.log(getData(value))
- var data = getData(value + 30)
- var mercuryColor = '#fd4d49'
- var borderColor = '#fd4d49'
+ var data = getData(value + 30);
+ var mercuryColor = '#fd4d49';
+ var borderColor = '#fd4d49';
const option = {
title: {
@@ -237,18 +238,18 @@ export default {
textStyle: {
fontWeight: 'normal',
fontSize: 16,
- color: '#fff'
+ color: "#fff"
}
},
yAxis: [{
show: false,
min: 0,
- max: 130
+ max: 130,
}, {
show: false,
data: [],
min: 0,
- max: 130
+ max: 130,
}],
xAxis: [{
show: false,
@@ -262,7 +263,7 @@ export default {
}, {
show: false,
min: -110,
- max: 100
+ max: 100,
}],
series: [{
@@ -275,7 +276,7 @@ export default {
itemStyle: {
normal: {
color: mercuryColor,
- barBorderRadius: 0
+ barBorderRadius: 0,
}
},
label: {
@@ -284,11 +285,11 @@ export default {
position: 'top',
formatter: function(param) {
// 因为柱状初始化为0,温度存在负值,所以,原本的0-100,改为0-130,0-30用于表示负值
- return (((param.value * 100) - (30 * 100)) / 100) + '°C'
+ return (((param.value * 100) - (30 * 100)) / 100) + '°C';
},
textStyle: {
color: '#ccc',
- fontSize: '10'
+ fontSize: '10',
}
}
},
@@ -303,7 +304,7 @@ export default {
itemStyle: {
normal: {
color: '#ffffff',
- barBorderRadius: 50
+ barBorderRadius: 50,
}
},
z: 1
@@ -317,7 +318,7 @@ export default {
itemStyle: {
normal: {
color: borderColor,
- barBorderRadius: 50
+ barBorderRadius: 50,
}
},
z: 0
@@ -331,7 +332,7 @@ export default {
itemStyle: {
normal: {
color: mercuryColor,
- opacity: 1
+ opacity: 1,
}
},
z: 2
@@ -345,7 +346,7 @@ export default {
itemStyle: {
normal: {
color: '#ffffff',
- opacity: 1
+ opacity: 1,
}
},
z: 1
@@ -359,7 +360,7 @@ export default {
itemStyle: {
normal: {
color: borderColor,
- opacity: 1
+ opacity: 1,
}
},
z: 0
@@ -378,12 +379,12 @@ export default {
formatter: function(params) {
// 因为柱状初始化为0,温度存在负值,所以,原本的0-100,改为0-130,0-30用于表示负值
if (params.dataIndex > 100 || params.dataIndex < 30) {
- return ''
+ return '';
} else {
if (params.dataIndex % 5 === 0) {
- return params.dataIndex - 30
+ return params.dataIndex - 30;
} else {
- return ''
+ return '';
}
}
}
@@ -395,12 +396,12 @@ export default {
itemStyle: {
normal: {
color: borderColor,
- barBorderRadius: 10
+ barBorderRadius: 10,
}
},
z: 0
}]
- }
+ };
myChart5.setOption(option)
},
initEcharts3(data) {
@@ -413,7 +414,7 @@ export default {
textStyle: {
fontWeight: 'normal',
fontSize: 16,
- color: '#fff'
+ color: "#fff"
}
},
series: [
@@ -423,7 +424,7 @@ export default {
min: 0,
max: 30,
splitNumber: 10,
- center: ['50%', '55%'],
+ center:['50%', '55%'],
radius: '73%',
axisLine: {
lineStyle: {
@@ -435,7 +436,7 @@ export default {
distance: -20,
length: 20,
lineStyle: {
- width: 2,
+ width:2,
color: '#0F2D5B'
}
},
@@ -464,7 +465,7 @@ export default {
min: 0,
max: 30,
splitNumber: 10,
- center: ['50%', '55%'],
+ center:['50%', '55%'],
radius: '65%',
axisLine: {
lineStyle: {
@@ -480,17 +481,17 @@ export default {
silent: true,
pointer: {
length: '85%',
- width: 4,
+ width:4,
itemStyle: {
color: 'inherit',
borderWidth: 1,
- borderColor: 'inherit', // '#0D3778',
+ borderColor:'inherit', // '#0D3778',
shadowColor: 'inherit',
shadowBlur: 1
}
},
axisTick: {
- show: false,
+ show:false,
distance: -20,
length: 5,
lineStyle: {
@@ -501,24 +502,24 @@ export default {
distance: -20,
length: 20,
lineStyle: {
- width: 2,
+ width:2,
color: '#0F2D5B'
}
},
axisLabel: {
show: false
},
- title: { // 仪表盘标题。
- show: true, // 是否显示标题,默认 true。
- offsetCenter: [0, '95%'], // 相对于仪表盘中心的偏移位置,数组第一项是水平方向的偏移,第二项是垂直方向的偏移。可以是绝对的数值,也可以是相对于仪表盘半径的百分比。
- color: '#ccc', // 文字的颜色,默认 #333。
- fontSize: 15 // 文字的字体大小,默认 15。
+ title: { // 仪表盘标题。
+ show: true, // 是否显示标题,默认 true。
+ offsetCenter: [0, '95%'], //相对于仪表盘中心的偏移位置,数组第一项是水平方向的偏移,第二项是垂直方向的偏移。可以是绝对的数值,也可以是相对于仪表盘半径的百分比。
+ color: '#ccc', // 文字的颜色,默认 #333。
+ fontSize: 15 // 文字的字体大小,默认 15。
},
detail: {
valueAnimation: true,
offsetCenter: [0, '70%'],
formatter: '{value}',
- color: 'inherit', // 文字的颜色,默认 #333。
+ color: 'inherit', // 文字的颜色,默认 #333。
fontSize: 20
},
data: [{
diff --git a/src/views/map/dialog/video_play_cfd.vue b/src/views/map/dialog/video_play_cfd.vue
index 0e79142..69812ca 100644
--- a/src/views/map/dialog/video_play_cfd.vue
+++ b/src/views/map/dialog/video_play_cfd.vue
@@ -48,7 +48,7 @@ export default {
// eslint-disable-next-line no-undef
this.player = new Aliplayer({
'id': 'aLiVideoPlayer',
- 'source': res.data.url ? res.data.url.replace('http://192.168.0.253:83', 'http://60.2.209.238:8992/videoApi') : '',
+ 'source': res.data.url? res.data.url.replace('http://192.168.0.253:83', 'http://60.2.209.238:8992/videoApi') : '',
'width': '100%',
'height': '500px',
'autoplay': true,
diff --git a/src/views/map/dialog/weatherstation.vue b/src/views/map/dialog/weatherstation.vue
index 15f1de7..bacf71d 100644
--- a/src/views/map/dialog/weatherstation.vue
+++ b/src/views/map/dialog/weatherstation.vue
@@ -95,17 +95,18 @@ export default {
this.info.TEMPERATURE = data.pd.TEMPERATURE || '-'
this.info.WINDSPEED = data.pd.WINDSPEED || '-'
this.info.WINDDIRECTION = data.pd.WINDDIRECTION || '-'
- this.$nextTick(() => {
- if (data.pd.WINDDIRECTION != '-') {
+ this.$nextTick(()=>{
+ if(data.pd.WINDDIRECTION != '-'){
console.log(this.info.WINDDIRECTION)
this.initEcharts1(data)
- this.info.WINDDIRECTION = this.calculateWindDirection(this.info.WINDDIRECTION)
+ this.info.WINDDIRECTION = this.calculateWindDirection(this.info.WINDDIRECTION)
console.log(this.info.WINDDIRECTION)
}
- if (data.pd.TEMPERATURE != '-') {
+ if(data.pd.TEMPERATURE != '-'){
this.initEcharts2(data)
}
- if (data.pd.WINDSPEED != '-') {
+ if(data.pd.WINDSPEED != '-'){
+
this.initEcharts3(data)
}
})
diff --git a/src/views/map/dialog/windspeedstation.vue b/src/views/map/dialog/windspeedstation.vue
index 8c93751..29342b9 100644
--- a/src/views/map/dialog/windspeedstation.vue
+++ b/src/views/map/dialog/windspeedstation.vue
@@ -1,7 +1,7 @@
-
{{ info.EQUIPMENTNAME }}:实时监测数据 {{ info.OPERATTIME }}
+ {{ info.EQUIPMENTNAME }}:实时监测数据 {{info.OPERATTIME}}
@@ -32,7 +32,7 @@ import * as echarts from 'echarts'
let myChart4 = null
let myChart5 = null
-const myChart6 = null
+let myChart6 = null
export default {
props: {
id: {
@@ -46,12 +46,12 @@ export default {
default() {
return ''
}
- }
+ },
},
data() {
return {
config: config,
- info: {}
+ info: {},
}
},
mounted() {
@@ -73,7 +73,7 @@ export default {
'/map/getById',
{
id: this.id,
- TYPE: this.type
+ TYPE: this.type,
}
).then((data) => {
this.listLoading = false
@@ -96,7 +96,7 @@ export default {
textStyle: {
fontWeight: 'normal',
fontSize: 16,
- color: '#fff'
+ color: "#fff"
}
},
series: {
@@ -123,60 +123,60 @@ export default {
axisTick: {
show: true,
splitNumber: 5,
- lineStyle: {
- color: '#fff'
+ lineStyle:{
+ color:'#fff'
}
},
splitLine: {
length: 10,
lineStyle: {
width: 5,
- color: '#fff'
+ color:'#fff'
}
},
axisLabel: {
formatter: function(e) {
- switch (e + '') {
- case '0':
- return '北'
- case '45':
- return '东北'
- case '135':
- return '东南'
- case '225':
- return '西南'
- case '315':
- return '西北'
- case '360':
- return '北'
- case '180':
- return '南'
- case '90':
- return '东'
- case '270':
- return '西'
+ switch (e + "") {
+ case "0":
+ return "北";
+ case "45":
+ return "东北";
+ case "135":
+ return "东南";
+ case "225":
+ return "西南"
+ case "315":
+ return "西北";
+ case "360":
+ return "北";
+ case "180":
+ return "南";
+ case "90":
+ return "东";
+ case "270":
+ return "西";
default:
- return e
+ return e;
}
},
distance: -60,
textStyle: {
fontSize: 14,
- fontWeight: '',
- color: '#fff'
+ fontWeight: "",
+ color:'#fff'
}
},
pointer: {
show: true,
- length: '80%',
- width: 5
+ length:'80%',
+ width:5
},
detail: {
formatter: function(param) {
- var level = ''
- if (param > 0 && param < 90) {
+ var level = '';
+ if (param > 0 && param < 90){
level = '东北'
- } else if (param > 90 && param < 180) {
+ } else if (param > 90 && param < 180){
level = '东南'
} else if (param > 180 && param < 270) {
level = '西南'
@@ -191,44 +191,45 @@ export default {
} else if (param == 180) {
level = '正南'
}
- return '当前风向:' + level + '(' + param + '°)'
+ return "当前风向:"+level + "(" + param + "°)";
},
offsetCenter: [0, 190],
textStyle: {
fontSize: 14,
- color: '#fff'
+ color:'#fff'
}
},
data: [data.pd.WINDDIRECTION]
}
- }
+ };
myChart4.setOption(option)
},
initEcharts2(data) {
myChart5 = echarts.init(document.querySelector('#main5'))
- var value = data.pd.TEMPERATURE
- var kd = []
- // 刻度使用柱状图模拟,短设置3,长的设置5;构造一个数据
+ var value = data.pd.TEMPERATURE;
+ var kd = [];
+// 刻度使用柱状图模拟,短设置3,长的设置5;构造一个数据
for (var i = 0, len = 130; i <= len; i++) {
if (i > 100 || i < 30) {
kd.push('0')
} else {
if (i % 5 === 0) {
- kd.push('5')
+ kd.push('5');
} else {
- kd.push('3')
+ kd.push('3');
}
}
+
}
// console.log(kd)
- // 因为柱状初始化为0,温度存在负值,所以,原本的0-100,改为0-130,0-30用于表示负值
+// 因为柱状初始化为0,温度存在负值,所以,原本的0-100,改为0-130,0-30用于表示负值
function getData(value) {
- return [Number(value) + 30]
+ return [Number(value) + 30];
}
console.log(getData(value))
- var data = getData(value + 30)
- var mercuryColor = '#fd4d49'
- var borderColor = '#fd4d49'
+ var data = getData(value + 30);
+ var mercuryColor = '#fd4d49';
+ var borderColor = '#fd4d49';
const option = {
title: {
@@ -237,18 +238,18 @@ export default {
textStyle: {
fontWeight: 'normal',
fontSize: 16,
- color: '#fff'
+ color: "#fff"
}
},
yAxis: [{
show: false,
min: 0,
- max: 130
+ max: 130,
}, {
show: false,
data: [],
min: 0,
- max: 130
+ max: 130,
}],
xAxis: [{
show: false,
@@ -262,7 +263,7 @@ export default {
}, {
show: false,
min: -110,
- max: 100
+ max: 100,
}],
series: [{
@@ -275,7 +276,7 @@ export default {
itemStyle: {
normal: {
color: mercuryColor,
- barBorderRadius: 0
+ barBorderRadius: 0,
}
},
label: {
@@ -284,11 +285,11 @@ export default {
position: 'top',
formatter: function(param) {
// 因为柱状初始化为0,温度存在负值,所以,原本的0-100,改为0-130,0-30用于表示负值
- return (((param.value * 100) - (30 * 100)) / 100) + '°C'
+ return (((param.value * 100) - (30 * 100)) / 100) + '°C';
},
textStyle: {
color: '#ccc',
- fontSize: '10'
+ fontSize: '10',
}
}
},
@@ -303,7 +304,7 @@ export default {
itemStyle: {
normal: {
color: '#ffffff',
- barBorderRadius: 50
+ barBorderRadius: 50,
}
},
z: 1
@@ -317,7 +318,7 @@ export default {
itemStyle: {
normal: {
color: borderColor,
- barBorderRadius: 50
+ barBorderRadius: 50,
}
},
z: 0
@@ -331,7 +332,7 @@ export default {
itemStyle: {
normal: {
color: mercuryColor,
- opacity: 1
+ opacity: 1,
}
},
z: 2
@@ -345,7 +346,7 @@ export default {
itemStyle: {
normal: {
color: '#ffffff',
- opacity: 1
+ opacity: 1,
}
},
z: 1
@@ -359,7 +360,7 @@ export default {
itemStyle: {
normal: {
color: borderColor,
- opacity: 1
+ opacity: 1,
}
},
z: 0
@@ -378,12 +379,12 @@ export default {
formatter: function(params) {
// 因为柱状初始化为0,温度存在负值,所以,原本的0-100,改为0-130,0-30用于表示负值
if (params.dataIndex > 100 || params.dataIndex < 30) {
- return ''
+ return '';
} else {
if (params.dataIndex % 5 === 0) {
- return params.dataIndex - 30
+ return params.dataIndex - 30;
} else {
- return ''
+ return '';
}
}
}
@@ -395,12 +396,12 @@ export default {
itemStyle: {
normal: {
color: borderColor,
- barBorderRadius: 10
+ barBorderRadius: 10,
}
},
z: 0
}]
- }
+ };
myChart5.setOption(option)
},
initEcharts3(data) {
@@ -413,7 +414,7 @@ export default {
textStyle: {
fontWeight: 'normal',
fontSize: 16,
- color: '#fff'
+ color: "#fff"
}
},
series: [
@@ -423,7 +424,7 @@ export default {
min: 0,
max: 30,
splitNumber: 10,
- center: ['50%', '55%'],
+ center:['50%', '55%'],
radius: '73%',
axisLine: {
lineStyle: {
@@ -435,7 +436,7 @@ export default {
distance: -20,
length: 20,
lineStyle: {
- width: 2,
+ width:2,
color: '#0F2D5B'
}
},
@@ -464,7 +465,7 @@ export default {
min: 0,
max: 30,
splitNumber: 10,
- center: ['50%', '55%'],
+ center:['50%', '55%'],
radius: '65%',
axisLine: {
lineStyle: {
@@ -480,17 +481,17 @@ export default {
silent: true,
pointer: {
length: '85%',
- width: 4,
+ width:4,
itemStyle: {
color: 'inherit',
borderWidth: 1,
- borderColor: 'inherit', // '#0D3778',
+ borderColor:'inherit', // '#0D3778',
shadowColor: 'inherit',
shadowBlur: 1
}
},
axisTick: {
- show: false,
+ show:false,
distance: -20,
length: 5,
lineStyle: {
@@ -501,24 +502,24 @@ export default {
distance: -20,
length: 20,
lineStyle: {
- width: 2,
+ width:2,
color: '#0F2D5B'
}
},
axisLabel: {
show: false
},
- title: { // 仪表盘标题。
- show: true, // 是否显示标题,默认 true。
- offsetCenter: [0, '95%'], // 相对于仪表盘中心的偏移位置,数组第一项是水平方向的偏移,第二项是垂直方向的偏移。可以是绝对的数值,也可以是相对于仪表盘半径的百分比。
- color: '#ccc', // 文字的颜色,默认 #333。
- fontSize: 15 // 文字的字体大小,默认 15。
+ title: { // 仪表盘标题。
+ show: true, // 是否显示标题,默认 true。
+ offsetCenter: [0, '95%'], //相对于仪表盘中心的偏移位置,数组第一项是水平方向的偏移,第二项是垂直方向的偏移。可以是绝对的数值,也可以是相对于仪表盘半径的百分比。
+ color: '#ccc', // 文字的颜色,默认 #333。
+ fontSize: 15 // 文字的字体大小,默认 15。
},
detail: {
valueAnimation: true,
offsetCenter: [0, '70%'],
formatter: '{value}',
- color: 'inherit', // 文字的颜色,默认 #333。
+ color: 'inherit', // 文字的颜色,默认 #333。
fontSize: 20
},
data: [{
diff --git a/src/views/map/dialog/xfControl.vue b/src/views/map/dialog/xfControl.vue
index 6e965b9..7dd8aa7 100644
--- a/src/views/map/dialog/xfControl.vue
+++ b/src/views/map/dialog/xfControl.vue
@@ -47,8 +47,8 @@
-
-
+
+
@@ -109,8 +109,8 @@