feat(): 模块开发

master
李神峰 2024-06-11 15:35:46 +08:00
parent 6bc49a7d68
commit f2a1300a78
10 changed files with 64 additions and 47 deletions

View File

@ -14,7 +14,6 @@
src="../../../static/images/filter.png" src="../../../static/images/filter.png"
style="width: 20px; height: 20px; margin-right: 10px; margin-left: 10px;" style="width: 20px; height: 20px; margin-right: 10px; margin-left: 10px;"
@click="popupOpen = true" @click="popupOpen = true"
v-show="!popupOpen"
> >
</image> </image>
</view> </view>
@ -42,14 +41,17 @@
</u-checkbox-group> </u-checkbox-group>
</view> </view>
<text style="font-weight: bold; margin-bottom: 5px;">按距离</text> <text style="font-weight: bold; margin-bottom: 5px;">按距离</text>
<view style="display: flex; align-items: center;">
<u--input <u--input
placeholder="请输入" placeholder="请输入"
border="surround" border="surround"
type="number" type="number"
v-model="formData.distance" v-model="formData.distance"
style="width: 50%; margin-top: 5px;" style="width: 50%; margin-top: 5px; margin-right: 10px;"
></u--input> ></u--input>
<view style="display: flex; margin-top: 170%;"> <text>(km)</text>
</view>
<view style="display: flex; margin-top: 211%;">
<u-button text="重置" class="bottom-btn1" <u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources,distance:1}"></u-button> @click="formData = {...formData,sources,distance:1}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button> <u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -152,7 +154,7 @@
.bottom-btn1{ .bottom-btn1{
width: 100px; width: 100px;
margin-left: 130px; margin-left: 70px;
} }
.bottom-btn2{ .bottom-btn2{
width: 100px; width: 100px;

View File

@ -63,10 +63,10 @@
uni.setStorageSync('loginName',postForm.loginName) uni.setStorageSync('loginName',postForm.loginName)
uni.setStorageSync('secretKey',postForm.secretKey) uni.setStorageSync('secretKey',postForm.secretKey)
} else { } else {
uni.removeStorageSync('loginName') // uni.removeStorageSync('loginName')
uni.removeStorageSync('secretKey') // uni.removeStorageSync('secretKey')
this.formData.username = '' // this.formData.username = ''
this.formData.password = '' // this.formData.password = ''
} }
// //

View File

@ -21,11 +21,12 @@
</tr> </tr>
<div style="max-height: 460px; overflow-y: auto"> <div style="max-height: 460px; overflow-y: auto">
<tr v-for="(item, index) in list" :key="index"> <tr v-for="(item, index) in list" :key="index">
<td style="width: 50px">{{ index + 1 }}</td> <td style="width: 50px;">{{ index + 1 }}</td>
<td style="width: 100px;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td> <td style="width: 100px;color: #3399ef; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="jumpDetail(item)">
<td style="width: 70px">{{ item.drp }}</td> {{ item.stnm }}</td>
<td style="width: 70px">{{ item.drp || 0 }}</td>
<td style="width: 70px">{{ item.yesDrp || 0 }}</td> <td style="width: 70px">{{ item.yesDrp || 0 }}</td>
<td style="width: 100px">{{ item.adnm }}</td> <td style="width: 100px;">{{ item.adnm }}</td>
</tr> </tr>
</div> </div>
</table> </table>
@ -46,7 +47,7 @@
jumpDetail(params){ jumpDetail(params){
console.log(123) console.log(123)
uni.navigateTo({ uni.navigateTo({
url:`/pages/rainDetail/rainDetail?stcd=${params.stcd}` url:`/pages/rainDetail/rainDetail?stcd=${params.stcd}&stnm=${params.stnm}`
}) })
} }
} }

View File

@ -2,17 +2,19 @@
<view class="rain-box"> <view class="rain-box">
<view class="nav-bar"> <view class="nav-bar">
<u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon> <u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon>
<view class=""> <view>
雨情 雨情
</view> </view>
<!-- <u-icon name="arrow-right" color="#000" size="28"></u-icon> --> <!-- <u-icon name="arrow-right" color="#000" size="28"></u-icon> -->
<cover-image <view @click="popupOpen = true" style="margin-right:10px">
<image
src="../../static/images/filter.png" src="../../static/images/filter.png"
style="width: 20px; height: 20px; margin-right: 10px;" style="width: 20px; height: 20px; "
@click="popupOpen = true"
v-show="!popupOpen"
> >
</cover-image> </image>
</view>
</view> </view>
<!-- 搜索以及多级下拉 --> <!-- 搜索以及多级下拉 -->
<view class="search-box"> <view class="search-box">
@ -70,23 +72,23 @@
<u-icon name="arrow-down-fill" color="#000" size="20" v-show="!rainTime"></u-icon> <u-icon name="arrow-down-fill" color="#000" size="20" v-show="!rainTime"></u-icon>
<u-icon name="arrow-up-fill" color="#000" size="20" v-show="rainTime"></u-icon> <u-icon name="arrow-up-fill" color="#000" size="20" v-show="rainTime"></u-icon>
<view class="rain-time-dropdown" v-show="rainTime"> <view class="rain-time-dropdown" v-show="rainTime">
<view class="" :class="{'active': formData.timeType == 1}" @click="timesort(1)" style="border-bottom: 1px solid #dfdfdf; border-top: 1px solid #dfdfdf; padding: 10px 0; display: flex; align-items: center;"> <view :class="{'active': formData.timeType == 1}" @click="timesort(1)" style="border-bottom: 1px solid #dfdfdf; border-top: 1px solid #dfdfdf; padding: 10px 0; display: flex; align-items: center;">
<text style="margin-right: 300px;">1h</text> <text style="margin-right: 300px;">1h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 1"></u-icon> <u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 1"></u-icon>
</view> </view>
<view class="" :class="{'active': formData.timeType == 3}" @click="timesort(3)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;"> <view :class="{'active': formData.timeType == 3}" @click="timesort(3)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 300px;">3h</text> <text style="margin-right: 300px;">3h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 3"></u-icon> <u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 3"></u-icon>
</view> </view>
<view class="" :class="{'active': formData.timeType == 6}" @click="timesort(6)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;"> <view :class="{'active': formData.timeType == 6}" @click="timesort(6)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 300px;">6h</text> <text style="margin-right: 300px;">6h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 6"></u-icon> <u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 6"></u-icon>
</view> </view>
<view class="" :class="{'active': formData.timeType == 12}" @click="timesort(12)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;"> <view :class="{'active': formData.timeType == 12}" @click="timesort(12)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 300px;">12h</text> <text style="margin-right: 300px;">12h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 12"></u-icon> <u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 12"></u-icon>
</view> </view>
<view class="" :class="{'active': formData.timeType == 24}" @click="timesort(24)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;"> <view :class="{'active': formData.timeType == 24}" @click="timesort(24)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 300px;">24h</text> <text style="margin-right: 300px;">24h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 24"></u-icon> <u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 24"></u-icon>
</view> </view>
@ -223,8 +225,10 @@
source:["SH","SW","QX","SK"], source:["SH","SW","QX","SK"],
stArg:'', stArg:'',
adcd:type == 1 ? undefined :adcd, adcd:type == 1 ? undefined :adcd,
etm:moment().set({ hour: 8, minute: 0, second: 0, millisecond: 0 }).format("YYYY-MM-DD HH:mm"), etm:moment().format("YYYY-MM-DD HH:mm"),
stm:moment().subtract(1, 'day').set({ hour: 8, minute: 0, second: 0, millisecond: 0 }).format("YYYY-MM-DD HH:mm") stm:moment().subtract(1, 'day').format("YYYY-MM-DD HH:mm")
// etm:moment().set({ hour: 8, minute: 0, second: 0, millisecond: 0 }).format("YYYY-MM-DD HH:mm"),
// stm:moment().subtract(1, 'day').set({ hour: 8, minute: 0, second: 0, millisecond: 0 }).format("YYYY-MM-DD HH:mm")
} }
} }
}, },
@ -391,9 +395,13 @@
}, },
// //
async getRainList(){ async getRainList(){
let obj = {
...this.formData,
timeType:undefined
}
try{ try{
const {data} = await uni.$http.post( const {data} = await uni.$http.post(
"/gunshiApp/xfflood/real/rain/list",{...this.formData,timeType:undefined} "/gunshiApp/xfflood/real/rain/app/list",obj
) )
if(data.code == 200){ if(data.code == 200){
this.rainList = [...data.data]; this.rainList = [...data.data];
@ -499,12 +507,14 @@
background-color: #f2f2f2; background-color: #f2f2f2;
} }
.bottom-btn1,.bottom-btn2{ .bottom-btn1,.bottom-btn2{
width: 30%; width: 100px;
} }
.bottom-btn1{ .bottom-btn1{
margin-left: 130px; margin-left: 70px;
} }
.bottom-btn2{ .bottom-btn2{
margin-right: -12px; margin-right: -12px;
margin-left: 10px;
} }
</style> </style>

View File

@ -3,7 +3,7 @@
<view class="nav-bar"> <view class="nav-bar">
<u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon> <u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon>
<view class="title"> <view class="title">
雨情 {{stnm}}
</view> </view>
</view> </view>
<view class="tab-bar" > <view class="tab-bar" >
@ -33,7 +33,8 @@
data(){ data(){
return { return {
activeOne:0, activeOne:0,
stcd:'' stcd:'',
stnm:''
} }
}, },
components:{ components:{
@ -47,7 +48,8 @@
} }
}, },
onLoad(option) { onLoad(option) {
this.stcd = option.stcd this.stcd = option.stcd;
this.stnm = option.stnm;
} }
} }
</script> </script>

View File

@ -14,7 +14,6 @@
src="../../../static/images/filter.png" src="../../../static/images/filter.png"
style="width: 20px; height: 20px; margin-right: 10px; margin-left: 10px;" style="width: 20px; height: 20px; margin-right: 10px; margin-left: 10px;"
@click="popupOpen = true" @click="popupOpen = true"
v-show="!popupOpen"
> >
</image> </image>
</view> </view>
@ -42,14 +41,17 @@
</u-checkbox-group> </u-checkbox-group>
</view> </view>
<text style="font-weight: bold; margin-bottom: 5px;">按距离</text> <text style="font-weight: bold; margin-bottom: 5px;">按距离</text>
<view style="display: flex; align-items: center;">
<u--input <u--input
placeholder="请输入" placeholder="请输入"
border="surround" border="surround"
type="number" type="number"
v-model="formData.distance" v-model="formData.distance"
style="width: 50%; margin-top: 5px;" style="width: 50%; margin-top: 5px; margin-right: 10px;"
></u--input> ></u--input>
<view style="display: flex; margin-top: 170%;"> <text>(km)</text>
</view>
<view style="display: flex; margin-top: 211%;">
<u-button text="重置" class="bottom-btn1" <u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources,distance:1}"></u-button> @click="formData = {...formData,sources,distance:1}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button> <u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -152,7 +154,7 @@
.bottom-btn1{ .bottom-btn1{
width: 100px; width: 100px;
margin-left: 130px; margin-left: 70px;
} }
.bottom-btn2{ .bottom-btn2{
width: 100px; width: 100px;

View File

@ -13,7 +13,7 @@
<th style="width: 90px;"> <th style="width: 90px;">
水位(m) 水位(m)
</th> </th>
<th style="width: 80px; position: relative;"> <th style="width: 90px; position: relative;">
<view> <view>
库容(万m³) 库容(万m³)
<!-- <text style="position: absolute; bottom:-10px; left: 20px;">(/s)</text> --> <!-- <text style="position: absolute; bottom:-10px; left: 20px;">(/s)</text> -->

View File

@ -14,7 +14,6 @@
src="../../../static/images/filter.png" src="../../../static/images/filter.png"
style="width: 20px; height: 20px; margin-right: 10px; margin-left: 10px;" style="width: 20px; height: 20px; margin-right: 10px; margin-left: 10px;"
@click="popupOpen = true" @click="popupOpen = true"
v-show="!popupOpen"
> >
</image> </image>
</view> </view>
@ -42,14 +41,17 @@
</u-checkbox-group> </u-checkbox-group>
</view> </view>
<text style="font-weight: bold; margin-bottom: 5px;">按距离</text> <text style="font-weight: bold; margin-bottom: 5px;">按距离</text>
<view style="display: flex; align-items: center;">
<u--input <u--input
placeholder="请输入" placeholder="请输入"
border="surround" border="surround"
type="number" type="number"
v-model="formData.distance" v-model="formData.distance"
style="width: 50%; margin-top: 5px;" style="width: 50%; margin-top: 5px; margin-right: 10px;"
></u--input> ></u--input>
<view style="display: flex; margin-top: 170%;"> <text>(km)</text>
</view>
<view style="display: flex; margin-top: 211%;">
<u-button text="重置" class="bottom-btn1" <u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources,distance:1}"></u-button> @click="formData = {...formData,sources,distance:1}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button> <u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -152,7 +154,7 @@
.bottom-btn1{ .bottom-btn1{
width: 100px; width: 100px;
margin-left: 130px; margin-left: 70px;
} }
.bottom-btn2{ .bottom-btn2{
width: 100px; width: 100px;

View File

@ -14,7 +14,6 @@
src="../../../static/images/filter.png" src="../../../static/images/filter.png"
style="width: 20px; height: 20px; margin-left: 20px;" style="width: 20px; height: 20px; margin-left: 20px;"
@click="popupOpen = true" @click="popupOpen = true"
v-show="!popupOpen"
> >
</image> </image>
</view> </view>
@ -39,7 +38,7 @@
</u-checkbox> </u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</view> </view>
<view style="display: flex; margin-top: 195%;"> <view style="display: flex; margin-top: 240%;">
<u-button text="重置" class="bottom-btn1" <u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources}"></u-button> @click="formData = {...formData,sources}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button> <u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -139,7 +138,7 @@
.bottom-btn1{ .bottom-btn1{
width: 100px; width: 100px;
margin-left: 130px; margin-left: 70px;
} }
.bottom-btn2{ .bottom-btn2{
width: 100px; width: 100px;

View File

@ -14,7 +14,6 @@
src="../../../static/images/filter.png" src="../../../static/images/filter.png"
style="width: 20px; height: 20px; margin-left: 20px;" style="width: 20px; height: 20px; margin-left: 20px;"
@click="popupOpen = true" @click="popupOpen = true"
v-show="!popupOpen"
> >
</image> </image>
</view> </view>
@ -39,7 +38,7 @@
</u-checkbox> </u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</view> </view>
<view style="display: flex; margin-top: 195%;"> <view style="display: flex; margin-top: 240%;">
<u-button text="重置" class="bottom-btn1" <u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources}"></u-button> @click="formData = {...formData,sources}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button> <u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -140,7 +139,7 @@
.bottom-btn1{ .bottom-btn1{
width: 100px; width: 100px;
margin-left: 130px; margin-left: 70px;
} }
.bottom-btn2{ .bottom-btn2{
width: 100px; width: 100px;