guoshilong
2022-11-29 216da57d3891eeea88186510e210c3e5405e8642
首页全景链接数据库
1 files modified
1 files added
43 ■■■■■ changed files
src/api/panorama/index.js 13 ●●●●● patch | view | raw | blame | history
src/views/home/index.vue 30 ●●●●● patch | view | raw | blame | history
src/api/panorama/index.js
New file
@@ -0,0 +1,13 @@
import request from "@/router/axios.js"
/**
 * 获取全景列表
 * @param {*} params
 * @returns
 */
export const getPanoramaList = () => {
    return request({
        url: '/panorama/panorama/all',
        method: 'get',
    })
}
src/views/home/index.vue
@@ -5,8 +5,8 @@
 * @LastEditTime: 2022-11-26 14:53:59
 * @FilePath: \srs-police-affairs\src\views\home\index.vue
 * @Description: 小区-栋-层-房屋
 *
 * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved.
 *
 * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved.
-->
<template>
@@ -67,7 +67,8 @@
        <el-dialog :title="panoramaTitle" :modal="true" :visible.sync="panoramaVisible"
            :before-close="panoramaBeforeClose" :close-on-click-modal="true" class="panorama-details-box">
            <iframe src="http://vr.jxpskj.com/JXSFKZQJ/QJ/" style="width: 100%; height: 100%;" frameborder="0"></iframe>
<!--            <iframe src="http://vr.jxpskj.com/JXSFKZQJ/QJ/" style="width: 100%; height: 100%;" frameborder="0"></iframe>-->
          <iframe :src="panoramaVrUrl" style="width: 100%; height: 100%;" frameborder="0"/>
        </el-dialog>
        <el-dialog :title="activityTitle" :modal="true" :visible.sync="activityVisible"
@@ -257,6 +258,8 @@
</template>
<script>
import {getPanoramaList} from "@/api/panorama";
let cylinderLayer = null
let circleLayer = null
let treeData = [
@@ -382,6 +385,7 @@
            dialogTitle: '',
            dialogVisible: false,
            panoramaTitle: '',
            panoramaVrUrl:'',
            activityTitle: '',
            equimentTitle: '',
            keyPersonTitle: '',
@@ -519,6 +523,7 @@
        this.underwayArr = underwayArr
        this.policeSituationRealtimeArr = realtimeArr
        this.policeSituationHistoryArr = policeSituationHistoryArr
        this.getPanoramaList();
    },
    mounted () {
@@ -892,6 +897,7 @@
        panoramaSiteClick (e) {
            this.panoramaTitle = e.overlay.attrParams.name
            this.panoramaVrUrl = e.overlay.attrParams.vrUrl
            this.panoramaVisible = true
        },
@@ -1336,6 +1342,24 @@
            this.policeSituationTimeType = type
        },
        /**
         * 获取所有全景数据
         */
        getPanoramaList(){
          getPanoramaList().then(res=>{
            if (res.data.code == 200){
              let data = res.data.data
              data.forEach(e=>{
                e.lng = e.longitude
                e.lat = e.latitude
                e.alt = 100
                e.url = '/img/icon/map-panorama.png'
              })
              this.panoramaList = data
            }
          })
        },
    },
    destroyed () {