master
zhy521521 12 months ago
parent e086324de0
commit fc69c95f9b

81
package-lock.json generated

@ -1902,17 +1902,6 @@
"webpack-merge": "^4.2.2"
},
"dependencies": {
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"copy-webpack-plugin": {
"version": "5.1.2",
"resolved": "https://registry.npmmirror.com/copy-webpack-plugin/-/copy-webpack-plugin-5.1.2.tgz",
@ -2003,32 +1992,6 @@
"requires": {
"minipass": "^3.1.1"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"loader-utils": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
}
}
}
}
},
@ -11545,6 +11508,50 @@
"vue-style-loader": "^4.1.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"hash-sum": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-2.0.0.tgz",
"integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.4",
"resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
}
}
},
"vue-router": {
"version": "3.6.5",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz",

@ -52,8 +52,10 @@ const user = {
return new Promise((resolve, reject) => {
getInfo().then(res => {
const user = res.user
const roles = res.roles
const avatar = (user.avatar == "" || user.avatar == null) ? '' : process.env.VUE_APP_BASE_API + user.avatar;
localStorage.setItem('user',Object.keys(user).length && JSON.stringify(user))
localStorage.setItem('roles',roles.length && JSON.stringify(roles))
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
commit('SET_ROLES', res.roles)
commit('SET_PERMISSIONS', res.permissions)

@ -23,46 +23,57 @@ let cityList = [
{
name: "阳泉市",
data: require("../../public/static/jsonArea/阳泉市.json"),
code: 140300,
},
{
name: "大同市",
data: require("../../public/static/jsonArea/大同市.json"),
code: 140200,
},
{
name: "朔州市",
data: require("../../public/static/jsonArea/朔州市.json"),
code: 140600,
},
{
name: "忻州市",
data: require("../../public/static/jsonArea/忻州市.json"),
code: 140900,
},
{
name: "太原市",
data: require("../../public/static/jsonArea/太原市.json"),
code: 140100,
},
{
name: "吕梁市",
data: require("../../public/static/jsonArea/吕梁市.json"),
code: 141100,
},
{
name: "晋中市",
data: require("../../public/static/jsonArea/晋中市.json"),
code: 140700,
},
{
name: "长治市",
data: require("../../public/static/jsonArea/长治市.json"),
code: 140400,
},
{
name: "临汾市",
data: require("../../public/static/jsonArea/临汾市.json"),
code: 141000,
},
{
name: "晋城市",
data: require("../../public/static/jsonArea/晋城市.json"),
code: 140500,
},
{
name: "运城市",
data: require("../../public/static/jsonArea/运城市.json"),
code: 140800,
},
// 内蒙古自治区
{
@ -88,6 +99,7 @@ let cityList = [
{
name: "上海市",
code: 310000,
data: require("../../public/static/json/shanghai.json"),
},
{
@ -97,6 +109,8 @@ let cityList = [
},
{
name: "浙江省",
code: 330000,
data: require("../../public/static/json/zhejiang.json"),
},

@ -4,10 +4,10 @@
<div class="fx-wrap">
<template v-if="fxList.length">
<data class="item" :class="{ marginTop: item.id != 0 }" v-for="item in fxList " :key="item.id">
<div class="left"
<!-- <div class="left"
:class="{ img1: item.id == 1, img2: item.id == 2, img3: item.id == 3, img4: item.id == 4 }">
<span>{{ 'Top' + item.id }}</span>
</div>
</div> -->
<div class="right">
<div class="label">{{ item.estateName }}</div>
<div class="percentage"
@ -92,7 +92,7 @@ export default {
}
.right {
width: 80%;
width: 100%;
.label {
width: 50%;

@ -30,6 +30,7 @@
</div>
</div>
</template>
<script>
import nationWide from '../../utils/nationWide.js';
import baseNew from './components/base'
@ -141,7 +142,7 @@ export default {
show: true,
textStyle: {
color: "#fff",
fontSize:10,
fontSize: 10,
},
},
//
@ -245,35 +246,49 @@ export default {
};
// option.geo.map
this.$echarts.registerMap('china', nationWide.china);
console.log('区域编码',JSON.parse(localStorage.getItem('user')).areaAuthCode.slice(0, 6))
this.mapChart.setOption(this.mapOption);
nationWide.cityList.map(value => {
if (value.code == JSON.parse(localStorage.getItem('user')).areaAuthCode.slice(0, 6)) {
console.log(111,value.code)
this.mapChart.clear();
this.mapOption.geo[0].map = 'Pmap';
this.mapOption.geo[1].map = 'Pmap';
this.$echarts.registerMap('Pmap', value.data)
this.mapChart.setOption(this.mapOption);
this.isreturn = true;
}
});
//
this.mapChart.on('click', params => {
console.log(params)
//
let provinceName = params.name
//
this.dataList.map(item => {
if (item.name == provinceName) {
this.mapOption.series[0].data = [item];
}
})
//
nationWide.cityList.map(value => {
if (value.name.indexOf(provinceName) !== -1) {
this.mapChart.clear();
this.mapOption.geo[0].map = 'Pmap';
this.mapOption.geo[1].map = 'Pmap';
this.$echarts.registerMap('Pmap', value.data)
this.mapChart.setOption(this.mapOption);
this.isreturn = true;
}
});
})
// this.mapChart.on('click', params => {
// console.log(params)
// //
// let provinceName = params.name
// //
// this.dataList.map(item => {
// if (item.name == provinceName) {
// this.mapOption.series[0].data = [item];
// }
// })
// //
// nationWide.cityList.map(value => {
// if (value.name.indexOf(provinceName) !== -1) {
// this.mapChart.clear();
// this.mapOption.geo[0].map = 'Pmap';
// this.mapOption.geo[1].map = 'Pmap';
// this.$echarts.registerMap('Pmap', value.data)
// this.mapChart.setOption(this.mapOption);
// this.isreturn = true;
// }
// });
// })
},
}
}
</script>
<style lang="less" scoped>
.cygh-wrap {
height: 100%;

@ -10,9 +10,9 @@
<div class="menu">
<div class="title">让农产品进入功能时代</div>
<div class="leftMenu">
<div class="leftItem" v-for="item in menuLeftList " :key="item.index" :class="{ left: item.index != 1 }"
@click="hendleMenu(item.index, item.router)" @mouseover="mouseover(item.index)"
@mouseleave="mouseleave">
<div class="leftItem" v-for="item in menuLeftList " :key="item.index"
:class="{ left: item.index != 1 }" @click="hendleMenu(item.index, item.router)"
@mouseover="mouseover(item.index)" @mouseleave="mouseleave">
<img :src="menuActive == item.index ? item.mwnusrcHover : item.mwnusrc" alt=""
style="width: 100%;height: 100%;">
<span :style="menuActive == item.index ? 'color:#FBC923' : 'color:#fff'">
@ -38,15 +38,19 @@
<template v-if="activeIndex == 0">
<vedio :content="topmenuList[0]" />
</template>
<template v-if="activeIndex == 1">
<three :content="topmenuList[1]" />
</template>
<template v-if="activeIndex == 2">
<jufalj :content="topmenuList[2]" />
</template>
<template v-if="activeIndex == 3">
<cdsjd :content="topmenuList[3]" />
</template>
<template v-if="activeIndex == 4">
<yyqh :content="topmenuList[4]" />
</template>
@ -56,6 +60,7 @@
</div>
</div>
</template>
<script>
const mwnusrc = require("../../../public/images/menuleft.png");
const mwnusrcHover = require("../../../public/images/menuleft-active.png");
@ -122,7 +127,7 @@ export default {
router: 'cygh'
},
{
title: "资源概况",
title: "态势分析",
mwnusrc,
mwnusrcHover,
index: 1,
@ -234,17 +239,24 @@ export default {
this.menuActive = 100
},
hendleMenu(index, router) {
//
console.log(JSON.parse(localStorage.getItem('roles'))[0] == 'admin')
if (index == 5) {
window.open('http://121.41.91.94:12527/')
return
if (JSON.parse(localStorage.getItem('roles'))[0] == 'admin') {
window.open('http://121.41.91.94:12527/')
}
} else {
this.menuActive = index
this.$router.push({ name: router })
}
this.menuActive = index
this.$router.push({ name: router })
},
}
};
</script>
<style lang="less" scoped>
.home-wrap {
height: 100%;
@ -253,6 +265,7 @@ export default {
font-family: YouSheBiaoTiHei;
color: #FFFFFF;
background-color: rgb(5, 13, 20);
.vedio {
position: absolute;
width: 100vw;

@ -5,6 +5,74 @@
:class="{ checkItem1: item.id == 1, checkItem2: item.id == 2, checkColor: item.id == checkIndex }">{{
item.name }}</div>
</div>
<div class="space" :style="checkIndex == 1 ? 'display:none' : ''">
<div class="space-content">
<div class="title">示范平台</div>
<el-checkbox-group v-model="checkValueList">
<el-row>
<el-col>
<div class="item">
<el-checkbox label="中国引领的功能农业科技创新网络"></el-checkbox>
</div>
</el-col>
<el-col>
<div class="item">
<el-checkbox label="功能农业产业研究院建设"></el-checkbox>
</div>
</el-col>
<el-col>
<div class="item">
<el-checkbox label="功能农业科普展示馆"></el-checkbox>
</div>
</el-col>
</el-row>
</el-checkbox-group>
</div>
<div class="space-content">
<div class="title">典型地区</div>
<el-checkbox-group v-model="checkValueList1">
<el-row>
<el-col>
<div class="item">
<el-checkbox label="典型样板介绍"></el-checkbox>
</div>
</el-col>
<el-col>
<div class="item">
<el-checkbox label="'硒资源变硒产业'先进地区案例分析"></el-checkbox>
</div>
</el-col>
</el-row>
</el-checkbox-group>
</div>
<div class="space-content">
<div class="title">天然富硒土地</div>
<el-checkbox-group v-model="checkValueList2">
<el-row>
<el-col>
<div class="item">
<el-checkbox label="第一批"></el-checkbox>
</div>
</el-col>
<el-col>
<div class="item">
<el-checkbox label="第二批"></el-checkbox>
</div>
</el-col>
<el-col>
<div class="item">
<el-checkbox label="第三批"></el-checkbox>
</div>
</el-col>
</el-row>
</el-checkbox-group>
</div>
</div>
<!-- 返回全国 -->
<!-- <img @click="rebackMap" v-show="isreturn" src="../../../../public/images/fast.png" alt="" style="z-index:999;
position: absolute;
@ -12,40 +80,42 @@
top: 15px;"> -->
<div id="mapWorld"></div>
<div id="map"></div>
<template v-if="checkIndex == 1">
<div class="leftInfo-wrap">
<div class="lilun">
<div class="left">理论基础</div>
<div class="right">
<div class="item" :class="{ bgItem: item.id == active }" @click="handleCountry(item.id)"
v-for="item in countoyList" :key="item.id">{{ item.country }}</div>
<template>
<template v-if="checkIndex == 1">
<div class="leftInfo-wrap">
<div class="lilun">
<div class="left">理论基础</div>
<div class="right">
<div class="item" :class="{ bgItem: item.id == active }" @click="handleCountry(item.id)"
v-for="item in countoyList" :key="item.id">{{ item.country }}</div>
</div>
</div>
<fwqs ref="fwqs" :range="range" />
<fwyj ref="fwyj" :range="range" />
<fwfb ref="fwfb" :range="range" />
<zxfb ref="zxfb" :range="range" />
</div>
<fwqs ref="fwqs" :range="range" />
<fwyj ref="fwyj" :range="range" />
<fwfb ref="fwfb" :range="range" />
<zxfb ref="zxfb" :range="range" />
</div>
<div class="rightInfo-wrap">
<div class="yanjiu">
<div class="left">研究态势</div>
<zlnd ref="zlnd" :range="range" />
<zlyjfb ref="zlyjfb" :range="range" />
<zlsource ref="zlsource" :range="range" />
<smzq ref="smzq" :range="range" />
<div class="rightInfo-wrap">
<div class="yanjiu">
<div class="left">研究态势</div>
<zlnd ref="zlnd" :range="range" />
<zlyjfb ref="zlyjfb" :range="range" />
<zlsource ref="zlsource" :range="range" />
<smzq ref="smzq" :range="range" />
</div>
</div>
</div>
</template>
</template>
<template v-else>
<div class="rightInfo-wrap">
<sfpttj />
<dxdqtj />
<dsj />
</div>
<template v-else>
<div class="rightInfo-wrap">
<sfpttj />
<dxdqtj />
<dsj />
</div>
</template>
</template>
</div>
</template>
@ -1360,6 +1430,9 @@ export default {
accountNum: "0",
},
],
checkValueList: [],
checkValueList1: [],
checkValueList2: []
}
},
created() {
@ -1386,7 +1459,7 @@ export default {
this.checkIndex = id
if (id == 1) {
this.initEcharts()
}else{
} else {
this.$nextTick(() => {
this.$echarts.dispose(this.$echarts.init(document.getElementById('mapWorld')))
this.getMap()
@ -1459,7 +1532,7 @@ export default {
},
map: 'china',
roam: false,//
aspectScale: 0.6,//
aspectScale: 0.7,//
scaleLimit: {
min: 1,
max: 5
@ -1706,7 +1779,6 @@ export default {
overflow: hidden;
.check {
width: 920px;
height: 10.8695vh;
position: absolute;
@ -1752,6 +1824,39 @@ export default {
}
}
.space {
position: absolute;
width: 250px;
left: 100px;
top: 100px;
z-index: 1800;
box-sizing: border-box;
.space-content {
background-image: url('../../../public/images/dialog.png');
background-size: 100% 100%;
margin-top: 3vh;
padding-left: 10px;
.title {
color: rgb(0, 231, 140);
border-bottom: .5px solid rgb(0, 231, 140);
padding: 4px 0;
}
.item {
height: 3.378vh;
line-height: 3.378vh;
// color: #00D8FF;
}
}
/deep/ .el-checkbox {
color: rgb(255, 255, 255);
}
}
#map,
#mapWorld {
width: 100%;

Loading…
Cancel
Save