update
This commit is contained in:
+3
-13
@@ -1,18 +1,8 @@
|
|||||||
|
|
||||||
#后台地址
|
#后台地址
|
||||||
#VITE_GLOB_API_URL=https://api.cqygjk.com
|
VITE_GLOB_API_URL=https://api.cqygjk.com
|
||||||
#应急求助-websocket
|
#应急求助-websocket
|
||||||
#VITE_GLOB_API_YIN_JI=wss://api.cqygjk.com/health-watch/websocket/watchMonitor
|
VITE_GLOB_API_YIN_JI=wss://api.cqygjk.com/health-watch/websocket/watchMonitor
|
||||||
#健康监测工具报警-websocket
|
#健康监测工具报警-websocket
|
||||||
#VITE_GLOB_API_JIAN_CE=wss://api.cqygjk.com/health-emergency/websocket/emergency
|
VITE_GLOB_API_JIAN_CE=wss://api.cqygjk.com/health-emergency/websocket/emergency
|
||||||
|
|
||||||
|
|
||||||
# 王昊地址
|
|
||||||
#VITE_GLOB_API_URL=http://192.168.1.3
|
|
||||||
#开发环境
|
|
||||||
VITE_GLOB_API_URL=http://cqyt.dev.yg.dt.io
|
|
||||||
|
|
||||||
#应急求助-websocket
|
|
||||||
VITE_GLOB_API_YIN_JI=ws://cqyt.dev.yg.dt.io/health-watch/websocket/watchMonitor
|
|
||||||
#健康监测工具报警-websocket
|
|
||||||
VITE_GLOB_API_JIAN_CE=ws://cqyt.dev.yg.dt.io/health-emergency/websocket/emergency
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
</script>
|
</script>
|
||||||
<!-- <script type="text/javascript"-->
|
<!-- <script type="text/javascript"-->
|
||||||
<!-- src="https://webapi.amap.com/maps?v=2.0&key=4bbcb216b889f2d612cbed05ae6979c8&plugin=AMap.Driving,AMap.ToolBar,AMap.Driving,AMap.GeoJSON,AMap.MarkerCluster"></script>-->
|
<!-- src="https://webapi.amap.com/maps?v=2.0&key=4bbcb216b889f2d612cbed05ae6979c8&plugin=AMap.Driving,AMap.ToolBar,AMap.Driving,AMap.GeoJSON,AMap.MarkerCluster"></script>-->
|
||||||
<script type="module" src="./public/amap.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<style>
|
<style>
|
||||||
html, body, #app {
|
html, body, #app {
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
"less": "^4.2.0",
|
"less": "^4.2.0",
|
||||||
"typescript": "^5.0.2",
|
"typescript": "^5.0.2",
|
||||||
"vite": "^4.4.5",
|
"vite": "^4.4.5",
|
||||||
|
"vite-plugin-resolve-externals": "^0.2.2",
|
||||||
"vue-tsc": "^1.8.5"
|
"vue-tsc": "^1.8.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-12
@@ -1,3 +1,4 @@
|
|||||||
|
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||||
import china from '/@/assets/lngLat/china.ts';
|
import china from '/@/assets/lngLat/china.ts';
|
||||||
import chinaInner from '/@/assets/lngLat/chinaInner.ts';
|
import chinaInner from '/@/assets/lngLat/chinaInner.ts';
|
||||||
import { createCircle, createIcon, typeToIcon } from '/@/assets/mapUtils/commonFun.ts';
|
import { createCircle, createIcon, typeToIcon } from '/@/assets/mapUtils/commonFun.ts';
|
||||||
@@ -11,6 +12,7 @@ export const defaultOption = {
|
|||||||
mapStyle: 'darkblue', //地图样式
|
mapStyle: 'darkblue', //地图样式
|
||||||
};
|
};
|
||||||
export const mapPlugin = ['AMap.ToolBar', 'AMap.Driving', 'AMap.GeoJSON', 'AMap.MarkerCluster', 'AMap.PlaceSearch'];
|
export const mapPlugin = ['AMap.ToolBar', 'AMap.Driving', 'AMap.GeoJSON', 'AMap.MarkerCluster', 'AMap.PlaceSearch'];
|
||||||
|
let AMap = null;
|
||||||
export const Map = {
|
export const Map = {
|
||||||
map: null,
|
map: null,
|
||||||
overlayGroup: null, // 地图中marker
|
overlayGroup: null, // 地图中marker
|
||||||
@@ -25,18 +27,27 @@ export const Map = {
|
|||||||
* @param option 地图配置
|
* @param option 地图配置
|
||||||
*/
|
*/
|
||||||
initMap({ el, option }: InitMap) {
|
initMap({ el, option }: InitMap) {
|
||||||
const { zoom, center, mapStyle } = { ...defaultOption, ...option };
|
AMapLoader.load({
|
||||||
//基本地图加载
|
key: '4bbcb216b889f2d612cbed05ae6979c8', // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||||
this.map = new AMap.Map(el, {
|
// version: '1.4.15', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
||||||
resizeEnable: true,
|
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
||||||
center: center,
|
plugins: mapPlugin, // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
||||||
zoom: zoom,
|
}).then((res) => {
|
||||||
mapStyle: 'amap://styles/' + mapStyle,
|
AMap = res;
|
||||||
});
|
const { zoom, center, mapStyle } = { ...defaultOption, ...option };
|
||||||
// 异步同时加载多个插件
|
//基本地图加载
|
||||||
new AMap.plugin(mapPlugin, () => {
|
this.map = new AMap.Map(el, {
|
||||||
this.drawInnerLine();
|
resizeEnable: true,
|
||||||
this.drawOutLine();
|
center: center,
|
||||||
|
zoom: zoom,
|
||||||
|
mapStyle: 'amap://styles/darkblue',
|
||||||
|
version: '2.0',
|
||||||
|
});
|
||||||
|
// 异步同时加载多个插件
|
||||||
|
new AMap.plugin(mapPlugin, () => {
|
||||||
|
this.drawInnerLine();
|
||||||
|
this.drawOutLine();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
} /**
|
} /**
|
||||||
* @desc 中国外层边界线
|
* @desc 中国外层边界线
|
||||||
|
|||||||
@@ -61,7 +61,6 @@
|
|||||||
const watchDialogRef = ref();
|
const watchDialogRef = ref();
|
||||||
|
|
||||||
function openWatchList(item) {
|
function openWatchList(item) {
|
||||||
console.log('item', item);
|
|
||||||
if (item.key == 'allotDeviceNum') {
|
if (item.key == 'allotDeviceNum') {
|
||||||
watchDialogRef.value.openModal(item.extData?.deptId);
|
watchDialogRef.value.openModal(item.extData?.deptId);
|
||||||
}
|
}
|
||||||
@@ -110,13 +109,13 @@
|
|||||||
|
|
||||||
const { detailLeft, detailRight, setDetail } = useAlarmDetail();
|
const { detailLeft, detailRight, setDetail } = useAlarmDetail();
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init();
|
// init();
|
||||||
//点击预警定位
|
// //点击预警定位
|
||||||
$bus.on(earlyWarning, (params) => {
|
// $bus.on(earlyWarning, (params) => {
|
||||||
setDetail(params);
|
// setDetail(params);
|
||||||
drawMarker(params);
|
// drawMarker(params);
|
||||||
setIsShowAlarm(true);
|
// setIsShowAlarm(true);
|
||||||
});
|
// });
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-3
@@ -1,4 +1,4 @@
|
|||||||
import {createApp} from 'vue';
|
import { createApp } from 'vue';
|
||||||
import App from './App.vue';
|
import App from './App.vue';
|
||||||
import './assets/less/index.less';
|
import './assets/less/index.less';
|
||||||
import router from './router';
|
import router from './router';
|
||||||
@@ -6,8 +6,7 @@ import router from './router';
|
|||||||
import('ant-design-vue/dist/antd.less');
|
import('ant-design-vue/dist/antd.less');
|
||||||
import registerGlobComp from './assets/ts/antd.ts';
|
import registerGlobComp from './assets/ts/antd.ts';
|
||||||
import directiveMethods from './assets/ts/directive';
|
import directiveMethods from './assets/ts/directive';
|
||||||
import {setupStore} from './store/index.ts';
|
import { setupStore } from './store/index.ts';
|
||||||
|
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
// 注册自定义事件
|
// 注册自定义事件
|
||||||
|
|||||||
@@ -8,6 +8,9 @@
|
|||||||
"DOM",
|
"DOM",
|
||||||
"DOM.Iterable"
|
"DOM.Iterable"
|
||||||
],
|
],
|
||||||
|
"types": [
|
||||||
|
"vite/client"
|
||||||
|
],
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
/* 配置文件路径识别 */
|
/* 配置文件路径识别 */
|
||||||
|
|||||||
Vendored
+4
@@ -0,0 +1,4 @@
|
|||||||
|
declare interface Window {
|
||||||
|
AMap: any;
|
||||||
|
initAMap: any;
|
||||||
|
}
|
||||||
+7
-2
@@ -1,6 +1,8 @@
|
|||||||
import {defineConfig} from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import vue from '@vitejs/plugin-vue';
|
import vue from '@vitejs/plugin-vue';
|
||||||
import {resolve} from 'path';
|
import { resolve } from 'path';
|
||||||
|
|
||||||
|
import resolveExternalsPlugin from 'vite-plugin-resolve-externals';
|
||||||
|
|
||||||
function pathResolve(dir: string) {
|
function pathResolve(dir: string) {
|
||||||
return resolve(process.cwd(), '.', dir);
|
return resolve(process.cwd(), '.', dir);
|
||||||
@@ -10,6 +12,9 @@ function pathResolve(dir: string) {
|
|||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
|
resolveExternalsPlugin({
|
||||||
|
AMap: 'AMap',
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
css: {
|
css: {
|
||||||
preprocessorOptions: {
|
preprocessorOptions: {
|
||||||
|
|||||||
Reference in New Issue
Block a user