merge
commit
ba8c475412
|
|
@ -5,7 +5,7 @@
|
|||
<div class="left">
|
||||
<div class="icon">
|
||||
<image
|
||||
style="width: 100%; height: 100%;border-radius: 50%;"
|
||||
style="width: 100%; height: 100%; border-radius: 50%"
|
||||
:src="default_src"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
|
|
@ -32,8 +32,13 @@
|
|||
:src="item.icon"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<div class="readStatus" v-show="(readStatus && item.key == 3) || (limit == 1 && readYjStatus && item.key == 5)">
|
||||
</div>
|
||||
<div
|
||||
class="readStatus"
|
||||
v-show="
|
||||
(readStatus && item.key == 3) ||
|
||||
(limit == 1 && readYjStatus && item.key == 5)
|
||||
"
|
||||
></div>
|
||||
</div>
|
||||
<div class="navTxt">{{ item.value }}</div>
|
||||
</div>
|
||||
|
|
@ -51,7 +56,7 @@
|
|||
mode="aspectFit"
|
||||
></image
|
||||
><span style="color: #000">当前防汛应急响应:</span>
|
||||
<span style="color:#59A7FF ">{{level}}</span>
|
||||
<span style="color: #59a7ff">{{ level }}</span>
|
||||
</view>
|
||||
|
||||
<!-- 24小时综述 -->
|
||||
|
|
@ -67,7 +72,9 @@
|
|||
<span class="g1">{{ list.data.yesterday }}</span
|
||||
>至<span class="g1">{{ list.data.today }}</span
|
||||
>24小时中共有<span class="ye">{{ list.data.stationNum }}</span
|
||||
>个降雨测站(山洪测站<span class="ye">{{ list.data.shStationNum }}</span
|
||||
>个降雨测站(山洪测站<span class="ye">{{
|
||||
list.data.shStationNum
|
||||
}}</span
|
||||
>个),其中最大降雨测站为<span class="ye">{{
|
||||
list.data.maxRain ? list.data.maxRain.stnm : '-'
|
||||
}}</span
|
||||
|
|
@ -118,7 +125,7 @@
|
|||
<span class="line"></span><span class="h4">24小时天气预报</span>
|
||||
</p>
|
||||
<div>
|
||||
<span class="time">{{ ydate }}至{{ date }}</span>
|
||||
<span class="time">{{ imgData[0] }}至{{ imgData[1] }}</span>
|
||||
<!-- <image
|
||||
style="width: 16px; height: 16px; vertical-align: middle"
|
||||
src="../../static/tabs/panelTitle.png"
|
||||
|
|
@ -158,8 +165,8 @@
|
|||
<div class="imgs" style="height: 100%; text-align: center">
|
||||
<!-- 24h天气预报图像-->
|
||||
<image
|
||||
v-if="!changeBool"
|
||||
src="../../static/tabs/bigImg.png"
|
||||
v-if="!changeBool && imgList.img24h"
|
||||
:src="imgList.img24h.url"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<!-- 表格-->
|
||||
|
|
@ -168,17 +175,25 @@
|
|||
<div class="table_cur">
|
||||
<table style="width: 100%; margin-top: -10%">
|
||||
<tr>
|
||||
<th style="width: 50px;color:#59A7FF">序号</th>
|
||||
<th style="width: 50px; color: #59a7ff">序号</th>
|
||||
|
||||
<th v-if="showTextTypeTab == 1" style="width: 70%;color:#59A7FF">水库</th>
|
||||
<th v-else style="width: 70%;color:#59A7FF">区域</th>
|
||||
<th
|
||||
v-if="showTextTypeTab == 1"
|
||||
style="width: 70%; color: #59a7ff"
|
||||
>
|
||||
水库
|
||||
</th>
|
||||
<th v-else style="width: 70%; color: #59a7ff">区域</th>
|
||||
|
||||
<th style="width: 50%;color:#59A7FF">降雨量(mm)</th>
|
||||
<th style="width: 50%; color: #59a7ff">降雨量(mm)</th>
|
||||
</tr>
|
||||
<div style="max-height: 260px; overflow-y: auto">
|
||||
<tr v-for="(item, index) in tableData.data.data" :key="index">
|
||||
<tr
|
||||
v-for="(item, index) in tableData.data.data"
|
||||
:key="index"
|
||||
>
|
||||
<td style="width: 62px">{{ index + 1 }}</td>
|
||||
<td style="width: 70%;">
|
||||
<td style="width: 70%">
|
||||
{{ item.name }}
|
||||
</td>
|
||||
<td style="width: 50%">{{ item.drp }}</td>
|
||||
|
|
@ -201,10 +216,10 @@
|
|||
<p class="title">
|
||||
<span class="line"></span><span class="h4">短时天气预报</span>
|
||||
</p>
|
||||
<div class="time">04月25日08时 至 04月25日10时</div>
|
||||
<div class="time">{{ imgHourstm[0] }} 至 {{ imgHourstm[1] }}</div>
|
||||
</div>
|
||||
<div class="imgs" style="height: 100%; text-align: center">
|
||||
<image src="../../static/tabs/bigImg.png" mode="aspectFit"></image>
|
||||
<image :src="imgHours.url" mode="aspectFit"></image>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -225,7 +240,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="info_icon" style="height: 260px; width: 100%">
|
||||
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
|
||||
<qiun-data-charts
|
||||
:chartData="chartData.chartData"
|
||||
:echartsApp="true"
|
||||
:eopts="chartData.eopts"
|
||||
/>
|
||||
</div>
|
||||
</view>
|
||||
<view class="info_24">
|
||||
|
|
@ -234,36 +253,52 @@
|
|||
<span class="line"></span><span class="h4">水情</span>
|
||||
</p>
|
||||
<div class="time" style="width: 50%; color: #000">
|
||||
<u-subsection :list="subList" :current="current" @change="subChange" mode="subsection"></u-subsection>
|
||||
<u-subsection
|
||||
:list="subList"
|
||||
:current="current"
|
||||
@change="subChange"
|
||||
mode="subsection"
|
||||
></u-subsection>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info_icon" v-if="current == 0">
|
||||
<div
|
||||
v-for="(item,i) in hdList" :key="i"
|
||||
v-for="(item, i) in hdList"
|
||||
:key="i"
|
||||
@click="jumpHdDetail(item)"
|
||||
style="display:flex;justify-content:space-between;align-items: center; margin-bottom:10px"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
"
|
||||
>
|
||||
<div>
|
||||
<div style="font-size: 32rpx">{{ item.stnm }}</div>
|
||||
<div style="font-size:24rpx;">实时水位:{{item.z}}m</div>
|
||||
</div>
|
||||
<div style="color:#91939B">
|
||||
监测时间:{{item.tm}}
|
||||
<div style="font-size: 24rpx">实时水位:{{ item.z }}m</div>
|
||||
</div>
|
||||
<div style="color: #91939b">监测时间:{{ item.tm }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info_icon" v-else>
|
||||
<div v-for="(item,i) in skList" :key="i"
|
||||
style="display:flex;justify-content:space-between;align-items: center; margin-bottom:10px"
|
||||
<div
|
||||
v-for="(item, i) in skList"
|
||||
:key="i"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
"
|
||||
@click="jumpSkDetail(item)"
|
||||
>
|
||||
<div>
|
||||
<div style="font-size: 32rpx">{{ item.stnm }}</div>
|
||||
<div style="font-size:24rpx;">实时水位:{{item.normWatLev}}m</div>
|
||||
<div style="font-size: 24rpx">
|
||||
实时水位:{{ item.normWatLev }}m
|
||||
</div>
|
||||
<div style="color:#91939B">
|
||||
监测时间:{{item.tm}}
|
||||
</div>
|
||||
<div style="color: #91939b">监测时间:{{ item.tm }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
|
|
@ -283,9 +318,11 @@ const dataType = {
|
|||
}
|
||||
|
||||
import moment from 'moment'
|
||||
import {level} from "../../pages/utils/dicType"
|
||||
import {disType} from "../utils/dicType.js"
|
||||
import drpOption from "./chartOption.js"
|
||||
import { level } from '../../pages/utils/dicType'
|
||||
import { disType } from '../utils/dicType.js'
|
||||
import drpOption from './chartOption.js'
|
||||
import { restm } from '../utils/tool'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
|
|
@ -312,7 +349,7 @@ export default {
|
|||
{ text: '最近3小时', value: 5 },
|
||||
{ text: '最近6小时', value: 6 },
|
||||
{ text: '最近12小时', value: 7 },
|
||||
{text:'最近24小时',value:8},
|
||||
{ text: '最近24小时', value: 8 }
|
||||
],
|
||||
value1: 3,
|
||||
rainChartData: [],
|
||||
|
|
@ -321,19 +358,22 @@ export default {
|
|||
.subtract(1, 'days')
|
||||
.startOf('day')
|
||||
.set({ hour: 8, minute: 0 }),
|
||||
etm: moment()
|
||||
.startOf('day')
|
||||
.set({ hour: 8, minute: 0 })
|
||||
etm: moment().startOf('day').set({ hour: 8, minute: 0 })
|
||||
},
|
||||
rainChartData: [],
|
||||
chartData: {},
|
||||
subList:["河道水情","水库水情"],
|
||||
subList: ['河道水情', '水库水情'],
|
||||
current: 0,
|
||||
hdList: [],
|
||||
skList: [],
|
||||
readStatus: false,
|
||||
readYjStatus: false,
|
||||
default_src: uni.getStorageSync('avatar'),
|
||||
imgList: {},
|
||||
imgtm: moment().format('YYYYMMDD'),
|
||||
imgData: [],
|
||||
imgHours: '',
|
||||
imgHourstm: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -409,7 +449,7 @@ export default {
|
|||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
rainChartData (newValue) {
|
||||
|
|
@ -418,7 +458,7 @@ export default {
|
|||
limit: {
|
||||
handler (newValue) {
|
||||
if (!newValue) {
|
||||
this.getRainList();
|
||||
this.getRainList()
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
|
|
@ -435,9 +475,33 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
async getImgs () {
|
||||
uni.request({
|
||||
url: 'http://223.75.53.124:8005/grb/rainimglist?tm=2024061308',
|
||||
data: {
|
||||
tm: `${this.imgtm}08`
|
||||
// tm: `2024061308`
|
||||
},
|
||||
success: res => {
|
||||
console.log(res.data.data)
|
||||
this.imgList = res.data.data
|
||||
let h = moment().format('HH') - 1
|
||||
let inx = restm(h)
|
||||
|
||||
this.imgHours = res.data.data.imgHours[inx]
|
||||
|
||||
let tm = moment().subtract(1, 'days').format('MM月DD日')
|
||||
let tm2 = moment().format('MM月DD日')
|
||||
this.imgData = [`${tm}08时`, `${tm2}08时`]
|
||||
this.imgHourstm = [`${tm2}${h}时`, `${tm2}${h + 1}时`]
|
||||
}
|
||||
})
|
||||
},
|
||||
async getYjRead () {
|
||||
try {
|
||||
const {data} = await uni.$http.get("/gunshiApp/xfflood/current/situation/flag")
|
||||
const { data } = await uni.$http.get(
|
||||
'/gunshiApp/xfflood/current/situation/flag'
|
||||
)
|
||||
if (data.code == 200) {
|
||||
this.readYjStatus = data.data
|
||||
}
|
||||
|
|
@ -447,7 +511,9 @@ export default {
|
|||
},
|
||||
async getReadStatus () {
|
||||
try {
|
||||
const {data} = await uni.$http.get("/gunshiApp/xfflood/xfProjectRun/has/read")
|
||||
const { data } = await uni.$http.get(
|
||||
'/gunshiApp/xfflood/xfProjectRun/has/read'
|
||||
)
|
||||
if (data.code == 200) {
|
||||
this.readStatus = Object.values(data.data).some(item => item == true)
|
||||
}
|
||||
|
|
@ -467,96 +533,91 @@ export default {
|
|||
},
|
||||
async getSkList () {
|
||||
try {
|
||||
const {data} = await uni.$http.post('/gunshiApp/xfflood/reservoir/water/list',{
|
||||
sources:["SW","SK"],
|
||||
const { data } = await uni.$http.post(
|
||||
'/gunshiApp/xfflood/reservoir/water/list',
|
||||
{
|
||||
sources: ['SW', 'SK'],
|
||||
adcd: uni.getStorageSync('value').adcd
|
||||
})
|
||||
}
|
||||
)
|
||||
if (data.code == 200) {
|
||||
this.skList = data.data;
|
||||
this.skList = data.data
|
||||
}
|
||||
} catch (error) {
|
||||
uni.$showMsg()
|
||||
}
|
||||
|
||||
},
|
||||
async getHdList () {
|
||||
try {
|
||||
const {data} = await uni.$http.post('/gunshiApp/xfflood/river/water/list',{
|
||||
sources:["SH","SW"],
|
||||
const { data } = await uni.$http.post(
|
||||
'/gunshiApp/xfflood/river/water/list',
|
||||
{
|
||||
sources: ['SH', 'SW'],
|
||||
adcd: uni.getStorageSync('value').adcd
|
||||
})
|
||||
}
|
||||
)
|
||||
if (data.code == 200) {
|
||||
this.hdList = data.data;
|
||||
this.hdList = data.data
|
||||
}
|
||||
} catch (error) {
|
||||
uni.$showMsg()
|
||||
}
|
||||
|
||||
},
|
||||
subChange (e) {
|
||||
this.current = e
|
||||
},
|
||||
async getRainList () {
|
||||
try {
|
||||
const {data} = await uni.$http.post('/gunshiApp/xfflood/real/rain/home/list',{
|
||||
start:this.formData.stm.format("YYYY-MM-DD HH:mm:ss"),
|
||||
end:this.formData.etm.format("YYYY-MM-DD HH:mm:ss")
|
||||
})
|
||||
const { data } = await uni.$http.post(
|
||||
'/gunshiApp/xfflood/real/rain/home/list',
|
||||
{
|
||||
start: this.formData.stm.format('YYYY-MM-DD HH:mm:ss'),
|
||||
end: this.formData.etm.format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
)
|
||||
if (data.code == 200) {
|
||||
this.rainChartData = data.data;
|
||||
this.rainChartData = data.data
|
||||
}
|
||||
} catch (error) {
|
||||
uni.$showMsg()
|
||||
}
|
||||
|
||||
},
|
||||
changeTime (params) {
|
||||
let tmValue=[];
|
||||
let tmValue = []
|
||||
if (params === 1) {
|
||||
tmValue=[moment()
|
||||
tmValue = [
|
||||
moment()
|
||||
.subtract(1, 'days')
|
||||
.startOf('day')
|
||||
.set({ hour: 8, minute: 0 }),
|
||||
moment()
|
||||
]
|
||||
} else if (params === 2) {
|
||||
tmValue=[moment()
|
||||
.startOf('day')
|
||||
.set({ hour: 8, minute: 0 }),
|
||||
tmValue = [
|
||||
moment().startOf('day').set({ hour: 8, minute: 0 }),
|
||||
moment()
|
||||
]
|
||||
} else if (params === 3) {
|
||||
tmValue=[moment()
|
||||
tmValue = [
|
||||
moment()
|
||||
.subtract(1, 'days')
|
||||
.startOf('day')
|
||||
.set({ hour: 8, minute: 0 }),
|
||||
moment()
|
||||
.startOf('day')
|
||||
.set({ hour: 8, minute: 0 })
|
||||
moment().startOf('day').set({ hour: 8, minute: 0 })
|
||||
]
|
||||
} else if (params === 4) {
|
||||
tmValue=[moment().subtract(1, 'hours'),
|
||||
moment()
|
||||
]
|
||||
tmValue = [moment().subtract(1, 'hours'), moment()]
|
||||
} else if (params === 5) {
|
||||
tmValue=[moment().subtract(3, 'hours'),
|
||||
moment()
|
||||
]
|
||||
tmValue = [moment().subtract(3, 'hours'), moment()]
|
||||
} else if (params === 6) {
|
||||
tmValue=[moment().subtract(6, 'hours'),
|
||||
moment()
|
||||
]
|
||||
tmValue = [moment().subtract(6, 'hours'), moment()]
|
||||
} else if (params === 7) {
|
||||
tmValue=[moment().subtract(12, 'hours'),
|
||||
moment()
|
||||
]
|
||||
tmValue = [moment().subtract(12, 'hours'), moment()]
|
||||
} else if (params === 8) {
|
||||
tmValue=[moment().subtract(24, 'hours'),
|
||||
moment()
|
||||
]
|
||||
tmValue = [moment().subtract(24, 'hours'), moment()]
|
||||
}
|
||||
this.formData.stm=tmValue[0];
|
||||
this.formData.etm=tmValue[1];
|
||||
this.formData.stm = tmValue[0]
|
||||
this.formData.etm = tmValue[1]
|
||||
this.getRainList()
|
||||
},
|
||||
todetail (val) {
|
||||
|
|
@ -653,10 +714,13 @@ export default {
|
|||
},
|
||||
async getResponseLevel () {
|
||||
try {
|
||||
const {data} = await uni.$http.post('/gunshiApp/xfflood/xfEmerRespR/page',{
|
||||
const { data } = await uni.$http.post(
|
||||
'/gunshiApp/xfflood/xfEmerRespR/page',
|
||||
{
|
||||
pageSo: { pageSize: 10, pageNumber: 1 },
|
||||
year: moment().format('YYYY')
|
||||
})
|
||||
}
|
||||
)
|
||||
if (data.code == 200) {
|
||||
if (data.data.records.length > 0) {
|
||||
this.level = level(data.data.records[0].level)
|
||||
|
|
@ -672,16 +736,15 @@ export default {
|
|||
uni.navigateTo({
|
||||
url: url // 跳转到对应路径的页面
|
||||
})
|
||||
},
|
||||
}
|
||||
// 响应级别
|
||||
|
||||
},
|
||||
onLoad () {
|
||||
this.getSwiperList()
|
||||
this.getOverview()
|
||||
this.getDataTime()
|
||||
this.getResponseLevel()
|
||||
|
||||
this.getImgs()
|
||||
},
|
||||
onShow () {
|
||||
this.getReadStatus()
|
||||
|
|
@ -903,7 +966,7 @@ export default {
|
|||
|
||||
.table_cur td {
|
||||
height: 56rpx;
|
||||
border-bottom: 1px solid #E5E9F2;
|
||||
border-bottom: 1px solid #e5e9f2;
|
||||
font-size: 14px;
|
||||
color: #2f4056;
|
||||
padding: 0 10px;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
export function restm (e) {
|
||||
let index = ''
|
||||
if (e == '8') {
|
||||
index = 0
|
||||
} else if (e == '9') {
|
||||
index = 1
|
||||
} else if (e == '10') {
|
||||
index = 2
|
||||
} else if (e == '11') {
|
||||
index = 3
|
||||
} else if (e == '12') {
|
||||
index = 4
|
||||
} else if (e == '13') {
|
||||
index = 5
|
||||
} else if (e == '14') {
|
||||
index = 6
|
||||
} else if (e == '15') {
|
||||
index = 7
|
||||
} else if (e == '16') {
|
||||
index = 8
|
||||
} else if (e == '17') {
|
||||
index = 9
|
||||
} else if (e == '18') {
|
||||
index = 10
|
||||
} else if (e == '19') {
|
||||
index = 11
|
||||
} else if (e == '20') {
|
||||
index = 12
|
||||
} else if (e == '21') {
|
||||
index = 13
|
||||
} else if (e == '22') {
|
||||
index = 14
|
||||
} else if (e == '23') {
|
||||
index = 15
|
||||
} else if (e == '0') {
|
||||
index = 16
|
||||
} else if (e == '1') {
|
||||
index = 17
|
||||
} else if (e == '2') {
|
||||
index = 18
|
||||
} else if (e == '3') {
|
||||
index = 19
|
||||
} else if (e == '4') {
|
||||
index = 20
|
||||
} else if (e == '5') {
|
||||
index = 21
|
||||
} else if (e == '6') {
|
||||
index = 22
|
||||
} else if (e == '7') {
|
||||
index = 23
|
||||
}
|
||||
return index
|
||||
}
|
||||
Loading…
Reference in New Issue