18 changed files with 1265 additions and 52 deletions
@ -0,0 +1,11 @@ |
|||
// 监测接入数据
|
|||
import request from '@/utils/request' |
|||
|
|||
// 获取监测数据
|
|||
export function getMonitorData(data) { |
|||
return request({ |
|||
url: '/cz/monitor/page', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
@ -0,0 +1,97 @@ |
|||
<!-- 表面水平位移监测数据 --> |
|||
<template> |
|||
<div class="rainfall-page slider-right"> |
|||
<TopBackTitle :showBackBtn="false" /> |
|||
|
|||
<div class="slider-right-body" ref="tableBoxRef"> |
|||
<el-table :height="tableHeight" :data="tableData" border> |
|||
<el-table-column type="index" align="center" label="序号" width="60" /> |
|||
<el-table-column |
|||
prop="prjStcd" |
|||
align="center" |
|||
label="水利工程测站代码" |
|||
/> |
|||
<el-table-column prop="mpcd" align="center" label="测点编号" /> |
|||
<el-table-column prop="mstm" align="center" label="测量时间" /> |
|||
<el-table-column prop="xhrds" align="center" label="X向水平位移(mm)" /> |
|||
<el-table-column prop="yhrds" align="center" label="Y向水平位移(mm)" /> |
|||
<el-table-column prop="colmt" align="center" label="采集方式" /> |
|||
<el-table-column prop="createTime" align="center" label="入库时间" /> |
|||
<el-table-column prop="collTime" align="center" label="采集时间" /> |
|||
<el-table-column prop="gdwrDasc" align="center" label="数据来源" /> |
|||
</el-table> |
|||
<el-pagination |
|||
background |
|||
class="pagination" |
|||
style="margin-top: 16px; margin-right: 16px; float: right" |
|||
:current-page="pageData.pageNum" |
|||
:page-sizes="pageData.pageSizes" |
|||
layout="total, prev, pager, next, sizes, jumper" |
|||
:total="pageData.total" |
|||
@size-change="(e) => handlePageSizeChange(e)" |
|||
@current-change="(e) => handleCurrentPageChange(e)" |
|||
> |
|||
</el-pagination> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import dayjs from "dayjs"; |
|||
import TopBackTitle from "@/components/TopBackTitle/index.vue"; |
|||
import { calcTableHeight } from "@/mixins/calcTableHeight"; |
|||
|
|||
import { getMonitorData } from "@/api/monitorDataPreview"; |
|||
|
|||
export default { |
|||
components: { |
|||
TopBackTitle, |
|||
}, |
|||
mixins: [calcTableHeight], |
|||
data() { |
|||
return { |
|||
tableData: [], // 检查列表 |
|||
pageData: { |
|||
pageNum: 1, // 当前页 |
|||
pageSize: 10, // 请求数量 |
|||
pageSizes: [10, 20, 50, 100], |
|||
total: 0, // 总数量 |
|||
}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getTableData(); |
|||
}, |
|||
methods: { |
|||
handleCurrentPageChange(page) { |
|||
this.pageData.pageNum = page; |
|||
this.getTableData(); |
|||
}, |
|||
handlePageSizeChange(pageSize) { |
|||
this.pageData.pageSize = pageSize; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
// 获取列表数据 |
|||
getTableData() { |
|||
getMonitorData({ |
|||
startTime: dayjs().format("YYYY-MM-DD HH:mm:ss"), |
|||
endTime: dayjs(dayjs().subtract(1, "year")).format( |
|||
"YYYY-MM-DD HH:mm:ss" |
|||
), |
|||
monitorType: "MS_DSM_SRHRDS", |
|||
pageSize: this.pageData.pageSize, |
|||
pageNum: this.pageData.pageNum, |
|||
}).then((res) => { |
|||
if (res) { |
|||
this.tableData = res.records; |
|||
this.pageData.total = res.total; |
|||
} |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
.rainfall-page { |
|||
} |
|||
</style> |
@ -0,0 +1,94 @@ |
|||
<!-- 降雨量监测 --> |
|||
<template> |
|||
<div class="rainfall-page slider-right"> |
|||
<TopBackTitle :showBackBtn="false" /> |
|||
|
|||
<div class="slider-right-body" ref="tableBoxRef"> |
|||
<el-table :height="tableHeight" :data="tableData" border> |
|||
<el-table-column type="index" align="center" label="序号" width="60" /> |
|||
<el-table-column prop="stcd" align="center" label="测站编码" /> |
|||
<el-table-column prop="tm" align="center" label="时间" /> |
|||
<el-table-column prop="intv" align="center" label="时段长(h)" /> |
|||
<el-table-column prop="drp" align="center" label="时段降水量(mm)" /> |
|||
<el-table-column prop="pdr" align="center" label="降水历时" /> |
|||
<el-table-column prop="dyp" align="center" label="日降水量(mm)" /> |
|||
<el-table-column prop="wth" align="center" label="天气状况" /> |
|||
<el-table-column prop="colmt" align="center" label="采集方式" /> |
|||
<el-table-column prop="createTime" align="center" label="入库时间" /> |
|||
<el-table-column prop="collTime" align="center" label="采集时间" /> |
|||
</el-table> |
|||
<el-pagination |
|||
background |
|||
class="pagination" |
|||
style="margin-top: 16px; margin-right: 16px; float: right" |
|||
:current-page="pageData.pageNum" |
|||
:page-sizes="pageData.pageSizes" |
|||
layout="total, prev, pager, next, sizes, jumper" |
|||
:total="pageData.total" |
|||
@size-change="(e) => handlePageSizeChange(e)" |
|||
@current-change="(e) => handleCurrentPageChange(e)" |
|||
> |
|||
</el-pagination> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import dayjs from "dayjs"; |
|||
import TopBackTitle from "@/components/TopBackTitle/index.vue"; |
|||
import { calcTableHeight } from "@/mixins/calcTableHeight"; |
|||
|
|||
import { getMonitorData } from "@/api/monitorDataPreview"; |
|||
|
|||
export default { |
|||
components: { |
|||
TopBackTitle, |
|||
}, |
|||
mixins: [calcTableHeight], |
|||
data() { |
|||
return { |
|||
tableData: [], // 检查列表 |
|||
pageData: { |
|||
pageNum: 1, // 当前页 |
|||
pageSize: 10, // 请求数量 |
|||
pageSizes: [10, 20, 50, 100], |
|||
total: 0, // 总数量 |
|||
}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getTableData(); |
|||
}, |
|||
methods: { |
|||
handleCurrentPageChange(page) { |
|||
this.pageData.pageNum = page; |
|||
this.getTableData(); |
|||
}, |
|||
handlePageSizeChange(pageSize) { |
|||
this.pageData.pageSize = pageSize; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
// 获取列表数据 |
|||
getTableData() { |
|||
getMonitorData({ |
|||
startTime: dayjs().format("YYYY-MM-DD HH:mm:ss"), |
|||
endTime: dayjs(dayjs().subtract(1, "year")).format( |
|||
"YYYY-MM-DD HH:mm:ss" |
|||
), |
|||
monitorType: "MS_HDM_OBP", |
|||
pageSize: this.pageData.pageSize, |
|||
pageNum: this.pageData.pageNum, |
|||
}).then((res) => { |
|||
if (res) { |
|||
this.tableData = res.records; |
|||
this.pageData.total = res.total; |
|||
} |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
.rainfall-page { |
|||
} |
|||
</style> |
@ -0,0 +1,101 @@ |
|||
<!-- 水库水情监测 --> |
|||
<template> |
|||
<div class="rainfall-page slider-right"> |
|||
<TopBackTitle :showBackBtn="false" /> |
|||
|
|||
<div class="slider-right-body" ref="tableBoxRef"> |
|||
<el-table :height="tableHeight" :data="tableData" border> |
|||
<el-table-column type="index" align="center" label="序号" width="60" /> |
|||
<el-table-column prop="stcd" align="center" label="测站编码" /> |
|||
<el-table-column prop="tm" align="center" label="时间" /> |
|||
<el-table-column prop="rz" align="center" label="库上水位(m)" /> |
|||
<el-table-column prop="inq" align="center" label="入库流量(m³/s)" /> |
|||
<el-table-column prop="w" align="center" label="蓄水位"> |
|||
<template slot="header"> |
|||
<span>蓄水位(10<sup>6</sup>m³)</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="blrz" align="center" label="库下水位(m)" /> |
|||
<el-table-column prop="otq" align="center" label="出库流量(m³/s)" /> |
|||
<el-table-column prop="rwchrcd" align="center" label="库水特征码" /> |
|||
<el-table-column prop="rwptn" align="center" label="库水水势" /> |
|||
<el-table-column prop="inqdr" align="center" label="入流时段长" /> |
|||
<el-table-column prop="msqmt" align="center" label="测流方法" /> |
|||
<el-table-column prop="collTime" align="center" label="采集时间" /> |
|||
</el-table> |
|||
<el-pagination |
|||
background |
|||
class="pagination" |
|||
style="margin-top: 16px; margin-right: 16px; float: right" |
|||
:current-page="pageData.pageNum" |
|||
:page-sizes="pageData.pageSizes" |
|||
layout="total, prev, pager, next, sizes, jumper" |
|||
:total="pageData.total" |
|||
@size-change="(e) => handlePageSizeChange(e)" |
|||
@current-change="(e) => handleCurrentPageChange(e)" |
|||
> |
|||
</el-pagination> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import dayjs from "dayjs"; |
|||
|
|||
import TopBackTitle from "@/components/TopBackTitle/index.vue"; |
|||
import { calcTableHeight } from "@/mixins/calcTableHeight"; |
|||
|
|||
import { getMonitorData } from "@/api/monitorDataPreview"; |
|||
|
|||
export default { |
|||
components: { |
|||
TopBackTitle, |
|||
}, |
|||
mixins: [calcTableHeight], |
|||
data() { |
|||
return { |
|||
tableData: [], // 检查列表 |
|||
pageData: { |
|||
pageNum: 1, // 当前页 |
|||
pageSize: 10, // 请求数量 |
|||
pageSizes: [10, 20, 50, 100], |
|||
total: 0, // 总数量 |
|||
}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getTableData(); |
|||
}, |
|||
methods: { |
|||
handleCurrentPageChange(page) { |
|||
this.pageData.pageNum = page; |
|||
this.getTableData(); |
|||
}, |
|||
handlePageSizeChange(pageSize) { |
|||
this.pageData.pageSize = pageSize; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
// 获取列表数据 |
|||
getTableData() { |
|||
getMonitorData({ |
|||
startTime: dayjs().format("YYYY-MM-DD HH:mm:ss"), |
|||
endTime: dayjs(dayjs().subtract(1, "year")).format( |
|||
"YYYY-MM-DD HH:mm:ss" |
|||
), |
|||
monitorType: "MS_HDM_RSVR", |
|||
pageSize: this.pageData.pageSize, |
|||
pageNum: this.pageData.pageNum, |
|||
}).then((res) => { |
|||
if (res) { |
|||
this.tableData = res.records; |
|||
this.pageData.total = res.total; |
|||
} |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
.rainfall-page { |
|||
} |
|||
</style> |
@ -0,0 +1,95 @@ |
|||
<!-- 河道水情监测 --> |
|||
<template> |
|||
<div class="rainfall-page slider-right"> |
|||
<TopBackTitle :showBackBtn="false" /> |
|||
|
|||
<div class="slider-right-body" ref="tableBoxRef"> |
|||
<el-table :height="tableHeight" :data="tableData" border> |
|||
<el-table-column type="index" align="center" label="序号" width="60" /> |
|||
<el-table-column prop="stcd" align="center" label="测站编码" /> |
|||
<el-table-column prop="tm" align="center" label="时间" /> |
|||
<el-table-column prop="z" align="center" label="水位" /> |
|||
<el-table-column prop="q" align="center" label="流量" /> |
|||
<el-table-column prop="xsa" align="center" label="断面过水面积" /> |
|||
<el-table-column prop="xsavv" align="center" label="断面平均流速" /> |
|||
<el-table-column prop="xsmxv" align="center" label="断面最大流速" /> |
|||
<el-table-column prop="flwchrcd" align="center" label="喝水特征码" /> |
|||
<el-table-column prop="wptn" align="center" label="水势" /> |
|||
<el-table-column prop="collTime" align="center" label="采集时间" /> |
|||
</el-table> |
|||
<el-pagination |
|||
background |
|||
class="pagination" |
|||
style="margin-top: 16px; margin-right: 16px; float: right" |
|||
:current-page="pageData.pageNum" |
|||
:page-sizes="pageData.pageSizes" |
|||
layout="total, prev, pager, next, sizes, jumper" |
|||
:total="pageData.total" |
|||
@size-change="(e) => handlePageSizeChange(e)" |
|||
@current-change="(e) => handleCurrentPageChange(e)" |
|||
> |
|||
</el-pagination> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import dayjs from "dayjs"; |
|||
|
|||
import TopBackTitle from "@/components/TopBackTitle/index.vue"; |
|||
import { calcTableHeight } from "@/mixins/calcTableHeight"; |
|||
|
|||
import { getMonitorData } from "@/api/monitorDataPreview"; |
|||
|
|||
export default { |
|||
components: { |
|||
TopBackTitle, |
|||
}, |
|||
mixins: [calcTableHeight], |
|||
data() { |
|||
return { |
|||
tableData: [], // 检查列表 |
|||
pageData: { |
|||
pageNum: 1, // 当前页 |
|||
pageSize: 10, // 请求数量 |
|||
pageSizes: [10, 20, 50, 100], |
|||
total: 0, // 总数量 |
|||
}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getTableData(); |
|||
}, |
|||
methods: { |
|||
handleCurrentPageChange(page) { |
|||
this.pageData.pageNum = page; |
|||
this.getTableData(); |
|||
}, |
|||
handlePageSizeChange(pageSize) { |
|||
this.pageData.pageSize = pageSize; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
// 获取列表数据 |
|||
getTableData() { |
|||
getMonitorData({ |
|||
startTime: dayjs().format("YYYY-MM-DD HH:mm:ss"), |
|||
endTime: dayjs(dayjs().subtract(1, "year")).format( |
|||
"YYYY-MM-DD HH:mm:ss" |
|||
), |
|||
monitorType: "MS_HDM_RIVER", |
|||
pageSize: this.pageData.pageSize, |
|||
pageNum: this.pageData.pageNum, |
|||
}).then((res) => { |
|||
if (res) { |
|||
this.tableData = res.records; |
|||
this.pageData.total = res.total; |
|||
} |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
.rainfall-page { |
|||
} |
|||
</style> |
@ -0,0 +1,97 @@ |
|||
<!-- 降雨量监测 --> |
|||
<template> |
|||
<div class="rainfall-page slider-right"> |
|||
<TopBackTitle :showBackBtn="false" /> |
|||
|
|||
<div class="slider-right-body" ref="tableBoxRef"> |
|||
<el-table :height="tableHeight" :data="tableData" border> |
|||
<el-table-column type="index" align="center" label="序号" width="60" /> |
|||
<el-table-column |
|||
prop="prjStcd" |
|||
align="center" |
|||
label="水利工程测站代码" |
|||
/> |
|||
<el-table-column prop="mpcd" align="center" label="测点编号" /> |
|||
<el-table-column prop="mstm" align="center" label="测量时间" /> |
|||
<el-table-column prop="vrds" align="center" label="垂直位移" /> |
|||
<el-table-column prop="colmt" align="center" label="采集方式" /> |
|||
<el-table-column prop="crateTime" align="center" label="入库时间" /> |
|||
<el-table-column prop="collTime" align="center" label="采集时间" /> |
|||
<el-table-column prop="gdwrDasc" align="center" label="数据来源" /> |
|||
</el-table> |
|||
<el-pagination |
|||
background |
|||
class="pagination" |
|||
style="margin-top: 16px; margin-right: 16px; float: right" |
|||
:current-page="pageData.pageNum" |
|||
:page-sizes="pageData.pageSizes" |
|||
layout="total, prev, pager, next, sizes, jumper" |
|||
:total="pageData.total" |
|||
@size-change="(e) => handlePageSizeChange(e)" |
|||
@current-change="(e) => handleCurrentPageChange(e)" |
|||
> |
|||
</el-pagination> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import dayjs from "dayjs"; |
|||
|
|||
import TopBackTitle from "@/components/TopBackTitle/index.vue"; |
|||
import { calcTableHeight } from "@/mixins/calcTableHeight"; |
|||
|
|||
import { getMonitorData } from "@/api/monitorDataPreview"; |
|||
|
|||
export default { |
|||
components: { |
|||
TopBackTitle, |
|||
}, |
|||
mixins: [calcTableHeight], |
|||
data() { |
|||
return { |
|||
tableData: [], // 检查列表 |
|||
pageData: { |
|||
pageNum: 1, // 当前页 |
|||
pageSize: 10, // 请求数量 |
|||
pageSizes: [10, 20, 50, 100], |
|||
total: 0, // 总数量 |
|||
}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getTableData(); |
|||
}, |
|||
methods: { |
|||
handleCurrentPageChange(page) { |
|||
this.pageData.pageNum = page; |
|||
this.getTableData(); |
|||
}, |
|||
handlePageSizeChange(pageSize) { |
|||
this.pageData.pageSize = pageSize; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
// 获取列表数据 |
|||
getTableData() { |
|||
getMonitorData({ |
|||
startTime: dayjs().format("YYYY-MM-DD HH:mm:ss"), |
|||
endTime: dayjs(dayjs().subtract(1, "year")).format( |
|||
"YYYY-MM-DD HH:mm:ss" |
|||
), |
|||
monitorType: "MS_DSM_SRVRDS", |
|||
pageSize: this.pageData.pageSize, |
|||
pageNum: this.pageData.pageNum, |
|||
}).then((res) => { |
|||
if (res) { |
|||
this.tableData = res.records; |
|||
this.pageData.total = res.total; |
|||
} |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
.rainfall-page { |
|||
} |
|||
</style> |
@ -0,0 +1,237 @@ |
|||
<!-- 工程安全监测 --> |
|||
<template> |
|||
<div class="real-time-monitor-page"> |
|||
<div class="flex"> |
|||
<div class="tree-box"> |
|||
<el-input placeholder="输入关键字进行过滤" v-model="filterText"> |
|||
</el-input> |
|||
<el-tree |
|||
class="filter-tree" |
|||
:data="treeData" |
|||
:props="defaultProps" |
|||
default-expand-all |
|||
:filter-node-method="filterNode" |
|||
@node-click="handleClickTreeNode" |
|||
ref="tree" |
|||
> |
|||
</el-tree> |
|||
</div> |
|||
<div class="content-box"> |
|||
<div class="flex items-center"> |
|||
<el-select class="w-100" size="mini" v-model="dateRange"> |
|||
<el-option label="近1月" value="0"></el-option> |
|||
<el-option label="近1日" value="1"></el-option> |
|||
<el-option label="近7日" value="2"></el-option> |
|||
<el-option label="近3月" value="3"></el-option> |
|||
<el-option label="近1年" value="4"></el-option> |
|||
</el-select> |
|||
<span class="ml-10 mr-6">开始日期</span> |
|||
<el-date-picker |
|||
size="mini" |
|||
class="w-120" |
|||
v-model="paramsData.startDate" |
|||
type="date" |
|||
:picker-options="{ |
|||
disabledDate: filterStartDate, |
|||
}" |
|||
placeholder="选择日期" |
|||
> |
|||
</el-date-picker> |
|||
<span class="ml-10 mr-6">结束日期</span> |
|||
<el-date-picker |
|||
size="mini" |
|||
class="w-120" |
|||
v-model="paramsData.endDate" |
|||
type="date" |
|||
:picker-options="{ |
|||
disabledDate: filterEndDate, |
|||
}" |
|||
placeholder="选择日期" |
|||
> |
|||
</el-date-picker> |
|||
|
|||
<el-button |
|||
type="primary" |
|||
class="!ml-10" |
|||
@click="handleSearch" |
|||
size="mini" |
|||
>查询</el-button |
|||
> |
|||
<el-button @click="handleReset" size="mini">重置</el-button> |
|||
</div> |
|||
<div class="echarts-box mt-16"> |
|||
<div class="title">统计图</div> |
|||
<div ref="echartsRef" class="echart-dom"></div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import * as echarts from "echarts"; |
|||
import { initLineOptions, doubleYAxisOptions } from "../js/initEcharts"; |
|||
|
|||
import { |
|||
getReservoirMonitorTreeData, |
|||
getReservoirRainDetailData, |
|||
} from "@/api/reservoir"; |
|||
export default { |
|||
data() { |
|||
return { |
|||
dateRange: null, |
|||
resCode: null, // 水库编码 |
|||
filterText: "", |
|||
myChart: null, |
|||
treeData: [ |
|||
{ |
|||
label: "xxx水库", |
|||
value: "xxxreservoir", |
|||
children: [ |
|||
{ |
|||
label: "xx环境量", |
|||
value: "xxxenv1", |
|||
children: [ |
|||
{ |
|||
label: "xx雨量站", |
|||
value: "xxxrain1", |
|||
type: "1", |
|||
}, |
|||
{ |
|||
label: "xx水位站", |
|||
value: "xxxwater1", |
|||
type: "2", |
|||
}, |
|||
], |
|||
}, |
|||
], |
|||
}, |
|||
], |
|||
defaultProps: { |
|||
children: "children", |
|||
label: "label", |
|||
}, |
|||
paramsData: { |
|||
startDate: "", |
|||
endDate: "", |
|||
}, |
|||
}; |
|||
}, |
|||
created() {}, |
|||
watch: { |
|||
filterText(val) { |
|||
this.$refs.tree.filter(val); |
|||
}, |
|||
}, |
|||
mounted() { |
|||
this.initData(); |
|||
}, |
|||
methods: { |
|||
initData(code) { |
|||
console.log("请求数据 >>>>>> ", code); |
|||
this.resCode = code; |
|||
getReservoirMonitorTreeData(code).then((res) => { |
|||
this.treeData = res.data; |
|||
}); |
|||
this.initChart(); |
|||
}, |
|||
|
|||
filterStartDate(date) { |
|||
if (this.paramsData.endDate) { |
|||
return ( |
|||
(date && date.valueOf() > this.paramsData.endDate) || |
|||
date.valueOf() > Date.now() |
|||
); |
|||
} |
|||
return date && date.valueOf() > Date.now(); |
|||
}, |
|||
filterEndDate(date) { |
|||
if (this.paramsData.startDate) { |
|||
return ( |
|||
(date && date.valueOf() < this.paramsData.startDate) || |
|||
date.valueOf() > Date.now() |
|||
); |
|||
} |
|||
return date && date.valueOf() > Date.now(); |
|||
}, |
|||
filterNode(value, data) { |
|||
if (!value) return true; |
|||
return data.label.indexOf(value) !== -1; |
|||
}, |
|||
initChart(data) { |
|||
// 渲染echarts |
|||
if (!this.$refs.echartsRef) { |
|||
return; |
|||
} |
|||
if (this.myChart) { |
|||
this.myChart.dispose(); |
|||
} |
|||
let options = initLineOptions(data); |
|||
this.myChart = echarts.init(this.$refs.echartsRef); |
|||
options && this.myChart.setOption(options); |
|||
}, |
|||
// 请求数据 |
|||
handleSearch() { |
|||
this.initData(); |
|||
}, |
|||
handleReset() { |
|||
this.paramsData.startDate = ""; |
|||
this.paramsData.endDate = ""; |
|||
}, |
|||
handleClickTreeNode(data, node) { |
|||
if (node.isLeaf && data.type) { |
|||
getReservoirRainDetailData({ |
|||
resCode: this.resCode, |
|||
id: data.id, |
|||
}).then((res) => { |
|||
this.initChart(res.data, data.type); |
|||
}); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
.real-time-monitor-page { |
|||
.tree-box { |
|||
flex-shrink: 0; |
|||
width: 240px; |
|||
border: 1px solid #f4f5f7; |
|||
border-radius: 2px; |
|||
background: #fff; |
|||
overflow: auto; |
|||
padding: 4px; |
|||
} |
|||
.content-box { |
|||
flex: 1; |
|||
margin-left: 4px; |
|||
border: 1px solid #f4f5f7; |
|||
padding: 4px; |
|||
.echarts-box { |
|||
flex: 1; |
|||
border: 1px solid #f4f5f7; |
|||
border-radius: 2px; |
|||
background: #fff; |
|||
.title { |
|||
height: 32px; |
|||
line-height: 32px; |
|||
padding-left: 12px; |
|||
border-bottom: 1px solid #f4f5f7; |
|||
} |
|||
.echart-dom { |
|||
width: 100%; |
|||
height: 360px; |
|||
} |
|||
} |
|||
} |
|||
.w-100 { |
|||
width: 100px; |
|||
} |
|||
.w-120 { |
|||
width: 128px; |
|||
} |
|||
|
|||
.w-50 { |
|||
width: 50%; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,148 @@ |
|||
<template> |
|||
<div class="water-rain-comp"> |
|||
<div class="mb-12 font-16 font-700">监测站名称安全站</div> |
|||
<div class="flex justify-between"> |
|||
<div class="flex items-center"> |
|||
<el-select class="w-150" size="mini" v-model="dateRange"> |
|||
<el-option label="近1月" value="0"></el-option> |
|||
<el-option label="近1日" value="1"></el-option> |
|||
<el-option label="近7日" value="2"></el-option> |
|||
<el-option label="近3月" value="3"></el-option> |
|||
<el-option label="近1年" value="4"></el-option> |
|||
</el-select> |
|||
<span class="ml-10 mr-6">开始日期</span> |
|||
<el-date-picker |
|||
v-model="startDate" |
|||
class="w-150" |
|||
size="mini" |
|||
type="date" |
|||
placeholder="选择日期" |
|||
value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" |
|||
></el-date-picker> |
|||
<span class="ml-10 mr-6">结束日期</span> |
|||
<el-date-picker |
|||
v-model="endDate" |
|||
class="w-150" |
|||
size="mini" |
|||
type="date" |
|||
placeholder="选择日期" |
|||
value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" |
|||
></el-date-picker> |
|||
</div> |
|||
|
|||
<div class="flex items-center"> |
|||
<el-button type="primary" size="mini" @click="handleSearch" |
|||
>查询</el-button |
|||
> |
|||
<el-button size="mini" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="flex mt-10"> |
|||
<div class="w-50"> |
|||
<div class="mb-8">水情</div> |
|||
<div class="flex"> |
|||
<div class="mr-10"> |
|||
<div>当前水位</div> |
|||
<div>22 m</div> |
|||
</div> |
|||
<div class="mr-10"> |
|||
<div>当前蓄水位</div> |
|||
<div>22 m³</div> |
|||
</div> |
|||
<div class="mr-10"> |
|||
<div>最高库水位</div> |
|||
<div>22 m</div> |
|||
</div> |
|||
<div class="mr-10"> |
|||
<div>最低库水位</div> |
|||
<div>17 m</div> |
|||
</div> |
|||
<div> |
|||
<div>平均库水位</div> |
|||
<div>20 m</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="w-50"> |
|||
<div class="mb-8">雨情</div> |
|||
<div class="flex"> |
|||
<div class="mr-10"> |
|||
<div>日降雨量</div> |
|||
<div>22 mm</div> |
|||
</div> |
|||
<div class="mr-10"> |
|||
<div>最高日降雨量</div> |
|||
<div>22 mm</div> |
|||
</div> |
|||
<div> |
|||
<div>平均日降雨量</div> |
|||
<div>22 mm</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="mt-10">环境量</div> |
|||
<div class="mt-8 w-full"> |
|||
<div class="echart-box" ref="echartsRef"></div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import * as echarts from "echarts"; |
|||
|
|||
import { initLineOptions, doubleYAxisOptions } from "../js/initEcharts"; |
|||
export default { |
|||
data() { |
|||
return { |
|||
myChart: null, |
|||
dateRange: null, |
|||
startDate: null, |
|||
endDate: null, |
|||
}; |
|||
}, |
|||
created() {}, |
|||
mounted() { |
|||
setTimeout(() => { |
|||
this.initChart(); |
|||
}, 30); |
|||
}, |
|||
methods: { |
|||
initData() {}, |
|||
handleSearch() {}, |
|||
handleReset() {}, |
|||
initChart(data) { |
|||
// 渲染echarts |
|||
if (!this.$refs.echartsRef) { |
|||
return; |
|||
} |
|||
if (this.myChart) { |
|||
this.myChart.dispose(); |
|||
} |
|||
let options = initLineOptions(data); |
|||
this.myChart = echarts.init(this.$refs.echartsRef); |
|||
options && this.myChart.setOption(options); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
.water-rain-comp { |
|||
.echart-box { |
|||
width: 100%; |
|||
height: 300px; |
|||
|
|||
border: 1px solid #ddd; |
|||
} |
|||
} |
|||
|
|||
.w-150 { |
|||
width: 150px; |
|||
} |
|||
|
|||
.w-50 { |
|||
width: 50%; |
|||
} |
|||
</style> |
@ -0,0 +1,111 @@ |
|||
<template> |
|||
<div class="monitor-warning"> |
|||
<div class="flex justify-between mt-12"> |
|||
<div class="flex items-center"> |
|||
<el-select class="w-150" size="mini" v-model="dateRange"> |
|||
<el-option label="近1月" value="0"></el-option> |
|||
<el-option label="近1日" value="1"></el-option> |
|||
<el-option label="近7日" value="2"></el-option> |
|||
<el-option label="近3月" value="3"></el-option> |
|||
<el-option label="近1年" value="4"></el-option> |
|||
</el-select> |
|||
<span class="ml-10 mr-6">开始日期</span> |
|||
<el-date-picker |
|||
class="w-150" |
|||
size="mini" |
|||
type="date" |
|||
v-model="startDate" |
|||
placeholder="选择日期" |
|||
value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" |
|||
></el-date-picker> |
|||
<span class="ml-10 mr-6">结束日期</span> |
|||
<el-date-picker |
|||
class="w-150" |
|||
size="mini" |
|||
type="date" |
|||
v-model="endDate" |
|||
placeholder="选择日期" |
|||
value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" |
|||
></el-date-picker> |
|||
</div> |
|||
|
|||
<div class="flex items-center"> |
|||
<el-button type="primary" size="mini" @click="handleSearch" |
|||
>查询</el-button |
|||
> |
|||
<el-button size="mini" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="mt-10"> |
|||
<el-table :data="listData" border> |
|||
<el-table-column label="测站名称"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.name }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="测站编码"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.name }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="测站类型"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.name }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预警类型"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.name }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="监测数据"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.name }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="监测时间"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.time }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预警值" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.value }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="预警时间"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.createTime }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="操作" width="120"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="text" size="mini">告警处置</el-button> |
|||
<el-button type="text" size="mini">解除本次预警</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
dateRange: null, |
|||
startDate: null, |
|||
endDate: null, |
|||
listData: [], |
|||
}; |
|||
}, |
|||
created() {}, |
|||
methods: {}, |
|||
}; |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
.monitor-warning { |
|||
} |
|||
</style> |
@ -0,0 +1,149 @@ |
|||
<template> |
|||
<div class="water-rain-comp"> |
|||
<div class="text-16">监测站名称(代表站)</div> |
|||
<div class="flex justify-between mt-12"> |
|||
<div class="flex items-center"> |
|||
<el-select class="w-150" size="mini" v-model="dateRange"> |
|||
<el-option label="近1月" value="0"></el-option> |
|||
<el-option label="近1日" value="1"></el-option> |
|||
<el-option label="近7日" value="2"></el-option> |
|||
<el-option label="近3月" value="3"></el-option> |
|||
<el-option label="近1年" value="4"></el-option> |
|||
</el-select> |
|||
<span class="ml-10 mr-6">开始日期</span> |
|||
<el-date-picker |
|||
class="w-150" |
|||
size="mini" |
|||
type="date" |
|||
v-model="startDate" |
|||
placeholder="选择日期" |
|||
value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" |
|||
></el-date-picker> |
|||
<span class="ml-10 mr-6">结束日期</span> |
|||
<el-date-picker |
|||
class="w-150" |
|||
size="mini" |
|||
type="date" |
|||
v-model="endDate" |
|||
placeholder="选择日期" |
|||
value-format="yyyy-MM-dd" |
|||
format="yyyy-MM-dd" |
|||
></el-date-picker> |
|||
</div> |
|||
|
|||
<div class="flex items-center"> |
|||
<el-button type="primary" size="mini" @click="handleSearch" |
|||
>查询</el-button |
|||
> |
|||
<el-button size="mini" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="flex mt-10"> |
|||
<div class="w-50"> |
|||
<div class="mb-8">水情</div> |
|||
<div class="flex"> |
|||
<div class="mr-10"> |
|||
<div>当前水位</div> |
|||
<div>22 m</div> |
|||
</div> |
|||
<div class="mr-10"> |
|||
<div>当前蓄水位</div> |
|||
<div>22 m³</div> |
|||
</div> |
|||
<div class="mr-10"> |
|||
<div>最高库水位</div> |
|||
<div>22 m</div> |
|||
</div> |
|||
<div class="mr-10"> |
|||
<div>最低库水位</div> |
|||
<div>17 m</div> |
|||
</div> |
|||
<div> |
|||
<div>平均库水位</div> |
|||
<div>20 m</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="w-50"> |
|||
<div class="mb-8">雨情</div> |
|||
<div class="flex"> |
|||
<div class="mr-10"> |
|||
<div>日降雨量</div> |
|||
<div>22 mm</div> |
|||
</div> |
|||
<div class="mr-10"> |
|||
<div>最高日降雨量</div> |
|||
<div>22 mm</div> |
|||
</div> |
|||
<div> |
|||
<div>平均日降雨量</div> |
|||
<div>22 mm</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="mt-10">水雨情</div> |
|||
<div class="mt-8 w-full"> |
|||
<div class="echart-box" ref="echartsRef"></div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import * as echarts from "echarts"; |
|||
|
|||
import { initLineOptions, doubleYAxisOptions } from "../js/initEcharts"; |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
dateRange: null, |
|||
startDate: null, |
|||
endDate: null, |
|||
myChart: null, |
|||
}; |
|||
}, |
|||
created() {}, |
|||
mounted() { |
|||
setTimeout(() => { |
|||
this.initChart(); |
|||
}, 30); |
|||
}, |
|||
methods: { |
|||
initData() {}, |
|||
handleSearch() {}, |
|||
handleReset() {}, |
|||
initChart(data) { |
|||
// 渲染echarts |
|||
if (!this.$refs.echartsRef) { |
|||
return; |
|||
} |
|||
if (this.myChart) { |
|||
this.myChart.dispose(); |
|||
} |
|||
let options = doubleYAxisOptions(data); |
|||
this.myChart = echarts.init(this.$refs.echartsRef); |
|||
options && this.myChart.setOption(options); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
.water-rain-comp { |
|||
.echart-box { |
|||
width: 100%; |
|||
height: 300px; |
|||
|
|||
border: 1px solid #ddd; |
|||
} |
|||
} |
|||
|
|||
.w-150 { |
|||
width: 150px; |
|||
} |
|||
|
|||
.w-50 { |
|||
width: 50%; |
|||
} |
|||
</style> |
Loading…
Reference in new issue