|
|
|
|
@ -4,14 +4,14 @@
|
|
|
|
|
<view class="box-header">
|
|
|
|
|
<view class="search-wrap">
|
|
|
|
|
<!-- 如果使用u-search组件,必须要给v-model绑定一个变量 -->
|
|
|
|
|
<u-search v-model="keyword" placeholder="请输入关键词查看更多街道信息" @search="tosearch()" height="56"
|
|
|
|
|
<u-search v-model="keyword" placeholder="请输入关键词查看更多道路信息" @search="tosearch()" height="56"
|
|
|
|
|
:action-style="{color: '#fff'}">
|
|
|
|
|
</u-search>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view :class="mask?'list listfixed':'list'" style="padding-top: 100rpx;">
|
|
|
|
|
<view class='showclear' v-if='showClear'>附近街道:</view>
|
|
|
|
|
<view class='showclear' v-if='showClear'>附近道路:</view>
|
|
|
|
|
<u-radio-group :wrap="true">
|
|
|
|
|
<u-radio
|
|
|
|
|
@change="radioChange"
|
|
|
|
|
@ -27,7 +27,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="box-footer">
|
|
|
|
|
<u-button type="primary">确认</u-button>
|
|
|
|
|
<u-button type="primary" @click="towhichtype">确认</u-button>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -56,7 +56,9 @@
|
|
|
|
|
longitude:"",
|
|
|
|
|
latitude:"",
|
|
|
|
|
showClear:false,
|
|
|
|
|
towhere:"",
|
|
|
|
|
totype:"",
|
|
|
|
|
road_id:"",
|
|
|
|
|
road_name:""
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -75,22 +77,42 @@
|
|
|
|
|
},
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
let that = this;
|
|
|
|
|
that.totype=options.type
|
|
|
|
|
uni.getLocation({
|
|
|
|
|
type: "gcj02",
|
|
|
|
|
geocode:true,
|
|
|
|
|
success(res) {
|
|
|
|
|
console.log(res)
|
|
|
|
|
that.latitude = res.latitude;
|
|
|
|
|
that.longitude = res.longitude;
|
|
|
|
|
that.loadPage(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
towhichtype(){
|
|
|
|
|
let totype = this.totype
|
|
|
|
|
let url = "/packageA/pages/generalPatrol/generalPatrol";
|
|
|
|
|
if (totype == 'general') {
|
|
|
|
|
url ="/packageA/pages/generalPatrol/generalPatrol?roadid="+this.road_id+"&roadname="+this.road_name
|
|
|
|
|
}
|
|
|
|
|
if (totype == 'daily') {
|
|
|
|
|
url = "/packageB/pages/dailyInspection/dailyInspection?roadid="+this.road_id+"&roadname="+this.road_name
|
|
|
|
|
}
|
|
|
|
|
if (totype == 'rainmaintain') {
|
|
|
|
|
url = "/rainmaintain/rainmaintain/rainmaintain?roadid="+this.road_id+"&roadname="+this.road_name
|
|
|
|
|
}
|
|
|
|
|
if (totype == 'raininspection') {
|
|
|
|
|
url = "/raininspection/raininspection/raininspection?roadid="+this.road_id+"&roadname="+this.road_name
|
|
|
|
|
}
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: url
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
radioChange(val){
|
|
|
|
|
console.log("val",val)
|
|
|
|
|
let arr = val.split(",")
|
|
|
|
|
this.road_id = arr[0]
|
|
|
|
|
this.road_name = arr[1]
|
|
|
|
|
},
|
|
|
|
|
tosearch() {
|
|
|
|
|
this.latitude=""
|
|
|
|
|
@ -118,7 +140,6 @@
|
|
|
|
|
name: that.keyword,
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(r) {
|
|
|
|
|
console.log("r",that.longitude)
|
|
|
|
|
if(that.longitude!=""){
|
|
|
|
|
// var res = r;
|
|
|
|
|
that.showClear = true
|
|
|
|
|
@ -152,13 +173,10 @@
|
|
|
|
|
} else {
|
|
|
|
|
dataList.push(...res);
|
|
|
|
|
}
|
|
|
|
|
console.log(dataList)
|
|
|
|
|
|
|
|
|
|
that.currentPage = page;
|
|
|
|
|
that.dataList = dataList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log("res",res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|