Browse Source

修改页面样式

master
邓宏 2 years ago
parent
commit
bd9baff526
  1. 2
      pages/massif/add_farming.vue
  2. 1
      pages/massif/mana/farmRecord.vue
  3. 9
      pages/massif/mana/index.vue
  4. 34
      pages/massif/mana/plantPlan.vue
  5. 8
      uni_modules/d-form/components/d-form/d-form.vue

2
pages/massif/add_farming.vue

@ -209,7 +209,7 @@ export default {
farmingTime:{label:"操作日期",styleType:"parallel",type:"calendar"}, farmingTime:{label:"操作日期",styleType:"parallel",type:"calendar"},
farmingPlanId:{label:"种植计划",type:"select",columns:[],value:[]}, farmingPlanId:{label:"种植计划",type:"select",columns:[],value:[]},
images:{label:"农事图片",type:"upImg",num:3}, images:{label:"农事图片",type:"upImg",num:3},
farmingRemarks:{label:"产品介绍",type:"textarea"}, farmingRemarks:{label:"备注",type:"textarea"},
}, },
formData:{ formData:{
farmingType:"", farmingType:"",

1
pages/massif/mana/farmRecord.vue

@ -88,6 +88,7 @@
<text>负责人{{v.principal}}</text> <text>记录时间{{v.time}}</text> <text>负责人{{v.principal}}</text> <text>记录时间{{v.time}}</text>
</view> </view>
</view> </view>
<u-empty v-if="list.length<=0" text="为查询到相关信息" width="70%" icon="/static/noData.png"/>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>

9
pages/massif/mana/index.vue

@ -68,6 +68,7 @@ export default {
var points=await this.getDetail() var points=await this.getDetail()
this.maps=amap.$getAppMap() this.maps=amap.$getAppMap()
this.maps.setMapType(plus.maps.MapType.MAPTYPE_SATELLITE) this.maps.setMapType(plus.maps.MapType.MAPTYPE_SATELLITE)
if(points.length>0){ if(points.length>0){
var bound=computeArea(points) var bound=computeArea(points)
@ -80,7 +81,13 @@ export default {
polygon.setFillOpacity(0.3) polygon.setFillOpacity(0.3)
this.maps.addOverlay(polygon) this.maps.addOverlay(polygon)
}else{ }else{
this.maps.centerAndZoom(new plus.maps.Point(102.712251,25.040609),10) this.maps.getUserLocation((state,point)=>{
if(state==0){
this.maps.centerAndZoom(new plus.maps.Point(point.longitude, point.latitude),10)
}else{
this.maps.centerAndZoom(new plus.maps.Point(102.712251,25.040609),10)
}
})
} }
/* #endif */ /* #endif */

34
pages/massif/mana/plantPlan.vue

@ -203,20 +203,28 @@ export default {
}) })
}, },
// //
async finishPlant(index){ finishPlant(index){
var res=await request("/api/plantPlan/finishPlant",{ uni.showModal({
params:{plantPlanId:this.list[index].id} title:"提示",
content:"确定结束种植!",
success: async e=>{
if(e.confirm){
var res=await request("/api/plantPlan/finishPlant",{
params:{plantPlanId:this.list[index].id}
})
if(res.statu){
uni.showToast({title:"结束成功!",duration:1500})
this.list[index].status=2
}else{
uni.showModal({
title:"提示",
content:res.msg||"结束种植失败!",
showCancel:false,
})
}
}
}
}) })
if(res.statu){
uni.showToast({title:"结束成功!",duration:1500})
this.list[index].status=2
}else{
uni.showModal({
title:"提示",
content:res.msg||"结束种植失败!",
showCancel:false,
})
}
}, },
// //
toAdd(plantId){ toAdd(plantId){

8
uni_modules/d-form/components/d-form/d-form.vue

@ -498,7 +498,13 @@ import {computeArea} from '@/common/utils'
this.maps.centerAndZoom(new plus.maps.Point(bound.center.longitude, bound.center.latitude),10) this.maps.centerAndZoom(new plus.maps.Point(bound.center.longitude, bound.center.latitude),10)
this.drawOver(true) this.drawOver(true)
}else{ }else{
this.maps.centerAndZoom(new plus.maps.Point(102.712251,25.040609),10) this.maps.getUserLocation((state,point)=>{
if(state==0){
this.maps.centerAndZoom(new plus.maps.Point(point.longitude, point.latitude),10)
}else{
this.maps.centerAndZoom(new plus.maps.Point(102.712251,25.040609),10)
}
})
} }
this.maps.onclick=(e)=>{ this.maps.onclick=(e)=>{
console.log("zoom",this.maps.getZoom()) console.log("zoom",this.maps.getZoom())

Loading…
Cancel
Save