Browse Source

科研力量修改地图进入,领导关怀更换图片,地图逻辑修改

master
mk 2 years ago
parent
commit
ee596ed2a5
  1. BIN
      public/images/map/mapImg.zip
  2. BIN
      src/assets/images/index/ldgh.png
  3. BIN
      src/assets/images/material/daguhe.jpg
  4. BIN
      src/assets/images/resource/kyll/delong.png
  5. BIN
      src/assets/images/resource/kyll/jmy.png
  6. 4
      src/views/next/dialog-module/zdyf-right/kyll/talents.vue
  7. 1
      src/views/next/layout/screen-header.vue
  8. 32
      src/views/next/screen-content-left/zdyf-left/index.vue
  9. 47
      src/views/next/screen-content-map/cpt/point.json
  10. 21
      src/views/next/screen-content-map/cpt/szyf-img.vue
  11. 91
      src/views/next/screen-content-map/cpt/zdyf-map.vue
  12. 3
      src/views/next/screen-content-map/index.vue
  13. 78
      src/views/next/screen-content-right/zdyf-right/index.vue

BIN
public/images/map/mapImg.zip

Binary file not shown.

BIN
src/assets/images/index/ldgh.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 KiB

After

Width:  |  Height:  |  Size: 472 KiB

BIN
src/assets/images/material/daguhe.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

BIN
src/assets/images/resource/kyll/delong.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 KiB

BIN
src/assets/images/resource/kyll/jmy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

4
src/views/next/dialog-module/zdyf-right/kyll/talents.vue

@ -65,7 +65,7 @@ export default {
name: '印象初', name: '印象初',
imgSrc: require('@/assets/images/resource/kyll/1.jpg'), imgSrc: require('@/assets/images/resource/kyll/1.jpg'),
unit: '中国科学院院士', unit: '中国科学院院士',
content: '1995年6月被联合国教科文组织和中国科学院挑选为中国当代科技精英之一。1995年10月当选为中国科学院院士。1996年被河北大学聘为终身教授,2001年被山东农业大学聘为特聘教授。印象初院士长期从事蝗虫分类工作。' content: '1995年6月被联合国教科文组织和中国科学院挑选为中国当代科技精英之一。1995年10月当选为中国科学院院士。印象初院士长期从事蝗虫分类工作。'
}, },
{ {
name: '李天来', name: '李天来',
@ -77,7 +77,7 @@ export default {
name: '孙忠奎', name: '孙忠奎',
imgSrc: require('@/assets/images/resource/kyll/3.jpg'), imgSrc: require('@/assets/images/resource/kyll/3.jpg'),
unit: '瑞克斯旺(中国)农业科技有限公司总经理', unit: '瑞克斯旺(中国)农业科技有限公司总经理',
content: '怀着报效祖国的信念,经过近10年国外深造的孙忠魁,在荷兰取得博士学位后,毅然选择了回国,积极投入到农业生产科研一线中,着力开展科研创新。瑞克斯旺作为种子提供方,是这条产业链的上方,只有打好这个开头,才能为客户生产好的蔬菜奠定基础,保证提供给消费者安全的蔬菜,瑞克斯旺公司用品质和信誉赢得客户和经销商十年如一日的支持。他负责的瑞克斯旺蔬菜研究开发中心项目坐落于移风店镇,位于国际种都核心区,随着项目的日益发展,可直接带动农户300万人,增加农民纯收入100亿。' content: '瑞克斯旺作为种子提供方,是这条产业链的上方,只有打好这个开头,才能为客户生产好的蔬菜奠定基础,保证提供给消费者安全的蔬菜,瑞克斯旺公司用品质和信誉赢得客户和经销商十年如一日的支持。'
}, },
{ {
name: '曹修竹', name: '曹修竹',

1
src/views/next/layout/screen-header.vue

@ -59,7 +59,6 @@ export default {
this.set_nav('sy') this.set_nav('sy')
} else { } else {
this.$EventBus.$emit('switcMapType', 'Emap') this.$EventBus.$emit('switcMapType', 'Emap')
} }
}, },
} }

32
src/views/next/screen-content-left/zdyf-left/index.vue

@ -6,13 +6,14 @@
<div slot="right" class="screen-title-right" @click="set_ldhg(true)"><span>更多</span></div> <div slot="right" class="screen-title-right" @click="set_ldhg(true)"><span>更多</span></div>
</screen-title> </screen-title>
<div class="card-item-ldgh"> <div class="card-item-ldgh">
<div class="title">用中国种子保障中国粮食安全</div>
<img src="@/assets/images/index/banner.png" alt=""> <img src="@/assets/images/index/banner.png" alt="">
<span>2022年4月10日习近平总书记在海南省三亚市崖州湾种子实验室考察调研时强调种子是我国粮食安全的关键只有用自己的手攥紧中国种子才能端稳中国饭碗才能实现粮食安全种源要做到自主可控种业科技要自立自强</span> <span>2022年4月10日习近平总书记在海南省三亚市崖州湾种子实验室考察调研时强调种子是我国粮食安全的关键只有用自己的手攥紧中国种子才能端稳中国饭碗才能实现粮食安全种源要做到自主可控种业科技要自立自强</span>
</div> </div>
</div> </div>
<div class='card h292' style="margin-top: 8px;"> <div class='card h292' style="margin-top: 8px;">
<screen-title> <screen-title>
<div slot="left" class="screen-title-left">移风优势</div> <div slot="left" class="screen-title-left" @click="handelClickEmap" style="cursor: pointer;">移风优势</div>
</screen-title> </screen-title>
<div class="card-item-yfys"> <div class="card-item-yfys">
<div class="item"> <div class="item">
@ -86,8 +87,9 @@ export default {
set_yfcj: 'SET_YFCJ', set_yfcj: 'SET_YFCJ',
set_ldhg: 'SET_LDGH' set_ldhg: 'SET_LDGH'
}), }),
handelClickEmap(){
this.$EventBus.$emit('switcMapType', 'Emap')
}
}, },
components: {}, components: {},
computed: {}, computed: {},
@ -107,7 +109,15 @@ export default {
box-sizing: border-box; box-sizing: border-box;
@include flex(column); @include flex(column);
justify-content: space-around; justify-content: space-around;
position: relative;
.title{
position: absolute;
top: 54px;
font-family: FZZhengHeiS-B-GB;
left: 113px;
font-size: 24px;
font-weight: 600;
}
img { img {
height: 110px; height: 110px;
width: 100%; width: 100%;
@ -195,7 +205,8 @@ export default {
position: absolute; position: absolute;
background: url('~@/assets/images/index/yfcjkuang.png') no-repeat 50% 50%; background: url('~@/assets/images/index/yfcjkuang.png') no-repeat 50% 50%;
background-size: 100% 100%; background-size: 100% 100%;
animation: zoomIn 2s infinite; /* 持续时间为 1 秒,缓动效果为 ease-in-out */
transform-origin: center center; /* 缩放的原点为元素的中心 */
&::after { &::after {
content: '·'; content: '·';
width: 8px; width: 8px;
@ -245,4 +256,15 @@ export default {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
@keyframes zoomIn {
0% {
transform: scale(1);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
}
</style> </style>

47
src/views/next/screen-content-map/cpt/point.json

@ -6,7 +6,9 @@
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛德龙种子研发中心", "name": "青岛德龙种子研发中心",
"type": "marker" "type": "marker",
"category":"unit",
"id":"1"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
@ -17,12 +19,53 @@
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "瑞克斯旺农业科技有限公司", "name": "瑞克斯旺农业科技有限公司",
"type": "marker" "type": "marker",
"category":"unit",
"id":"2"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates":[120.2245,36.542161] "coordinates":[120.2245,36.542161]
} }
},
{
"type": "Feature",
"properties": {
"name": "国家农业科技园",
"type": "marker",
"category":"garden",
"id":"3"
},
"geometry": {
"type": "Point",
"coordinates":[120.204031,36.553108]
}
},
{
"type": "Feature",
"properties": {
"name": "吉茂源农业科技有限公司",
"type": "marker",
"category":"garden",
"id":"4"
},
"geometry": {
"type": "Point",
"coordinates":[120.230002,36.582204]
}
},
{
"type": "Feature",
"properties": {
"name": "德龙种子有限公司",
"type": "marker",
"category":"garden",
"id":"5"
},
"geometry": {
"type": "Point",
"coordinates":[120.221626,36.468795]
}
} }
] ]
} }

21
src/views/next/screen-content-map/cpt/szyf-img.vue

@ -1,21 +0,0 @@
<template>
<div class=''>11</div>
</template>
<script>
export default {
data() {
return {};
},
created() {},
methods: {},
components:{},
computed:{},
watch: {},
}
</script>
<style lang="scss" scoped>
</style>

91
src/views/next/screen-content-map/cpt/zdyf-map.vue

@ -116,38 +116,48 @@ export default {
methods: { methods: {
...mapActions({ ...mapActions({
set_qyjj: 'SET_QYJJ', set_qyjj: 'SET_QYJJ',
set_garden: 'SET_GARDEN',
}), }),
async switcMapType(type) { switcMapType: function (type) {
if (this.debounceTimer) {
clearTimeout(this.debounceTimer);
}
this.debounceTimer = setTimeout(async () => {
if (type === 'Emap') { if (type === 'Emap') {
this.mapType = null; this.mapType = null;
this.mapFlag = 'Emap'; this.mapFlag = 'Emap';
scene.destroy(); scene.destroy();
myMap = null; myMap = null;
return; } else {
}
this.mapFlag = 'Amap'; this.mapFlag = 'Amap';
if (!myMap) { if (!myMap) {
await new Promise(resolve => setTimeout(resolve, 5000)); await new Promise(resolve => setTimeout(resolve, 5000));
await this.init(type); await this.init(type);
} else { } else {
if (polygonLayer) {
scene.removeLayer(polygonLayer);
}
this.initPolygonLayer(type); this.initPolygonLayer(type);
if (type === 'unit') {
this.initDot(point);
} else {
this.removeDotLayers();
}
} }
},
removeDotLayers() {
if (dotTextLayer || dotLayer) {
scene.removeLayer(dotTextLayer);
scene.removeLayer(dotLayer);
} }
}, 1000); // 1
}, },
// switcMapType: debounce(
// async function (type) {
// console.log(type);
// if (type === 'Emap') {
// this.mapType = null;
// this.mapFlag = 'Emap';
// scene.destroy();
// myMap = null;
// return;
// }
// this.mapFlag = 'Amap';
// if (!myMap) {
// await new Promise(resolve => setTimeout(resolve, 5000));
// await this.init(type);
// } else {
// this.initPolygonLayer(type);
// }
// }, 2000),
toProvince() { toProvince() {
this.mapFlag = 'Amap' this.mapFlag = 'Amap'
setTimeout(() => { setTimeout(() => {
@ -178,15 +188,12 @@ export default {
logoVisible: false, logoVisible: false,
map: myMap, map: myMap,
}); });
scene.addImage("textBg", require("@/assets/images/map/textBg.png"));
scene.on("loaded", () => { scene.on("loaded", () => {
if (!type) { if (!type) {
this.initCircle() this.initCircle()
} else if (type == 'unit') { } else if (type == 'unit' || type == 'resource' || type == 'szyf' || type == 'garden') {
this.initPolygonLayer()
} else if (type == 'resource') {
this.initPolygonLayer(type) this.initPolygonLayer(type)
}else if (type == 'szyf') {
this.initFlow(type)
} }
}); });
scene.on("click", (feature) => { scene.on("click", (feature) => {
@ -196,7 +203,7 @@ export default {
initCircle() { initCircle() {
circleLayerSmall = new ImageLayer({}); circleLayerSmall = new ImageLayer({});
circleLayerSmall.source( circleLayerSmall.source(
`${process.env.VUE_APP_MAP_IMG}circle1.png`, `https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/yifeng/2024-02-03/circle.png`,
{ {
parser: { parser: {
type: 'image', type: 'image',
@ -218,7 +225,7 @@ export default {
scene.setZoom(10) scene.setZoom(10)
roadLayer = new ImageLayer({}); roadLayer = new ImageLayer({});
roadLayer.source( roadLayer.source(
`${process.env.VUE_APP_MAP_IMG}road1.png`, `https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/yifeng/2024-02-03/road.png`,
{ {
parser: { parser: {
type: 'image', type: 'image',
@ -266,7 +273,6 @@ export default {
} }
if (textLayer) { if (textLayer) {
scene.removeLayer(textLayer); scene.removeLayer(textLayer);
} }
if (type == 'szyf') { if (type == 'szyf') {
this.initFlow() this.initFlow()
@ -343,15 +349,22 @@ export default {
}) })
.active(true); .active(true);
scene.addLayer(textLayer); scene.addLayer(textLayer);
let _this = this let filteredPoint = { ...point }; // 使
filteredPoint.features = filteredPoint.features.filter(item => item.properties.category === type);
if (type === 'unit' || type === 'garden') {
this.initDot(filteredPoint, type);
}
polygonLayer.on("click", (e) => { polygonLayer.on("click", (e) => {
}); });
}, },
initDot(data) { initDot(data, type) {
console.log(data, '点位数据'); if (dotTextLayer) {
scene.addImage("dotBto", require("@/assets/images/map/dot.png")); scene.removeLayer(dotTextLayer);
scene.addImage("textBg", require("@/assets/images/map/textBg.png")); }
if (dotLayer) {
scene.removeLayer(dotLayer);
}
//textOffset this.buttonIndex == 3 [10,60] [-30 60] //textOffset this.buttonIndex == 3 [10,60] [-30 60]
dotTextLayer = new PointLayer({ dotTextLayer = new PointLayer({
zIndex: 21, zIndex: 21,
@ -386,7 +399,19 @@ export default {
scene.addLayer(dotLayer); scene.addLayer(dotLayer);
let that = this let that = this
dotTextLayer.on("click", (e) => { dotTextLayer.on("click", (e) => {
if (type == 'unit') {
if (e.feature.properties.id === '2') {
that.set_qyjj(true) that.set_qyjj(true)
} else {
this.$message.error('暂无数据~');
}
} else {
if (e.feature.properties.id === '3') {
that.set_garden(true)
} else {
this.$message.error('暂无数据~');
}
}
}); });
// dotTextLayer.on("mousemove", (e) => { // dotTextLayer.on("mousemove", (e) => {
@ -409,6 +434,12 @@ export default {
computed: { computed: {
...mapGetters(['navId',]), ...mapGetters(['navId',]),
}, },
beforeDestroy() {
if (myMap) {
scene.destroy();
myMap = null
}
},
watch: {}, watch: {},
} }
</script> </script>

3
src/views/next/screen-content-map/index.vue

@ -8,7 +8,6 @@
import { mapGetters, mapActions } from 'vuex' import { mapGetters, mapActions } from 'vuex'
import { numAnimation } from 'utils/common' import { numAnimation } from 'utils/common'
import hsyfIframe from './cpt/hsyf-iframe.vue' import hsyfIframe from './cpt/hsyf-iframe.vue'
import szyfImg from './cpt/szyf-img.vue'
import homeMap from './cpt/home-map.vue' import homeMap from './cpt/home-map.vue'
import zdyfMap from './cpt/zdyf-map.vue' import zdyfMap from './cpt/zdyf-map.vue'
import whyf from './cpt/whyf.vue' import whyf from './cpt/whyf.vue'
@ -37,7 +36,7 @@ export default {
} }
} }
}, },
components: { hsyfIframe, szyfImg, homeMap, zdyfMap,whyf }, components: { hsyfIframe, szyfMap, homeMap, zdyfMap,whyf },
watch: { watch: {
scale: { scale: {
immediate: true, immediate: true,

78
src/views/next/screen-content-right/zdyf-right/index.vue

@ -12,13 +12,18 @@
<div slot="left" class="screen-title-left">科研力量</div> <div slot="left" class="screen-title-left">科研力量</div>
</screen-title> </screen-title>
<div class="card-item-kyll"> <div class="card-item-kyll">
<div class="top" @click="handelClickGarden()"> <div class="top" @click="handelClickGarden">
<div class="top-left"> <vue-seamless-scroll :class-option="optionHoverTop" :data="yjyList">
青岛大沽河流域国家农业科技园由即墨农业高新区和青岛生物高新科技产业园合并与2021年3月正式挂牌成立园区是以大沽河流域为核心覆盖青岛带动周边的经济发展 <div class="scroll-box">
<div class="scroll-item" v-for="(item, index) in yjyList"
:key="'kyll' + index">
<span class="left">{{ item.content }}</span>
<div> <img :src="item.img" /></div>
</div> </div>
<div class="top-right"><img src="@/assets/images/material/daguhe.jpg" alt=""></div>
</div> </div>
<div class="bot" @click="handelClickTalents()"> </vue-seamless-scroll>
</div>
<div class="bot" @click="handelClickTalents">
<vue-seamless-scroll :class-option="optionHover" :data="kyllList"> <vue-seamless-scroll :class-option="optionHover" :data="kyllList">
<div class="scroll-box"> <div class="scroll-box">
<div class="scroll-item" v-for="(item, index) in kyllList" <div class="scroll-item" v-for="(item, index) in kyllList"
@ -37,7 +42,8 @@
<div class='card h292 m-top12'> <div class='card h292 m-top12'>
<screen-title> <screen-title>
<div slot="left" class="screen-title-left">移风未来</div> <div slot="left" class="screen-title-left">移风未来</div>
<div slot="right" class="screen-title-right"><span>在谈项目</span> <span @click="handelClickShowMap">资源地图</span></div> <div slot="right" class="screen-title-right"><span>在谈项目</span> <span
@click="handelClickShowMap">资源地图</span></div>
</screen-title> </screen-title>
<div class="card-item-yfwl"> <div class="card-item-yfwl">
<vue-seamless-scroll :class-option="optionHover1" :data="yfwlList"> <vue-seamless-scroll :class-option="optionHover1" :data="yfwlList">
@ -62,6 +68,16 @@ import { mapActions } from 'vuex'
export default { export default {
data() { data() {
return { return {
optionHoverTop: {
step: 8, //
limitMoveNum: 1, // this.dataList.length
hoverStop: true, // stop
direction: 2, // 0 1 2 3
openWatch: true, // dom
singleHeight: 0, // (0) direction => 0/1
singleWidth: 433, // (0) direction => 2/3
waitTime: 7000, // (1000ms)
},
optionHover: { optionHover: {
step: 1, // step: 1, //
limitMoveNum: 3, // this.dataList.length limitMoveNum: 3, // this.dataList.length
@ -145,20 +161,34 @@ export default {
city: '山东', city: '山东',
content: '鲜食花生。' content: '鲜食花生。'
} }
],
yjyList: [
{
img: require('@/assets/images/resource/kyll/garden.png'),
content: '青岛大沽河流域国家农业科技园由即墨农业高新区和青岛生物高新科技产业园合并,与2021年3月正式挂牌成立。园区是以大沽河流域为核心,覆盖青岛带动周边的经济发展。'
},
{
img: require('@/assets/images/resource/kyll/delong.png'),
content: '青岛德龙种子有限公司主要任务是开展技术合作服务,具体内容包括:优质蔬菜新品种选育、设施蔬菜栽培技术和病虫害绿色防控技术的试验、示范与推广等。'
},
{
img: require('@/assets/images/resource/kyll/jmy.png'),
content: '青岛吉茂源农业科技有限公司在农业垃圾分类的生产性废弃物生物转化系统技术的建立与运行示范等领域开展产品与技术开发、科技成果的推广与转化等工作。'
}
] ]
}; };
}, },
created() { }, created() { },
methods: { methods: {
...mapActions({ ...mapActions({
set_garden: 'SET_GARDEN', // set_garden: 'SET_GARDEN',
set_talents: 'SET_TALENTS' set_talents: 'SET_TALENTS'
}), }),
handelClickTalents() { handelClickTalents() {
this.set_talents(true) this.set_talents(true)
}, },
handelClickGarden() { handelClickGarden() {
this.set_garden(true) this.$EventBus.$emit('switcMapType', 'garden')
}, },
handelClickJumpMap() { handelClickJumpMap() {
this.$EventBus.$emit('switcMapType', 'unit') this.$EventBus.$emit('switcMapType', 'unit')
@ -166,7 +196,6 @@ export default {
handelClickShowMap() { handelClickShowMap() {
this.$EventBus.$emit('switcMapType', 'resource') this.$EventBus.$emit('switcMapType', 'resource')
} }
}, },
components: {}, components: {},
computed: {}, computed: {},
@ -188,17 +217,37 @@ export default {
.top { .top {
display: flex; display: flex;
cursor: pointer; cursor: pointer;
overflow: hidden;
height: 100px;
.scroll-box {
display: flex;
// justify-content: space-around;
overflow: hidden;
.scroll-item {
@include flex();
margin-right: 5px;
cursor: pointer;
width: 430px;
&-left { .left {
text-indent: 2em; text-indent: 2em;
flex: 1; flex: 1;
margin-right: 3px; padding-left: 3px;
box-sizing: border-box;
} }
&-right { img {
width: 138px; width: 139px;
height: 102px; height: 102px;
margin-left: 5px;
} }
}
}
} }
.bot { .bot {
@ -292,4 +341,5 @@ export default {
.paragraph { .paragraph {
text-indent: 2em; text-indent: 2em;
}</style> }
</style>

Loading…
Cancel
Save