酒店,农家运营详情改成id

dev
Tuzki 2 years ago
parent 146f4ea1a3
commit a35c572a28
  1. 1
      ruoyi-ui/src/components/CommonComponents/PublicCoponents/map/NewLocation.vue
  2. 7
      ruoyi-ui/src/components/CommonComponents/PublicCoponents/map/NewMap.vue
  3. 5
      ruoyi-ui/src/views/picture/resource-monitoring/dialog-module/tour-detail.vue
  4. 23
      ruoyi-ui/src/views/system/management/operational-data/lineData/lineData/index.vue

@ -126,7 +126,6 @@ export default {
this.tempObj = lnglat
} else if (this.clean === false) {
this.markers.push(lnglat)
console.log(this.markers,this.markers.length)
}
},
getPathArr(arr) {

@ -98,7 +98,6 @@ export default {
// immediate: true,
deep: true,
handler(val,oval) {
console.log(val,oval)
if (val&&val.every((v, i) => v !== oval[i])) {
this.initMap(val)
}
@ -138,13 +137,11 @@ export default {
},
methods: {
initMap(center) {
console.log(center, '点位中心')
this.map = new window.AMap.Map(this.$refs.mapContainer, {
center: center[0] == undefined ? this.mapCente : center,
plugins: ['AMap.AutoComplete'],
zoom: 13
})
console.log(this.pointArr, '00000')
if (center[0] != undefined) {
this.marker = new AMap.Marker({
icon: "https://webapi.amap.com/theme/v1.3/markers/n/mark_b.png",
@ -154,6 +151,7 @@ export default {
}
if (this.pointArr && this.pointArr.length > 0) {
this.addMarker(this.pointArr)
console.log(this.pointArr)
this.map.setFitView()
}
if (this.pathArr !== undefined && this.pathArr.length > 1) {
@ -163,7 +161,6 @@ export default {
this.map.setFitView()
},
addMarker(position) { //
console.log(position, '打点数组')
let this_ = this
// if (position !== undefined && position.length <= 2 || Array.isArray(position) === false && Object.keys(position).length > 0) {
if (position && Array.isArray(position) === false) {
@ -177,7 +174,6 @@ export default {
this.markers.push(this_.marker)
this.selectedMarker = this_.marker // s
} else {
console.log(position, '这里是获取到的陆游线路点位')
position.forEach(item => {
this_.marker = new window.AMap.Marker({
position: [item.lon, item.lat]
@ -238,7 +234,6 @@ export default {
}
const placeSearch = new AMap.PlaceSearch(autoOptions)
placeSearch.search(addr, function (status, result) {
console.log(status, result, '搜索结果')
if (result.info == 'OK') {
this_.map.setCenter([result.poiList.pois[0].location.lng, result.poiList.pois[0].location.lat])

@ -1,6 +1,7 @@
<template>
<!-- 弹窗详情-->
<div class="p-dialog-box">
{{dataType}}
<!-- 详情 导航 ------------------ -->
<div class="p-dialog-nav">
<div style="height: 10rem;overflow: hidden"><img src="@/assets/images/p_dialog_nav_top.svg"/></div>
@ -1005,7 +1006,7 @@ export default {
//
getHotelOperationStatistics() {
let params = {
id: this.detailData.resourceCode
id: this.id
}
getHotelOperationStatistics(params).then(response => {
this.operationStatistics = response.data
@ -1031,7 +1032,7 @@ export default {
}
this.TypeData.eChartOpts = Opts
let params = {
id: this.detailData.resourceCode
id: this.id
}
getRoomType(params).then(response => {
this.TypeData.eChartData = response.data

@ -202,7 +202,8 @@
<el-form-item label="线路点位" prop="linePoint">
<!-- <r-location :lan-lat="[114.48,38.06]" :show-input="false" @arrChange="getPointList" :arrLength.sync="nums" v-model="form.linePoint"></r-location>-->
<new-location :clean="false" :close-clean="false" :line-type="false"
:markerLength.sync="nums" :point-arr="saveLocation"
:map-center="saveLocation.length?[saveLocation[0].lon,saveLocation[0].lat]:[]"
:point-arr="saveLocation"
:show-search="false" @getMarkers="getMarkers"></new-location>
<span v-if="nums!==null">已选{{ nums }}</span>
</el-form-item>
@ -364,9 +365,8 @@ export default {
this.reset();
const id = row.id || this.ids
getLineData(id).then(response => {
if (response.data.linePoint&&response.data.linePoint!=null){
if (response.data.linePoint && response.data.linePoint != null) {
this.saveLocation = JSON.parse(response.data.linePoint)
console.log(this.saveLocation,'?????');
this.nums = JSON.parse(response.data.linePoint).length;
}
this.form = response.data;
@ -426,6 +426,7 @@ export default {
getMarkers(val) {
if (val !== undefined && val.length > 0) {
this.form.linePoint = []
console.log(this.form.linePoint, '1111')
val.forEach(val => {
let obj = {
lon: val.lng,
@ -433,8 +434,22 @@ export default {
}
this.form.linePoint.push(obj)
})
console.log(this.form.linePoint, '333')
if(this.arrayContains(this.saveLocation,this.form.linePoint)==false){
this.saveLocation = this.saveLocation.concat(this.form.linePoint)
}
this.nums = this.saveLocation.length
this.form.linePoint = JSON.stringify(this.form.linePoint)
console.log(this.form.linePoint, this.saveLocation, '222')
}
this.form.linePoint = JSON.stringify(this.form.linePoint)
},
arrayContains (arr1, arr2){
return arr2.some(item => {
return arr1.some(ele => {
return ele.lon === item.lon
})
})
}
}
};

Loading…
Cancel
Save