shuishen
2021-12-22 8a83d73d3ec6c84adba425aab273bffbdf08629a
对接接口及部分样式调整
14 files modified
3 files added
403 ■■■■ changed files
public/img/icon/service-qcj.png patch | view | raw | blame | history
public/img/icon/xndh.png patch | view | raw | blame | history
src/api/pc/leftNav/index.js 48 ●●●●● patch | view | raw | blame | history
src/api/pc/service/index.js 18 ●●●●● patch | view | raw | blame | history
src/components/arcNavBar/index.vue 5 ●●●●● patch | view | raw | blame | history
src/components/campusNav/index.vue 7 ●●●●● patch | view | raw | blame | history
src/components/leftNav/index.vue 130 ●●●●● patch | view | raw | blame | history
src/components/map/index.vue 38 ●●●● patch | view | raw | blame | history
src/components/orgNavBar/index.vue 5 ●●●●● patch | view | raw | blame | history
src/components/serviceNavBar/index.vue 32 ●●●● patch | view | raw | blame | history
src/pcLayout/index.vue 4 ●●●● patch | view | raw | blame | history
src/pcviews/campusnavi/index.vue 33 ●●●● patch | view | raw | blame | history
src/pcviews/mapnav/index.vue 14 ●●●● patch | view | raw | blame | history
src/pcviews/service/transfer.vue 8 ●●●●● patch | view | raw | blame | history
src/router/page/index.js 16 ●●●● patch | view | raw | blame | history
src/styles/divforms/popup.scss 4 ●●● patch | view | raw | blame | history
src/styles/pcpage/element-ui.scss 41 ●●●● patch | view | raw | blame | history
public/img/icon/service-qcj.png
public/img/icon/xndh.png
src/api/pc/leftNav/index.js
New file
@@ -0,0 +1,48 @@
/*
 * @Author: Morpheus
 * @Date: 2021-05-09 15:17:44
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-12-22 16:01:37
 */
// 右侧nav栏相关
import request from '@/router/axios'
export const getComeList = (params) => {
    return request({
        url: '/blade-door/door/selectDoor',
        method: 'get',
        params: params
    })
}
export const getParkList = (params) => {
    return request({
        url: '/blade-parking/parking/selectPark',
        method: 'get',
        params: params
    })
}
export const getAEDkList = (params) => {
    return request({
        url: '/blade-aed/aed/selectAed',
        method: 'get',
        params: params
    })
}
export const getSceneList = (params) => {
    return request({
        url: '/blade-architecture/architecture/selectArch',
        method: 'get',
        params: params
    })
}
export const getTagList = (params) => {
    return request({
        url: '/blade-architecture/architecture/selectArchALL',
        method: 'get',
        params: params
    })
}
src/api/pc/service/index.js
@@ -2,7 +2,7 @@
 * @Author: Morpheus
 * @Date: 2021-05-09 15:17:44
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-12-21 09:59:43
 * @Last Modified time: 2021-12-22 13:44:26
 */
// 校区
import request from '@/router/axios'
@@ -55,6 +55,14 @@
    })
}
export const getTransferList = (params) => {
    return request({
        url: '/blade-transference/transference/list',
        method: 'get',
        params: params
    })
}
export const getCopyList = (params) => {
    return request({
        url: '/blade-duplicate/duplicate/list',
@@ -94,3 +102,11 @@
        params: params
    })
}
export const getAlleywayList = (params) => {
    return request({
        url: '/blade-door/door/list',
        method: 'get',
        params: params
    })
}
src/components/arcNavBar/index.vue
@@ -224,8 +224,8 @@
    width: 322px;
    height: auto;
    border-radius: 8px;
    top: 24%;
    left: 20%;
    top: 16%;
    left: 5%;
    background-color: transparent;
    z-index: 999;
    font-size: 14px;
@@ -271,6 +271,7 @@
                margin: auto;
                width: 14px;
                height: 14px;
                cursor: pointer;
            }
        }
        .move {
src/components/campusNav/index.vue
@@ -6,7 +6,7 @@
             :class="{'move': moveFlag}">
            <div class="title">
                <img class="icon deblurring"
                     src="/img/icon/jg.png"
                     src="/img/icon/xndh.png"
                     alt="">
                <span>
                    校内导航
@@ -51,7 +51,7 @@
                </div>
                <div>
                    <el-button @click="startNavigation"
                               type="danger">导航</el-button>
                               type="primary">导航</el-button>
                </div>
            </div>
        </div>
@@ -258,7 +258,7 @@
        width: 100%;
        height: 36px;
        line-height: 36px;
        background-color: #020c17;
        background-color: #2196f3;
        .title {
            padding-left: 10px;
@@ -286,6 +286,7 @@
            margin: auto;
            width: 14px;
            height: 14px;
            cursor: pointer;
        }
    }
src/components/leftNav/index.vue
@@ -14,6 +14,8 @@
<script>
import { getAEDkList, getParkList, getComeList, getSceneList, getTagList } from '@/api/pc/leftNav/index'
export default {
    name: 'leftNav',
    computed: {},
@@ -98,8 +100,8 @@
        generatePosition (num) {
            const list = []
            for (let i = 0; i < num; i++) {
                const lng = 115.87186406 + Math.random() * 0.5
                const lat = 28.74449337 + Math.random() * 0.5
                const lng = 115.86271917 + Math.random() * 0.01
                const lat = 28.73615593 + Math.random() * 0.02
                list.push(new this.DC.Position(lng, lat, 0))
            }
            return list
@@ -115,6 +117,7 @@
            }
        },
        initialize (viewer) {
            var that = this
            viewer.scene.globe.depthTestAgainstTerrain = false
            this.viewer = viewer
            this.tagLayer = new this.DC.HtmlLayer('tagLayer')
@@ -132,25 +135,27 @@
            this.comeLayer = new this.DC.VectorLayer('comeLayer')
            viewer.addLayer(this.comeLayer)
            const positions1 = this.generatePosition(50)
            positions1.forEach((item, index) => {
                const divIcon = new this.DC.DivIcon(
                    item,
                    `
            getTagList().then(res => {
                res.data.data.forEach(item => {
                    const divIcon = new this.DC.DivIcon(
                        new that.DC.Position(Number(item.jd), Number(item.wd), 0),
                        `
                        <div class="tag-entitys-box">
                            <div class="tag-content">
                                南门口
                                ${item.mechanismname}
                            </div>
                            <div class="tag-angle-content">
                                <img src="https://map.hit.edu.cn/images/tarrow_xq.png">
                            </div>
                        </div>
                    `
                )
                this.tagLayer.addOverlay(divIcon)
                    )
                    this.tagLayer.addOverlay(divIcon)
                })
                this.tagLayer.show = false
            })
            const positions2 = this.generatePosition(50)
            const positions2 = this.generatePosition(5)
            positions2.forEach((item, index) => {
                const divIcon = new this.DC.DivIcon(
                    item,
@@ -168,40 +173,47 @@
                this.wayLayer.addOverlay(divIcon)
            })
            const positions3 = this.generatePosition(50)
            positions3.forEach(item => {
                const billboard = new this.DC.Billboard(item, '/img/leftnav/map-panorama.png')
                billboard.size = [16, 16]
                this.sceneLayer.addOverlay(billboard)
            })
            const positions4 = this.generatePosition(10)
            positions4.forEach((item, index) => {
                const label = new this.DC.Label(item, '建筑AED')
                label.setStyle({
                    fillColor: this.DC.Color.ORANGERED,
                    font: '10px sans-serif',
                    pixelOffset: { x: 0, y: -16 }
            getSceneList().then(res => {
                res.data.data.forEach(item => {
                    const billboard = new this.DC.Billboard(new that.DC.Position(Number(item.jd), Number(item.wd), 0), '/img/leftnav/map-panorama.png')
                    billboard.size = [20, 20]
                    this.sceneLayer.addOverlay(billboard)
                })
                this.aedLayer.addOverlay(label)
                const billboard = new this.DC.Billboard(item, '/img/leftnav/map-aed.png')
                billboard.size = [16, 16]
                this.aedLayer.addOverlay(billboard)
                this.sceneLayer.show = false
            })
            const positions5 = this.generatePosition(120)
            positions5.forEach((item, index) => {
                const divIcon = new this.DC.DivIcon(
                    item,
                    `
            getAEDkList().then(res => {
                res.data.data.forEach(item => {
                    const label = new this.DC.Label(new that.DC.Position(Number(item.jd), Number(item.wd), 0), item.mechanismname)
                    label.setStyle({
                        fillColor: this.DC.Color.CRIMSON,
                        style: that.DC.Namespace.Cesium.LabelStyle.FILL_AND_OUTLINE,
                        outlineColor: that.DC.Color.WHITE, // 边框颜色
                        outlineWidth: 8, // 边框大小,
                        font: '14px sans-serif',
                        pixelOffset: { x: 0, y: -24 }
                    })
                    this.aedLayer.addOverlay(label)
                    const billboard = new this.DC.Billboard(new that.DC.Position(Number(item.jd), Number(item.wd), 0), '/img/leftnav/map-aed.png')
                    billboard.size = [20, 20]
                    this.aedLayer.addOverlay(billboard)
                })
                this.aedLayer.show = false
            })
            getParkList().then(res => {
                res.data.data.forEach(item => {
                    const divIcon = new this.DC.DivIcon(
                        new that.DC.Position(Number(item.jd), Number(item.wd), 0),
                        `
                        <div class="park-entitys-box">
                            <div class="park-title" alt="校外街路侧停车场">
                            <div class="park-title" alt="${item.mechanismname}">
                            </div>
                            <div class="park-sign-box">
                                <div>
                                    <img src="https://map.hit.edu.cn/images/p-biao.png" width="14" height="14" alt="校外街路侧停车场" title="校外街路侧停车场">
                                    <img src="https://map.hit.edu.cn/images/p-biao.png" width="14" height="14" alt="${item.mechanismname}" title="${item.mechanismname}">
                                </div>
                                <div>
                                    <img src="https://map.hit.edu.cn/images/roadsign.png" width="5" height="21">
@@ -209,34 +221,36 @@
                            </div>
                        </div>
                    `
                )
                this.parkLayer.addOverlay(divIcon)
                    )
                    this.parkLayer.addOverlay(divIcon)
                })
                this.parkLayer.show = false
            })
            const positions6 = this.generatePosition(10)
            positions6.forEach((item, index) => {
                const label = new this.DC.Label(item, '数字视觉')
                label.setStyle({
                    fillColor: this.DC.Color.PURPLE,
                    outlineColor: this.DC.Color.WHITE, // 边框颜色
                    outlineWidth: 2, // 边框大小,
                    font: '10px sans-serif',
                    pixelOffset: { x: 0, y: -16 }
            getComeList().then(res => {
                res.data.data.forEach(item => {
                    const label = new that.DC.Label(new that.DC.Position(Number(item.jd), Number(item.wd), 0), item.mechanismname)
                    label.setStyle({
                        fillColor: that.DC.Color.FUCHSIA,
                        style: that.DC.Namespace.Cesium.LabelStyle.FILL_AND_OUTLINE,
                        outlineColor: that.DC.Color.WHITE, // 边框颜色
                        outlineWidth: 8, // 边框大小,
                        font: '14px sans-serif',
                        pixelOffset: { x: 0, y: -24 }
                    })
                    that.comeLayer.addOverlay(label)
                    const billboard = new that.DC.Billboard(new that.DC.Position(Number(item.jd), Number(item.wd), 0), '/img/leftnav/map-activity.png')
                    billboard.size = [20, 20]
                    that.comeLayer.addOverlay(billboard)
                })
                this.comeLayer.addOverlay(label)
                const billboard = new this.DC.Billboard(item, '/img/leftnav/map-activity.png')
                billboard.size = [16, 16]
                this.comeLayer.addOverlay(billboard)
                this.comeLayer.show = false
            })
            this.tagLayer.show = false
            this.wayLayer.show = false
            this.sceneLayer.show = false
            this.aedLayer.show = false
            this.parkLayer.show = false
            this.comeLayer.show = false
        }
    }
}
src/components/map/index.vue
@@ -150,25 +150,25 @@
                name: '电子'
            })
            // eslint-disable-next-line camelcase
            const baselayer_street = that.DC.ImageryLayerFactory.createArcGisImageryLayer({
                url:
                    'http://services.arcgisonline.com/arcgis/rest/services/World_Physical_Map/MapServer'
            })
            viewer.addBaseLayer(baselayer_street, {
                iconUrl: 'examples/images/icon/ter.png',
                name: '地形'
            })
            // // eslint-disable-next-line camelcase
            // const baselayer_street = that.DC.ImageryLayerFactory.createArcGisImageryLayer({
            //     url:
            //         'http://services.arcgisonline.com/arcgis/rest/services/World_Physical_Map/MapServer'
            // })
            // viewer.addBaseLayer(baselayer_street, {
            //     iconUrl: 'examples/images/icon/ter.png',
            //     name: '地形'
            // })
            // eslint-disable-next-line camelcase
            const baselayer_ter = that.DC.ImageryLayerFactory.createArcGisImageryLayer({
                url:
                    'http://services.arcgisonline.com/arcgis/rest/services/World_Terrain_Base/MapServer'
            })
            viewer.addBaseLayer(baselayer_ter, {
                iconUrl: 'examples/images/icon/ter.png',
                name: '地形'
            })
            // // eslint-disable-next-line camelcase
            // const baselayer_ter = that.DC.ImageryLayerFactory.createArcGisImageryLayer({
            //     url:
            //         'http://services.arcgisonline.com/arcgis/rest/services/World_Terrain_Base/MapServer'
            // })
            // viewer.addBaseLayer(baselayer_ter, {
            //     iconUrl: 'examples/images/icon/ter.png',
            //     name: '地形'
            // })
            // const tilesetLayer = new that.DC.TilesetLayer('tilesetLayer')
            // viewer.addLayer(tilesetLayer)
@@ -246,7 +246,7 @@
            )
            wall.setStyle({
                material: new that.DC.WallTrailMaterialProperty({
                    color: that.DC.Color.GREEN,
                    color: that.DC.Color.DEEPSKYBLUE,
                    speed: 4
                })
            })
src/components/orgNavBar/index.vue
@@ -169,8 +169,8 @@
    width: 322px;
    height: auto;
    border-radius: 8px;
    top: 24%;
    left: 20%;
    top: 16%;
    left: 5%;
    background-color: transparent;
    z-index: 999;
    font-size: 14px;
@@ -220,6 +220,7 @@
                margin: auto;
                width: 14px;
                height: 14px;
                cursor: pointer;
            }
        }
src/components/serviceNavBar/index.vue
@@ -46,8 +46,11 @@
<script>
import { mapGetters } from 'vuex'
import {
    getList, getCanteenList, getSupermarketList, getMedicalList,
    getExpressList, getShowersList, getCopyList, getBankList, getAedList, getServiceList, getParkList
    getList, getCanteenList, getSupermarketList,
    getMedicalList, getExpressList, getShowersList,
    getTransferList, getCopyList, getBankList,
    getAedList, getServiceList, getParkList,
    getAlleywayList
} from '@/api/pc/service/index'
export default {
@@ -214,6 +217,16 @@
                        })
                    })
                })
            } else if (this.arcCode == 6) {
                getTransferList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
                    })
                })
            } else if (this.arcCode == 7) {
                getCopyList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
@@ -256,6 +269,16 @@
                })
            } else if (this.arcCode == 11) {
                getParkList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
                            icon: '/img/navicon/tag.png',
                            details: item
                        })
                    })
                })
            } else if (this.arcCode == 12) {
                getAlleywayList({ campus: campus }).then(res => {
                    res.data.data.records.forEach(item => {
                        this.itemNavList.push({
                            navTitle: item.mechanismname,
@@ -313,8 +336,8 @@
    width: 322px;
    height: auto;
    border-radius: 8px;
    top: 24%;
    left: 20%;
    top: 16%;
    left: 5%;
    background-color: transparent;
    z-index: 999;
    font-size: 14px;
@@ -360,6 +383,7 @@
                margin: auto;
                width: 14px;
                height: 14px;
                cursor: pointer;
            }
        }
        .move {
src/pcLayout/index.vue
@@ -43,7 +43,7 @@
                        <el-menu-item index="/pcLayout/default/service/medical">校内医疗</el-menu-item>
                        <el-menu-item index="/pcLayout/default/service/express">邮寄快递</el-menu-item>
                        <el-menu-item index="/pcLayout/default/service/showers">学生浴室</el-menu-item>
                        <!-- <el-menu-item index="/pcLayout/default/service/transfer">圈存机</el-menu-item> -->
                        <el-menu-item index="/pcLayout/default/service/transfer">圈存机</el-menu-item>
                        <el-menu-item index="/pcLayout/default/service/copy">打字复印</el-menu-item>
                        <el-menu-item index="/pcLayout/default/service/bank">银行网点</el-menu-item>
                        <el-menu-item index="/pcLayout/default/service/aed">AED</el-menu-item>
@@ -63,7 +63,7 @@
                    <el-submenu index="tool">
                        <template slot="title"> <i class='custom-icon menu-tool'></i> 工具</template>
                        <el-menu-item index="/pcLayout/default/tool/download">地图下载</el-menu-item>
                        <el-menu-item index="/pcLayout/default/tool/sign">地图标记</el-menu-item>
                        <!-- <el-menu-item index="/pcLayout/default/tool/sign">地图标记</el-menu-item> -->
                        <el-menu-item index="/pcLayout/default/tool/ranging">地图测距</el-menu-item>
                    </el-submenu>
src/pcviews/campusnavi/index.vue
@@ -1,15 +1,38 @@
<template>
  <div>
      校园导航
  </div>
    <div>
        <campusNav ref="campusNavRoute"
                   :comeName="comeName"
                   :getToName="getToName"
                   v-show="campusNavFlag" />
    </div>
</template>
<script>
export default {
    data () {
        return {
            campusNavFlag: true,
            comeName: '',
            getToName: ''
        }
    },
    methods: {
        closeCampusNav () {
            this.campusNavFlag = false
            this.$refs.campusNavRoute.clearLayer()
            this.$store.commit('SET_STARTINGPOINT', null)
            this.$store.commit('SET_TERMINUS', null)
            this.comeName = ''
            this.getToName = ''
            this.$store.dispatch('delVisitedViews', this.$route)
            this.$router.push('/pcLayout/default')
        }
    },
    destroyed () {
        this.campusNavFlag = false
    }
}
</script>
<style>
</style>
src/pcviews/mapnav/index.vue
@@ -1,7 +1,14 @@
/*
 * @Author: Morpheus
 * @Name:   地图导览
 * @Date: 2021-12-21 17:30:17
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-12-21 17:33:47
 */
<template>
  <div>
      地图导览
  </div>
    <div>
    </div>
</template>
<script>
@@ -11,5 +18,4 @@
</script>
<style>
</style>
src/pcviews/service/transfer.vue
@@ -3,12 +3,13 @@
 * @Name: 圈存机
 * @Date: 2021-11-15 17:14:47
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-12-21 11:42:21
 * @Last Modified time: 2021-12-22 11:21:20
 */
<template>
    <div>
        <service-nav-bar :title="title"
                         :arcCode="code"></service-nav-bar>
                         :arcCode="code"
                         :headerLog="headerLog"></service-nav-bar>
    </div>
</template>
@@ -17,7 +18,8 @@
    data () {
        return {
            title: '圈存机',
            code: 6
            code: 6,
            headerLog: '/img/icon/service-qcj.png'
        }
    },
    created () {
src/router/page/index.js
@@ -2,7 +2,7 @@
 * @Author: Morpheus
 * @Date: 2021-04-30 14:12:09
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-12-21 11:42:32
 * @Last Modified time: 2021-12-22 10:17:37
 */
import Vue from 'vue'
@@ -166,13 +166,13 @@
                                title: '学生浴室'
                            }
                        },
                        // {
                        //     path: 'transfer',
                        //     component: resolve => require(['../../pcviews/service/transfer.vue'], resolve),
                        //     meta: {
                        //         title: '圈存机'
                        //     }
                        // },
                        {
                            path: 'transfer',
                            component: resolve => require(['../../pcviews/service/transfer.vue'], resolve),
                            meta: {
                                title: '圈存机'
                            }
                        },
                        {
                            path: 'copy',
                            component: resolve => require(['../../pcviews/service/copy.vue'], resolve),
src/styles/divforms/popup.scss
@@ -15,7 +15,7 @@
            list-style: none;
            font-size: .875rem;
            text-align: center;
            border: 1px solid #ffc107;
            border: 1px solid rgb(0, 208, 255);
            border-radius: 15px;
            cursor: pointer;
@@ -161,6 +161,7 @@
            margin: auto;
            width: 20px;
            height: 20px;
            cursor: pointer;
        }
        .close-box {
@@ -172,6 +173,7 @@
            margin: auto;
            width: 16px;
            height: 16px;
            cursor: pointer;
        }
    }
}
src/styles/pcpage/element-ui.scss
@@ -7,24 +7,53 @@
        padding: 0px !important;
        background: #fff !important;
        border-radius: 2px;
        .el-menu-item {
            color: #333 !important;
            color: #fff !important;
            border-bottom: 1px solid #e5e5e5 !important;
            background: #2196f3 !important;
        }
        .el-menu-item:last-child {
            border-bottom: none !important;
        }
        .el-menu-item:hover {
            background: rgb(235, 235, 235) !important;
            background: #1A78C2 !important;
        }
    }
}
.el-header {
    .el-menu {
        .el-menu-item {
            font-size: 14px !important;
.layout-container {
    .el-container {
        .el-header {
            position: fixed;
            top: 0;
            left: 0;
            height: 60px;
            width: 100%;
            z-index: 99999;
            .el-menu {
                .el-menu-item {
                    font-size: 14px !important;
                }
            }
        }
        .el-main {
            position: fixed;
            top: 60px;
            left: 0;
            height: calc(100% - 60px);
            width: 100%;
            z-index: 10;
        }
    }
}