DESKTOP-GBVU60Q\dell 2 anos atrás
pai
commit
82b707dae7

+ 1 - 2
src/components/jt-echarts/jt-echarts.vue

@@ -3,7 +3,6 @@
 </template>
 
 <script>
-import * as echarts from "echarts";
 import 'echarts-liquidfill';
 export default {
 	props: {
@@ -74,7 +73,7 @@ export default {
 			if (this.echart) {
 				this.echart.setOption(this.options);
 			} else {
-				this.echart = echarts.init(this.$refs.echarts);
+				this.echart = this.$echarts.init(this.$refs.echarts);
 				this.echart.setOption(this.options);
 			}
 		},

+ 3 - 1
src/main.js

@@ -23,6 +23,7 @@ import * as ElementPlusIconsVue from '@element-plus/icons-vue'
 
 import md5 from "js-md5"
 import {createPinia} from 'pinia'
+import * as echarts from "echarts";
 
 //全局弹出框组件
 import jtpopup from './components/jt-popup/jt-popup.vue'
@@ -58,7 +59,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
 app.config.globalProperties.$http = http
 app.config.globalProperties.$md5 = md5
 app.config.globalProperties.jt3dSDK = jt3dSDK
-
+app.config.globalProperties.$echarts = echarts
 
 app.directive('drag', drag)
 app.component("jt-popup",jtpopup)
@@ -74,4 +75,5 @@ app.use(router);
 app.use(ElementPlus);
 app.use(Print);
 
+
 app.mount('#app');

+ 8 - 0
src/views/test/components/WeatherWatch.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/views/test/components/disaster.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 3 - 3
src/views/test/test.vue

@@ -2,8 +2,8 @@
 </script>
 
 <template>
-	<jt-popup2 title="" >
-		
+	<jt-popup2 title="灾情预警" >
+		<disaster></disaster>
 	</jt-popup2>
 	
 	<jt-popup2 title="" top="calc(calc(100% - 115rem) / 3 + 90rem)" >
@@ -15,7 +15,7 @@
 	</jt-popup2>
 	
 	<jt-popup3  title="气象监测">
-		
+		<weatherwatch></weatherwatch>
 	</jt-popup3>
 	
 	<jt-popup3  title="" top="calc(calc(100% - 115rem) / 3 + 90rem)">