feat(): 短临预报模块开发

master
李神峰 2024-11-15 16:40:47 +08:00
parent 9f310280c2
commit 55746996e1
25 changed files with 510 additions and 206 deletions

File diff suppressed because one or more lines are too long

View File

@ -16,11 +16,11 @@
<view class="time-ranger">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>

View File

@ -1,4 +1,4 @@
<template>
<template>
<div class="table_div">
<div class="table_cur">
<table style="display:block;width:700px;overflow-x:auto">
@ -11,8 +11,8 @@
<div class="scroll-table">
<tr v-for="(item, index) in data" :key="index">
<td style="width:100px;text-align:center">{{ index + 1 }}</td>
<td style="width:200px;white-space:pre-wrap;text-align:center">{{ item.tm }}</td>
<td style="width:100px;white-space:pre-wrap;text-align:center">{{ item.rz }}</td>
<td style="width:200px;text-align:center">{{ item.tm }}</td>
<td style="width:100px;text-align:center">{{ item.rz }}</td>
<td v-for="(col,i) in newCol" :key="i" style="width:100px;text-align:center;">
{{item[col.key] }}
</td>

View File

@ -2,8 +2,8 @@
import { imageUrl060,imageUrl090,rule } from './dataUrl'
export default function jrxOptions(data = {}, type = "1") {
const yMin = type == "1" ? 147 : type == "2" ? 146 : 146;
const yMax = type == "1" ? 209 : type == "2" ? 210 : 210;
const yMin = type == "1" ? 70 : type == "2" ? 70 : 70;
const yMax = type == "1" ? 154 : type == "2" ? 150 : 150;
const type1 = ["SY05", "SY06", "SY07", "SY08"]
const type2 = ["SY09","SY10","SY11","SY12"]
const alltype = type == "1" ? type1 : type == "2" ? type2 : type2;
@ -11,61 +11,65 @@ export default function jrxOptions(data = {}, type = "1") {
const textColor = '#666'
const imageUrl = type == "1" ? imageUrl060:
type == "2" ? imageUrl090 : imageUrl090;
const xValue = type == "1" ? (((data?.rz - 169) + 0.65 * 14) / 0.65):
type == "2" ?(((data?.rz - 169) + 0.85 * 14) / 0.84) :(((data?.rz - 169) + 0.84 * 14) / 0.84)
const xValue = type == "1" ? (((data?.rz - 99) + 1.1 * 13) / 1.1):
type == "2" ? (((data?.rz - 99) + 1 * 14) / 1) : (((data?.rz - 99) + 1 * 14) / 1)
const rz = data?.rz ?
[[xValue, data?.rz], [0, data?.rz], ] :
[]
const rz1 = data?.rz ?
[[0,169],[14, 169], [xValue, data?.rz]] :
const rz1 = data?.rz ?
type == "1" ?
[[0, 99], [13, 99], [xValue, data?.rz]]:
type == "2" ?
[[0, 99], [14, 99], [xValue, data?.rz]]
: [[0, 99], [14, 99], [xValue, data?.rz]]
:
[]
const gz1 = data[alltype[0]] ?
type == "1" ? [[57.6, 158], [57.6, data[alltype[0]]]] :
type == "2" ? [[52.6, 158], [52.6, data[alltype[0]]]] :
[[52.6, 158], [52.6, data[alltype[0]]]]
const gz1 = data[alltype[0]] ?
type == "1" ? [[51.6, 85], [51.6, data[alltype[0]]]] :
type == "2" ? [[47.5, 85], [47.5, data[alltype[0]]]] :
[[47.5, 158], [85, data[alltype[0]]]]
: [];
const gz2 = data[alltype[1]] ?
type == "1" ? [[60.6, 158], [60.6, data[alltype[1]]]] :
type == "2" ? [[55.6, 158], [55.6, data[alltype[1]]]] :
type == "1" ? [[53.6, 85], [53.6, data[alltype[1]]]] :
type == "2" ? [[49.5, 85], [49.5, data[alltype[1]]]] :
[[53.6, 158], [53.6, data[alltype[1]]]] :
[];
const gz3 = data[alltype[2]] ?
type == "1" ? [[82, 161], [82, data[alltype[2]]]] :
type == "2" ? [[66.5, 162], [66.5, data[alltype[2]]]] :
type == "1" ? [[72.5, 90], [72.5, data[alltype[2]]]] :
type == "2" ? [[66.5, 90], [66.5, data[alltype[2]]]] :
[[73, 161], [73, data[alltype[2]]]] : [];
const gz4 = data[alltype[3]] ?
type == "1" ? [[96.6, 166], [96.6, data[alltype[3]]]] :
type == "2" ? [[77, 161], [77, data[alltype[3]]]] :
type == "1" ? [[84.5, 96], [84.5, data[alltype[3]]]] :
type == "2" ? [[77, 96], [77, data[alltype[3]]]] :
[[85, 166], [85, data[alltype[3]]]] : [];
const line = data?.rz ?
type == "1" ?
[
[xValue, data?.rz],
[57.6, data[alltype[0]]],
[60.6, data[alltype[1]]],
[82, data[alltype[2]]],
[96.6, data[alltype[3]]]
[51.6, data[alltype[0]]],
[53.6, data[alltype[1]]],
[72.5, data[alltype[2]]],
[84.5, data[alltype[3]]]
] :
type == "2" ?
[
[xValue, data?.rz],
[52.6, data[alltype[0]]],
[55.6, data[alltype[1]]],
[47.5, data[alltype[0]]],
[49.5, data[alltype[1]]],
[66.5, data[alltype[2]]],
[77, data[alltype[3]]]
] :
[
[xValue, data?.rz],
[52.6, data[alltype[0]]],
[55.6, data[alltype[1]]],
[51.6, data[alltype[0]]],
[53.6, data[alltype[1]]],
[73, data[alltype[2]]],
[85, data[alltype[3]]]
]
: []
let eopts = {
toolbox: {
show: true,

View File

@ -3,11 +3,11 @@
<view class="time-ranger">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>

View File

@ -12,11 +12,11 @@
<view class="time-ranger" style="padding:10px;background-color: #fff;">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{startTime}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{startTime}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{endTime}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{endTime}}</text>
<view class="search-btn" @click="searchTm">
搜索
</view>

View File

@ -11,11 +11,11 @@
<view class="time-ranger">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{startTime}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{startTime}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{endTime}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{endTime}}</text>
<view class="search-btn" @click="searchTm">
搜索
</view>

View File

@ -9,11 +9,11 @@
<view class="time-ranger">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{startTime}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{startTime}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{endTime}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{endTime}}</text>
<view class="search-btn" @click="searchTm">
搜索
</view>

View File

@ -9,11 +9,11 @@
<view class="time-ranger" >
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>

View File

@ -3,11 +3,11 @@
<view class="time-ranger">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>

View File

@ -3,11 +3,11 @@
<view class="time-ranger">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>

View File

@ -1,37 +1,45 @@
<template>
<view class="scroll-table">
<view v-for="(item,index) in list" :key="index" style="margin:5px 20px 5px 10px">
<Card :info="item" />
<view>
<view class="scroll-table" v-if="list.length != 0">
<view v-for="(item,index) in list" :key="index" style="margin:5px 20px 5px 10px">
<Card :info="item" />
</view>
<view style="height:50px"></view>
</view>
<view
style="height:calc(100vh - 160px);display: flex;align-items: center;justify-content: center;background-color: #fff;margin-top:10px"
v-else>
<image src="../../../static/empty.png" mode=""></image>
</view>
<view style="height:50px"></view>
</view>
</template>
<script>
import Card from "./card.vue"
export default {
components:{
components: {
Card
},
data() {
return {
list:[]
list: []
}
},
methods: {
async getData(){
try{
const {data} = await uni.$http.post(
"/gunshiApp/tsg/resSafePersonB/list",
{
resCode:"42120250085"
})
if(data.code == 200){
async getData() {
try {
const {
data
} = await uni.$http.post(
"/gunshiApp/tsg/resSafePersonB/list", {
resCode: "42120250085"
})
if (data.code == 200) {
this.list = [...data.data];
}
}catch(e){
uni.$showMsg();
} catch (e) {
uni.$showMsg();
}
},
},
@ -42,10 +50,10 @@
</script>
<style lang="scss" scoped>
.scroll-table{
.scroll-table {
height: calc(100vh - 100px);
overflow-y: auto;
width:100%;
width: 100%;
padding: 10px 5px;
}
</style>
</style>

View File

@ -39,9 +39,7 @@
name: '监测信息',
}, {
name: '基础信息',
}, {
name: '特征参数'
}, {
}, {
name: '库容曲线'
}, {
name: '责任人'

View File

@ -54,11 +54,11 @@
<view class="time-ranger">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>

View File

@ -1,58 +1,68 @@
<template>
<view>
<view style="height: 250px; ">
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
<view>
<view v-if="tableData.length != 0">
<view style="height: 250px; ">
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
</view>
<view style="margin-top: 20px;">
<Table :tableData="tableData" />
</view>
</view>
<view
style="height:calc(100vh - 160px);display: flex;align-items: center;justify-content: center;background-color: #fff;margin-top:10px"
v-else>
<image src="../../../../static/empty.png" mode=""></image>
</view>
</view>
<view style="margin-top: 20px;">
<Table :tableData="tableData"/>
</view>
</view>
</template>
<script>
import drpOptions from "./chartOptions.js"
import Table from "./jcsjTable.vue"
export default {
components:{
Table
},
data() {
return {
show:false,
chartData:{},
tableData:[]
}
},
methods: {
async getKrData(){
try {
const {data} = await uni.$http.post(
"/gunshiApp/tsg/stZvarlB/list",{
stcd:"716164061"
})
if(data.code == 200){
this.tableData = [...data.data];
}
} catch (error) {
uni.$showMsg();
import drpOptions from "./chartOptions.js"
import Table from "./jcsjTable.vue"
export default {
components: {
Table
},
data() {
return {
show: false,
chartData: {},
tableData: []
}
}
},
watch:{
tableData(n,o){
if(n.length > 0){
this.chartData = {...drpOptions(n)}
this.show=true
},
methods: {
async getKrData() {
try {
const {
data
} = await uni.$http.post(
"/gunshiApp/tsg/stZvarlB/list", {
stcd: "716164061"
})
if (data.code == 200) {
this.tableData = [...data.data];
}
} catch (error) {
uni.$showMsg();
}
}
}
},
mounted() {
this.getKrData()
},
}
},
watch: {
tableData(n, o) {
if (n.length > 0) {
this.chartData = {
...drpOptions(n)
}
this.show = true
}
}
},
mounted() {
this.getKrData()
},
}
</script>
<style lang="scss">
</style>

View File

@ -1,11 +1,11 @@
<template>
<view class="basic-box">
<view class="basic-data-select">
<uni-data-select v-model="selectValue" :localdata="range" @change="selectChage" :clear="false"></uni-data-select>
<uni-data-select v-model="selectValue" :localdata="range" @change="selectChage" :clear="false">
</uni-data-select>
</view>
<view class="project-des">
<view v-for="(item,index) in tableData" :key="index"
:style="index % 2 == 0 ? 'width:50%;':'width:50%;'">
<view v-for="(item,index) in tableData" :key="index" :style="index % 2 == 0 ? 'width:50%;':'width:50%;'">
<view style="display:flex;align-items:center;margin:15px 0px;">
<view class="circle-dot"></view>
<view class="label-name">
@ -18,7 +18,23 @@
</view>
</template>
<script>
import selectData from "../../staticData"
import selectData from "../../staticData"
const gmObj = {
"1": "大 (1)型",
"2": "大 (2)型",
"3": "中型",
"4": "小 (1)型",
"5": "小 (2)型",
"9": "其他",
}
const qdObj = {
1: "",
2: "Ⅱ",
3: "Ⅲ",
4: "Ⅳ",
5: "VI ",
}
export default {
props: {
skInfo: {
@ -63,26 +79,107 @@
text: "防汛道路"
}
],
selectValue: 0
selectValue: 0,
keyObj: {}
}
},
methods: {
selectChage(e) {
this.selectChage = e
console.log("e",e);
this.selectValue = e
this.list = selectData[e]
if (e == 0) {
this.keyObj = this.skInfo;
} else if (e == 1 || e == 2 || e == 6) {
this.getDbData(e)
} else if (e == 3) {
this.getyhdData()
} else if (e == 4 || e == 5) {
this.getfdData(e)
} else {
this.getfxdData(e)
}
},
//
async getDbData(e) {
try {
const {
data
} = await uni.$http.post('/gunshiApp/tsg/attDamBase/list')
if (data.code == 200) {
if (e == 1) {
this.keyObj = data.data.find(item => item.isMain == 1)
} else if (e == 2) {
this.keyObj = data.data.find(item => item.isMain == 0)
} else {
this.keyObj = data.data.find(item => item.isMain == 2)
}
}
} catch (error) {
}
},
//
async getyhdData(e) {
try {
const {
data
} = await uni.$http.post('/gunshiApp/tsg/attSpillwayBase/list')
if (data.code == 200) {
this.keyObj = data.data[0]
}
} catch (error) {
}
},
//
async getfdData(e) {
try {
const params = e == 5 ? 1 : 2;
const {
data
} = await uni.$http.get('/gunshiApp/tsg/resTunnel/list',{type:params})
if (data.code == 200) {
this.keyObj = data.data[0]
}
} catch (error) {
}
},
//
async getfxdData(e) {
try {
const {
data
} = await uni.$http.post('/gunshiApp/tsg/resFloodRoad/list')
if (data.code == 200) {
this.keyObj = data.data[0]
}
} catch (error) {
}
}
},
computed: {
tableData() {
return this.list.map(item => {
if (item.key == "engScal") {
this.keyObj[item.key] = gmObj[this.skInfo[item.key]]
}
if (item.key == "seismicIntensity") {
this.keyObj[item.key] = qdObj[this.skInfo[item.key]]
}
return {
name: item.name,
value: this.skInfo[item.key]
value: this.keyObj[item.key]
}
})
}
},
mounted() {
this.keyObj = this.skInfo
},
}
</script>
<style lang="scss">

View File

@ -3,7 +3,6 @@
<view class="title">
<view class="left">
<u-icon name="file-text" color="#f59d29" size="20"></u-icon>
<text style="margin-left:5px">{{dataform.resName}}</text>
</view>
<view class="right">

View File

@ -8,11 +8,11 @@
<view class="time-ranger" style="margin-top:70px">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>

View File

@ -7,7 +7,7 @@ export default {
},
{
name: "倒水全流域面积(km²)",
key: "rvName"
key: "basArea"
},
{
@ -16,25 +16,24 @@ export default {
},
{
name: "坝址以上主河床长度(km)",
key: "watShedArea"
key: "watRiverLen"
},
{
name: "坝址以上主河床长度(‰)",
key: "watShedArea"
name: "坝址以上主河床平均坡降(‰)",
key: "watRiverSlope"
},
{
name: "多处平均降雨量(mm)",
key: "watShedArea"
key: "annualAvgDrp"
},
{
name: "设计洪水标准及洪峰流量(m³/s)",
key: "watShedArea"
key: "desFloodPeakFlow"
},
{
name: "校核洪水标准及洪峰流量(m³/s)",
key: "watShedArea"
key: "calFloodPeakFlow"
},
{
name: "校核洪水位(m)",
key: "calFloodLev"
@ -69,14 +68,6 @@ export default {
name: "兴利库容(万m³)",
key: "benResCap"
},
// {
// name: "防洪高水位(m)",
// key: "uppLevFlco"
// },
// {
// name: "防洪库容(万m³)",
// key: "flcoCap"
// },
{
name: "死库容(万m³)",
key: "deadCap"
@ -87,29 +78,193 @@ export default {
key: "engScal"
},
{
name: "设计灌溉面积(亩)",
name: "设计灌溉面积(亩)",
key: 'designIrrArea'
},
{
name: "保护人口()",
key: 'designIrrArea'
name: "保护人口()",
key: 'protectPopulation'
},
{
name: "保护农田(亩)",
key: 'designIrrArea'
name: "保护农田(亩)",
key: 'protectFarmland'
},
{
name: "地震基本烈度",
key: 'designIrrArea'
key: 'seismicIntensity'
},
{
name: "地震动参数设计值",
key: 'designIrrArea'
key: 'seismicParm'
},
// {
// name: "堰顶高程(m)",
// key: "wcrstel"
// },
]
],
1: [
{
name: "坝顶高程(m)",
key:"damTopElev"
},
{
name: "坝顶长度(m)",
key:"damTopLen"
},
{
name: "坝顶宽度(m)",
key:"damTopWid"
},
{
name: "最大坝高(m)",
key:"damMaxHeig"
}
],
2: [
{
name: "坝顶高程(m)",
key:"damTopElev"
},
{
name: "坝顶长度(m)",
key:"damTopLen"
},
{
name: "坝顶宽度(m)",
key:"damTopWid"
},
{
name: "最大坝高(m)",
key:"damMaxHeig"
}
],
3: [
{
name: "堰鼎样式",
key:"crestType"
},
{
name: "地基特性",
key:"foundCharacter"
},
{
name: "溢流堰顶高程(m)",
key:"crestEle"
},
{
name: "溢流堰净宽(m)",
key:"netWidth"
},
{
name: "消能形式",
key:"elimMethod"
},
{
name: "校验洪水下泄流量(m³/s)",
key:"caliQ"
},
{
name: "设计洪水下泄流量(m³/s)",
key:"desQ"
},
{
name: "消能防冲下泄流量(m³/s)",
key:"elimQ"
}
],
4: [
{
name: "型式",
key:"buildType"
},
{
name: "地基特性",
key:"foundCharacter"
},
{
name: "进口地板高程(m)",
key:"inletEle"
},
{
name: "断面尺寸(m)",
key:"sectionSize"
},
{
name: "洞长(m)",
key:"tunnelLen"
},
{
name: "设计流量(m³/s)",
key:"desQ"
},
{
name: "进口闸门型式",
key:"valveType"
},
{
name: "进口启闭机型式",
key:"ocType"
}
],
5: [
{
name: "型式",
key:"buildType"
},
{
name: "衬砌型式",
key:"liningType"
},
{
name: "地基特性",
key:"foundCharacter"
},
{
name: "进口地板高程(m)",
key:"inletEle"
},
{
name: "断面尺寸(m)",
key:"sectionSize"
},
{
name: "洞长(m)",
key:"tunnelLen"
},
{
name: "设计流量(m³/s)",
key:"desQ"
},
{
name: "进口闸门型式",
key:"valveType"
},
{
name: "进口启闭机型式",
key:"ocType"
}
],
6: [
{
name: "坝顶高程(m)",
key:"damTopElev"
},
{
name: "坝顶长度(m)",
key:"damTopLen"
},
{
name: "坝顶宽度(m)",
key:"damTopWid"
},
{
name: "最大坝高(m)",
key:"damMaxHeig"
}
],7: [
{
name: "防汛路长度(m)",
key:"floodRoadLen"
},
{
name: "路面宽度(m)",
key:"roadWidth"
},
],
}

View File

@ -18,11 +18,11 @@
<view class="time-ranger" >
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>

View File

@ -8,11 +8,11 @@
<view class="time-ranger" style="margin-top:70px">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>

View File

@ -10,11 +10,11 @@
<view class="time-ranger">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{startTime}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{startTime}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{endTime}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{endTime}}</text>
<view class="search-btn" @click="searchTm">
搜索
</view>

View File

@ -9,11 +9,11 @@
<view class="time-ranger">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>

View File

@ -16,11 +16,11 @@
<view class="time-ranger">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>
@ -39,21 +39,26 @@
<text>短临预报</text>
</view>
<view style="margin-top:5px;margin-left:10px">预报时间{{projectTime}}</view>
<view class="ylzpro-chart-area" v-if="projectData.length != 0">
<qiun-data-charts :chartData="projectBarData.chartData" :echartsApp="true" :eopts="projectBarData.eopts" />
<view class="ylzpro-chart-area" v-if="projectData">
<view class="real-sw">
<text class="sw-name">1h</text>
<text style="font-size:22px;margin-right:5px;">{{projectData}}</text>
<text>mm</text>
</view>
<!-- <qiun-data-charts :chartData="projectBarData.chartData" :echartsApp="true" :eopts="projectBarData.eopts" /> -->
</view>
<view
style="height:250px;display: flex;align-items: center;justify-content: center;background-color: #fff;margin-top:10px"
v-else>
<image src="../../../static/empty.png" mode=""></image>
</view>
</view>
<view
style="height:250px;display: flex;align-items: center;justify-content: center;background-color: #fff;margin-top:10px"
v-else>
<image src="../../../static/empty.png" mode=""></image>
</view>
</view>
</view>
<view v-if="activeOne == 1" style="padding:10px">
<Table></Table>
</view>
<u-datetime-picker :show="showTime" v-model="startTime" mode="datetime" @confirm="handleStartTime"
@cancel="showTime=false"></u-datetime-picker>
<u-datetime-picker :show="showTime1" v-model="endTime" mode="datetime" @confirm="handleEndTime"
@ -95,10 +100,11 @@
ylzData: [],
chartData1: {},
chartData: {},
stnm:'',
stnm: '',
stcd:'',
projectTime,
projectData:[],
projectBarData:{}
projectData: '',
projectBarData: {}
}
},
methods: {
@ -110,7 +116,7 @@
data
} = await uni.$http.post(
"/gunshiApp/tsg/attResBase/rainBasinDivision/queryStStbprpPerHour/StcdAndStartTimeAndEndTime", {
stcd: "61610700",
stcd: this.stcd,
startTime: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
endTime: moment(this.etm).format("YYYY-MM-DD HH:mm:ss")
})
@ -165,17 +171,15 @@
data
} = await uni.$http.post(
"/gunshiApp/tsg/weather/short/fore", {
tm:moment(this.projectTime).format('YYYYMMDDHHmm')
tm: moment(this.projectTime).format('YYYYMMDDHHmm')
})
this.projectBarData = {
...projectOptions(data.data)
}
if (data.code == 200) {
// this.projectBarData = {
// ...projectOptions(data.data)
// }
// this.projectBarData = {
// ...projectOptions(data.data)
// }
this.projectData = data.data.find(item => item.stcd == this.stcd).h2;
}
} catch (error) {
uni.$showMsg();
}
@ -188,20 +192,20 @@
}
},
},
onLoad(options){
onLoad(options) {
this.stnm = options.stnm
this.stcd = options.stcd
},
mounted() {
this.getrainInfo();
this.getrainChartInfo();
this.getPreReportData();
}
}
</script>
<style lang="scss" scoped>
.tab-bar {
display: flex;
justify-content: space-around;
@ -219,23 +223,52 @@
height: 230px;
background-color: #fff;
}
.ylz-table-area{
background-color: #fff;
.ylz-table-area {
background-color: #fff;
}
.yl-dl-yb{
.yl-dl-yb {
display: flex;
align-items: center;
margin-top: 20px;
}
.yl-bluetiao{
.yl-bluetiao {
width: 5px;
height: 15px;
background-color: #02a7f0;
margin-right: 10px;
}
.ylzpro-chart-area{
width: 100%;
height: 250px;
.ylzpro-chart-area {
width: 100%;
display: flex;
justify-content: center;
margin-top: 10px;
background-color: #fff;
}
.real-sw {
width: 50%;
position: relative;
border: 1px solid #efefef;
height: 60px;
text-align: center;
line-height: 75px;
margin-right: 10px;
.sw-name {
position: absolute;
top: 0;
left: 0;
// padding: 0 5px;
color: #49a7f0;
background-color: #cbecfd;
font-size: 12px;
line-height: 20px;
padding: 0 5px;
}
}
</style>

View File

@ -62,7 +62,7 @@
toDetail(){
uni.navigateTo({
url:`/pages/ylzList/detail/index?stnm=${this.item.stnm}`
url:`/pages/ylzList/detail/index?stnm=${this.item.stnm}&stcd=${this.item.stcd}`
})
},
},