|
|
<template>
|
|
|
<view>
|
|
|
<!-- 顶部区域 -->
|
|
|
<check-top-wrap @changeParamType="changeParamType" :yearVal="param.year" :keyword="keyword" :cityVal="basinTxt" @showPicker="showPicker"></check-top-wrap>
|
|
|
<check-top-wrap @changeParamType="changeParamType" :yearVal="yearTxt" :keyword="keyword" :cityVal="basinTxt" @showPicker="showPicker"></check-top-wrap>
|
|
|
<w-picker
|
|
|
:visible.sync="visibleYear"
|
|
|
mode="date"
|
...
|
...
|
@@ -55,6 +55,7 @@ |
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
yearTxt:new Date().getFullYear().toString(),
|
|
|
basinTxt:'全流域',
|
|
|
param:{
|
|
|
// 恢复位置
|
...
|
...
|
@@ -89,7 +90,7 @@ |
|
|
},
|
|
|
onLoad() {
|
|
|
//#ifdef APP-PLUS
|
|
|
uni.getLocation({
|
|
|
/* uni.getLocation({
|
|
|
type: 'gcj02',
|
|
|
geocode: true,
|
|
|
success: (res) => {
|
...
|
...
|
@@ -97,12 +98,15 @@ |
|
|
this.basinTxt = res.address.city
|
|
|
this.defaultRegion = [res.address.province,res.address.city]
|
|
|
}
|
|
|
});
|
|
|
}); */
|
|
|
//#endif
|
|
|
//#ifdef H5
|
|
|
// 恢复位置
|
|
|
this.defaultRegion = ['全流域','']
|
|
|
// this.defaultRegion = ['全流域','']
|
|
|
//#endif
|
|
|
this.param.basin = ''
|
|
|
this.basinTxt = '全流域'
|
|
|
this.defaultRegion = ['全流域','']
|
|
|
this.getData()
|
|
|
},
|
|
|
methods: {
|
...
|
...
|
@@ -143,7 +147,15 @@ |
|
|
},
|
|
|
onConfirm(e,pickerType){
|
|
|
if(pickerType == 'year'){
|
|
|
console.log('e.result',e.result)
|
|
|
if(e.result == '全'){
|
|
|
this.param.year = ''
|
|
|
this.yearTxt = '全'
|
|
|
}else{
|
|
|
this.param.year = e.result
|
|
|
this.yearTxt = e.result
|
|
|
}
|
|
|
|
|
|
}
|
|
|
if(pickerType == 'region'){
|
|
|
if(e.obj.city.label != ''){
|
...
|
...
|
|