12.14测试bug
This commit is contained in:
@@ -68,7 +68,6 @@ export default {
|
||||
}
|
||||
obj.name = item
|
||||
obj.type = 'line'
|
||||
obj.stack = 'Total'
|
||||
obj.symbol = 'none'
|
||||
obj.data = data
|
||||
seriesData.push(obj)
|
||||
@@ -118,7 +117,7 @@ export default {
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
left: '4%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
|
||||
@@ -56,7 +56,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '指示编码',
|
||||
label: '指标编码',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
|
||||
@@ -35,13 +35,14 @@
|
||||
import { environmentalCheckRealtime, environmentalCheckRealtimeTrend } from '@/api/safetyEnvironmental/environmental'
|
||||
import LineChart from './../../components/lineChart'
|
||||
import SearchArea from './../../components/searchArea'
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
name: 'Voc',
|
||||
data(){
|
||||
return {
|
||||
realtimeList:[],
|
||||
queryParams:{
|
||||
checkType: 1,
|
||||
checkType: 3,
|
||||
timeDim: null,
|
||||
timeRange: []
|
||||
},
|
||||
@@ -51,6 +52,9 @@ export default {
|
||||
components: { LineChart, SearchArea },
|
||||
mounted() {
|
||||
this.getMsg()
|
||||
this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value // 默认时
|
||||
this.queryParams.timeRange = [moment().startOf('day')+0, moment().endOf('day')-59*61*1000]
|
||||
this.getTrend()
|
||||
},
|
||||
methods: {
|
||||
getMsg() {
|
||||
@@ -59,19 +63,21 @@ export default {
|
||||
this.realtimeList = res.data || []
|
||||
})
|
||||
},
|
||||
getTrend(params) {
|
||||
console.log(params)
|
||||
this.queryParams.timeDim = params.timeDim
|
||||
this.queryParams.timeRange[0] = params.startTime
|
||||
this.queryParams.timeRange[1] = params.endTime
|
||||
getTrend() {
|
||||
environmentalCheckRealtimeTrend({...this.queryParams}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.chartData = res.data
|
||||
} else {
|
||||
this.chartData = {}
|
||||
}
|
||||
})
|
||||
},
|
||||
submitClick(params) {
|
||||
console.log(params)
|
||||
this.queryParams.timeDim = params.timeDim
|
||||
this.queryParams.timeRange[0] = params.startTime
|
||||
this.queryParams.timeRange[1] = params.endTime
|
||||
this.getTrend()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '指示编码',
|
||||
label: '指标编码',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
import { environmentalCheckRealtime, environmentalCheckRealtimeTrend } from '@/api/safetyEnvironmental/environmental'
|
||||
import LineChart from './../../components/lineChart'
|
||||
import SearchArea from './../../components/searchArea'
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
name: 'WasteGasManagement',
|
||||
data(){
|
||||
@@ -51,6 +52,9 @@ export default {
|
||||
components: { LineChart, SearchArea },
|
||||
mounted() {
|
||||
this.getMsg()
|
||||
this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value // 默认时
|
||||
this.queryParams.timeRange = [moment().startOf('day')+0, moment().endOf('day')-59*61*1000]
|
||||
this.getTrend()
|
||||
},
|
||||
methods: {
|
||||
getMsg() {
|
||||
@@ -59,19 +63,21 @@ export default {
|
||||
this.realtimeList = res.data || []
|
||||
})
|
||||
},
|
||||
getTrend(params) {
|
||||
console.log(params)
|
||||
this.queryParams.timeDim = params.timeDim
|
||||
this.queryParams.timeRange[0] = params.startTime
|
||||
this.queryParams.timeRange[1] = params.endTime
|
||||
getTrend() {
|
||||
environmentalCheckRealtimeTrend({...this.queryParams}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.chartData = res.data
|
||||
} else {
|
||||
this.chartData = {}
|
||||
}
|
||||
})
|
||||
},
|
||||
submitClick(params) {
|
||||
console.log(params)
|
||||
this.queryParams.timeDim = params.timeDim
|
||||
this.queryParams.timeRange[0] = params.startTime
|
||||
this.queryParams.timeRange[1] = params.endTime
|
||||
this.getTrend()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '指示编码',
|
||||
label: '指标编码',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<span>检测指标趋势图</span>
|
||||
</div>
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-area @submit="getTrend"/>
|
||||
<search-area @submit="submitClick"/>
|
||||
<line-chart :chartData="chartData" v-show='Object.keys(chartData).length !== 0' :timeDim="queryParams.timeDim"/>
|
||||
<!-- 没有数据 -->
|
||||
<div class="no-data-bg" v-show='Object.keys(chartData).length === 0'></div>
|
||||
@@ -33,6 +33,7 @@
|
||||
import { environmentalCheckRealtime, environmentalCheckRealtimeTrend } from '@/api/safetyEnvironmental/environmental'
|
||||
import LineChart from './../../components/lineChart'
|
||||
import SearchArea from './../../components/searchArea'
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
name: 'WasteWaterManagement',
|
||||
data(){
|
||||
@@ -49,27 +50,31 @@ export default {
|
||||
components: { LineChart, SearchArea },
|
||||
mounted() {
|
||||
this.getMsg()
|
||||
this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value // 默认时
|
||||
this.queryParams.timeRange = [moment().startOf('day')+0, moment().endOf('day')-59*61*1000]
|
||||
this.getTrend()
|
||||
},
|
||||
methods: {
|
||||
getMsg() {
|
||||
environmentalCheckRealtime({checkType: 1}).then(res => {
|
||||
console.log(res)
|
||||
this.realtimeList = res.data || []
|
||||
})
|
||||
},
|
||||
getTrend(params) {
|
||||
console.log(params)
|
||||
this.queryParams.timeDim = params.timeDim
|
||||
this.queryParams.timeRange[0] = params.startTime
|
||||
this.queryParams.timeRange[1] = params.endTime
|
||||
getTrend() {
|
||||
environmentalCheckRealtimeTrend({...this.queryParams}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.chartData = res.data
|
||||
} else {
|
||||
this.chartData = {}
|
||||
}
|
||||
})
|
||||
},
|
||||
submitClick(params) {
|
||||
console.log(params)
|
||||
this.queryParams.timeDim = params.timeDim
|
||||
this.queryParams.timeRange[0] = params.startTime
|
||||
this.queryParams.timeRange[1] = params.endTime
|
||||
this.getTrend()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user