|
|
@ -54,96 +54,113 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { Scene } from '@antv/l7'; |
|
|
|
import popup from '@/views/dataBoard/cpts/popup'; |
|
|
|
import { GaodeMap, Map } from '@antv/l7-maps'; |
|
|
|
import { requestPostBi } from '@/js/dai/request-bipass'; |
|
|
|
import { |
|
|
|
Scene |
|
|
|
} from '@antv/l7'; |
|
|
|
import popup from '@/views/dataBoard/cpts/popup'; |
|
|
|
import daiMap from "@/utils/dai-map"; |
|
|
|
import { |
|
|
|
requestPostBi |
|
|
|
} from '@/js/dai/request-bipass'; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'eventdetail', |
|
|
|
props: { |
|
|
|
detailId: { |
|
|
|
type: String, |
|
|
|
default: '' |
|
|
|
export default { |
|
|
|
name: 'eventdetail', |
|
|
|
props: { |
|
|
|
detailId: { |
|
|
|
type: String, |
|
|
|
default: '' |
|
|
|
}, |
|
|
|
detailType: { |
|
|
|
type: String, |
|
|
|
default: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
detailType: { |
|
|
|
type: String, |
|
|
|
default: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
components: { popup }, |
|
|
|
created() {}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
progress: [], |
|
|
|
info: {}, |
|
|
|
title: '事件', |
|
|
|
currentTabIndex: 0, |
|
|
|
startTabIndex: 0, |
|
|
|
currentTabIndex2: 0, |
|
|
|
startTabIndex2: 0 |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
this.getInfo(); |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
currentTab() { |
|
|
|
return this.tabList[this.currentTabIndex]; |
|
|
|
components: { |
|
|
|
popup |
|
|
|
}, |
|
|
|
currentTab2() { |
|
|
|
return this.tabList2[this.currentTabIndex2]; |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
iniMap() { |
|
|
|
const scene = new Scene({ |
|
|
|
id: 'map', |
|
|
|
map: new GaodeMap({ |
|
|
|
pitch: 35.210526315789465, |
|
|
|
style: 'dark', |
|
|
|
center: [this.info.latitude, this.info.longitude], |
|
|
|
// center: [120.00, 36.00], |
|
|
|
zoom: 4.4 |
|
|
|
}) |
|
|
|
}); |
|
|
|
created() {}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
progress: [], |
|
|
|
info: {}, |
|
|
|
title: '事件', |
|
|
|
currentTabIndex: 0, |
|
|
|
startTabIndex: 0, |
|
|
|
currentTabIndex2: 0, |
|
|
|
startTabIndex2: 0 |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
this.getInfo(); |
|
|
|
}, |
|
|
|
handleClose() { |
|
|
|
this.$emit('close'); |
|
|
|
computed: { |
|
|
|
currentTab() { |
|
|
|
return this.tabList[this.currentTabIndex]; |
|
|
|
}, |
|
|
|
currentTab2() { |
|
|
|
return this.tabList2[this.currentTabIndex2]; |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
iniMap() { |
|
|
|
let latitude = this.info.latitude; |
|
|
|
let longitude = this.info.longitude; |
|
|
|
let map = new daiMap(document.getElementById("map"), { |
|
|
|
latitude, |
|
|
|
longitude |
|
|
|
}, { |
|
|
|
zoom: 16.2, // 设置地图缩放级别 |
|
|
|
pitch: 43.5, // 设置俯仰角 |
|
|
|
rotation: 45, // 设置地图旋转角度 |
|
|
|
}); |
|
|
|
map.setCenter(latitude, longitude); |
|
|
|
map.setMarker(latitude, longitude); |
|
|
|
}, |
|
|
|
handleClose() { |
|
|
|
this.$emit('close'); |
|
|
|
}, |
|
|
|
|
|
|
|
// 根据房屋id获取详情 |
|
|
|
async getInfo() { |
|
|
|
let url = 'place_resources_intro'; |
|
|
|
let queryParam = {}; |
|
|
|
this.title = '场所详情'; |
|
|
|
queryParam.place_id = this.detailId; |
|
|
|
queryParam.parent_place_type = this.detailType; |
|
|
|
const { data, code, msg } = await requestPostBi( |
|
|
|
url, |
|
|
|
{ |
|
|
|
queryParam: queryParam |
|
|
|
}, |
|
|
|
{ |
|
|
|
// mockId: 70051004, |
|
|
|
// 根据房屋id获取详情 |
|
|
|
async getInfo() { |
|
|
|
let url = 'place_resources_intro'; |
|
|
|
let queryParam = {}; |
|
|
|
this.title = '场所详情'; |
|
|
|
queryParam.place_id = this.detailId; |
|
|
|
if (this.detailType == "enterprise") { |
|
|
|
queryParam.parent_place_type = "enterprise_inspect" |
|
|
|
} else { |
|
|
|
queryParam.parent_place_type = this.detailType; |
|
|
|
} |
|
|
|
const { |
|
|
|
data, |
|
|
|
code, |
|
|
|
msg |
|
|
|
} = await requestPostBi( |
|
|
|
url, { |
|
|
|
queryParam: queryParam |
|
|
|
}, { |
|
|
|
// mockId: 70051004, |
|
|
|
} |
|
|
|
); |
|
|
|
if (code === 0) { |
|
|
|
this.info = { |
|
|
|
...this.info, |
|
|
|
...data[0] |
|
|
|
}; |
|
|
|
console.log('this.info', this.info); |
|
|
|
this.iniMap(); |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
); |
|
|
|
if (code === 0) { |
|
|
|
this.info = { ...this.info, ...data[0] }; |
|
|
|
console.log('this.info', this.info); |
|
|
|
this.iniMap(); |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
.m-info .row .item .field { |
|
|
|
width: 120px !important; |
|
|
|
} |
|
|
|
.m-info .row .item .field { |
|
|
|
width: 120px !important; |
|
|
|
} |
|
|
|
</style> |
|
|
|
<style lang="scss" src="@/assets/scss/dataBoard/popup-info.scss" scoped></style> |
|
|
|
<style lang="scss" src="@/assets/scss/dataBoard/popup-info.scss" scoped></style> |