diff --git a/src/views/dashboard/components/watchAlarmBar.vue b/src/views/dashboard/components/watchAlarmBar.vue
index 10824ee..5fe709d 100644
--- a/src/views/dashboard/components/watchAlarmBar.vue
+++ b/src/views/dashboard/components/watchAlarmBar.vue
@@ -66,7 +66,7 @@
},
extend: {
legend: {
- show: false
+ show: true
},
xAxis: {
axisLabel: {
@@ -148,7 +148,7 @@
if (maxValue < 10) {
this.extend.yAxis.max = 10
} else {
- this.extend.yAxis = maxValue+1
+ this.extend.yAxis.max = maxValue + 1
}
// this.chartData.rows = [
// { 'areaName': '科技楼及食堂', 'alarm': 53 },
diff --git a/src/views/dashboard/components/watchAlarmBar.vue b/src/views/dashboard/components/watchAlarmBar.vue
index 10824ee..5fe709d 100644
--- a/src/views/dashboard/components/watchAlarmBar.vue
+++ b/src/views/dashboard/components/watchAlarmBar.vue
@@ -66,7 +66,7 @@
},
extend: {
legend: {
- show: false
+ show: true
},
xAxis: {
axisLabel: {
@@ -148,7 +148,7 @@
if (maxValue < 10) {
this.extend.yAxis.max = 10
} else {
- this.extend.yAxis = maxValue+1
+ this.extend.yAxis.max = maxValue + 1
}
// this.chartData.rows = [
// { 'areaName': '科技楼及食堂', 'alarm': 53 },
diff --git a/src/views/dashboard/components/waterCompare.vue b/src/views/dashboard/components/waterCompare.vue
index 9cc5ca6..6a62089 100644
--- a/src/views/dashboard/components/waterCompare.vue
+++ b/src/views/dashboard/components/waterCompare.vue
@@ -12,14 +12,14 @@
import { waterCompare } from '@/api/dashboard'
import { getDayTime } from '@/utils/dateutils'
import { getDoorAreaTree } from '@/api/system/area'
-import FunctionArea from "./FunctionArea";
+import FunctionArea from './FunctionArea'
export default {
name: 'WaterCompare',
- components: {FunctionArea},
+ components: { FunctionArea },
data() {
return {
- title:{ text: '分区用水对比图'},
- chartSettings:{
+ title: { text: '分区用水对比图' },
+ chartSettings: {
labelMap: {
'areaName': '分区',
'last': '',
@@ -35,7 +35,7 @@
},
extend: {
legend: {
- show: false
+ show: true
},
xAxis: {
axisLabel: {
@@ -54,7 +54,7 @@
series: {
label: { show: true, position: 'top', formatter: '{c}' },
barWidth: 20
- },
+ }
// tooltip: { trigger: 'item', formatter: '{b}
报警次数:{c}次' }
},
areaId: '',
@@ -65,24 +65,24 @@
columns: ['areaName', 'last', 'now'],
rows: []
},
- nameDict:{
- 'today':['昨日用水','今日用水'],
- 'week':['近7日用水','对照时间用水',],
- 'month':['近30日用水','对照时间用水',],
- 'season':['上季度用水','本季度用水',],
- 'year':['上年度用水','本年度用水',],
- 'other':['对照时间用水','自选时间用水']
+ nameDict: {
+ 'today': ['昨日用水', '今日用水'],
+ 'week': ['近7日用水', '对照时间用水'],
+ 'month': ['近30日用水', '对照时间用水'],
+ 'season': ['上季度用水', '本季度用水'],
+ 'year': ['上年度用水', '本年度用水'],
+ 'other': ['对照时间用水', '自选时间用水']
}
}
},
- mounted(){
+ mounted() {
this.$refs.func.init()
},
methods: {
- fetchData(timeRange,type) {
+ fetchData(timeRange, type) {
const params = {
areaId: '110000',
- type: type?type:'other',
+ type: type || 'other',
startTime: timeRange[0],
endTime: timeRange[1]
}
@@ -94,11 +94,11 @@
now: response.data[0].nowTime
}
this.chartData.rows = response.data
- const maxValue = Math.max.apply(Math, response.data.map(item=> {return item.last>item.now?item.last: item.now}))
+ const maxValue = Math.max.apply(Math, response.data.map(item => { return item.last > item.now ? item.last : item.now }))
if (maxValue < 10) {
this.extend.yAxis.max = 10
} else {
- this.extend.yAxis = maxValue+1
+ this.extend.yAxis.max = maxValue + 1
}
// this.chartData.rows = [
// { 'areaName': '科技楼及食堂', 'alarm': 53 },
diff --git a/src/views/dashboard/components/watchAlarmBar.vue b/src/views/dashboard/components/watchAlarmBar.vue
index 10824ee..5fe709d 100644
--- a/src/views/dashboard/components/watchAlarmBar.vue
+++ b/src/views/dashboard/components/watchAlarmBar.vue
@@ -66,7 +66,7 @@
},
extend: {
legend: {
- show: false
+ show: true
},
xAxis: {
axisLabel: {
@@ -148,7 +148,7 @@
if (maxValue < 10) {
this.extend.yAxis.max = 10
} else {
- this.extend.yAxis = maxValue+1
+ this.extend.yAxis.max = maxValue + 1
}
// this.chartData.rows = [
// { 'areaName': '科技楼及食堂', 'alarm': 53 },
diff --git a/src/views/dashboard/components/waterCompare.vue b/src/views/dashboard/components/waterCompare.vue
index 9cc5ca6..6a62089 100644
--- a/src/views/dashboard/components/waterCompare.vue
+++ b/src/views/dashboard/components/waterCompare.vue
@@ -12,14 +12,14 @@
import { waterCompare } from '@/api/dashboard'
import { getDayTime } from '@/utils/dateutils'
import { getDoorAreaTree } from '@/api/system/area'
-import FunctionArea from "./FunctionArea";
+import FunctionArea from './FunctionArea'
export default {
name: 'WaterCompare',
- components: {FunctionArea},
+ components: { FunctionArea },
data() {
return {
- title:{ text: '分区用水对比图'},
- chartSettings:{
+ title: { text: '分区用水对比图' },
+ chartSettings: {
labelMap: {
'areaName': '分区',
'last': '',
@@ -35,7 +35,7 @@
},
extend: {
legend: {
- show: false
+ show: true
},
xAxis: {
axisLabel: {
@@ -54,7 +54,7 @@
series: {
label: { show: true, position: 'top', formatter: '{c}' },
barWidth: 20
- },
+ }
// tooltip: { trigger: 'item', formatter: '{b}
报警次数:{c}次' }
},
areaId: '',
@@ -65,24 +65,24 @@
columns: ['areaName', 'last', 'now'],
rows: []
},
- nameDict:{
- 'today':['昨日用水','今日用水'],
- 'week':['近7日用水','对照时间用水',],
- 'month':['近30日用水','对照时间用水',],
- 'season':['上季度用水','本季度用水',],
- 'year':['上年度用水','本年度用水',],
- 'other':['对照时间用水','自选时间用水']
+ nameDict: {
+ 'today': ['昨日用水', '今日用水'],
+ 'week': ['近7日用水', '对照时间用水'],
+ 'month': ['近30日用水', '对照时间用水'],
+ 'season': ['上季度用水', '本季度用水'],
+ 'year': ['上年度用水', '本年度用水'],
+ 'other': ['对照时间用水', '自选时间用水']
}
}
},
- mounted(){
+ mounted() {
this.$refs.func.init()
},
methods: {
- fetchData(timeRange,type) {
+ fetchData(timeRange, type) {
const params = {
areaId: '110000',
- type: type?type:'other',
+ type: type || 'other',
startTime: timeRange[0],
endTime: timeRange[1]
}
@@ -94,11 +94,11 @@
now: response.data[0].nowTime
}
this.chartData.rows = response.data
- const maxValue = Math.max.apply(Math, response.data.map(item=> {return item.last>item.now?item.last: item.now}))
+ const maxValue = Math.max.apply(Math, response.data.map(item => { return item.last > item.now ? item.last : item.now }))
if (maxValue < 10) {
this.extend.yAxis.max = 10
} else {
- this.extend.yAxis = maxValue+1
+ this.extend.yAxis.max = maxValue + 1
}
// this.chartData.rows = [
// { 'areaName': '科技楼及食堂', 'alarm': 53 },
diff --git a/src/views/dashboard/components/waterCountByAreaBar.vue b/src/views/dashboard/components/waterCountByAreaBar.vue
index 5518e99..315c83a 100644
--- a/src/views/dashboard/components/waterCountByAreaBar.vue
+++ b/src/views/dashboard/components/waterCountByAreaBar.vue
@@ -45,7 +45,7 @@
data() {
this.extend = {
legend: {
- show: false
+ show: true
},
xAxis: {
axisLabel: {