Browse Source

地块基本信息 详情图片初始化

master
邓宏 2 years ago
parent
commit
3bb5f15e47
  1. 2
      pages/home/index.vue
  2. 14
      pages/home/my.vue
  3. 18
      pages/massif/info.vue

2
pages/home/index.vue

@ -379,6 +379,7 @@ import request,{host} from '@/common/request'
this.$provise.on("updateMassif", this.getMassif) this.$provise.on("updateMassif", this.getMassif)
this.$provise.on("updateStock", this.getStock) this.$provise.on("updateStock", this.getStock)
//#ifdef APP-PLUS
uni.getLocation({ uni.getLocation({
type:"gcj02", type:"gcj02",
geocode:true, geocode:true,
@ -392,6 +393,7 @@ import request,{host} from '@/common/request'
} }
} }
}) })
//#endif
}, },
methods: { methods: {
async getHeadImg(){ async getHeadImg(){

14
pages/home/my.vue

@ -64,21 +64,21 @@
<text class="name">{{$store.getters.userInfo.realname}}</text> <text class="name">{{$store.getters.userInfo.realname}}</text>
<text class="phone">{{$store.getters.userInfo.phone}}</text> <text class="phone">{{$store.getters.userInfo.phone}}</text>
<view class="item" @click="$u.route({url:'pages/home/personalInfo'})"> <view class="item" @click="$u.route({url:'/pages/stock/already'})">
<text class="plant-gerenzhongxinwode"/> <text>个人信息</text> <text class="plant-youbian"/> <text class="plant-kufangguanli-lingyongguihuan"/> <text>领用记录</text> <text class="plant-youbian"/>
</view> </view>
<view class="item" @click="$u.route({url:'pages/home/rePassword'})"> <view class="item" @click="$u.route({url:'/plantPages/stock/record'})">
<text class="plant-icon2"/> <text>修改密码</text> <text class="plant-youbian"/> <text class="plant-liulanjilu-tianchong"/> <text>出入库记录</text> <text class="plant-youbian"/>
</view> </view>
<view class="item" @click="$u.route({url:'/pages/purchase/record'})"> <view class="item" @click="$u.route({url:'/pages/purchase/record'})">
<text class="plant-liulanjilu-tianchong"/> <text>采购记录</text> <text class="plant-youbian"/> <text class="plant-liulanjilu-tianchong"/> <text>采购记录</text> <text class="plant-youbian"/>
</view> </view>
<view class="item" @click="$u.route({url:'/pages/stock/already'})">
<text class="plant-kufangguanli-lingyongguihuan"/> <text>领用记录</text> <text class="plant-youbian"/>
</view>
<view class="item" @click="$u.route({url:'/pages/home/news'})"> <view class="item" @click="$u.route({url:'/pages/home/news'})">
<text class="plant-xitongxiaoxi"/> <text>系统消息</text> <text class="number">{{$store.state.sysMsgNum}}</text> <text class="plant-youbian"/> <text class="plant-xitongxiaoxi"/> <text>系统消息</text> <text class="number">{{$store.state.sysMsgNum}}</text> <text class="plant-youbian"/>
</view> </view>
<view class="item" @click="$u.route({url:'pages/home/personalInfo'})">
<text class="plant-gerenzhongxinwode"/> <text>个人信息</text> <text class="plant-youbian"/>
</view>
<view class="item" @click="outLogin"> <view class="item" @click="outLogin">
<text class="plant-tuichu"/> <text>退出</text> <text class="plant-youbian"/> <text class="plant-tuichu"/> <text>退出</text> <text class="plant-youbian"/>
</view> </view>

18
pages/massif/info.vue

@ -145,14 +145,14 @@ import request from '@/common/request'
this.formData=res.data this.formData=res.data
this.fields.date.value=[res.data.beginTime, res.data.endTime] this.fields.date.value=[res.data.beginTime, res.data.endTime]
this.fields.plantBaseInfoId.value=[res.data.plantBaseInfoId] this.fields.plantBaseInfoId.value=[res.data.plantBaseInfoId]
this.fields.image.value=res.data.image.join(',') this.fields.image.value=(res.data.image||'').join(',')
this.fields.longitude.value=this.formData.longitude.split("|").map(v=>{ // this.fields.longitude.value=this.formData.longitude.split(";").map(v=>{
var point=v.split(",") // var point=v.split(",")
if(point.length==2){ // if(point.length==2){
return {longitude:point[0],latitude:point[1]} // return {longitude:point[0],latitude:point[1]}
} // }
return null // return null
}).filter(v=>v) // }).filter(v=>v)
}else{ }else{
uni.showModal({ uni.showModal({
title:"提示", title:"提示",
@ -163,7 +163,7 @@ import request from '@/common/request'
}, },
editorMap(e){ editorMap(e){
this.fields.longitude.value=e this.fields.longitude.value=e
this.formData.longitude=e.map(v=>`${v.longitude},${v.latitude}`).join('|') this.formData.longitude=e.map(v=>`${v.longitude},${v.latitude}`).join(';')
}, },
}, },
onBackPress(e){ onBackPress(e){

Loading…
Cancel
Save