2024-07-11 18:02:47 +08:00
|
|
|
import Vue from 'vue'
|
|
|
|
|
import App from './App.vue'
|
|
|
|
|
import ElementUI from 'element-ui'
|
|
|
|
|
import echarts from 'echarts'
|
|
|
|
|
// import 'element-ui/lib/theme-chalk/index.css'
|
|
|
|
|
import '../static/css/index.css'
|
|
|
|
|
import '../static/css/fonts.css'
|
|
|
|
|
import Enlocale from '../node_modules/element-ui/lib/locale/lang/en'
|
|
|
|
|
import Zhlocale from '../node_modules/element-ui/lib/locale/lang/zh-CN'
|
|
|
|
|
import router from './router/index.js'
|
2025-11-18 15:33:41 +08:00
|
|
|
|
2024-07-11 18:02:47 +08:00
|
|
|
import 'echarts-gl'
|
2025-11-18 15:33:41 +08:00
|
|
|
|
2024-07-11 18:02:47 +08:00
|
|
|
import axios from 'axios'
|
|
|
|
|
import qs from 'qs'
|
|
|
|
|
|
|
|
|
|
import store from './store/index'
|
2025-12-25 16:45:28 +08:00
|
|
|
import { extractWMTSBoundsInfo } from '@/utils/mapbox-utils'
|
2024-07-11 18:02:47 +08:00
|
|
|
|
|
|
|
|
window.sessionStorage.setItem('webInfo', 'ASOS')
|
|
|
|
|
Vue.use(ElementUI, { locale: Zhlocale })
|
2025-11-18 15:33:41 +08:00
|
|
|
|
2024-07-11 18:02:47 +08:00
|
|
|
Vue.prototype.$axios = axios
|
|
|
|
|
Vue.prototype.$qs = qs
|
|
|
|
|
Vue.prototype.$echarts = echarts
|
|
|
|
|
Vue.config.productionTip = false
|
|
|
|
|
|
|
|
|
|
new Vue({
|
|
|
|
|
el: '#app',
|
|
|
|
|
router,
|
|
|
|
|
store,
|
|
|
|
|
components: { App },
|
|
|
|
|
template: '<App/>'
|
|
|
|
|
})
|
2025-11-21 23:00:53 +08:00
|
|
|
|
|
|
|
|
// 定义部分全局变量
|
|
|
|
|
Vue.config.maps = {};
|
2025-12-25 16:45:28 +08:00
|
|
|
Vue.config.firstRender = true;
|
|
|
|
|
Vue.config.boundsInfoList = [];
|
2025-11-21 23:00:53 +08:00
|
|
|
Vue.config.baseUrl = process.env.NODE_ENV === 'development' ? 'http://124.222.8.13:9801' : `${window.location.protocol}//${window.location.hostname}:${window.location.port}`
|
|
|
|
|
Vue.config.wwwrootBaseUrl = "_content/IDSSE.OceanExplorer.Shared";
|
2025-12-25 16:45:28 +08:00
|
|
|
Vue.config.sprites = ["go.png", "ship.png", "ship1.png", "ship2.png", "ship3.png", "fdz.png", "shys.png", "auv.png", "aircraft.png", "aircraft-r.png", "arrow.png", "dot.png", "dot_red.png", "default.png", "info-dark.png", "warning-dark.png", "warning-red.png", "slow_sog.png", "stop_sog.png", "海底主基站.png", "石油平台.png", "岸基站.png", "circle-red.png", "circle-green.png", "circle-blue.png", "circle-yellow.png", "circle-purple.png", "circle-black.png", "circle-white.png"];
|
|
|
|
|
|
|
|
|
|
if (Vue.config.firstRender) {
|
|
|
|
|
Vue.config.firstRender = !Vue.config.firstRender;
|
|
|
|
|
fetch(`${Vue.config.baseUrl}/geoserver/gwc/service/wmts?service=WMTS&acceptVersions=1.0.0&request=GetCapabilities`)
|
|
|
|
|
.then(response => response.text())
|
|
|
|
|
.then(async (xmlContent) => {
|
|
|
|
|
Vue.config.boundsInfoList = await extractWMTSBoundsInfo(xmlContent);
|
|
|
|
|
});
|
2026-04-01 20:48:30 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-02 14:26:09 +08:00
|
|
|
window.mapboxgl.accessToken = 'pk.eyJ1IjoicWRod2kiLCJhIjoiY2xiaXppcjEyMGNhMjNwbzVrcHl4d20zOSJ9.0ETMJM3-zllFh2GRrRVUZg'
|
|
|
|
|
|
|
|
|
|
Vue.config.tiles = {
|
|
|
|
|
"world_horizon_1": `${Vue.config.baseUrl}/geoserver/gwc/service/wmts/rest/ougp:world_horizon_1/EPSG:900913/EPSG:900913:{z}/{y}/{x}?format=image/jpeg`,
|
|
|
|
|
"GEBCO_basemap_NCEI": "https://tiles.arcgis.com/tiles/C8EMgrsFcRFL6LrL/arcgis/rest/services/GEBCO_basemap_NCEI/MapServer/tile/{z}/{y}/{x}",
|
|
|
|
|
"gaode":"https://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&scl=2&style=8&x={x}&y={y}&z={z}"
|
|
|
|
|
};
|