feat: image

master
张林 2024-06-14 13:49:51 +08:00
parent a16f01b987
commit 25b81fe812
2 changed files with 451 additions and 335 deletions

View File

@ -5,7 +5,7 @@
<div class="left"> <div class="left">
<div class="icon"> <div class="icon">
<image <image
style="width: 100%; height: 100%;border-radius: 50%;" style="width: 100%; height: 100%; border-radius: 50%"
:src="default_src" :src="default_src"
mode="aspectFill" mode="aspectFill"
></image> ></image>
@ -32,8 +32,13 @@
:src="item.icon" :src="item.icon"
mode="aspectFit" mode="aspectFit"
></image> ></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>
<div class="navTxt">{{ item.value }}</div> <div class="navTxt">{{ item.value }}</div>
</div> </div>
@ -50,220 +55,250 @@
src="../../static/tabs/ld.png" src="../../static/tabs/ld.png"
mode="aspectFit" mode="aspectFit"
></image ></image
><span style="color:#000">当前防汛应急响应</span> ><span style="color: #000">当前防汛应急响应</span>
<span style="color:#59A7FF ">{{level}}</span> <span style="color: #59a7ff">{{ level }}</span>
</view> </view>
<!-- 24小时综述 --> <!-- 24小时综述 -->
<view v-show="limit == 1"> <view v-show="limit == 1">
<view class="info_24"> <view class="info_24">
<div class="heart"> <div class="heart">
<p class="title"> <p class="title">
<span class="line"></span><span class="h4">24小时综述</span> <span class="line"></span><span class="h4">24小时综述</span>
</p> </p>
<div class="time">{{ ydate }}{{ date }}</div> <div class="time">{{ ydate }}{{ date }}</div>
</div> </div>
<div class="info_con" v-if="list.data"> <div class="info_con" v-if="list.data">
<span class="g1">{{ list.data.yesterday }}</span <span class="g1">{{ list.data.yesterday }}</span
><span class="g1">{{ list.data.today }}</span ><span class="g1">{{ list.data.today }}</span
>24小时中共有<span class="ye">{{ list.data.stationNum }}</span >24小时中共有<span class="ye">{{ list.data.stationNum }}</span
>个降雨测站(山洪测站<span class="ye">{{ list.data.shStationNum }}</span >个降雨测站(山洪测站<span class="ye">{{
>)其中最大降雨测站为<span class="ye">{{ list.data.shStationNum
list.data.maxRain ? list.data.maxRain.stnm : '-'
}}</span
>降雨量<span class="ye">{{
list.data.maxRain ? list.data.maxRain.drp : '-'
}}</span
>mm
<template v-if="list.data.cntDrp10 != 0"
><span class="b1">10mm</span>以下测站数为<apan class="ye">{{
list.data.cntDrp10
}}</apan
></template
><template v-if="list.data.cntDrp25 != 0"
><span class="b1">10mm至25mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp25
}}</span }}</span
></template >)其中最大降雨测站为<span class="ye">{{
> list.data.maxRain ? list.data.maxRain.stnm : '-'
<template v-if="list.data.cntDrp50 != 0">
<span class="b1">25mm至50mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp50
}}</span }}</span
> >降雨量<span class="ye">{{
</template> list.data.maxRain ? list.data.maxRain.drp : '-'
<template v-if="list.data.cntDrp100 != 0">
<span class="b1">50mm至100mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp100
}}</span }}</span
> >mm
</template> <template v-if="list.data.cntDrp10 != 0"
<template v-if="list.data.cntDrp250 != 0"> ><span class="b1">10mm</span>以下测站数为<span class="ye">{{
<span class="b1">100mm至250mm</span>以下测站数为<span class="ye">{{ list.data.cntDrp10
list.data.cntDrp250 }}</span
}}</span ></template
> ><template v-if="list.data.cntDrp25 != 0"
</template> ><span class="b1">10mm至25mm</span>以下测站数为<span class="ye">{{
<template v-if="list.data.cntDrpg250 != 0" list.data.cntDrp25
><span class="b1">250mm以上</span>以下测站数为<span class="ye">{{ }}</span
list.data.cntDrpg250 ></template
}}</span >
></template <template v-if="list.data.cntDrp50 != 0">
> <span class="b1">25mm至50mm</span>以下测站数为<span class="ye">{{
</div> list.data.cntDrp50
</view> }}</span
<view class="info_24"> >
<div class="heart"> </template>
<p class="title"> <template v-if="list.data.cntDrp100 != 0">
<span class="line"></span><span class="h4">24小时天气预报</span> <span class="b1">50mm至100mm</span>以下测站数为<span class="ye">{{
</p> list.data.cntDrp100
<div> }}</span
<span class="time">{{ ydate }}{{ date }}</span> >
<!-- <image </template>
<template v-if="list.data.cntDrp250 != 0">
<span class="b1">100mm至250mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp250
}}</span
>
</template>
<template v-if="list.data.cntDrpg250 != 0"
><span class="b1">250mm以上</span>以下测站数为<span class="ye">{{
list.data.cntDrpg250
}}</span
></template
>
</div>
</view>
<view class="info_24">
<div class="heart">
<p class="title">
<span class="line"></span><span class="h4">24小时天气预报</span>
</p>
<div>
<span class="time">{{ imgData[0] }}{{ imgData[1] }}</span>
<!-- <image
style="width: 16px; height: 16px; vertical-align: middle" style="width: 16px; height: 16px; vertical-align: middle"
src="../../static/tabs/panelTitle.png" src="../../static/tabs/panelTitle.png"
mode="aspectFit" mode="aspectFit"
@click="changeTable" @click="changeTable"
></image> --> ></image> -->
</div>
</div> </div>
</div>
<div class="chartChange fl"> <div class="chartChange fl">
<div class="chart_tit" @click="changeTable"> <div class="chart_tit" @click="changeTable">
<image
style="vertical-align: middle"
src="../../static/tabs/chartcolumn@2x.png"
mode="aspectFit"
></image>
<span>图表</span>
</div>
<div v-if="changeBool" class="table_h">
<div
class="leftTab"
:class="{ activetextTypeTab: showTextTypeTab == 1 }"
@click="tabChange(1)"
>
水库降雨
</div>
<div
class="rightTab"
:class="{ activetextTypeTab: showTextTypeTab == 2 }"
@click="tabChange(2)"
>
区域降雨
</div>
</div>
</div>
<div class="imgs" style="height: 100%; text-align: center">
<!-- 24h天气预报图像-->
<image <image
style="vertical-align: middle" v-if="!changeBool && imgList.img24h"
src="../../static/tabs/chartcolumn@2x.png" :src="imgList.img24h.url"
mode="aspectFit" mode="aspectFit"
></image> ></image>
<span>图表</span> <!-- 表格-->
</div> <div v-else class="tableBox">
<div v-if="changeBool" class="table_h"> <div class="table_div">
<div <div class="table_cur">
class="leftTab" <table style="width: 100%; margin-top: -10%">
:class="{ activetextTypeTab: showTextTypeTab == 1 }" <tr>
@click="tabChange(1)" <th style="width: 50px; color: #59a7ff">序号</th>
>
水库降雨
</div>
<div
class="rightTab"
:class="{ activetextTypeTab: showTextTypeTab == 2 }"
@click="tabChange(2)"
>
区域降雨
</div>
</div>
</div>
<div class="imgs" style="height: 100%; text-align: center"> <th
<!-- 24h天气预报图像--> v-if="showTextTypeTab == 1"
<image style="width: 70%; color: #59a7ff"
v-if="!changeBool" >
src="../../static/tabs/bigImg.png" 水库
mode="aspectFit" </th>
></image> <th v-else style="width: 70%; color: #59a7ff">区域</th>
<!-- 表格-->
<div v-else class="tableBox">
<div class="table_div">
<div class="table_cur">
<table style="width:100%;margin-top:-10%">
<tr>
<th style="width: 50px;color:#59A7FF">序号</th>
<th v-if="showTextTypeTab == 1" style="width: 70%;color:#59A7FF"></th> <th style="width: 50%; color: #59a7ff">降雨量(mm)</th>
<th v-else style="width: 70%;color:#59A7FF">区域</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">
<td style="width: 62px">{{ index + 1 }}</td>
<td style="width: 70%;">
{{ item.name }}
</td>
<td style="width: 50%">{{ item.drp }}</td>
</tr> </tr>
</div> <div style="max-height: 260px; overflow-y: auto">
<tr
v-for="(item, index) in tableData.data.data"
:key="index"
>
<td style="width: 62px">{{ index + 1 }}</td>
<td style="width: 70%">
{{ item.name }}
</td>
<td style="width: 50%">{{ item.drp }}</td>
</tr>
</div>
<!-- <tr> <!-- <tr>
<td style="width: 62px">1</td> <td style="width: 62px">1</td>
<td style="width: 70%">水库水库</td> <td style="width: 70%">水库水库</td>
<td style="width: 50%">11</td> <td style="width: 50%">11</td>
</tr> --> </tr> -->
</table> </table>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
</view>
<view class="info_24">
<div class="heart">
<p class="title">
<span class="line"></span><span class="h4">短时天气预报</span>
</p>
<div class="time">04月25日08时 04月25日10时</div>
</div>
<div class="imgs" style="height: 100%; text-align: center">
<image src="../../static/tabs/bigImg.png" mode="aspectFit"></image>
</div>
</view>
</view>
<view v-show="limit != 1" >
<view class="info_24">
<div class="heart">
<p class="title">
<span class="line"></span><span class="h4">雨情</span>
</p>
<div class="time" style="width:50%;color:#000">
<uni-data-select
v-model="value1"
:localdata="timeList"
@change="changeTime"
:clear="false"
>
</uni-data-select>
</div>
</div>
<div class="info_icon" style="height:260px; width:100%">
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
</div>
</view> </view>
<view class="info_24"> <view class="info_24">
<div class="heart" style="margin-bottom:10px"> <div class="heart">
<p class="title"> <p class="title">
<span class="line"></span><span class="h4">水情</span> <span class="line"></span><span class="h4">短时天气预报</span>
</p> </p>
<div class="time" style="width:50%;color:#000"> <div class="time">{{ imgHourstm[0] }} {{ imgHourstm[1] }}</div>
<u-subsection :list="subList" :current="current" @change="subChange" mode="subsection"></u-subsection>
</div> </div>
<div class="imgs" style="height: 100%; text-align: center">
<image :src="imgHours.url" mode="aspectFit"></image>
</div>
</view>
</view>
<view v-show="limit != 1">
<view class="info_24">
<div class="heart">
<p class="title">
<span class="line"></span><span class="h4">雨情</span>
</p>
<div class="time" style="width: 50%; color: #000">
<uni-data-select
v-model="value1"
:localdata="timeList"
@change="changeTime"
:clear="false"
>
</uni-data-select>
</div>
</div>
<div class="info_icon" style="height: 260px; width: 100%">
<qiun-data-charts
:chartData="chartData.chartData"
:echartsApp="true"
:eopts="chartData.eopts"
/>
</div>
</view>
<view class="info_24">
<div class="heart" style="margin-bottom: 10px">
<p class="title">
<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>
</div>
</div> </div>
<div class="info_icon" v-if="current == 0"> <div class="info_icon" v-if="current == 0">
<div <div
v-for="(item,i) in hdList" :key="i" v-for="(item, i) in hdList"
@click="jumpHdDetail(item)" :key="i"
style="display:flex;justify-content:space-between;align-items: center; margin-bottom:10px" @click="jumpHdDetail(item)"
style="
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
"
> >
<div> <div>
<div style="font-size:32rpx">{{item.stnm}}</div> <div style="font-size: 32rpx">{{ item.stnm }}</div>
<div style="font-size:24rpx;">实时水位{{item.z}}m</div> <div style="font-size: 24rpx">实时水位{{ item.z }}m</div>
</div>
<div style="color:#91939B">
监测时间{{item.tm}}
</div> </div>
<div style="color: #91939b">监测时间{{ item.tm }}</div>
</div> </div>
</div> </div>
<div class="info_icon" v-else> <div class="info_icon" v-else>
<div v-for="(item,i) in skList" :key="i" <div
style="display:flex;justify-content:space-between;align-items: center; margin-bottom:10px" v-for="(item, i) in skList"
@click="jumpSkDetail(item)" :key="i"
style="
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
"
@click="jumpSkDetail(item)"
> >
<div> <div>
<div style="font-size:32rpx">{{item.stnm}}</div> <div style="font-size: 32rpx">{{ item.stnm }}</div>
<div style="font-size:24rpx;">实时水位{{item.normWatLev}}m</div> <div style="font-size: 24rpx">
</div> 实时水位{{ item.normWatLev }}m
<div style="color:#91939B"> </div>
监测时间{{item.tm}}
</div> </div>
<div style="color: #91939b">监测时间{{ item.tm }}</div>
</div> </div>
</div> </div>
</view> </view>
@ -283,9 +318,11 @@ const dataType = {
} }
import moment from 'moment' import moment from 'moment'
import {level} from "../../pages/utils/dicType" import { level } from '../../pages/utils/dicType'
import {disType} from "../utils/dicType.js" import { disType } from '../utils/dicType.js'
import drpOption from "./chartOption.js" import drpOption from './chartOption.js'
import { restm } from '../utils/tool'
export default { export default {
data () { data () {
return { return {
@ -303,37 +340,40 @@ export default {
tableData: {}, tableData: {},
tm: '', tm: '',
level: '', level: '',
limit:disType(uni.getStorageSync('value').adcd), limit: disType(uni.getStorageSync('value').adcd),
timeList:[ timeList: [
{text:'昨天08:00~当前时间',value:1}, { text: '昨天08:00~当前时间', value: 1 },
{text:'今天08:00~当前时间',value:2}, { text: '今天08:00~当前时间', value: 2 },
{text:'昨天08:00~今天08:00',value:3}, { text: '昨天08:00~今天08:00', value: 3 },
{text:'最近1小时',value:4}, { text: '最近1小时', value: 4 },
{text:'最近3小时',value:5}, { text: '最近3小时', value: 5 },
{text:'最近6小时',value:6}, { text: '最近6小时', value: 6 },
{text:'最近12小时',value:7}, { text: '最近12小时', value: 7 },
{text:'最近24小时',value:8}, { text: '最近24小时', value: 8 }
], ],
value1:3, value1: 3,
rainChartData:[], rainChartData: [],
formData:{ formData: {
stm:moment() stm: moment()
.subtract(1, 'days') .subtract(1, 'days')
.startOf('day') .startOf('day')
.set({ hour: 8, minute: 0 }), .set({ hour: 8, minute: 0 }),
etm: moment() etm: moment().startOf('day').set({ hour: 8, minute: 0 })
.startOf('day')
.set({ hour: 8, minute: 0 })
}, },
rainChartData:[], rainChartData: [],
chartData:{}, chartData: {},
subList:["河道水情","水库水情"], subList: ['河道水情', '水库水情'],
current:0, current: 0,
hdList:[], hdList: [],
skList:[], skList: [],
readStatus:false, readStatus: false,
readYjStatus:false, readYjStatus: false,
default_src: uni.getStorageSync('avatar'), default_src: uni.getStorageSync('avatar'),
imgList: {},
imgtm: moment().format('YYYYMMDD'),
imgData: [],
imgHours: '',
imgHourstm: []
} }
}, },
computed: { computed: {
@ -409,25 +449,25 @@ export default {
} }
] ]
} }
}, }
}, },
watch:{ watch: {
rainChartData(newValue){ rainChartData (newValue) {
this.chartData = {...drpOption(newValue)} this.chartData = { ...drpOption(newValue) }
}, },
limit:{ limit: {
handler(newValue){ handler (newValue) {
if(!newValue){ if (!newValue) {
this.getRainList(); this.getRainList()
} }
}, },
immediate: true immediate: true
}, },
current:{ current: {
handler(newValue){ handler (newValue) {
if(newValue == 0){ if (newValue == 0) {
this.getHdList() this.getHdList()
}else{ } else {
this.getSkList() this.getSkList()
} }
}, },
@ -435,129 +475,150 @@ export default {
} }
}, },
methods: { methods: {
async getYjRead(){ 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 { try {
const {data} = await uni.$http.get("/gunshiApp/xfflood/current/situation/flag") const { data } = await uni.$http.get(
if(data.code == 200){ '/gunshiApp/xfflood/current/situation/flag'
)
if (data.code == 200) {
this.readYjStatus = data.data this.readYjStatus = data.data
} }
} catch (error) { } catch (error) {
uni.$showMsg() uni.$showMsg()
} }
}, },
async getReadStatus(){ async getReadStatus () {
try { try {
const {data} = await uni.$http.get("/gunshiApp/xfflood/xfProjectRun/has/read") const { data } = await uni.$http.get(
if(data.code == 200){ '/gunshiApp/xfflood/xfProjectRun/has/read'
)
if (data.code == 200) {
this.readStatus = Object.values(data.data).some(item => item == true) this.readStatus = Object.values(data.data).some(item => item == true)
} }
} catch (error) { } catch (error) {
uni.$showMsg() uni.$showMsg()
} }
}, },
jumpHdDetail(params){ jumpHdDetail (params) {
uni.navigateTo({ uni.navigateTo({
url:`/pages/hdDetail/hdDetail?stcd=${params.stcd}&stnm=${params.stnm}&source=${params.source}&wrz=${params.wrz}&grz=${params.grz}` url: `/pages/hdDetail/hdDetail?stcd=${params.stcd}&stnm=${params.stnm}&source=${params.source}&wrz=${params.wrz}&grz=${params.grz}`
})
},
jumpSkDetail(params){
uni.navigateTo({
url:`/pages/skDetail/skDetail?stcd=${params.stcd}&stnm=${params.stnm}&source=${params.source}&afsltdz=${params.afsltdz}&flLowLimLev=${params.flLowLimLev}&desFloodLev=${params.desFloodLev}&calFloodLev=${params.calFloodLev}&resCode=${params.resCode}`
})
},
async getSkList(){
try {
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;
}
} catch (error) {
uni.$showMsg()
}
}, },
async getHdList(){ jumpSkDetail (params) {
try { uni.navigateTo({
const {data} = await uni.$http.post('/gunshiApp/xfflood/river/water/list',{ url: `/pages/skDetail/skDetail?stcd=${params.stcd}&stnm=${params.stnm}&source=${params.source}&afsltdz=${params.afsltdz}&flLowLimLev=${params.flLowLimLev}&desFloodLev=${params.desFloodLev}&calFloodLev=${params.calFloodLev}&resCode=${params.resCode}`
sources:["SH","SW"],
adcd:uni.getStorageSync('value').adcd
}) })
if(data.code == 200){
this.hdList = data.data;
}
} catch (error) {
uni.$showMsg()
}
}, },
subChange(e){ async getSkList () {
try {
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
}
} catch (error) {
uni.$showMsg()
}
},
async getHdList () {
try {
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
}
} catch (error) {
uni.$showMsg()
}
},
subChange (e) {
this.current = e this.current = e
}, },
async getRainList(){ async getRainList () {
try { try {
const {data} = await uni.$http.post('/gunshiApp/xfflood/real/rain/home/list',{ const { data } = await uni.$http.post(
start:this.formData.stm.format("YYYY-MM-DD HH:mm:ss"), '/gunshiApp/xfflood/real/rain/home/list',
end:this.formData.etm.format("YYYY-MM-DD HH:mm:ss") {
}) start: this.formData.stm.format('YYYY-MM-DD HH:mm:ss'),
if(data.code == 200){ end: this.formData.etm.format('YYYY-MM-DD HH:mm:ss')
this.rainChartData = data.data; }
)
if (data.code == 200) {
this.rainChartData = data.data
}
} catch (error) {
uni.$showMsg()
} }
} catch (error) {
uni.$showMsg()
}
}, },
changeTime(params){ changeTime (params) {
let tmValue=[]; let tmValue = []
if(params === 1){ if (params === 1) {
tmValue=[moment() tmValue = [
moment()
.subtract(1, 'days') .subtract(1, 'days')
.startOf('day') .startOf('day')
.set({ hour: 8, minute: 0 }), .set({ hour: 8, minute: 0 }),
moment() moment()
]
}else if(params ===2){
tmValue=[moment()
.startOf('day')
.set({ hour: 8, minute: 0 }),
moment()
] ]
}else if(params ===3){ } else if (params === 2) {
tmValue=[moment() tmValue = [
.subtract(1, 'days') moment().startOf('day').set({ hour: 8, minute: 0 }),
.startOf('day') moment()
.set({ hour: 8, minute: 0 }),
moment()
.startOf('day')
.set({ hour: 8, minute: 0 })
] ]
}else if(params ===4){ } else if (params === 3) {
tmValue=[moment().subtract(1, 'hours'), tmValue = [
moment() moment()
.subtract(1, 'days')
.startOf('day')
.set({ hour: 8, minute: 0 }),
moment().startOf('day').set({ hour: 8, minute: 0 })
] ]
}else if(params ===5){ } else if (params === 4) {
tmValue=[moment().subtract(3, 'hours'), tmValue = [moment().subtract(1, 'hours'), moment()]
moment() } else if (params === 5) {
] tmValue = [moment().subtract(3, 'hours'), moment()]
}else if(params ===6){ } else if (params === 6) {
tmValue=[moment().subtract(6, 'hours'), tmValue = [moment().subtract(6, 'hours'), moment()]
moment() } else if (params === 7) {
] tmValue = [moment().subtract(12, 'hours'), moment()]
}else if(params ===7){ } else if (params === 8) {
tmValue=[moment().subtract(12, 'hours'), tmValue = [moment().subtract(24, 'hours'), moment()]
moment() }
] this.formData.stm = tmValue[0]
}else if(params ===8){ this.formData.etm = tmValue[1]
tmValue=[moment().subtract(24, 'hours'), this.getRainList()
moment()
]
}
this.formData.stm=tmValue[0];
this.formData.etm=tmValue[1];
this.getRainList()
}, },
todetail (val) { todetail (val) {
console.log('val', val) console.log('val', val)
@ -651,19 +712,22 @@ export default {
this.tm = d1 + h1 this.tm = d1 + h1
}, },
async getResponseLevel () { async getResponseLevel () {
try { try {
const {data} = await uni.$http.post('/gunshiApp/xfflood/xfEmerRespR/page',{ const { data } = await uni.$http.post(
pageSo:{pageSize: 10, pageNumber: 1}, '/gunshiApp/xfflood/xfEmerRespR/page',
year:moment().format('YYYY') {
}) pageSo: { pageSize: 10, pageNumber: 1 },
if(data.code == 200){ year: moment().format('YYYY')
if(data.data.records.length > 0){
this.level = level(data.data.records[0].level)
}else{
this.level = '无'
}
} }
)
if (data.code == 200) {
if (data.data.records.length > 0) {
this.level = level(data.data.records[0].level)
} else {
this.level = '无'
}
}
} catch (e) { } catch (e) {
uni.$showMsg() uni.$showMsg()
} }
@ -672,20 +736,19 @@ export default {
uni.navigateTo({ uni.navigateTo({
url: url // url: url //
}) })
}, }
// //
}, },
onLoad () { onLoad () {
this.getSwiperList() this.getSwiperList()
this.getOverview() this.getOverview()
this.getDataTime() this.getDataTime()
this.getResponseLevel() this.getResponseLevel()
this.getImgs()
}, },
onShow(){ onShow () {
this.getReadStatus() this.getReadStatus()
if(this.limit == 1){ if (this.limit == 1) {
this.getYjRead() this.getYjRead()
} }
} }
@ -753,7 +816,7 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.readStatus{ .readStatus {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
@ -903,7 +966,7 @@ export default {
.table_cur td { .table_cur td {
height: 56rpx; height: 56rpx;
border-bottom: 1px solid #E5E9F2; border-bottom: 1px solid #e5e9f2;
font-size: 14px; font-size: 14px;
color: #2f4056; color: #2f4056;
padding: 0 10px; padding: 0 10px;

53
pages/utils/tool.js Normal file
View File

@ -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
}