1
shuishen
2022-11-18 37a4a03e1ddef4f66904dccee54b684e73e9a3b2
src/components/campusNav/index.vue
@@ -2,10 +2,10 @@
    <public-box class="campus-nav-box">
        <template slot="public-box-header">
            <div class="title">
                <img class="icon deblurring" src="/zhxy/img/icon/xndh.png" alt />
                <img class="icon deblurring" src="/zhjg/img/icon/xndh.png" alt />
                <span>校区内导航</span>
            </div>
            <img class="close deblurring" src="/zhxy/img/navicon/close.png" alt @click="closeModel" />
            <img class="close deblurring" src="/zhjg/img/navicon/close.png" alt @click="closeModel" />
        </template>
        <template slot="public-box-content">
            <div class="tab">
@@ -21,7 +21,7 @@
                </ul>
                <v-else>
                    <ul>
                        <li>智慧校园欢迎您!</li>
                        <li>江西经济管理干部学院欢迎您!</li>
                    </ul>
                </v-else>
            </div>
@@ -35,11 +35,9 @@
                        </el-input>
                        <div v-show="toNameShow" class="toname-value-box">
                            <ul>
                                <li
                                    v-for="(item, index) in toNameList"
                                    :key="index"
                                    @click="originChange(item)"
                                >{{ item.mechanismname }}</li>
                                <li v-for="(item, index) in toNameList" :key="index" @click="originChange(item)">{{
                                        item.mechanismname
                                }}</li>
                            </ul>
                        </div>
                    </div>
@@ -51,11 +49,9 @@
                        </el-input>
                        <div v-show="comeNameShow" class="comename-value-box">
                            <ul>
                                <li
                                    v-for="(item, index) in comeNameList"
                                    :key="index"
                                    @click="terminusChange(item)"
                                >{{ item.mechanismname }}</li>
                                <li v-for="(item, index) in comeNameList" :key="index" @click="terminusChange(item)">{{
                                        item.mechanismname
                                }}</li>
                            </ul>
                        </div>
                    </div>
@@ -67,7 +63,7 @@
            <div class="path-box" v-show="pathBoxShow">
                <ul>
                    <li v-for="(item, index) in pathBoxList" :key="index">{{item.instruction}}</li>
                    <li v-for="(item, index) in pathBoxList" :key="index">{{ item.instruction }}</li>
                </ul>
            </div>
        </template>
@@ -183,7 +179,7 @@
                            Number(this.terminus[1]),
                            Number(this.terminus[2])
                        ),
                        '/zhxy/img/navicon/end.png'
                        '/zhjg/img/navicon/end.png'
                    )
                    CamPusNavLayer.campusEndLayer.addOverlay(endEntity)
                } else if (val == 'end') {
@@ -202,7 +198,7 @@
                            Number(this.startingPoint[1]),
                            Number(this.startingPoint[2])
                        ),
                        '/zhxy/img/navicon/start.png'
                        '/zhjg/img/navicon/start.png'
                    )
                    CamPusNavLayer.campusStartLayer.addOverlay(startEntity)
                }
@@ -256,7 +252,7 @@
                            Number(lnglat[1]),
                            Number(0)
                        ),
                        '/zhxy/img/navicon/start.png'
                        '/zhjg/img/navicon/start.png'
                    )
                    CamPusNavLayer.campusStartLayer.addOverlay(startEntity)
                } else if (that.butChouse == 'end') {
@@ -270,7 +266,7 @@
                            Number(lnglat[1]),
                            Number(0)
                        ),
                        '/zhxy/img/navicon/end.png'
                        '/zhjg/img/navicon/end.png'
                    )
                    CamPusNavLayer.campusEndLayer.addOverlay(endEntity)
                }
@@ -362,7 +358,7 @@
                    Number(this.startingPoint[1]),
                    Number(this.startingPoint[2])
                ),
                '/zhxy/img/navicon/start.png'
                '/zhjg/img/navicon/start.png'
            )
            CamPusNavLayer.campusRouteLayer.addOverlay(startEntity)
            // var end = global.DC.Transform.transformWGS84ToCartesian()
@@ -372,7 +368,7 @@
                    Number(this.terminus[1]),
                    Number(this.terminus[2])
                ),
                '/zhxy/img/navicon/end.png'
                '/zhjg/img/navicon/end.png'
            )
            CamPusNavLayer.campusRouteLayer.addOverlay(endEntity)
@@ -437,13 +433,7 @@
                            const polyline = new global.DC.Polyline(routes)
                            polyline.setStyle({
                                width: 6,
                                arcType: true,
                                material: new global.DC.PolylineImageTrailMaterialProperty({
                                    color: global.DC.Namespace.Cesium.Color.fromBytes(10, 255, 10),
                                    speed: 60,
                                    image: '/zhxy/img/icon/right.png',
                                    repeat: { x: 320, y: 1 }
                                }),
                                material: global.DC.Color.RED,
                                clampToGround: true
                            })
@@ -525,13 +515,7 @@
                            const polyline = new global.DC.Polyline(routes)
                            polyline.setStyle({
                                width: 6,
                                arcType: true,
                                material: new global.DC.PolylineImageTrailMaterialProperty({
                                    color: global.DC.Namespace.Cesium.Color.fromBytes(10, 255, 10),
                                    speed: 60,
                                    image: '/zhxy/img/icon/right.png',
                                    repeat: { x: 320, y: 1 }
                                }),
                                material: global.DC.Color.RED,
                                clampToGround: true
                            })
@@ -579,9 +563,10 @@
            } else {
                if (this.navigationWay == '步行') {
                    axios
                        .get('https://dev.jxpskj.com:8023/arcgis/rest/services/shidalw1103/NAServer/%E8%B7%AF%E5%BE%84/solve', {
                        .get('https://dev.jxpskj.com:8023/arcgis/rest/services/jglw/NAServer/%E8%B7%AF%E5%BE%84/solve', {
                            params: {
                                stops: { features: [{ geometry: { x: startLog, y: startLat } }, { geometry: { x: endLog, y: endLat } }] },
                                returnDirections: false,
                                returnRoutes: true,
                                f: 'json'
                            }
@@ -609,13 +594,7 @@
                            const polyline = new global.DC.Polyline(routes)
                            polyline.setStyle({
                                width: 6,
                                arcType: true,
                                material: new global.DC.PolylineImageTrailMaterialProperty({
                                    color: global.DC.Namespace.Cesium.Color.fromBytes(10, 255, 10),
                                    speed: 60,
                                    image: '/zhxy/img/icon/right.png',
                                    repeat: { x: 320, y: 1 }
                                }),
                                material: global.DC.Color.RED,
                                clampToGround: true
                            })
@@ -660,10 +639,11 @@
                        })
                } else {
                    axios
                        .get('https://dev.jxpskj.com:8023/arcgis/rest/services/shidalw1103/NAServer/%E8%B7%AF%E5%BE%84/solve', {
                        .get('https://dev.jxpskj.com:8023/arcgis/rest/services/jglw/NAServer/%E8%B7%AF%E5%BE%84/solve', {
                            params: {
                                //    stops: {features:[{geometry:{x:116.026051,y:28.686474}},{geometry:{x:116.024876,y:28.678025}}]},
                                stops: { features: [{ geometry: { x: startLog, y: startLat } }, { geometry: { x: endLog, y: endLat } }] },
                                returnDirections: false,
                                returnRoutes: true,
                                f: 'json'
                            }
@@ -679,13 +659,7 @@
                            const polyline = new global.DC.Polyline(routes)
                            polyline.setStyle({
                                width: 6,
                                arcType: true,
                                material: new global.DC.PolylineImageTrailMaterialProperty({
                                    color: global.DC.Namespace.Cesium.Color.fromBytes(10, 255, 10),
                                    speed: 60,
                                    image: '/zhxy/img/icon/right.png',
                                    repeat: { x: 320, y: 1 }
                                }),
                                material: global.DC.Color.RED,
                                clampToGround: true
                            })
@@ -850,4 +824,6 @@
}
</script>
<style lang="scss" scope></style>
<style lang="scss" scope>
</style>