mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
open
This commit is contained in:
parent
26d44d2490
commit
c7be217389
@ -63,7 +63,13 @@
|
|||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : false
|
"urlCheck" : false
|
||||||
},
|
},
|
||||||
"usingComponents" : true
|
"usingComponents" : true,
|
||||||
|
"permission" : {
|
||||||
|
"scope.userLocation" : {
|
||||||
|
"desc" : "物业员工巡检需要获取巡检地方位置"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requiredPrivateInfos": ["getLocation"]
|
||||||
},
|
},
|
||||||
"mp-alipay" : {
|
"mp-alipay" : {
|
||||||
"usingComponents" : true
|
"usingComponents" : true
|
||||||
|
|||||||
@ -13,7 +13,8 @@
|
|||||||
</radio>
|
</radio>
|
||||||
</view>
|
</view>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
<checkbox-group class="block" @change="checkboxChange($event,item)" v-else-if="item.titleType == '2002'">
|
<checkbox-group class="block" @change="checkboxChange($event,item)"
|
||||||
|
v-else-if="item.titleType == '2002'">
|
||||||
<view class="cu-form-group " v-for="(valueItem,valueIndex) in item.inspectionItemTitleValueDtos">
|
<view class="cu-form-group " v-for="(valueItem,valueIndex) in item.inspectionItemTitleValueDtos">
|
||||||
<view class="title">{{valueItem.itemValue}}</view>
|
<view class="title">{{valueItem.itemValue}}</view>
|
||||||
<checkbox :class="item.radio[valueIndex].selected == '1'?'checked':''"
|
<checkbox :class="item.radio[valueIndex].selected == '1'?'checked':''"
|
||||||
@ -29,7 +30,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<uploadImageAsync ref="vcUploadRef" :communityId="communityId" :sourceType="sourceType" :maxPhotoNum="uploadImage.maxPhotoNum" :canEdit="uploadImage.canEdit" :title="uploadImage.imgTitle" @sendImagesData="sendImagesData" style="margin-top: 30rpx;"></uploadImageAsync>
|
<uploadImageAsync ref="vcUploadRef" :communityId="communityId" :sourceType="sourceType"
|
||||||
|
:maxPhotoNum="uploadImage.maxPhotoNum" :canEdit="uploadImage.canEdit" :title="uploadImage.imgTitle"
|
||||||
|
@sendImagesData="sendImagesData" style="margin-top: 30rpx;"></uploadImageAsync>
|
||||||
|
|
||||||
<view class="cu-form-group margin-top" v-if="mapKey">
|
<view class="cu-form-group margin-top" v-if="mapKey">
|
||||||
<view class="title">当前位置</view>
|
<view class="title">当前位置</view>
|
||||||
@ -46,13 +49,21 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import conf from '../../conf/config.js'
|
import conf from '../../conf/config.js'
|
||||||
import {preventClick} from '../../lib/java110/utils/common.js';
|
import {
|
||||||
import {queryDictInfo,queryInspectionItemTitle} from '../../api/inspection/inspection.js';
|
preventClick
|
||||||
import {getCurrentCommunity} from '../../api/community/community.js'
|
} from '../../lib/java110/utils/common.js';
|
||||||
|
import {
|
||||||
|
queryDictInfo,
|
||||||
|
queryInspectionItemTitle
|
||||||
|
} from '../../api/inspection/inspection.js';
|
||||||
|
import {
|
||||||
|
getCurrentCommunity
|
||||||
|
} from '../../api/community/community.js'
|
||||||
import url from '../../constant/url.js'
|
import url from '../../constant/url.js'
|
||||||
import uploadImageAsync from "../../components/vc-upload-async/vc-upload-async.vue";
|
import uploadImageAsync from "../../components/vc-upload-async/vc-upload-async.vue";
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
Vue.prototype.$preventClick = preventClick;
|
Vue.prototype.$preventClick = preventClick;
|
||||||
|
import QQMapWX from '@/lib/qqmap-wx-jssdk.min.js';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -103,7 +114,13 @@
|
|||||||
success: (res) => {
|
success: (res) => {
|
||||||
this.latitude = res.latitude;
|
this.latitude = res.latitude;
|
||||||
this.longitude = res.longitude;
|
this.longitude = res.longitude;
|
||||||
|
// #ifdef H5
|
||||||
this.getCurrentLocation();
|
this.getCurrentLocation();
|
||||||
|
// #endiff
|
||||||
|
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.getMiniWechatLocation();
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.taskDetailId = option.taskDetailId;
|
this.taskDetailId = option.taskDetailId;
|
||||||
@ -157,10 +174,28 @@
|
|||||||
that.titles = _data.data;
|
that.titles = _data.data;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getMiniWechatLocation: function() {
|
||||||
|
let qqmapsdk = new QQMapWX({
|
||||||
|
key: this.mapKey
|
||||||
|
});
|
||||||
|
qqmapsdk.reverseGeocoder({
|
||||||
|
location: {
|
||||||
|
latitude: this.latitude,
|
||||||
|
longitude: this.longitude
|
||||||
|
},
|
||||||
|
success: (locaRes) => {
|
||||||
|
this.reverseGeocoderSimplify = locaRes.result.address
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
// 地址逆解析
|
// 地址逆解析
|
||||||
getCurrentLocation: function() {
|
getCurrentLocation: function() {
|
||||||
let locationObj = this.latitude + ',' + this.longitude;
|
let locationObj = this.latitude + ',' + this.longitude;
|
||||||
let url = 'https://apis.map.qq.com/ws/geocoder/v1?coord_type=5&get_poi=1&output=jsonp&poi_options=page_size=1;page_index=1';
|
let url =
|
||||||
|
'https://apis.map.qq.com/ws/geocoder/v1?coord_type=5&get_poi=1&output=jsonp&poi_options=page_size=1;page_index=1';
|
||||||
this.$jsonp(url, {
|
this.$jsonp(url, {
|
||||||
key: this.mapKey,
|
key: this.mapKey,
|
||||||
location: locationObj
|
location: locationObj
|
||||||
@ -261,7 +296,8 @@
|
|||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
} else {
|
} else {
|
||||||
this.java110Context.request({
|
this.java110Context.request({
|
||||||
url: url.updateInspectionTaskDetail, // http://hc.demo.winqi.cn:8012/appApi/ownerRepair.saveOwnerRepair
|
url: url
|
||||||
|
.updateInspectionTaskDetail, // http://hc.demo.winqi.cn:8012/appApi/ownerRepair.saveOwnerRepair
|
||||||
header: this.java110Context.getHeaders(),
|
header: this.java110Context.getHeaders(),
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: obj, //动态数据
|
data: obj, //动态数据
|
||||||
@ -330,5 +366,4 @@
|
|||||||
color: rgba(69, 90, 100, .6);
|
color: rgba(69, 90, 100, .6);
|
||||||
padding: 40rpx 30rpx 20rpx;
|
padding: 40rpx 30rpx 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user