From a22aa1086eeef39a26cc161326ce09cd183185ea Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Fri, 04 Mar 2022 15:57:47 +0800
Subject: [PATCH] 3.3 1.自定义标签,退出后自动清除 2.自定义标签,转换二维码的数据格式ok,移动端对接二维码ok, 3.自定义标签点击移动到指定位置 ok 4.面板自适应高度 4.更换定位依赖,自定义标签扫码入移动端可以定位并显示路线
---
src/components/map/components/dimension.vue | 2159 ++++------
src/components/mobilePopupOurAfter/index.vue | 50
src/pcviews/service/aed.vue | 99
src/pcviews/arc/venue.vue | 79
src/store/modules/mobilePosition.js | 248
src/pcviews/arc/edifact.vue | 79
src/components/mobilemap/index.vue | 90
src/pcviews/service/medical.vue | 99
src/components/map/components/campusBuildingSearch copy.vue | 814 ++--
src/store/getters.js | 12
src/pcviews/arc/teaching.vue | 79
src/pcviews/tool/ranging.vue | 85
src/pcLayout/index.vue | 212
src/pcviews/service/alleyway.vue | 99
src/pcviews/service/showers.vue | 99
src/store/modules/mobiles/urlParameter.js | 74
src/components/map/index.vue | 752 +-
src/components/serviceNavBar/index.vue | 353 +
src/pcviews/orgnav/teaching.vue | 132
src/pcviews/orgnav/rest.vue | 132
src/components/mobilePopupOur/index.vue | 16
src/pcviews/orgnav/masses.vue | 132
src/styles/pcpage/campus-nav.scss | 16
src/pcviews/arc/culture.vue | 79
src/mobileviews/home/index.vue | 3
src/pcviews/orgnav/ofc.vue | 132
src/components/campusNav/index.vue | 1022 +++--
src/pcviews/specialmap/celebrate.vue | 91
src/pcviews/service/service.vue | 99
src/pcviews/arc/dorm.vue | 79
src/pcviews/tool/area.vue | 93
src/pcviews/service/bank.vue | 99
src/components/mobilePopupOurOnce/index.vue | 6
src/pcviews/orgnav/directly.vue | 132
src/pcviews/service/supermarket.vue | 99
src/pcviews/arc/rest.vue | 79
src/components/leftNav/index.vue | 679 +-
src/components/map/components/mapPopup.vue | 69
src/pcviews/service/park.vue | 99
src/router/page/index.js | 20
src/components/map/components/campusBuildingSearch.vue | 806 ++--
src/store/modules/popupParams.js | 199
public/index.html | 12
src/pcviews/service/transfer.vue | 99
src/pcviews/service/canteen.vue | 99
src/router/axios.js | 8
src/store/modules/mobile.js | 176
src/pcviews/service/copy.vue | 99
src/pcviews/arc/family.vue | 79
src/pcviews/specialmap/welcome.vue | 906 ++--
src/pcviews/campusnav/index.vue | 12
package.json | 4
src/pcviews/service/express.vue | 99
src/App.vue | 81
src/pcviews/tool/sign.vue | 51
55 files changed, 6,072 insertions(+), 5,448 deletions(-)
diff --git a/package.json b/package.json
index b33568a..d50143b 100644
--- a/package.json
+++ b/package.json
@@ -8,6 +8,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
+ "@amap/amap-vue": "^1.4.0",
"@dvgis/dc-sdk": "^2.5.0",
"axios": "^0.22.0",
"core-js": "^3.6.5",
@@ -20,6 +21,7 @@
"vuex": "^3.6.2"
},
"devDependencies": {
+ "@amap/amap-jsapi-loader": "^1.0.1",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
@@ -63,4 +65,4 @@
"last 2 versions",
"not dead"
]
-}
+}
\ No newline at end of file
diff --git a/public/index.html b/public/index.html
index 173275e..dc5f88b 100644
--- a/public/index.html
+++ b/public/index.html
@@ -6,18 +6,24 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
- <title>智慧社区大数据三维可视化平台</title>
+ <title>智慧校区大数据三维可视化平台</title>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<!-- 高德定位 -->
- <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=4b3e1db3211054ce5b466407cbb9d221">
+ <!-- <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=9c4b1a0ce88821775605e726073c52b5"> -->
</script>
<!-- ip -->
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<!-- 语音播放 -->
<!-- <script src="http://cdn.javanx.cn/wp-content/themes/lensnews2.2/js/jquery.min.js?ver=3.1.1"></script> -->
<!-- 高德地图路线规划 -->
- <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=4b3e1db3211054ce5b466407cbb9d221">
+ <!-- <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=4b3e1db3211054ce5b466407cbb9d221"></script> -->
+ <script type="text/javascript">
+ window._AMapSecurityConfig = {
+ securityJsCode: "92f88e76912e27c49f501f542a794a26",
+ }
</script>
+ <!-- <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=e664359e1c66f0f26476ac1c0884edad">
+ </script> -->
</head>
<body>
diff --git a/src/App.vue b/src/App.vue
index f7288bd..1ae163c 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -5,6 +5,7 @@
</template>
<script>
+import AMapLoader from "@amap/amap-jsapi-loader";
export default {
name: "App",
data() {
@@ -15,6 +16,7 @@
},
mounted() {
let that = this;
+
// console.log(frames, 789456);
// setInterval(function () {
// check();
@@ -39,15 +41,94 @@
// } catch (err) {}
// };
// check();
+ // console.log(this.getQueryString("data"), "window.location");
+ // var reg = new RegExp("(^|&)" + "data" + "=([^&]*)(&|$)");
+ let data = this.getQueryString("data");
+ // console.log(data);
+ try {
+ data = JSON.parse(data);
+ } catch (error) {}
+
+ this.$store.commit("set_urlParameterData", data); //传入数据
+
+ let d = {
+ methods: "goto",
+ jd: 125.11111,
+ wd: 25.555555,
+ };
+ // console.log(
+ // "http://192.168.0.222:8080/#/mobileLayout/default?data=" +
+ // JSON.stringify(d)
+ // );
if (this._isMobile()) {
// 手机端
this.$router.replace("/mobileLayout");
+
+ AMapLoader.load({
+ key: "9c4b1a0ce88821775605e726073c52b5", // 申请好的Web端开发者Key,首次调用 load 时必填
+ version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
+ plugins: [], //插件列表
+ })
+ .then((AMap) => {
+ console.log(AMap);
+ window.AMap = AMap;
+ // that.map = new AMap.Map("mymap", {
+ // center: [115.84414205551147, 28.678983439095823],
+ // zoom: 14,
+ // });
+
+ // this.map.on('touchmove', (e) => {
+ // console.log(e)
+ // })
+
+ // that.getLocationInfor(AMap, 115.84414205551147, 28.678983439095823);
+ // that.map.on("mapmove", () => {
+ // that.mouseMoveFlag = false;
+ // that.mouseMoveFlag = true;
+ // var currentCenter = that.map.getCenter();
+ // if (that.setime) {
+ // clearTimeout(that.setime);
+ // }
+ // that.setime = setTimeout(() => {
+ // that.getLocationInfor(AMap, currentCenter.lng, currentCenter.lat);
+ // clearTimeout(that.setime);
+ // that.setime = null;
+ // }, 200);
+ // });
+
+ // this.map.on('mousemove', (e) => {
+ // console.log(e)
+ // })
+ })
+ .catch((e) => {
+ console.log(e);
+ });
} else {
// pc端
this.$router.replace("/pcLayout");
}
},
methods: {
+ getQueryString(name) {
+ let inlength =
+ window.location.href.indexOf("?" + name + "=") + name.length + 2;
+ // console.log(inlength);
+ // console.log(window.location.href);
+ var r = window.location.href.slice(inlength);
+ if (r != null) return decodeURIComponent(r);
+ return null;
+ },
+ getQueryVariable(variable) {
+ var query = window.location.search.substring(1);
+ var vars = query.split("&");
+ for (var i = 0; i < vars.length; i++) {
+ var pair = vars[i].split("=");
+ if (pair[0] == variable) {
+ return pair[1];
+ }
+ }
+ return false;
+ },
_isMobile() {
const flag = navigator.userAgent.match(
/(phone|pad|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows phone)/i
diff --git a/src/components/campusNav/index.vue b/src/components/campusNav/index.vue
index 54ba0d4..cacac45 100644
--- a/src/components/campusNav/index.vue
+++ b/src/components/campusNav/index.vue
@@ -1,436 +1,654 @@
<template>
- <public-box class="campus-nav-box">
- <template slot="public-box-header">
- <div class="title">
- <img class="icon deblurring" src="/img/icon/xndh.png" alt />
- <span>社区内导航</span>
+ <public-box class="campus-nav-box">
+ <template slot="public-box-header">
+ <div class="title">
+ <img class="icon deblurring" src="/img/icon/xndh.png" alt />
+ <span>校区内导航</span>
+ </div>
+ <img class="close" src="/img/navicon/close.png" alt @click="closeModel" />
+ </template>
+ <template slot="public-box-content">
+ <div class="tab">
+ <ul>
+ <li @click="tabClick('步行')" :class="{ on: tabOneFlag }">
+ <i></i>
+ 步行
+ </li>
+ <li @click="tabClick('驾车')" :class="{ on: tabTwoFlag }">
+ <i></i>
+ 驾车
+ </li>
+ </ul>
+ </div>
+ <div class="container">
+ <div>
+ <div id="ToNameContainer">
+ <el-input
+ v-model="toNameText"
+ @input="toNameChange"
+ placeholder="起点……"
+ >
+ <template slot="prepend">
+ <i class="el-icon-location mydingwei" style="color: green"></i>
+ </template>
+ </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>
+ </ul>
</div>
- <img class="close" src="/img/navicon/close.png" alt @click="closeModel" />
- </template>
- <template slot="public-box-content">
- <div class="tab">
- <ul>
- <li @click="tabClick('步行')" :class="{on:tabOneFlag}">
- <i></i>
- 步行
- </li>
- <li @click="tabClick('驾车')" :class="{on:tabTwoFlag}">
- <i></i>
- 驾车
- </li>
- </ul>
+ </div>
+ <div id="ComeNameContainer">
+ <el-input
+ v-model="comeNameText"
+ @input="comeNameChange"
+ placeholder="终点……"
+ >
+ <template slot="prepend">
+ <i class="el-icon-location mydingwei" style="color: red"></i>
+ </template>
+ </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>
+ </ul>
</div>
- <div class="container">
- <div>
- <div id="ToNameContainer">
- <el-input v-model="toNameText" @input="toNameChange" placeholder="起点……">
- <template slot="prepend">
- <i class="el-icon-location" style="color: green;"></i>
- </template>
- </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>
- </ul>
- </div>
- </div>
- <div id="ComeNameContainer">
- <el-input v-model="comeNameText" @input="comeNameChange" placeholder="终点……">
- <template slot="prepend">
- <i class="el-icon-location" style="color: red;"></i>
- </template>
- </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>
- </ul>
- </div>
- </div>
- </div>
- <div>
- <el-button @click="startNavigation" type="primary">导航</el-button>
- </div>
- </div>
- </template>
- </public-box>
+ </div>
+ </div>
+ <div>
+ <el-button @click="startNavigation" type="primary">导航</el-button>
+ </div>
+ </div>
+ </template>
+ </public-box>
</template>
<script>
-import { mapGetters } from 'vuex'
-import { getSearchList } from '@/api/pc/public/search'
-import axios from 'axios'
+import { mapGetters } from "vuex";
+import { getSearchList } from "@/api/pc/public/search";
+import axios from "axios";
export default {
- name: 'campusNav',
- data () {
- return {
- tabOneFlag: true,
- tabTwoFlag: false,
- DC: null,
- navigationWay: '步行',
- routeLayer: null,
- toNameText: '',
- comeNameText: '',
- toNameList: [],
- comeNameList: [],
- toNameShow: false,
- comeNameShow: false
+ name: "campusNav",
+ data() {
+ return {
+ tabOneFlag: true,
+ tabTwoFlag: false,
+ DC: null,
+ navigationWay: "步行",
+ routeLayer: null,
+ toNameText: "",
+ comeNameText: "",
+ toNameList: [],
+ comeNameList: [],
+ toNameShow: false,
+ comeNameShow: false,
+ overChouse: false,
+ butChouse: "",
+ startLayer: null,
+ endLayer: null,
+
+ isOverRouter: false, //是否启用了导航
+ };
+ },
+ computed: {
+ ...mapGetters([
+ "viewer",
+ "twoOrThree",
+ // 起点
+ "startingPoint",
+ // 终点
+ "terminus",
+ // 出发名称
+ "getToName",
+ // 到达名称
+ "comeName",
+ // 点信息
+ "pointPosition",
+ "campusNavFlag",
+ ]),
+ },
+ watch: {
+ getToName: {
+ immediate: true,
+ handler(newCode, oldCode) {
+ this.toNameText = newCode;
+ console.log(newCode, "see");
+ },
+ },
+ comeName: {
+ immediate: true,
+ handler(newCode, oldCode) {
+ this.comeNameText = newCode;
+ console.log(newCode, "see");
+ },
+ },
+ campusNavFlag: {
+ immediate: true,
+ handler(newCode, oldCode) {
+ if (newCode == false) {
+ this.navigationWay = "步行";
+ this.tabOneFlag = true;
+ this.tabTwoFlag = false;
}
+ },
},
- computed: {
- ...mapGetters([
- 'viewer',
- 'twoOrThree',
- // 起点
- 'startingPoint',
- // 终点
- 'terminus',
- // 出发名称
- 'getToName',
- // 到达名称
- 'comeName',
- // 点信息
- 'pointPosition',
- 'campusNavFlag'
- ])
- },
- watch: {
- getToName: {
- immediate: true,
- handler (newCode, oldCode) {
- this.toNameText = newCode
- }
- },
- comeName: {
- immediate: true,
- handler (newCode, oldCode) {
- this.comeNameText = newCode
- }
- },
- campusNavFlag: {
- immediate: true,
- handler (newCode, oldCode) {
- if (newCode == false) {
- this.navigationWay = '步行'
- this.tabOneFlag = true
- this.tabTwoFlag = false
- }
- }
+ },
+ created() {
+ this.DC = global.DC;
+ },
+ mounted() {
+ let leftBut = document.querySelectorAll(".el-input-group__prepend");
+ leftBut[0].onclick = () => {
+ this.chouseDian("start");
+ };
+ leftBut[1].onclick = () => {
+ this.chouseDian("end");
+ };
+ },
+ methods: {
+ chouseDian(val) {
+ let that = this;
+
+ that.clearLayer(); //清除完成的导航
+ if (that.isOverRouter) {
+ //若是已经有导航,恢复未点击图标
+ if (val == "start") {
+ //初始化图标图层
+ if (this.endLayer == null) {
+ this.endLayer = new this.DC.VectorLayer("endLayer");
+ this.viewer.addLayer(this.endLayer);
+ } else {
+ this.endLayer.clear();
+ }
+ // console.log("baoliuend", "see");
+ that.$store.commit("SET_STARTINGPOINT", []);
+ const endEntity = new that.DC.Billboard(
+ new that.DC.Position(
+ Number(this.terminus[0]),
+ Number(this.terminus[1]),
+ Number(this.terminus[2])
+ ),
+ "/img/navicon/end.png"
+ );
+ that.endLayer.addOverlay(endEntity);
+ } else if (val == "end") {
+ //初始化图标图层
+ if (this.startLayer == null) {
+ this.startLayer = new this.DC.VectorLayer("startLayer");
+ this.viewer.addLayer(this.startLayer);
+ } else {
+ this.startLayer.clear();
+ }
+ // console.log("baoliustart", "see");
+ that.$store.commit("SET_TERMINUS", []);
+ const startEntity = new that.DC.Billboard(
+ new that.DC.Position(
+ Number(this.startingPoint[0]),
+ Number(this.startingPoint[1]),
+ Number(this.startingPoint[2])
+ ),
+ "/img/navicon/start.png"
+ );
+ that.startLayer.addOverlay(startEntity);
}
+ }
+
+ // console.log(val, "see1");
+ this.butChouse = val;
+ //关闭其他地图事件
+ that.$store.commit("set_closeMapClick", true);
+ //添加标记
+ let tooltip = that.viewer.tooltip;
+ tooltip.enable = true;
+ let title = "";
+ if (val == "start") {
+ title = "点击放置起点";
+ //初始化图标图层
+ if (this.startLayer == null) {
+ this.startLayer = new this.DC.VectorLayer("startLayer");
+ this.viewer.addLayer(this.startLayer);
+ } else {
+ this.startLayer.clear();
+ }
+ } else if (val == "end") {
+ title = "点击放置终点";
+ //初始化图标图层
+ if (this.endLayer == null) {
+ this.endLayer = new this.DC.VectorLayer("endLayer");
+ this.viewer.addLayer(this.endLayer);
+ } else {
+ this.endLayer.clear();
+ }
+ }
+ that.overChouse = false; //开启事件
+ // 地图选点
+ that.clicks = that.viewer.on(that.DC.MouseEventType.CLICK, (e) => {
+ if (that.overChouse) {
+ return;
+ }
+ let lnglat = [e.wgs84SurfacePosition.lng, e.wgs84SurfacePosition.lat];
+ // console.log(lnglat, "see11");
+ // console.log(that.butChouse, "see11");
+ //应用数据
+ if (that.butChouse == "start") {
+ that.toNameText = "自定义起点";
+ //传输坐标数据
+ that.$store.commit("SET_STARTINGPOINT", [...lnglat, 0]);
+ //起点
+ const startEntity = new that.DC.Billboard(
+ new that.DC.Position(
+ Number(lnglat[0]),
+ Number(lnglat[1]),
+ Number(0)
+ ),
+ "/img/navicon/start.png"
+ );
+ that.startLayer.addOverlay(startEntity);
+ } else if (that.butChouse == "end") {
+ that.comeNameText = "自定义终点";
+ //传输坐标数据
+ that.$store.commit("SET_TERMINUS", [...lnglat, 0]);
+ //终点
+ const endEntity = new that.DC.Billboard(
+ new that.DC.Position(
+ Number(lnglat[0]),
+ Number(lnglat[1]),
+ Number(0)
+ ),
+ "/img/navicon/end.png"
+ );
+ that.endLayer.addOverlay(endEntity);
+ }
+ title = "";
+ tooltip.enable = false;
+ that.overChouse = true; //关闭事件
+ //开启其他地图事件
+ that.$store.commit("set_closeMapClick", false);
+ });
+ that.moves = that.viewer.on(that.DC.MouseEventType.MOUSE_MOVE, (e) => {
+ if (that.overChouse) {
+ return;
+ }
+ // let lnglat = [e.wgs84SurfacePosition.lng, e.wgs84SurfacePosition.lat];
+ tooltip.showAt(e.windowPosition, title);
+ });
},
- created () {
- this.DC = global.DC
+ closeModel() {
+ if (this.$route.path.indexOf("/campusnavi") != -1) {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ }
+
+ this.toNameText = "";
+ this.toNameList = [];
+ this.toNameShow = false;
+ this.comeNameText = "";
+ this.comeNameList = [];
+ this.comeNameShow = false;
+ if (this.routeLayer != null) {
+ this.routeLayer.clear();
+ this.isOverRouter = false;
+ }
+ //清除自定义位置
+ if (this.startLayer != null) {
+ this.startLayer.clear();
+ // this.startLayer = null;
+ }
+ if (this.endLayer != null) {
+ this.endLayer.clear();
+ // this.endLayer = null;
+ }
+ this.$store.commit("SET_COMENAME", "");
+ this.$store.commit("SET_TERMINUS", null);
+ this.$store.commit("SET_GETTONAME", "");
+ this.$store.commit("SET_STARTINGPOINT", null);
+ this.$store.commit("SET_CAMPUSNAVFLAG", false);
},
- methods: {
- closeModel () {
- if (this.$route.path.indexOf('/campusnavi') != -1) {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
+
+ tabClick(param) {
+ this.navigationWay = param;
+ this.tabOneFlag = !this.tabOneFlag;
+ this.tabTwoFlag = !this.tabTwoFlag;
+ },
+
+ startNavigation() {
+ let that = this;
+ //清除自定义位置
+ if (this.startLayer != null) {
+ this.startLayer.clear();
+ // this.startLayer = null;
+ }
+ if (this.endLayer != null) {
+ this.endLayer.clear();
+ // this.endLayer = null;
+ }
+
+ if (this.routeLayer == null) {
+ this.routeLayer = new this.DC.VectorLayer("navigation");
+ this.viewer.addLayer(this.routeLayer);
+ } else {
+ this.routeLayer.clear();
+ }
+ if (this.startingPoint == null) {
+ this.$message("请输入起点!!!");
+ }
+ if (this.terminus == null) {
+ this.$message("请输入终点!!!");
+ }
+
+ // var start = this.DC.Transform.transformWGS84ToCartesian()
+ const startEntity = new this.DC.Billboard(
+ new this.DC.Position(
+ Number(this.startingPoint[0]),
+ Number(this.startingPoint[1]),
+ Number(this.startingPoint[2])
+ ),
+ "/img/navicon/start.png"
+ );
+ this.routeLayer.addOverlay(startEntity);
+ // var end = this.DC.Transform.transformWGS84ToCartesian()
+ const endEntity = new this.DC.Billboard(
+ new this.DC.Position(
+ Number(this.terminus[0]),
+ Number(this.terminus[1]),
+ Number(this.terminus[2])
+ ),
+ "/img/navicon/end.png"
+ );
+ this.routeLayer.addOverlay(endEntity);
+
+ var routes = "";
+
+ var startLog = Number(this.startingPoint[0]).toFixed(6);
+ var startLat = Number(this.startingPoint[1]).toFixed(6);
+ var endLog = Number(this.terminus[0]).toFixed(6);
+ var endLat = Number(this.terminus[1]).toFixed(6);
+
+ var origin = this.DC.CoordTransform.WGS84ToGCJ02(startLog, startLat);
+ var destination = this.DC.CoordTransform.WGS84ToGCJ02(endLog, endLat);
+
+ if (this.navigationWay == "步行") {
+ axios
+ .get("https://restapi.amap.com/v3/direction/walking", {
+ params: {
+ origin: `${origin[0].toFixed(6) + "," + origin[1].toFixed(6)}`,
+ destination: `${
+ destination[0].toFixed(6) + "," + destination[1].toFixed(6)
+ }`,
+ key: "4b3e1db3211054ce5b466407cbb9d221",
+ output: "json",
+ },
+ })
+ .then((res) => {
+ if (res.data.info == "OVER_DIRECTION_RANGE") {
+ this.$message({
+ message: "超出步行范围!",
+ type: "warning",
+ duration: 3000,
+ });
}
- this.toNameText = ''
- this.toNameList = []
- this.toNameShow = false
- this.comeNameText = ''
- this.comeNameList = []
- this.comeNameShow = false
- if (this.routeLayer != null) {
- this.routeLayer.clear()
- }
- this.$store.commit('SET_COMENAME', '')
- this.$store.commit('SET_TERMINUS', null)
- this.$store.commit('SET_GETTONAME', '')
- this.$store.commit('SET_STARTINGPOINT', null)
- this.$store.commit('SET_CAMPUSNAVFLAG', false)
- },
+ res.data.route.paths[0].steps.forEach((item) => {
+ item.polyline = item.polyline.split(";");
- tabClick (param) {
- this.navigationWay = param
- this.tabOneFlag = !this.tabOneFlag
- this.tabTwoFlag = !this.tabTwoFlag
- },
+ var lineArr = [];
- startNavigation () {
- if (this.routeLayer == null) {
- this.routeLayer = new this.DC.VectorLayer('navigation')
- this.viewer.addLayer(this.routeLayer)
+ item.polyline.forEach((it) => {
+ it = it.split(",");
+ lineArr.push(
+ this.DC.CoordTransform.GCJ02ToWGS84(it[0], it[1]).join(",")
+ );
+ });
+
+ lineArr = lineArr.join(";");
+
+ lineArr += ";";
+
+ routes += lineArr;
+ });
+
+ routes =
+ startLog + "," + startLat + ";" + routes + endLog + "," + endLat;
+
+ const polyline = new this.DC.Polyline(routes);
+ polyline.setStyle({
+ width: 3,
+ material: new this.DC.PolylineTrailMaterialProperty({
+ color: this.DC.Color.RED,
+ speed: 10,
+ }),
+ clampToGround: true,
+ });
+ this.routeLayer.addOverlay(polyline);
+ if (this.twoOrThree == "真三维") {
+ this.viewer.flyTo(this.routeLayer);
} else {
- this.routeLayer.clear()
+ var longitude = null;
+ var latitude = null;
+ startLog = Number(startLog);
+ endLog = Number(endLog);
+ if (startLog > endLog) {
+ longitude = (startLog - endLog) / 2 + endLog;
+ } else {
+ longitude = (endLog - startLog) / 2 + startLog;
+ }
+ startLat = Number(startLat);
+ endLat = Number(endLat);
+ if (startLat > endLat) {
+ latitude = (startLat - endLat) / 2 + endLat;
+ } else {
+ latitude = (endLat - startLat) / 2 + startLat;
+ }
+ that.isOverRouter = true;
+ this.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: this.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+ longitude,
+ latitude,
+ 600
+ ),
+ orientation: {
+ // 指向
+ heading: this.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: this.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
}
- if (this.startingPoint == null) {
- this.$message('请输入起点!!!')
- }
- if (this.terminus == null) {
- this.$message('请输入终点!!!')
- }
+ });
+ } else {
+ axios
+ .get("https://restapi.amap.com/v3/direction/driving", {
+ params: {
+ origin: `${origin[0].toFixed(6) + "," + origin[1].toFixed(6)}`,
+ destination: `${
+ destination[0].toFixed(6) + "," + destination[1].toFixed(6)
+ }`,
+ key: "4b3e1db3211054ce5b466407cbb9d221",
+ strategy: 2,
+ extensions: "all",
+ output: "json",
+ },
+ })
+ .then((res) => {
+ res.data.route.paths[0].steps.forEach((item) => {
+ item.polyline = item.polyline.split(";");
- // var start = this.DC.Transform.transformWGS84ToCartesian()
- const startEntity = new this.DC.Billboard(new this.DC.Position(Number(this.startingPoint[0]), Number(this.startingPoint[1]), Number(this.startingPoint[2])), '/img/navicon/start.png')
- this.routeLayer.addOverlay(startEntity)
- // var end = this.DC.Transform.transformWGS84ToCartesian()
- const endEntity = new this.DC.Billboard(new this.DC.Position(Number(this.terminus[0]), Number(this.terminus[1]), Number(this.terminus[2])), '/img/navicon/end.png')
- this.routeLayer.addOverlay(endEntity)
+ var lineArr = [];
- var routes = ''
+ item.polyline.forEach((it) => {
+ it = it.split(",");
+ lineArr.push(
+ this.DC.CoordTransform.GCJ02ToWGS84(it[0], it[1]).join(",")
+ );
+ });
- var startLog = Number(this.startingPoint[0]).toFixed(6)
- var startLat = Number(this.startingPoint[1]).toFixed(6)
- var endLog = Number(this.terminus[0]).toFixed(6)
- var endLat = Number(this.terminus[1]).toFixed(6)
+ lineArr = lineArr.join(";");
- var origin = this.DC.CoordTransform.WGS84ToGCJ02(startLog, startLat)
- var destination = this.DC.CoordTransform.WGS84ToGCJ02(endLog, endLat)
+ lineArr += ";";
- if (this.navigationWay == '步行') {
- axios.get('https://restapi.amap.com/v3/direction/walking', {
- params: {
- origin: `${origin[0].toFixed(6) + ',' + origin[1].toFixed(6)}`,
- destination: `${destination[0].toFixed(6) + ',' + destination[1].toFixed(6)}`,
- key: '4b3e1db3211054ce5b466407cbb9d221',
- output: 'json'
- }
- }).then(res => {
- if (res.data.info == 'OVER_DIRECTION_RANGE') {
- this.$message({
- message: '超出步行范围!',
- type: 'warning',
- duration: 3000
- })
- }
+ routes += lineArr;
+ });
- res.data.route.paths[0].steps.forEach(item => {
- item.polyline = item.polyline.split(';')
+ routes =
+ startLog + "," + startLat + ";" + routes + endLog + "," + endLat;
- var lineArr = []
+ const polyline = new this.DC.Polyline(routes);
+ polyline.setStyle({
+ width: 3,
+ material: new this.DC.PolylineTrailMaterialProperty({
+ color: this.DC.Color.RED,
+ speed: 10,
+ }),
+ clampToGround: true,
+ });
+ this.routeLayer.addOverlay(polyline);
- item.polyline.forEach(it => {
- it = it.split(',')
- lineArr.push(this.DC.CoordTransform.GCJ02ToWGS84(it[0], it[1]).join(','))
- })
-
- lineArr = lineArr.join(';')
-
- lineArr += ';'
-
- routes += lineArr
- })
-
- routes = startLog + ',' + startLat + ';' + routes + endLog + ',' + endLat
-
- const polyline = new this.DC.Polyline(routes)
- polyline.setStyle({
- width: 3,
- material: new this.DC.PolylineTrailMaterialProperty({
- color: this.DC.Color.RED,
- speed: 10
- }),
- clampToGround: true
- })
- this.routeLayer.addOverlay(polyline)
- if (this.twoOrThree == '真三维') {
- this.viewer.flyTo(this.routeLayer)
- } else {
- var longitude = null
- var latitude = null
- startLog = Number(startLog)
- endLog = Number(endLog)
- if (startLog > endLog) {
- longitude = (startLog - endLog) / 2 + endLog
- } else {
- longitude = (endLog - startLog) / 2 + startLog
- }
- startLat = Number(startLat)
- endLat = Number(endLat)
- if (startLat > endLat) {
- latitude = (startLat - endLat) / 2 + endLat
- } else {
- latitude = (endLat - startLat) / 2 + startLat
- }
-
- this.viewer.camera.setView({
- // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
- // fromDegrees()方法,将经纬度和高程转换为世界坐标
- destination: this.DC.Namespace.Cesium.Cartesian3.fromDegrees(longitude, latitude, 600),
- orientation: {
- // 指向
- heading: this.DC.Namespace.Cesium.Math.toRadians(0, 0),
- // 视角
- pitch: this.DC.Namespace.Cesium.Math.toRadians(-90),
- roll: 0.0
- }
- })
- }
- })
+ if (this.twoOrThree == "真三维") {
+ this.viewer.flyTo(this.routeLayer);
} else {
- axios.get('https://restapi.amap.com/v3/direction/driving', {
- params: {
- origin: `${origin[0].toFixed(6) + ',' + origin[1].toFixed(6)}`,
- destination: `${destination[0].toFixed(6) + ',' + destination[1].toFixed(6)}`,
- key: '4b3e1db3211054ce5b466407cbb9d221',
- strategy: 2,
- extensions: 'all',
- output: 'json'
- }
- }).then(res => {
- res.data.route.paths[0].steps.forEach(item => {
- item.polyline = item.polyline.split(';')
-
- var lineArr = []
-
- item.polyline.forEach(it => {
- it = it.split(',')
- lineArr.push(this.DC.CoordTransform.GCJ02ToWGS84(it[0], it[1]).join(','))
- })
-
- lineArr = lineArr.join(';')
-
- lineArr += ';'
-
- routes += lineArr
- })
-
- routes = startLog + ',' + startLat + ';' + routes + endLog + ',' + endLat
-
- const polyline = new this.DC.Polyline(routes)
- polyline.setStyle({
- width: 3,
- material: new this.DC.PolylineTrailMaterialProperty({
- color: this.DC.Color.RED,
- speed: 10
- }),
- clampToGround: true
- })
- this.routeLayer.addOverlay(polyline)
-
- if (this.twoOrThree == '真三维') {
- this.viewer.flyTo(this.routeLayer)
- } else {
- var longitude = null
- var latitude = null
- startLog = Number(startLog)
- endLog = Number(endLog)
- if (startLog > endLog) {
- longitude = (startLog - endLog) / 2 + endLog
- } else {
- longitude = (endLog - startLog) / 2 + startLog
- }
- startLat = Number(startLat)
- endLat = Number(endLat)
- if (startLat > endLat) {
- latitude = (startLat - endLat) / 2 + endLat
- } else {
- latitude = (endLat - startLat) / 2 + startLat
- }
-
- this.viewer.camera.setView({
- // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
- // fromDegrees()方法,将经纬度和高程转换为世界坐标
- destination: this.DC.Namespace.Cesium.Cartesian3.fromDegrees(longitude, latitude, 600),
- orientation: {
- // 指向
- heading: this.DC.Namespace.Cesium.Math.toRadians(0, 0),
- // 视角
- pitch: this.DC.Namespace.Cesium.Math.toRadians(-90),
- roll: 0.0
- }
- })
- }
- })
+ var longitude = null;
+ var latitude = null;
+ startLog = Number(startLog);
+ endLog = Number(endLog);
+ if (startLog > endLog) {
+ longitude = (startLog - endLog) / 2 + endLog;
+ } else {
+ longitude = (endLog - startLog) / 2 + startLog;
+ }
+ startLat = Number(startLat);
+ endLat = Number(endLat);
+ if (startLat > endLat) {
+ latitude = (startLat - endLat) / 2 + endLat;
+ } else {
+ latitude = (endLat - startLat) / 2 + startLat;
+ }
+ that.isOverRouter = true;
+ this.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: this.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+ longitude,
+ latitude,
+ 600
+ ),
+ orientation: {
+ // 指向
+ heading: this.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: this.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
}
- },
+ });
+ }
+ },
- clearLayer () {
- if (this.routeLayer != null) {
- this.routeLayer.clear()
- }
- },
+ clearLayer() {
+ if (this.routeLayer != null) {
+ this.routeLayer.clear();
+ }
+ },
- toNameChange () {
- if (this.toNameText == '') {
- this.toNameList = []
- this.toNameShow = false
- return
- }
- getSearchList({ mechanismName: this.toNameText }).then(res => {
- if (res.data.data.length > 0) {
- this.toNameList = res.data.data
- this.toNameShow = true
- }
- })
- },
-
- comeNameChange () {
- if (this.comeNameText == '') {
- this.comeNameList = []
- this.comeNameShow = false
- return
- }
- getSearchList({ mechanismName: this.comeNameText }).then(res => {
- if (res.data.data.length > 0) {
- this.comeNameList = res.data.data
- this.comeNameShow = true
- }
- })
- },
-
- shortcutShow (event) {
- var toBox = document.getElementById('ToNameContainer')
-
- if (toBox) {
- if (!toBox.contains(event.target)) { // 这句是说如果我们点击到了id为myPanel以外的区域
- this.toNameShow = false
- }
- }
-
- var comeBox = document.getElementById('ComeNameContainer')
-
- if (comeBox) {
- if (!comeBox.contains(event.target)) { // 这句是说如果我们点击到了id为myPanel以外的区域
- this.comeNameShow = false
- }
- }
- },
-
- originChange (param) {
- this.$store.commit('SET_POINTPOSITION', [
- Number(param.jd),
- Number(param.wd),
- Number(param.gd),
- Number(param.heading),
- Number(param.pitch),
- Number(param.roll)
- ])
- this.$store.commit('SET_GETTONAME', param.mechanismname)
- this.$store.commit('SET_STARTINGPOINT', this.pointPosition)
- this.toNameShow = false
- this.toNameList = []
- },
-
- terminusChange (param) {
- this.$store.commit('SET_POINTPOSITION', [
- Number(param.jd),
- Number(param.wd),
- Number(param.gd),
- Number(param.heading),
- Number(param.pitch),
- Number(param.roll)
- ])
- this.$store.commit('SET_COMENAME', param.mechanismname)
- this.$store.commit('SET_TERMINUS', this.pointPosition)
- this.comeNameShow = false
- this.comeNameList = []
+ toNameChange() {
+ if (this.toNameText == "") {
+ this.toNameList = [];
+ this.toNameShow = false;
+ return;
+ }
+ getSearchList({ mechanismName: this.toNameText }).then((res) => {
+ if (res.data.data.length > 0) {
+ this.toNameList = res.data.data;
+ this.toNameShow = true;
}
- }
-}
+ });
+ },
+
+ comeNameChange() {
+ if (this.comeNameText == "") {
+ this.comeNameList = [];
+ this.comeNameShow = false;
+ return;
+ }
+ getSearchList({ mechanismName: this.comeNameText }).then((res) => {
+ if (res.data.data.length > 0) {
+ this.comeNameList = res.data.data;
+ this.comeNameShow = true;
+ }
+ });
+ },
+
+ shortcutShow(event) {
+ var toBox = document.getElementById("ToNameContainer");
+
+ if (toBox) {
+ if (!toBox.contains(event.target)) {
+ // 这句是说如果我们点击到了id为myPanel以外的区域
+ this.toNameShow = false;
+ }
+ }
+
+ var comeBox = document.getElementById("ComeNameContainer");
+
+ if (comeBox) {
+ if (!comeBox.contains(event.target)) {
+ // 这句是说如果我们点击到了id为myPanel以外的区域
+ this.comeNameShow = false;
+ }
+ }
+ },
+
+ originChange(param) {
+ this.$store.commit("SET_POINTPOSITION", [
+ Number(param.jd),
+ Number(param.wd),
+ Number(param.gd),
+ Number(param.heading),
+ Number(param.pitch),
+ Number(param.roll),
+ ]);
+ this.$store.commit("SET_GETTONAME", param.mechanismname);
+ this.$store.commit("SET_STARTINGPOINT", this.pointPosition);
+ this.toNameShow = false;
+ this.toNameList = [];
+ },
+
+ terminusChange(param) {
+ this.$store.commit("SET_POINTPOSITION", [
+ Number(param.jd),
+ Number(param.wd),
+ Number(param.gd),
+ Number(param.heading),
+ Number(param.pitch),
+ Number(param.roll),
+ ]);
+ this.$store.commit("SET_COMENAME", param.mechanismname);
+ this.$store.commit("SET_TERMINUS", this.pointPosition);
+ this.comeNameShow = false;
+ this.comeNameList = [];
+ },
+ },
+ destroyed() {
+ console.log("endssss", "see");
+ // this.closeModel();
+ },
+};
</script>
-<style lang='scss' scope>
-</style>
+<style lang="scss" scope></style>
diff --git a/src/components/leftNav/index.vue b/src/components/leftNav/index.vue
index c828f40..0997990 100644
--- a/src/components/leftNav/index.vue
+++ b/src/components/leftNav/index.vue
@@ -1,154 +1,158 @@
<template>
- <div class="left-nav">
- <ul>
- <li v-for="(item, index) in leftNavData"
- :key="index"
- @click="leftNavClick(item)">
- <img :src="item.img"
- alt="">
- <span>{{item.label}}</span>
- </li>
- </ul>
- </div>
+ <div class="left-nav">
+ <ul>
+ <li
+ v-for="(item, index) in leftNavData"
+ :key="index"
+ @click="leftNavClick(item)"
+ >
+ <img :src="item.img" alt="" />
+ <span>{{ item.label }}</span>
+ </li>
+ </ul>
+ </div>
</template>
<script>
-
-import { getLifeList, getMonitorList, getSceneList, getWayList, getTagList } from '@/api/pc/leftNav/index'
+import {
+ getLifeList,
+ getMonitorList,
+ getSceneList,
+ getWayList,
+ getTagList,
+} from "@/api/pc/leftNav/index";
export default {
- name: 'leftNav',
- computed: {},
- data () {
- return {
- leftNavData: [
- {
- flag: true,
- label: '标签',
- img: '/img/leftnav/tag-checked.png',
- normal: '/img/leftnav/tag.png',
- checked: '/img/leftnav/tag-checked.png',
- layer: 'tagLayer'
- },
- {
- flag: false,
- label: '道路',
- img: '/img/leftnav/way.png',
- normal: '/img/leftnav/way.png',
- checked: '/img/leftnav/way-checked.png',
- layer: 'wayLayer'
- },
- {
- flag: false,
- label: '实景',
- img: '/img/leftnav/scene.png',
- normal: '/img/leftnav/scene.png',
- checked: '/img/leftnav/scene-checked.png',
- layer: 'sceneLayer'
- },
- {
- flag: false,
- label: '监控',
- img: '/img/leftnav/monitor.png',
- normal: '/img/leftnav/monitor.png',
- checked: '/img/leftnav/monitor-checked.png',
- layer: 'monitorLayer'
- },
- // {
- // flag: false,
- // label: '活动',
- // img: '/img/leftnav/activity.png',
- // normal: '/img/leftnav/activity.png',
- // checked: '/img/leftnav/activity-checked.png',
- // layer: 'activityLayer'
- // },
- // {
- // flag: false,
- // label: 'AED',
- // img: '/img/leftnav/aed.png',
- // normal: '/img/leftnav/aed.png',
- // checked: '/img/leftnav/aed-checked.png',
- // layer: 'aedLayer'
- // },
- {
- flag: false,
- label: '停车',
- img: '/img/leftnav/park.png',
- normal: '/img/leftnav/park.png',
- checked: '/img/leftnav/park-checked.png',
- layer: 'parkLayer'
- },
- {
- flag: false,
- label: '出入',
- img: '/img/leftnav/come.png',
- normal: '/img/leftnav/come.png',
- checked: '/img/leftnav/come-checked.png',
- layer: 'comeLayer'
- }
- ],
- viewer: null,
- DC: null,
- tagLayer: null,
- wayLayer: null,
- sceneLayer: null,
- monitorLayer: null,
- activityLayer: null,
- aedLayer: null,
- parkLayer: null,
- comeLayer: null
- }
- },
- created () {
- this.DC = global.DC
- },
- mounted () {
-
- },
- methods: {
- generatePosition (num) {
- const list = []
- for (let i = 0; i < num; i++) {
- 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
+ name: "leftNav",
+ computed: {},
+ data() {
+ return {
+ leftNavData: [
+ {
+ flag: true,
+ label: "标签",
+ img: "/img/leftnav/tag-checked.png",
+ normal: "/img/leftnav/tag.png",
+ checked: "/img/leftnav/tag-checked.png",
+ layer: "tagLayer",
},
- leftNavClick (item) {
- item.flag = !item.flag
- if (item.flag == true) {
- item.img = item.checked
- this[item.layer].show = true
- } else {
- item.img = item.normal
- this[item.layer].show = false
- }
+ {
+ flag: false,
+ label: "道路",
+ img: "/img/leftnav/way.png",
+ normal: "/img/leftnav/way.png",
+ checked: "/img/leftnav/way-checked.png",
+ layer: "wayLayer",
},
- initialize (viewer) {
- var that = this
- viewer.scene.globe.depthTestAgainstTerrain = false
- this.viewer = viewer
- this.tagLayer = new this.DC.HtmlLayer('tagLayer')
- viewer.addLayer(this.tagLayer)
- this.wayLayer = new this.DC.HtmlLayer('wayLayer')
- viewer.addLayer(this.wayLayer)
- this.sceneLayer = new this.DC.HtmlLayer('sceneLayer')
- viewer.addLayer(this.sceneLayer)
- this.monitorLayer = new this.DC.HtmlLayer('monitorLayer')
- viewer.addLayer(this.monitorLayer)
- this.aedLayer = new this.DC.VectorLayer('aedLayer')
- viewer.addLayer(this.aedLayer)
- this.parkLayer = new this.DC.HtmlLayer('parkLayer')
- viewer.addLayer(this.parkLayer)
- this.comeLayer = new this.DC.VectorLayer('comeLayer')
- viewer.addLayer(this.comeLayer)
+ {
+ flag: false,
+ label: "实景",
+ img: "/img/leftnav/scene.png",
+ normal: "/img/leftnav/scene.png",
+ checked: "/img/leftnav/scene-checked.png",
+ layer: "sceneLayer",
+ },
+ {
+ flag: false,
+ label: "监控",
+ img: "/img/leftnav/monitor.png",
+ normal: "/img/leftnav/monitor.png",
+ checked: "/img/leftnav/monitor-checked.png",
+ layer: "monitorLayer",
+ },
+ // {
+ // flag: false,
+ // label: '活动',
+ // img: '/img/leftnav/activity.png',
+ // normal: '/img/leftnav/activity.png',
+ // checked: '/img/leftnav/activity-checked.png',
+ // layer: 'activityLayer'
+ // },
+ // {
+ // flag: false,
+ // label: 'AED',
+ // img: '/img/leftnav/aed.png',
+ // normal: '/img/leftnav/aed.png',
+ // checked: '/img/leftnav/aed-checked.png',
+ // layer: 'aedLayer'
+ // },
+ {
+ flag: false,
+ label: "停车",
+ img: "/img/leftnav/park.png",
+ normal: "/img/leftnav/park.png",
+ checked: "/img/leftnav/park-checked.png",
+ layer: "parkLayer",
+ },
+ {
+ flag: false,
+ label: "出入",
+ img: "/img/leftnav/come.png",
+ normal: "/img/leftnav/come.png",
+ checked: "/img/leftnav/come-checked.png",
+ layer: "comeLayer",
+ },
+ ],
+ viewer: null,
+ DC: null,
+ tagLayer: null,
+ wayLayer: null,
+ sceneLayer: null,
+ monitorLayer: null,
+ activityLayer: null,
+ aedLayer: null,
+ parkLayer: null,
+ comeLayer: null,
+ };
+ },
+ created() {
+ this.DC = global.DC;
+ },
+ mounted() {},
+ methods: {
+ generatePosition(num) {
+ const list = [];
+ for (let i = 0; i < num; i++) {
+ 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;
+ },
+ leftNavClick(item) {
+ item.flag = !item.flag;
+ if (item.flag == true) {
+ item.img = item.checked;
+ this[item.layer].show = true;
+ } else {
+ item.img = item.normal;
+ this[item.layer].show = false;
+ }
+ },
+ initialize(viewer) {
+ var that = this;
+ viewer.scene.globe.depthTestAgainstTerrain = false;
+ this.viewer = viewer;
+ this.tagLayer = new this.DC.HtmlLayer("tagLayer");
+ viewer.addLayer(this.tagLayer);
+ this.wayLayer = new this.DC.HtmlLayer("wayLayer");
+ viewer.addLayer(this.wayLayer);
+ this.sceneLayer = new this.DC.HtmlLayer("sceneLayer");
+ viewer.addLayer(this.sceneLayer);
+ this.monitorLayer = new this.DC.HtmlLayer("monitorLayer");
+ viewer.addLayer(this.monitorLayer);
+ this.aedLayer = new this.DC.VectorLayer("aedLayer");
+ viewer.addLayer(this.aedLayer);
+ this.parkLayer = new this.DC.HtmlLayer("parkLayer");
+ viewer.addLayer(this.parkLayer);
+ this.comeLayer = new this.DC.VectorLayer("comeLayer");
+ viewer.addLayer(this.comeLayer);
- 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),
- `
+ 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}
@@ -158,18 +162,26 @@
</div>
</div>
`
- )
+ );
+ //订阅事件
+ divIcon.on(global.DC.MouseEventType.CLICK, (e) => {
+ console.log(item);
+ that.openPopups({
+ lng: e.overlay.position.lng,
+ lat: e.overlay.position.lat,
+ item: item,
+ });
+ });
+ this.tagLayer.addOverlay(divIcon);
+ });
+ // this.tagLayer.show = false
+ });
- this.tagLayer.addOverlay(divIcon)
- })
- // this.tagLayer.show = false
- })
-
- getWayList().then(res => {
- res.data.data.forEach(item => {
- const divIcon = new this.DC.DivIcon(
- new that.DC.Position(Number(item.jd), Number(item.wd), 0),
- `
+ getWayList().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="way-entitys-box">
<div class="way-title" style="border: white 1px solid; font-size: 0.875rem; background: #0066ff; width: 18px; line-height: 14px; padding: 6px 2px 6px 2px; color: white; text-align: center;">
${item.roadname}
@@ -179,112 +191,141 @@
</div>
</div>
`
- )
- this.wayLayer.addOverlay(divIcon)
- })
- this.wayLayer.show = false
- })
+ );
+ this.wayLayer.addOverlay(divIcon);
+ });
+ this.wayLayer.show = false;
+ });
- getMonitorList().then(res => {
- res.data.data.forEach(item => {
- const divIcon = new this.DC.DivIcon(
- new that.DC.Position(Number(item.jd), Number(item.wd), 0),
- `
+ getMonitorList().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="monitor-entitys-box">
<div>${item.mechanismname}</div>
<img class="monitor-entitys-box" src="/img/leftnav/map-monitor.png" alt="">
</div>
`
- )
- divIcon.attrParams = item
- this.monitorLayer.addOverlay(divIcon)
+ );
+ divIcon.attrParams = item;
+ this.monitorLayer.addOverlay(divIcon);
- divIcon.on(that.DC.MouseEventType.CLICK, e => {
- this.$store.commit('SET_PANORAMAPOPUP', false)
- this.$store.commit('SET_DETAILSPOPUP', false)
- this.$store.commit('SET_STATENAME', e.overlay.attrParams.mechanismname)
- this.$store.commit('SET_MONITORURL', e.overlay.attrParams.videourl)
- // eslint-disable-next-line new-cap
- var positions = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position.fromArray([Number(item.jd), Number(item.wd), 0, 0, -90, 0]))
- this.viewer.scene.globe.depthTestAgainstTerrain = false
- // eslint-disable-next-line no-unused-vars
- var monitor = new this.DC.PanoramaBox(this.viewer, {
- domId: 'MonitorBox',
- position: [
- positions
- ]
- })
+ divIcon.on(that.DC.MouseEventType.CLICK, (e) => {
+ this.$store.commit("SET_PANORAMAPOPUP", false);
+ this.$store.commit("SET_DETAILSPOPUP", false);
+ this.$store.commit(
+ "SET_STATENAME",
+ e.overlay.attrParams.mechanismname
+ );
+ this.$store.commit("SET_MONITORURL", e.overlay.attrParams.videourl);
+ // eslint-disable-next-line new-cap
+ var positions = this.DC.Transform.transformWGS84ToCartesian(
+ new this.DC.Position.fromArray([
+ Number(item.jd),
+ Number(item.wd),
+ 0,
+ 0,
+ -90,
+ 0,
+ ])
+ );
+ this.viewer.scene.globe.depthTestAgainstTerrain = false;
+ // eslint-disable-next-line no-unused-vars
+ var monitor = new this.DC.PanoramaBox(this.viewer, {
+ domId: "MonitorBox",
+ position: [positions],
+ });
- this.$store.commit('SET_MONITORPOPUP', true)
- })
- })
+ this.$store.commit("SET_MONITORPOPUP", true);
+ });
+ });
- this.monitorLayer.show = false
- })
+ this.monitorLayer.show = false;
+ });
- getSceneList().then(res => {
- res.data.data.forEach(item => {
- const divIcon = new this.DC.DivIcon(
- new that.DC.Position(Number(item.jd), Number(item.wd), 0),
- `
+ getSceneList().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="scene-entitys-box">
<div>${item.mechanismname}</div>
<img src="/img/leftnav/map-panorama.png" alt="">
</div>
`
- )
- divIcon.attrParams = item
- this.sceneLayer.addOverlay(divIcon)
+ );
+ divIcon.attrParams = item;
+ this.sceneLayer.addOverlay(divIcon);
- divIcon.on(that.DC.MouseEventType.CLICK, e => {
- this.$store.commit('SET_DETAILSPOPUP', false)
- this.$store.commit('SET_MONITORPOPUP', false)
- this.$store.commit('SET_STATENAME', e.overlay.attrParams.mechanismname)
- this.$store.commit('SET_PANORAMAURL', e.overlay.attrParams.panoramaurl)
- // eslint-disable-next-line new-cap
- var positions = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position.fromArray([Number(item.jd), Number(item.wd), 0, 0, -90, 0]))
- this.viewer.scene.globe.depthTestAgainstTerrain = false
- // eslint-disable-next-line no-unused-vars
- var panorama = new this.DC.PanoramaBox(this.viewer, {
- domId: 'PanoramaBox',
- position: [
- positions
- ]
- })
+ divIcon.on(that.DC.MouseEventType.CLICK, (e) => {
+ this.$store.commit("SET_DETAILSPOPUP", false);
+ this.$store.commit("SET_MONITORPOPUP", false);
+ this.$store.commit(
+ "SET_STATENAME",
+ e.overlay.attrParams.mechanismname
+ );
+ this.$store.commit(
+ "SET_PANORAMAURL",
+ e.overlay.attrParams.panoramaurl
+ );
+ // eslint-disable-next-line new-cap
+ var positions = this.DC.Transform.transformWGS84ToCartesian(
+ new this.DC.Position.fromArray([
+ Number(item.jd),
+ Number(item.wd),
+ 0,
+ 0,
+ -90,
+ 0,
+ ])
+ );
+ this.viewer.scene.globe.depthTestAgainstTerrain = false;
+ // eslint-disable-next-line no-unused-vars
+ var panorama = new this.DC.PanoramaBox(this.viewer, {
+ domId: "PanoramaBox",
+ position: [positions],
+ });
- this.$store.commit('SET_PANORAMAPOPUP', true)
- })
- })
+ this.$store.commit("SET_PANORAMAPOPUP", true);
+ });
+ });
- this.sceneLayer.show = false
- })
+ this.sceneLayer.show = false;
+ });
- getLifeList({ lifetype: 9 }).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)
+ getLifeList({ lifetype: 9 }).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]
+ 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
- })
+ this.aedLayer.addOverlay(billboard);
+ });
+ this.aedLayer.show = false;
+ });
- getLifeList({ lifetype: 11 }).then(res => {
- res.data.data.forEach(item => {
- const divIcon = new this.DC.DivIcon(
- new that.DC.Position(Number(item.jd), Number(item.wd), 0),
- `
+ getLifeList({ lifetype: 11 }).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="${item.mechanismname}">
</div>
@@ -298,83 +339,109 @@
</div>
</div>
`
- )
- this.parkLayer.addOverlay(divIcon)
- })
- this.parkLayer.show = false
- })
+ );
+ this.parkLayer.addOverlay(divIcon);
+ });
+ this.parkLayer.show = false;
+ });
- getLifeList({ lifetype: 12 }).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: -40 }
- })
- that.comeLayer.addOverlay(label)
+ getLifeList({ lifetype: 12 }).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: -40 },
+ });
+ 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]
- billboard.setStyle({
- pixelOffset: { x: 0, y: -16 }
- })
+ 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];
+ billboard.setStyle({
+ pixelOffset: { x: 0, y: -16 },
+ });
- that.comeLayer.addOverlay(billboard)
- })
- this.comeLayer.show = false
- })
- }
- }
-}
+ that.comeLayer.addOverlay(billboard);
+ });
+ this.comeLayer.show = false;
+ });
+ },
+ openPopups(value) {
+ var popup = new this.DC.DivForms(this.viewer, {
+ domId: "divFormsDomBox",
+ position: [
+ this.DC.Transform.transformWGS84ToCartesian(
+ new this.DC.Position(
+ Number(value.lng),
+ Number(value.lat),
+ Number(value.alt || 0)
+ )
+ ),
+ ],
+ });
+ this.$store.dispatch("setOurDataInPoput", value);
+ this.$store.dispatch("pcFlyView", {
+ jd: value.lng,
+ wd: value.lat,
+ viewer: this.viewer,
+ });
+ },
+ },
+};
</script>
-<style scoped lang='scss'>
+<style scoped lang="scss">
.left-nav {
- position: fixed;
- top: 160px;
- right: 30px;
- // bottom: 20px;
- // left: 0;
- z-index: 1;
- ul {
- // display: flex;
- li {
- // margin: 0 8px;
- margin-bottom: 12px;
- font-weight: 400;
- display: block;
- width: 98px;
- height: 33px;
- line-height: 33px;
- background-color: #fff;
- border-radius: 17px;
- text-align: center;
- font-size: 0;
- cursor: pointer;
+ position: fixed;
+ top: 160px;
+ right: 30px;
+ // bottom: 20px;
+ // left: 0;
+ z-index: 1;
+ ul {
+ // display: flex;
+ li {
+ // margin: 0 8px;
+ margin-bottom: 12px;
+ font-weight: 400;
+ display: block;
+ width: 98px;
+ height: 33px;
+ line-height: 33px;
+ background-color: #fff;
+ border-radius: 17px;
+ text-align: center;
+ font-size: 0;
+ cursor: pointer;
- img {
- width: 24px;
- height: 24px;
- vertical-align: middle;
- margin-right: 10px;
- image-rendering: -moz-crisp-edges;
- image-rendering: -o-crisp-edges;
- image-rendering: -webkit-optimize-contrast;
- image-rendering: crisp-edges;
- -ms-interpolation-mode: nearest-neighbor;
- }
+ img {
+ width: 24px;
+ height: 24px;
+ vertical-align: middle;
+ margin-right: 10px;
+ image-rendering: -moz-crisp-edges;
+ image-rendering: -o-crisp-edges;
+ image-rendering: -webkit-optimize-contrast;
+ image-rendering: crisp-edges;
+ -ms-interpolation-mode: nearest-neighbor;
+ }
- span {
- display: inline-block;
- vertical-align: middle;
- font-size: 14px;
- color: #2f2f2f;
- }
- }
+ span {
+ display: inline-block;
+ vertical-align: middle;
+ font-size: 14px;
+ color: #2f2f2f;
+ }
}
+ }
}
</style>
diff --git a/src/components/map/components/campusBuildingSearch copy.vue b/src/components/map/components/campusBuildingSearch copy.vue
index 6c2dc17..2e2ee60 100644
--- a/src/components/map/components/campusBuildingSearch copy.vue
+++ b/src/components/map/components/campusBuildingSearch copy.vue
@@ -1,440 +1,454 @@
<template>
- <div>
- <div class="map-campus-search"
- id="CampusSearchPanel">
- <el-input class="search-input"
- placeholder="社区搜索…"
- v-model="searchInput"
- @input="searchValueChange"
- @focus="shortcutFlag = true">
- </el-input>
- <el-button-group>
- <el-button @click="navigationShow"
- class="deblurring"
- icon="el-icon-my-path"></el-button>
- <el-button class="deblurring"
- type="primary"
- icon="el-icon-my-search"></el-button>
- </el-button-group>
- <div v-show="searchValShow"
- class="search-value-box">
- <ul>
- <li v-for="(item, index) in searchValList"
- :key="index"
- @click="loadPopup(item)">
- {{item.name}}
- </li>
- </ul>
- </div>
- <div class="map-campus-shortcut"
- v-show="shortcutFlag">
- <div class="shortcut-box">
- <ul>
- <li v-for="(item, index) in shortcutList"
- :key="index">
- <el-button @click="openModelPopup(item)">
- <img :src="item.bgimg"
- alt="">
- <span>{{item.title}}</span>
- </el-button>
- </li>
- </ul>
- </div>
- </div>
+ <div>
+ <div class="map-campus-search" id="CampusSearchPanel">
+ <el-input
+ class="search-input"
+ placeholder="校区搜索…"
+ v-model="searchInput"
+ @input="searchValueChange"
+ @focus="shortcutFlag = true"
+ >
+ </el-input>
+ <el-button-group>
+ <el-button
+ @click="navigationShow"
+ class="deblurring"
+ icon="el-icon-my-path"
+ ></el-button>
+ <el-button
+ class="deblurring"
+ type="primary"
+ icon="el-icon-my-search"
+ ></el-button>
+ </el-button-group>
+ <div v-show="searchValShow" class="search-value-box">
+ <ul>
+ <li
+ v-for="(item, index) in searchValList"
+ :key="index"
+ @click="loadPopup(item)"
+ >
+ {{ item.name }}
+ </li>
+ </ul>
+ </div>
+ <div class="map-campus-shortcut" v-show="shortcutFlag">
+ <div class="shortcut-box">
+ <ul>
+ <li v-for="(item, index) in shortcutList" :key="index">
+ <el-button @click="openModelPopup(item)">
+ <img :src="item.bgimg" alt="" />
+ <span>{{ item.title }}</span>
+ </el-button>
+ </li>
+ </ul>
</div>
+ </div>
</div>
+ </div>
</template>
<script>
+import { mapGetters } from "vuex";
-import { mapGetters } from 'vuex'
-
-import { getList } from '@/api/pc/orgnav/index'
-import { getSearchList } from '@/api/pc/public/search'
+import { getList } from "@/api/pc/orgnav/index";
+import { getSearchList } from "@/api/pc/public/search";
export default {
- name: 'campusBuildingSearch',
- data () {
- return {
- DC: null,
- shortcutList: [
- // {
- // bgimg: '/img/search/org.png',
- // title: '党群机构',
- // type: 'orgnav',
- // path: '/pcLayout/default/orgnav/masses',
- // code: 1
- // },
- // {
- // bgimg: '/img/search/ofc.png',
- // title: '职能部处',
- // type: 'orgnav',
- // path: '/pcLayout/default/orgnav/ofc',
- // code: 2
- // },
- // {
- // bgimg: '/img/search/teach.png',
- // title: '教学科研',
- // type: 'arc',
- // path: '/pcLayout/default/arc/teaching',
- // code: 2
- // },
- {
- bgimg: '/img/search/venue.png',
- title: '社区场馆',
- type: 'arc',
- path: '/pcLayout/default/arc/venue',
- code: 3
- }
- // {
- // bgimg: '/img/search/dorm.png',
- // title: '社区宿舍',
- // type: 'arc',
- // path: '/pcLayout/default/arc/dorm',
- // code: 4
- // },
- // {
- // bgimg: '/img/search/scenery.png',
- // title: '文化风景',
- // type: 'arc',
- // path: '/pcLayout/default/arc/culture',
- // code: 5
- // }
- ],
- shortcutFlag: false,
- searchInput: '',
- searchValShow: false,
- searchValList: []
+ name: "campusBuildingSearch",
+ data() {
+ return {
+ DC: null,
+ shortcutList: [
+ // {
+ // bgimg: '/img/search/org.png',
+ // title: '党群机构',
+ // type: 'orgnav',
+ // path: '/pcLayout/default/orgnav/masses',
+ // code: 1
+ // },
+ // {
+ // bgimg: '/img/search/ofc.png',
+ // title: '职能部处',
+ // type: 'orgnav',
+ // path: '/pcLayout/default/orgnav/ofc',
+ // code: 2
+ // },
+ // {
+ // bgimg: '/img/search/teach.png',
+ // title: '教学科研',
+ // type: 'arc',
+ // path: '/pcLayout/default/arc/teaching',
+ // code: 2
+ // },
+ {
+ bgimg: "/img/search/venue.png",
+ title: "校区场馆",
+ type: "arc",
+ path: "/pcLayout/default/arc/venue",
+ code: 3,
+ },
+ // {
+ // bgimg: '/img/search/dorm.png',
+ // title: '校区宿舍',
+ // type: 'arc',
+ // path: '/pcLayout/default/arc/dorm',
+ // code: 4
+ // },
+ // {
+ // bgimg: '/img/search/scenery.png',
+ // title: '文化风景',
+ // type: 'arc',
+ // path: '/pcLayout/default/arc/culture',
+ // code: 5
+ // }
+ ],
+ shortcutFlag: false,
+ searchInput: "",
+ searchValShow: false,
+ searchValList: [],
+ };
+ },
+ computed: {
+ ...mapGetters([
+ "viewer",
+ // 校区内导航的显示关闭
+ "campusNavFlag",
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ created() {
+ this.DC = global.DC;
+ },
+ methods: {
+ searchValueChange() {
+ if (this.searchInput == "") {
+ this.searchValList = [];
+ this.searchValShow = false;
+ return;
+ }
+ getSearchList({ mechanismName: this.searchInput }).then((res) => {
+ if (res.data.data.length > 0) {
+ this.searchValList = res.data.data;
+ this.searchValShow = true;
}
+ });
},
- computed: {
- ...mapGetters([
- 'viewer',
- // 社区内导航的显示关闭
- 'campusNavFlag',
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
+
+ navigationShow() {
+ if (this.campusNavFlag == false) {
+ this.$store.commit("SET_CAMPUSNAVFLAG", true);
+ }
},
- created () {
- this.DC = global.DC
- },
- methods: {
- searchValueChange () {
- if (this.searchInput == '') {
- this.searchValList = []
- this.searchValShow = false
- return
- }
- getSearchList({ mechanismName: this.searchInput }).then(res => {
- if (res.data.data.length > 0) {
- this.searchValList = res.data.data
- this.searchValShow = true
- }
- })
- },
- navigationShow () {
- if (this.campusNavFlag == false) {
- this.$store.commit('SET_CAMPUSNAVFLAG', true)
- }
- },
+ openModelPopup(param) {
+ var list = [];
+ if (this.$route.path.indexOf("/service") != -1) {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ }
- openModelPopup (param) {
- var list = []
- if (this.$route.path.indexOf('/service') != -1) {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
-
- if (param.type == 'orgnav') {
- var path = this.$route.path
- if (path.indexOf('/arc') != -1) {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
-
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
-
- this.$store.commit('SET_ORGNAVBARTITLE', param.title)
- this.$store.commit('SET_ORGNAVBARLIST', [])
-
- this.$store.commit('SET_ORGNAVBARFLAG', true)
-
- getList({ type: param.code }).then(res => {
- res.data.data.records.forEach(item => {
- list.push({
- navTitle: item.mechanismname,
- icon: '/img/navicon/tag.png',
- longitude: item.jd,
- latitude: item.wd,
- alt: item.gd,
- heading: item.heading,
- pitch: item.pitch,
- roll: item.roll,
- bgImg: item.tpurl,
- QRImg: item.codeurl,
- address: item.address,
- telephone: item.telephone,
- introduce: item.introduce,
- videourl: item.videourl
- })
- })
-
- this.$store.commit('SET_ORGNAVBARLIST', list)
- })
- } else if (param.type == 'arc') {
- if (this.$route.path.indexOf('/orgnav') != -1) {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
-
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
-
- this.$store.commit('SET_ARCNAVBARTITLE', param.title)
- this.$store.commit('SET_ARCNAVBARCODE', param.code)
- this.$store.commit('SET_ARCNAVBARFLAG', true)
- }
- },
-
- shortcutShow (event) {
- var sp = document.getElementById('CampusSearchPanel')
-
- if (sp) {
- if (!sp.contains(event.target)) { // 这句是说如果我们点击到了id为myPanel以外的区域
- this.shortcutFlag = false
- }
- }
- },
-
- loadPopup (param) {
- var that = this
-
- that.searchInput = ''
- that.searchValList = []
- that.searchValShow = false
-
- this.$store.commit('CLEAR_ALL', null)
-
- var result = param.list
-
- var imgArr = result.tpurl.split(',')
-
- this.$store.commit('SET_POPUPBGURL', imgArr[0])
- this.$store.commit('SET_POPUPQRURL', result.codeurl)
- this.$store.commit('SET_POINTPOSITION', [Number(result.jd), Number(result.wd), Number(result.gd), Number(result.heading), Number(result.pitch), Number(result.roll)])
- this.$store.commit('SET_STATENAME', result.mechanismname)
- this.$store.commit('SET_SITENAME', result.address)
- this.$store.commit('SET_TELEPHONE', result.telephone)
- this.$store.commit('SET_INTRODUCETEXT', result.introduce)
- if (result.panoramaurl != '') {
- this.$store.commit('SET_PANORAMAURL', result.panoramaurl)
- }
- if (result.videourl && result.videourl != '') {
- this.$store.commit('SET_MONITORURL', result.videourl)
- }
- this.$store.commit('SET_POPUPIMGATLAS', imgArr)
- if (param.jx != undefined && param.jx != '') {
- var tabOne = param.jx.split(',')
- this.$store.commit('SET_TEACHLIST', tabOne)
- } else {
- this.$store.commit('SET_TEACHLIST', [])
- }
-
- if (param.sh != undefined && param.sh != '') {
- var tabTwo = param.sh.split(',')
- this.$store.commit('SET_LIVELIST', tabTwo)
- } else {
- this.$store.commit('SET_LIVELIST', [])
- }
-
- this.newPopup(result)
- this.viewer.flyToPosition(
- new this.DC.Position(Number(result.jd), Number(result.wd), 300, Number(result.heading), Number(result.pitch), Number(result.roll)),
- () => {
-
- },
- 3
- )
- },
-
- newPopup (item) {
- const position = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position(Number(item.jd), Number(item.wd), Number(item.gd)))
- // eslint-disable-next-line no-unused-vars
- var popup = new this.DC.DivForms(this.viewer, {
- domId: 'divFormsDomBox',
- position: [
- position
- ]
- })
-
- this.$store.commit('SET_PANORAMAPOPUP', false)
- this.$store.commit('SET_MONITORPOPUP', false)
- this.$store.commit('SET_DETAILSPOPUP', true)
+ if (param.type == "orgnav") {
+ var path = this.$route.path;
+ if (path.indexOf("/arc") != -1) {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
}
- }
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+
+ this.$store.commit("SET_ORGNAVBARTITLE", param.title);
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+
+ this.$store.commit("SET_ORGNAVBARFLAG", true);
+
+ getList({ type: param.code }).then((res) => {
+ res.data.data.records.forEach((item) => {
+ list.push({
+ navTitle: item.mechanismname,
+ icon: "/img/navicon/tag.png",
+ longitude: item.jd,
+ latitude: item.wd,
+ alt: item.gd,
+ heading: item.heading,
+ pitch: item.pitch,
+ roll: item.roll,
+ bgImg: item.tpurl,
+ QRImg: item.codeurl,
+ address: item.address,
+ telephone: item.telephone,
+ introduce: item.introduce,
+ videourl: item.videourl,
+ });
+ });
+
+ this.$store.commit("SET_ORGNAVBARLIST", list);
+ });
+ } else if (param.type == "arc") {
+ if (this.$route.path.indexOf("/orgnav") != -1) {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
+ }
+
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
+ }
+
+ this.$store.commit("SET_ARCNAVBARTITLE", param.title);
+ this.$store.commit("SET_ARCNAVBARCODE", param.code);
+ this.$store.commit("SET_ARCNAVBARFLAG", true);
+ }
+ },
+
+ shortcutShow(event) {
+ var sp = document.getElementById("CampusSearchPanel");
+
+ if (sp) {
+ if (!sp.contains(event.target)) {
+ // 这句是说如果我们点击到了id为myPanel以外的区域
+ this.shortcutFlag = false;
+ }
+ }
+ },
+
+ loadPopup(param) {
+ var that = this;
+
+ that.searchInput = "";
+ that.searchValList = [];
+ that.searchValShow = false;
+
+ this.$store.commit("CLEAR_ALL", null);
+
+ var result = param.list;
+
+ var imgArr = result.tpurl.split(",");
+
+ this.$store.commit("SET_POPUPBGURL", imgArr[0]);
+ this.$store.commit("SET_POPUPQRURL", result.codeurl);
+ this.$store.commit("SET_POINTPOSITION", [
+ Number(result.jd),
+ Number(result.wd),
+ Number(result.gd),
+ Number(result.heading),
+ Number(result.pitch),
+ Number(result.roll),
+ ]);
+ this.$store.commit("SET_STATENAME", result.mechanismname);
+ this.$store.commit("SET_SITENAME", result.address);
+ this.$store.commit("SET_TELEPHONE", result.telephone);
+ this.$store.commit("SET_INTRODUCETEXT", result.introduce);
+ if (result.panoramaurl != "") {
+ this.$store.commit("SET_PANORAMAURL", result.panoramaurl);
+ }
+ if (result.videourl && result.videourl != "") {
+ this.$store.commit("SET_MONITORURL", result.videourl);
+ }
+ this.$store.commit("SET_POPUPIMGATLAS", imgArr);
+ if (param.jx != undefined && param.jx != "") {
+ var tabOne = param.jx.split(",");
+ this.$store.commit("SET_TEACHLIST", tabOne);
+ } else {
+ this.$store.commit("SET_TEACHLIST", []);
+ }
+
+ if (param.sh != undefined && param.sh != "") {
+ var tabTwo = param.sh.split(",");
+ this.$store.commit("SET_LIVELIST", tabTwo);
+ } else {
+ this.$store.commit("SET_LIVELIST", []);
+ }
+
+ this.newPopup(result);
+ this.viewer.flyToPosition(
+ new this.DC.Position(
+ Number(result.jd),
+ Number(result.wd),
+ 300,
+ Number(result.heading),
+ Number(result.pitch),
+ Number(result.roll)
+ ),
+ () => {},
+ 3
+ );
+ },
+
+ newPopup(item) {
+ const position = this.DC.Transform.transformWGS84ToCartesian(
+ new this.DC.Position(Number(item.jd), Number(item.wd), Number(item.gd))
+ );
+ // eslint-disable-next-line no-unused-vars
+ var popup = new this.DC.DivForms(this.viewer, {
+ domId: "divFormsDomBox",
+ position: [position],
+ });
+
+ this.$store.commit("SET_PANORAMAPOPUP", false);
+ this.$store.commit("SET_MONITORPOPUP", false);
+ this.$store.commit("SET_DETAILSPOPUP", true);
+ },
+ },
+};
</script>
-<style lang='scss' scope>
+<style lang="scss" scope>
.map-campus-search {
- position: fixed;
- top: 100px;
- left: 0;
- right: 0;
- bottom: auto;
- margin: auto;
- width: 330px;
- min-height: 40px;
- max-height: 360px;
- height: auto;
- z-index: 11;
- border-radius: 5px;
- box-shadow: 0 0 14px 2px rgb(221, 221, 221);
+ position: fixed;
+ top: 100px;
+ left: 0;
+ right: 0;
+ bottom: auto;
+ margin: auto;
+ width: 330px;
+ min-height: 40px;
+ max-height: 360px;
+ height: auto;
+ z-index: 11;
+ border-radius: 5px;
+ box-shadow: 0 0 14px 2px rgb(221, 221, 221);
- .search-input {
- float: left;
- width: 250px;
- height: 40px;
- border-radius: 5px 0 0 5px;
+ .search-input {
+ float: left;
+ width: 250px;
+ height: 40px;
+ border-radius: 5px 0 0 5px;
- input {
- box-sizing: border-box;
- border-radius: 5px 0 0 5px;
- }
+ input {
+ box-sizing: border-box;
+ border-radius: 5px 0 0 5px;
}
+ }
- .el-button-group {
- float: left;
- width: 80px;
+ .el-button-group {
+ float: left;
+ width: 80px;
- .el-button {
- margin: 0;
- padding: 0;
- width: 40px;
- height: 40px !important;
- position: relative;
- border-radius: 0;
- border: 1px solid #dcdfe6;
+ .el-button {
+ margin: 0;
+ padding: 0;
+ width: 40px;
+ height: 40px !important;
+ position: relative;
+ border-radius: 0;
+ border: 1px solid #dcdfe6;
- i {
- margin: auto;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- }
- }
-
- .el-button:nth-child(1) {
- border-left: none;
- border-right: none;
- }
-
- .el-button:nth-child(2) {
- border-left: none;
- border-right: none;
- border-radius: 0 5px 5px 0;
- }
- }
-
- .search-value-box {
+ i {
+ margin: auto;
position: absolute;
- top: 41px;
+ top: 0;
left: 0;
- width: auto;
- min-width: 250px;
- max-height: 520px;
- background: #fff;
- overflow-y: auto;
- box-shadow: 0 0 14px 2px rgb(221, 221, 221);
- border-radius: 5px;
-
- ul {
- li {
- padding-left: 20px;
- height: 36px;
- line-height: 36px;
- cursor: pointer;
- }
-
- li:hover {
- background: #f5f5f5;
- }
- }
+ right: 0;
+ bottom: 0;
+ }
}
- .map-campus-shortcut {
- margin-top: 20px;
+ .el-button:nth-child(1) {
+ border-left: none;
+ border-right: none;
+ }
+
+ .el-button:nth-child(2) {
+ border-left: none;
+ border-right: none;
+ border-radius: 0 5px 5px 0;
+ }
+ }
+
+ .search-value-box {
+ position: absolute;
+ top: 41px;
+ left: 0;
+ width: auto;
+ min-width: 250px;
+ max-height: 520px;
+ background: #fff;
+ overflow-y: auto;
+ box-shadow: 0 0 14px 2px rgb(221, 221, 221);
+ border-radius: 5px;
+
+ ul {
+ li {
+ padding-left: 20px;
+ height: 36px;
+ line-height: 36px;
+ cursor: pointer;
+ }
+
+ li:hover {
+ background: #f5f5f5;
+ }
+ }
+ }
+
+ .map-campus-shortcut {
+ margin-top: 20px;
+ width: 100%;
+ height: 330px;
+ background: #fff;
+ border-radius: 5px;
+
+ .shortcut-box {
+ padding-top: 36px;
+ ul {
+ display: flex;
width: 100%;
- height: 330px;
- background: #fff;
- border-radius: 5px;
+ height: 120px;
+ justify-content: flex-start;
+ flex-wrap: wrap;
- .shortcut-box {
- padding-top: 36px;
- ul {
- display: flex;
- width: 100%;
- height: 120px;
- justify-content: flex-start;
- flex-wrap: wrap;
+ li {
+ margin: 0 13px;
+ width: 84px;
+ height: 76px;
- li {
- margin: 0 13px;
- width: 84px;
- height: 76px;
+ .el-button {
+ width: 80px;
+ height: 70px;
+ padding: 6px 12px;
+ background: #efefef;
+ border: none;
+ border-radius: 5px;
+ box-sizing: border-box;
+ text-align: center;
- .el-button {
- width: 80px;
- height: 70px;
- padding: 6px 12px;
- background: #efefef;
- border: none;
- border-radius: 5px;
- box-sizing: border-box;
- text-align: center;
+ & > span {
+ width: auto;
+ height: auto;
- & > span {
- width: auto;
- height: auto;
+ img {
+ margin-top: 4px;
+ width: 26px;
+ height: 26px;
+ }
- img {
- margin-top: 4px;
- width: 26px;
- height: 26px;
- }
-
- span {
- display: block;
- font-size: 14px;
- line-height: 28px;
- }
- }
- }
-
- .el-button:focus {
- border: 1px solid #000;
- }
- }
+ span {
+ display: block;
+ font-size: 14px;
+ line-height: 28px;
+ }
}
+ }
+
+ .el-button:focus {
+ border: 1px solid #000;
+ }
}
+ }
}
+ }
}
</style>
diff --git a/src/components/map/components/campusBuildingSearch.vue b/src/components/map/components/campusBuildingSearch.vue
index 0ec2e0f..81d94eb 100644
--- a/src/components/map/components/campusBuildingSearch.vue
+++ b/src/components/map/components/campusBuildingSearch.vue
@@ -1,433 +1,453 @@
<template>
- <div>
- <div class="map-campus-search" id="CampusSearchPanel">
- <el-input
- class="search-input"
- placeholder="社区搜索…"
- v-model="searchInput"
- @input="searchValueChange"
- @focus="shortcutFlag = true"
- ></el-input>
- <el-button-group>
- <el-button @click="navigationShow" class="deblurring" icon="el-icon-my-path"></el-button>
- <el-button
- @click="fuzzyQuery"
- class="deblurring"
- type="primary"
- icon="el-icon-my-search"
- ></el-button>
- </el-button-group>
- <div v-show="searchValShow" class="search-value-box">
- <ul>
- <li
- v-for="(item, index) in searchValList"
- :key="index"
- @click="loadPopup(item)"
- >{{item.mechanismname}}</li>
- </ul>
- </div>
- <div class="map-campus-shortcut" v-show="shortcutFlag">
- <div class="shortcut-box">
- <ul>
- <li v-for="(item, index) in shortcutList" :key="index">
- <el-button @click="openModelPopup(item)">
- <img :src="item.bgimg" alt />
- <span>{{item.title}}</span>
- </el-button>
- </li>
- </ul>
- </div>
- </div>
+ <div>
+ <div class="map-campus-search" id="CampusSearchPanel">
+ <el-input
+ class="search-input"
+ placeholder="校区搜索…"
+ v-model="searchInput"
+ @input="searchValueChange"
+ @focus="shortcutFlag = true"
+ ></el-input>
+ <el-button-group>
+ <el-button
+ @click="navigationShow"
+ class="deblurring"
+ icon="el-icon-my-path"
+ ></el-button>
+ <el-button
+ @click="fuzzyQuery"
+ class="deblurring"
+ type="primary"
+ icon="el-icon-my-search"
+ ></el-button>
+ </el-button-group>
+ <div v-show="searchValShow" class="search-value-box">
+ <ul>
+ <li
+ v-for="(item, index) in searchValList"
+ :key="index"
+ @click="loadPopup(item)"
+ >
+ {{ item.mechanismname }}
+ </li>
+ </ul>
+ </div>
+ <div class="map-campus-shortcut" v-show="shortcutFlag">
+ <div class="shortcut-box">
+ <ul>
+ <li v-for="(item, index) in shortcutList" :key="index">
+ <el-button @click="openModelPopup(item)">
+ <img :src="item.bgimg" alt />
+ <span>{{ item.title }}</span>
+ </el-button>
+ </li>
+ </ul>
</div>
+ </div>
</div>
+ </div>
</template>
<script>
+import { mapGetters } from "vuex";
-import { mapGetters } from 'vuex'
-
-import { getList } from '@/api/pc/orgnav/index'
-import { getSearchList } from '@/api/pc/public/search'
+import { getList } from "@/api/pc/orgnav/index";
+import { getSearchList } from "@/api/pc/public/search";
export default {
- name: 'campusBuildingSearch',
- data () {
- return {
- DC: null,
- shortcutList: [
- {
- bgimg: '/img/search/org.png',
- title: '其他机构',
- type: 'orgnav',
- path: '/pcLayout/default/orgnav/rest',
- code: 5
- },
- // {
- // bgimg: '/img/search/ofc.png',
- // title: '职能部处',
- // type: 'orgnav',
- // path: '/pcLayout/default/orgnav/ofc',
- // code: 2
- // },
- // {
- // bgimg: '/img/search/teach.png',
- // title: '教学科研',
- // type: 'arc',
- // path: '/pcLayout/default/arc/teaching',
- // code: 2
- // },
- {
- bgimg: '/img/search/venue.png',
- title: '社区场馆',
- type: 'arc',
- path: '/pcLayout/default/arc/venue',
- code: 3
- },
- {
- bgimg: '/img/search/floor.png',
- title: '主要场馆',
- type: 'arc',
- path: '/pcLayout/default/arc/rest',
- code: 7
- }
- // {
- // bgimg: '/img/search/dorm.png',
- // title: '社区宿舍',
- // type: 'arc',
- // path: '/pcLayout/default/arc/dorm',
- // code: 4
- // },
- // {
- // bgimg: '/img/search/scenery.png',
- // title: '文化风景',
- // type: 'arc',
- // path: '/pcLayout/default/arc/culture',
- // code: 5
- // }
- ],
- shortcutFlag: false,
- searchInput: '',
- searchValShow: false,
- searchValList: []
+ name: "campusBuildingSearch",
+ data() {
+ return {
+ DC: null,
+ shortcutList: [
+ {
+ bgimg: "/img/search/org.png",
+ title: "其他机构",
+ type: "orgnav",
+ path: "/pcLayout/default/orgnav/rest",
+ code: 5,
+ },
+ // {
+ // bgimg: '/img/search/ofc.png',
+ // title: '职能部处',
+ // type: 'orgnav',
+ // path: '/pcLayout/default/orgnav/ofc',
+ // code: 2
+ // },
+ // {
+ // bgimg: '/img/search/teach.png',
+ // title: '教学科研',
+ // type: 'arc',
+ // path: '/pcLayout/default/arc/teaching',
+ // code: 2
+ // },
+ {
+ bgimg: "/img/search/venue.png",
+ title: "校区场馆",
+ type: "arc",
+ path: "/pcLayout/default/arc/venue",
+ code: 3,
+ },
+ {
+ bgimg: "/img/search/floor.png",
+ title: "主要场馆",
+ type: "arc",
+ path: "/pcLayout/default/arc/rest",
+ code: 7,
+ },
+ // {
+ // bgimg: "/img/search/dorm.png",
+ // title: "校区宿舍",
+ // type: "arc",
+ // path: "/pcLayout/default/arc/dorm",
+ // code: 4,
+ // },
+
+ // {
+ // bgimg: '/img/search/scenery.png',
+ // title: '文化风景',
+ // type: 'arc',
+ // path: '/pcLayout/default/arc/culture',
+ // code: 5
+ // }
+ ],
+ shortcutFlag: false,
+ searchInput: "",
+ searchValShow: false,
+ searchValList: [],
+ };
+ },
+ computed: {
+ ...mapGetters([
+ "viewer",
+ // 校区内导航的显示关闭
+ "campusNavFlag",
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ created() {
+ this.DC = global.DC;
+ },
+ methods: {
+ searchValueChange() {
+ if (this.searchInput == "") {
+ this.searchValList = [];
+ this.searchValShow = false;
+ return;
+ }
+ getSearchList({ mechanismName: this.searchInput }).then((res) => {
+ if (res.data.data.length > 0) {
+ this.searchValList = res.data.data;
+ this.searchValShow = true;
}
+ });
},
- computed: {
- ...mapGetters([
- 'viewer',
- // 社区内导航的显示关闭
- 'campusNavFlag',
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
+
+ navigationShow() {
+ if (this.campusNavFlag == false) {
+ this.$store.commit("SET_CAMPUSNAVFLAG", true);
+ }
},
- created () {
- this.DC = global.DC
- },
- methods: {
- searchValueChange () {
- if (this.searchInput == '') {
- this.searchValList = []
- this.searchValShow = false
- return
- }
- getSearchList({ mechanismName: this.searchInput }).then(res => {
- if (res.data.data.length > 0) {
- this.searchValList = res.data.data
- this.searchValShow = true
- }
- })
- },
- navigationShow () {
- if (this.campusNavFlag == false) {
- this.$store.commit('SET_CAMPUSNAVFLAG', true)
- }
- },
+ fuzzyQuery() {
+ if (this.searchInput == "") {
+ this.searchValList = [];
+ this.searchValShow = false;
- fuzzyQuery () {
- if (this.searchInput == '') {
- this.searchValList = []
- this.searchValShow = false
-
- this.$message({
- message: '请输入关键字',
- type: 'warning',
- duration: 1000
- })
- return
- }
- getSearchList({ mechanismName: this.searchInput }).then(res => {
- if (res.data.data.length > 0) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', true)
- this.$store.commit('SET_SEARCHPOPUPLIST', res.data.data)
- this.searchInput = ''
- this.searchValList = []
- this.searchValShow = false
- }
- })
- },
-
- openModelPopup (param) {
- var list = []
-
- if (param.type == 'orgnav') {
- this.$store.commit('SET_ORGNAVBARTITLE', param.title)
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', true)
-
- getList({ type: param.code }).then(res => {
- res.data.data.records.forEach(item => {
- list.push({
- navTitle: item.mechanismname,
- icon: '/img/navicon/tag.png',
- longitude: item.jd,
- latitude: item.wd,
- alt: item.gd,
- heading: item.heading,
- pitch: item.pitch,
- roll: item.roll,
- bgImg: item.tpurl,
- QRImg: item.codeurl,
- address: item.address,
- telephone: item.telephone,
- introduce: item.introduce,
- videourl: item.videourl
- })
- })
-
- this.$store.commit('SET_ORGNAVBARLIST', list)
- })
- } else if (param.type == 'arc') {
- this.$store.commit('SET_ARCNAVBARTITLE', param.title)
- this.$store.commit('SET_ARCNAVBARCODE', param.code)
- this.$store.commit('SET_ARCNAVBARFLAG', true)
- }
-
- this.$router.push(param.path)
- },
-
- shortcutShow (event) {
- var sp = document.getElementById('CampusSearchPanel')
-
- if (sp) {
- if (!sp.contains(event.target)) { // 这句是说如果我们点击到了id为myPanel以外的区域
- this.shortcutFlag = false
- }
- }
- },
-
- loadPopup (param) {
- var that = this
-
- that.searchInput = ''
- that.searchValList = []
- that.searchValShow = false
-
- this.$store.commit('CLEAR_ALL', null)
-
- var imgArr = param.tpurl.split(',')
-
- this.$store.commit('SET_POPUPBGURL', imgArr[0])
- this.$store.commit('SET_POPUPQRURL', param.codeurl)
- this.$store.commit('SET_POINTPOSITION', [Number(param.jd), Number(param.wd), Number(param.gd), Number(param.heading), Number(param.pitch), Number(param.roll)])
- this.$store.commit('SET_STATENAME', param.mechanismname)
- this.$store.commit('SET_SITENAME', param.address)
- this.$store.commit('SET_TELEPHONE', param.telephone)
- this.$store.commit('SET_INTRODUCETEXT', param.introduce)
- if (param.panoramaurl != '') {
- this.$store.commit('SET_PANORAMAURL', param.panoramaurl)
- }
- if (param.videourl && param.videourl != '') {
- this.$store.commit('SET_MONITORURL', param.videourl)
- }
- this.$store.commit('SET_POPUPIMGATLAS', imgArr)
- if (param.jx != undefined && param.jx != '') {
- var tabOne = param.jx.split(',')
- this.$store.commit('SET_TEACHLIST', tabOne)
- } else {
- this.$store.commit('SET_TEACHLIST', [])
- }
-
- if (param.sh != undefined && param.sh != '') {
- var tabTwo = param.sh.split(',')
- this.$store.commit('SET_LIVELIST', tabTwo)
- } else {
- this.$store.commit('SET_LIVELIST', [])
- }
-
- this.newPopup(param)
- this.viewer.flyToPosition(
- new this.DC.Position(Number(param.jd), Number(param.wd), 300, Number(param.heading), Number(param.pitch), Number(param.roll)),
- () => {
-
- },
- 0.5
- )
- },
-
- newPopup (item) {
- const position = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position(Number(item.jd), Number(item.wd), Number(item.gd)))
- // eslint-disable-next-line no-unused-vars
- var popup = new this.DC.DivForms(this.viewer, {
- domId: 'divFormsDomBox',
- position: [
- position
- ]
- })
-
- this.$store.commit('SET_PANORAMAPOPUP', false)
- this.$store.commit('SET_MONITORPOPUP', false)
- this.$store.commit('SET_DETAILSPOPUP', true)
+ this.$message({
+ message: "请输入关键字",
+ type: "warning",
+ duration: 1000,
+ });
+ return;
+ }
+ getSearchList({ mechanismName: this.searchInput }).then((res) => {
+ if (res.data.data.length > 0) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", true);
+ this.$store.commit("SET_SEARCHPOPUPLIST", res.data.data);
+ this.searchInput = "";
+ this.searchValList = [];
+ this.searchValShow = false;
}
- }
+ });
+ },
-}
+ openModelPopup(param) {
+ var list = [];
+
+ if (param.type == "orgnav") {
+ this.$store.commit("SET_ORGNAVBARTITLE", param.title);
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", true);
+
+ getList({ type: param.code }).then((res) => {
+ res.data.data.records.forEach((item) => {
+ list.push({
+ navTitle: item.mechanismname,
+ icon: "/img/navicon/tag.png",
+ longitude: item.jd,
+ latitude: item.wd,
+ alt: item.gd,
+ heading: item.heading,
+ pitch: item.pitch,
+ roll: item.roll,
+ bgImg: item.tpurl,
+ QRImg: item.codeurl,
+ address: item.address,
+ telephone: item.telephone,
+ introduce: item.introduce,
+ videourl: item.videourl,
+ });
+ });
+
+ this.$store.commit("SET_ORGNAVBARLIST", list);
+ });
+ } else if (param.type == "arc") {
+ this.$store.commit("SET_ARCNAVBARTITLE", param.title);
+ this.$store.commit("SET_ARCNAVBARCODE", param.code);
+ this.$store.commit("SET_ARCNAVBARFLAG", true);
+ }
+
+ this.$router.push(param.path);
+ },
+
+ shortcutShow(event) {
+ var sp = document.getElementById("CampusSearchPanel");
+
+ if (sp) {
+ if (!sp.contains(event.target)) {
+ // 这句是说如果我们点击到了id为myPanel以外的区域
+ this.shortcutFlag = false;
+ }
+ }
+ },
+
+ loadPopup(param) {
+ var that = this;
+
+ that.searchInput = "";
+ that.searchValList = [];
+ that.searchValShow = false;
+
+ this.$store.commit("CLEAR_ALL", null);
+
+ var imgArr = param.tpurl.split(",");
+
+ this.$store.commit("SET_POPUPBGURL", imgArr[0]);
+ this.$store.commit("SET_POPUPQRURL", param.codeurl);
+ this.$store.commit("SET_POINTPOSITION", [
+ Number(param.jd),
+ Number(param.wd),
+ Number(param.gd),
+ Number(param.heading),
+ Number(param.pitch),
+ Number(param.roll),
+ ]);
+ this.$store.commit("SET_STATENAME", param.mechanismname);
+ this.$store.commit("SET_SITENAME", param.address);
+ this.$store.commit("SET_TELEPHONE", param.telephone);
+ this.$store.commit("SET_INTRODUCETEXT", param.introduce);
+ if (param.panoramaurl != "") {
+ this.$store.commit("SET_PANORAMAURL", param.panoramaurl);
+ }
+ if (param.videourl && param.videourl != "") {
+ this.$store.commit("SET_MONITORURL", param.videourl);
+ }
+ this.$store.commit("SET_POPUPIMGATLAS", imgArr);
+ if (param.jx != undefined && param.jx != "") {
+ var tabOne = param.jx.split(",");
+ this.$store.commit("SET_TEACHLIST", tabOne);
+ } else {
+ this.$store.commit("SET_TEACHLIST", []);
+ }
+
+ if (param.sh != undefined && param.sh != "") {
+ var tabTwo = param.sh.split(",");
+ this.$store.commit("SET_LIVELIST", tabTwo);
+ } else {
+ this.$store.commit("SET_LIVELIST", []);
+ }
+
+ this.newPopup(param);
+ this.viewer.flyToPosition(
+ new this.DC.Position(
+ Number(param.jd),
+ Number(param.wd),
+ 300,
+ Number(param.heading),
+ Number(param.pitch),
+ Number(param.roll)
+ ),
+ () => {},
+ 0.5
+ );
+ },
+
+ newPopup(item) {
+ const position = this.DC.Transform.transformWGS84ToCartesian(
+ new this.DC.Position(Number(item.jd), Number(item.wd), Number(item.gd))
+ );
+ // eslint-disable-next-line no-unused-vars
+ var popup = new this.DC.DivForms(this.viewer, {
+ domId: "divFormsDomBox",
+ position: [position],
+ });
+
+ this.$store.commit("SET_PANORAMAPOPUP", false);
+ this.$store.commit("SET_MONITORPOPUP", false);
+ this.$store.commit("SET_DETAILSPOPUP", true);
+ },
+ },
+};
</script>
-<style lang='scss' scope>
+<style lang="scss" scope>
.map-campus-search {
- position: fixed;
- top: 100px;
- left: 0;
- right: 0;
- bottom: auto;
- margin: auto;
- width: 330px;
- min-height: 40px;
- max-height: 360px;
- height: auto;
- z-index: 11;
- border-radius: 5px;
- box-shadow: 0 0 14px 2px rgb(221, 221, 221);
+ position: fixed;
+ top: 100px;
+ left: 0;
+ right: 0;
+ bottom: auto;
+ margin: auto;
+ width: 330px;
+ min-height: 40px;
+ max-height: 360px;
+ height: auto;
+ z-index: 11;
+ border-radius: 5px;
+ box-shadow: 0 0 14px 2px rgb(221, 221, 221);
- .search-input {
- float: left;
- width: 250px;
- height: 40px;
- border-radius: 5px 0 0 5px;
+ .search-input {
+ float: left;
+ width: 250px;
+ height: 40px;
+ border-radius: 5px 0 0 5px;
- input {
- box-sizing: border-box;
- border-radius: 5px 0 0 5px;
- }
+ input {
+ box-sizing: border-box;
+ border-radius: 5px 0 0 5px;
}
+ }
- .el-button-group {
- float: left;
- width: 80px;
+ .el-button-group {
+ float: left;
+ width: 80px;
- .el-button {
- margin: 0;
- padding: 0;
- width: 40px;
- height: 40px !important;
- position: relative;
- border-radius: 0;
- border: 1px solid #dcdfe6;
+ .el-button {
+ margin: 0;
+ padding: 0;
+ width: 40px;
+ height: 40px !important;
+ position: relative;
+ border-radius: 0;
+ border: 1px solid #dcdfe6;
- i {
- margin: auto;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- }
- }
-
- .el-button:nth-child(1) {
- border-left: none;
- border-right: none;
- }
-
- .el-button:nth-child(2) {
- border-left: none;
- border-right: none;
- border-radius: 0 5px 5px 0;
- }
- }
-
- .search-value-box {
+ i {
+ margin: auto;
position: absolute;
- top: 41px;
+ top: 0;
left: 0;
- width: auto;
- min-width: 250px;
- max-height: 520px;
- background: #fff;
- overflow-y: auto;
- box-shadow: 0 0 14px 2px rgb(221, 221, 221);
- border-radius: 5px;
-
- ul {
- li {
- padding-left: 20px;
- height: 36px;
- line-height: 36px;
- cursor: pointer;
- }
-
- li:hover {
- background: #f5f5f5;
- }
- }
+ right: 0;
+ bottom: 0;
+ }
}
- .map-campus-shortcut {
- margin-top: 20px;
+ .el-button:nth-child(1) {
+ border-left: none;
+ border-right: none;
+ }
+
+ .el-button:nth-child(2) {
+ border-left: none;
+ border-right: none;
+ border-radius: 0 5px 5px 0;
+ }
+ }
+
+ .search-value-box {
+ position: absolute;
+ top: 41px;
+ left: 0;
+ width: auto;
+ min-width: 250px;
+ max-height: 520px;
+ background: #fff;
+ overflow-y: auto;
+ box-shadow: 0 0 14px 2px rgb(221, 221, 221);
+ border-radius: 5px;
+
+ ul {
+ li {
+ padding-left: 20px;
+ height: 36px;
+ line-height: 36px;
+ cursor: pointer;
+ }
+
+ li:hover {
+ background: #f5f5f5;
+ }
+ }
+ }
+
+ .map-campus-shortcut {
+ margin-top: 20px;
+ width: 100%;
+ // height: 330px;
+ height: auto;
+ background: #fff;
+ border-radius: 5px;
+
+ .shortcut-box {
+ padding-top: 36px;
+ height: auto;
+ ul {
+ display: flex;
width: 100%;
- height: 330px;
- background: #fff;
- border-radius: 5px;
+ height: auto;
+ justify-content: flex-start;
+ flex-wrap: wrap;
- .shortcut-box {
- padding-top: 36px;
- ul {
- display: flex;
- width: 100%;
- height: 120px;
- justify-content: flex-start;
- flex-wrap: wrap;
+ li {
+ margin: 0 13px;
+ width: 84px;
+ height: 76px;
- li {
- margin: 0 13px;
- width: 84px;
- height: 76px;
+ .el-button {
+ width: 80px;
+ height: 70px;
+ padding: 6px 12px;
+ background: #efefef;
+ border: none;
+ border-radius: 5px;
+ box-sizing: border-box;
+ text-align: center;
- .el-button {
- width: 80px;
- height: 70px;
- padding: 6px 12px;
- background: #efefef;
- border: none;
- border-radius: 5px;
- box-sizing: border-box;
- text-align: center;
+ & > span {
+ width: auto;
+ height: auto;
- & > span {
- width: auto;
- height: auto;
+ img {
+ margin-top: 4px;
+ width: 26px;
+ height: 26px;
+ }
- img {
- margin-top: 4px;
- width: 26px;
- height: 26px;
- }
-
- span {
- display: block;
- font-size: 14px;
- line-height: 28px;
- }
- }
- }
-
- .el-button:focus {
- border: 1px solid #000;
- }
- }
+ span {
+ display: block;
+ font-size: 14px;
+ line-height: 28px;
+ }
}
+ }
+
+ .el-button:focus {
+ border: 1px solid #000;
+ }
}
+ }
}
+ }
}
</style>
diff --git a/src/components/map/components/dimension.vue b/src/components/map/components/dimension.vue
index aeaefd6..cea1467 100644
--- a/src/components/map/components/dimension.vue
+++ b/src/components/map/components/dimension.vue
@@ -1,1244 +1,979 @@
<template>
- <div class="dimension-cut">
- <el-radio-group v-model="dimensionValue" size="medium" @change="dimensionChange">
- <el-radio-button label="三 维"></el-radio-button>
- <el-radio-button label="真三维"></el-radio-button>
- </el-radio-group>
- </div>
+ <div class="dimension-cut">
+ <el-radio-group
+ v-model="dimensionValue"
+ size="medium"
+ @change="dimensionChange"
+ >
+ <el-radio-button label="三 维"></el-radio-button>
+ <el-radio-button label="真三维"></el-radio-button>
+ </el-radio-group>
+ </div>
</template>
<script>
-import axios from 'axios'
-import { mapGetters } from 'vuex'
-import { getDetail } from '@/api/pc/public/arc'
+import axios from "axios";
+import { mapGetters } from "vuex";
+import { getDetail } from "@/api/pc/public/arc";
export default {
- name: 'dimension',
- data () {
- return {
- DC: null,
- dimensionValue: '三 维',
- // 建筑2.5D地图
- newLayer: null,
- baseLayer: null,
- // 电子地图
- vecLayer: null,
- // 标注
- cvaLayer: null,
- // 建筑2.5D面数据
- provider: null,
- wallLayer: null,
- tileset: null,
- tilesetLayer: null,
- titlesetLayerFlag: false,
- silhouetteBlue: null,
- wallArr: [
- [114.04006133, 27.628038, 100],
- [114.04020623, 27.62809403, 100],
- [114.04025389, 27.62819931, 100],
- [114.04032823, 27.62827743, 100],
- [114.0410871, 27.62918798, 100],
- [114.04001425, 27.62986815, 100],
- [114.04001615, 27.62986817, 100],
- [114.03992451, 27.62998379, 100],
- [114.03967878, 27.62999684, 100],
- [114.03940001, 27.63008698, 100],
- [114.03951075, 27.63047135, 100],
- [114.03946107, 27.63056152, 100],
- [114.03927571, 27.63072325, 100],
- [114.03871751, 27.63128845, 100],
- [114.03872079, 27.63135594, 100],
- [114.03869211, 27.63139169, 100],
- [114.03960653, 27.63200726, 100],
- [114.03945732, 27.63215207, 100],
- [114.03760837, 27.63092563, 100],
- [114.03770336, 27.63078037, 100],
- [114.03782957, 27.63072932, 100],
- [114.03787347, 27.63068209, 100],
- [114.03824591, 27.62887902, 100],
- [114.03837943, 27.6289105, 100],
- [114.03863853, 27.62868839, 100],
- [114.03905656, 27.62843592, 100],
- [114.03954722, 27.62819644, 100],
- [114.04006133, 27.628038, 100]
- ]
- }
- },
- props: ['areaLayer'],
- computed: {
- ...mapGetters([
- 'viewer',
- // 社区内导航的显示关闭
- 'campusNavFlag',
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- created () {
- this.DC = global.DC
- },
- watch: {
- viewer: {
- immediate: true,
- handler (newCode, oldCode) {
- if (this.titlesetLayerFlag == false && newCode != null) {
- var that = this
+ name: "dimension",
+ data() {
+ return {
+ DC: null,
+ dimensionValue: "三 维",
+ // 建筑2.5D地图
+ newLayer: null,
+ baseLayer: null,
+ // 电子地图
+ vecLayer: null,
+ // 标注
+ cvaLayer: null,
+ // 建筑2.5D面数据
+ provider: null,
+ wallLayer: null,
+ tileset: null,
+ tilesetLayer: null,
+ titlesetLayerFlag: false,
+ silhouetteBlue: null,
+ wallArr: [
+ [114.04006133, 27.628038, 100],
+ [114.04020623, 27.62809403, 100],
+ [114.04025389, 27.62819931, 100],
+ [114.04032823, 27.62827743, 100],
+ [114.0410871, 27.62918798, 100],
+ [114.04001425, 27.62986815, 100],
+ [114.04001615, 27.62986817, 100],
+ [114.03992451, 27.62998379, 100],
+ [114.03967878, 27.62999684, 100],
+ [114.03940001, 27.63008698, 100],
+ [114.03951075, 27.63047135, 100],
+ [114.03946107, 27.63056152, 100],
+ [114.03927571, 27.63072325, 100],
+ [114.03871751, 27.63128845, 100],
+ [114.03872079, 27.63135594, 100],
+ [114.03869211, 27.63139169, 100],
+ [114.03960653, 27.63200726, 100],
+ [114.03945732, 27.63215207, 100],
+ [114.03760837, 27.63092563, 100],
+ [114.03770336, 27.63078037, 100],
+ [114.03782957, 27.63072932, 100],
+ [114.03787347, 27.63068209, 100],
+ [114.03824591, 27.62887902, 100],
+ [114.03837943, 27.6289105, 100],
+ [114.03863853, 27.62868839, 100],
+ [114.03905656, 27.62843592, 100],
+ [114.03954722, 27.62819644, 100],
+ [114.04006133, 27.628038, 100],
+ ],
+ mapCenter: [115.871863, 28.743861, 400.0],
+ };
+ },
+ props: ["areaLayer"],
+ computed: {
+ ...mapGetters([
+ "viewer",
+ // 校区内导航的显示关闭
+ "campusNavFlag",
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "closeMapClick", // 关闭地图点击,防止新增标签误触
+ ]),
+ },
+ created() {
+ this.DC = global.DC;
+ },
+ watch: {
+ viewer: {
+ immediate: true,
+ handler(newCode, oldCode) {
+ if (this.titlesetLayerFlag == false && newCode != null) {
+ var that = this;
- that.tilesetLayer = new that.DC.TilesetLayer(
- 'tilesetLayer'
- )
- that.viewer.addLayer(that.tilesetLayer)
- that.tileset = new that.DC.Tileset('/mx/tileset.json', {
- luminanceAtZenith: 0.3,
- shadows: that.DC.Namespace.Cesium.ShadowMode.DISABLED
- })
- that.tilesetLayer.addOverlay(that.tileset)
- that.tilesetLayer.show = false
+ that.tilesetLayer = new that.DC.TilesetLayer("tilesetLayer");
+ that.viewer.addLayer(that.tilesetLayer);
+ that.tileset = new that.DC.Tileset("/mx/tileset.json", {
+ luminanceAtZenith: 0.3,
+ shadows: that.DC.Namespace.Cesium.ShadowMode.DISABLED,
+ });
+ that.tilesetLayer.addOverlay(that.tileset);
+ that.tilesetLayer.show = false;
- that.silhouetteBlue =
- that.DC.Namespace.Cesium.PostProcessStageLibrary.createEdgeDetectionStage()
- that.silhouetteBlue.uniforms.color =
- that.DC.Namespace.Cesium.Color.fromBytes(9, 162, 40)
- that.silhouetteBlue.uniforms.length = 0.01
- that.silhouetteBlue.selected = []
+ that.silhouetteBlue =
+ that.DC.Namespace.Cesium.PostProcessStageLibrary.createEdgeDetectionStage();
+ that.silhouetteBlue.uniforms.color =
+ that.DC.Namespace.Cesium.Color.fromBytes(9, 162, 40);
+ that.silhouetteBlue.uniforms.length = 0.01;
+ that.silhouetteBlue.selected = [];
- that.viewer.scene.postProcessStages.add(
- that.DC.Namespace.Cesium.PostProcessStageLibrary.createSilhouetteStage(
- [that.silhouetteBlue]
- )
- )
+ that.viewer.scene.postProcessStages.add(
+ that.DC.Namespace.Cesium.PostProcessStageLibrary.createSilhouetteStage(
+ [that.silhouetteBlue]
+ )
+ );
- that.vecLayer =
- that.viewer.imageryLayers.addImageryProvider(
- new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider(
- {
- url: ' http://t1.tianditu.gov.cn/vec_w/wmts?tk=9ae78c51a0a28f06444d541148496e36',
- type: 'wmts',
- layer: 'vec',
- style: 'default',
- format: 'tiles',
- tileMatrixSetID: 'w',
- show: true,
- maximumLevel: 18
- }
- )
- )
+ that.vecLayer = that.viewer.imageryLayers.addImageryProvider(
+ new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
+ url: " http://t1.tianditu.gov.cn/vec_w/wmts?tk=9ae78c51a0a28f06444d541148496e36",
+ type: "wmts",
+ layer: "vec",
+ style: "default",
+ format: "tiles",
+ tileMatrixSetID: "w",
+ show: true,
+ maximumLevel: 18,
+ })
+ );
- that.cvaLayer =
- that.viewer.imageryLayers.addImageryProvider(
- new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider(
- {
- url: ' http://t1.tianditu.gov.cn/cva_w/wmts?tk=9ae78c51a0a28f06444d541148496e36',
- type: 'wmts',
- layer: 'cva',
- style: 'default',
- format: 'tiles',
- tileMatrixSetID: 'w',
- show: true,
- maximumLevel: 18
- }
- )
- )
+ that.cvaLayer = that.viewer.imageryLayers.addImageryProvider(
+ new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
+ url: " http://t1.tianditu.gov.cn/cva_w/wmts?tk=9ae78c51a0a28f06444d541148496e36",
+ type: "wmts",
+ layer: "cva",
+ style: "default",
+ format: "tiles",
+ tileMatrixSetID: "w",
+ show: true,
+ maximumLevel: 18,
+ })
+ );
- var highlighted = {
- feature: undefined,
- originalColor: new that.DC.Namespace.Cesium.Color()
- }
+ var highlighted = {
+ feature: undefined,
+ originalColor: new that.DC.Namespace.Cesium.Color(),
+ };
- var selected = {
- feature: undefined,
- originalColor: new that.DC.Namespace.Cesium.Color()
- }
+ var selected = {
+ feature: undefined,
+ originalColor: new that.DC.Namespace.Cesium.Color(),
+ };
- const videoLayer = new that.DC.CameraVideoLayer(
- 'video-layer'
- ).addTo(that.viewer)
+ const videoLayer = new that.DC.CameraVideoLayer("video-layer").addTo(
+ that.viewer
+ );
- const cameraVideo = new that.DC.CameraVideo(
+ const cameraVideo = new that.DC.CameraVideo(
+ new that.DC.Position(114.03935976, 27.62939045, 100.25, 4.2, -90),
+ document.getElementById("video")
+ );
+ cameraVideo.setStyle({
+ fov: 30,
+ far: 120,
+ near: 1,
+ aspectRatio: 1.3,
+ alpha: 0.7,
+ });
+ videoLayer.addOverlay(cameraVideo);
+
+ that.tileset.on(that.DC.MouseEventType.CLICK, (e) => {
+ if (that.closeMapClick) {
+ return;
+ }
+ that.viewer.scene.globe.depthTestAgainstTerrain = false;
+
+ if (e.overlay && e.overlay.attr.arcName != null) {
+ this.$store.commit("CLEAR_ALL", null);
+ getDetail({
+ mechanismname: e.overlay.attr.arcName,
+ }).then((res) => {
+ if (res && JSON.stringify(res.data.data) != "{}") {
+ var result = res.data.data;
+
+ var imgArr = result.tpurl.split(",");
+ this.$store.commit("SET_POPUPBGURL", imgArr[0]);
+ this.$store.commit("SET_POPUPQRURL", result.codeurl);
+ this.$store.commit("SET_POINTPOSITION", [
+ Number(e.wgs84Position.lng),
+ Number(e.wgs84Position.lat),
+ Number(e.wgs84Position.alt),
+ Number(0),
+ Number(0),
+ Number(0),
+ ]);
+ this.$store.commit("SET_STATENAME", result.mechanismname);
+ this.$store.commit("SET_SITENAME", result.address);
+ this.$store.commit("SET_TELEPHONE", result.telephone);
+ this.$store.commit("SET_INTRODUCETEXT", result.introduce);
+ this.$store.commit("SET_PANORAMAURL", result.panoramaurl);
+ this.$store.commit("SET_POPUPIMGATLAS", imgArr);
+ if (result.videourl && result.videourl != "") {
+ this.$store.commit("SET_MONITORURL", result.videourl);
+ }
+ if (result.jx != undefined && result.jx != "") {
+ var tabOne = res.data.data[0].jx.split(",");
+ this.$store.commit("SET_TEACHLIST", tabOne);
+ } else {
+ this.$store.commit("SET_TEACHLIST", []);
+ }
+
+ if (result.sh != undefined && result.sh != "") {
+ var tabTwo = res.data.data[0].sh.split(",");
+ this.$store.commit("SET_LIVELIST", tabTwo);
+ } else {
+ this.$store.commit("SET_LIVELIST", []);
+ }
+
+ // 定制化窗体
+ // eslint-disable-next-line no-unused-vars
+ var popup = new that.DC.DivForms(that.viewer, {
+ domId: "divFormsDomBox",
+ position: [
+ that.DC.Transform.transformWGS84ToCartesian(
new that.DC.Position(
- 114.03935976,
- 27.62939045,
- 100.25,
- 4.2,
- -90
- ),
- document.getElementById('video')
- )
- cameraVideo.setStyle({
- fov: 30,
- far: 120,
- near: 1,
- aspectRatio: 1.3,
- alpha: 0.7
- })
- videoLayer.addOverlay(cameraVideo)
-
- that.tileset.on(that.DC.MouseEventType.CLICK, (e) => {
- that.viewer.scene.globe.depthTestAgainstTerrain = false
-
- if (e.overlay && e.overlay.attr.arcName != null) {
- this.$store.commit('CLEAR_ALL', null)
- getDetail({
- mechanismname: e.overlay.attr.arcName
- }).then((res) => {
- if (
- res &&
- JSON.stringify(res.data.data) != '{}'
- ) {
- var result = res.data.data
-
- var imgArr = result.tpurl.split(',')
- this.$store.commit(
- 'SET_POPUPBGURL',
- imgArr[0]
- )
- this.$store.commit(
- 'SET_POPUPQRURL',
- result.codeurl
- )
- this.$store.commit('SET_POINTPOSITION', [
- Number(e.wgs84Position.lng),
- Number(e.wgs84Position.lat),
- Number(e.wgs84Position.alt),
- Number(0),
- Number(0),
- Number(0)
- ])
- this.$store.commit(
- 'SET_STATENAME',
- result.mechanismname
- )
- this.$store.commit(
- 'SET_SITENAME',
- result.address
- )
- this.$store.commit(
- 'SET_TELEPHONE',
- result.telephone
- )
- this.$store.commit(
- 'SET_INTRODUCETEXT',
- result.introduce
- )
- this.$store.commit(
- 'SET_PANORAMAURL',
- result.panoramaurl
- )
- this.$store.commit(
- 'SET_POPUPIMGATLAS',
- imgArr
- )
- if (
- result.videourl &&
- result.videourl != ''
- ) {
- this.$store.commit(
- 'SET_MONITORURL',
- result.videourl
- )
- }
- if (
- result.jx != undefined &&
- result.jx != ''
- ) {
- var tabOne =
- res.data.data[0].jx.split(',')
- this.$store.commit(
- 'SET_TEACHLIST',
- tabOne
- )
- } else {
- this.$store.commit('SET_TEACHLIST', [])
- }
-
- if (
- result.sh != undefined &&
- result.sh != ''
- ) {
- var tabTwo =
- res.data.data[0].sh.split(',')
- this.$store.commit(
- 'SET_LIVELIST',
- tabTwo
- )
- } else {
- this.$store.commit('SET_LIVELIST', [])
- }
-
- // 定制化窗体
- // eslint-disable-next-line no-unused-vars
- var popup = new that.DC.DivForms(
- that.viewer,
- {
- domId: 'divFormsDomBox',
- position: [
- that.DC.Transform.transformWGS84ToCartesian(
- new that.DC.Position(
- Number(
- e.wgs84Position.lng
- ),
- Number(
- e.wgs84Position.lat
- ),
- Number(
- e.wgs84Position.alt
- )
- )
- )
- ]
- }
- )
-
- this.$store.commit(
- 'SET_PANORAMAPOPUP',
- false
- )
- this.$store.commit(
- 'SET_MONITORPOPUP',
- false
- )
- this.$store.commit(
- 'SET_DETAILSPOPUP',
- true
- )
- }
- })
-
- this.viewer.flyToPosition(
- new this.DC.Position(
- Number(e.wgs84Position.lng + 0.00070806),
- Number(e.wgs84Position.lat - 0.00261205),
- 300,
- Number(-9),
- Number(-34.54),
- Number(0)
- )
- )
- }
- })
-
- // that.tileset.on(that.DC.MouseEventType.MOUSE_MOVE, e => {
- // that.silhouetteBlue.selected = []
-
- // if (that.DC.Namespace.Cesium.defined(highlighted.feature)) {
- // highlighted.feature.color = highlighted.originalColor
- // highlighted.feature = undefined
- // }
-
- // if (e.feature !== selected.feature) {
- // that.silhouetteBlue.selected = [e.feature]
-
- // highlighted.feature = e.feature
-
- // that.DC.Namespace.Cesium.Color.clone(
- // e.feature.color,
- // highlighted.originalColor
- // )
- // e.feature.color = that.DC.Namespace.Cesium.Color.fromBytes(155, 255, 175)
- // }
- // })
-
- // var provider = new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
- // url: 'http://www.tdtfz.com/OneMapServer/rest/services/fzsw2019/MapServer/WMTS/tile/1.0.0/fzsw2019/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}',
- // layer: 'fzsw2019',
- // style: 'default',
- // tileMatrixSetID: 'default028mm',
- // format: 'image/jpgpng',
- // tilingScheme: new that.DC.Namespace.Cesium.GeographicTilingScheme(),
- // maximumLevel: 19,
- // tileMatrixLabels: [
- // '0',
- // '1',
- // '2',
- // '3',
- // '4',
- // '5',
- // '6',
- // '7',
- // '8',
- // '9',
- // '10',
- // '11',
- // '12',
- // '13',
- // '14',
- // '15',
- // '16',
- // '17',
- // '18',
- // '19'
- // ]
- // })
-
- var provider =
- new that.DC.Namespace.Cesium.UrlTemplateImageryProvider(
- {
- url: '/wp/{z}/{x}/{y}.png',
- fileExtension: 'png'
- // minimumLevel: 19
- }
+ Number(e.wgs84Position.lng),
+ Number(e.wgs84Position.lat),
+ Number(e.wgs84Position.alt)
)
+ ),
+ ],
+ });
- var baseProvider =
- new that.DC.Namespace.Cesium.UrlTemplateImageryProvider(
- {
- url: '/base/{z}/{x}/{y}.png',
- fileExtension: 'png'
- }
- )
-
- // that.baseLayer = that.viewer.imageryLayers.addImageryProvider(baseProvider)
- that.newLayer =
- that.viewer.imageryLayers.addImageryProvider(provider)
-
- that.wallLayer = new that.DC.VectorLayer('wallLayer')
- // that.viewer.addLayer(that.wallLayer)
-
- that.wallArr.forEach((item) => {
- item = item.join(',')
- })
- that.wallArr = that.wallArr.join(';')
- const wall = new that.DC.Wall(that.wallArr)
- wall.setStyle({
- material: new that.DC.WallTrailMaterialProperty({
- color: that.DC.Namespace.Cesium.Color.fromBytes(
- 0,
- 142,
- 255,
- 150
- ),
- // color: that.DC.Color.CYAN,
- speed: 10
- })
- })
- // that.wallLayer.addOverlay(wall)
-
- // that.viewer.camera.setView({
- // // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
- // // fromDegrees()方法,将经纬度和高程转换为世界坐标
- // destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(114.03928791, 27.62954732, 400.0),
- // orientation: {
- // // 指向
- // heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
- // // 视角
- // pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
- // roll: 0.0
- // }
- // })
-
- // setTimeout(() => {
- // that.viewer.camera.flyTo({
- // // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
- // // fromDegrees()方法,将经纬度和高程转换为世界坐标
- // destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(114.0351, 27.6314, 200.0),
- // duration: 5,
- // complete: () => {
- // that.viewer.camera.flyTo({
- // // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
- // // fromDegrees()方法,将经纬度和高程转换为世界坐标
- // destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(114.0351, 27.6314, 200.0),
- // orientation: {
- // // 指向
- // heading: that.DC.Namespace.Cesium.Math.toRadians(108),
- // // 视角
- // pitch: that.DC.Namespace.Cesium.Math.toRadians(-26.46),
- // roll: 0.0
- // }
- // })
- // }
- // })
- // }, 400)
- that.titlesetLayerFlag = true
-
- that.viewer.camera.setView({
- // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
- // fromDegrees()方法,将经纬度和高程转换为世界坐标
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromDegrees(
- 114.04001675,
- 27.62935375,
- 400.0
- ),
- orientation: {
- // 指向
- heading: that.DC.Namespace.Cesium.Math.toRadians(
- 0,
- 0
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
- roll: 0.0
- }
- })
-
- // 最小
- that.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 220
- // 最大
- that.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400
-
- // 设置相机缩小时的速率
- that.viewer.scene.screenSpaceCameraController._minimumZoomRate = 2000
- // 设置相机放大时的速率
- that.viewer.scene.screenSpaceCameraController._maximumZoomRate = 5906376272000
- // 视角平移
- that.viewer.scene.screenSpaceCameraController.enableRotate = true
- // 视角缩放
- that.viewer.scene.screenSpaceCameraController.enableZoom = true
- // 视角旋转
- that.viewer.scene.screenSpaceCameraController.enableTilt = false
-
- axios
- .get(
- 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/lxxqwxq/MapServer/0/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&returnTrueCurves=false&resultOffset=&resultRecordCount=&f=pjson'
- )
- .then((resultData) => {
- resultData.data.features.forEach((item) => {
- item.geometry.rings[0].forEach((it) => {
- it = it.join(',')
- })
-
- item.geometry.rings[0] =
- item.geometry.rings[0].join(';')
-
- const polygon = new that.DC.Polygon(
- item.geometry.rings[0]
- )
- polygon.attr = item.attributes
-
- polygon.setStyle({
- material:
- that.DC.Namespace.Cesium.Color.fromBytes(
- 255,
- 255,
- 255,
- 1
- )
- })
-
- that.areaLayer.addOverlay(polygon)
- })
-
- that.areaLayer.show = true
- })
-
- var select = {
- overlay: undefined,
- color: undefined
- }
-
- that.viewer.on(that.DC.MouseEventType.MOUSE_MOVE, (e) => {
- if (
- e.overlay != undefined &&
- e.layer.id == 'areaLayer'
- ) {
- if (select.overlay != undefined) {
- if (e.overlay != select.overlay) {
- select.overlay.setStyle({
- material: select.color,
- outline: false
- })
-
- select.overlay = undefined
- select.color = undefined
- }
- }
-
- if (select.overlay == undefined) {
- select.overlay = e.overlay
-
- select.color = e.overlay._style.material
- select.overlay.setStyle({
- outline: true,
- outlineColor:
- that.DC.Namespace.Cesium.Color.fromBytes(
- 3,
- 255,
- 13,
- 255
- ), // 边框颜色
- outlineWidth: 10, // 边框大小,
- height: 0.01,
- material:
- that.DC.Namespace.Cesium.Color.fromBytes(
- 108,
- 245,
- 113,
- 158
- )
- })
- }
- } else {
- if (select.overlay != undefined) {
- select.overlay.setStyle({
- material: select.color,
- outline: false
- })
-
- select.overlay = undefined
- select.color = undefined
- }
- }
- })
-
- that.viewer.on(that.DC.MouseEventType.CLICK, (e) => {
- if (
- e.overlay != undefined &&
- e.layer.id == 'areaLayer'
- ) {
- var rid =
- e.overlay.attr['楼栋号'] == '8栋'
- ? '9栋'
- : e.overlay.attr['楼栋号'] == '9栋'
- ? '8栋'
- : e.overlay.attr['楼栋号']
- this.$store.commit('CLEAR_ALL', null)
- getDetail({ mechanismname: '香琴湾' + rid }).then(
- (res) => {
- that.viewer.scene.globe.depthTestAgainstTerrain = false
- var result = res.data.data
-
- var imgArr = result.tpurl.split(',')
- this.$store.commit(
- 'SET_POPUPBGURL',
- imgArr[0]
- )
- this.$store.commit(
- 'SET_POPUPQRURL',
- result.codeurl
- )
- this.$store.commit('SET_POINTPOSITION', [
- Number(e.wgs84Position.lng),
- Number(e.wgs84Position.lat),
- Number(e.wgs84Position.alt),
- Number(0),
- Number(0),
- Number(0)
- ])
- this.$store.commit(
- 'SET_STATENAME',
- result.mechanismname
- )
- this.$store.commit(
- 'SET_SITENAME',
- result.address
- )
- this.$store.commit(
- 'SET_TELEPHONE',
- result.telephone
- )
- this.$store.commit(
- 'SET_INTRODUCETEXT',
- result.introduce
- )
- this.$store.commit(
- 'SET_PANORAMAURL',
- result.panoramaurl
- )
- this.$store.commit(
- 'SET_POPUPIMGATLAS',
- imgArr
- )
- if (
- result.videourl &&
- result.videourl != ''
- ) {
- this.$store.commit(
- 'SET_MONITORURL',
- result.videourl
- )
- }
- if (
- result.jx != undefined &&
- result.jx != ''
- ) {
- var tabOne =
- res.data.data[0].jx.split(',')
- this.$store.commit(
- 'SET_TEACHLIST',
- tabOne
- )
- } else {
- this.$store.commit('SET_TEACHLIST', [])
- }
-
- if (
- result.sh != undefined &&
- result.sh != ''
- ) {
- var tabTwo =
- res.data.data[0].sh.split(',')
- this.$store.commit(
- 'SET_LIVELIST',
- tabTwo
- )
- } else {
- this.$store.commit('SET_LIVELIST', [])
- }
-
- // 定制化窗体
- // eslint-disable-next-line no-unused-vars
- var popup = new that.DC.DivForms(
- that.viewer,
- {
- domId: 'divFormsDomBox',
- position: [
- that.DC.Transform.transformWGS84ToCartesian(
- new that.DC.Position(
- Number(
- e.wgs84Position.lng
- ),
- Number(
- e.wgs84Position.lat
- ),
- Number(
- e.wgs84Position.alt
- )
- )
- )
- ]
- }
- )
-
- this.$store.commit(
- 'SET_PANORAMAPOPUP',
- false
- )
- this.$store.commit(
- 'SET_MONITORPOPUP',
- false
- )
- this.$store.commit(
- 'SET_DETAILSPOPUP',
- true
- )
- }
- )
-
- this.viewer.flyToPosition(
- new this.DC.Position(
- Number(e.wgs84Position.lng),
- Number(e.wgs84Position.lat),
- 300,
- Number(0),
- Number(-90),
- Number(0)
- ),
- () => { },
- 0
- )
- }
- })
-
- document.querySelector(
- '.dc-zoom-controller'
- ).children[1].onclick = function () {
- if (that.dimensionValue == '真三维') {
- that.viewer.camera.setView({
- // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
- // fromDegrees()方法,将经纬度和高程转换为世界坐标
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromDegrees(
- 114.04062292,
- 27.62666834,
- 220.0
- ),
- orientation: {
- // 指向
- heading:
- that.DC.Namespace.Cesium.Math.toRadians(
- -9
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(
- -34.54
- ),
- roll: 0.0
- }
- })
- } else {
- that.viewer.camera.setView({
- // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
- // fromDegrees()方法,将经纬度和高程转换为世界坐标
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromDegrees(
- 114.04001675,
- 27.62935375,
- 400.0
- ),
- orientation: {
- // 指向
- heading:
- that.DC.Namespace.Cesium.Math.toRadians(
- 0,
- 0
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(
- -90
- ),
- roll: 0.0
- }
- })
- }
- }
-
- document.querySelector(
- '.dc-zoom-controller'
- ).children[2].onclick = function () {
- if (
- that.dimensionValue != undefined &&
- that.dimensionValue != '真三维'
- ) {
- const height = Math.ceil(
- that.viewer.camera.positionCartographic.height
- )
-
- if (height <= 250) {
- that.viewer.camera.setView({
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromRadians(
- that.viewer.camera
- .positionCartographic.longitude,
- that.viewer.camera
- .positionCartographic.latitude,
- 280
- ),
- orientation: {
- // 指向
- heading:
- that.DC.Namespace.Cesium.Math.toRadians(
- 0,
- 0
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(
- -90
- ),
- roll: 0.0
- }
- })
- }
-
- if (height > 250 && height <= 310) {
- that.viewer.camera.setView({
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromRadians(
- that.viewer.camera
- .positionCartographic.longitude,
- that.viewer.camera
- .positionCartographic.latitude,
- 340
- ),
- orientation: {
- // 指向
- heading:
- that.DC.Namespace.Cesium.Math.toRadians(
- 0,
- 0
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(
- -90
- ),
- roll: 0.0
- }
- })
- }
-
- if (height > 310 && height < 370) {
- that.viewer.camera.setView({
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromRadians(
- that.viewer.camera
- .positionCartographic.longitude,
- that.viewer.camera
- .positionCartographic.latitude,
- 400
- ),
- orientation: {
- // 指向
- heading:
- that.DC.Namespace.Cesium.Math.toRadians(
- 0,
- 0
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(
- -90
- ),
- roll: 0.0
- }
- })
- }
- }
- }
-
- document.querySelector(
- '.dc-zoom-controller'
- ).children[0].onclick = function () {
- if (
- that.dimensionValue != undefined &&
- that.dimensionValue != '真三维'
- ) {
- const height = Math.ceil(
- that.viewer.camera.positionCartographic.height
- )
-
- if (height > 370) {
- that.viewer.camera.setView({
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromRadians(
- that.viewer.camera
- .positionCartographic.longitude,
- that.viewer.camera
- .positionCartographic.latitude,
- 340
- ),
- orientation: {
- // 指向
- heading:
- that.DC.Namespace.Cesium.Math.toRadians(
- 0,
- 0
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(
- -90
- ),
- roll: 0.0
- }
- })
-
- return
- }
-
- if (height > 310) {
- that.viewer.camera.setView({
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromRadians(
- that.viewer.camera
- .positionCartographic.longitude,
- that.viewer.camera
- .positionCartographic.latitude,
- 280
- ),
- orientation: {
- // 指向
- heading:
- that.DC.Namespace.Cesium.Math.toRadians(
- 0,
- 0
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(
- -90
- ),
- roll: 0.0
- }
- })
-
- return
- }
-
- if (height > 250) {
- that.viewer.camera.setView({
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromRadians(
- that.viewer.camera
- .positionCartographic.longitude,
- that.viewer.camera
- .positionCartographic.latitude,
- 220
- ),
- orientation: {
- // 指向
- heading:
- that.DC.Namespace.Cesium.Math.toRadians(
- 0,
- 0
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(
- -90
- ),
- roll: 0.0
- }
- })
- }
- }
- }
-
- that.viewer.on(
- that.DC.SceneEventType.CAMERA_CHANGED,
- () => {
- if (
- that.dimensionValue != undefined &&
- that.dimensionValue != '真三维'
- ) {
- const height = Math.ceil(
- that.viewer.camera.positionCartographic
- .height
- )
-
- that.viewer.camera.setView({
- orientation: {
- // 指向
- heading:
- that.DC.Namespace.Cesium.Math.toRadians(
- 0,
- 0
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(
- -90
- ),
- roll: 0.0
- }
- })
-
- if (height <= 250) {
- that.viewer.camera.setView({
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromRadians(
- that.viewer.camera
- .positionCartographic
- .longitude,
- that.viewer.camera
- .positionCartographic
- .latitude,
- 220
- ),
- orientation: {
- // 指向
- heading:
- that.DC.Namespace.Cesium.Math.toRadians(
- 0,
- 0
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(
- -90
- ),
- roll: 0.0
- }
- })
- }
-
- if (height > 250 && height <= 310) {
- that.viewer.camera.setView({
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromRadians(
- that.viewer.camera
- .positionCartographic
- .longitude,
- that.viewer.camera
- .positionCartographic
- .latitude,
- 280
- ),
- orientation: {
- // 指向
- heading:
- that.DC.Namespace.Cesium.Math.toRadians(
- 0,
- 0
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(
- -90
- ),
- roll: 0.0
- }
- })
- }
-
- if (height > 310 && height <= 370) {
- that.viewer.camera.setView({
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromRadians(
- that.viewer.camera
- .positionCartographic
- .longitude,
- that.viewer.camera
- .positionCartographic
- .latitude,
- 340
- ),
- orientation: {
- // 指向
- heading:
- that.DC.Namespace.Cesium.Math.toRadians(
- 0,
- 0
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(
- -90
- ),
- roll: 0.0
- }
- })
- }
-
- if (height > 370) {
- that.viewer.camera.setView({
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromRadians(
- that.viewer.camera
- .positionCartographic
- .longitude,
- that.viewer.camera
- .positionCartographic
- .latitude,
- 400
- ),
- orientation: {
- // 指向
- heading:
- that.DC.Namespace.Cesium.Math.toRadians(
- 0,
- 0
- ),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(
- -90
- ),
- roll: 0.0
- }
- })
- }
- }
- }
- )
+ this.$store.commit("SET_PANORAMAPOPUP", false);
+ this.$store.commit("SET_MONITORPOPUP", false);
+ this.$store.commit("SET_DETAILSPOPUP", true);
}
+ });
+
+ this.viewer.flyToPosition(
+ new this.DC.Position(
+ Number(e.wgs84Position.lng + 0.00070806),
+ Number(e.wgs84Position.lat - 0.00261205),
+ 300,
+ Number(-9),
+ Number(-34.54),
+ Number(0)
+ )
+ );
}
- }
- },
- methods: {
- dimensionChange () {
- var that = this
- that.$store.commit('SET_TWOORTHREE', that.dimensionValue)
- if (that.dimensionValue == '真三维') {
- // that.wallLayer.show = false
- that.areaLayer.show = false
- that.viewer.imageryLayers.remove(that.newLayer)
- that.newLayer = null
- // that.viewer.imageryLayers.remove(that.baseLayer)
- that.baseLayer = null
- // that.vecLayer = that.viewer.imageryLayers.addImageryProvider(new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
- // url: ' http://t1.tianditu.gov.cn/vec_w/wmts?tk=9ae78c51a0a28f06444d541148496e36',
- // type: 'wmts',
- // layer: 'vec',
- // style: 'default',
- // format: 'tiles',
- // tileMatrixSetID: 'w',
- // show: true,
- // maximumLevel: 18
- // }))
+ });
- // that.cvaLayer = that.viewer.imageryLayers.addImageryProvider(new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
- // url: ' http://t1.tianditu.gov.cn/cva_w/wmts?tk=9ae78c51a0a28f06444d541148496e36',
- // type: 'wmts',
- // layer: 'cva',
- // style: 'default',
- // format: 'tiles',
- // tileMatrixSetID: 'w',
- // show: true,
- // maximumLevel: 18
- // }))
- that.silhouetteBlue.selected = []
- that.tilesetLayer.show = true
- // 最小
- that.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 1.0
- // 最大
- that.viewer.scene.screenSpaceCameraController.maximumZoomDistance =
- Number.POSITIVE_INFINITY
- // 视角旋转
- that.viewer.scene.screenSpaceCameraController.enableTilt = true
+ // that.tileset.on(that.DC.MouseEventType.MOUSE_MOVE, e => {
+ // that.silhouetteBlue.selected = []
- that.viewer.camera.setView({
- // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
- // fromDegrees()方法,将经纬度和高程转换为世界坐标
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromDegrees(
- 114.04062292,
- 27.62666834,
- 220.0
- ),
- orientation: {
- // 指向
- heading: that.DC.Namespace.Cesium.Math.toRadians(-9),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(-34.54),
- roll: 0.0
- }
- })
+ // if (that.DC.Namespace.Cesium.defined(highlighted.feature)) {
+ // highlighted.feature.color = highlighted.originalColor
+ // highlighted.feature = undefined
+ // }
+
+ // if (e.feature !== selected.feature) {
+ // that.silhouetteBlue.selected = [e.feature]
+
+ // highlighted.feature = e.feature
+
+ // that.DC.Namespace.Cesium.Color.clone(
+ // e.feature.color,
+ // highlighted.originalColor
+ // )
+ // e.feature.color = that.DC.Namespace.Cesium.Color.fromBytes(155, 255, 175)
+ // }
+ // })
+
+ // var provider = new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
+ // url: 'http://www.tdtfz.com/OneMapServer/rest/services/fzsw2019/MapServer/WMTS/tile/1.0.0/fzsw2019/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}',
+ // layer: 'fzsw2019',
+ // style: 'default',
+ // tileMatrixSetID: 'default028mm',
+ // format: 'image/jpgpng',
+ // tilingScheme: new that.DC.Namespace.Cesium.GeographicTilingScheme(),
+ // maximumLevel: 19,
+ // tileMatrixLabels: [
+ // '0',
+ // '1',
+ // '2',
+ // '3',
+ // '4',
+ // '5',
+ // '6',
+ // '7',
+ // '8',
+ // '9',
+ // '10',
+ // '11',
+ // '12',
+ // '13',
+ // '14',
+ // '15',
+ // '16',
+ // '17',
+ // '18',
+ // '19'
+ // ]
+ // })
+
+ var provider =
+ new that.DC.Namespace.Cesium.UrlTemplateImageryProvider({
+ url: "/wp/{z}/{x}/{y}.png",
+ fileExtension: "png",
+ // minimumLevel: 19
+ });
+
+ var baseProvider =
+ new that.DC.Namespace.Cesium.UrlTemplateImageryProvider({
+ url: "/base/{z}/{x}/{y}.png",
+ fileExtension: "png",
+ });
+
+ // that.baseLayer = that.viewer.imageryLayers.addImageryProvider(baseProvider)
+ that.newLayer =
+ that.viewer.imageryLayers.addImageryProvider(provider);
+
+ that.wallLayer = new that.DC.VectorLayer("wallLayer");
+ // that.viewer.addLayer(that.wallLayer)
+
+ that.wallArr.forEach((item) => {
+ item = item.join(",");
+ });
+ that.wallArr = that.wallArr.join(";");
+ const wall = new that.DC.Wall(that.wallArr);
+ wall.setStyle({
+ material: new that.DC.WallTrailMaterialProperty({
+ color: that.DC.Namespace.Cesium.Color.fromBytes(0, 142, 255, 150),
+ // color: that.DC.Color.CYAN,
+ speed: 10,
+ }),
+ });
+ // that.wallLayer.addOverlay(wall)
+
+ // that.viewer.camera.setView({
+ // // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ // destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(114.03928791, 27.62954732, 400.0),
+ // orientation: {
+ // // 指向
+ // heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // // 视角
+ // pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ // roll: 0.0
+ // }
+ // })
+
+ // setTimeout(() => {
+ // that.viewer.camera.flyTo({
+ // // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ // destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(114.0351, 27.6314, 200.0),
+ // duration: 5,
+ // complete: () => {
+ // that.viewer.camera.flyTo({
+ // // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ // destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(114.0351, 27.6314, 200.0),
+ // orientation: {
+ // // 指向
+ // heading: that.DC.Namespace.Cesium.Math.toRadians(108),
+ // // 视角
+ // pitch: that.DC.Namespace.Cesium.Math.toRadians(-26.46),
+ // roll: 0.0
+ // }
+ // })
+ // }
+ // })
+ // }, 400)
+ that.titlesetLayerFlag = true;
+
+ that.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+ that.mapCenter[0],
+ that.mapCenter[1],
+ that.mapCenter[2]
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+
+ // 最小
+ that.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 220;
+ // 最大
+ that.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400;
+
+ // 设置相机缩小时的速率
+ that.viewer.scene.screenSpaceCameraController._minimumZoomRate = 2000;
+ // 设置相机放大时的速率
+ that.viewer.scene.screenSpaceCameraController._maximumZoomRate = 5906376272000;
+ // 视角平移
+ that.viewer.scene.screenSpaceCameraController.enableRotate = true;
+ // 视角缩放
+ that.viewer.scene.screenSpaceCameraController.enableZoom = true;
+ // 视角旋转
+ that.viewer.scene.screenSpaceCameraController.enableTilt = false;
+
+ axios
+ .get(
+ "http://arcgis.jxpskj.com:6080/arcgis/rest/services/lxxqwxq/MapServer/0/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&returnTrueCurves=false&resultOffset=&resultRecordCount=&f=pjson"
+ )
+ .then((resultData) => {
+ resultData.data.features.forEach((item) => {
+ item.geometry.rings[0].forEach((it) => {
+ it = it.join(",");
+ });
+
+ item.geometry.rings[0] = item.geometry.rings[0].join(";");
+
+ const polygon = new that.DC.Polygon(item.geometry.rings[0]);
+ polygon.attr = item.attributes;
+
+ polygon.setStyle({
+ material: that.DC.Namespace.Cesium.Color.fromBytes(
+ 255,
+ 255,
+ 255,
+ 1
+ ),
+ });
+
+ that.areaLayer.addOverlay(polygon);
+ });
+
+ that.areaLayer.show = true;
+ });
+
+ var select = {
+ overlay: undefined,
+ color: undefined,
+ };
+
+ that.viewer.on(that.DC.MouseEventType.MOUSE_MOVE, (e) => {
+ if (that.closeMapClick) {
+ return;
+ }
+ if (e.overlay != undefined && e.layer.id == "areaLayer") {
+ if (select.overlay != undefined) {
+ if (e.overlay != select.overlay) {
+ select.overlay.setStyle({
+ material: select.color,
+ outline: false,
+ });
+
+ select.overlay = undefined;
+ select.color = undefined;
+ }
+ }
+
+ if (select.overlay == undefined) {
+ select.overlay = e.overlay;
+
+ select.color = e.overlay._style.material;
+ select.overlay.setStyle({
+ outline: true,
+ outlineColor: that.DC.Namespace.Cesium.Color.fromBytes(
+ 3,
+ 255,
+ 13,
+ 255
+ ), // 边框颜色
+ outlineWidth: 10, // 边框大小,
+ height: 0.01,
+ material: that.DC.Namespace.Cesium.Color.fromBytes(
+ 108,
+ 245,
+ 113,
+ 158
+ ),
+ });
+ }
} else {
- that.tilesetLayer.show = false
- // that.viewer.imageryLayers.remove(that.vecLayer)
- // that.vecLayer = null
- // that.viewer.imageryLayers.remove(that.cvaLayer)
- // that.cvaLayer = null
- that.areaLayer.show = true
+ if (select.overlay != undefined) {
+ select.overlay.setStyle({
+ material: select.color,
+ outline: false,
+ });
- // var provider = new that.DC.Namespace.Cesium.ArcGisMapServerImageryProvider({
- // url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/PingXiang25DMapQP/MapServer'
- // })
-
- var provider =
- new that.DC.Namespace.Cesium.UrlTemplateImageryProvider({
- url: '/wp/{z}/{x}/{y}.png',
- fileExtension: 'png'
- })
-
- var baseProvider =
- new that.DC.Namespace.Cesium.UrlTemplateImageryProvider({
- url: '/base/{z}/{x}/{y}.png',
- fileExtension: 'png'
- })
-
- // that.baseLayer = that.viewer.imageryLayers.addImageryProvider(baseProvider)
- that.newLayer =
- that.viewer.imageryLayers.addImageryProvider(provider)
-
- // that.wallLayer.show = true
-
- that.viewer.camera.setView({
- // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
- // fromDegrees()方法,将经纬度和高程转换为世界坐标
- destination:
- that.DC.Namespace.Cesium.Cartesian3.fromDegrees(
- 114.04001675,
- 27.62935375,
- 400.0
- ),
- orientation: {
- // 指向
- heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
- roll: 0.0
- }
- })
- // 最小
- that.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 220
- // 最大
- that.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400
- // 视角旋转
- that.viewer.scene.screenSpaceCameraController.enableTilt = false
+ select.overlay = undefined;
+ select.color = undefined;
+ }
}
+ });
+
+ that.viewer.on(that.DC.MouseEventType.CLICK, (e) => {
+ if (that.closeMapClick) {
+ return;
+ }
+ if (e.overlay != undefined && e.layer.id == "areaLayer") {
+ var rid =
+ e.overlay.attr["楼栋号"] == "8栋"
+ ? "9栋"
+ : e.overlay.attr["楼栋号"] == "9栋"
+ ? "8栋"
+ : e.overlay.attr["楼栋号"];
+ this.$store.commit("CLEAR_ALL", null);
+ getDetail({ mechanismname: "香琴湾" + rid }).then((res) => {
+ that.viewer.scene.globe.depthTestAgainstTerrain = false;
+ var result = res.data.data;
+
+ var imgArr = result.tpurl.split(",");
+ this.$store.commit("SET_POPUPBGURL", imgArr[0]);
+ this.$store.commit("SET_POPUPQRURL", result.codeurl);
+ this.$store.commit("SET_POINTPOSITION", [
+ Number(e.wgs84Position.lng),
+ Number(e.wgs84Position.lat),
+ Number(e.wgs84Position.alt),
+ Number(0),
+ Number(0),
+ Number(0),
+ ]);
+ this.$store.commit("SET_STATENAME", result.mechanismname);
+ this.$store.commit("SET_SITENAME", result.address);
+ this.$store.commit("SET_TELEPHONE", result.telephone);
+ this.$store.commit("SET_INTRODUCETEXT", result.introduce);
+ this.$store.commit("SET_PANORAMAURL", result.panoramaurl);
+ this.$store.commit("SET_POPUPIMGATLAS", imgArr);
+ if (result.videourl && result.videourl != "") {
+ this.$store.commit("SET_MONITORURL", result.videourl);
+ }
+ if (result.jx != undefined && result.jx != "") {
+ var tabOne = res.data.data[0].jx.split(",");
+ this.$store.commit("SET_TEACHLIST", tabOne);
+ } else {
+ this.$store.commit("SET_TEACHLIST", []);
+ }
+
+ if (result.sh != undefined && result.sh != "") {
+ var tabTwo = res.data.data[0].sh.split(",");
+ this.$store.commit("SET_LIVELIST", tabTwo);
+ } else {
+ this.$store.commit("SET_LIVELIST", []);
+ }
+
+ // 定制化窗体
+ // eslint-disable-next-line no-unused-vars
+ var popup = new that.DC.DivForms(that.viewer, {
+ domId: "divFormsDomBox",
+ position: [
+ that.DC.Transform.transformWGS84ToCartesian(
+ new that.DC.Position(
+ Number(e.wgs84Position.lng),
+ Number(e.wgs84Position.lat),
+ Number(e.wgs84Position.alt)
+ )
+ ),
+ ],
+ });
+
+ this.$store.commit("SET_PANORAMAPOPUP", false);
+ this.$store.commit("SET_MONITORPOPUP", false);
+ this.$store.commit("SET_DETAILSPOPUP", true);
+ });
+
+ this.viewer.flyToPosition(
+ new this.DC.Position(
+ Number(e.wgs84Position.lng),
+ Number(e.wgs84Position.lat),
+ 300,
+ Number(0),
+ Number(-90),
+ Number(0)
+ ),
+ () => {},
+ 0
+ );
+ }
+ });
+
+ document.querySelector(".dc-zoom-controller").children[1].onclick =
+ function () {
+ if (that.dimensionValue == "真三维") {
+ that.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+ that.mapCenter[0],
+ that.mapCenter[1],
+ 220.0
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(-9),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-34.54),
+ roll: 0.0,
+ },
+ });
+ } else {
+ that.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+ that.mapCenter[0],
+ that.mapCenter[1],
+ 400.0
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+ }
+ };
+
+ document.querySelector(".dc-zoom-controller").children[2].onclick =
+ function () {
+ if (
+ that.dimensionValue != undefined &&
+ that.dimensionValue != "真三维"
+ ) {
+ const height = Math.ceil(
+ that.viewer.camera.positionCartographic.height
+ );
+
+ if (height <= 250) {
+ that.viewer.camera.setView({
+ destination:
+ that.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ that.viewer.camera.positionCartographic.longitude,
+ that.viewer.camera.positionCartographic.latitude,
+ 280
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+ }
+
+ if (height > 250 && height <= 310) {
+ that.viewer.camera.setView({
+ destination:
+ that.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ that.viewer.camera.positionCartographic.longitude,
+ that.viewer.camera.positionCartographic.latitude,
+ 340
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+ }
+
+ if (height > 310 && height < 370) {
+ that.viewer.camera.setView({
+ destination:
+ that.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ that.viewer.camera.positionCartographic.longitude,
+ that.viewer.camera.positionCartographic.latitude,
+ 400
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+ }
+ }
+ };
+
+ document.querySelector(".dc-zoom-controller").children[0].onclick =
+ function () {
+ if (
+ that.dimensionValue != undefined &&
+ that.dimensionValue != "真三维"
+ ) {
+ const height = Math.ceil(
+ that.viewer.camera.positionCartographic.height
+ );
+
+ if (height > 370) {
+ that.viewer.camera.setView({
+ destination:
+ that.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ that.viewer.camera.positionCartographic.longitude,
+ that.viewer.camera.positionCartographic.latitude,
+ 340
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+
+ return;
+ }
+
+ if (height > 310) {
+ that.viewer.camera.setView({
+ destination:
+ that.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ that.viewer.camera.positionCartographic.longitude,
+ that.viewer.camera.positionCartographic.latitude,
+ 280
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+
+ return;
+ }
+
+ if (height > 250) {
+ that.viewer.camera.setView({
+ destination:
+ that.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ that.viewer.camera.positionCartographic.longitude,
+ that.viewer.camera.positionCartographic.latitude,
+ 220
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+ }
+ }
+ };
+
+ that.viewer.on(that.DC.SceneEventType.CAMERA_CHANGED, () => {
+ if (
+ that.dimensionValue != undefined &&
+ that.dimensionValue != "真三维"
+ ) {
+ const height = Math.ceil(
+ that.viewer.camera.positionCartographic.height
+ );
+
+ that.viewer.camera.setView({
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+
+ if (height <= 250) {
+ that.viewer.camera.setView({
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ that.viewer.camera.positionCartographic.longitude,
+ that.viewer.camera.positionCartographic.latitude,
+ 220
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+ }
+
+ if (height > 250 && height <= 310) {
+ that.viewer.camera.setView({
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ that.viewer.camera.positionCartographic.longitude,
+ that.viewer.camera.positionCartographic.latitude,
+ 280
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+ }
+
+ if (height > 310 && height <= 370) {
+ that.viewer.camera.setView({
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ that.viewer.camera.positionCartographic.longitude,
+ that.viewer.camera.positionCartographic.latitude,
+ 340
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+ }
+
+ if (height > 370) {
+ that.viewer.camera.setView({
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ that.viewer.camera.positionCartographic.longitude,
+ that.viewer.camera.positionCartographic.latitude,
+ 400
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+ }
+ }
+ });
}
- }
-}
+ },
+ },
+ },
+ methods: {
+ // openPopups(lng, lat, alt) {
+ // var popup = new that.DC.DivForms(that.viewer, {
+ // domId: "divFormsDomBox",
+ // position: [
+ // that.DC.Transform.transformWGS84ToCartesian(
+ // new that.DC.Position(Number(lng), Number(lat), Number(alt))
+ // ),
+ // ],
+ // });
+ // },
+ dimensionChange() {
+ var that = this;
+ that.$store.commit("SET_TWOORTHREE", that.dimensionValue);
+ if (that.dimensionValue == "真三维") {
+ // that.wallLayer.show = false
+ that.areaLayer.show = false;
+ that.viewer.imageryLayers.remove(that.newLayer);
+ that.newLayer = null;
+ // that.viewer.imageryLayers.remove(that.baseLayer)
+ that.baseLayer = null;
+ // that.vecLayer = that.viewer.imageryLayers.addImageryProvider(new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
+ // url: ' http://t1.tianditu.gov.cn/vec_w/wmts?tk=9ae78c51a0a28f06444d541148496e36',
+ // type: 'wmts',
+ // layer: 'vec',
+ // style: 'default',
+ // format: 'tiles',
+ // tileMatrixSetID: 'w',
+ // show: true,
+ // maximumLevel: 18
+ // }))
+
+ // that.cvaLayer = that.viewer.imageryLayers.addImageryProvider(new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
+ // url: ' http://t1.tianditu.gov.cn/cva_w/wmts?tk=9ae78c51a0a28f06444d541148496e36',
+ // type: 'wmts',
+ // layer: 'cva',
+ // style: 'default',
+ // format: 'tiles',
+ // tileMatrixSetID: 'w',
+ // show: true,
+ // maximumLevel: 18
+ // }))
+ that.silhouetteBlue.selected = [];
+ that.tilesetLayer.show = true;
+ // 最小
+ that.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 1.0;
+ // 最大
+ that.viewer.scene.screenSpaceCameraController.maximumZoomDistance =
+ Number.POSITIVE_INFINITY;
+ // 视角旋转
+ that.viewer.scene.screenSpaceCameraController.enableTilt = true;
+ // 115.877863,28.741661
+ that.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+ that.mapCenter[0],
+ that.mapCenter[1],
+ 220.0
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(-9),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-34.54),
+ roll: 0.0,
+ },
+ });
+ } else {
+ that.tilesetLayer.show = false;
+ // that.viewer.imageryLayers.remove(that.vecLayer)
+ // that.vecLayer = null
+ // that.viewer.imageryLayers.remove(that.cvaLayer)
+ // that.cvaLayer = null
+ that.areaLayer.show = true;
+
+ // var provider = new that.DC.Namespace.Cesium.ArcGisMapServerImageryProvider({
+ // url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/PingXiang25DMapQP/MapServer'
+ // })
+
+ var provider = new that.DC.Namespace.Cesium.UrlTemplateImageryProvider({
+ url: "/wp/{z}/{x}/{y}.png",
+ fileExtension: "png",
+ });
+
+ var baseProvider =
+ new that.DC.Namespace.Cesium.UrlTemplateImageryProvider({
+ url: "/base/{z}/{x}/{y}.png",
+ fileExtension: "png",
+ });
+
+ // that.baseLayer = that.viewer.imageryLayers.addImageryProvider(baseProvider)
+ that.newLayer = that.viewer.imageryLayers.addImageryProvider(provider);
+
+ // that.wallLayer.show = true
+
+ that.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+ that.mapCenter[0],
+ that.mapCenter[1],
+ 400.0
+ ),
+ orientation: {
+ // 指向
+ heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+ // 最小
+ that.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 220;
+ // 最大
+ that.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400;
+ // 视角旋转
+ that.viewer.scene.screenSpaceCameraController.enableTilt = false;
+ }
+ },
+ },
+};
</script>
<style lang="scss" scoped>
.dimension-cut {
- position: fixed;
- top: 100px;
- right: 10px;
- width: auto;
- // height: 40px;
- z-index: 1;
+ position: fixed;
+ top: 100px;
+ right: 10px;
+ width: auto;
+ // height: 40px;
+ z-index: 1;
}
</style>
diff --git a/src/components/map/components/mapPopup.vue b/src/components/map/components/mapPopup.vue
index 1d5704e..f1a6e25 100644
--- a/src/components/map/components/mapPopup.vue
+++ b/src/components/map/components/mapPopup.vue
@@ -261,6 +261,46 @@
</div>
</div>
</div>
+
+ <div v-if="labelLayerDataShow" class="divForms-dom" id="labelLayerid">
+ <div style="width: 100%; height: 100%">
+ <div class="divForms divForms-theme">
+ <div class="divForms-wrap">
+ <div class="area">
+ <div class="arrow-lt"></div>
+ <div class="b-t"></div>
+ <div class="b-r"></div>
+ <div class="b-b"></div>
+ <div class="b-l"></div>
+ <div class="arrow-rb"></div>
+ <div class="label-wrap">
+ <div class="title">
+ {{ nowlabelLayerData.name }} 二维码分享
+ <img
+ @click="closelabelLayerid"
+ class="close-box"
+ src="/img/navicon/close.png"
+ alt
+ />
+ </div>
+ <div class="add-tag-content" style="height: 250px">
+ <!-- data:image/png;base64, -->
+ <img
+ :src="nowlabelLayerData.qrcode"
+ alt=""
+ class="labelLayeridewm"
+ style="width:250px,height:250px"
+ />
+ </div>
+ </div>
+ </div>
+ <div class="b-t-l"></div>
+ <div class="b-b-r"></div>
+ </div>
+ <div class="arrow"></div>
+ </div>
+ </div>
+ </div>
</div>
<!-- 二维码弹框相关 -->
@@ -367,10 +407,13 @@
"teachList",
// 科研
"liveList",
- // 社区内导航的显示关闭
+ // 校区内导航的显示关闭
"campusNavFlag",
"addTagPopup",
"addTagPosition",
+ //自定义标签弹窗
+ "labelLayerDataShow",
+ "nowlabelLayerData",
]),
},
created() {
@@ -387,6 +430,12 @@
},
mounted() {},
watch: {
+ addTagPopup() {
+ if (!this.addTagPopup) {
+ // console.log("取消", "see");
+ this.$store.commit("set_closeMapClick", false);
+ }
+ },
introduceText: {
immediate: true,
handler(newQuestion, oldQuestion) {
@@ -533,7 +582,11 @@
closeAddTagBox() {
this.$store.commit("SET_ADDTAGPOPUP", false);
},
-
+ closelabelLayerid() {
+ this.$store.commit("openLabelLayer", {
+ show: false,
+ });
+ },
createTag() {
var that = this;
@@ -576,7 +629,10 @@
that.addTagName = "";
});
let doit = () => {
- that.$store.commit("addLabelLayerIcon", { list: [data], add: true });
+ that.$store.dispatch("addLabelLayerIcon", {
+ // list: [data],
+ add: true,
+ });
// const divIcon = new this.DC.DivIcon(
// new that.DC.Position(
// Number(that.addTagPosition.lng),
@@ -693,4 +749,9 @@
};
</script>
-<style></style>
+<style>
+.labelLayeridewm {
+ width: 250px !important;
+ height: 250px !important;
+}
+</style>
diff --git a/src/components/map/index.vue b/src/components/map/index.vue
index 7546c3d..107f639 100644
--- a/src/components/map/index.vue
+++ b/src/components/map/index.vue
@@ -1,394 +1,398 @@
/* eslint-disable camelcase */
<template>
- <div id="viewer-container" style="height: 100%; width: 100%;" @click="mapClick($event)">
- <video
- id="video"
- style="position: fixed;
- visibility: hidden;"
- muted
- autoplay
- loop
- crossorigin
- controls
- >
- <source src="http://dc.dvgis.cn/examples/data/demo.mp4" type="video/mp4" />
- </video>
+ <div
+ id="viewer-container"
+ style="height: 100%; width: 100%"
+ @click="mapClick($event)"
+ >
+ <video
+ id="video"
+ style="position: fixed; visibility: hidden"
+ muted
+ autoplay
+ loop
+ crossorigin
+ controls
+ >
+ <source
+ src="http://dc.dvgis.cn/examples/data/demo.mp4"
+ type="video/mp4"
+ />
+ </video>
- <div
- style="
- position: fixed;
- left: 4px;
- bottom: 4px;
- width: 80px;
- line-height: 24px;
- text-align: center;
- color: #fff;
- font-size: 14px;
- border-radius: 4px;
- background: #2196f3ed;
- z-index: 11;
- "
- >智慧社区</div>
-
- <dimension :areaLayer="areaLayer" />
-
- <left-nav ref="leftNav"></left-nav>
-
- <mapPopup />
-
- <campusBuildingSearch ref="campusBuildingSearch" />
-
- <campusNav ref="campusNavRoute" v-show="campusNavFlag" />
-
- <search-details v-if="searchPopupFlag"></search-details>
- <org-nav-bar v-if="orgNavBarFlag"></org-nav-bar>
- <arc-nav-bar v-if="arcNavBarFlag"></arc-nav-bar>
+ <div
+ style="
+ position: fixed;
+ left: 4px;
+ bottom: 4px;
+ width: 80px;
+ line-height: 24px;
+ text-align: center;
+ color: #fff;
+ font-size: 14px;
+ border-radius: 4px;
+ background: #2196f3ed;
+ z-index: 11;
+ "
+ >
+ 智慧校区
</div>
+
+ <dimension :areaLayer="areaLayer" />
+
+ <left-nav ref="leftNav"></left-nav>
+
+ <mapPopup />
+
+ <campusBuildingSearch ref="campusBuildingSearch" />
+
+ <campusNav ref="campusNavRoute" v-show="campusNavFlag" />
+
+ <search-details v-if="searchPopupFlag"></search-details>
+ <org-nav-bar v-if="orgNavBarFlag"></org-nav-bar>
+ <arc-nav-bar v-if="arcNavBarFlag"></arc-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
-import mapPopup from './components/mapPopup.vue'
-import campusBuildingSearch from './components/campusBuildingSearch.vue'
-import dimension from './components/dimension.vue'
+import { mapGetters } from "vuex";
+import mapPopup from "./components/mapPopup.vue";
+import campusBuildingSearch from "./components/campusBuildingSearch.vue";
+import dimension from "./components/dimension.vue";
export default {
- name: 'mapBox',
- components: {
- mapPopup,
- campusBuildingSearch,
- dimension
+ name: "mapBox",
+ components: {
+ mapPopup,
+ campusBuildingSearch,
+ dimension,
+ },
+ data() {
+ return {
+ DC: null,
+ areaLayer: null,
+ };
+ },
+ watch: {
+ searchPopupFlag: {
+ immediate: true,
+ handler(newVal, oldVal) {
+ if (newVal == true) {
+ if (this.$route.path.indexOf("/pcLayout/default/service") != -1) {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ }
+
+ if (this.$route.path.indexOf("/orgnav") != -1) {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
+ }
+
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
+ }
+
+ if (this.$route.path.indexOf("/arc") != -1) {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ }
+ },
},
- data () {
- return {
- DC: null,
- areaLayer: null
+
+ orgNavBarFlag: {
+ immediate: true,
+ handler(newVal, oldVal) {
+ if (newVal == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
}
+ },
},
- watch: {
- searchPopupFlag: {
- immediate: true,
- handler (newVal, oldVal) {
- if (newVal == true) {
- if (this.$route.path.indexOf('/pcLayout/default/service') != -1) {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
- if (this.$route.path.indexOf('/orgnav') != -1) {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
-
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
-
- if (this.$route.path.indexOf('/arc') != -1) {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
-
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- }
- }
- },
-
- orgNavBarFlag: {
- immediate: true,
- handler (newVal, oldVal) {
- if (newVal == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- }
- },
-
- arcNavBarFlag: {
- immediate: true,
- handler (newVal, oldVal) {
- if (newVal == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- }
+ arcNavBarFlag: {
+ immediate: true,
+ handler(newVal, oldVal) {
+ if (newVal == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
}
+ },
},
- computed: {
- ...mapGetters([
- 'viewer',
- 'popupBgUrl',
- 'pupupQRUrl',
- // 终点
- 'terminus',
- // 起点
- 'startingPoint',
- // 点信息
- 'pointPosition',
- // 点名称
- 'stateName',
- // 地址
- 'siteName',
- // 介绍
- 'introduceText',
- // 全景地址
- 'panoramaUrl',
- // 详情弹框显示关闭
- 'detailsPopup',
- // 全景弹框显示关闭
- 'panoramaPopup',
- // 社区内导航的显示关闭
- 'campusNavFlag',
- 'orgNavBarFlag',
- 'arcNavBarFlag',
- 'searchPopupFlag'
- ])
- },
- mounted () {
- var that = this
+ },
+ computed: {
+ ...mapGetters([
+ "viewer",
+ "popupBgUrl",
+ "pupupQRUrl",
+ // 终点
+ "terminus",
+ // 起点
+ "startingPoint",
+ // 点信息
+ "pointPosition",
+ // 点名称
+ "stateName",
+ // 地址
+ "siteName",
+ // 介绍
+ "introduceText",
+ // 全景地址
+ "panoramaUrl",
+ // 详情弹框显示关闭
+ "detailsPopup",
+ // 全景弹框显示关闭
+ "panoramaPopup",
+ // 校区内导航的显示关闭
+ "campusNavFlag",
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "searchPopupFlag",
+ ]),
+ },
+ mounted() {
+ var that = this;
- let viewer
+ let viewer;
- that.DC = global.DC
+ that.DC = global.DC;
- function distanceSurface () {
- viewer.measure.distanceSurface()
- }
-
- function calcArea () {
- viewer.measure.area()
- }
-
- function areaSurface () {
- viewer.measure.areaSurface()
- }
-
- function calcAngle () {
- viewer.measure.angle()
- }
-
- function calcModelAngle () {
- viewer.measure.angle({
- clampToModel: true
- })
- }
-
- function calcHeight () {
- viewer.measure.height()
- }
-
- function calcModelHeight () {
- viewer.measure.height({
- clampToModel: true
- })
- }
-
- function calcHeading () {
- viewer.measure.heading()
- }
-
- function areaHeight () {
- viewer.measure.areaHeight()
- }
-
- function calcTriangleHeight () {
- viewer.measure.triangleHeight()
- }
-
- function calcModelTriangleHeight () {
- viewer.measure.triangleHeight({
- clampToModel: true
- })
- }
-
- function deactivate () {
- viewer.measure.deactivate()
- }
-
- function initViewer () {
- viewer = new that.DC.Viewer('viewer-container', {
- contextOptions: {
- webgl: {
- stencil: true,
- preserveDrawingBuffer: true
- }
- }
- })
-
- that.createdLayers(viewer)
-
- that.$store.commit('SET_VIEWER', viewer)
-
- that.$refs.leftNav.initialize(viewer)
-
- // const key = '0f7c1d161d7352116a21aacf0e9f44c1'
- // const vec = that.DC.ImageryLayerFactory.createTdtImageryLayer({
- // key
- // })
- // const cva = that.DC.ImageryLayerFactory.createTdtImageryLayer({
- // key,
- // style: 'cva'
- // })
- // viewer.addBaseLayer([vec, cva])
-
- // const areaLayer = new that.DC.VectorLayer('areaLayer')
-
- // viewer.addLayer(areaLayer)
-
- // axios.get('http://59.55.128.156:6080/arcgis/rest/services/xiajiangfhgc/MapServer/4/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&returnTrueCurves=false&resultOffset=&resultRecordCount=&f=pjson').then(resultData => {
- // resultData.data.features.forEach(item => {
- // item.geometry.rings[0].forEach(it => {
- // it = it.join(',')
- // })
-
- // item.geometry.rings[0] = item.geometry.rings[0].join(';')
-
- // const polygon = new that.DC.Polygon(item.geometry.rings[0])
-
- // polygon.setStyle({
-
- // material: that.DC.Namespace.Cesium.Color.fromBytes(255, 255, 255, 0)
-
- // })
-
- // areaLayer.addOverlay(polygon)
- // })
- // })
-
- // var select = {
- // overlay: undefined,
- // color: undefined
- // }
-
- // viewer.on(that.DC.MouseEventType.MOUSE_MOVE, e => {
- // if (e.overlay != undefined) {
- // if (select.overlay != undefined) {
- // if (e.overlay != select.overlay) {
- // select.overlay.setStyle({
- // material: select.color
- // })
-
- // select.overlay = undefined
- // select.color = undefined
- // }
- // }
-
- // if (select.overlay == undefined) {
- // select.overlay = e.overlay
-
- // select.color = e.overlay._style.material
- // select.overlay.setStyle({
-
- // material: that.DC.Namespace.Cesium.Color.fromBytes(32, 108, 247, 158)
-
- // })
- // }
- // } else {
- // if (select.overlay != undefined) {
- // select.overlay.setStyle({
- // material: select.color
- // })
-
- // select.overlay = undefined
- // select.color = undefined
- // }
- // }
- // })
-
- // viewer.on(that.DC.MouseEventType.CLICK, e => {
- // if (e.overlay != undefined) {
- // console.log(e.overlay.attr)
- // }
- // })
-
- // viewer.addBaseLayer(baselayer, {
- // iconUrl: 'examples/images/icon/img.png',
- // name: '影像'
- // })
-
- // viewer.addBaseLayer(wmtslayer, {
- // iconUrl: 'examples/images/icon/img.png',
- // name: '影像'
- // })
-
- // // eslint-disable-next-line camelcase
- // const baselayer_shaded = that.DC.ImageryLayerFactory.createArcGisImageryLayer({
- // url:
- // 'http://services.arcgisonline.com/arcgis/rest/services/World_Shaded_Relief/MapServer'
- // })
- // viewer.addBaseLayer(baselayer_shaded, {
- // iconUrl: 'examples/images/icon/elec.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: '地形'
- // })
-
- viewer.use(new that.DC.Measure())
-
- // viewer.flyToPosition(
- // new that.DC.Position(117.08489820, 31.65413916, 1500, 0, -90, 45)
- // )
-
- viewer.compass.enable = true
- viewer.zoomController.enable = true
- viewer.locationBar.enable = true
- viewer.hawkeyeMap.enable = true
- viewer.hawkeyeMap.addBaseLayer(
- that.DC.ImageryLayerFactory.createAmapImageryLayer(
- {
- crs: 'WGS84'
- }
- )
- )
- // viewer.distanceLegend.enable = true
- }
-
- that.DC.ready(initViewer)
- },
- methods: {
- mapClick (e) {
- this.$refs.campusNavRoute.shortcutShow(e)
- this.$refs.campusBuildingSearch.shortcutShow(e)
- },
-
- createdLayers (viewer) {
- const layerGroup = new this.DC.LayerGroup('modelBox')
- viewer.addLayerGroup(layerGroup)
-
- this.areaLayer = new this.DC.VectorLayer('areaLayer')
- layerGroup.addLayer(this.areaLayer)
- }
+ function distanceSurface() {
+ viewer.measure.distanceSurface();
}
-}
+
+ function calcArea() {
+ viewer.measure.area();
+ }
+
+ function areaSurface() {
+ viewer.measure.areaSurface();
+ }
+
+ function calcAngle() {
+ viewer.measure.angle();
+ }
+
+ function calcModelAngle() {
+ viewer.measure.angle({
+ clampToModel: true,
+ });
+ }
+
+ function calcHeight() {
+ viewer.measure.height();
+ }
+
+ function calcModelHeight() {
+ viewer.measure.height({
+ clampToModel: true,
+ });
+ }
+
+ function calcHeading() {
+ viewer.measure.heading();
+ }
+
+ function areaHeight() {
+ viewer.measure.areaHeight();
+ }
+
+ function calcTriangleHeight() {
+ viewer.measure.triangleHeight();
+ }
+
+ function calcModelTriangleHeight() {
+ viewer.measure.triangleHeight({
+ clampToModel: true,
+ });
+ }
+
+ function deactivate() {
+ viewer.measure.deactivate();
+ }
+
+ function initViewer() {
+ viewer = new that.DC.Viewer("viewer-container", {
+ contextOptions: {
+ webgl: {
+ stencil: true,
+ preserveDrawingBuffer: true,
+ },
+ },
+ });
+
+ that.createdLayers(viewer);
+
+ that.$store.commit("SET_VIEWER", viewer);
+
+ that.$refs.leftNav.initialize(viewer);
+
+ // const key = '0f7c1d161d7352116a21aacf0e9f44c1'
+ // const vec = that.DC.ImageryLayerFactory.createTdtImageryLayer({
+ // key
+ // })
+ // const cva = that.DC.ImageryLayerFactory.createTdtImageryLayer({
+ // key,
+ // style: 'cva'
+ // })
+ // viewer.addBaseLayer([vec, cva])
+
+ // const areaLayer = new that.DC.VectorLayer('areaLayer')
+
+ // viewer.addLayer(areaLayer)
+
+ // axios.get('http://59.55.128.156:6080/arcgis/rest/services/xiajiangfhgc/MapServer/4/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&returnTrueCurves=false&resultOffset=&resultRecordCount=&f=pjson').then(resultData => {
+ // resultData.data.features.forEach(item => {
+ // item.geometry.rings[0].forEach(it => {
+ // it = it.join(',')
+ // })
+
+ // item.geometry.rings[0] = item.geometry.rings[0].join(';')
+
+ // const polygon = new that.DC.Polygon(item.geometry.rings[0])
+
+ // polygon.setStyle({
+
+ // material: that.DC.Namespace.Cesium.Color.fromBytes(255, 255, 255, 0)
+
+ // })
+
+ // areaLayer.addOverlay(polygon)
+ // })
+ // })
+
+ // var select = {
+ // overlay: undefined,
+ // color: undefined
+ // }
+
+ // viewer.on(that.DC.MouseEventType.MOUSE_MOVE, e => {
+ // if (e.overlay != undefined) {
+ // if (select.overlay != undefined) {
+ // if (e.overlay != select.overlay) {
+ // select.overlay.setStyle({
+ // material: select.color
+ // })
+
+ // select.overlay = undefined
+ // select.color = undefined
+ // }
+ // }
+
+ // if (select.overlay == undefined) {
+ // select.overlay = e.overlay
+
+ // select.color = e.overlay._style.material
+ // select.overlay.setStyle({
+
+ // material: that.DC.Namespace.Cesium.Color.fromBytes(32, 108, 247, 158)
+
+ // })
+ // }
+ // } else {
+ // if (select.overlay != undefined) {
+ // select.overlay.setStyle({
+ // material: select.color
+ // })
+
+ // select.overlay = undefined
+ // select.color = undefined
+ // }
+ // }
+ // })
+
+ // viewer.on(that.DC.MouseEventType.CLICK, e => {
+ // if (e.overlay != undefined) {
+ // console.log(e.overlay.attr)
+ // }
+ // })
+
+ // viewer.addBaseLayer(baselayer, {
+ // iconUrl: 'examples/images/icon/img.png',
+ // name: '影像'
+ // })
+
+ // viewer.addBaseLayer(wmtslayer, {
+ // iconUrl: 'examples/images/icon/img.png',
+ // name: '影像'
+ // })
+
+ // // eslint-disable-next-line camelcase
+ // const baselayer_shaded = that.DC.ImageryLayerFactory.createArcGisImageryLayer({
+ // url:
+ // 'http://services.arcgisonline.com/arcgis/rest/services/World_Shaded_Relief/MapServer'
+ // })
+ // viewer.addBaseLayer(baselayer_shaded, {
+ // iconUrl: 'examples/images/icon/elec.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: '地形'
+ // })
+
+ viewer.use(new that.DC.Measure());
+
+ // viewer.flyToPosition(
+ // new that.DC.Position(117.08489820, 31.65413916, 1500, 0, -90, 45)
+ // )
+
+ viewer.compass.enable = true;
+ viewer.zoomController.enable = true;
+ viewer.locationBar.enable = true;
+ viewer.hawkeyeMap.enable = true;
+ viewer.hawkeyeMap.addBaseLayer(
+ that.DC.ImageryLayerFactory.createAmapImageryLayer({
+ crs: "WGS84",
+ })
+ );
+ // viewer.distanceLegend.enable = true
+ }
+
+ that.DC.ready(initViewer);
+ },
+ methods: {
+ mapClick(e) {
+ this.$refs.campusNavRoute.shortcutShow(e);
+ this.$refs.campusBuildingSearch.shortcutShow(e);
+ },
+
+ createdLayers(viewer) {
+ const layerGroup = new this.DC.LayerGroup("modelBox");
+ viewer.addLayerGroup(layerGroup);
+
+ this.areaLayer = new this.DC.VectorLayer("areaLayer");
+ layerGroup.addLayer(this.areaLayer);
+ },
+ },
+};
</script>
-<style lang='scss' scope>
-</style>
+<style lang="scss" scope></style>
diff --git a/src/components/mobilePopupOur/index.vue b/src/components/mobilePopupOur/index.vue
index 0252535..6a6f6b6 100644
--- a/src/components/mobilePopupOur/index.vue
+++ b/src/components/mobilePopupOur/index.vue
@@ -113,7 +113,7 @@
this.getListSearchMethod(this.mBigPopup.value);
return;
}
- this.choiceMain = this.popupOurOpenData.qurey; // 进入的主题:列:机构单位,社区建筑
+ this.choiceMain = this.popupOurOpenData.qurey; // 进入的主题:列:机构单位,校区建筑
this.choiceData = this.popupOurOpenData.main; //带入数据 包括name、type、method
this.choiceValue = this.popupOurOpenData.main[0].name;
@@ -192,10 +192,10 @@
const data = res.data.data;
let outList = [];
if (
- this.mBigPopup.name == "社区建筑" ||
+ this.mBigPopup.name == "校区建筑" ||
this.mBigPopup.name == "文化风景"
) {
- // 社区建筑使用该id获取具体信息
+ // 校区建筑使用该id获取具体信息
data.forEach((item) => {
let icon = item.tpurl ? item.tpurl.split(",") : item.id;
outList.push({
@@ -206,14 +206,14 @@
from: this.choiceMain,
video: item.videourl,
buts:
- this.mBigPopup.name == "社区建筑" ||
+ this.mBigPopup.name == "校区建筑" ||
this.mBigPopup.name == "文化风景"
? ["定位", "实景", "图集"]
: ["定位"],
});
});
} else if (this.mBigPopup.name == "活动") {
- // 社区建筑使用该id获取具体信息
+ // 校区建筑使用该id获取具体信息
data.records.forEach((item) => {
let icon = item.tpurl.split(",");
let useData = {
@@ -234,7 +234,7 @@
introduce: item.context,
video: item.videourl,
buts:
- that.mBigPopup.name == "社区建筑" ||
+ that.mBigPopup.name == "校区建筑" ||
that.mBigPopup.name == "文化风景"
? ["定位", "实景", "图集"]
: ["定位"],
@@ -273,7 +273,7 @@
introduce: item.introduce,
video: item.videourl,
buts:
- that.mBigPopup.name == "社区建筑" ||
+ that.mBigPopup.name == "校区建筑" ||
that.mBigPopup.name == "文化风景"
? ["定位", "实景", "图集"]
: ["定位"],
@@ -324,7 +324,7 @@
introduce: item.introduce,
video: item.videourl,
buts:
- that.mBigPopup.name == "社区建筑" ||
+ that.mBigPopup.name == "校区建筑" ||
that.mBigPopup.name == "文化风景"
? ["定位", "实景", "图集"]
: ["定位"],
diff --git a/src/components/mobilePopupOurAfter/index.vue b/src/components/mobilePopupOurAfter/index.vue
index 4b1d5f4..bdb46bc 100644
--- a/src/components/mobilePopupOurAfter/index.vue
+++ b/src/components/mobilePopupOurAfter/index.vue
@@ -6,7 +6,7 @@
<!-- v-if="mBigPopupAfter" -->
<div class="m_p_a_heard">
<div><i class="el-icon-menu icon"></i></div>
- 社区列表
+ 校区列表
<div @click="closeBigPopupAfter"><i class="el-icon-close icon"></i></div>
</div>
<div class="m_p_a_center">
@@ -71,7 +71,7 @@
<script>
import { mapGetters } from "vuex";
import { getList } from "@/api/mobile/orgnav/index"; // 机构单位
-import { getChildNavList } from "@/api/mobile/public/arc"; // 社区建筑
+import { getChildNavList } from "@/api/mobile/public/arc"; // 校区建筑
import {
// getListlivingFacilitiesr,
// getListsupermarket,
@@ -98,13 +98,13 @@
choiceValue: "",
choiceDataUp: [
{
- // seeName: "社区内机构导览",
+ // seeName: "校区内机构导览",
name: "机构单位",
icon: "el-icon-s-cooperation",
opendata: "openData1",
},
{
- name: "社区建筑",
+ name: "校区建筑",
opendata: "openData2",
icon: "el-icon-s-management",
},
@@ -145,27 +145,27 @@
// ],
],
openData1: [
- // { name: "党群机构", type: 1, method: getList },
- // { name: "职能部处", type: 2, method: getList },
+ { name: "党群机构", type: 1, method: getList },
+ { name: "职能部处", type: 2, method: getList },
{ name: "直属及附属单位", type: 3, method: getList },
- // { name: "教学与科研机构", type: 4, method: getList },
+ { name: "教学与科研机构", type: 4, method: getList },
{ name: "其他机构", type: 5, method: getList },
],
openData2: [
{ name: "行政办公", type: 1, method: getChildNavList },
- // { name: "教学科研", type: 2, method: getChildNavList },
- { name: "社区场馆", type: 3, method: getChildNavList },
- // { name: '宿舍公寓', type: 4, method: getChildNavList },
- // { name: '文化风景', type: 5, method: getChildNavList },
- // { name: '家属住宅', type: 6, method: getChildNavList },
+ { name: "教学科研", type: 2, method: getChildNavList },
+ { name: "校区场馆", type: 3, method: getChildNavList },
+ { name: "宿舍公寓", type: 4, method: getChildNavList },
+ { name: "文化风景", type: 5, method: getChildNavList },
+ { name: "家属住宅", type: 6, method: getChildNavList },
{ name: "其他楼宇", type: 7, method: getChildNavList },
],
// openData3: [
// { name: "食堂餐厅", type: 1, method: getListlivingFacilitiesr },
// { name: "购物超市", type: 2, method: getListsupermarket },
- // { name: "社区内医疗", type: 3, method: getListmedical },
+ // { name: "校区内医疗", type: 3, method: getListmedical },
// { name: "邮寄快递", type: 4, method: getListmail },
- // { name: "社区浴室", type: 5, method: getListbathroom },
+ // { name: "校区浴室", type: 5, method: getListbathroom },
// { name: "圈存机", type: 6, method: getListtransference },
// { name: "打字复印", type: 7, method: getListduplicate },
// { name: "AED", type: 8, method: getListaed },
@@ -175,21 +175,21 @@
// openData6: [{ name: "停车场", type: 1, method: getListparking }],
// openData5: [{ name: "出入口", type: 1, method: getListdoor }],
openData3: [
- // { name: "食堂餐厅", type: 1, method: getListLifeOnce },
- // { name: "购物超市", type: 2, method: getListLifeOnce },
- { name: "社区医疗", type: 3, method: getListLifeOnce },
- // { name: "邮寄快递", type: 4, method: getListLifeOnce },
- // { name: "社区浴室", type: 5, method: getListLifeOnce },
- // // { name: "圈存机", type: 6, method: getListLifeOnce },
- // { name: "打字复印", type: 7, method: getListLifeOnce },
- // { name: "银行网点", type: 8, method: getListLifeOnce },
- // { name: "AED", type: 9, method: getListLifeOnce },
- // { name: "通信营业厅", type: 10, method: getListLifeOnce },
+ { name: "食堂餐厅", type: 1, method: getListLifeOnce },
+ { name: "购物超市", type: 2, method: getListLifeOnce },
+ { name: "校区医疗", type: 3, method: getListLifeOnce },
+ { name: "邮寄快递", type: 4, method: getListLifeOnce },
+ { name: "校区浴室", type: 5, method: getListLifeOnce },
+ // { name: "圈存机", type: 6, method: getListLifeOnce },
+ { name: "打字复印", type: 7, method: getListLifeOnce },
+ { name: "银行网点", type: 8, method: getListLifeOnce },
+ { name: "AED", type: 9, method: getListLifeOnce },
+ { name: "通信营业厅", type: 10, method: getListLifeOnce },
{ name: "停车场", type: 11, method: getListLifeOnce },
{ name: "出入口", type: 12, method: getListLifeOnce },
],
openData4: [
- // { name: "文化风景", type: 5, method: getChildNavList }
+ { name: "文化风景", type: 5, method: getChildNavList },
{ name: "活动", type: 1, method: getActivity },
],
openData6: [{ name: "停车场", type: 11, method: getListLifeOnce }],
diff --git a/src/components/mobilePopupOurOnce/index.vue b/src/components/mobilePopupOurOnce/index.vue
index f69923c..31b3a54 100644
--- a/src/components/mobilePopupOurOnce/index.vue
+++ b/src/components/mobilePopupOurOnce/index.vue
@@ -65,7 +65,7 @@
this.srcList = this.onceData.icon;
this.icon = this.srcList[0];
}
- if (this.onceData.from == "社区建筑" || this.onceData.from == "文化风景") {
+ if (this.onceData.from == "校区建筑" || this.onceData.from == "文化风景") {
this.getOnceCampus(this.onceData.id);
} else {
this.ourData = this.onceData;
@@ -142,7 +142,7 @@
imgsDom.click();
}
},
- //"社区建筑"↓
+ //"校区建筑"↓
getOnceCampus(id) {
getChildNavDetail({ id: id }).then((res) => {
var result = res.data.data[0].list;
@@ -165,7 +165,7 @@
this.ourData = d;
});
},
- //"社区建筑"↑
+ //"校区建筑"↑
},
};
</script>
diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index f1560f0..7a3821e 100644
--- a/src/components/mobilemap/index.vue
+++ b/src/components/mobilemap/index.vue
@@ -29,7 +29,7 @@
<!-- 活动窗口 -->
<mobileActivity></mobileActivity>
<!-- 盖住左下角 -->
- <div class="cover_mobileMap">智慧社区</div>
+ <div class="cover_mobileMap">智慧校区</div>
<!-- 指示器 -->
<!-- <div class="heights">{{ heights }}---{{ heights1 }}</div> -->
</div>
@@ -87,6 +87,13 @@
[116.41526036, 27.95352217, 100],
],
areaLayer: null,
+ mapCenter: [115.871863, 28.743861, 400.0],
+ //控制4层缩放
+ onelayerNum: 80,
+ towlayerNum: 120,
+ threelayerNum: 160,
+ forlayerNum: 200,
+ frislayertHeight: 160, //默认高度
};
},
computed: {
@@ -102,6 +109,7 @@
"dimensionData",
"areaLayer", //绿布
"areaLayerSelect", //绿布颜色控制
+ "urlParameterData", //url 参数
]),
},
watch: {
@@ -118,6 +126,7 @@
},
},
mounted() {
+ // return;
var DC = global.DC;
this.DC = DC;
@@ -284,8 +293,11 @@
// if (height > 2000) {
// conBack(2000);
// }
- if (height <= 79 && isSet) {
- conBack(79);
+ // if (height <= 79 && isSet) {
+ // conBack(79);
+ // }
+ if (height <= that.onelayerNum - 1 && isSet) {
+ conBack(that.onelayerNum - 1);
}
// if (height > 220 && height <= 280 && isSet) {
// conBack(280);
@@ -296,8 +308,11 @@
// if (height > 340 && height <= 400 && isSet) {
// conBack(400);
// }
- if (height > 200 && isSet) {
- conBack(200);
+ // if (height > 200 && isSet) {
+ // conBack(200);
+ // }
+ if (height > that.forlayerNum && isSet) {
+ conBack(that.forlayerNum);
}
});
@@ -328,6 +343,19 @@
const height = Math.ceil(
viewer.camera.positionCartographic.height
);
+ // if (height > 180) {
+ // butSetViews(160);
+ // return;
+ // }
+
+ // if (height > 140) {
+ // butSetViews(120);
+ // return;
+ // }
+
+ // if (height > 100) {
+ // butSetViews(80);
+ // }
if (height > 180) {
butSetViews(160);
return;
@@ -812,7 +840,7 @@
};
that.dimension == "2.5D"
? doit2(
- [114.04020791, 27.62934732, 160.0],
+ [that.mapCenter[0], that.mapCenter[1], that.frislayertHeight],
// [114.04062292, 27.62666834, 220.0],
[
that.dimensionData.heading,
@@ -998,6 +1026,47 @@
DC.ready(initViewer);
setTimeout(() => {
that.butbut();
+ //判断是否有url参数
+ // console.log(that.urlParameterData);
+ if (typeof that.urlParameterData != "string") {
+ // console.log(that.urlParameterData);
+ that.$store.commit("initurlParameterLayer"); //初始化自定义标签图层
+ if (that.urlParameterData.methods == "goto") {
+ //url有定位的参数
+ // alert(that.urlParameterData.jd);
+ // alert(that.urlParameterData.wd);
+ // 创建标记
+ let dsa = {
+ list: [
+ {
+ name: that.urlParameterData.name || "无标题",
+ jd: that.urlParameterData.jd,
+ wd: that.urlParameterData.wd,
+ },
+ ],
+ clear: true,
+ };
+ that.$store.dispatch("addurlParameterLayerIcon", dsa);
+ // that.flytos(
+ // //飞入标记
+ // +that.urlParameterData.jd + 0.012,
+ // +that.urlParameterData.wd
+ // );
+
+ let d = {
+ position: {},
+ lntLat: [+that.urlParameterData.jd, +that.urlParameterData.wd],
+ query: {
+ introduce: "自定义标签",
+ address: "",
+ ...(that.urlParameterData || {}),
+ lntLat: [+that.urlParameterData.jd, +that.urlParameterData.wd],
+ },
+ useJWD: true, //仅使用经纬度
+ };
+ that.$store.dispatch("setMobileWindows", d);
+ }
+ }
}, 0);
},
methods: {
@@ -1012,6 +1081,15 @@
};
that.$store.dispatch("setMobileWindows", d);
},
+ flytos(jd, wd) {
+ this.$store.dispatch("mapFlyTo", {
+ lntLat: [jd, wd, 120], //114.04020791, 27.62934732
+ heading: 0,
+ pitch: -90,
+ roll: 0,
+ noOpen: true,
+ });
+ },
},
};
</script>
diff --git a/src/components/serviceNavBar/index.vue b/src/components/serviceNavBar/index.vue
index 6bc8a15..502c87a 100644
--- a/src/components/serviceNavBar/index.vue
+++ b/src/components/serviceNavBar/index.vue
@@ -1,166 +1,229 @@
<template>
- <public-box class="public-org-nav-bar">
- <template slot="public-box-header">
- <div class="title">
- <img class="icon deblurring" :src="headerLog" alt />
- <span>{{title}}</span>
- </div>
- <img class="close" src="/img/navicon/close.png" alt @click="closeModel" />
- </template>
- <template slot="public-box-content">
- <div class="tab" v-show="false">
- <ul>
- <li
- :class="{'on': item.flag}"
- v-for="(item, index) in titleList"
- :key="index"
- @click="topNavClick(item, index)"
- >{{ item.title }}</li>
- </ul>
- </div>
- <ul>
- <li
- v-for="(item, index) in itemNavList"
- :key="index"
- @click="mapPopup(item.details)"
- >
- <img :src="item.icon" alt />
- <span>{{item.navTitle}}</span>
- </li>
- </ul>
- </template>
- </public-box>
+ <public-box class="public-org-nav-bar">
+ <template slot="public-box-header">
+ <div class="title">
+ <img class="icon deblurring" :src="headerLog" alt />
+ <span>{{ title }}</span>
+ </div>
+ <img class="close" src="/img/navicon/close.png" alt @click="closeModel" />
+ </template>
+ <template slot="public-box-content">
+ <div class="tab" v-show="false">
+ <ul>
+ <li
+ :class="{ on: item.flag }"
+ v-for="(item, index) in titleList"
+ :key="index"
+ @click="topNavClick(item, index)"
+ >
+ {{ item.title }}
+ </li>
+ </ul>
+ </div>
+ <ul>
+ <li
+ v-for="(item, index) in itemNavList"
+ :key="index"
+ @click="mapPopup(item.details)"
+ >
+ <img :src="item.icon" alt />
+ <span>{{ item.navTitle }}</span>
+ </li>
+ </ul>
+ </template>
+ </public-box>
</template>
<script>
-import { mapGetters } from 'vuex'
-import {
- getList,
- getLifeList
-} from '@/api/pc/service/index'
+import { mapGetters } from "vuex";
+import { getList, getLifeList } from "@/api/pc/service/index";
export default {
- name: 'ServiceNavBar',
- data () {
- return {
- itemNavList: [],
- DC: null
- }
+ name: "ServiceNavBar",
+ data() {
+ return {
+ itemNavList: [],
+ DC: null,
+ ourLayer: null,
+ };
+ },
+ props: {
+ title: {
+ type: String,
},
- props: {
- title: {
- type: String
- },
- headerLog: {
- type: String
- },
- arcCode: {
- type: Number
- }
+ headerLog: {
+ type: String,
},
- computed: {
- ...mapGetters([
- 'viewer',
- 'popupBgUrl',
- 'pupupQRUrl',
- // 点信息
- 'pointPosition',
- // 点名称
- 'stateName',
- // 地址
- 'siteName',
- // 介绍
- 'introduceText',
- // 全景地址
- 'panoramaUrl'
- ])
+ arcCode: {
+ type: Number,
},
- created () {
- this.DC = global.DC
- this.titleList = []
- getList().then(res => {
- res.data.data.forEach(item => {
- this.titleList.push({ title: item.dictValue, flag: false, key: item.dictKey })
- })
+ },
+ computed: {
+ ...mapGetters([
+ "viewer",
+ "popupBgUrl",
+ "pupupQRUrl",
+ // 点信息
+ "pointPosition",
+ // 点名称
+ "stateName",
+ // 地址
+ "siteName",
+ // 介绍
+ "introduceText",
+ // 全景地址
+ "panoramaUrl",
+ ]),
+ },
+ created() {
+ this.DC = global.DC;
+ this.titleList = [];
+ //三江校区//"土木楼"//"科学园"//"黄河路"//"红旗校区"
+ getList().then((res) => {
+ res.data.data.forEach((item) => {
+ // console.log(item, "see");
+ this.titleList.push({
+ title: item.dictValue,
+ flag: false,
+ key: item.dictKey,
+ });
+ });
- this.titleList[0].flag = true
+ this.titleList[0].flag = true;
- this.getChilsNavs(this.titleList[0].key)
- })
+ this.getChilsNavs(this.titleList[0].key);
+ });
+ },
+ mounted() {},
+ methods: {
+ closeModel() {
+ this.$parent.closeModel();
},
- mounted () {
+ topNavClick(item, index) {
+ this.titleList.forEach((item) => {
+ item.flag = false;
+ });
+
+ this.titleList[index].flag = true;
+
+ this.getChilsNavs(item.key);
},
- methods: {
- closeModel () {
- this.$parent.closeModel()
- },
- topNavClick (item, index) {
- this.titleList.forEach(item => {
- item.flag = false
- })
+ getChilsNavs(campus) {
+ this.itemNavList = [];
+ let that = this;
+ // console.log(this.arcCode, "see22");
+ //判断是否是当前所需要图层并创建 属性为 this.arrCode
+ if (this.ourLayer != null) {
+ this.ourLayer.clear();
+ } else {
+ this.ourLayer = new this.DC.HtmlLayer("Layer" + this.arcCode);
+ this.viewer.addLayer(this.ourLayer);
+ }
+ // console.log(this.ourLayer, "see");
+ getLifeList({ lifetype: this.arcCode, campus: campus }).then((res) => {
+ res.data.data.records.forEach((item) => {
+ // console.log(item, "see");
+ this.itemNavList.push({
+ navTitle: item.mechanismname,
+ icon: "/img/navicon/tag.png",
+ details: item,
+ });
+ //创建图标 做生活设施分层标签
+ that.addDivIcon(item, this.ourLayer);
+ });
+ });
+ },
+ addDivIcon(item, mylayer) {
+ let that = this;
+ const divIcon = new global.DC.DivIcon(
+ new global.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>
+ `
+ );
+ //订阅事件
+ divIcon.on(global.DC.MouseEventType.CLICK, (e) => {
+ // console.log(item, "see");
+ // that.openPopups({
+ // lng: e.overlay.position.lng,
+ // lat: e.overlay.position.lat,
+ // item: item,
+ // });
+ that.mapPopup(item);
+ });
+ mylayer.addOverlay(divIcon);
+ },
+ mapPopup(param) {
+ var result = param;
+ this.$store.commit("CLEAR_ALL", null);
- this.titleList[index].flag = true
+ var imgArr = result.tpurl.split(",");
- this.getChilsNavs(item.key)
- },
- getChilsNavs (campus) {
- this.itemNavList = []
+ this.$store.commit("SET_POPUPBGURL", imgArr[0]);
+ this.$store.commit("SET_POPUPQRURL", result.codeurl);
+ this.$store.commit("SET_POINTPOSITION", [
+ Number(result.jd),
+ Number(result.wd),
+ Number(result.gd),
+ Number(result.heading),
+ Number(result.pitch),
+ Number(result.roll),
+ ]);
+ this.$store.commit("SET_STATENAME", result.mechanismname);
+ this.$store.commit("SET_SITENAME", result.address);
+ this.$store.commit("SET_TELEPHONE", result.telephone);
+ this.$store.commit("SET_INTRODUCETEXT", result.introduce);
+ this.$store.commit("SET_PANORAMAURL", result.panoramaurl);
+ this.$store.commit("SET_POPUPIMGATLAS", imgArr);
- getLifeList({ lifetype: this.arcCode, campus: campus }).then(res => {
- res.data.data.records.forEach(item => {
- this.itemNavList.push({
- navTitle: item.mechanismname,
- icon: '/img/navicon/tag.png',
- details: item
- })
- })
- })
- },
- mapPopup (param) {
- var result = param
- this.$store.commit('CLEAR_ALL', null)
+ if (result.videourl && result.videourl != "") {
+ this.$store.commit("SET_MONITORURL", result.videourl);
+ }
- var imgArr = result.tpurl.split(',')
+ this.newPopup(result);
+ this.viewer.flyToPosition(
+ new this.DC.Position(
+ Number(result.jd),
+ Number(result.wd),
+ 300,
+ Number(result.heading),
+ Number(result.pitch),
+ Number(result.roll)
+ ),
+ function () {},
+ 3
+ );
+ },
+ newPopup(item) {
+ const position = this.DC.Transform.transformWGS84ToCartesian(
+ new this.DC.Position(Number(item.jd), Number(item.wd), Number(item.gd))
+ );
+ // eslint-disable-next-line no-unused-vars
+ var popup = new this.DC.DivForms(this.viewer, {
+ domId: "divFormsDomBox",
+ position: [position],
+ });
- this.$store.commit('SET_POPUPBGURL', imgArr[0])
- this.$store.commit('SET_POPUPQRURL', result.codeurl)
- this.$store.commit('SET_POINTPOSITION', [Number(result.jd), Number(result.wd), Number(result.gd), Number(result.heading), Number(result.pitch), Number(result.roll)])
- this.$store.commit('SET_STATENAME', result.mechanismname)
- this.$store.commit('SET_SITENAME', result.address)
- this.$store.commit('SET_TELEPHONE', result.telephone)
- this.$store.commit('SET_INTRODUCETEXT', result.introduce)
- this.$store.commit('SET_PANORAMAURL', result.panoramaurl)
- this.$store.commit('SET_POPUPIMGATLAS', imgArr)
-
- if (result.videourl && result.videourl != '') {
- this.$store.commit('SET_MONITORURL', result.videourl)
- }
-
- this.newPopup(result)
- this.viewer.flyToPosition(
- new this.DC.Position(Number(result.jd), Number(result.wd), 300, Number(result.heading), Number(result.pitch), Number(result.roll)),
- function () {
- },
- 3
- )
- },
- newPopup (item) {
- const position = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position(Number(item.jd), Number(item.wd), Number(item.gd)))
- // eslint-disable-next-line no-unused-vars
- var popup = new this.DC.DivForms(this.viewer, {
- domId: 'divFormsDomBox',
- position: [
- position
- ]
- })
-
- this.$store.commit('SET_PANORAMAPOPUP', false)
- this.$store.commit('SET_MONITORPOPUP', false)
- this.$store.commit('SET_DETAILSPOPUP', true)
- }
+ this.$store.commit("SET_PANORAMAPOPUP", false);
+ this.$store.commit("SET_MONITORPOPUP", false);
+ this.$store.commit("SET_DETAILSPOPUP", true);
+ },
+ },
+ destroyed() {
+ if (this.ourLayer != null) {
+ this.ourLayer.remove();
+ this.ourLayer = null;
}
-}
+ this.$store.commit("SET_DETAILSPOPUP", false);
+ },
+};
</script>
-<style scoped lang='scss'>
-</style>
+<style scoped lang="scss"></style>
diff --git a/src/mobileviews/home/index.vue b/src/mobileviews/home/index.vue
index 96fabaa..7fe487d 100644
--- a/src/mobileviews/home/index.vue
+++ b/src/mobileviews/home/index.vue
@@ -25,5 +25,4 @@
};
</script>
-<style scoped lang='scss'>
-</style>
+<style scoped lang="scss"></style>
diff --git a/src/pcLayout/index.vue b/src/pcLayout/index.vue
index 16ed644..a25a2e5 100644
--- a/src/pcLayout/index.vue
+++ b/src/pcLayout/index.vue
@@ -1,107 +1,133 @@
<template>
- <div class="layout-container">
- <el-container>
- <el-header id="pcElHeader">
- <img src="/img/logo.png" alt />
- <div class="header-title">智慧社区大数据三维可视化平台</div>
- <el-menu
- :default-active="$router.currentRoute.path"
- class="el-menu-demo"
- mode="horizontal"
- @select="handleSelect"
- background-color="#2196f3"
- text-color="#fff"
- active-text-color="#fff"
- :router="true"
- >
- <!-- <el-menu-item index="/pcLayout/default/mapnav"> <i class='custom-icon menu-dtdl'></i> 地图导览</el-menu-item> -->
+ <div class="layout-container">
+ <el-container>
+ <el-header id="pcElHeader">
+ <img src="/img/logo.png" alt />
+ <div class="header-title">智慧校区大数据三维可视化平台</div>
+ <el-menu
+ :default-active="$router.currentRoute.path"
+ class="el-menu-demo"
+ mode="horizontal"
+ @select="handleSelect"
+ background-color="#2196f3"
+ text-color="#fff"
+ active-text-color="#fff"
+ :router="true"
+ >
+ <!-- <el-menu-item index="/pcLayout/default/mapnav"> <i class='custom-icon menu-dtdl'></i> 地图导览</el-menu-item> -->
- <el-submenu index="orgnav">
- <template slot="title">
- <i class="custom-icon menu-jg"></i> 社区内机构导览
- </template>
- <!-- <el-menu-item index="/pcLayout/default/orgnav/masses">党群机构</el-menu-item> -->
- <!-- <el-menu-item index="/pcLayout/default/orgnav/ofc">职能部处</el-menu-item> -->
- <el-menu-item index="/pcLayout/default/orgnav/directly">直属及附属单位</el-menu-item>
- <!-- <el-menu-item index="/pcLayout/default/orgnav/teaching">教学与科研机构</el-menu-item> -->
- <el-menu-item index="/pcLayout/default/orgnav/rest">其他机构</el-menu-item>
- </el-submenu>
+ <el-submenu index="orgnav">
+ <template slot="title">
+ <i class="custom-icon menu-jg"></i> 校区内机构导览
+ </template>
+ <!-- <el-menu-item index="/pcLayout/default/orgnav/masses">党群机构</el-menu-item> -->
+ <!-- <el-menu-item index="/pcLayout/default/orgnav/ofc">职能部处</el-menu-item> -->
+ <el-menu-item index="/pcLayout/default/orgnav/directly"
+ >直属及附属单位</el-menu-item
+ >
+ <!-- <el-menu-item index="/pcLayout/default/orgnav/teaching">教学与科研机构</el-menu-item> -->
+ <el-menu-item index="/pcLayout/default/orgnav/rest"
+ >其他机构</el-menu-item
+ >
+ </el-submenu>
- <el-submenu index="arc">
- <template slot="title">
- <i class="custom-icon menu-xyjz"></i> 社区建筑
- </template>
- <el-menu-item index="/pcLayout/default/arc/edifact">行政办公</el-menu-item>
- <!-- <el-menu-item index="/pcLayout/default/arc/teaching">教学科研</el-menu-item> -->
- <el-menu-item index="/pcLayout/default/arc/venue">社区场馆</el-menu-item>
- <!-- <el-menu-item index="/pcLayout/default/arc/dorm">社区宿舍</el-menu-item> -->
- <!-- <el-menu-item index="/pcLayout/default/arc/culture">文化风景</el-menu-item> -->
- <!-- <el-menu-item index="/pcLayout/default/arc/family">家属住宅</el-menu-item> -->
- <el-menu-item index="/pcLayout/default/arc/rest">主要楼宇</el-menu-item>
- </el-submenu>
+ <el-submenu index="arc">
+ <template slot="title">
+ <i class="custom-icon menu-xyjz"></i> 校区建筑
+ </template>
+ <el-menu-item index="/pcLayout/default/arc/edifact"
+ >行政办公</el-menu-item
+ >
+ <!-- <el-menu-item index="/pcLayout/default/arc/teaching">教学科研</el-menu-item> -->
+ <el-menu-item index="/pcLayout/default/arc/venue"
+ >校区场馆</el-menu-item
+ >
+ <!-- <el-menu-item index="/pcLayout/default/arc/dorm">校区宿舍</el-menu-item> -->
+ <!-- <el-menu-item index="/pcLayout/default/arc/culture">文化风景</el-menu-item> -->
+ <!-- <el-menu-item index="/pcLayout/default/arc/family">家属住宅</el-menu-item> -->
+ <el-menu-item index="/pcLayout/default/arc/rest"
+ >主要楼宇</el-menu-item
+ >
+ </el-submenu>
- <el-submenu index="service">
- <template slot="title">
- <i class="custom-icon menu-shfw"></i> 生活服务设施
- </template>
- <!-- <el-menu-item index="/pcLayout/default/service/canteen">食堂餐厅</el-menu-item> -->
- <!-- <el-menu-item index="/pcLayout/default/service/supermarket">购物超市</el-menu-item> -->
- <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/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> -->
- <!-- <el-menu-item index="/pcLayout/default/service/service">通信营业厅</el-menu-item> -->
- <el-menu-item index="/pcLayout/default/service/park">停车场</el-menu-item>
- <el-menu-item index="/pcLayout/default/service/alleyway">出入口</el-menu-item>
- </el-submenu>
+ <el-submenu index="service">
+ <template slot="title">
+ <i class="custom-icon menu-shfw"></i> 生活服务设施
+ </template>
+ <!-- <el-menu-item index="/pcLayout/default/service/canteen">食堂餐厅</el-menu-item> -->
+ <!-- <el-menu-item index="/pcLayout/default/service/supermarket">购物超市</el-menu-item> -->
+ <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/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> -->
+ <!-- <el-menu-item index="/pcLayout/default/service/service">通信营业厅</el-menu-item> -->
+ <el-menu-item index="/pcLayout/default/service/park"
+ >停车场</el-menu-item
+ >
+ <el-menu-item index="/pcLayout/default/service/alleyway"
+ >出入口</el-menu-item
+ >
+ </el-submenu>
- <!-- <el-menu-item index="/pcLayout/default/campusnav"> <i class='custom-icon menu-xydl'></i> 社区导览</el-menu-item> -->
+ <!-- <el-menu-item index="/pcLayout/default/campusnav"> <i class='custom-icon menu-xydl'></i> 校区导览</el-menu-item> -->
- <el-menu-item index="/pcLayout/default/campusnavi">
- <i class="custom-icon menu-xydh"></i> 社区导航
- </el-menu-item>
+ <el-menu-item index="/pcLayout/default/campusnavi">
+ <i class="custom-icon menu-xydh"></i> 校区导航
+ </el-menu-item>
- <el-submenu index="specialmap">
- <template slot="title">
- <i class="custom-icon menu-ztdt"></i> 专题地图
- </template>
- <!-- <el-menu-item index="/pcLayout/default/specialmap/celebrate">社区庆</el-menu-item> -->
- <el-menu-item index="/pcLayout/default/specialmap/welcome">社区迎新</el-menu-item>
- </el-submenu>
+ <el-submenu index="specialmap">
+ <template slot="title">
+ <i class="custom-icon menu-ztdt"></i> 专题地图
+ </template>
+ <!-- <el-menu-item index="/pcLayout/default/specialmap/celebrate">校区庆</el-menu-item> -->
+ <el-menu-item index="/pcLayout/default/specialmap/welcome"
+ >校区迎新</el-menu-item
+ >
+ </el-submenu>
- <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/ranging">地图测距</el-menu-item>
- <el-menu-item index="/pcLayout/default/tool/area">地图测面</el-menu-item>
- <el-menu-item index="/pcLayout/default/tool/layer-manage">图层管理</el-menu-item>
- </el-submenu>
- </el-menu>
- </el-header>
- <el-main>
- <router-view />
- </el-main>
- </el-container>
- </div>
+ <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/ranging"
+ >地图测距</el-menu-item
+ >
+ <el-menu-item index="/pcLayout/default/tool/area"
+ >地图测面</el-menu-item
+ >
+ <el-menu-item index="/pcLayout/default/tool/layer-manage"
+ >图层管理</el-menu-item
+ >
+ </el-submenu>
+ </el-menu>
+ </el-header>
+ <el-main>
+ <router-view />
+ </el-main>
+ </el-container>
+ </div>
</template>
<script>
export default {
- data () {
- return {}
- },
- methods: {
- handleSelect (key, keyPath) {
- }
- }
-}
+ data() {
+ return {};
+ },
+ methods: {
+ handleSelect(key, keyPath) {},
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/arc/culture.vue b/src/pcviews/arc/culture.vue
index 16c4042..25be49d 100644
--- a/src/pcviews/arc/culture.vue
+++ b/src/pcviews/arc/culture.vue
@@ -1,55 +1,42 @@
-/*
- * @Author: Morpheus
- * @Name: 文化风景
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:56:08
- */
+/* * @Author: Morpheus * @Name: 文化风景 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2021-12-30 14:56:08 */
<template>
- <div>
-
- </div>
+ <div></div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
-
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- mounted () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- this.$store.commit('SET_ARCNAVBARTITLE', '文化风景')
- this.$store.commit('SET_ARCNAVBARCODE', 5)
- this.$store.commit('SET_ARCNAVBARFLAG', true)
- },
- methods: {
-
- },
- beforeDestroy () {
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
+ data() {
+ return {};
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ mounted() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ this.$store.commit("SET_ARCNAVBARTITLE", "文化风景");
+ this.$store.commit("SET_ARCNAVBARCODE", 5);
+ this.$store.commit("SET_ARCNAVBARFLAG", true);
+ },
+ methods: {},
+ beforeDestroy() {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/arc/dorm.vue b/src/pcviews/arc/dorm.vue
index dfc2c41..1dbd9ee 100644
--- a/src/pcviews/arc/dorm.vue
+++ b/src/pcviews/arc/dorm.vue
@@ -1,55 +1,42 @@
-/*
- * @Author: Morpheus
- * @Name: 社区宿舍
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:25:14
- */
+/* * @Author: Morpheus * @Name: 校区宿舍 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2021-12-30 14:25:14 */
<template>
- <div>
-
- </div>
+ <div></div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
-
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- mounted () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- this.$store.commit('SET_ARCNAVBARTITLE', '社区宿舍')
- this.$store.commit('SET_ARCNAVBARCODE', 4)
- this.$store.commit('SET_ARCNAVBARFLAG', true)
- },
- methods: {
-
- },
- beforeDestroy () {
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
+ data() {
+ return {};
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ mounted() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ this.$store.commit("SET_ARCNAVBARTITLE", "校区宿舍");
+ this.$store.commit("SET_ARCNAVBARCODE", 4);
+ this.$store.commit("SET_ARCNAVBARFLAG", true);
+ },
+ methods: {},
+ beforeDestroy() {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/arc/edifact.vue b/src/pcviews/arc/edifact.vue
index 8f50ae2..bca820e 100644
--- a/src/pcviews/arc/edifact.vue
+++ b/src/pcviews/arc/edifact.vue
@@ -1,55 +1,42 @@
-/*
- * @Author: Morpheus
- * @Name: 行政办公
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:23:28
- */
+/* * @Author: Morpheus * @Name: 行政办公 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2021-12-30 14:23:28 */
<template>
- <div>
-
- </div>
+ <div></div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
-
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- mounted () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- this.$store.commit('SET_ARCNAVBARTITLE', '行政办公')
- this.$store.commit('SET_ARCNAVBARCODE', 1)
- this.$store.commit('SET_ARCNAVBARFLAG', true)
- },
- methods: {
-
- },
- beforeDestroy () {
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
+ data() {
+ return {};
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ mounted() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ this.$store.commit("SET_ARCNAVBARTITLE", "行政办公");
+ this.$store.commit("SET_ARCNAVBARCODE", 1);
+ this.$store.commit("SET_ARCNAVBARFLAG", true);
+ },
+ methods: {},
+ beforeDestroy() {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/arc/family.vue b/src/pcviews/arc/family.vue
index e666c91..ef1cab1 100644
--- a/src/pcviews/arc/family.vue
+++ b/src/pcviews/arc/family.vue
@@ -1,55 +1,42 @@
-/*
- * @Author: Morpheus
- * @Name: 家属住宅
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:25:24
- */
+/* * @Author: Morpheus * @Name: 家属住宅 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2021-12-30 14:25:24 */
<template>
- <div>
-
- </div>
+ <div></div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
-
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- mounted () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- this.$store.commit('SET_ARCNAVBARTITLE', '家属住宅')
- this.$store.commit('SET_ARCNAVBARCODE', 6)
- this.$store.commit('SET_ARCNAVBARFLAG', true)
- },
- methods: {
-
- },
- beforeDestroy () {
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
+ data() {
+ return {};
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ mounted() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ this.$store.commit("SET_ARCNAVBARTITLE", "家属住宅");
+ this.$store.commit("SET_ARCNAVBARCODE", 6);
+ this.$store.commit("SET_ARCNAVBARFLAG", true);
+ },
+ methods: {},
+ beforeDestroy() {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/arc/rest.vue b/src/pcviews/arc/rest.vue
index 010718a..b749d26 100644
--- a/src/pcviews/arc/rest.vue
+++ b/src/pcviews/arc/rest.vue
@@ -1,55 +1,42 @@
-/*
- * @Author: Morpheus
- * @Name: 主要楼宇
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:25:28
- */
+/* * @Author: Morpheus * @Name: 主要楼宇 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2021-12-30 14:25:28 */
<template>
- <div>
-
- </div>
+ <div></div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
-
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- mounted () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- this.$store.commit('SET_ARCNAVBARTITLE', '主要楼宇')
- this.$store.commit('SET_ARCNAVBARCODE', 7)
- this.$store.commit('SET_ARCNAVBARFLAG', true)
- },
- methods: {
-
- },
- beforeDestroy () {
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
+ data() {
+ return {};
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ mounted() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ this.$store.commit("SET_ARCNAVBARTITLE", "主要楼宇");
+ this.$store.commit("SET_ARCNAVBARCODE", 7);
+ this.$store.commit("SET_ARCNAVBARFLAG", true);
+ },
+ methods: {},
+ beforeDestroy() {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/arc/teaching.vue b/src/pcviews/arc/teaching.vue
index 6c84776..3df77f4 100644
--- a/src/pcviews/arc/teaching.vue
+++ b/src/pcviews/arc/teaching.vue
@@ -1,55 +1,42 @@
-/*
- * @Author: Morpheus
- * @Name: 教学科研
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:54:33
- */
+/* * @Author: Morpheus * @Name: 教学科研 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2021-12-30 14:54:33 */
<template>
- <div>
-
- </div>
+ <div></div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
-
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- mounted () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- this.$store.commit('SET_ARCNAVBARTITLE', '教学科研')
- this.$store.commit('SET_ARCNAVBARCODE', 2)
- this.$store.commit('SET_ARCNAVBARFLAG', true)
- },
- methods: {
-
- },
- beforeDestroy () {
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
+ data() {
+ return {};
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ mounted() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ this.$store.commit("SET_ARCNAVBARTITLE", "教学科研");
+ this.$store.commit("SET_ARCNAVBARCODE", 2);
+ this.$store.commit("SET_ARCNAVBARFLAG", true);
+ },
+ methods: {},
+ beforeDestroy() {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/arc/venue.vue b/src/pcviews/arc/venue.vue
index 800dc78..97f5410 100644
--- a/src/pcviews/arc/venue.vue
+++ b/src/pcviews/arc/venue.vue
@@ -1,55 +1,42 @@
-/*
- * @Author: Morpheus
- * @Name: 社区场馆
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:25:37
- */
+/* * @Author: Morpheus * @Name: 校区场馆 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2021-12-30 14:25:37 */
<template>
- <div>
-
- </div>
+ <div></div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
-
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- mounted () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- this.$store.commit('SET_ARCNAVBARTITLE', '社区场馆')
- this.$store.commit('SET_ARCNAVBARCODE', 3)
- this.$store.commit('SET_ARCNAVBARFLAG', true)
- },
- methods: {
-
- },
- beforeDestroy () {
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
+ data() {
+ return {};
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ mounted() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ this.$store.commit("SET_ARCNAVBARTITLE", "校区场馆");
+ this.$store.commit("SET_ARCNAVBARCODE", 3);
+ this.$store.commit("SET_ARCNAVBARFLAG", true);
+ },
+ methods: {},
+ beforeDestroy() {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/campusnav/index.vue b/src/pcviews/campusnav/index.vue
index 6a993b3..077f28d 100644
--- a/src/pcviews/campusnav/index.vue
+++ b/src/pcviews/campusnav/index.vue
@@ -1,15 +1,9 @@
<template>
- <div>
- 社区导览
- </div>
+ <div>校区导览</div>
</template>
<script>
-export default {
-
-}
+export default {};
</script>
-<style>
-
-</style>
+<style></style>
diff --git a/src/pcviews/orgnav/directly.vue b/src/pcviews/orgnav/directly.vue
index f00f871..fb7d80c 100644
--- a/src/pcviews/orgnav/directly.vue
+++ b/src/pcviews/orgnav/directly.vue
@@ -1,80 +1,70 @@
-/*
- * @Author: Morpheus
- * @Name: 直属及附属单位
- * @Date: 2021-11-15 10:02:12
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:25:45
- */
- <template>
- <div>
-
- </div>
+/* * @Author: Morpheus * @Name: 直属及附属单位 * @Date: 2021-11-15 10:02:12 *
+@Last Modified by: Morpheus * @Last Modified time: 2021-12-30 14:25:45 */
+<template>
+ <div></div>
</template>
<script>
-import { getList } from '@/api/pc/orgnav/index'
+import { getList } from "@/api/pc/orgnav/index";
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- list: []
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- mounted () {
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- this.$store.commit('SET_ORGNAVBARTITLE', '直属及附属单位')
- this.$store.commit('SET_ORGNAVBARLIST', [])
-
- this.$store.commit('SET_ORGNAVBARFLAG', true)
-
- getList({ type: 3 }).then(res => {
- res.data.data.records.forEach(item => {
- this.list.push({
- navTitle: item.mechanismname,
- icon: '/img/navicon/tag.png',
- longitude: item.jd,
- latitude: item.wd,
- alt: item.gd,
- heading: item.heading,
- pitch: item.pitch,
- roll: item.roll,
- bgImg: item.tpurl,
- QRImg: item.codeurl,
- address: item.address,
- telephone: item.telephone,
- introduce: item.introduce,
- videourl: item.videourl
- })
- })
-
- this.$store.commit('SET_ORGNAVBARLIST', this.list)
- })
- },
- methods: {
-
- },
- beforeDestroy () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
+ data() {
+ return {
+ list: [],
+ };
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ mounted() {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
}
-}
+ this.$store.commit("SET_ORGNAVBARTITLE", "直属及附属单位");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+
+ this.$store.commit("SET_ORGNAVBARFLAG", true);
+
+ getList({ type: 3 }).then((res) => {
+ res.data.data.records.forEach((item) => {
+ this.list.push({
+ navTitle: item.mechanismname,
+ icon: "/img/navicon/tag.png",
+ longitude: item.jd,
+ latitude: item.wd,
+ alt: item.gd,
+ heading: item.heading,
+ pitch: item.pitch,
+ roll: item.roll,
+ bgImg: item.tpurl,
+ QRImg: item.codeurl,
+ address: item.address,
+ telephone: item.telephone,
+ introduce: item.introduce,
+ videourl: item.videourl,
+ });
+ });
+
+ this.$store.commit("SET_ORGNAVBARLIST", this.list);
+ });
+ },
+ methods: {},
+ beforeDestroy() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
+ }
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/orgnav/masses.vue b/src/pcviews/orgnav/masses.vue
index 8a6ba99..c838a4c 100644
--- a/src/pcviews/orgnav/masses.vue
+++ b/src/pcviews/orgnav/masses.vue
@@ -1,80 +1,70 @@
-/*
- * @Author: Morpheus
- * @Name: 党群机构
- * @Date: 2021-11-15 10:02:12
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:25:52
- */
- <template>
- <div>
-
- </div>
+/* * @Author: Morpheus * @Name: 党群机构 * @Date: 2021-11-15 10:02:12 * @Last
+Modified by: Morpheus * @Last Modified time: 2021-12-30 14:25:52 */
+<template>
+ <div></div>
</template>
<script>
-import { getList } from '@/api/pc/orgnav/index'
+import { getList } from "@/api/pc/orgnav/index";
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- list: []
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- mounted () {
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- this.$store.commit('SET_ORGNAVBARTITLE', '党群机构')
- this.$store.commit('SET_ORGNAVBARLIST', [])
-
- this.$store.commit('SET_ORGNAVBARFLAG', true)
-
- getList({ type: 1 }).then(res => {
- res.data.data.records.forEach(item => {
- this.list.push({
- navTitle: item.mechanismname,
- icon: '/img/navicon/tag.png',
- longitude: item.jd,
- latitude: item.wd,
- alt: item.gd,
- heading: item.heading,
- pitch: item.pitch,
- roll: item.roll,
- bgImg: item.tpurl,
- QRImg: item.codeurl,
- address: item.address,
- telephone: item.telephone,
- introduce: item.introduce,
- videourl: item.videourl
- })
- })
-
- this.$store.commit('SET_ORGNAVBARLIST', this.list)
- })
- },
- methods: {
-
- },
- beforeDestroy () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
+ data() {
+ return {
+ list: [],
+ };
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ mounted() {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
}
-}
+ this.$store.commit("SET_ORGNAVBARTITLE", "党群机构");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+
+ this.$store.commit("SET_ORGNAVBARFLAG", true);
+
+ getList({ type: 1 }).then((res) => {
+ res.data.data.records.forEach((item) => {
+ this.list.push({
+ navTitle: item.mechanismname,
+ icon: "/img/navicon/tag.png",
+ longitude: item.jd,
+ latitude: item.wd,
+ alt: item.gd,
+ heading: item.heading,
+ pitch: item.pitch,
+ roll: item.roll,
+ bgImg: item.tpurl,
+ QRImg: item.codeurl,
+ address: item.address,
+ telephone: item.telephone,
+ introduce: item.introduce,
+ videourl: item.videourl,
+ });
+ });
+
+ this.$store.commit("SET_ORGNAVBARLIST", this.list);
+ });
+ },
+ methods: {},
+ beforeDestroy() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
+ }
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/orgnav/ofc.vue b/src/pcviews/orgnav/ofc.vue
index ed481fe..113a8e4 100644
--- a/src/pcviews/orgnav/ofc.vue
+++ b/src/pcviews/orgnav/ofc.vue
@@ -1,80 +1,70 @@
-/*
- * @Author: Morpheus
- * @Name: 职能部处
- * @Date: 2021-11-15 10:02:12
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:25:58
- */
- <template>
- <div>
-
- </div>
+/* * @Author: Morpheus * @Name: 职能部处 * @Date: 2021-11-15 10:02:12 * @Last
+Modified by: Morpheus * @Last Modified time: 2021-12-30 14:25:58 */
+<template>
+ <div></div>
</template>
<script>
-import { getList } from '@/api/pc/orgnav/index'
+import { getList } from "@/api/pc/orgnav/index";
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- list: []
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- mounted () {
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- this.$store.commit('SET_ORGNAVBARTITLE', '职能部处')
- this.$store.commit('SET_ORGNAVBARLIST', [])
-
- this.$store.commit('SET_ORGNAVBARFLAG', true)
-
- getList({ type: 2 }).then(res => {
- res.data.data.records.forEach(item => {
- this.list.push({
- navTitle: item.mechanismname,
- icon: '/img/navicon/tag.png',
- longitude: item.jd,
- latitude: item.wd,
- alt: item.gd,
- heading: item.heading,
- pitch: item.pitch,
- roll: item.roll,
- bgImg: item.tpurl,
- QRImg: item.codeurl,
- address: item.address,
- telephone: item.telephone,
- introduce: item.introduce,
- videourl: item.videourl
- })
- })
-
- this.$store.commit('SET_ORGNAVBARLIST', this.list)
- })
- },
- methods: {
-
- },
- beforeDestroy () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
+ data() {
+ return {
+ list: [],
+ };
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ mounted() {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
}
-}
+ this.$store.commit("SET_ORGNAVBARTITLE", "职能部处");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+
+ this.$store.commit("SET_ORGNAVBARFLAG", true);
+
+ getList({ type: 2 }).then((res) => {
+ res.data.data.records.forEach((item) => {
+ this.list.push({
+ navTitle: item.mechanismname,
+ icon: "/img/navicon/tag.png",
+ longitude: item.jd,
+ latitude: item.wd,
+ alt: item.gd,
+ heading: item.heading,
+ pitch: item.pitch,
+ roll: item.roll,
+ bgImg: item.tpurl,
+ QRImg: item.codeurl,
+ address: item.address,
+ telephone: item.telephone,
+ introduce: item.introduce,
+ videourl: item.videourl,
+ });
+ });
+
+ this.$store.commit("SET_ORGNAVBARLIST", this.list);
+ });
+ },
+ methods: {},
+ beforeDestroy() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
+ }
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/orgnav/rest.vue b/src/pcviews/orgnav/rest.vue
index 9fcdd19..468454b 100644
--- a/src/pcviews/orgnav/rest.vue
+++ b/src/pcviews/orgnav/rest.vue
@@ -1,80 +1,70 @@
-/*
- * @Author: Morpheus
- * @Name: 其他机构
- * @Date: 2021-11-15 10:02:12
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:26:06
- */
- <template>
- <div>
-
- </div>
+/* * @Author: Morpheus * @Name: 其他机构 * @Date: 2021-11-15 10:02:12 * @Last
+Modified by: Morpheus * @Last Modified time: 2021-12-30 14:26:06 */
+<template>
+ <div></div>
</template>
<script>
-import { getList } from '@/api/pc/orgnav/index'
+import { getList } from "@/api/pc/orgnav/index";
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- list: []
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- mounted () {
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- this.$store.commit('SET_ORGNAVBARTITLE', '其他机构')
- this.$store.commit('SET_ORGNAVBARLIST', [])
-
- this.$store.commit('SET_ORGNAVBARFLAG', true)
-
- getList({ type: 5 }).then(res => {
- res.data.data.records.forEach(item => {
- this.list.push({
- navTitle: item.mechanismname,
- icon: '/img/navicon/tag.png',
- longitude: item.jd,
- latitude: item.wd,
- alt: item.gd,
- heading: item.heading,
- pitch: item.pitch,
- roll: item.roll,
- bgImg: item.tpurl,
- QRImg: item.codeurl,
- address: item.address,
- telephone: item.telephone,
- introduce: item.introduce,
- videourl: item.videourl
- })
- })
-
- this.$store.commit('SET_ORGNAVBARLIST', this.list)
- })
- },
- methods: {
-
- },
- beforeDestroy () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
+ data() {
+ return {
+ list: [],
+ };
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ mounted() {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
}
-}
+ this.$store.commit("SET_ORGNAVBARTITLE", "其他机构");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+
+ this.$store.commit("SET_ORGNAVBARFLAG", true);
+
+ getList({ type: 5 }).then((res) => {
+ res.data.data.records.forEach((item) => {
+ this.list.push({
+ navTitle: item.mechanismname,
+ icon: "/img/navicon/tag.png",
+ longitude: item.jd,
+ latitude: item.wd,
+ alt: item.gd,
+ heading: item.heading,
+ pitch: item.pitch,
+ roll: item.roll,
+ bgImg: item.tpurl,
+ QRImg: item.codeurl,
+ address: item.address,
+ telephone: item.telephone,
+ introduce: item.introduce,
+ videourl: item.videourl,
+ });
+ });
+
+ this.$store.commit("SET_ORGNAVBARLIST", this.list);
+ });
+ },
+ methods: {},
+ beforeDestroy() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
+ }
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/orgnav/teaching.vue b/src/pcviews/orgnav/teaching.vue
index 245ac6b..4b0f421 100644
--- a/src/pcviews/orgnav/teaching.vue
+++ b/src/pcviews/orgnav/teaching.vue
@@ -1,80 +1,70 @@
-/*
- * @Author: Morpheus
- * @Name: 教学与科研机构
- * @Date: 2021-11-15 10:02:12
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:26:13
- */
- <template>
- <div>
-
- </div>
+/* * @Author: Morpheus * @Name: 教学与科研机构 * @Date: 2021-11-15 10:02:12 *
+@Last Modified by: Morpheus * @Last Modified time: 2021-12-30 14:26:13 */
+<template>
+ <div></div>
</template>
<script>
-import { getList } from '@/api/pc/orgnav/index'
+import { getList } from "@/api/pc/orgnav/index";
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- list: []
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- mounted () {
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- this.$store.commit('SET_ORGNAVBARTITLE', '教学与科研机构')
- this.$store.commit('SET_ORGNAVBARLIST', [])
-
- this.$store.commit('SET_ORGNAVBARFLAG', true)
-
- getList({ type: 4 }).then(res => {
- res.data.data.records.forEach(item => {
- this.list.push({
- navTitle: item.mechanismname,
- icon: '/img/navicon/tag.png',
- longitude: item.jd,
- latitude: item.wd,
- alt: item.gd,
- heading: item.heading,
- pitch: item.pitch,
- roll: item.roll,
- bgImg: item.tpurl,
- QRImg: item.codeurl,
- address: item.address,
- telephone: item.telephone,
- introduce: item.introduce,
- videourl: item.videourl
- })
- })
-
- this.$store.commit('SET_ORGNAVBARLIST', this.list)
- })
- },
- methods: {
-
- },
- beforeDestroy () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
+ data() {
+ return {
+ list: [],
+ };
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ mounted() {
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
}
-}
+ this.$store.commit("SET_ORGNAVBARTITLE", "教学与科研机构");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+
+ this.$store.commit("SET_ORGNAVBARFLAG", true);
+
+ getList({ type: 4 }).then((res) => {
+ res.data.data.records.forEach((item) => {
+ this.list.push({
+ navTitle: item.mechanismname,
+ icon: "/img/navicon/tag.png",
+ longitude: item.jd,
+ latitude: item.wd,
+ alt: item.gd,
+ heading: item.heading,
+ pitch: item.pitch,
+ roll: item.roll,
+ bgImg: item.tpurl,
+ QRImg: item.codeurl,
+ address: item.address,
+ telephone: item.telephone,
+ introduce: item.introduce,
+ videourl: item.videourl,
+ });
+ });
+
+ this.$store.commit("SET_ORGNAVBARLIST", this.list);
+ });
+ },
+ methods: {},
+ beforeDestroy() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
+ }
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/service/aed.vue b/src/pcviews/service/aed.vue
index a106c2e..4809cfd 100644
--- a/src/pcviews/service/aed.vue
+++ b/src/pcviews/service/aed.vue
@@ -1,61 +1,56 @@
-/*
- * @Author: Morpheus
- * @Name: AED
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2022-01-25 09:29:14
- */
+/* * @Author: Morpheus * @Name: AED * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2022-01-25 09:29:14 */
<template>
- <div>
- <service-nav-bar :title="title"
- :arcCode="code"
- :headerLog="headerLog"></service-nav-bar>
- </div>
+ <div>
+ <service-nav-bar
+ :title="title"
+ :arcCode="code"
+ :headerLog="headerLog"
+ ></service-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- title: 'AED',
- code: 9,
- headerLog: '/img/icon/service-aed.png'
- }
- },
- created () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- if (this.searchPopupFlag == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag',
- 'searchPopupFlag'
- ])
- },
- methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ data() {
+ return {
+ title: "AED",
+ code: 9,
+ headerLog: "/img/icon/service-aed.png",
+ };
+ },
+ created() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ if (this.searchPopupFlag == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "searchPopupFlag",
+ ]),
+ },
+ methods: {
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/service/alleyway.vue b/src/pcviews/service/alleyway.vue
index b315ec8..1d70525 100644
--- a/src/pcviews/service/alleyway.vue
+++ b/src/pcviews/service/alleyway.vue
@@ -1,61 +1,56 @@
-/*
- * @Author: Morpheus
- * @Name: 出入口
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2022-01-25 09:29:24
- */
+/* * @Author: Morpheus * @Name: 出入口 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2022-01-25 09:29:24 */
<template>
- <div>
- <service-nav-bar :title="title"
- :arcCode="code"
- :headerLog="headerLog"></service-nav-bar>
- </div>
+ <div>
+ <service-nav-bar
+ :title="title"
+ :arcCode="code"
+ :headerLog="headerLog"
+ ></service-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- title: '出入口',
- code: 12,
- headerLog: '/img/icon/service-cr.png'
- }
- },
- created () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- if (this.searchPopupFlag == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag',
- 'searchPopupFlag'
- ])
- },
- methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ data() {
+ return {
+ title: "出入口",
+ code: 12,
+ headerLog: "/img/icon/service-cr.png",
+ };
+ },
+ created() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ if (this.searchPopupFlag == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "searchPopupFlag",
+ ]),
+ },
+ methods: {
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/service/bank.vue b/src/pcviews/service/bank.vue
index 2821caa..9116798 100644
--- a/src/pcviews/service/bank.vue
+++ b/src/pcviews/service/bank.vue
@@ -1,61 +1,56 @@
-/*
- * @Author: Morpheus
- * @Name: 银行网点
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2022-01-25 09:29:31
- */
+/* * @Author: Morpheus * @Name: 银行网点 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2022-01-25 09:29:31 */
<template>
- <div>
- <service-nav-bar :title="title"
- :arcCode="code"
- :headerLog="headerLog"></service-nav-bar>
- </div>
+ <div>
+ <service-nav-bar
+ :title="title"
+ :arcCode="code"
+ :headerLog="headerLog"
+ ></service-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- title: '银行网点',
- code: 8,
- headerLog: '/img/icon/service-yh.png'
- }
- },
- created () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- if (this.searchPopupFlag == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag',
- 'searchPopupFlag'
- ])
- },
- methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ data() {
+ return {
+ title: "银行网点",
+ code: 8,
+ headerLog: "/img/icon/service-yh.png",
+ };
+ },
+ created() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ if (this.searchPopupFlag == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "searchPopupFlag",
+ ]),
+ },
+ methods: {
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/service/canteen.vue b/src/pcviews/service/canteen.vue
index 291ac6f..c269bfb 100644
--- a/src/pcviews/service/canteen.vue
+++ b/src/pcviews/service/canteen.vue
@@ -1,61 +1,56 @@
-/*
- * @Author: Morpheus
- * @Name: 食堂餐厅
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:30:54
- */
+/* * @Author: Morpheus * @Name: 食堂餐厅 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2021-12-30 14:30:54 */
<template>
- <div>
- <service-nav-bar :title="title"
- :arcCode="code"
- :headerLog="headerLog"></service-nav-bar>
- </div>
+ <div>
+ <service-nav-bar
+ :title="title"
+ :arcCode="code"
+ :headerLog="headerLog"
+ ></service-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- title: '食堂餐厅',
- code: 1,
- headerLog: '/img/icon/service-st.png'
- }
- },
- created () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- if (this.searchPopupFlag == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag',
- 'searchPopupFlag'
- ])
- },
- methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ data() {
+ return {
+ title: "食堂餐厅",
+ code: 1,
+ headerLog: "/img/icon/service-st.png",
+ };
+ },
+ created() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ if (this.searchPopupFlag == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "searchPopupFlag",
+ ]),
+ },
+ methods: {
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/service/copy.vue b/src/pcviews/service/copy.vue
index 3bdf809..5188f66 100644
--- a/src/pcviews/service/copy.vue
+++ b/src/pcviews/service/copy.vue
@@ -1,61 +1,56 @@
-/*
- * @Author: Morpheus
- * @Name: 打字复印
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2022-01-25 09:29:40
- */
+/* * @Author: Morpheus * @Name: 打字复印 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2022-01-25 09:29:40 */
<template>
- <div>
- <service-nav-bar :title="title"
- :arcCode="code"
- :headerLog="headerLog"></service-nav-bar>
- </div>
+ <div>
+ <service-nav-bar
+ :title="title"
+ :arcCode="code"
+ :headerLog="headerLog"
+ ></service-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- title: '打字复印',
- code: 7,
- headerLog: '/img/icon/service-fy.png'
- }
- },
- created () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- if (this.searchPopupFlag == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag',
- 'searchPopupFlag'
- ])
- },
- methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ data() {
+ return {
+ title: "打字复印",
+ code: 7,
+ headerLog: "/img/icon/service-fy.png",
+ };
+ },
+ created() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ if (this.searchPopupFlag == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "searchPopupFlag",
+ ]),
+ },
+ methods: {
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/service/express.vue b/src/pcviews/service/express.vue
index 2170b31..7d1738c 100644
--- a/src/pcviews/service/express.vue
+++ b/src/pcviews/service/express.vue
@@ -1,61 +1,56 @@
-/*
- * @Author: Morpheus
- * @Name: 邮寄快递
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:31:05
- */
+/* * @Author: Morpheus * @Name: 邮寄快递 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2021-12-30 14:31:05 */
<template>
- <div>
- <service-nav-bar :title="title"
- :arcCode="code"
- :headerLog="headerLog"></service-nav-bar>
- </div>
+ <div>
+ <service-nav-bar
+ :title="title"
+ :arcCode="code"
+ :headerLog="headerLog"
+ ></service-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- title: '邮寄快递',
- code: 4,
- headerLog: '/img/icon/service-kd.png'
- }
- },
- created () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- if (this.searchPopupFlag == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag',
- 'searchPopupFlag'
- ])
- },
- methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ data() {
+ return {
+ title: "邮寄快递",
+ code: 4,
+ headerLog: "/img/icon/service-kd.png",
+ };
+ },
+ created() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ if (this.searchPopupFlag == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "searchPopupFlag",
+ ]),
+ },
+ methods: {
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/service/medical.vue b/src/pcviews/service/medical.vue
index 9a13c69..8de0a45 100644
--- a/src/pcviews/service/medical.vue
+++ b/src/pcviews/service/medical.vue
@@ -1,61 +1,56 @@
-/*
- * @Author: Morpheus
- * @Name: 社区内医疗
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2022-01-25 09:29:54
- */
+/* * @Author: Morpheus * @Name: 校区内医疗 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2022-01-25 09:29:54 */
<template>
- <div>
- <service-nav-bar :title="title"
- :arcCode="code"
- :headerLog="headerLog"></service-nav-bar>
- </div>
+ <div>
+ <service-nav-bar
+ :title="title"
+ :arcCode="code"
+ :headerLog="headerLog"
+ ></service-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- title: '社区内医疗',
- code: 3,
- headerLog: '/img/icon/service-yl.png'
- }
- },
- created () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- if (this.searchPopupFlag == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag',
- 'searchPopupFlag'
- ])
- },
- methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ data() {
+ return {
+ title: "校区内医疗",
+ code: 3,
+ headerLog: "/img/icon/service-yl.png",
+ };
+ },
+ created() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ if (this.searchPopupFlag == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "searchPopupFlag",
+ ]),
+ },
+ methods: {
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/service/park.vue b/src/pcviews/service/park.vue
index e36301b..abe3990 100644
--- a/src/pcviews/service/park.vue
+++ b/src/pcviews/service/park.vue
@@ -1,61 +1,56 @@
-/*
- * @Author: Morpheus
- * @Name: 停车场
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2022-01-25 09:29:59
- */
+/* * @Author: Morpheus * @Name: 停车场 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2022-01-25 09:29:59 */
<template>
- <div>
- <service-nav-bar :title="title"
- :arcCode="code"
- :headerLog="headerLog"></service-nav-bar>
- </div>
+ <div>
+ <service-nav-bar
+ :title="title"
+ :arcCode="code"
+ :headerLog="headerLog"
+ ></service-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- title: '停车场',
- code: 11,
- headerLog: '/img/icon/service-tc.png'
- }
- },
- created () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- if (this.searchPopupFlag == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag',
- 'searchPopupFlag'
- ])
- },
- methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ data() {
+ return {
+ title: "停车场",
+ code: 11,
+ headerLog: "/img/icon/service-tc.png",
+ };
+ },
+ created() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ if (this.searchPopupFlag == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "searchPopupFlag",
+ ]),
+ },
+ methods: {
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/service/service.vue b/src/pcviews/service/service.vue
index cd30e5e..8bb96d1 100644
--- a/src/pcviews/service/service.vue
+++ b/src/pcviews/service/service.vue
@@ -1,61 +1,56 @@
-/*
- * @Author: Morpheus
- * @Name: 通信营业厅
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2022-01-25 09:30:05
- */
+/* * @Author: Morpheus * @Name: 通信营业厅 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2022-01-25 09:30:05 */
<template>
- <div>
- <service-nav-bar :title="title"
- :arcCode="code"
- :headerLog="headerLog"></service-nav-bar>
- </div>
+ <div>
+ <service-nav-bar
+ :title="title"
+ :arcCode="code"
+ :headerLog="headerLog"
+ ></service-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- title: '通信营业厅',
- code: 10,
- headerLog: '/img/icon/service-tx.png'
- }
- },
- created () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- if (this.searchPopupFlag == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag',
- 'searchPopupFlag'
- ])
- },
- methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ data() {
+ return {
+ title: "通信营业厅",
+ code: 10,
+ headerLog: "/img/icon/service-tx.png",
+ };
+ },
+ created() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ if (this.searchPopupFlag == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "searchPopupFlag",
+ ]),
+ },
+ methods: {
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/service/showers.vue b/src/pcviews/service/showers.vue
index 8d0cc89..17cb8f0 100644
--- a/src/pcviews/service/showers.vue
+++ b/src/pcviews/service/showers.vue
@@ -1,61 +1,56 @@
-/*
- * @Author: Morpheus
- * @Name: 社区浴室
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-30 14:31:23
- */
+/* * @Author: Morpheus * @Name: 校区浴室 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2021-12-30 14:31:23 */
<template>
- <div>
- <service-nav-bar :title="title"
- :arcCode="code"
- :headerLog="headerLog"></service-nav-bar>
- </div>
+ <div>
+ <service-nav-bar
+ :title="title"
+ :arcCode="code"
+ :headerLog="headerLog"
+ ></service-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- title: '社区浴室',
- code: 5,
- headerLog: '/img/icon/service-ys.png'
- }
- },
- created () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- if (this.searchPopupFlag == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag',
- 'searchPopupFlag'
- ])
- },
- methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ data() {
+ return {
+ title: "校区浴室",
+ code: 5,
+ headerLog: "/img/icon/service-ys.png",
+ };
+ },
+ created() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ if (this.searchPopupFlag == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "searchPopupFlag",
+ ]),
+ },
+ methods: {
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/service/supermarket.vue b/src/pcviews/service/supermarket.vue
index 74925a7..b635cf8 100644
--- a/src/pcviews/service/supermarket.vue
+++ b/src/pcviews/service/supermarket.vue
@@ -1,61 +1,56 @@
-/*
- * @Author: Morpheus
- * @Name: 购物超市
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2022-01-25 09:30:12
- */
+/* * @Author: Morpheus * @Name: 购物超市 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2022-01-25 09:30:12 */
<template>
- <div>
- <service-nav-bar :title="title"
- :arcCode="code"
- :headerLog="headerLog"></service-nav-bar>
- </div>
+ <div>
+ <service-nav-bar
+ :title="title"
+ :arcCode="code"
+ :headerLog="headerLog"
+ ></service-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- title: '购物超市',
- code: 2,
- headerLog: '/img/icon/service-cs.png'
- }
- },
- created () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- if (this.searchPopupFlag == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag',
- 'searchPopupFlag'
- ])
- },
- methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ data() {
+ return {
+ title: "购物超市",
+ code: 2,
+ headerLog: "/img/icon/service-cs.png",
+ };
+ },
+ created() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ if (this.searchPopupFlag == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "searchPopupFlag",
+ ]),
+ },
+ methods: {
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/service/transfer.vue b/src/pcviews/service/transfer.vue
index 48605be..12b399d 100644
--- a/src/pcviews/service/transfer.vue
+++ b/src/pcviews/service/transfer.vue
@@ -1,61 +1,56 @@
-/*
- * @Author: Morpheus
- * @Name: 圈存机
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2022-01-25 09:30:17
- */
+/* * @Author: Morpheus * @Name: 圈存机 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2022-01-25 09:30:17 */
<template>
- <div>
- <service-nav-bar :title="title"
- :arcCode="code"
- :headerLog="headerLog"></service-nav-bar>
- </div>
+ <div>
+ <service-nav-bar
+ :title="title"
+ :arcCode="code"
+ :headerLog="headerLog"
+ ></service-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- title: '圈存机',
- code: 6,
- headerLog: '/img/icon/service-qcj.png'
- }
- },
- created () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- if (this.searchPopupFlag == true) {
- this.$store.commit('SET_SEARCHPOPUPFLAG', false)
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag',
- 'searchPopupFlag'
- ])
- },
- methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ data() {
+ return {
+ title: "圈存机",
+ code: 6,
+ headerLog: "/img/icon/service-qcj.png",
+ };
+ },
+ created() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ if (this.searchPopupFlag == true) {
+ this.$store.commit("SET_SEARCHPOPUPFLAG", false);
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ "searchPopupFlag",
+ ]),
+ },
+ methods: {
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/specialmap/celebrate.vue b/src/pcviews/specialmap/celebrate.vue
index 0129c80..67cdcee 100644
--- a/src/pcviews/specialmap/celebrate.vue
+++ b/src/pcviews/specialmap/celebrate.vue
@@ -1,57 +1,52 @@
-/*
- * @Author: Morpheus
- * @Name: 社区庆
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2022-01-05 14:05:59
- */
+/* * @Author: Morpheus * @Name: 校区庆 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2022-01-05 14:05:59 */
<template>
- <div>
- <service-nav-bar :title="title"
- :arcCode="code"
- :headerLog="headerLog"></service-nav-bar>
- </div>
+ <div>
+ <service-nav-bar
+ :title="title"
+ :arcCode="code"
+ :headerLog="headerLog"
+ ></service-nav-bar>
+ </div>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- title: '圈存机',
- code: 6,
- headerLog: '/img/icon/service-qcj.png'
- }
- },
- created () {
- if (this.orgNavBarFlag == true) {
- this.$store.commit('SET_ORGNAVBARTITLE', '')
- this.$store.commit('SET_ORGNAVBARLIST', [])
- this.$store.commit('SET_ORGNAVBARFLAG', false)
- }
- if (this.arcNavBarFlag == true) {
- this.$store.commit('SET_ARCNAVBARTITLE', '')
- this.$store.commit('SET_ARCNAVBARCODE', '')
- this.$store.commit('SET_ARCNAVBARFLAG', false)
- }
- },
- computed: {
- ...mapGetters([
- // 社区内导航的显示关闭
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- methods: {
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ data() {
+ return {
+ title: "圈存机",
+ code: 6,
+ headerLog: "/img/icon/service-qcj.png",
+ };
+ },
+ created() {
+ if (this.orgNavBarFlag == true) {
+ this.$store.commit("SET_ORGNAVBARTITLE", "");
+ this.$store.commit("SET_ORGNAVBARLIST", []);
+ this.$store.commit("SET_ORGNAVBARFLAG", false);
}
-}
+ if (this.arcNavBarFlag == true) {
+ this.$store.commit("SET_ARCNAVBARTITLE", "");
+ this.$store.commit("SET_ARCNAVBARCODE", "");
+ this.$store.commit("SET_ARCNAVBARFLAG", false);
+ }
+ },
+ computed: {
+ ...mapGetters([
+ // 校区内导航的显示关闭
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ methods: {
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ },
+};
</script>
-<style>
-</style>
+<style></style>
diff --git a/src/pcviews/specialmap/welcome.vue b/src/pcviews/specialmap/welcome.vue
index cfa5954..619beb0 100644
--- a/src/pcviews/specialmap/welcome.vue
+++ b/src/pcviews/specialmap/welcome.vue
@@ -1,215 +1,220 @@
-/*
- * @Author: Morpheus
- * @Name: 社区迎新
- * @Date: 2021-11-15 17:14:47
- * @Last Modified by: Morpheus
- * @Last Modified time: 2022-01-26 10:51:24
- */
+/* * @Author: Morpheus * @Name: 校区迎新 * @Date: 2021-11-15 17:14:47 * @Last
+Modified by: Morpheus * @Last Modified time: 2022-01-26 10:51:24 */
<template>
- <div>
- <div class="welcome-container">
- <div class="header">
- <div class="title">
- {{ title }}
- <a href="javascript:void(0);"
- title="全景浏览">
- <img @click="panoramaPlay"
- class="panorama-control"
- src="/img/icon/panorama.png"
- alt="">
- </a>
- <a href="javascript:void(0);"
- title="语音介绍">
- <img @click="audioPlay"
- class="audio-control"
- src="/img/navicon/audio.png"
- alt="">
- </a>
- <a href="javascript:void(0);"
- title="关闭">
- <img @click="closeModel"
- class="close-box"
- src="/img/navicon/close.png"
- alt="">
- </a>
- </div>
- </div>
- <div class="content-box">
- <div class="img-exhibition">
- <div class="content">
- <el-carousel :interval="5000"
- arrow="always"
- height="300px">
- <el-carousel-item v-for="item in list"
- :key="item">
- <el-image :src="item"
- :preview-src-list="[item]">
- </el-image>
- </el-carousel-item>
- </el-carousel>
- </div>
- </div>
- <div class="organizer">
- 主办:{{ sponsor }}
- </div>
- <div class="undertake">
- 承办:{{ undertake }}
- </div>
- <div class="time-box">
- 时间:{{ time }}
- </div>
- <div class="text-introduce">
- <div class="title">
- 相关介绍:
- </div>
- <div class="content">
- <p v-text="introduce">
-
- </p>
- </div>
- </div>
- <div class="panorama-box" v-show="panoramaShow">
- <div class="title">
- 全景浏览
- <a href="javascript:void(0);"
- title="关闭">
- <img @click="panoramaShow = false, panoramaUrl = ''"
- class="close-box"
- src="/img/navicon/close.png"
- alt="">
- </a>
- </div>
- <div class="content">
- <iframe style="width: 100%; height: 100%" :src="panoramaUrl" frameborder="0"></iframe>
- </div>
- </div>
- </div>
+ <div>
+ <div class="welcome-container">
+ <div class="header">
+ <div class="title">
+ {{ title }}
+ <a href="javascript:void(0);" title="全景浏览">
+ <img
+ @click="panoramaPlay"
+ class="panorama-control"
+ src="/img/icon/panorama.png"
+ alt=""
+ />
+ </a>
+ <a href="javascript:void(0);" title="语音介绍">
+ <img
+ @click="audioPlay"
+ class="audio-control"
+ src="/img/navicon/audio.png"
+ alt=""
+ />
+ </a>
+ <a href="javascript:void(0);" title="关闭">
+ <img
+ @click="closeModel"
+ class="close-box"
+ src="/img/navicon/close.png"
+ alt=""
+ />
+ </a>
</div>
+ </div>
+ <div class="content-box">
+ <div class="img-exhibition">
+ <div class="content">
+ <el-carousel :interval="5000" arrow="always" height="300px">
+ <el-carousel-item v-for="item in list" :key="item">
+ <el-image :src="item" :preview-src-list="[item]"> </el-image>
+ </el-carousel-item>
+ </el-carousel>
+ </div>
+ </div>
+ <div class="organizer">主办:{{ sponsor }}</div>
+ <div class="undertake">承办:{{ undertake }}</div>
+ <div class="time-box">时间:{{ time }}</div>
+ <div class="text-introduce">
+ <div class="title">相关介绍:</div>
+ <div class="content">
+ <p v-text="introduce"></p>
+ </div>
+ </div>
+ <div class="panorama-box" v-show="panoramaShow">
+ <div class="title">
+ 全景浏览
+ <a href="javascript:void(0);" title="关闭">
+ <img
+ @click="(panoramaShow = false), (panoramaUrl = '')"
+ class="close-box"
+ src="/img/navicon/close.png"
+ alt=""
+ />
+ </a>
+ </div>
+ <div class="content">
+ <iframe
+ style="width: 100%; height: 100%"
+ :src="panoramaUrl"
+ frameborder="0"
+ ></iframe>
+ </div>
+ </div>
+ </div>
</div>
+ </div>
</template>
<script>
-
-import { getWelcome } from '@/api/pc/public/specialmap'
-import { mapGetters } from 'vuex'
+import { getWelcome } from "@/api/pc/public/specialmap";
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- time: '',
- sponsor: '',
- undertake: '',
- title: '',
- introduce: '',
- list: [],
- pathList: [],
- pointNameList: [],
- pointList: [],
- DC: null,
- pathLayer: null,
- pointLayer: null,
- panoramaUrlOne: '',
- panoramaUrl: '',
- audioSource: '',
- audioFlag: false,
- audioCourse: false,
- audioSynth: null,
- audioMsg: null,
- panoramaShow: false
+ data() {
+ return {
+ time: "",
+ sponsor: "",
+ undertake: "",
+ title: "",
+ introduce: "",
+ list: [],
+ pathList: [],
+ pointNameList: [],
+ pointList: [],
+ DC: null,
+ pathLayer: null,
+ pointLayer: null,
+ panoramaUrlOne: "",
+ panoramaUrl: "",
+ audioSource: "",
+ audioFlag: false,
+ audioCourse: false,
+ audioSynth: null,
+ audioMsg: null,
+ panoramaShow: false,
+ };
+ },
+ created() {},
+ mounted() {
+ // console.log("显示", "see1");
+
+ this.DC = global.DC;
+
+ this.audioSynth = window.speechSynthesis;
+
+ this.audioMsg = new window.SpeechSynthesisUtterance();
+
+ this.audioMsg.onend = function () {
+ // this.audioSynth.cancel();
+ this.audioFlag = false;
+ this.audioCourse = false;
+ };
+ this.getData();
+ },
+ computed: {
+ ...mapGetters([
+ "viewer",
+ // 校区内导航的显示关闭
+ "campusNavFlag",
+ "orgNavBarFlag",
+ "arcNavBarFlag",
+ ]),
+ },
+ methods: {
+ getData() {
+ getWelcome({ hdname: "校区迎新" }).then((res) => {
+ var result = res.data.data;
+ this.title = result.hdname;
+ this.time = result.time;
+ this.sponsor = result.sponsor;
+ this.undertake = result.undertake;
+ this.panoramaUrl = result.panoramaurl;
+ this.panoramaUrlOne = result.panoramaurl;
+ this.introduce = result.context;
+ this.audioSource = result.context;
+
+ this.audioPlay();
+
+ this.list = result.tpurl.split(",");
+ this.pointNameList = result.addressname.split(",");
+ this.pointList = result.address.split(";");
+
+ var a = result.lx.split(";");
+
+ a.forEach((item) => {
+ var b = item.split("(");
+ var c = b[1].substr(0, b[1].length - 1);
+ var d = c.split(",");
+ var j = [];
+ d.forEach((it) => {
+ var e = it.split(" ");
+ var f = e.join(",");
+ j.push(f);
+ });
+ var k = j.join(";");
+ this.pathList.push(k);
+ });
+
+ this.pathLayer = new this.DC.VectorLayer("pathLayer");
+ this.viewer.addLayer(this.pathLayer);
+
+ this.pointLayer = new this.DC.HtmlLayer("pointLayer");
+ this.viewer.addLayer(this.pointLayer);
+
+ this.pathList.forEach((item) => {
+ this.drawPolyline(item);
+ });
+
+ this.pointList.forEach((item, index) => {
+ this.drawPoint(item.split(","), this.pointNameList[index]);
+ });
+ if (this.pointList.length > 0) {
+ this.$store.dispatch("pcMoveView", {
+ viewer: this.viewer,
+ jd: +this.pointList[0].split(",")[0] - 0.0005,
+ wd: this.pointList[0].split(",")[1],
+ });
+ } else {
+ this.$store.dispatch("pcMoveView", {
+ viewer: this.viewer,
+ jd: +this.pathList[0].split(";")[0].split(",")[0] - 0.0005,
+ wd: this.pathList[0].split(";")[0].split(",")[1],
+ });
}
+ });
},
- created () {
+ drawPolyline(item) {
+ const polyline = new this.DC.Polyline(item);
+ polyline.setStyle({
+ width: 6,
+ arcType: true,
+ material: new this.DC.PolylineImageTrailMaterialProperty({
+ color: new this.DC.Color(255, 0, 0),
+ speed: 60,
+ image: "/img/icon/right.png",
+ repeat: { x: 320, y: 1 },
+ }),
+ clampToGround: true,
+ });
+
+ this.pathLayer.addOverlay(polyline);
},
- mounted () {
- this.DC = global.DC
-
- this.audioSynth = window.speechSynthesis
-
- this.audioMsg = new window.SpeechSynthesisUtterance()
-
- this.audioMsg.onend = function () {
- this.audioSynth.cancel()
- this.audioFlag = false
- this.audioCourse = false
- }
-
- getWelcome({ hdname: '社区迎新' }).then((res) => {
- var result = res.data.data
- this.title = result.hdname
- this.time = result.time
- this.sponsor = result.sponsor
- this.undertake = result.undertake
- this.panoramaUrl = result.panoramaurl
- this.panoramaUrlOne = result.panoramaurl
- this.introduce = result.context
- this.audioSource = result.context
- this.list = result.tpurl.split(',')
- this.pointNameList = result.addressname.split(',')
- this.pointList = result.address.split(';')
-
- var a = result.lx.split(';')
-
- a.forEach(item => {
- var b = item.split('(')
- var c = b[1].substr(0, b[1].length - 1)
- var d = c.split(',')
- var j = []
- d.forEach(it => {
- var e = it.split(' ')
- var f = e.join(',')
- j.push(f)
- })
- var k = j.join(';')
- this.pathList.push(k)
- })
-
- this.pathLayer = new this.DC.VectorLayer('pathLayer')
- this.viewer.addLayer(this.pathLayer)
-
- this.pointLayer = new this.DC.HtmlLayer('pointLayer')
- this.viewer.addLayer(this.pointLayer)
-
- this.pathList.forEach(item => {
- this.drawPolyline(item)
- })
-
- this.pointList.forEach((item, index) => {
- this.drawPoint(item.split(','), this.pointNameList[index])
- })
- })
- },
- computed: {
- ...mapGetters([
- 'viewer',
- // 社区内导航的显示关闭
- 'campusNavFlag',
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- methods: {
- drawPolyline (item) {
- const polyline = new this.DC.Polyline(item)
-
- polyline.setStyle({
- width: 6,
- arcType: true,
- material: new this.DC.PolylineImageTrailMaterialProperty({
- color: new this.DC.Color(255, 0, 0),
- speed: 60,
- image: '/img/icon/right.png',
- repeat: { x: 320, y: 1 }
- }),
- clampToGround: true
- })
-
- this.pathLayer.addOverlay(polyline)
- },
- drawPoint (item, name) {
- const divIcon = new this.DC.DivIcon(
- new this.DC.Position(Number(item[0]), Number(item[1]), 0),
- `
+ drawPoint(item, name) {
+ const divIcon = new this.DC.DivIcon(
+ new this.DC.Position(Number(item[0]), Number(item[1]), 0),
+ `
<div class="point-entitys-box">
<div class="point-logo">
<img src="/img/icon/activity.png">
@@ -219,60 +224,199 @@
</div>
</div>
`
- )
- this.pointLayer.addOverlay(divIcon)
- },
- audioPlay () {
- if (this.audioFlag == false) {
- this.audioMsg.text = this.audioSource
- this.audioSynth.speak(this.audioMsg)
- this.audioFlag = true
- this.audioCourse = true
- } else {
- if (this.audioCourse == true) {
- this.audioSynth.pause()
- this.audioCourse = false
- } else {
- this.audioSynth.resume()
- this.audioCourse = true
- }
- }
- },
- closeModel () {
- this.viewer.removeLayer(this.pathLayer)
- this.viewer.removeLayer(this.pointLayer)
-
- this.audioSynth.cancel()
- this.audioFlag = false
- this.audioCourse = false
-
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- },
- panoramaPlay () {
- this.panoramaShow = true
- this.panoramaUrl = this.panoramaUrlOne
+ );
+ this.pointLayer.addOverlay(divIcon);
+ },
+ audioPlay() {
+ if (this.audioFlag == false) {
+ this.audioMsg.text = this.audioSource;
+ this.audioSynth.speak(this.audioMsg);
+ this.audioFlag = true;
+ this.audioCourse = true;
+ } else {
+ if (this.audioCourse == true) {
+ this.audioSynth.pause();
+ this.audioCourse = false;
+ } else {
+ this.audioSynth.resume();
+ this.audioCourse = true;
}
- }
+ }
+ },
+ closeModel() {
+ this.viewer.removeLayer(this.pathLayer);
+ this.viewer.removeLayer(this.pointLayer);
-}
+ this.audioSynth.cancel();
+ this.audioFlag = false;
+ this.audioCourse = false;
+
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ },
+ panoramaPlay() {
+ this.panoramaShow = true;
+ this.panoramaUrl = this.panoramaUrlOne;
+ },
+ },
+ destroyed() {
+ // this.audioPlay();
+ // console.log("关闭", "see1");
+ },
+};
</script>
-<style lang='scss' scope>
+<style lang="scss" scope>
.welcome-container {
- padding: 10px;
- position: fixed;
- top: 132px;
- left: 132px;
- width: 480px;
- height: 720px;
- background: rgba(40, 187, 240, 0.7);
- border-radius: 10px;
- color: #fff;
- border: 1px solid #29baf1;
- box-shadow: 0 0 10px 2px #29baf1;
+ padding: 10px;
+ position: fixed;
+ top: 132px;
+ left: 132px;
+ width: 480px;
+ height: 720px;
+ background: rgba(40, 187, 240, 0.7);
+ border-radius: 10px;
+ color: #fff;
+ border: 1px solid #29baf1;
+ box-shadow: 0 0 10px 2px #29baf1;
- .header {
+ .header {
+ margin-bottom: 10px;
+ height: 36px;
+ line-height: 36px;
+ text-align: center;
+ position: relative;
+ background: #29baf1;
+
+ .title {
+ .panorama-control {
+ position: absolute;
+ top: 0;
+ right: 56px;
+ bottom: 0;
+ left: auto;
+ margin: auto;
+ width: 16px;
+ height: 16px;
+ cursor: pointer;
+ }
+
+ .audio-control {
+ position: absolute;
+ top: 0;
+ right: 32px;
+ bottom: 0;
+ left: auto;
+ margin: auto;
+ width: 16px;
+ height: 16px;
+ cursor: pointer;
+ }
+
+ .close-box {
+ position: absolute;
+ top: 0;
+ right: 8px;
+ bottom: 0;
+ left: auto;
+ margin: auto;
+ width: 16px;
+ height: 16px;
+ cursor: pointer;
+ }
+ }
+ }
+
+ .content-box {
+ padding: 0 16px;
+ height: calc(100% - 36px);
+
+ & > div {
+ margin-bottom: 10px;
+ }
+
+ & > div:last-child {
+ margin-bottom: 0px;
+ }
+
+ .text-introduce {
+ height: calc(100% - 458px);
+
+ .title {
+ position: relative;
+ padding-left: 24px;
+ height: 36px;
+ line-height: 36px;
+
+ &::before {
+ position: absolute;
+ top: 12px;
+ left: 0;
+ width: 0;
+ height: 6px;
+ border: 6px solid #fff;
+ box-sizing: border-box;
+ box-shadow: 0px 0px 4px 1px #fff;
+ border-radius: 50%;
+ content: "";
+ }
+ }
+
+ .content {
+ height: calc(100% - 36px);
+
+ p {
+ height: 100%;
+ text-indent: 2em;
+ font-size: 16px;
+ letter-spacing: 2px;
+ line-height: 24px;
+ overflow-y: auto;
+ }
+ }
+ }
+
+ .organizer,
+ .undertake,
+ .time-box {
+ padding-left: 24px;
+ position: relative;
+
+ height: 36px;
+ line-height: 36px;
+
+ &::before {
+ position: absolute;
+ top: 12px;
+ left: 0px;
+ width: 0;
+ height: 6px;
+ border: 6px solid #fff;
+ box-sizing: border-box;
+ box-shadow: 0px 0px 4px 1px #fff;
+ border-radius: 50%;
+ content: "";
+ }
+ }
+
+ .panorama-box {
+ padding: 10px;
+ margin: auto !important;
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 10;
+ width: 560px;
+ height: 406px;
+ background: rgba(40, 187, 240, 0.7);
+ border-radius: 10px;
+ color: #fff;
+ border: 1px solid #29baf1;
+ box-shadow: 0 0 10px 2px #29baf1;
+
+ .title {
margin-bottom: 10px;
height: 36px;
line-height: 36px;
@@ -280,217 +424,81 @@
position: relative;
background: #29baf1;
- .title {
- .panorama-control {
- position: absolute;
- top: 0;
- right: 56px;
- bottom: 0;
- left: auto;
- margin: auto;
- width: 16px;
- height: 16px;
- cursor: pointer;
- }
-
- .audio-control {
- position: absolute;
- top: 0;
- right: 32px;
- bottom: 0;
- left: auto;
- margin: auto;
- width: 16px;
- height: 16px;
- cursor: pointer;
- }
-
- .close-box {
- position: absolute;
- top: 0;
- right: 8px;
- bottom: 0;
- left: auto;
- margin: auto;
- width: 16px;
- height: 16px;
- cursor: pointer;
- }
+ .panorama-control {
+ position: absolute;
+ top: 0;
+ right: 56px;
+ bottom: 0;
+ left: auto;
+ margin: auto;
+ width: 16px;
+ height: 16px;
+ cursor: pointer;
}
+
+ .audio-control {
+ position: absolute;
+ top: 0;
+ right: 32px;
+ bottom: 0;
+ left: auto;
+ margin: auto;
+ width: 16px;
+ height: 16px;
+ cursor: pointer;
+ }
+
+ .close-box {
+ position: absolute;
+ top: 0;
+ right: 8px;
+ bottom: 0;
+ left: auto;
+ margin: auto;
+ width: 16px;
+ height: 16px;
+ cursor: pointer;
+ }
+ }
+
+ .content {
+ padding: 0 10px;
+ height: calc(100% - 46px);
+
+ .iframe {
+ width: 100%;
+ height: 100%;
+ }
+ }
}
- .content-box {
- padding: 0 16px;
- height: calc(100% - 36px);
+ .img-exhibition {
+ height: 300px;
- & > div {
- margin-bottom: 10px;
- }
+ .content {
+ .el-image {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ margin: auto;
+ // width: 100%;
+ height: 100%;
- & > div:last-child {
- margin-bottom: 0px;
- }
-
- .text-introduce {
- height: calc(100% - 458px);
-
- .title {
- position: relative;
- padding-left: 24px;
- height: 36px;
- line-height: 36px;
-
- &::before {
- position: absolute;
- top: 12px;
- left: 0;
- width: 0;
- height: 6px;
- border: 6px solid #fff;
- box-sizing: border-box;
- box-shadow: 0px 0px 4px 1px #fff;
- border-radius: 50%;
- content: '';
- }
- }
-
- .content {
- height: calc(100% - 36px);
-
- p {
- height: 100%;
- text-indent: 2em;
- font-size: 16px;
- letter-spacing: 2px;
- line-height: 24px;
- overflow-y: auto;
- }
- }
- }
-
- .organizer,
- .undertake,
- .time-box {
- padding-left: 24px;
- position: relative;
-
- height: 36px;
- line-height: 36px;
-
- &::before {
- position: absolute;
- top: 12px;
- left: 0px;
- width: 0;
- height: 6px;
- border: 6px solid #fff;
- box-sizing: border-box;
- box-shadow: 0px 0px 4px 1px #fff;
- border-radius: 50%;
- content: '';
- }
- }
-
- .panorama-box {
- padding: 10px;
- margin: auto !important;
- position: fixed;
+ img {
+ position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
- z-index: 10;
- width: 560px;
- height: 406px;
- background: rgba(40, 187, 240, 0.7);
- border-radius: 10px;
- color: #fff;
- border: 1px solid #29baf1;
- box-shadow: 0 0 10px 2px #29baf1;
-
- .title {
- margin-bottom: 10px;
- height: 36px;
- line-height: 36px;
- text-align: center;
- position: relative;
- background: #29baf1;
-
- .panorama-control {
- position: absolute;
- top: 0;
- right: 56px;
- bottom: 0;
- left: auto;
- margin: auto;
- width: 16px;
- height: 16px;
- cursor: pointer;
- }
-
- .audio-control {
- position: absolute;
- top: 0;
- right: 32px;
- bottom: 0;
- left: auto;
- margin: auto;
- width: 16px;
- height: 16px;
- cursor: pointer;
- }
-
- .close-box {
- position: absolute;
- top: 0;
- right: 8px;
- bottom: 0;
- left: auto;
- margin: auto;
- width: 16px;
- height: 16px;
- cursor: pointer;
- }
- }
-
- .content {
- padding: 0 10px;
- height: calc(100% - 46px);
-
- .iframe {
- width: 100%;
- height: 100%;
- }
- }
+ margin: auto;
+ width: 100%;
+ height: 100%;
+ }
}
-
- .img-exhibition {
- height: 300px;
-
- .content {
- .el-image {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- margin: auto;
- // width: 100%;
- height: 100%;
-
- img {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- margin: auto;
- width: 100%;
- height: 100%;
- }
- }
- }
- }
+ }
}
+ }
}
</style>
diff --git a/src/pcviews/tool/area.vue b/src/pcviews/tool/area.vue
index f8d1c31..79c7e28 100644
--- a/src/pcviews/tool/area.vue
+++ b/src/pcviews/tool/area.vue
@@ -1,62 +1,57 @@
-/*
- * @Author: Morpheus
- * @Name: 地图测面
- * @Date: 2021-11-13 16:04:27
- * @Last Modified by: Morpheus
- * @Last Modified time: 2022-02-15 14:27:28
- */
+/* * @Author: Morpheus * @Name: 地图测面 * @Date: 2021-11-13 16:04:27 * @Last
+Modified by: Morpheus * @Last Modified time: 2022-02-15 14:27:28 */
<template>
- <public-box class="tool-area">
- <template slot="public-box-header">
- <div class="title">
- <img class="icon deblurring" src="/img/icon/tool-area.png" alt />
- <span>地图测面</span>
- </div>
- <img class="close" src="/img/navicon/close.png" alt @click="closeModel" />
- </template>
- <template slot="public-box-content">
- <el-button type="primary" size="mini" @click.stop="calcDistance">开始</el-button>
+ <public-box class="tool-area">
+ <template slot="public-box-header">
+ <div class="title">
+ <img class="icon deblurring" src="/img/icon/tool-area.png" alt />
+ <span>地图测面</span>
+ </div>
+ <img class="close" src="/img/navicon/close.png" alt @click="closeModel" />
+ </template>
+ <template slot="public-box-content">
+ <el-button type="primary" size="mini" @click.stop="calcDistance"
+ >开始</el-button
+ >
- <el-button type="danger" size="mini" @click.stop="deactivate">清除</el-button>
- </template>
- </public-box>
+ <el-button type="danger" size="mini" @click.stop="deactivate"
+ >清除</el-button
+ >
+ </template>
+ </public-box>
</template>
<script>
-
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- }
+ data() {
+ return {};
+ },
+ computed: {
+ ...mapGetters(["viewer"]),
+ },
+ created() {},
+ methods: {
+ calcDistance() {
+ this.viewer.measure.areaSurface();
},
- computed: {
- ...mapGetters([
- 'viewer'
- ])
- },
- created () {
- },
- methods: {
- calcDistance () {
- this.viewer.measure.areaSurface()
- },
- deactivate () {
- this.viewer.measure.deactivate()
- },
-
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ deactivate() {
+ this.viewer.measure.deactivate();
},
- destroyed () {
- }
-}
+
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ this.viewer.measure.deactivate();
+ },
+ },
+ destroyed() {
+ this.viewer.measure.deactivate();
+ },
+};
</script>
-<style lang="scss" scoped>
-</style>
+<style lang="scss" scoped></style>
diff --git a/src/pcviews/tool/ranging.vue b/src/pcviews/tool/ranging.vue
index d787bfd..1402110 100644
--- a/src/pcviews/tool/ranging.vue
+++ b/src/pcviews/tool/ranging.vue
@@ -1,56 +1,57 @@
-/*
- * @Author: Morpheus
- * @Name: 地图测距
- * @Date: 2021-11-13 16:04:27
- * @Last Modified by: Morpheus
- * @Last Modified time: 2022-02-15 14:28:44
- */
+/* * @Author: Morpheus * @Name: 地图测距 * @Date: 2021-11-13 16:04:27 * @Last
+Modified by: Morpheus * @Last Modified time: 2022-02-15 14:28:44 */
<template>
- <public-box class="tool-ranging">
- <template slot="public-box-header">
- <div class="title">
- <img class="icon deblurring" src="/img/icon/tool-ranging.png" alt />
- <span>地图测距</span>
- </div>
- <img class="close" src="/img/navicon/close.png" alt @click="closeModel" />
- </template>
- <template slot="public-box-content">
- <el-button type="primary" size="mini" @click.stop="calcDistance">开始</el-button>
+ <public-box class="tool-ranging">
+ <template slot="public-box-header">
+ <div class="title">
+ <img class="icon deblurring" src="/img/icon/tool-ranging.png" alt />
+ <span>地图测距</span>
+ </div>
+ <img class="close" src="/img/navicon/close.png" alt @click="closeModel" />
+ </template>
+ <template slot="public-box-content">
+ <el-button type="primary" size="mini" @click.stop="calcDistance"
+ >开始</el-button
+ >
- <el-button type="danger" size="mini" @click.stop="deactivate">清除</el-button>
- </template>
- </public-box>
+ <el-button type="danger" size="mini" @click.stop="deactivate"
+ >清除</el-button
+ >
+ </template>
+ </public-box>
</template>
<script>
-import { mapGetters } from 'vuex'
+import { mapGetters } from "vuex";
export default {
- data () {
- return {
- }
+ data() {
+ return {};
+ },
+ computed: {
+ ...mapGetters(["viewer"]),
+ },
+ created() {},
+ methods: {
+ calcDistance() {
+ this.viewer.measure.distanceSurface();
},
- computed: {
- ...mapGetters(['viewer'])
- },
- created () { },
- methods: {
- calcDistance () {
- this.viewer.measure.distanceSurface()
- },
- deactivate () {
- this.viewer.measure.deactivate()
- },
-
- closeModel () {
- this.$store.dispatch('delVisitedViews', this.$route)
- this.$router.push('/pcLayout/default')
- }
+ deactivate() {
+ this.viewer.measure.deactivate();
},
- destroyed () { }
-}
+
+ closeModel() {
+ this.$store.dispatch("delVisitedViews", this.$route);
+ this.$router.push("/pcLayout/default");
+ this.viewer.measure.deactivate();
+ },
+ },
+ destroyed() {
+ this.viewer.measure.deactivate();
+ },
+};
</script>
<style lang="sass" scoped>
diff --git a/src/pcviews/tool/sign.vue b/src/pcviews/tool/sign.vue
index 5b95913..a237c9b 100644
--- a/src/pcviews/tool/sign.vue
+++ b/src/pcviews/tool/sign.vue
@@ -10,7 +10,11 @@
<template slot="public-box-content">
<div class="list-box">
<ul v-show="signList.length > 0">
- <li v-for="(item, index) in signList" :key="index">
+ <li
+ v-for="(item, index) in signList"
+ :key="index"
+ @click="dingw(item)"
+ >
<img src="/img/icon/sign-list.png" alt />
{{ item.name }}
<el-button
@@ -18,7 +22,7 @@
size="mini"
icon="el-icon-delete"
circle
- @click="deleteIcon(item.id)"
+ @click.stop="deleteIcon(item.id)"
></el-button>
</li>
</ul>
@@ -31,6 +35,12 @@
<el-button type="primary" size="mini" @click.stop="addSign"
>新增</el-button
>
+ </div>
+ <div>
+ <img
+ src='"/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAFeAV4DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6er…sf2r7P5P76OTdt8zd9xjjG5evrXsFFFABXj/x08E+IvGP9g/2Bp/2z7L9o8799HHt3eXt++wzna3T0r2CigD5A/wCFJfEP/oXv/J23/wDjlfR/xS0TUfEfw41bSdJt/tF9P5Plxb1TdtmRjyxAHAJ5NdhRQB4/8C/BPiLwd/b39v6f9j+1fZ/J/fRybtvmbvuMcY3L19a5D4pfC3xl4j+I+ratpOjfaLGfyfLl+1Qpu2wop4ZwRyCORX0fRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//2Q=="'
+ alt=""
+ />
</div>
</template>
</public-box>
@@ -61,6 +71,34 @@
},
},
methods: {
+ dingw(item) {
+ let that = this;
+ // console.log(item);
+ // this.$store.dispatch("mapFlyTo", {
+ // lntLat: [item.jd, item.wd, 120], //114.04020791, 27.62934732
+ // heading: 0,
+ // pitch: -90,
+ // roll: 0,
+ // noOpen: true,
+ // mviewer: that.viewer,
+ // });
+ that.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+ item.jd,
+ item.wd,
+ 400.0
+ ),
+ orientation: {
+ // 指向
+ heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+ },
deleteIcon(id) {
let that = this;
deletelabel(id).then((res) => {
@@ -86,7 +124,10 @@
const data = res.data.data.records;
that.signList = data;
// that.$store.commit("clearLabelLayerIcon");
- that.$store.commit("addLabelLayerIcon", { list: data, clear: true });
+ that.$store.dispatch("addLabelLayerIcon", {
+ list: data,
+ clear: true,
+ });
});
},
moveMessage(e, b) {
@@ -101,7 +142,8 @@
addSign() {
var that = this;
that.DC = global.DC;
-
+ this.$store.commit("set_closeMapClick", true);
+ // console.log("开始", "see");
that.viewer.on(that.DC.MouseEventType.MOUSE_MOVE, (e) =>
that.moveMessage(e, "点击确认标注位置")
);
@@ -146,6 +188,7 @@
that.moveMessage(e, "")
);
}
+ this.$store.commit("clearLabelLayerIcon");
},
};
</script>
diff --git a/src/router/axios.js b/src/router/axios.js
index 44d45e7..758ab14 100644
--- a/src/router/axios.js
+++ b/src/router/axios.js
@@ -14,9 +14,13 @@
// }, 3000);
const service = axios.create({
// baseURL: 'http://192.168.0.107:83',
+
+ // baseURL: "http://localhost:82",
+ // baseURL: "http://192.168.0.107:82",
// baseURL: "http://192.168.0.107:80",
- // baseURL: "http://192.168.0.110:80", //唐
- baseURL: "http://171.34.197.243:790", //正常接口
+ baseURL: "http://192.168.0.110:82", //唐
+ // baseURL: "http://171.34.197.243:790", //正常接口
+ // baseURL: "http://171.34.197.243:82/api", //验收
// baseURL: "https://6e78efa6.cpolar.io/apis", //https接口
// baseURL: url, //https接口
// baseURL: 'http://s16s652780.51mypc.cn/api',
diff --git a/src/router/page/index.js b/src/router/page/index.js
index 3723630..672fc30 100644
--- a/src/router/page/index.js
+++ b/src/router/page/index.js
@@ -79,7 +79,7 @@
path: 'orgnav',
component: pcOrgnav,
meta: {
- title: '社区内机构导览'
+ title: '校区内机构导览'
},
children: [{
path: 'masses',
@@ -120,7 +120,7 @@
path: 'arc',
component: pcArc,
meta: {
- title: '社区内建筑'
+ title: '校区内建筑'
},
children: [{
path: 'edifact',
@@ -139,14 +139,14 @@
path: 'venue',
component: pcArcVenue,
meta: {
- title: '社区场馆'
+ title: '校区场馆'
}
},
{
path: 'dorm',
component: pcArcDorm,
meta: {
- title: '社区宿舍'
+ title: '校区宿舍'
}
}, {
path: 'culture',
@@ -193,7 +193,7 @@
path: 'medical',
component: pcServiceMedical,
meta: {
- title: '社区内医疗'
+ title: '校区内医疗'
}
},
{
@@ -206,7 +206,7 @@
path: 'showers',
component: pcServiceShowers,
meta: {
- title: '社区浴室'
+ title: '校区浴室'
}
},
{
@@ -269,14 +269,14 @@
path: 'campusnav',
component: pcCampusnav,
meta: {
- title: '社区导览'
+ title: '校区导览'
}
},
{
path: 'campusnavi',
component: pcCampusnavi,
meta: {
- title: '社区导航'
+ title: '校区导航'
}
},
{
@@ -289,14 +289,14 @@
path: 'celebrate',
component: pcSpecialmapCelebrate,
meta: {
- title: '社区庆'
+ title: '校区庆'
}
},
{
path: 'welcome',
component: pcSpecialmapWelcome,
meta: {
- title: '社区迎新'
+ title: '校区迎新'
}
}
]
diff --git a/src/store/getters.js b/src/store/getters.js
index 58948d9..c8a71bc 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -33,7 +33,11 @@
showActivity: (state) => state.mobile.showActivity, // 显影活动弹窗
showActivityData: (state) => state.mobile.showActivityData, // 活动弹窗数据
isOpenDrawALineMany: (state) => state.mobile.isOpenDrawALineMany, // 显影活动弹窗
- seeRight: (state) => state.mobile.seeRight // 右侧控制栏显影
+ seeRight: (state) => state.mobile.seeRight, // 右侧控制栏显影
+
+ urlParameterData: (state) => state.mobile.urlParameterData, // url参数
+
+
}
const navigation = {
@@ -79,7 +83,11 @@
addTagPopup: (state) => state.popupParams.addTagPopup,
addTagPosition: (state) => state.popupParams.addTagPosition,
- addSignList: (state) => state.popupParams.addSignList
+ addSignList: (state) => state.popupParams.addSignList,
+
+ nowlabelLayerData: (state) => state.popupParams.nowlabelLayerData, // 自定义标签数据
+ labelLayerDataShow: (state) => state.popupParams.labelLayerDataShow, // 自定义标签弹窗显示
+ closeMapClick: (state) => state.popupParams.closeMapClick, // 关闭地图点击,防止新增标签误触
}
export default getters
\ No newline at end of file
diff --git a/src/store/modules/mobile.js b/src/store/modules/mobile.js
index 831c8f3..eaa7fb9 100644
--- a/src/store/modules/mobile.js
+++ b/src/store/modules/mobile.js
@@ -1,7 +1,10 @@
import $store from "../index";
import axios from "axios";
+
+import urlParameter from './mobiles/urlParameter'
const mobile = {
state: {
+ ...urlParameter.state, //url参数
mviewer: null, // 地图实体类
mBigPopup: false, // 全屏弹窗
popupOurOpenData: [], // 全屏弹窗中下拉菜单数据
@@ -78,6 +81,7 @@
seeRight: true, //右侧控制栏显影
},
mutations: {
+ ...urlParameter.mutations, //url参数
MSET_VIEWER(state, viewer) {
state.mviewer = viewer;
},
@@ -215,10 +219,35 @@
// roll: 0,
};
//取消3D底图
- state.mviewer.imageryLayers.remove(state.vecLayer);
- state.vecLayer = null;
- state.mviewer.imageryLayers.remove(state.cvaLayer);
- state.cvaLayer = null;
+ // state.mviewer.imageryLayers.remove(state.vecLayer);
+ // state.vecLayer = null;
+ // state.mviewer.imageryLayers.remove(state.cvaLayer);
+ // state.cvaLayer = null;
+ //加载底图
+ state.vecLayer = state.mviewer.imageryLayers.addImageryProvider(
+ new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
+ url: " http://t1.tianditu.gov.cn/vec_w/wmts?tk=9ae78c51a0a28f06444d541148496e36",
+ type: "wmts",
+ layer: "vec",
+ style: "default",
+ format: "tiles",
+ tileMatrixSetID: "w",
+ show: true,
+ maximumLevel: 18,
+ })
+ );
+ state.cvaLayer = state.mviewer.imageryLayers.addImageryProvider(
+ new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
+ url: " http://t1.tianditu.gov.cn/cva_w/wmts?tk=9ae78c51a0a28f06444d541148496e36",
+ type: "wmts",
+ layer: "cva",
+ style: "default",
+ format: "tiles",
+ tileMatrixSetID: "w",
+ show: true,
+ maximumLevel: 18,
+ })
+ );
state.tilesetLayer.show = false; //隐藏3d图形
state.newLayer = state.usetowpointfive(); //添加2.5d图形贴片
state.wallLayer.show = false; //打开瀑布
@@ -341,11 +370,20 @@
},
},
actions: {
- MSET_CREADE({ state, commit, dispatch }) {
+ ...urlParameter.actions, //url参数
+ MSET_CREADE({
+ state,
+ commit,
+ dispatch
+ }) {
state.pointLayer = new global.DC.VectorLayer("pointLayer"); // 创建图标实体类
state.mviewer.addLayer(state.pointLayer); // 添加到地图
},
- setMobileWindows({ state, commit, dispatch }, data) {
+ setMobileWindows({
+ state,
+ commit,
+ dispatch
+ }, data) {
// 打开随地图移动窗口
let clas, Flys;
const nowHeight = Math.ceil(
@@ -362,9 +400,9 @@
clas = [
data.from == "PopupOurOnce" ? +data.lntLat[0] : +data.lntLat[0],
// data.from == 'PopupOurOnce' ? +data.lntLat[1] - 0.00108 : +data.lntLat[1],
- data.from == "PopupOurOnce"
- ? +data.lntLat[1] - 0.00108
- : +data.lntLat[1] - 0.00048,
+ data.from == "PopupOurOnce" ?
+ +data.lntLat[1] - 0.00108 :
+ +data.lntLat[1] - 0.00048,
data.from == "PopupOurOnce" ? 0 : 30.648862227,
];
} else if (state.dimension == "2.5D") {
@@ -498,7 +536,11 @@
// })
commit("MSET_POPUPDOM", popupsDom);
},
- closeMobileWindowsDom({ state, commit, dispatch }) {
+ closeMobileWindowsDom({
+ state,
+ commit,
+ dispatch
+ }) {
commit("CLOSE_NOWPOSITION"); //中断定位获取
if (!state.MobileWindowsHide && state.popupsDom) {
state.popupsDom.closeOur();
@@ -508,7 +550,10 @@
}
} //cancel
},
- CHANGETOC3({ state, commit }, data) {
+ CHANGETOC3({
+ state,
+ commit
+ }, data) {
// //转换经纬度坐标 成世界坐标cartesian3
var ellipsoid = state.mviewer.scene.globe.ellipsoid;
var cartographic = global.DC.Namespace.Cesium.Cartographic.fromDegrees(
@@ -519,7 +564,10 @@
var position = ellipsoid.cartographicToCartesian(cartographic);
return position;
},
- SET_OPENWIDOWFIXED({ state, commit }, data) {
+ SET_OPENWIDOWFIXED({
+ state,
+ commit
+ }, data) {
// 传递响应数据
commit("MSET_QUERY", data);
// 显示窗口
@@ -535,7 +583,10 @@
)
);
},
- CLOSE_WIDOWFIXED({ state, commit }) {
+ CLOSE_WIDOWFIXED({
+ state,
+ commit
+ }) {
// 隐藏窗口
if (!state.MobileWindowsHideFixed) {
console.log(state.MobileWindowsHideFixed);
@@ -543,9 +594,16 @@
}
},
// 加入当时的选点
- JOIN_POINT({ state, commit }, data) {},
+ JOIN_POINT({
+ state,
+ commit
+ }, data) {},
// flyTo
- mapFlyTo({ state, commit, dispatch }, data) {
+ mapFlyTo({
+ state,
+ commit,
+ dispatch
+ }, data) {
state.mviewer.camera.flyTo({
destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
data.lntLat[0] - 0.012,
@@ -560,7 +618,7 @@
// pitch: data.pitch,
roll: data.roll,
},
- duration: 1.5, // 定位的时间间隔
+ duration: 1, // 定位的时间间隔
complete: () => {
// 完成后的回调
if (data.fn) {
@@ -609,7 +667,11 @@
// });
},
// 飞入点加入位置
- MSET_POINTDATA({ state, commit, dispatch }, data) {
+ MSET_POINTDATA({
+ state,
+ commit,
+ dispatch
+ }, data) {
// 加入坐标
const positions = new global.DC.Position(
data[0] - 0.0119,
@@ -625,12 +687,18 @@
billboard.on(DC.MouseEventType.CLICK, (e) => {
// 定制化窗体
console.log(e);
- const query = { name: "选择点" };
+ const query = {
+ name: "选择点"
+ };
const intLat = [e.wgs84Position.lng, e.wgs84Position.lat];
const d = {
position: null,
lntLat: intLat,
- query: { ...(query || {}), introduce: null, address: intLat },
+ query: {
+ ...(query || {}),
+ introduce: null,
+ address: intLat
+ },
useJWD: true, // 仅使用经纬度
};
dispatch("setMobileWindows", d);
@@ -638,14 +706,22 @@
state.pointLayer.addOverlay(billboard); // 实景
// commit("MSET_OPENPOINTEL", true);
},
- MSET_LOCKPERSPECTIVEL({ state, commit, dispatch }, val) {
+ MSET_LOCKPERSPECTIVEL({
+ state,
+ commit,
+ dispatch
+ }, val) {
// 锁定
state.mviewer.camera.lookAtTransform(
global.DC.Namespace.Cesium.Matrix4.IDENTITY
);
// console.log(global.DC.Namespace.Cesium.Matrix4.IDENTITY)
},
- MSET_DIMENSIONS({ state, commit, dispatch }, val) {
+ MSET_DIMENSIONS({
+ state,
+ commit,
+ dispatch
+ }, val) {
//关闭弹窗
dispatch("closeMobileWindowsDom");
//3d,2.5d转换事件
@@ -671,7 +747,11 @@
},
});
},
- MSET_GOTOCC({ state, commit, dispatch }, val) {
+ MSET_GOTOCC({
+ state,
+ commit,
+ dispatch
+ }, val) {
//测试移动位置
// commit("MSET_DIMENSION", val);
//控制高度
@@ -690,7 +770,11 @@
});
},
//文字转语音控制↓
- MSET_GETAUDIO({ state, commit, dispatch }, val) {
+ MSET_GETAUDIO({
+ state,
+ commit,
+ dispatch
+ }, val) {
state.audioData = new window.SpeechSynthesisUtterance();
state.audioData.text = val;
state.audioData.onstart = function (e) {
@@ -700,7 +784,11 @@
state.audioState = false;
};
},
- MSET_GETAUDIOBEGIN({ state, commit, dispatch }, val) {
+ MSET_GETAUDIOBEGIN({
+ state,
+ commit,
+ dispatch
+ }, val) {
if (state.audioState) {
window.speechSynthesis.cancel();
state.audioState = false;
@@ -712,7 +800,11 @@
},
//文字转语音控制↑
//导航系统↓
- MSET_GOTOWHERE({ state, commit, dispatch }, val) {
+ MSET_GOTOWHERE({
+ state,
+ commit,
+ dispatch
+ }, val) {
state.routerS = []; //清空存着的路径
//单条步行
//本地图使用的是WGS84坐标,而高德使用的是火星坐标GCJ02,所以需要转换参数过去
@@ -752,7 +844,9 @@
// data["strategy"] = strategyType[index];
axios
.get(url, {
- params: { ...data },
+ params: {
+ ...data
+ },
})
.then((res) => {
//回调
@@ -806,7 +900,11 @@
},
//导航系统↑
//绘画线路
- MSET_DRAWALINELAYER({ state, commit, dispatch }, value) {
+ MSET_DRAWALINELAYER({
+ state,
+ commit,
+ dispatch
+ }, value) {
let Str = value[0];
//检查是否存在路线
commit("removePolyline");
@@ -833,7 +931,10 @@
"img/dingwei/dingwei1.png"
); //加入绘画点
billboard.setStyle({
- pixelOffset: { x: 0, y: -17 }, //偏移像素
+ pixelOffset: {
+ x: 0,
+ y: -17
+ }, //偏移像素
});
//订阅事件
billboard.on(global.DC.MouseEventType.CLICK, (e) => {
@@ -869,7 +970,11 @@
// commit("cameraSetView", state.navigationStartLngLat); //移动
},
//绘画线路活动多条
- MSET_DRAWALINELAYERMANY({ state, commit, dispatch }, value) {
+ MSET_DRAWALINELAYERMANY({
+ state,
+ commit,
+ dispatch
+ }, value) {
//检查是否存在路线
commit("removePolylineMany");
commit("removePolyline");
@@ -886,7 +991,10 @@
color: red,
speed: 60,
image: "img/icon/right.png",
- repeat: { x: 320, y: 1 },
+ repeat: {
+ x: 320,
+ y: 1
+ },
});
let drawALineLayerMany = new global.DC.VectorLayer("manyLinePointLayer");
state.mviewer.addLayer(drawALineLayerMany);
@@ -988,7 +1096,11 @@
let windowData = {
position,
lntLat,
- query: { ...(value[2] || {}), position, lntLat },
+ query: {
+ ...(value[2] || {}),
+ position,
+ lntLat
+ },
useJWD: true, //仅使用经纬度
};
dispatch("setMobileWindows", windowData);
@@ -1004,4 +1116,4 @@
},
};
-export default mobile;
+export default mobile;
\ No newline at end of file
diff --git a/src/store/modules/mobilePosition.js b/src/store/modules/mobilePosition.js
index 2614eaa..a6ebee9 100644
--- a/src/store/modules/mobilePosition.js
+++ b/src/store/modules/mobilePosition.js
@@ -1,9 +1,13 @@
-import { Message } from "element-ui";
+import {
+ Message
+} from "element-ui";
// import BMap from "./mobilePositionLID";
import RemoGeoLocation from "./mobilePositionLID1";
const mobilePosition = {
- state: { getSPosition: null },
+ state: {
+ getSPosition: null
+ },
mutations: {
GET_NOWPOSITION(state, val) {
let outData =
@@ -43,70 +47,70 @@
return timeFn;
};
if (navigator.geolocation) {
- let success = function (position) {
- console.log(position);
- times(startTime);
- var lat = position.coords.latitude;
- var lon = position.coords.longitude;
- console.log("成功返回经纬度信息");
- // Message({
- // showClose: true,
- // message:
- // "成功返回经纬度信息(1)" +
- // lon +
- // "_" +
- // lat +
- // "--反应时间:" +
- // times(startTime),
- // type: "success",
- // duration: 0,
- // });
- console.log(lon, lat, "成功");
- outData([lon, lat]);
- };
- let error = function (error) {
- // console.log(error, "失败");
- outData(["失败", "失败"]);
- let msg = "none";
- switch (error.code) {
- case error.PERMISSION_DENIED:
- msg = "User denied the request for Geolocation.";
- break;
- case error.POSITION_UNAVAILABLE:
- msg = "Location information is unavailable.";
- break;
- case error.TIMEOUT:
- msg = "The request to get user location timed out.";
- break;
- case error.UNKNOWN_ERROR:
- msg = "An unknown error occurred.";
- break;
- }
- // Message({
- // showClose: true,
- // message:
- // "定位获取失败-msg:" +
- // msg +
- // "------" +
- // error.message +
- // "--反应时间:" +
- // times(startTime),
- // type: "error",
- // duration: 0,
- // });
- Message({
- showClose: true,
- message: "未开启位置权限",
- type: "error",
- duration: 2000,
- });
- };
- let options = {
- enableHighAccuracy: true,
- // timeout: 5000,
- timeout: Infinity,
- maximumAge: 0,
- };
+ // let success = function (position) {
+ // console.log(position);
+ // times(startTime);
+ // var lat = position.coords.latitude;
+ // var lon = position.coords.longitude;
+ // console.log("成功返回经纬度信息");
+ // // Message({
+ // // showClose: true,
+ // // message:
+ // // "成功返回经纬度信息(1)" +
+ // // lon +
+ // // "_" +
+ // // lat +
+ // // "--反应时间:" +
+ // // times(startTime),
+ // // type: "success",
+ // // duration: 0,
+ // // });
+ // console.log(lon, lat, "成功");
+ // outData([lon, lat]);
+ // };
+ // let error = function (error) {
+ // // console.log(error, "失败");
+ // outData(["失败", "失败"]);
+ // let msg = "none";
+ // switch (error.code) {
+ // case error.PERMISSION_DENIED:
+ // msg = "User denied the request for Geolocation.";
+ // break;
+ // case error.POSITION_UNAVAILABLE:
+ // msg = "Location information is unavailable.";
+ // break;
+ // case error.TIMEOUT:
+ // msg = "The request to get user location timed out.";
+ // break;
+ // case error.UNKNOWN_ERROR:
+ // msg = "An unknown error occurred.";
+ // break;
+ // }
+ // // Message({
+ // // showClose: true,
+ // // message:
+ // // "定位获取失败-msg:" +
+ // // msg +
+ // // "------" +
+ // // error.message +
+ // // "--反应时间:" +
+ // // times(startTime),
+ // // type: "error",
+ // // duration: 0,
+ // // });
+ // Message({
+ // showClose: true,
+ // message: "未开启位置权限",
+ // type: "error",
+ // duration: 2000,
+ // });
+ // };
+ // let options = {
+ // enableHighAccuracy: true,
+ // // timeout: 5000,
+ // timeout: Infinity,
+ // maximumAge: 0,
+ // };
// console.log(navigator);
// console.log(navigator.platform);
// Message({
@@ -117,30 +121,30 @@
// });
// console.log(CLLocationManager);
// return;
- if (navigator.platform === "iPhone") {
- //iphone请求权限
- // let remoGeo = new RemoGeoLocation();
- // navigator.geolocation.getCurrentPosition = function () {
- // return remoGeo.getCurrentPosition.apply(remoGeo, arguments);
- // };
- // navigator.geolocation.watchPosition = function () {
- // return remoGeo.watchPosition.apply(remoGeo, arguments);
- // };
- // Message({
- // showClose: true,
- // message: "ipone",
- // type: "error",
- // duration: 0,
- // });
- // console.log(CLLocationManager);
- // Message({
- // showClose: true,
- // message: CLLocationManager,
- // type: "error",
- // duration: 0,
- // });
- // return;
- }
+ // if (navigator.platform === "iPhone") {
+ // //iphone请求权限
+ // // let remoGeo = new RemoGeoLocation();
+ // // navigator.geolocation.getCurrentPosition = function () {
+ // // return remoGeo.getCurrentPosition.apply(remoGeo, arguments);
+ // // };
+ // // navigator.geolocation.watchPosition = function () {
+ // // return remoGeo.watchPosition.apply(remoGeo, arguments);
+ // // };
+ // // Message({
+ // // showClose: true,
+ // // message: "ipone",
+ // // type: "error",
+ // // duration: 0,
+ // // });
+ // // console.log(CLLocationManager);
+ // // Message({
+ // // showClose: true,
+ // // message: CLLocationManager,
+ // // type: "error",
+ // // duration: 0,
+ // // });
+ // // return;
+ // }
// return
// console.log(BMap);
//百度定位
@@ -184,13 +188,13 @@
// });
// return;
- //高德定位
+ // //高德定位
// AMap.plugin("AMap.Geolocation", function () {
// var geolocation = new AMap.Geolocation({
// // 是否使用高精度定位,默认:true
// enableHighAccuracy: true,
// // 设置定位超时时间,默认:无穷大
- // timeout: 10000,
+ // // timeout: 10000,
// // 定位按钮的停靠位置的偏移量,默认:Pixel(10, 20)
// // buttonOffset: new AMap.Pixel(10, 20),
// // 定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
@@ -210,8 +214,7 @@
// console.log("成功返回经纬度信息");
// Message({
// showClose: true,
- // message:
- // "成功返回经纬度信息" +
+ // message: "成功返回经纬度信息" +
// lon +
// "_" +
// lat +
@@ -229,8 +232,7 @@
// console.log(data);
// Message({
// showClose: true,
- // message:
- // "定位获取失败-msg:" +
+ // message: "定位获取失败-msg:" +
// data.message +
// "------" +
// "--反应时间:" +
@@ -240,8 +242,58 @@
// });
// }
// });
+ window.AMap.plugin('AMap.Geolocation', function () {
+ var geolocation = new AMap.Geolocation({
+ enableHighAccuracy: true, //是否使用高精度定位,默认:true
+ // timeout: 10000, //超过10秒后停止定位,默认:5s
+ // buttonPosition: 'RB', //定位按钮的停靠位置
+ // buttonOffset: new AMap.Pixel(10, 20), //定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
+ // zoomToAccuracy: true, //定位成功后是否自动调整地图视野到定位点
- // return;
+ });
+ // map.addControl(geolocation);
+ geolocation.getCurrentPosition(function (status, result) {
+ if (status == 'complete') {
+ onComplete(result)
+ } else {
+ onError(result)
+ }
+ });
+ });
+ //解析定位结果
+ function onComplete(data) {
+ // let lngLat = [data.position.lng, data.position.lat]
+ // console.log(position);
+ // times(startTime);
+ var lat = data.position.lat;
+ var lon = data.position.lng;
+ // console.log("成功返回经纬度信息");
+ // Message({
+ // showClose: true,
+ // message: "成功返回经纬度信息(1)" +
+ // lon +
+ // "_" +
+ // lat +
+ // "--反应时间:" +
+ // times(startTime),
+ // type: "success",
+ // duration: 2000,
+ // });
+ console.log(lon, lat, "成功");
+ outData([lon, lat]);
+ }
+ //解析定位错误信息
+ function onError(data) {
+ // console.log(data, "see")
+ Message({
+ showClose: true,
+ message: "未开启位置权限",
+ type: "error",
+ duration: 2000,
+ });
+ }
+
+ return;
state.getSPosition = navigator.geolocation.getCurrentPosition(
success,
error,
@@ -268,4 +320,4 @@
actions: {},
};
-export default mobilePosition;
+export default mobilePosition;
\ No newline at end of file
diff --git a/src/store/modules/mobiles/urlParameter.js b/src/store/modules/mobiles/urlParameter.js
new file mode 100644
index 0000000..7edd9dc
--- /dev/null
+++ b/src/store/modules/mobiles/urlParameter.js
@@ -0,0 +1,74 @@
+let urlParameter = {
+ state: {
+ urlParameterData: {},
+ urlParameterLayer: null, //自定义标签图层
+ },
+ actions: {
+ addurlParameterLayerIcon({
+ state,
+ commit,
+ dispatch
+ }, val) {
+ let list = val.list;
+ if (val.clear) {
+ // state.urlParameterLayer.remove();
+ state.urlParameterLayer.clear();
+ }
+ for (let i in list) {
+ // console.log(list[i], 112233)
+ const divIcon = new global.DC.DivIcon(
+ new global.DC.Position(
+ Number(list[i].jd),
+ Number(list[i].wd),
+ 0
+ ),
+ `
+ <div class="tag-entitys-box">
+ <div class="tag-content">
+ ${list[i].name}
+ </div>
+ <div class="tag-angle-content">
+ <img src="https://map.hit.edu.cn/images/tarrow_xq.png">
+ </div>
+ </div>
+ `
+ );
+ divIcon.on(global.DC.MouseEventType.CLICK, (e) => {
+ let lntLat = [+list[i].jd, +list[i].wd]
+ let d = {
+ position: {},
+ lntLat: lntLat,
+ query: {
+ introduce: '自定义标签',
+ address: '',
+ ...(list[i] || {}),
+ lntLat: lntLat,
+ },
+ useJWD: true, //仅使用经纬度
+ };
+ dispatch("setMobileWindows", d);
+ })
+ state.urlParameterLayer.addOverlay(divIcon);
+ }
+ },
+ },
+ mutations: {
+ initurlParameterLayer(state, val) {
+ if (!state.urlParameterLayer) {
+ state.urlParameterLayer = new global.DC.HtmlLayer("urlParameterLayer");
+ state.mviewer.addLayer(state.urlParameterLayer);
+ }
+ },
+ set_urlParameterData(state, val) {
+ state.urlParameterData = val;
+ },
+
+ clearurlParameterLayerIcon(state, val) {
+ if (state.urlParameterLayer) {
+ state.urlParameterLayer.clear();
+ }
+ },
+ }
+}
+
+export default urlParameter
\ No newline at end of file
diff --git a/src/store/modules/popupParams.js b/src/store/modules/popupParams.js
index 93ab92b..218580c 100644
--- a/src/store/modules/popupParams.js
+++ b/src/store/modules/popupParams.js
@@ -23,6 +23,11 @@
labelLayer: null, //自定义标签图层
addSignList: true,
+ myviewer: null,
+ nowlabelLayerData: {},
+ labelLayerDataShow: false,
+
+ closeMapClick: false, //关闭地图点击,防止新增标签误触
},
mutations: {
SET_POPUPBGURL(state, popupBgUrl) {
@@ -89,8 +94,138 @@
state.labelLayer = new global.DC.HtmlLayer("labelLayer");
val.addLayer(state.labelLayer);
}
+ state.myviewer = val;
},
- addLabelLayerIcon(state, val) {
+
+ clearLabelLayerIcon(state, val) {
+ if (state.labelLayer) {
+ state.labelLayer.clear();
+ }
+ },
+ openLabelLayer(state, val) {
+ // console.log(val, "see")
+ if (val.show) {
+ state.nowlabelLayerData = val.data;
+ state.labelLayerDataShow = true;
+ } else {
+ state.nowlabelLayerData = {};
+ state.labelLayerDataShow = false;
+ }
+ },
+ CLEAR_ALL(state, param) {
+ state.siteName = param
+ state.introduceText = param
+ state.telephone = param
+ state.panoramaUrl = param
+ state.monitorUrl = param
+ state.popupBgUrl = param
+ state.teachList = []
+ state.liveList = []
+ },
+ set_closeMapClick(state, val) {
+ state.closeMapClick = val;
+ }
+ },
+ actions: {
+ openPopups({
+ state,
+ commit,
+ dispatch
+ }, value) {
+ // //订阅事件
+ // divIcon.on(global.DC.MouseEventType.CLICK, (e) => {
+ // console.log(item);
+ // that.openPopups({
+ // lng: e.overlay.position.lng,
+ // lat: e.overlay.position.lat,
+ // item: item,
+ // });
+ // });
+ var popup = new global.DC.DivForms(state.viewer, {
+ domId: "divFormsDomBox",
+ position: [
+ global.DC.Transform.transformWGS84ToCartesian(
+ new global.DC.Position(
+ Number(value.lng),
+ Number(value.lat),
+ Number(value.alt || 0)
+ )
+ ),
+ ],
+ });
+ dispatch("setOurDataInPoput", value);
+ dispatch("pcFlyView", {
+ jd: value.lng,
+ wd: value.lat,
+ viewer: this.viewer,
+ });
+ },
+ setOurDataInPoput({
+ state,
+ commit,
+ dispatch
+ }, value) {
+ //弹窗使用方法
+
+ commit("CLEAR_ALL", null);
+
+
+ commit("SET_STATENAME", value.item.mechanismname);
+ commit("SET_PANORAMAURL", value.item.panoramaurl);
+ commit("SET_INTRODUCETEXT", value.item.introduce);
+ var imgArr = value.item.tpurl.split(",");
+ commit("SET_POPUPBGURL", imgArr[0]);
+ commit("SET_POPUPQRURL", value.item.codeurl);
+ commit("SET_POINTPOSITION", [
+ Number(value.lng),
+ Number(value.lat),
+ Number(0),
+ Number(0),
+ Number(-90),
+ Number(0),
+ ]);
+ commit('SET_POPUPIMGATLAS', imgArr)
+ commit("SET_DETAILSPOPUP", true);
+ },
+ pcMoveView({
+ state,
+ commit,
+ dispatch
+ }, val) {
+ console.log(val, "see1")
+ val.viewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+ +val.jd,
+ +val.wd,
+ 400.0
+ ),
+ orientation: {
+ // 指向
+ heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+ },
+ pcFlyView({
+ state,
+ commit,
+ dispatch
+ }, val) {
+ val.viewer.flyToPosition(
+ new global.DC.Position(Number(val.jd), Number(val.wd), Number(300), Number(0), Number(-90), Number(0)),
+ function () {},
+ 2
+ )
+ },
+ addLabelLayerIcon({
+ state,
+ commit,
+ dispatch
+ }, val) {
let list = val.list;
if (val.clear) {
// state.labelLayer.remove();
@@ -98,9 +233,9 @@
}
if (val.add) { //刷新列表
state.addSignList = !state.addSignList;
+ return;
}
for (let i in list) {
- console.log(list[i], 112233)
const divIcon = new global.DC.DivIcon(
new global.DC.Position(
Number(list[i].jd),
@@ -118,28 +253,50 @@
</div>
`
);
+ //订阅事件
+ divIcon.on(global.DC.MouseEventType.CLICK, (e) => {
+ // console.log(e);
+ // return;
+ // 定制化窗体
+ let position = e.position,
+ lntLat = [e.overlay._position._lng, e.overlay._position._lat];
+ // console.log(position, lntLat, list[i], state.myviewer, "see")
+ new global.DC.DivForms(state.myviewer, {
+ domId: "labelLayerid",
+ position: [
+ global.DC.Transform.transformWGS84ToCartesian(
+ new global.DC.Position(
+ Number(lntLat[0]),
+ Number(lntLat[1]),
+ Number(0)
+ )
+ ),
+ ],
+ });
+ state.myviewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+ lntLat[0],
+ lntLat[1],
+ 400.0
+ ),
+ orientation: {
+ // 指向
+ heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // 视角
+ pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
+ roll: 0.0,
+ },
+ });
+ commit("openLabelLayer", {
+ show: true,
+ data: list[i]
+ })
+ });
state.labelLayer.addOverlay(divIcon);
}
},
- clearLabelLayerIcon(state, val) {
- if (state.labelLayer) {
- state.labelLayer.clear();
- }
- },
-
- CLEAR_ALL(state, param) {
- state.siteName = param
- state.introduceText = param
- state.telephone = param
- state.panoramaUrl = param
- state.monitorUrl = param
- state.popupBgUrl = param
- state.teachList = []
- state.liveList = []
- }
- },
- actions: {
-
}
}
diff --git a/src/styles/pcpage/campus-nav.scss b/src/styles/pcpage/campus-nav.scss
index 00dcab1..79979d6 100644
--- a/src/styles/pcpage/campus-nav.scss
+++ b/src/styles/pcpage/campus-nav.scss
@@ -117,19 +117,19 @@
align-items: center;
height: calc(100% - 44px);
- &>div:nth-child(1) {
+ & > div:nth-child(1) {
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
- &>div {
+ & > div {
flex: 1;
line-height: 53px;
}
}
- &>div:nth-child(2) {
+ & > div:nth-child(2) {
width: 100px;
text-align: center;
}
@@ -168,4 +168,12 @@
}
}
}
-}
\ No newline at end of file
+}
+.el-input-group__prepend {
+ cursor: pointer;
+ &:hover {
+ .mydingwei.el-icon-location {
+ font-size: 25px;
+ }
+ }
+}
--
Gitblit v1.9.3