Browse Source

测站水位数据详情

master
blankk 2 years ago
parent
commit
beb2447d2e
  1. 87
      src/views/data/currdata/index.vue

87
src/views/data/currdata/index.vue

@ -9,9 +9,9 @@ @@ -9,9 +9,9 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="水位计名称" prop="ip">
<el-form-item label="水位计名称" prop="stcd">
<el-input
v-model="queryParams.stnm"
v-model="queryParams.stcd"
placeholder="请输入水位计名称"
clearable
@keyup.enter.native="handleQuery"
@ -26,11 +26,17 @@ @@ -26,11 +26,17 @@
<el-table v-loading="loading" :data="currdataList"
border>
<el-table-column label="站点名称" align="center" prop="stnm" />
<el-table-column label="水位计名称" align="center" prop="ip" />
<el-table-column label="水位计名称" align="center" prop="stcd" />
<el-table-column label="最新数值" align="center" prop="value" />
<el-table-column label="最新上传时间" align="center" prop="tm" width="180" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="show(scope.row)"
>详情</el-button>
<el-button
size="mini"
type="text"
@ -41,7 +47,7 @@ @@ -41,7 +47,7 @@
</el-table-column>
</el-table>
<pagination
v-show="total>0"
v-show="total"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@ -69,14 +75,28 @@ @@ -69,14 +75,28 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- -->
<el-dialog
:visible.sync="dialogVisible"
width="1000px"
:before-close="closeDialog">
<barChart ref="chart" height="300" chartName="myEcharts"/>
</el-dialog>
</div>
</template>
<script>
import barChart from "@/components/ChartTimeLineBar";
export default {
name: "Currdata",
components:{
barChart
},
data() {
return {
dialogVisible: false,
//
loading: true,
//
@ -91,16 +111,7 @@ export default { @@ -91,16 +111,7 @@ export default {
total: 100,
//
currdataList: [
{stnmId: 1,stnm:'鄞州公园',ip:'视频水位计-yzgy',value:'2.95',tm: '2022-06-08 13:00:00'},
{stnmId: 2,stnm:'画龙',ip:'123.2.3.2',value:'39.2',tm: '2022-06-08 13:00:00'},
{stnmId: 3,stnm:'大盘山',ip:'123.2.3.3',value:'41.2',tm: '2022-06-08 13:00:00'},
{stnmId: 4,stnm:'大石门',ip:'123.2.3.4',value:'45.3',tm: '2022-06-08 13:00:00'},
{stnmId: 5,stnm:'云龙',ip:'123.2.3.5',value:'24.3',tm: '2022-06-08 13:00:00'},
{stnmId: 6,stnm:'华家山',ip:'123.2.3.6',value:'29.8',tm: '2022-06-08 13:00:00'},
{stnmId: 7,stnm:'东钱湖',ip:'123.2.3.7',value:'30.3',tm: '2022-06-08 13:00:00'},
{stnmId: 8,stnm:'横溪水库',ip:'123.2.3.8',value:'35.6',tm: '2022-06-08 13:00:00'},
{stnmId: 9,stnm:'咸祥',ip:'123.2.3.9',value:'33,1',tm: '2022-06-08 13:00:00'},
{stnmId: 10,stnm:'白鹤',ip:'123.2.3.10',value:'24.4',tm: '2022-06-08 13:00:00'},
],
//
title: "",
@ -127,15 +138,59 @@ export default { @@ -127,15 +138,59 @@ export default {
rules: {
},
spanArr: [],
position: 0
position: 0,
//
ChartData:{
endTime: new Date().getTime(),
stnmId: null,
startTime: new Date().getTime()- 3600 * 1000 * 24,
},
dataTypes:[
{label: '5分钟',value:'-1'},
{label: '小时',value:'0'},
{label: '日',value:'1'}
],
chartYname: "水位(m)",
unit: "m",
tableTime: "",
chartType: 'line',
fixed: 2,
in: '',
};
},
created() {
this.getList();
},
methods: {
/**
* 关闭弹框
*/
closeDialog(){
this.dialogVisible = false;
},
/**
* 显示
*/
async show(row){
this.dialogVisible = true;
this.ChartData.stnmId = row.id
console.log(this.ChartData)
let res = await this.$axiosGet('/system/photoinfo/getChart',this.ChartData);
if(res.code == 0){
this.title = res.data.series.name;
this.$refs.chart.showChart(res.data.legend,res.data.series,this.unit,this.chartType,0,null,this.fixed);
}
},
/** 查询实时数据列表 */
getList() {
async getList() {
this.loading = true;
let res = await this.$axiosGet('/system/photoinfo/getScWaterCurrentDataList',this.queryParams);
if(res.code === 0){
this.currdataList = res.data;
this.total = res.count;
}
this.loading = false;
},
//

Loading…
Cancel
Save