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 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="水位计名称" prop="ip"> <el-form-item label="水位计名称" prop="stcd">
<el-input <el-input
v-model="queryParams.stnm" v-model="queryParams.stcd"
placeholder="请输入水位计名称" placeholder="请输入水位计名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@ -26,11 +26,17 @@
<el-table v-loading="loading" :data="currdataList" <el-table v-loading="loading" :data="currdataList"
border> border>
<el-table-column label="站点名称" align="center" prop="stnm" /> <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="value" />
<el-table-column label="最新上传时间" align="center" prop="tm" width="180" /> <el-table-column label="最新上传时间" align="center" prop="tm" width="180" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="show(scope.row)"
>详情</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -41,7 +47,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@ -69,14 +75,28 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- -->
<el-dialog
:visible.sync="dialogVisible"
width="1000px"
:before-close="closeDialog">
<barChart ref="chart" height="300" chartName="myEcharts"/>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import barChart from "@/components/ChartTimeLineBar";
export default { export default {
name: "Currdata", name: "Currdata",
components:{
barChart
},
data() { data() {
return { return {
dialogVisible: false,
// //
loading: true, loading: true,
// //
@ -91,16 +111,7 @@ export default {
total: 100, total: 100,
// //
currdataList: [ 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: "", title: "",
@ -127,15 +138,59 @@ export default {
rules: { rules: {
}, },
spanArr: [], 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() { created() {
this.getList(); this.getList();
}, },
methods: { 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; this.loading = false;
}, },
// //

Loading…
Cancel
Save