21 changed files with 490 additions and 348 deletions
@ -1,174 +1,171 @@ |
|||
import request from '@/utils/request' |
|||
import { download } from '../../utils/request' |
|||
import request from "@/utils/request"; |
|||
import { download } from "../../utils/request"; |
|||
// 全景数据 - 运行环境接口
|
|||
|
|||
|
|||
//查询预警表与历史表所有感知事件的数量
|
|||
export function geTwarningTotal(query) { |
|||
return request({ |
|||
url: '/perceivedEvents/warning/warningTotal', |
|||
method: 'post', |
|||
params: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
return request({ |
|||
url: "/perceivedEvents/warning/warningTotal", |
|||
method: "post", |
|||
params: { |
|||
...query, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
//查询全部的感知事件类型
|
|||
export function getSystemStatusTabList(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: '/system/status/tablist', |
|||
method: 'post', |
|||
params: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
//查询全部的感知事件类型
|
|||
export function getSystemStatusTabList(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: "/system/status/tablist", |
|||
method: "post", |
|||
params: { |
|||
...query, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
//根据事件主子类查询事件列表
|
|||
export function getPerceivedEventsList(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: '/perceivedEvents/warning/perceivedEventsList', |
|||
method: 'post', |
|||
params: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
//根据事件主子类查询事件列表
|
|||
export function getPerceivedEventsList(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: "/perceivedEvents/warning/perceivedEventsList", |
|||
method: "post", |
|||
params: { |
|||
...query, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
//路段感知事件排名
|
|||
export function getSectionPerceivedList(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: '/perceivedEvents/warning/sectionPerceivedList', |
|||
method: 'post', |
|||
params: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
//路段感知事件排名
|
|||
export function getSectionPerceivedList(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: "/perceivedEvents/warning/sectionPerceivedList", |
|||
method: "post", |
|||
params: { |
|||
...query, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
|
|||
//路段日感知事件
|
|||
export function getSectionPerceivedNumber(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: '/perceivedEvents/warning/sectionPerceivedNumber', |
|||
method: 'post', |
|||
params: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
//路段日感知事件
|
|||
export function getSectionPerceivedNumber(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: "/perceivedEvents/warning/sectionPerceivedNumber", |
|||
method: "post", |
|||
params: { |
|||
...query, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
//日累计感知事件
|
|||
export function getDailyCumulative(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: '/perceivedEvents/warning/dailyCumulative', |
|||
method: 'post', |
|||
params: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
//日累计感知事件
|
|||
export function getDailyCumulative(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: "/perceivedEvents/warning/dailyCumulative", |
|||
method: "post", |
|||
params: { |
|||
...query, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
//感知事件源分析
|
|||
export function getWarningSourceGroup(query) { |
|||
return request({ |
|||
url: '/perceivedEvents/warning/warningSourceGroup', |
|||
method: 'post', |
|||
// url: '/business/warning/list',
|
|||
// method: 'get',
|
|||
params: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
//感知事件源分析
|
|||
export function getWarningSourceGroup(query) { |
|||
return request({ |
|||
url: "/perceivedEvents/warning/warningSourceGroup", |
|||
method: "post", |
|||
// url: '/business/warning/list',
|
|||
// method: 'get',
|
|||
params: { |
|||
...query, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
//日事件处置情况占比
|
|||
export function getWarningStateDay(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: '/perceivedEvents/warning/warningStateDay', |
|||
method: 'post', |
|||
params: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
//日事件处置情况占比
|
|||
export function getWarningStateDay(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: "/perceivedEvents/warning/warningStateDay", |
|||
method: "post", |
|||
params: { |
|||
...query, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
//近一月感知事件时段分布统计
|
|||
export function getDailyCumulativeMonth(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: '/perceivedEvents/warning/dailyCumulativeMonth', |
|||
method: 'post', |
|||
params: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
//近一月感知事件时段分布统计
|
|||
export function getDailyCumulativeMonth(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: "/perceivedEvents/warning/dailyCumulativeMonth", |
|||
method: "post", |
|||
params: { |
|||
...query, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
//感知事件类型分析
|
|||
export function getWarningTypeDay(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: '/perceivedEvents/warning/warningTypeDay', |
|||
method: 'post', |
|||
params: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
//感知事件类型分析
|
|||
export function getWarningTypeDay(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: "/perceivedEvents/warning/warningTypeDay", |
|||
method: "post", |
|||
params: { |
|||
...query, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
//感知事件查询-感知事件趋势
|
|||
export function getWarningTrend(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: '/perceivedEvents/warning/warningTrend', |
|||
method: 'post', |
|||
data: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
//感知事件查询-感知事件趋势
|
|||
export function getWarningTrend(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: "/perceivedEvents/warning/warningTrend", |
|||
method: "post", |
|||
data: { |
|||
...query, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
//感知事件查询-类型占比
|
|||
export function getWarningSectionType(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: '/perceivedEvents/warning/warningSectionType', |
|||
method: 'post', |
|||
data: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
//感知事件查询-类型占比
|
|||
export function getWarningSectionType(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: "/perceivedEvents/warning/warningSectionType", |
|||
method: "post", |
|||
data: { |
|||
...query, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
//感知事件查询-路段范围内桩号分布
|
|||
export function getSectionMarkNumber(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: '/perceivedEvents/warning/sectionMarkNumber', |
|||
method: 'post', |
|||
data: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
//感知事件查询-路段范围内桩号分布
|
|||
export function getSectionMarkNumber(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: "/perceivedEvents/warning/sectionMarkNumber", |
|||
method: "post", |
|||
data: { |
|||
...query, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
///
|
|||
//查询辖区路段列表
|
|||
export function getRoadSectionList(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: '/business/roadSection/listAll', |
|||
method: 'get', |
|||
params: { |
|||
...query, |
|||
} |
|||
}) |
|||
} |
|||
//查询辖区路段列表
|
|||
export function getRoadSectionList(query) { |
|||
//system/status/tablist
|
|||
return request({ |
|||
url: "/business/roadSection/listAll", |
|||
method: "get", |
|||
params: { |
|||
...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