16 changed files with 413 additions and 305 deletions
@ -1,174 +1,171 @@ |
|||||
import request from '@/utils/request' |
import request from "@/utils/request"; |
||||
import { download } from '../../utils/request' |
import { download } from "../../utils/request"; |
||||
// 全景数据 - 运行环境接口
|
// 全景数据 - 运行环境接口
|
||||
|
|
||||
|
|
||||
//查询预警表与历史表所有感知事件的数量
|
//查询预警表与历史表所有感知事件的数量
|
||||
export function geTwarningTotal(query) { |
export function geTwarningTotal(query) { |
||||
return request({ |
return request({ |
||||
url: '/perceivedEvents/warning/warningTotal', |
url: "/perceivedEvents/warning/warningTotal", |
||||
method: 'post', |
method: "post", |
||||
params: { |
params: { |
||||
...query, |
...query, |
||||
} |
}, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
//查询全部的感知事件类型
|
//查询全部的感知事件类型
|
||||
export function getSystemStatusTabList(query) { |
export function getSystemStatusTabList(query) { |
||||
//system/status/tablist
|
//system/status/tablist
|
||||
return request({ |
return request({ |
||||
url: '/system/status/tablist', |
url: "/system/status/tablist", |
||||
method: 'post', |
method: "post", |
||||
params: { |
params: { |
||||
...query, |
...query, |
||||
} |
}, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
//根据事件主子类查询事件列表
|
//根据事件主子类查询事件列表
|
||||
export function getPerceivedEventsList(query) { |
export function getPerceivedEventsList(query) { |
||||
//system/status/tablist
|
//system/status/tablist
|
||||
return request({ |
return request({ |
||||
url: '/perceivedEvents/warning/perceivedEventsList', |
url: "/perceivedEvents/warning/perceivedEventsList", |
||||
method: 'post', |
method: "post", |
||||
params: { |
params: { |
||||
...query, |
...query, |
||||
} |
}, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
//路段感知事件排名
|
//路段感知事件排名
|
||||
export function getSectionPerceivedList(query) { |
export function getSectionPerceivedList(query) { |
||||
//system/status/tablist
|
//system/status/tablist
|
||||
return request({ |
return request({ |
||||
url: '/perceivedEvents/warning/sectionPerceivedList', |
url: "/perceivedEvents/warning/sectionPerceivedList", |
||||
method: 'post', |
method: "post", |
||||
params: { |
params: { |
||||
...query, |
...query, |
||||
} |
}, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
|
//路段日感知事件
|
||||
//路段日感知事件
|
export function getSectionPerceivedNumber(query) { |
||||
export function getSectionPerceivedNumber(query) { |
//system/status/tablist
|
||||
//system/status/tablist
|
return request({ |
||||
return request({ |
url: "/perceivedEvents/warning/sectionPerceivedNumber", |
||||
url: '/perceivedEvents/warning/sectionPerceivedNumber', |
method: "post", |
||||
method: 'post', |
params: { |
||||
params: { |
...query, |
||||
...query, |
}, |
||||
} |
}); |
||||
}) |
} |
||||
} |
|
||||
|
|
||||
//日累计感知事件
|
//日累计感知事件
|
||||
export function getDailyCumulative(query) { |
export function getDailyCumulative(query) { |
||||
//system/status/tablist
|
//system/status/tablist
|
||||
return request({ |
return request({ |
||||
url: '/perceivedEvents/warning/dailyCumulative', |
url: "/perceivedEvents/warning/dailyCumulative", |
||||
method: 'post', |
method: "post", |
||||
params: { |
params: { |
||||
...query, |
...query, |
||||
} |
}, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
//感知事件源分析
|
//感知事件源分析
|
||||
export function getWarningSourceGroup(query) { |
export function getWarningSourceGroup(query) { |
||||
return request({ |
return request({ |
||||
url: '/perceivedEvents/warning/warningSourceGroup', |
url: "/perceivedEvents/warning/warningSourceGroup", |
||||
method: 'post', |
method: "post", |
||||
// url: '/business/warning/list',
|
// url: '/business/warning/list',
|
||||
// method: 'get',
|
// method: 'get',
|
||||
params: { |
params: { |
||||
...query, |
...query, |
||||
} |
}, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
//日事件处置情况占比
|
//日事件处置情况占比
|
||||
export function getWarningStateDay(query) { |
export function getWarningStateDay(query) { |
||||
//system/status/tablist
|
//system/status/tablist
|
||||
return request({ |
return request({ |
||||
url: '/perceivedEvents/warning/warningStateDay', |
url: "/perceivedEvents/warning/warningStateDay", |
||||
method: 'post', |
method: "post", |
||||
params: { |
params: { |
||||
...query, |
...query, |
||||
} |
}, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
//近一月感知事件时段分布统计
|
//近一月感知事件时段分布统计
|
||||
export function getDailyCumulativeMonth(query) { |
export function getDailyCumulativeMonth(query) { |
||||
//system/status/tablist
|
//system/status/tablist
|
||||
return request({ |
return request({ |
||||
url: '/perceivedEvents/warning/dailyCumulativeMonth', |
url: "/perceivedEvents/warning/dailyCumulativeMonth", |
||||
method: 'post', |
method: "post", |
||||
params: { |
params: { |
||||
...query, |
...query, |
||||
} |
}, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
//感知事件类型分析
|
//感知事件类型分析
|
||||
export function getWarningTypeDay(query) { |
export function getWarningTypeDay(query) { |
||||
//system/status/tablist
|
//system/status/tablist
|
||||
return request({ |
return request({ |
||||
url: '/perceivedEvents/warning/warningTypeDay', |
url: "/perceivedEvents/warning/warningTypeDay", |
||||
method: 'post', |
method: "post", |
||||
params: { |
params: { |
||||
...query, |
...query, |
||||
} |
}, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
//感知事件查询-感知事件趋势
|
//感知事件查询-感知事件趋势
|
||||
export function getWarningTrend(query) { |
export function getWarningTrend(query) { |
||||
//system/status/tablist
|
//system/status/tablist
|
||||
return request({ |
return request({ |
||||
url: '/perceivedEvents/warning/warningTrend', |
url: "/perceivedEvents/warning/warningTrend", |
||||
method: 'post', |
method: "post", |
||||
data: { |
data: { |
||||
...query, |
...query, |
||||
} |
}, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
//感知事件查询-类型占比
|
//感知事件查询-类型占比
|
||||
export function getWarningSectionType(query) { |
export function getWarningSectionType(query) { |
||||
//system/status/tablist
|
//system/status/tablist
|
||||
return request({ |
return request({ |
||||
url: '/perceivedEvents/warning/warningSectionType', |
url: "/perceivedEvents/warning/warningSectionType", |
||||
method: 'post', |
method: "post", |
||||
data: { |
data: { |
||||
...query, |
...query, |
||||
} |
}, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
//感知事件查询-路段范围内桩号分布
|
//感知事件查询-路段范围内桩号分布
|
||||
export function getSectionMarkNumber(query) { |
export function getSectionMarkNumber(query) { |
||||
//system/status/tablist
|
//system/status/tablist
|
||||
return request({ |
return request({ |
||||
url: '/perceivedEvents/warning/sectionMarkNumber', |
url: "/perceivedEvents/warning/sectionMarkNumber", |
||||
method: 'post', |
method: "post", |
||||
data: { |
data: { |
||||
...query, |
...query, |
||||
} |
}, |
||||
}) |
}); |
||||
} |
} |
||||
|
|
||||
///
|
//查询辖区路段列表
|
||||
//查询辖区路段列表
|
export function getRoadSectionList(query) { |
||||
export function getRoadSectionList(query) { |
//system/status/tablist
|
||||
//system/status/tablist
|
return request({ |
||||
return request({ |
url: "/business/roadSection/listAll", |
||||
url: '/business/roadSection/listAll', |
method: "get", |
||||
method: 'get', |
params: { |
||||
params: { |
...query, |
||||
...query, |
}, |
||||
} |
}); |
||||
}) |
} |
||||
} |
|
||||
|
@ -1,23 +0,0 @@ |
|||||
<template> |
|
||||
<div class='chart LineChart' ref="LineChartRef" /> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import * as echarts from "echarts"; |
|
||||
import { lineChartOption } from "./chart" |
|
||||
|
|
||||
export default { |
|
||||
name: 'LineChart', |
|
||||
mounted() { |
|
||||
const chartIns = echarts.init(this.$refs.LineChartRef); |
|
||||
chartIns.setOption(lineChartOption); |
|
||||
}, |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang='scss' scoped> |
|
||||
.LineChart { |
|
||||
flex: 1; |
|
||||
height: 100%; |
|
||||
} |
|
||||
</style> |
|
@ -0,0 +1,53 @@ |
|||||
|
<template> |
||||
|
<div class="chart LineChart"> |
||||
|
<div |
||||
|
v-if="datalength.length > 0" |
||||
|
class="chart LineChart" |
||||
|
ref="LineChartRef" |
||||
|
/> |
||||
|
<Empty v-else text="暂无数据..."></Empty> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import * as echarts from "echarts"; |
||||
|
import { lineChartOption } from "./chart"; |
||||
|
import { deviceStatusList } from "@/api/equipment/type/api.js"; |
||||
|
import { months } from "moment/moment"; |
||||
|
|
||||
|
export default { |
||||
|
name: "LineChart", |
||||
|
props: { |
||||
|
productId: { |
||||
|
type: Number, |
||||
|
}, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
datalength: {}, |
||||
|
}; |
||||
|
}, |
||||
|
methods: { |
||||
|
// 根据id获取在线率统计数据 |
||||
|
getDeviceStatusList() { |
||||
|
return deviceStatusList(this.productId).then((res) => { |
||||
|
this.datalength = Object.keys(res.data); |
||||
|
lineChartOption.xAxis.data = Object.keys(res.data); |
||||
|
lineChartOption.series[0].data = Object.values(res.data); |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
async mounted() { |
||||
|
await this.getDeviceStatusList(); |
||||
|
const chartIns = echarts.init(this.$refs.LineChartRef); |
||||
|
chartIns.setOption(lineChartOption); |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.LineChart { |
||||
|
flex: 1; |
||||
|
height: 100%; |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue