作者 徐强

提交

... ... @@ -15,16 +15,16 @@
<image src="../static/image/icon_loc2.png" mode=""></image>
<view class="lang">
经度: {{item.moreInfo.LAT}} 纬度: {{item.moreInfo.LON}}
<image class="clearBtn" src="../static/image/icon_clear2.png" mode="" @click="delAddress()"></image>
<image class="clearBtn" src="../static/image/icon_clear2.png" mode="" @click="delAddress(index)"></image>
</view>
</view>
<view class="desc" v-if="item.moreInfo.NOTE">
{{item.moreInfo.NOTE}}
</view>
<view class="imgList" v-if="item.moreInfo.IMGS">
<view class="imgItem" v-for="(item,index) in item.moreInfo.IMGS" :key="index">
<image class="img" src="../static/logo.png" mode=""></image>
<image class="clearBtn" src="../static/image/icon_clear2.png" mode="" @click="del(index)"></image>
<view class="imgItem" v-for="(item,imgIndex) in item.moreInfo.IMGS" :key="imgIndex">
<image class="img" :src="item" mode=""></image>
<image class="clearBtn" src="../static/image/icon_clear2.png" mode="" @click="del(index,imgIndex)"></image>
</view>
</view>
</view>
... ... @@ -47,15 +47,18 @@
},
checkIndex:{
type:Number
},
moreInfo:{
type:Object
}
},
methods: {
delAddress(){
this.lan = ''
this.lon = ''
this.keyList[index].moreInfo.LAT = ''
this.keyList[index].moreInfo.LON = ''
},
del(index){
this.imgList.splice(index,1)
del(index,imgIndex){
this.keyList[index].moreInfo.IMGS.splice(imgIndex,1)
},
radioCheck(index,subIndex){
this.keyList[index].check = this.keyList[index].subKeyList[subIndex].check
... ...
... ... @@ -27,7 +27,7 @@
位置
</view>
</view>
<view class="recordTypeItem">
<view class="recordTypeItem" @click="getAlbum">
<view class="typeImg">
<image src="../../../static/image/icon_xiangce.png" mode=""></image>
</view>
... ... @@ -35,7 +35,7 @@
相册
</view>
</view>
<view class="recordTypeItem">
<view class="recordTypeItem" @click="getCamera">
<view class="typeImg">
<image src="../../../static/image/icon_cream.png" mode=""></image>
</view>
... ... @@ -43,7 +43,7 @@
拍摄
</view>
</view>
<view class="recordTypeItem">
<view class="recordTypeItem" @click="clickDescInp">
<view class="typeImg">
<image src="../../../static/image/icon_beizhu.png" mode=""></image>
</view>
... ... @@ -57,6 +57,23 @@
</view>
</view>
</view>
<!-- 备注输入弹框区域 -->
<view class="descInpWrap" v-if="showDescInp">
<view class="descInp">
<view class="descTextArea">
<textarea v-model="desc" placeholder="请输入备注" />
</view>
<view class="bottomBtn">
<view class="btnItem" @click="showDescInp = false">
取消
</view>
<view class="btnItem" style="color: #4bb377;" @click="confirmDescInp">
确认
</view>
</view>
</view>
</view>
</view>
</template>
... ... @@ -68,6 +85,12 @@
export default {
data() {
return {
desc:'',
LAT:'',
LON:'',
IMGS:[],
showDescInp:false,
contentPop:'',
companyId:'',
param:{},
pdoCd:'',
... ... @@ -1958,22 +1981,79 @@
},
confirmDescInp(){
if(this.desc == ''){
uni.showToast({
title:'请输入备注',
icon:'none'
})
return
}
var moreInfo = {
LAT:this.LAT,
LON:this.LON,
NOTE:this.desc,
IMGS:this.IMGS
}
this.checkList[this.checkIndex].keyList[this.keyIndex].moreInfo = moreInfo
this.showDescInp = false
},
getLocation(){
console.log('111')
uni.getLocation({
type: 'wgs84',
success: (res) => {
this.LAT = 123
this.LON = 456
var moreInfo = {
LAT : res.latitude,
LON : res.longitude
LAT:this.LAT,
LON:this.LON,
NOTE:this.desc,
IMGS:this.IMGS
}
this.checkList[this.checkIndex].keyList[this.keyIndex].moreInfo = moreInfo
console.log(this.checkList[this.checkIndex].keyList[this.keyIndex])
this.showRecordMore = false
}
});
},
getAlbum(){
uni.chooseImage({
count: 6, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: (res) => {
this.IMGS = this.IMGS.concat(res.tempFilePaths)
var moreInfo = {
LAT:this.LAT,
LON:this.LON,
NOTE:this.desc,
IMGS:this.IMGS
}
this.checkList[this.checkIndex].keyList[this.keyIndex].moreInfo = moreInfo
this.showRecordMore = false
}
});
},
getCamera(){
uni.chooseImage({
count: 6, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['camera'], //从相册选择
success: (res) => {
this.IMGS = this.IMGS.concat(res.tempFilePaths)
var moreInfo = {
LAT:this.LAT,
LON:this.LON,
NOTE:this.desc,
IMGS:this.IMGS
}
this.checkList[this.checkIndex].keyList[this.keyIndex].moreInfo = moreInfo
this.showRecordMore = false
}
});
},
clickDescInp(){
this.showDescInp = true
this.showRecordMore = false
},
editRecordMore(e){
console.log('e',e)
... ... @@ -2122,4 +2202,11 @@
.recordTypeItem .typeName{padding-top: 16rpx;text-align: center;color: #969799;font-size: 24rpx;}
.typeImg image{width: 96rpx;height: 96rpx;}
.recordMore .bottomBtn{height: 96rpx;text-align: center;line-height: 96rpx;font-size: 32rpx;color: #646566;}
/* 备注输入弹框区域 */
.descInpWrap{position: fixed;top: 0;bottom: 0;left: 0;right: 0;background: rgba(0,0,0,0.5);display: flex;justify-content: center;align-items: center;}
.descInpWrap .descInp{width: 500rpx;background: #fff;border-radius: 30rpx;padding: 30rpx;}
.descInp .descTextArea{height: 300rpx;}
.descTextArea textarea{width: 100%;}
.descInp .bottomBtn{display: flex;height: 60rpx;}
.bottomBtn .btnItem{flex: 1;text-align: center;line-height: 60rpx;}
</style>
... ...