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="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>
@ -50,220 +55,250 @@
src="../../static/tabs/ld.png"
mode="aspectFit"
></image
><span style="color:#000">当前防汛应急响应</span>
<span style="color:#59A7FF ">{{level}}</span>
><span style="color: #000">当前防汛应急响应</span>
<span style="color: #59a7ff">{{ level }}</span>
</view>
<!-- 24小时综述 -->
<view v-show="limit == 1">
<view class="info_24">
<div class="heart">
<p class="title">
<span class="line"></span><span class="h4">24小时综述</span>
</p>
<div class="time">{{ ydate }}{{ date }}</div>
</div>
<div class="info_con" v-if="list.data">
<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.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
<view class="info_24">
<div class="heart">
<p class="title">
<span class="line"></span><span class="h4">24小时综述</span>
</p>
<div class="time">{{ ydate }}{{ date }}</div>
</div>
<div class="info_con" v-if="list.data">
<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
></template
>
<template v-if="list.data.cntDrp50 != 0">
<span class="b1">25mm至50mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp50
>)其中最大降雨测站为<span class="ye">{{
list.data.maxRain ? list.data.maxRain.stnm : '-'
}}</span
>
</template>
<template v-if="list.data.cntDrp100 != 0">
<span class="b1">50mm至100mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp100
>降雨量<span class="ye">{{
list.data.maxRain ? list.data.maxRain.drp : '-'
}}</span
>
</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">{{ ydate }}{{ date }}</span>
<!-- <image
>mm
<template v-if="list.data.cntDrp10 != 0"
><span class="b1">10mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp10
}}</span
></template
><template v-if="list.data.cntDrp25 != 0"
><span class="b1">10mm至25mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp25
}}</span
></template
>
<template v-if="list.data.cntDrp50 != 0">
<span class="b1">25mm至50mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp50
}}</span
>
</template>
<template v-if="list.data.cntDrp100 != 0">
<span class="b1">50mm至100mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp100
}}</span
>
</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"
src="../../static/tabs/panelTitle.png"
mode="aspectFit"
@click="changeTable"
></image> -->
</div>
</div>
</div>
<div class="chartChange fl">
<div class="chart_tit" @click="changeTable">
<div class="chartChange fl">
<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
style="vertical-align: middle"
src="../../static/tabs/chartcolumn@2x.png"
v-if="!changeBool && imgList.img24h"
:src="imgList.img24h.url"
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 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>
<div class="imgs" style="height: 100%; text-align: center">
<!-- 24h天气预报图像-->
<image
v-if="!changeBool"
src="../../static/tabs/bigImg.png"
mode="aspectFit"
></image>
<!-- 表格-->
<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 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>
</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>
<th style="width: 50%; color: #59a7ff">降雨量(mm)</th>
</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: 70%">水库水库</td>
<td style="width: 50%">11</td>
</tr> -->
</table>
</table>
</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 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 class="heart">
<p class="title">
<span class="line"></span><span class="h4">短时天气预报</span>
</p>
<div class="time">{{ imgHourstm[0] }} {{ imgHourstm[1] }}</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 class="info_icon" v-if="current == 0">
<div
v-for="(item,i) in hdList" :key="i"
@click="jumpHdDetail(item)"
style="display:flex;justify-content:space-between;align-items: center; margin-bottom:10px"
<div
v-for="(item, i) in hdList"
:key="i"
@click="jumpHdDetail(item)"
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: 32rpx">{{ item.stnm }}</div>
<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"
@click="jumpSkDetail(item)"
<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>
<div style="color:#91939B">
监测时间{{item.tm}}
<div>
<div style="font-size: 32rpx">{{ item.stnm }}</div>
<div style="font-size: 24rpx">
实时水位{{ item.normWatLev }}m
</div>
</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 {
@ -303,37 +340,40 @@ export default {
tableData: {},
tm: '',
level: '',
limit:disType(uni.getStorageSync('value').adcd),
timeList:[
{text:'昨天08:00~当前时间',value:1},
{text:'今天08:00~当前时间',value:2},
{text:'昨天08:00~今天08:00',value:3},
{text:'最近1小时',value:4},
{text:'最近3小时',value:5},
{text:'最近6小时',value:6},
{text:'最近12小时',value:7},
{text:'最近24小时',value:8},
limit: disType(uni.getStorageSync('value').adcd),
timeList: [
{ text: '昨天08:00~当前时间', value: 1 },
{ text: '今天08:00~当前时间', value: 2 },
{ text: '昨天08:00~今天08:00', value: 3 },
{ text: '最近1小时', value: 4 },
{ text: '最近3小时', value: 5 },
{ text: '最近6小时', value: 6 },
{ text: '最近12小时', value: 7 },
{ text: '最近24小时', value: 8 }
],
value1:3,
rainChartData:[],
formData:{
stm:moment()
.subtract(1, 'days')
.startOf('day')
.set({ hour: 8, minute: 0 }),
etm: moment()
.startOf('day')
.set({ hour: 8, minute: 0 })
value1: 3,
rainChartData: [],
formData: {
stm: moment()
.subtract(1, 'days')
.startOf('day')
.set({ hour: 8, minute: 0 }),
etm: moment().startOf('day').set({ hour: 8, minute: 0 })
},
rainChartData:[],
chartData:{},
subList:["河道水情","水库水情"],
current:0,
hdList:[],
skList:[],
readStatus:false,
readYjStatus:false,
default_src: uni.getStorageSync('avatar'),
rainChartData: [],
chartData: {},
subList: ['河道水情', '水库水情'],
current: 0,
hdList: [],
skList: [],
readStatus: false,
readYjStatus: false,
default_src: uni.getStorageSync('avatar'),
imgList: {},
imgtm: moment().format('YYYYMMDD'),
imgData: [],
imgHours: '',
imgHourstm: []
}
},
computed: {
@ -409,25 +449,25 @@ export default {
}
]
}
},
}
},
watch:{
rainChartData(newValue){
this.chartData = {...drpOption(newValue)}
watch: {
rainChartData (newValue) {
this.chartData = { ...drpOption(newValue) }
},
limit:{
handler(newValue){
if(!newValue){
this.getRainList();
limit: {
handler (newValue) {
if (!newValue) {
this.getRainList()
}
},
immediate: true
},
current:{
handler(newValue){
if(newValue == 0){
current: {
handler (newValue) {
if (newValue == 0) {
this.getHdList()
}else{
} else {
this.getSkList()
}
},
@ -435,129 +475,150 @@ export default {
}
},
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 {
const {data} = await uni.$http.get("/gunshiApp/xfflood/current/situation/flag")
if(data.code == 200){
const { data } = await uni.$http.get(
'/gunshiApp/xfflood/current/situation/flag'
)
if (data.code == 200) {
this.readYjStatus = data.data
}
} catch (error) {
uni.$showMsg()
uni.$showMsg()
}
},
async getReadStatus(){
async getReadStatus () {
try {
const {data} = await uni.$http.get("/gunshiApp/xfflood/xfProjectRun/has/read")
if(data.code == 200){
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)
}
} catch (error) {
uni.$showMsg()
uni.$showMsg()
}
},
jumpHdDetail(params){
uni.navigateTo({
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
jumpHdDetail (params) {
uni.navigateTo({
url: `/pages/hdDetail/hdDetail?stcd=${params.stcd}&stnm=${params.stnm}&source=${params.source}&wrz=${params.wrz}&grz=${params.grz}`
})
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
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}`
})
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
},
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")
})
if(data.code == 200){
this.rainChartData = data.data;
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')
}
)
if (data.code == 200) {
this.rainChartData = data.data
}
} catch (error) {
uni.$showMsg()
}
} catch (error) {
uni.$showMsg()
}
},
changeTime(params){
let tmValue=[];
if(params === 1){
tmValue=[moment()
changeTime (params) {
let tmValue = []
if (params === 1) {
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 }),
moment()
moment()
]
}else if(params ===3){
tmValue=[moment()
.subtract(1, 'days')
.startOf('day')
.set({ hour: 8, minute: 0 }),
moment()
.startOf('day')
.set({ hour: 8, minute: 0 })
} else if (params === 2) {
tmValue = [
moment().startOf('day').set({ hour: 8, minute: 0 }),
moment()
]
}else if(params ===4){
tmValue=[moment().subtract(1, 'hours'),
moment()
} else if (params === 3) {
tmValue = [
moment()
.subtract(1, 'days')
.startOf('day')
.set({ hour: 8, minute: 0 }),
moment().startOf('day').set({ hour: 8, minute: 0 })
]
}else if(params ===5){
tmValue=[moment().subtract(3, 'hours'),
moment()
]
}else if(params ===6){
tmValue=[moment().subtract(6, 'hours'),
moment()
]
}else if(params ===7){
tmValue=[moment().subtract(12, 'hours'),
moment()
]
}else if(params ===8){
tmValue=[moment().subtract(24, 'hours'),
moment()
]
}
this.formData.stm=tmValue[0];
this.formData.etm=tmValue[1];
this.getRainList()
} else if (params === 4) {
tmValue = [moment().subtract(1, 'hours'), moment()]
} else if (params === 5) {
tmValue = [moment().subtract(3, 'hours'), moment()]
} else if (params === 6) {
tmValue = [moment().subtract(6, 'hours'), moment()]
} else if (params === 7) {
tmValue = [moment().subtract(12, 'hours'), moment()]
} else if (params === 8) {
tmValue = [moment().subtract(24, 'hours'), moment()]
}
this.formData.stm = tmValue[0]
this.formData.etm = tmValue[1]
this.getRainList()
},
todetail (val) {
console.log('val', val)
@ -651,19 +712,22 @@ export default {
this.tm = d1 + h1
},
async getResponseLevel () {
async getResponseLevel () {
try {
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)
}else{
this.level = '无'
}
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)
} else {
this.level = '无'
}
}
} catch (e) {
uni.$showMsg()
}
@ -672,20 +736,19 @@ export default {
uni.navigateTo({
url: url //
})
},
}
//
},
onLoad () {
this.getSwiperList()
this.getOverview()
this.getDataTime()
this.getResponseLevel()
this.getImgs()
},
onShow(){
onShow () {
this.getReadStatus()
if(this.limit == 1){
if (this.limit == 1) {
this.getYjRead()
}
}
@ -753,7 +816,7 @@ export default {
justify-content: center;
align-items: center;
}
.readStatus{
.readStatus {
position: absolute;
top: 0;
right: 0;
@ -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;

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
}