diff --git a/.env.development b/.env.development index 5b77e18..c75fca4 100644 --- a/.env.development +++ b/.env.development @@ -4,4 +4,4 @@ NODE_ENV=development VUE_APP_MAP_URL='/json' VUE_APP_PLAYER_URL='/js/h5player/' # 锦水印象宣传视频地址 -VUE_APP_VIDEO_URL='/video/jinshui.mp4' \ No newline at end of file +VUE_APP_VIDEO_URL='/video/' \ No newline at end of file diff --git a/.env.production b/.env.production index 360dfe0..10b879e 100644 --- a/.env.production +++ b/.env.production @@ -2,4 +2,4 @@ NODE_ENV=production VUE_APP_MAP_URL='/jinshui-screen/json' VUE_APP_PLAYER_URL='/jinshui-screen/js/h5player/' -VUE_APP_VIDEO_URL='/jinshui-screen/video/jinshui.mp4' \ No newline at end of file +VUE_APP_VIDEO_URL='/jinshui-screen/video/' \ No newline at end of file diff --git a/public/video/1.mp4 b/public/video/1.mp4 new file mode 100644 index 0000000..bdbfecf Binary files /dev/null and b/public/video/1.mp4 differ diff --git a/src/main.js b/src/main.js index 343a70d..beff54a 100644 --- a/src/main.js +++ b/src/main.js @@ -14,7 +14,7 @@ import scroll from 'vue-seamless-scroll'; //滚动 Moment.locale("zh-cn"); Vue.prototype.$moment = Moment; Vue.prototype.$echarts = echarts - +Vue.prototype.$EventBus = new Vue() // if (process.env.NODE_ENV === 'development') { // (() => import('element-ui/lib/theme-chalk/index.css'))() // } @@ -24,11 +24,7 @@ Vue.use(scroll) Vue.config.productionTip = false -// 高德地图安全密钥配置 -window._AMapSecurityConfig = { - // securityJsCode: '0294e9342fd4b5158458cbda2fa8892f' - securityJsCode: 'cecf7b19cf98f1e41a6c739be89146fc' -} + new Vue({ router, store, diff --git a/src/store/modules/map.js b/src/store/modules/map.js index 999e0d0..7b7d0c1 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -17,7 +17,6 @@ export default { state.communityId = communityId }, set_nav (state, navId){ - console.log(navId); state.navId = navId } }, diff --git a/src/style/transition.scss b/src/style/transition.scss index 2eeeaab..2d5fe2d 100644 --- a/src/style/transition.scss +++ b/src/style/transition.scss @@ -32,4 +32,17 @@ .fade-transform-leave-to { opacity: 0; transform: translateX(30px); +} + +.slide-transform-leave-active, +.slide-transform-enter-active { + transition: all .5s; +} + +.slide-transform-enter { + transform: translateX(460px); +} + +.slide-transform-leave-to { + transform: translateX(-460px); } \ No newline at end of file diff --git a/src/views/next/layout/screen-bottom.vue b/src/views/next/layout/screen-bottom.vue index 1e37599..2794ac3 100644 --- a/src/views/next/layout/screen-bottom.vue +++ b/src/views/next/layout/screen-bottom.vue @@ -18,7 +18,7 @@ import { mapActions } from 'vuex' export default { data() { return { - active: 'zdyf', + active: 'sy', navList: [ { imgSrc: require('@/assets/images/home/hsyf.png'), diff --git a/src/views/next/screen-content-left/home-left/index.vue b/src/views/next/screen-content-left/home-left/index.vue index 7196c71..d6e0066 100644 --- a/src/views/next/screen-content-left/home-left/index.vue +++ b/src/views/next/screen-content-left/home-left/index.vue @@ -1,20 +1,160 @@ diff --git a/src/views/next/screen-content-left/index.vue b/src/views/next/screen-content-left/index.vue index 1c3841d..05d7686 100644 --- a/src/views/next/screen-content-left/index.vue +++ b/src/views/next/screen-content-left/index.vue @@ -1,13 +1,9 @@ @@ -59,12 +55,5 @@ export default { z-index: 20; box-sizing: border-box; padding: 40px 0px 20px; - .rest-content { - width: 100%; - height: calc(100% - 30px - 30px); - border-radius:10px; - padding: 10px; - box-sizing: border-box; - } } diff --git a/src/views/next/screen-content-left/zdyf-left/index.vue b/src/views/next/screen-content-left/zdyf-left/index.vue index 4cecb45..5a0e37f 100644 --- a/src/views/next/screen-content-left/zdyf-left/index.vue +++ b/src/views/next/screen-content-left/zdyf-left/index.vue @@ -56,13 +56,19 @@
省级农业产业强镇
-
省级乡村振兴集中推进区
-
省级现代农业产业园
-
省级农业产业强镇
-
省数字乡村试点乡镇
+ style="color: #7AFAFF; top: 10px; left: 15%">省级农业产业强镇
+
省级乡村振兴集中推进区
+
省级现代农业产业园
+
省级农业产业强镇
+
省数字乡村试点乡镇
中国淘宝小镇 + style="color: #FF8F4C; top: 130px; left: 64%;">中国淘宝小镇 +
+
年产蔬菜约60万吨、占全区总量的40% +
+
年产粮食10万吨、占全区总量的25%
@@ -181,7 +187,9 @@ export default { &-3, &-4, &-5, - &-6 { + &-6, + &-7, + &-8{ position: absolute; background: url('~@/assets/images/index/yfcjkuang.png') no-repeat 50% 50%; background-size: 100% 100%; @@ -196,6 +204,15 @@ export default { font-size: 63px; } } + &-8{ + width: 140px; + text-indent: 2; + } + &-7{ + width: 150px; + text-indent: 2; + } + } } diff --git a/src/views/next/screen-content-map/cpt/zdyf-map.vue b/src/views/next/screen-content-map/cpt/zdyf-map.vue index d523e3b..f016c22 100644 --- a/src/views/next/screen-content-map/cpt/zdyf-map.vue +++ b/src/views/next/screen-content-map/cpt/zdyf-map.vue @@ -24,7 +24,6 @@ import { Scene, PolygonLayer, LineLayer, ImageLayer } from "@antv/l7"; import { GaodeMap } from "@antv/l7-maps"; import yifengJson from './yifeng.json'; import chinaMap from "./chinaMap.vue" - let myMap; let scene; let circleLayerSmall; @@ -91,21 +90,38 @@ export default { mapType: '' }; }, - created() { }, + created() { + }, mounted() { window._AMapSecurityConfig = { securityJsCode: "92ea2c965c6cf1ba7ee3a8fe01449ef2", }; - + let that = this + this.$nextTick(() => { + this.$EventBus.$on("switcMapType", (data) => { + that.switcMapType(data) + }); + }) }, methods: { - toProvince({ fileName: name }) { + switcMapType(type) { + let that = this + if (type === 'polygon') { + this.mapFlag = 'Amap' + if (!myMap) { + that.init(type) + } else { + this.initPolygonLayer() + } + } + }, + toProvince() { this.mapFlag = 'Amap' setTimeout(() => { this.init() }, 1000) }, - init() { + init(type) { if (!yifengJson) return false; myMap = new GaodeMap({ pitch: 40.24716321414439, @@ -130,12 +146,16 @@ export default { map: myMap, }); scene.on("loaded", () => { - this.initCircle() + if (!type) { + this.initCircle() + } else { + this.initPolygonLayer() + } // this.initText() }); scene.on("click", (feature) => { - console.log(feature); + // console.log(feature); }); }, initCircle() { @@ -192,6 +212,9 @@ export default { if (roadLayer) { scene.removeLayer(roadLayer); } + if (circleLayerSmall) { + scene.removeLayer(circleLayerSmall); + } this.mapType = 'polygon' const { darkStyle } = this; let styleConfig = darkStyle; @@ -279,15 +302,17 @@ export default { height: 58px; z-index: 10; } -.map-legeng{ + +.map-legeng { position: absolute; top: 686px; left: 554px; transform: translate(-50%); width: 140px; height: 220px; - z-index: 10; + z-index: 10; } + .bg_img { background: url('~@/assets/images/map/echartsBg.png'); background-size: 100% 100%; @@ -337,14 +362,19 @@ export default { } &::after { - content: ""; + content: "黄金育种带"; display: block; width: 550px; - height: 2px; + font-size: 22px; + padding-bottom: 12px; + height: 24px; + color: rgb(254, 221, 0); + text-align: center; + line-height: 24px; border-bottom: 2px rgb(254, 221, 0) dashed; position: absolute; right: 83px; - top: 69px; + top: 34px; } } diff --git a/src/views/next/screen-content-map/index.vue b/src/views/next/screen-content-map/index.vue index c3c6744..0bb8086 100644 --- a/src/views/next/screen-content-map/index.vue +++ b/src/views/next/screen-content-map/index.vue @@ -1,23 +1,16 @@