Browse Source

代码提交

master
juwei001 2 years ago
parent
commit
435c02cb57
  1. BIN
      src/assets/images/zdyf/logo/1.png
  2. BIN
      src/assets/images/zdyf/logo/10.png
  3. BIN
      src/assets/images/zdyf/logo/2.png
  4. BIN
      src/assets/images/zdyf/logo/3.png
  5. BIN
      src/assets/images/zdyf/logo/4.png
  6. BIN
      src/assets/images/zdyf/logo/5.png
  7. BIN
      src/assets/images/zdyf/logo/6.png
  8. BIN
      src/assets/images/zdyf/logo/7.png
  9. BIN
      src/assets/images/zdyf/logo/8.png
  10. BIN
      src/assets/images/zdyf/logo/9.png
  11. 4
      src/components/screen-map-header-home/index.vue
  12. 4
      src/components/screen-map-header/index.vue
  13. 103
      src/views/next/dialog-module/zdyf-center/qyjj/index.vue
  14. 38
      src/views/next/dialog-module/zdyf-right/kyll/keyEnterprisesDetail.vue
  15. 6
      src/views/next/layout/screen-content.vue
  16. 2
      src/views/next/screen-content-left/home-left/index.vue
  17. 130
      src/views/next/screen-content-left/szyf-left/index.vue
  18. 36
      src/views/next/screen-content-left/zdyf-left/index.vue
  19. 192
      src/views/next/screen-content-map/cpt/home-map.vue
  20. 8
      src/views/next/screen-content-map/cpt/hsyf-iframe.vue
  21. 42
      src/views/next/screen-content-map/cpt/point.json
  22. 151
      src/views/next/screen-content-map/cpt/szyf-map.vue
  23. 76
      src/views/next/screen-content-map/cpt/whyf.vue
  24. 423
      src/views/next/screen-content-map/cpt/zdyf-map.vue
  25. 13
      src/views/next/screen-content-map/index.vue
  26. 3
      src/views/next/screen-content-right/zdyf-right/index.vue

BIN
src/assets/images/zdyf/logo/1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
src/assets/images/zdyf/logo/10.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
src/assets/images/zdyf/logo/2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
src/assets/images/zdyf/logo/3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 16 KiB

BIN
src/assets/images/zdyf/logo/4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
src/assets/images/zdyf/logo/5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
src/assets/images/zdyf/logo/6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 16 KiB

BIN
src/assets/images/zdyf/logo/7.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 28 KiB

BIN
src/assets/images/zdyf/logo/8.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 15 KiB

BIN
src/assets/images/zdyf/logo/9.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

4
src/components/screen-map-header-home/index.vue

@ -4,10 +4,10 @@
<div class="item" v-for="(item, index) in data" :key="index"> <div class="item" v-for="(item, index) in data" :key="index">
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
<section> <section>
<span :class="{ num: true, yellow: index === 4 }">{{ <span :class="{ num: true }">{{
item.num item.num
}}</span> }}</span>
<span :class="{ units: true, yellow: index === 4 }">{{ <span :class="{ units: true }">{{
item.units item.units
}}</span> }}</span>
</section> </section>

4
src/components/screen-map-header/index.vue

@ -4,10 +4,10 @@
<div class="item" v-for="(item, index) in data" :key="index"> <div class="item" v-for="(item, index) in data" :key="index">
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
<section> <section>
<span :class="{ num: true, yellow: index === 4 }">{{ <span :class="{ num: true }">{{
item.num item.num
}}</span> }}</span>
<span :class="{ units: true, yellow: index === 4 }">{{ <span :class="{ units: true }">{{
item.units item.units
}}</span> }}</span>
</section> </section>

103
src/views/next/dialog-module/zdyf-center/qyjj/index.vue

@ -58,7 +58,7 @@
</section> </section>
</div> </div>
<p class="unitNotation">{{ unitDetail.summary }}</p> <p class="unitNotation">{{ unitDetail.summary }}</p>
<p style="line-height: 2; text-indent: 2em; font-size: 18px"> <p class="xiangqing">
{{ unitDetail.introduction }} {{ unitDetail.introduction }}
</p> </p>
</div> </div>
@ -85,7 +85,7 @@
/> />
</div> </div>
<div class="imgBox" style="height: 334px"> <div class="imgBox" style="height: 285px">
<div class="header"> <div class="header">
<img <img
src="@/assets/images/common/title-small.png" src="@/assets/images/common/title-small.png"
@ -93,18 +93,24 @@
style="width: 20px; height: 20px" style="width: 20px; height: 20px"
/> />
</div> </div>
<!-- <div v-if="unitDetail.id=='1772542305774510081'"></div>
<div v-else-if="unitDetail.id=='17725423057745100811'"></div>
<div v-else class="imgBox-items imgBox-items-qy"> -->
<div class="imgBox-items imgBox-items-qy"> <div class="imgBox-items imgBox-items-qy">
<vue-seamless-scroll
:class-option="optionHover"
:data="unitDetail.display"
>
<div class="imgBox-items-qy1">
<div <div
class="imgBox-items-item" class="imgBox-items-item"
v-for="item in unitDetail.display || []" v-for="(item, index) in unitDetail.display || []"
:key="item" :key="item"
> >
<img :src="item" /> <div v-for="item1 in item" :key="item1">
<img :src="item1" />
</div>
</div> </div>
</div> </div>
</vue-seamless-scroll>
</div>
<screen-nodata <screen-nodata
v-if="!unitDetail.display && unitDetail.display.length == 0" v-if="!unitDetail.display && unitDetail.display.length == 0"
/> />
@ -148,6 +154,16 @@ export default {
unitDetail: {}, unitDetail: {},
videoUrl: process.env.VUE_APP_VIDEO_URL + 'ruikesiwang.mp4', videoUrl: process.env.VUE_APP_VIDEO_URL + 'ruikesiwang.mp4',
videoUrl1: process.env.VUE_APP_VIDEO_URL + 'shinongzhongmiao.mp4', videoUrl1: process.env.VUE_APP_VIDEO_URL + 'shinongzhongmiao.mp4',
optionHover: {
step: 1, //
limitMoveNum: 3, // this.dataList.length
hoverStop: true, // stop
direction: 2, // 0 1 2 3
openWatch: true, // dom
singleHeight: 0, // (0) direction => 0/1
singleWidth: 0, // (0) direction => 2/3
waitTime: 2000 // (1000ms)
},
types: { types: {
1: '育种企业', 1: '育种企业',
2: '育苗企业', 2: '育苗企业',
@ -170,10 +186,24 @@ export default {
} }
if (val) { if (val) {
seedCompanyDetail(this.gsxqId).then((res) => { seedCompanyDetail(this.gsxqId).then((res) => {
const arr = []
if (res.data.display) {
const data = JSON.parse(res.data.display)
data.forEach((item, index) => {
if (index % 2 == 0) {
arr.push([])
arr[arr.length - 1][0] = item
if (data[index + 1]) {
arr[arr.length - 1][1] = data[index + 1]
}
}
})
}
console.log('arrarr:', arr)
this.unitDetail = { this.unitDetail = {
...res.data, ...res.data,
monitor: res.data.monitor ? JSON.parse(res.data.monitor) : [], monitor: res.data.monitor ? JSON.parse(res.data.monitor) : [],
display: res.data.display ? JSON.parse(res.data.display) : [], display: arr,
honor: res.data.honor ? JSON.parse(res.data.honor) : [] honor: res.data.honor ? JSON.parse(res.data.honor) : []
} }
}) })
@ -193,6 +223,27 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.xiangqing {
line-height: 2;
text-indent: 2em;
font-size: 18px;
height: 430px;
overflow: hidden;
overflow-y: scroll;
&::-webkit-scrollbar {
width: 3px;
}
&::-webkit-scrollbar-track {
border-radius: 10px;
background: rgba(12, 129, 254, 0.24);
}
&::-webkit-scrollbar-thumb {
border-radius: 10px;
background: linear-gradient(270deg, #0063fe, #0095ff);
}
}
.modal { .modal {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -320,7 +371,7 @@ export default {
@include flex(column); @include flex(column);
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
height: 167px; height: 205px;
background: rgba(109, 166, 255, 0.2); background: rgba(109, 166, 255, 0.2);
&:nth-child(1), &:nth-child(1),
@ -351,10 +402,9 @@ export default {
} }
.imgBox-items { .imgBox-items {
width: calc(100% - 25px);
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 12px; padding: 16px;
gap: 6px; gap: 6px;
overflow: hidden; overflow: hidden;
overflow-y: scroll; overflow-y: scroll;
@ -380,21 +430,26 @@ export default {
} }
} }
.imgBox-items-qy { .imgBox-items-qy {
height: 300px; height: 285px;
width: 500px;
margin: 0 16px;
overflow: hidden; overflow: hidden;
overflow-y: scroll; }
&::-webkit-scrollbar { .imgBox-items-qy1 {
width: 3px; height: 285px;
} display: flex;
flex-wrap: nowrap;
&::-webkit-scrollbar-track { overflow: hidden;
border-radius: 10px; overflow-x: scroll;
background: rgba(12, 129, 254, 0.24); justify-content: flex-start;
.imgBox-items-item {
padding: 0 0 0 10px; /* 子元素之间的间隔 */
width: 155px;
img {
height: 100px;
width: 155px;
margin-bottom: 10px;
} }
&::-webkit-scrollbar-thumb {
border-radius: 10px;
background: linear-gradient(270deg, #0063fe, #0095ff);
} }
} }
</style> </style>

38
src/views/next/dialog-module/zdyf-right/kyll/keyEnterprisesDetail.vue

@ -40,41 +40,41 @@
</template> </template>
<script> <script>
import { mapGetters, mapActions } from "vuex"; import { mapGetters, mapActions } from 'vuex'
import { seedPowerList } from "@/api/zdyf"; import { seedPowerList } from '@/api/zdyf'
export default { export default {
name: "", name: '',
data() { data () {
return { return {
dialogTitle: "企业详情", dialogTitle: '企业详情'
}; }
}, },
computed: { computed: {
...mapActions({ ...mapActions({
set_gsxq: "SET_GSXQ", set_gsxq: 'SET_GSXQ'
}), }),
...mapGetters(["gsxq", "gsxqId"]), ...mapGetters(['gsxq', 'gsxqId'])
}, },
components: {}, components: {},
watch: { watch: {
gsxq(val) { gsxq (val) {
if (val) { if (val) {
seedPowerList(val).then((res) => { seedPowerList(val).then((res) => {
this.list = res.data; this.list = res.data
}); })
}
} }
}, },
}, created () {},
created() {},
methods: { methods: {
...mapActions({ ...mapActions({
showGlobalDialog: "showGlobalDialog", showGlobalDialog: 'showGlobalDialog'
}), }),
closeDialog() { closeDialog () {
this.showGlobalDialog(""); this.showGlobalDialog('')
}, }
}, }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

6
src/views/next/layout/screen-content.vue

@ -5,11 +5,17 @@
</template> </template>
<script> <script>
import { mapGetters, mapActions } from 'vuex'
import ScreenContentMap from '../screen-content-map' import ScreenContentMap from '../screen-content-map'
export default { export default {
name: 'screen-content', name: 'screen-content',
components: { components: {
ScreenContentMap ScreenContentMap
},
computed: {
...mapGetters(['scale', 'navId'])
},
mounted () {
} }
} }
</script> </script>

2
src/views/next/screen-content-left/home-left/index.vue

@ -184,7 +184,7 @@ export default {
}, },
created () { created () {
const arr5 = [] const arr5 = []
for (let i = 1; i < 11; i++) { for (let i = 1; i < 10; i++) {
arr5.push({ arr5.push({
title: 'parent', title: 'parent',
slide: 23424234234234, slide: 23424234234234,

130
src/views/next/screen-content-left/szyf-left/index.vue

@ -119,7 +119,7 @@
<div> <div>
<el-carousel height="190px"> <el-carousel height="190px">
<el-carousel-item <el-carousel-item
v-for="(item, index) in stabilizeList" v-for="(item, index) in stabilizeList1"
:key="'key' + index" :key="'key' + index"
> >
<div class="card-item-wwry" @click="set_zdry(true)"> <div class="card-item-wwry" @click="set_zdry(true)">
@ -149,7 +149,7 @@ export default {
optionData: [ optionData: [
{ {
name: '待处理', name: '待处理',
value: 51 value: 50
}, },
{ {
name: '处理中', name: '处理中',
@ -179,6 +179,7 @@ export default {
], ],
stabilizeList: [[]], stabilizeList: [[]],
stabilizeList1: [ stabilizeList1: [
[
{ {
imgSrc: require('@/assets/images/icon/xfry.png'), imgSrc: require('@/assets/images/icon/xfry.png'),
value: 312, value: 312,
@ -208,7 +209,9 @@ export default {
imgSrc: require('@/assets/images/icon/snry.png'), imgSrc: require('@/assets/images/icon/snry.png'),
value: 16, value: 16,
name: '失能人员' name: '失能人员'
}, }
],
[
{ {
imgSrc: require('@/assets/images/icon/cjr.png'), imgSrc: require('@/assets/images/icon/cjr.png'),
value: 312, value: 312,
@ -238,48 +241,63 @@ export default {
imgSrc: require('@/assets/images/icon/ylfn.png'), imgSrc: require('@/assets/images/icon/ylfn.png'),
value: 16, value: 16,
name: '育龄妇女' name: '育龄妇女'
}, }
],
[
{ {
imgSrc: require('@/assets/images/icon/tyjr.png'), imgSrc: require('@/assets/images/icon/tyjr.png'),
value: 16, value: 16,
name: '退役军人' name: '退役军人'
} }
]
], ],
peiOption: null, peiOption: null,
fxInfo: {}, fxInfo: {
totalNum: 0, jiSuJiBan: 137,
zhiTongLianBan: 46,
wangGeHua: 28,
yiJieAn: 26,
daiChuLi: 6,
chuLiZhong: 3,
guiDang: 102,
yiJieAnRate: 0.19,
daiChuLiRate: 0.05,
chuLiZhongRate: 0.02,
guiDangRate: 0.74
},
totalNum: 1762,
optionData3D: [ optionData3D: [
{ {
name: '城市管理', // name: '城市管理', //
value: 0, // value: 26, //
itemStyle: { itemStyle: {
color: 'rgba(13, 144, 254,1)' color: 'rgba(13, 144, 254,1)'
} }
}, },
{ {
name: '交通设施', name: '交通设施',
value: 0, value: 30,
itemStyle: { itemStyle: {
color: 'rgba(68, 212, 205,1)' color: 'rgba(68, 212, 205,1)'
} }
}, },
{ {
name: '噪音扰民', name: '噪音扰民',
value: 0, value: 14,
itemStyle: { itemStyle: {
color: 'rgba(242, 169, 128, 1)' color: 'rgba(242, 169, 128, 1)'
} }
}, },
{ {
name: '环境卫生', name: '环境卫生',
value: 0, value: 20,
itemStyle: { itemStyle: {
color: 'rgba(219, 219, 138, 1)' color: 'rgba(219, 219, 138, 1)'
} }
}, },
{ {
name: '其他', name: '其他',
value: 0, value: 10,
itemStyle: { itemStyle: {
color: 'rgba(238, 116, 56,1)' color: 'rgba(238, 116, 56,1)'
} }
@ -301,51 +319,51 @@ export default {
set_zdry: 'SET_ZDRY' set_zdry: 'SET_ZDRY'
}), }),
async chushihua () { async chushihua () {
await getEventRate({ // await getEventRate({
orgId: '1739891126105206786', // orgId: '1739891126105206786',
orgType: 'agency' // orgType: 'agency'
}).then((res) => { // }).then((res) => {
if (res.data.category) { // if (res.data.category) {
const data = res.data.category.filter((item) => item.value > 0) // const data = res.data.category.filter((item) => item.value > 0)
this.optionData3D = data || this.optionData3D // this.optionData3D = data || this.optionData3D
} // }
this.eventTotalList[0].num = res.data.hongDeng // this.eventTotalList[0].num = res.data.hongDeng
this.eventTotalList[1].num = res.data.huangDeng // this.eventTotalList[1].num = res.data.huangDeng
this.eventTotalList[2].num = res.data.lanDeng // this.eventTotalList[2].num = res.data.lanDeng
this.totalNum = res.data.total // this.totalNum = res.data.total
}) // })
await getEventAnalysis({ // await getEventAnalysis({
orgId: '1739891126105206786', // orgId: '1739891126105206786',
orgType: 'agency', // orgType: 'agency',
eventType: '' // eventType: ''
}).then((res) => { // }).then((res) => {
this.fxInfo = res.data || {} // this.fxInfo = res.data || {}
this.optionData[0].value = res.data ? res.data.daiChuLiRate * 100 : 0 // this.optionData[0].value = res.data ? res.data.daiChuLiRate * 100 : 0
this.optionData[1].value = res.data ? res.data.chuLiZhongRate * 100 : 0 // this.optionData[1].value = res.data ? res.data.chuLiZhongRate * 100 : 0
this.optionData[2].value = res.data ? res.data.yiJieAnRate * 100 : 0 // this.optionData[2].value = res.data ? res.data.yiJieAnRate * 100 : 0
}) // })
await statsByCategory({ // await statsByCategory({
orgId: '1739891126105206786', // orgId: '1739891126105206786',
orgType: 'agency', // orgType: 'agency',
eventType: '' // eventType: ''
}).then((res) => { // }).then((res) => {
let num = 0 // let num = 0
let index = 0 // let index = 0
res.data.forEach((item, i) => { // res.data.forEach((item, i) => {
if (num < 6) { // if (num < 6) {
num = num + 1 // num = num + 1
} else { // } else {
num = 1 // num = 1
index = index + 1 // index = index + 1
this.stabilizeList.push([]) // this.stabilizeList.push([])
} // }
this.stabilizeList[index][num - 1] = { // this.stabilizeList[index][num - 1] = {
...item, // ...item,
imgSrc: this.stabilizeList1[i].imgSrc // imgSrc: this.stabilizeList1[i].imgSrc
} // }
}) // })
console.log('this.stabilizeList::', this.stabilizeList) // console.log('this.stabilizeList::', this.stabilizeList)
}) // })
this.initChartPei() this.initChartPei()
this.initChartPei3D() this.initChartPei3D()

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

@ -118,17 +118,17 @@
<div>{{ item.price && item.price.toFixed(2) }}</div> <div>{{ item.price && item.price.toFixed(2) }}</div>
<div style="display: flex"> <div style="display: flex">
<div style="width: 38px"> <div style="width: 38px">
{{ item.jzrPrice && item.jzrPrice.toFixed(2) }} {{ item.jzrPrice != '暂无' ? item.jzrPrice.toFixed(2): '暂无' }}
</div> </div>
<img <img
v-if="item.jzrPrice >= 0" v-if="item.jzrPrice >= 0 && item.jzrPrice != '暂无'"
width="16px" width="16px"
height="16px" height="16px"
src="@/assets/images/icon/upRed.png" src="@/assets/images/icon/upRed.png"
alt="" alt=""
/> />
<img <img
v-else v-else-if="item.jzrPrice != '暂无'"
width="16px" width="16px"
height="16px" height="16px"
src="@/assets/images/icon/downLv.png" src="@/assets/images/icon/downLv.png"
@ -300,10 +300,12 @@ export default {
this.dayList = res.priceslist this.dayList = res.priceslist
this.getDayScTData() this.getDayScTData()
} else { } else {
this.times = this.$moment(this.times).subtract(1, 'days').format('yyyy-MM-DD') this.times = this.$moment(this.times)
.subtract(1, 'days')
.format('yyyy-MM-DD')
this.getDayScData({ this.getDayScData({
FEndDate: this.$moment().subtract(1, 'days').format('yyyy-MM-DD'), FEndDate: this.$moment(this.times).subtract(1, 'days').format('yyyy-MM-DD'),
FStartDate: this.$moment().subtract(1, 'days').format('yyyy-MM-DD') FStartDate: this.$moment(this.times).subtract(1, 'days').format('yyyy-MM-DD')
}) })
} }
}) })
@ -315,12 +317,11 @@ export default {
FStartDate: this.times FStartDate: this.times
}).then((res1) => { }).then((res1) => {
if (res1.priceslist.length > 0) { if (res1.priceslist.length > 0) {
this.shichangList = this.getScData( this.shichangList = this.getScData(this.dayList, res1.priceslist)
this.dayList,
res1.priceslist
)
} else { } else {
this.times = this.$moment(this.times).subtract(1, 'days').format('yyyy-MM-DD') this.times = this.$moment(this.times)
.subtract(1, 'days')
.format('yyyy-MM-DD')
this.getDayScTData() this.getDayScTData()
} }
}) })
@ -329,13 +330,20 @@ export default {
const dataD = this.deduplicationJs(arr) const dataD = this.deduplicationJs(arr)
const dataTd = this.deduplicationJs(arr1) const dataTd = this.deduplicationJs(arr1)
return dataD.map((item, index) => { return dataD.map((item, index) => {
const priceTd = dataTd.filter((item1) => item.Name === item1.Name)[0] const priceTd = dataTd.filter((item1) => item.Name === item1.Name)
.price // [0].price
const jzrPrice = item.price - priceTd if (priceTd.length > 0) {
const jzrPrice = item.price - priceTd[0].price
return { return {
...item, ...item,
jzrPrice jzrPrice
} }
} else {
return {
...item,
jzrPrice: '暂无'
}
}
}) })
}, },
handelClickEmap () { handelClickEmap () {

192
src/views/next/screen-content-map/cpt/home-map.vue

@ -3,78 +3,13 @@
<div class="bg_img"> <div class="bg_img">
<screen-map-header-home :data="headerList"></screen-map-header-home> <screen-map-header-home :data="headerList"></screen-map-header-home>
</div> </div>
<!-- <div id="myMap" style="background-color: #f0f0f0">
</div> -->
</div> </div>
</template> </template>
<script> <script>
import { Scene, PolygonLayer, LineLayer } from '@antv/l7'
import { GaodeMap } from '@antv/l7-maps'
import yifengJson from './yifeng.json'
import chinaMap from './chinaMap.vue'
import { selectConfigList } from '@/api/home' import { selectConfigList } from '@/api/home'
import jdbandaoJson from './jdbandao.json'
import { mapActions } from 'vuex'
let myMap
let scene
let polygonLayer
let lineLayer
let textLayer
export default { export default {
data () { data () {
return { return {
darkStyle: {
style: 'amap://styles/blue',
polygonColor: [
// "rgba(255, 100, 60, 0.5)",
// "rgba(43, 231, 253, 0.35)",
'rgba(0, 127, 241, .5)'
// "rgba(255, 255, 50, 0.35)",
],
lineColor: [
// "rgba(255, 180, 150, 0.9)",
// "rgba(43, 231, 253, 0.7)",
'rgba(0, 127, 241, .6)'
// "rgba(255, 255, 50, 0.7)",
],
circleColor: [
// "rgba(255, 180, 150, 0.99)",
// "rgba(43, 231, 253, 0.99)",
'rgba(0, 127, 241, 0.99)'
// "rgba(255, 255, 50, 0.99)",
],
textColor: [
// "rgba(255, 100, 60, 0.99)",
// "rgba(43, 231, 253, 0.99)",
'rgba(126, 187, 255, 1)'
// "rgba(255, 255, 50, 0.99)",
],
textStrokeColor: '#fff'
},
lightStyle: {
style: 'amap://styles/whitesmoke',
polygonColor: [
// "rgba(255, 100, 60, 0.3)",
'rgba(43, 231, 253, 0.3)'
// "rgba(255, 255, 50, 0.3)",
],
lineColor: [
// "rgba(220, 150, 120, 0.9)",
'rgba(155, 212, 242, 1)'
// "rgba(200, 200, 50, 0.9)",
],
circleColor: [
// "rgba(255, 180, 150, 0.99)",
'rgba(13, 181, 203, 0.8)'
// "rgba(255, 255, 50, 0.99)",
],
textColor: [
// "rgba(200, 50, 10, 0.99)",
'rgba(0, 130, 153, 0.99)'
// "rgba(120, 120, 0, 0.99)",
],
textStrokeColor: '#666'
},
headerList: [ headerList: [
{ name: '镇域面积', units: '公里²', num: '199' }, { name: '镇域面积', units: '公里²', num: '199' },
{ name: '耕地面积', units: '万亩', num: '17.4' }, { name: '耕地面积', units: '万亩', num: '17.4' },
@ -99,134 +34,7 @@ export default {
}) })
}, },
methods: { methods: {
init () {
if (!yifengJson) return false
myMap = new GaodeMap({
pitch: 40.24716321414439,
mapStyle: 'amap://styles/blue',
// mapStyle: 'amap://styles/darkblue',
// mapStyle: 'amap://styles/3bd5ec68d60de6542634c3e701f64523',
// style: styleConfig.style,
showLabel: false,
center: [120.220563, 36.496127],
token: 'fc14b42e0ca18387866d68ebd4f150c1',
zoom: 9,
isHotspot: false,
showIndoorMap: false,
showBuildingBlock: false,
resizeEnable: true,
doubleClickZoom: false,
showRoad: false,
viewMode: '3D'
})
scene = new Scene({
id: 'myMap',
logoVisible: false,
map: myMap
})
scene.on('loaded', () => {
// scene.getMap().setStyle({
// backgroundStyle: {
// fill: '#f0f0f0' //
// }
// })
this.initPolygonLayer()
})
// scene.on("click", (feature) => {
// // console.log(feature);
// });
},
initPolygonLayer () {
const { darkStyle } = this
const styleConfig = darkStyle
const data = yifengJson
const data1 = jdbandaoJson
//
polygonLayer = new PolygonLayer({
autoFit: true
})
.size(1000)
.source(data1)
.color('name', ['rgba(0, 0, 255,0.2)'])
.shape('fill')
.style({
// opacityLinear: {
// enable: true, // true - false
// dir: 'out' // in - out
// },
opacity: 0.6,
// heightfixed: true,
sourceColor: '#4ee8fc',
targetColor: '#00284e'
})
scene.addLayer(polygonLayer)
polygonLayer = new PolygonLayer({
autoFit: true
})
.size(1000)
.source(data)
.color('name', ['rgba(0,106,235, .9)'])
.shape('extrude')
// .shape("fill")
.style({
opacityLinear: {
enable: true, // true - false
dir: 'out' // in - out
},
opacity: 0.8,
heightfixed: true,
sourceColor: '#3072d0',
targetColor: '#00284e'
// targetColor: '#4ee8fc'
})
scene.addLayer(polygonLayer)
//
lineLayer = new LineLayer({
zIndex: 2,
name: 'line2'
})
.source(data)
.shape('line')
.size(1)
.color('name', styleConfig.lineColor)
.style({
opacity: 1,
raisingHeight: 300
})
.animate({
interval: 1, //
duration: 2, //
trailLength: 2 // 线
})
scene.addLayer(lineLayer)
textLayer = new PolygonLayer({
zIndex: 20
})
.source(data)
.color('name', styleConfig.textColor)
.shape('name', 'text')
.size(14)
.style({
textAnchor: 'center', // center|left|right|top|bottom|top-left
textOffset: [0, 40], // [, ]
spacing: 2, //
padding: [2, 2], // padding []
stroke: styleConfig.textStrokeColor, //
strokeWidth: 0.1, //
strokeOpacity: 0.8,
raisingHeight: 300,
textAllowOverlap: true
})
.active(true)
scene.addLayer(textLayer)
const _this = this
polygonLayer.on('click', (e) => {})
}
}, },
components: { chinaMap },
computed: {}, computed: {},
watch: {} watch: {}
} }

8
src/views/next/screen-content-map/cpt/hsyf-iframe.vue

@ -16,14 +16,14 @@
<script> <script>
export default { export default {
data() { data () {
return {}; return {}
}, },
created() { }, created () { },
methods: {}, methods: {},
components: {}, components: {},
computed: {}, computed: {},
watch: {}, watch: {}
} }
</script> </script>

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

@ -9,13 +9,13 @@
"name": "瑞克斯旺(中国)农业科技有限公司", "name": "瑞克斯旺(中国)农业科技有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "11" "id": "1772542305774510081"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.224506, 120.21399,
36.542165 36.54200
] ]
} }
}, },
@ -57,13 +57,13 @@
"name": "青岛世农种苗有限公司", "name": "青岛世农种苗有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "11" "id": "1777620943127711745"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.219312, 120.21425,
36.565069 36.56496
] ]
} }
}, },
@ -89,13 +89,13 @@
"name": "青岛德龙种子有限公司", "name": "青岛德龙种子有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "11" "id": "1739933907285520386"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.215301, 120.21047,
36.517811 36.517690
] ]
} }
}, },
@ -182,16 +182,16 @@
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛海育种业有限公司", "name": "山东汉研种业科技有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "11" "id": "1777617911371534337"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.20024, 120.23914,
36.465497 36.48409
] ]
} }
}, },
@ -255,7 +255,7 @@
"name": "青岛润之禾农业科技有限公司", "name": "青岛润之禾农业科技有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1774613614792564738"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
@ -300,7 +300,7 @@
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛润之禾农业科技有限公司", "name": "青岛禾农业科技有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -341,7 +341,7 @@
"name": "青岛润涵食品有限公司", "name": "青岛润涵食品有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1777605184087396353"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
@ -373,7 +373,7 @@
"name": "青岛地平线蔬菜专业合作社", "name": "青岛地平线蔬菜专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1774615823391416321"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
@ -389,7 +389,7 @@
"name": "青岛诚一果蔬现代农业专业合作社", "name": "青岛诚一果蔬现代农业专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1774615189523030018"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
@ -421,7 +421,7 @@
"name": "青岛贸润蔬菜瓜果专业合作社", "name": "青岛贸润蔬菜瓜果专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1777604628077875202"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
@ -667,7 +667,7 @@
"name": "青岛龙之园绿色食品有限公司", "name": "青岛龙之园绿色食品有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1777603244213407745"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
@ -715,7 +715,7 @@
"name": "青岛润涵食品有限公司", "name": "青岛润涵食品有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1777605184087396353"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",

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

@ -10,162 +10,19 @@
</div> </div>
</template> </template>
<script> <script>
import { Scene, PolygonLayer } from "@antv/l7";
import { GaodeMap } from "@antv/l7-maps";
import yifengJson from "./yifeng.json";
import jdbandaoJson from "./jdbandao.json";
import chinaMap from "./chinaMap.vue";
import { mapActions } from "vuex";
let myMap;
let scene;
let polygonLayer;
export default { export default {
data() { data () {
return { return {
darkStyle: {
style: "amap://styles/blue",
polygonColor: [
// "rgba(255, 100, 60, 0.5)",
// "rgba(43, 231, 253, 0.35)",
"rgba(0, 127, 241, .5)",
// "rgba(255, 255, 50, 0.35)",
],
lineColor: [
// "rgba(255, 180, 150, 0.9)",
// "rgba(43, 231, 253, 0.7)",
"rgba(0, 127, 241, .6)",
// "rgba(255, 255, 50, 0.7)",
],
circleColor: [
// "rgba(255, 180, 150, 0.99)",
// "rgba(43, 231, 253, 0.99)",
"rgba(0, 127, 241, 0.99)",
// "rgba(255, 255, 50, 0.99)",
],
textColor: [
// "rgba(255, 100, 60, 0.99)",
// "rgba(43, 231, 253, 0.99)",
"rgba(126, 187, 255, 1)",
// "rgba(255, 255, 50, 0.99)",
],
textStrokeColor: "#fff",
},
lightStyle: {
style: "amap://styles/blue",
polygonColor: [
// "rgba(255, 100, 60, 0.3)",
"rgba(43, 231, 253, 0.3)",
// "rgba(255, 255, 50, 0.3)",
],
lineColor: [
// "rgba(220, 150, 120, 0.9)",
"rgba(155, 212, 242, 1)",
// "rgba(200, 200, 50, 0.9)",
],
circleColor: [
// "rgba(255, 180, 150, 0.99)",
"rgba(13, 181, 203, 0.8)",
// "rgba(255, 255, 50, 0.99)",
],
textColor: [
// "rgba(200, 50, 10, 0.99)",
"rgba(0, 130, 153, 0.99)",
// "rgba(120, 120, 0, 0.99)",
],
textStrokeColor: "#666",
},
};
},
created() {},
mounted() {
this.$nextTick(() => {
this.init();
});
},
methods: {
init() {
if (!yifengJson) return false;
myMap = new GaodeMap({
pitch: 40.24716321414439,
// mapStyle: 'amap://styles/3bd5ec68d60de6542634c3e701f64523',
style: this.darkStyle.style,
showLabel: false,
center: [120.220563, 36.496127],
token: "fc14b42e0ca18387866d68ebd4f150c1",
zoom: 10,
isHotspot: false,
showIndoorMap: false,
showBuildingBlock: false,
resizeEnable: true,
doubleClickZoom: false,
showRoad: false,
viewMode: "3D",
});
scene = new Scene({
id: "myMap",
logoVisible: false,
map: myMap,
});
const data = yifengJson;
const data1 = jdbandaoJson;
//
if (polygonLayer) {
scene.removeLayer(polygonLayer);
} }
polygonLayer = new PolygonLayer({
autoFit: true,
})
.size(1000)
.source(data1)
.color("name", ["rgba(0, 0, 255,0.2)"])
.shape("fill")
.style({
// opacityLinear: {
// enable: true, // true - false
// dir: 'out' // in - out
// },
opacity: 0.6,
// heightfixed: true,
sourceColor: "#4ee8fc",
targetColor: "#00284e",
});
scene.addLayer(polygonLayer);
//
polygonLayer = new PolygonLayer({
autoFit: true,
})
.size(1000)
.source(data)
.color("name", ["rgba(0, 127, 241, .0)"])
.shape("fill")
.style({
// opacityLinear: {
// enable: true, // true - false
// dir: 'out' // in - out
// },
opacity: 0,
// heightfixed: true,
sourceColor: "#4ee8fc",
targetColor: "#00284e",
});
scene.addLayer(polygonLayer);
scene.on("loaded", () => {});
}, },
methods: {
}, },
components: { chinaMap },
computed: {}, computed: {},
watch: {}, watch: {}
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
#myMap {
width: 100%;
height: 100%;
}
.mapImage { .mapImage {
@include flex(column); @include flex(column);
align-items: center; align-items: center;

76
src/views/next/screen-content-map/cpt/whyf.vue

@ -44,78 +44,78 @@
</div> </div>
</template> </template>
<script> <script>
import { cultureLegacyList } from "@/api/home"; import { cultureLegacyList } from '@/api/home'
export default { export default {
data() { data () {
return { return {
tabList: [ tabList: [
{ {
name: "大欧鸟笼制作技艺", name: '大欧鸟笼制作技艺',
src: require("@/assets/images/resource/whyf/1.jpg"), src: require('@/assets/images/resource/whyf/1.jpg')
}, },
{ {
name: "虎头鞋虎头帽", name: '虎头鞋虎头帽',
src: require("@/assets/images/resource/whyf/2.jpg"), src: require('@/assets/images/resource/whyf/2.jpg')
}, },
{ {
name: "毛子埠升制作技艺", name: '毛子埠升制作技艺',
src: require("@/assets/images/resource/whyf/5.jpg"), src: require('@/assets/images/resource/whyf/5.jpg')
}, },
{ {
name: "大沽河的传说", name: '大沽河的传说',
src: require("@/assets/images/resource/whyf/7.jpg"), src: require('@/assets/images/resource/whyf/7.jpg'),
imageList: [ imageList: [
require("@/assets/images/resource/whyf/7.jpg"), require('@/assets/images/resource/whyf/7.jpg'),
require("@/assets/images/resource/whyf/9.jpg"), require('@/assets/images/resource/whyf/9.jpg'),
require("@/assets/images/resource/whyf/10.jpg"), require('@/assets/images/resource/whyf/10.jpg')
], ],
content: content:
"<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2008年公布为第一批即墨市级非物质文化遗产名录。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;《大沾河的传说》,起始于春秋战国时期,距今已有二千余年历史。其流传区域.以即墨市移风店镇为中心,涉及到沿大洁河周边镇以及平度、胶州、莱西等区市。同时,有些故事在东北三省等地区也广为流传。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;移风店镇历史您久,文化底蕴丰厚,新石器时代的龙山文化遗址、春秋棠邑古城遗址及即墨县抗日民主政府旧址均位于该镇,是即墨柳腔的发源地之一。该镇民风淳朴,人民群众勤劳朴实,有传统的布艺加工、草编等民间手工技艺,并流传着许多美丽的传说,其主要故事有:“大沽河的传说&quot;(两个版本)、“入洞房的传说&quot;、“老人是宝”、“三湾崖的传说&quot;、“三个日头”、“挂甲树”、“泰山石敢当二则”、“天地传说&quot;“神医乔范”、“油匠口子”、“徐仙姑传说”、“好人好报”、“吕洞宾典故”、“虎头鞋与虎头帽的传说”、&quot;李师傅的传说”、&quot;张柄寺的传说&quot;等。这些故事经当地百姓口口相传,深深地影响了一代又一代的大沽河人。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;《大沽河的传说》,具有浓厚的民间文化底蕴,脍炙人口的故事都充分体现了沽河沿岸人民的勒劳朴实、宽厚仁爱的传统道德观念和坚忍不拔的奋斗精神</p><p><br/></p>", '<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2008年公布为第一批即墨市级非物质文化遗产名录。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;《大沾河的传说》,起始于春秋战国时期,距今已有二千余年历史。其流传区域.以即墨市移风店镇为中心,涉及到沿大洁河周边镇以及平度、胶州、莱西等区市。同时,有些故事在东北三省等地区也广为流传。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;移风店镇历史您久,文化底蕴丰厚,新石器时代的龙山文化遗址、春秋棠邑古城遗址及即墨县抗日民主政府旧址均位于该镇,是即墨柳腔的发源地之一。该镇民风淳朴,人民群众勤劳朴实,有传统的布艺加工、草编等民间手工技艺,并流传着许多美丽的传说,其主要故事有:“大沽河的传说&quot;(两个版本)、“入洞房的传说&quot;、“老人是宝”、“三湾崖的传说&quot;、“三个日头”、“挂甲树”、“泰山石敢当二则”、“天地传说&quot;“神医乔范”、“油匠口子”、“徐仙姑传说”、“好人好报”、“吕洞宾典故”、“虎头鞋与虎头帽的传说”、&quot;李师傅的传说”、&quot;张柄寺的传说&quot;等。这些故事经当地百姓口口相传,深深地影响了一代又一代的大沽河人。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;《大沽河的传说》,具有浓厚的民间文化底蕴,脍炙人口的故事都充分体现了沽河沿岸人民的勒劳朴实、宽厚仁爱的传统道德观念和坚忍不拔的奋斗精神</p><p><br/></p>'
}, },
{ {
name: "陈仙姑传说", name: '陈仙姑传说',
src: require("@/assets/images/resource/whyf/8.jpg"), src: require('@/assets/images/resource/whyf/8.jpg')
}, },
{ {
name: "金吉友拳法", name: '金吉友拳法',
src: require("@/assets/images/resource/whyf/3.jpg"), src: require('@/assets/images/resource/whyf/3.jpg')
}, },
{ {
name: "张院簸箕制作技艺", name: '张院簸箕制作技艺',
src: require("@/assets/images/resource/whyf/4.jpg"), src: require('@/assets/images/resource/whyf/4.jpg')
}, },
{ {
name: "上泊金银器打造工艺", name: '上泊金银器打造工艺',
src: require("@/assets/images/resource/whyf/6.jpg"), src: require('@/assets/images/resource/whyf/6.jpg')
}, }
], ],
active: 7, active: 7,
selfObj: {}, selfObj: {}
}; }
}, },
created() { created () {
cultureLegacyList().then((res) => { cultureLegacyList().then((res) => {
this.tabList = res.data.list; this.tabList = res.data.list
this.selfObj = { this.selfObj = {
content: this.tabList[7].content, content: this.tabList[7].content,
imageList: this.tabList[7].imageList, imageList: this.tabList[7].imageList
}; }
}); })
}, },
mounted() {}, mounted () {},
methods: { methods: {
handelTab(index) { handelTab (index) {
this.active = index; this.active = index
this.selfObj = { this.selfObj = {
content: this.tabList[index].content, content: this.tabList[index].content,
imageList: this.tabList[index].imageList, imageList: this.tabList[index].imageList
}; }
}, }
}, },
components: {}, components: {},
computed: {}, computed: {},
watch: {}, watch: {}
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

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

@ -1,9 +1,6 @@
<template> <template>
<div style="width: 100%; height: 100%"> <div style="width: 100%; height: 100%">
<div class="bg_img" v-if="mapFlag == 'Emap'"> <div class="bg_img" v-if="mapFlag == 'Emap'">
<!-- <div class="title">
{{ title }}
</div> -->
<chinaMap /> <chinaMap />
<div class="pot" @click="toProvince"> <div class="pot" @click="toProvince">
<img src="@/assets/images/map/yellowPot.png" alt="" /> <img src="@/assets/images/map/yellowPot.png" alt="" />
@ -16,22 +13,19 @@
</div> </div>
</div> </div>
</div> </div>
<div id="myMap" v-if="mapFlag == 'Amap'"> <div id="myMapZd" v-if="mapFlag == 'Amap'">
<div v-if="mapType == 'polygon'"> <div>
<screen-map-header :data="headerList"></screen-map-header> <screen-map-header
<screen-map-legeng></screen-map-legeng> v-if="showPage"
:data="headerList"
></screen-map-header>
<screen-map-legeng v-if="showPage"></screen-map-legeng>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import { Scene, PolygonLayer, LineLayer, PointLayer } from '@antv/l7'
Scene,
PolygonLayer,
LineLayer,
ImageLayer,
PointLayer
} from '@antv/l7'
import { GaodeMap } from '@antv/l7-maps' import { GaodeMap } from '@antv/l7-maps'
import yifengJson from './yifeng.json' import yifengJson from './yifeng.json'
import jdbandaoJson from './jdbandao.json' import jdbandaoJson from './jdbandao.json'
@ -39,14 +33,13 @@ import point from './point.json'
import chinaMap from './chinaMap.vue' import chinaMap from './chinaMap.vue'
import { selectConfigList } from '@/api/home' import { selectConfigList } from '@/api/home'
import { mapActions, mapGetters } from 'vuex' import { mapActions, mapGetters } from 'vuex'
let myMap const width = 0
const height = 0
let myMapZd
let scene let scene
let circleLayerSmall
let roadLayer
let polygonLayer let polygonLayer
let polygonLayer1
let lineLayer let lineLayer
let textLayer
let dotTextLayer
let dotLayer let dotLayer
let dotLayer1 let dotLayer1
let dotLayer2 let dotLayer2
@ -116,18 +109,35 @@ export default {
{ name: '年平均降水', units: '毫升', num: '687' }, { name: '年平均降水', units: '毫升', num: '687' },
{ name: '土壤有机质', units: '含量', num: '1.5%' } { name: '土壤有机质', units: '含量', num: '1.5%' }
], ],
mapType: '' mapType: '',
showPage: false,
width: 1920,
height: 960
}
},
created () {
//
const screenHeight = window.innerHeight
//
if (screenHeight === 960) {
this.height = 960
} else if (screenHeight === 1080) {
this.height = 1080
} else {
this.height = 960
}
// console.log(this.height, 'this.height')
if (width && height) {
this.width = width
this.height = height
} }
}, },
created () {},
mounted () { mounted () {
window._AMapSecurityConfig = { window._AMapSecurityConfig = {
securityJsCode: '92ea2c965c6cf1ba7ee3a8fe01449ef2' securityJsCode: '92ea2c965c6cf1ba7ee3a8fe01449ef2'
} }
this.$nextTick(() => { this.$nextTick(() => {
this.$EventBus.$on('switcMapType', (data) => {
this.switcMapType(data)
})
this.$EventBus.$on('switcMapType1', (data) => { this.$EventBus.$on('switcMapType1', (data) => {
this.switcMapType1(data) this.switcMapType1(data)
}) })
@ -144,35 +154,23 @@ export default {
}, },
methods: { methods: {
...mapActions({ ...mapActions({
set_qyjj: 'SET_QYJJ' set_qyjj: 'SET_QYJJ',
set_gsxq_id: 'SET_GSXQ_ID'
}), }),
...mapActions({}),
openCompanyDetail (item) {
this.set_qyjj(true)
this.set_gsxq_id(item.id)
},
async switcMapType1 (arr) { async switcMapType1 (arr) {
this.removeDotLayers() this.removeDotLayers()
this.initDot(point, arr) this.initDot(point, arr)
}, },
async switcMapType (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)
if (type === 'unit') {
this.removeDotLayers()
this.initDot(point)
}
}
},
removeDotLayers () { removeDotLayers () {
scene.removeLayer(dotTextLayer)
scene.removeLayer(dotLayer) scene.removeLayer(dotLayer)
scene.removeLayer(dotLayer1)
scene.removeLayer(dotLayer2)
scene.removeLayer(dotLayer3)
}, },
toProvince () { toProvince () {
this.mapFlag = 'Amap' this.mapFlag = 'Amap'
@ -180,141 +178,55 @@ export default {
this.init() this.init()
}, 1000) }, 1000)
}, },
init (type) { init () {
if (!yifengJson) return false if (!yifengJson) return false
myMap = new GaodeMap({ myMapZd = new GaodeMap({
pitch: 40.24716321414439, pitch: 40.24716321414439,
mapStyle: 'amap://styles/blue', mapStyle: 'amap://styles/blue',
// style: styleConfig.style, // style: styleConfig.style,
showLabel: false, showLabel: false,
center: [120.220563, 36.496127], center: [120.220563, 36.496127],
token: 'fc14b42e0ca18387866d68ebd4f150c1', token: 'fc14b42e0ca18387866d68ebd4f150c1',
zoom: 15, zoom: 13,
isHotspot: false, isHotspot: false,
showIndoorMap: false, showIndoorMap: false,
showBuildingBlock: false, showBuildingBlock: false,
resizeEnable: true, resizeEnable: true,
doubleClickZoom: false, // doubleClickZoom: false,
showRoad: false, showRoad: false,
viewMode: '3D' viewMode: '3D'
}) })
scene = new Scene({ scene = new Scene({
id: 'myMap', id: 'myMapZd',
logoVisible: false, logoVisible: false,
map: myMap map: myMapZd
}) })
this.showPage = true
const mapContent = document.getElementById('myMapZd')
const scaleWH = this.$store.state.basic.scale
mapContent.style.transform = `scale(${1 / scaleWH})`
scene.addImage(
'yuzhong',
require('@/assets/images/map/keyQy/yuzhong.png')
)
scene.addImage('yumiao', require('@/assets/images/map/keyQy/yumiao.png'))
scene.addImage(
'zhongzhi',
require('@/assets/images/map/keyQy/zhongzhi.png')
)
scene.addImage(
'jiagong',
require('@/assets/images/map/keyQy/jiagong.png')
)
scene.on('loaded', () => { scene.on('loaded', () => {
if (!type) { this.initPolygonLayer()
// this.initCircle()
this.initPolygonLayer(type)
} else if (type == 'unit') {
this.initDot(point)
// this.initPolygonLayer()
} else if (type == 'resource') {
this.initPolygonLayer(type)
} else if (type == 'szyf') {
this.initFlow(type)
}
})
// scene.on('click', (feature) => {
// // console.log(feature);
// })
},
initCircle () {
circleLayerSmall = new ImageLayer({})
// circleLayerSmall.source(
// 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/yifeng/2024-02-03/circle.png',
// {
circleLayerSmall.source(`${process.env.VUE_APP_MAP_IMG}/circle1.png`, {
parser: {
type: 'image',
extent: [121.0819, 35.8908, 119.2372, 37.2278]
}
})
scene.addLayer(circleLayerSmall)
const data = jdbandaoJson
//
polygonLayer = new PolygonLayer({
autoFit: true
})
.size(300)
.source(data)
.color('name', ['rgba(0, 127, 241, .5)'])
// .shape('extrude')
.shape('fill')
.style({
opacityLinear: {
enable: true, // true - false
dir: 'out' // in - out
},
opacity: 1,
heightfixed: true,
sourceColor: '#4ee8fc',
targetColor: '#00284e'
})
scene.addLayer(polygonLayer)
const that = this
// circleLayerSmall.on('click', (ev) => {
// //
// that.initRoadLayer()
// })
},
initRoadLayer () {
if (circleLayerSmall) {
scene.removeLayer(circleLayerSmall)
}
scene.setZoom(10)
roadLayer = new ImageLayer({})
// roadLayer.source(
// 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/yifeng/2024-02-03/road.png',
// {
roadLayer.source(`${process.env.VUE_APP_MAP_IMG}/road1.png`, {
parser: {
type: 'image',
extent: [119.7829, 36.7398, 120.5205, 36.2552]
}
})
scene.addLayer(roadLayer)
const that = this
// roadLayer.on('click', (ev) => {
// //
// that.initPolygonLayer()
// })
},
initFlow () {
if (circleLayerSmall) {
scene.removeLayer(circleLayerSmall)
}
if (roadLayer) {
scene.removeLayer(roadLayer)
}
if (polygonLayer) {
scene.removeLayer(polygonLayer)
}
scene.setZoom(15)
roadLayer = new ImageLayer({})
roadLayer.source('/images/map/flow.png', {
parser: {
type: 'image',
extent: [119.7829, 36.7398, 120.5205, 36.2552]
}
}) })
scene.addLayer(roadLayer)
}, },
initPolygonLayer (type) { initPolygonLayer () {
if (type == 'szyf') {
this.initFlow()
return
}
if (type == 'unit') {
return
}
scene.removeLayer(roadLayer)
scene.removeLayer(circleLayerSmall)
scene.removeLayer(polygonLayer) scene.removeLayer(polygonLayer)
scene.removeLayer(polygonLayer1)
scene.removeLayer(lineLayer) scene.removeLayer(lineLayer)
scene.removeLayer(dotTextLayer) this.removeDotLayers()
this.mapType = 'polygon' this.mapType = 'polygon'
const { darkStyle } = this const { darkStyle } = this
const styleConfig = darkStyle const styleConfig = darkStyle
@ -322,6 +234,7 @@ export default {
const data1 = jdbandaoJson const data1 = jdbandaoJson
// //
polygonLayer = new PolygonLayer({ polygonLayer = new PolygonLayer({
zIndex: 1,
autoFit: true autoFit: true
}) })
.source(data1) .source(data1)
@ -339,7 +252,8 @@ export default {
targetColor: '#00284e' targetColor: '#00284e'
}) })
scene.addLayer(polygonLayer) scene.addLayer(polygonLayer)
polygonLayer = new PolygonLayer({ polygonLayer1 = new PolygonLayer({
zIndex: 2,
autoFit: true autoFit: true
}) })
.size(1) .size(1)
@ -355,12 +269,8 @@ export default {
heightfixed: true, heightfixed: true,
sourceColor: '#3372d0', sourceColor: '#3372d0',
targetColor: '#00284e' targetColor: '#00284e'
// targetColor: '#4ee8fc'
})
scene.addLayer(polygonLayer)
polygonLayer.on('click', (e) => {
console.log('111')
}) })
scene.addLayer(polygonLayer1)
// //
lineLayer = new LineLayer({ lineLayer = new LineLayer({
zIndex: 2, zIndex: 2,
@ -379,146 +289,95 @@ export default {
trailLength: 2 // 线 trailLength: 2 // 线
}) })
scene.addLayer(lineLayer) scene.addLayer(lineLayer)
lineLayer.on('click', (e) => { polygonLayer1.on('click', (e) => {
console.log('222') console.log('222', e)
}) })
// lineLayer.on('mousemove', (e) => {
// console.log('e::', e)
// })
}, },
initDot (data, arr) { initDot (data, arr) {
scene.addImage( this.removeDotLayers()
'yuzhong',
require('@/assets/images/map/keyQy/yuzhong.png')
)
scene.addImage('yumiao', require('@/assets/images/map/keyQy/yumiao.png'))
scene.addImage(
'zhongzhi',
require('@/assets/images/map/keyQy/zhongzhi.png')
)
scene.addImage(
'jiagong',
require('@/assets/images/map/keyQy/jiagong.png')
)
// textOffset this.buttonIndex == 3 [10,60] [-30 60] // textOffset this.buttonIndex == 3 [10,60] [-30 60]
scene.removeLayer(dotLayer)
scene.removeLayer(dotLayer1)
scene.removeLayer(dotLayer2)
scene.removeLayer(dotLayer3)
// dotTextLayer = new PointLayer({
// zIndex: 21000000000
// })
// .source(data[''])
// .shape('name', 'text')
// .color('#000')
// .size(11)
// .style({
// strokeWidth: 1,
// strokeOpacity: 0.1,
// fontWeight: '500',
// stroke: '#fff',
// textOffset: [20, 0],
// raisingHeight: 300,
// heightfixed: true,
// textAnchor: 'left'
// })
// scene.addLayer(dotTextLayer)
const images = { const images = {
育种企业: 'yuzhong', 育种企业: 'yuzhong',
育苗企业: 'yumiao', 育苗企业: 'yumiao',
种植企业: 'zhongzhi', 种植企业: 'zhongzhi',
加工企业: 'jiagong' 加工企业: 'jiagong'
} }
const gaoliang = [
'瑞克斯旺(中国)农业科技有限公司',
'青岛德龙种子有限公司',
'青岛世农种苗有限公司',
'山东汉研种业科技有限公司',
'青岛润之禾农业科技有限公司',
'青岛诚一果蔬现代农业专业合作社',
'青岛龙之园绿色食品有限公司'
]
if (arr.some((item) => item === '育种企业')) { if (arr.some((item) => item === '育种企业')) {
dotLayer = new PointLayer({ dotLayer = new PointLayer({ zIndex: 30 })
zIndex: 20000000
})
.source(data['育种企业']) .source(data['育种企业'])
.shape(images['育种企业']) .shape(images['育种企业'])
.size(10) .size('name', (val) => {
.style({ if (gaoliang.some((item) => item === val)) {
layerType: 'fillImage', return 12
heightfixed: true }
return 10
}) })
scene.addLayer(dotLayer) scene.addLayer(dotLayer)
// dotTextLayer = new PointLayer({
// zIndex: 2000000021
// })
// .source(data[''])
// .shape('name', 'text')
// .color('#000')
// .size(11)
// .style({
// strokeWidth: 1,
// strokeOpacity: 0.1,
// fontWeight: '500',
// stroke: '#fff',
// textOffset: [10, 0],
// raisingHeight: 300,
// heightfixed: true,
// textAnchor: 'center-left'
// })
// scene.addLayer(dotTextLayer)
// dotTextLayer.on('click', (e) => {
// console.log('eee1111')
// })
dotLayer.on('click', (e) => {
console.log('eee')
that.set_qyjj(true)
})
} }
if (arr.some((item) => item === '育苗企业')) { if (arr.some((item) => item === '育苗企业')) {
dotLayer1 = new PointLayer({ dotLayer1 = new PointLayer({ zIndex: 30 })
zIndex: 20000000
})
.source(data['育苗企业']) .source(data['育苗企业'])
.shape(images['育苗企业']) .shape(images['育苗企业'])
.size(10) .size('name', (val) => {
.style({ if (gaoliang.some((item) => item === val)) {
layerType: 'fillImage', return 12
heightfixed: true }
return 10
}) })
scene.addLayer(dotLayer1) scene.addLayer(dotLayer1)
} }
if (arr.some((item) => item === '种植企业')) { if (arr.some((item) => item === '种植企业')) {
dotLayer2 = new PointLayer({ dotLayer2 = new PointLayer({ zIndex: 30 })
zIndex: 20000000
})
.source(data['种植企业']) .source(data['种植企业'])
.shape(images['种植企业']) .shape(images['种植企业'])
.size(10) .size('name', (val) => {
.style({ if (gaoliang.some((item) => item === val)) {
layerType: 'fillImage', return 12
heightfixed: true }
return 10
}) })
scene.addLayer(dotLayer2) scene.addLayer(dotLayer2)
} }
if (arr.some((item) => item === '加工企业')) { if (arr.some((item) => item === '加工企业')) {
dotLayer3 = new PointLayer({ dotLayer3 = new PointLayer({ zIndex: 30 })
zIndex: 20000000
})
.source(data['加工企业']) .source(data['加工企业'])
.shape(images['加工企业']) .shape(images['加工企业'])
.size(10) .size('name', (val) => {
.style({ if (gaoliang.some((item) => item === val)) {
layerType: 'fillImage', return 12
heightfixed: true }
return 10
}) })
scene.addLayer(dotLayer3) scene.addLayer(dotLayer3)
} }
const that = this dotLayer.on('click', (e) => {
if (gaoliang.some((item) => item === e.feature.properties.name)) {
this.openCompanyDetail(e.feature.properties)
}
})
dotLayer1.on('click', (e) => { dotLayer1.on('click', (e) => {
console.log('eee1') if (gaoliang.some((item) => item === e.feature.properties.name)) {
that.set_qyjj(true) this.openCompanyDetail(e.feature.properties)
}
}) })
dotLayer2.on('click', (e) => { dotLayer2.on('click', (e) => {
console.log('eee2') if (gaoliang.some((item) => item === e.feature.properties.name)) {
that.set_qyjj(true) this.openCompanyDetail(e.feature.properties)
}
}) })
dotLayer3.on('click', (e) => { dotLayer3.on('click', (e) => {
console.log('eee3') if (gaoliang.some((item) => item === e.feature.properties.name)) {
that.set_qyjj(true) this.openCompanyDetail(e.feature.properties)
}
}) })
} }
}, },
@ -531,24 +390,34 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.map-header { .next1 {
box-sizing: border-box;
position: absolute; position: absolute;
top: 100px;
left: 50%; left: 50%;
transform: translate(-50%); top: 50%;
transition: 0.2s;
transform-origin: 0 0;
overflow: hidden;
z-index: 99;
}
.map-header {
position: absolute;
top: 200px;
left: 45%;
transform: scale(0.7) translate(-50%);
width: 745px; width: 745px;
height: 58px; height: 58px;
z-index: 10; z-index: 99;
} }
.map-legeng { .map-legeng {
position: absolute; position: absolute;
top: 686px; top: 550px;
left: 554px; left: 654px;
transform: translate(-50%); transform: scale(0.7) translate(-50%);
width: 140px; width: 140px;
height: 260px; height: 260px;
z-index: 10; z-index: 99;
} }
.bg_img { .bg_img {
@ -698,8 +567,12 @@ export default {
} }
} }
#myMap { #myMapZd {
position: absolute;
top: 0;
left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
// z-index: 100000000000000000000000000000;
} }
</style> </style>

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

@ -16,8 +16,7 @@ import szyfMap from './cpt/szyf-map.vue'
export default { export default {
name: 'screen-content-map', name: 'screen-content-map',
data () { data () {
return { return {}
}
}, },
computed: { computed: {
...mapGetters(['scale', 'navId']), ...mapGetters(['scale', 'navId']),
@ -48,13 +47,9 @@ export default {
} }
} }
}, },
created () { created () {},
mounted () {},
}, beforeDestroy () {},
mounted () {
},
beforeDestroy () {
},
methods: { methods: {
...mapActions({ ...mapActions({
set_mapLevel: 'SET_MAPLEVEL', set_mapLevel: 'SET_MAPLEVEL',

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

@ -365,7 +365,8 @@ export default {
padding-left: 3px; padding-left: 3px;
box-sizing: border-box; box-sizing: border-box;
width: 217px; width: 217px;
height: 98px; height: 92px;
line-height: 22px;
/* 显示的行数 */ /* 显示的行数 */
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 4; /* 最多显示4行 */ -webkit-line-clamp: 4; /* 最多显示4行 */

Loading…
Cancel
Save