update1.6
This commit is contained in:
@@ -11,7 +11,13 @@ $colors: (
|
|||||||
"dark": #222222,
|
"dark": #222222,
|
||||||
"black-1": #333333,
|
"black-1": #333333,
|
||||||
"black": #000000,
|
"black": #000000,
|
||||||
"icon": #1976d2
|
"icon": #1976d2,
|
||||||
|
// 新增浅色主题专用颜色
|
||||||
|
"bg-light": #fafbfc,
|
||||||
|
"bg-lighter": #ffffff,
|
||||||
|
"border-light": #e4e7ed,
|
||||||
|
"text-secondary": #606266,
|
||||||
|
"text-regular": #909399
|
||||||
);
|
);
|
||||||
|
|
||||||
// 字体大小
|
// 字体大小
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 16px 16px 10px 16px;
|
padding: 16px 16px 10px 16px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #f5f7fa;
|
background-color: #fafbfc;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
letter-spacing: 6px;
|
letter-spacing: 6px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: linear-gradient(92deg, #2c5aa0 0%, #1e88e5 48.8525390625%, #1976d2 100%);
|
background: linear-gradient(92deg, #1976d2 0%, #2196f3 48.8525390625%, #42a5f5 100%);
|
||||||
-webkit-background-clip: text;
|
-webkit-background-clip: text;
|
||||||
-webkit-text-fill-color: transparent;
|
-webkit-text-fill-color: transparent;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,10 @@
|
|||||||
<div class="centermap">
|
<div class="centermap">
|
||||||
<div class="maptitle">
|
<div class="maptitle">
|
||||||
<div class="zuo"></div>
|
<div class="zuo"></div>
|
||||||
<span class="titletextBefore">今年累计碳减排<span class="titletext">{{ maptitle }}</span>{{ maptitle2 }}</span>
|
<span class="titletextBefore"
|
||||||
|
>今年累计碳减排<span class="titletext">{{ maptitle }}</span
|
||||||
|
>{{ maptitle2 }}</span
|
||||||
|
>
|
||||||
<div class="you"></div>
|
<div class="you"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mapwrap">
|
<div class="mapwrap">
|
||||||
@@ -21,10 +24,18 @@
|
|||||||
车辆实况
|
车辆实况
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="quanguo2" @click="changeShow1()" :style="{ backgroundColor: currentBgColor2 }">
|
<div
|
||||||
|
class="quanguo2"
|
||||||
|
@click="changeShow1()"
|
||||||
|
:style="{ backgroundColor: currentBgColor2 }"
|
||||||
|
>
|
||||||
<div>车辆信息</div>
|
<div>车辆信息</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="quanguo3" @click="changeShow2()" :style="{ backgroundColor: currentBgColor3 }">
|
<div
|
||||||
|
class="quanguo3"
|
||||||
|
@click="changeShow2()"
|
||||||
|
:style="{ backgroundColor: currentBgColor3 }"
|
||||||
|
>
|
||||||
<div>加氢站</div>
|
<div>加氢站</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -45,17 +56,16 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
maptitle: "2536238",
|
maptitle: "2536238",
|
||||||
maptitle2:'',
|
maptitle2: "",
|
||||||
options: {},
|
options: {},
|
||||||
code: "china", //china 代表中国 其他地市是行政编码
|
code: "china", //china 代表中国 其他地市是行政编码
|
||||||
//code:"440000",
|
//code:"440000",
|
||||||
echartBindClick: false,
|
echartBindClick: false,
|
||||||
isSouthChinaSea: false, //是否要展示南海群岛 修改此值请刷新页面
|
isSouthChinaSea: false, //是否要展示南海群岛 修改此值请刷新页面
|
||||||
currentMap : 'china', // 当前显示的地图层级
|
currentMap: "china", // 当前显示的地图层级
|
||||||
showType: 1, //显示内容类型: 1车辆信息,2加氢站信息
|
showType: 1, //显示内容类型: 1车辆信息,2加氢站信息
|
||||||
currentBgColor2:'',
|
currentBgColor2: "",
|
||||||
currentBgColor3:'',
|
currentBgColor3: "",
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
@@ -65,44 +75,46 @@ export default {
|
|||||||
this.getYearData();
|
this.getYearData();
|
||||||
|
|
||||||
this.showType = 1;
|
this.showType = 1;
|
||||||
this.currentBgColor2 = '#1976d2';
|
this.currentBgColor2 = "#1976d2";
|
||||||
this.getData("china");
|
this.getData("china");
|
||||||
//this.getData("440000");
|
//this.getData("440000");
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeShow1() {
|
changeShow1() {
|
||||||
this.showType = 1;
|
this.showType = 1;
|
||||||
this.currentBgColor2 = '#1976d2';
|
this.currentBgColor2 = "#1976d2";
|
||||||
this.currentBgColor3 = '';
|
this.currentBgColor3 = "";
|
||||||
this.getData(this.code);
|
this.getData(this.code);
|
||||||
},
|
},
|
||||||
changeShow2() {
|
changeShow2() {
|
||||||
this.currentBgColor2 = '';
|
this.currentBgColor2 = "";
|
||||||
this.currentBgColor3 = '#1976d2';
|
this.currentBgColor3 = "#1976d2";
|
||||||
this.showType = 2;
|
this.showType = 2;
|
||||||
this.getData(this.code);
|
this.getData(this.code);
|
||||||
},
|
},
|
||||||
goToPage() {
|
goToPage() {
|
||||||
//window.open("http://localhost:9528/vehicle-management/vehicle-state?"+this.code, "_blank");
|
//window.open("http://localhost:9528/vehicle-management/vehicle-state?"+this.code, "_blank");
|
||||||
|
|
||||||
window.open("http://47.100.49.118:8090/vehicle-lnSituation?"+this.code, "_blank");
|
window.open(
|
||||||
|
"http://47.100.49.118:8090/vehicle-lnSituation?" + this.code,
|
||||||
|
"_blank"
|
||||||
|
);
|
||||||
//window.open("http://127.0.0.1:9528/vehicle-lnSituation?"+this.code, "_blank");
|
//window.open("http://127.0.0.1:9528/vehicle-lnSituation?"+this.code, "_blank");
|
||||||
//window.open("http://192.168.0.219:9528/vehicle-lnSituation?"+this.code, "_blank");
|
//window.open("http://192.168.0.219:9528/vehicle-lnSituation?"+this.code, "_blank");
|
||||||
},
|
},
|
||||||
parseAdcodeLevel(adcode) {
|
parseAdcodeLevel(adcode) {
|
||||||
const codeStr = String(adcode);
|
const codeStr = String(adcode);
|
||||||
if (codeStr.endsWith('0000')) return 'province'; // 省级(如 440000)
|
if (codeStr.endsWith("0000")) return "province"; // 省级(如 440000)
|
||||||
if (codeStr.endsWith('00')) return 'city'; // 市级(如 440300)
|
if (codeStr.endsWith("00")) return "city"; // 市级(如 440300)
|
||||||
return 'district'; // 区县级(如 440305)
|
return "district"; // 区县级(如 440305)
|
||||||
},
|
},
|
||||||
getYearData() {
|
getYearData() {
|
||||||
currentGET("big3").then((res) => {
|
currentGET("big3").then((res) => {
|
||||||
console.log('年度碳减排量');
|
console.log("年度碳减排量");
|
||||||
console.log(res);
|
console.log(res);
|
||||||
//this.maptitle = res.data.yearCarbon ; //单位kg
|
//this.maptitle = res.data.yearCarbon ; //单位kg
|
||||||
this.maptitle = res.data.yearCarbonTon; //单位吨
|
this.maptitle = res.data.yearCarbonTon; //单位吨
|
||||||
this.maptitle2 = '吨';
|
this.maptitle2 = "吨";
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getData(code) {
|
getData(code) {
|
||||||
@@ -110,25 +122,35 @@ export default {
|
|||||||
this.currentMap = this.parseAdcodeLevel(code);
|
this.currentMap = this.parseAdcodeLevel(code);
|
||||||
//2025.9.10 szy 增加showType 分类处理,1时处理车辆信息,2时处理加氢站信息
|
//2025.9.10 szy 增加showType 分类处理,1时处理车辆信息,2时处理加氢站信息
|
||||||
if (this.showType === 1) {
|
if (this.showType === 1) {
|
||||||
currentGET("big9", { regionCode: code, adcodeLevel: this.currentMap }).then((res) => {
|
currentGET("big9", {
|
||||||
|
regionCode: code,
|
||||||
|
adcodeLevel: this.currentMap,
|
||||||
|
}).then((res) => {
|
||||||
console.log("map车辆分布", res);
|
console.log("map车辆分布", res);
|
||||||
//if (res.success)
|
//if (res.success)
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
this.getGeojson(res.data.regionCode, res.data.dataList);
|
this.getGeojson(res.data.regionCode, res.data.dataList);
|
||||||
this.mapclick();
|
this.mapclick();
|
||||||
} else {
|
} else {
|
||||||
this.$Message.warning(res.msg);
|
this.$Message.warning(
|
||||||
|
"获取车辆信息失败:" + (res.msg || "未知错误")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (this.showType === 2) {
|
} else if (this.showType === 2) {
|
||||||
currentGET("big10", { regionCode: code, adcodeLevel: this.currentMap }).then((res) => {
|
currentGET("big10", {
|
||||||
|
regionCode: code,
|
||||||
|
adcodeLevel: this.currentMap,
|
||||||
|
}).then((res) => {
|
||||||
console.log("加氢站_map分布", res);
|
console.log("加氢站_map分布", res);
|
||||||
//if (res.success)
|
//if (res.success)
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
this.getGeojson2(res.data.regionCode, res.data.dataList);
|
this.getGeojson2(res.data.regionCode, res.data.dataList);
|
||||||
this.mapclick();
|
this.mapclick();
|
||||||
} else {
|
} else {
|
||||||
this.$Message.warning(res.msg);
|
this.$Message.warning(
|
||||||
|
"获取加氢站信息失败:" + (res.msg || "未知错误")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -142,27 +164,26 @@ export default {
|
|||||||
async getGeojson(name, mydata) {
|
async getGeojson(name, mydata) {
|
||||||
this.code = name;
|
this.code = name;
|
||||||
this.currentMap = name;
|
this.currentMap = name;
|
||||||
console.log('当前地图层级');
|
console.log("当前地图层级");
|
||||||
console.log(this.currentMap);
|
console.log(this.currentMap);
|
||||||
//如果要展示南海群岛并且展示的是中国的话
|
//如果要展示南海群岛并且展示的是中国的话
|
||||||
let geoname=name
|
let geoname = name;
|
||||||
if (this.isSouthChinaSea && name == "china") {
|
if (this.isSouthChinaSea && name == "china") {
|
||||||
geoname = "chinaNanhai";
|
geoname = "chinaNanhai";
|
||||||
}
|
}
|
||||||
//如果有注册地图的话就不用再注册 了
|
//如果有注册地图的话就不用再注册 了
|
||||||
let mapjson = echarts.getMap(name);
|
let mapjson = echarts.getMap(name);
|
||||||
console.log('已经是否已存在的地图数据');
|
console.log("已经是否已存在的地图数据");
|
||||||
if (mapjson) {
|
if (mapjson) {
|
||||||
mapjson = mapjson.geoJson;
|
mapjson = mapjson.geoJson;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
//console.log('当前未注册地图');
|
//console.log('当前未注册地图');
|
||||||
mapjson = await GETNOBASE(`./map-geojson/${geoname}.json`).then((res) => {
|
mapjson = await GETNOBASE(`./map-geojson/${geoname}.json`).then(
|
||||||
|
(res) => {
|
||||||
return res;
|
return res;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
echarts.registerMap(name, mapjson);
|
echarts.registerMap(name, mapjson);
|
||||||
|
|
||||||
}
|
}
|
||||||
console.log(mapjson);
|
console.log(mapjson);
|
||||||
let cityCenter = {};
|
let cityCenter = {};
|
||||||
@@ -178,7 +199,6 @@ export default {
|
|||||||
if (cityCenter[item.name]) {
|
if (cityCenter[item.name]) {
|
||||||
if (item.vehicleTotal === undefined || item.vehicleTotal === null) {
|
if (item.vehicleTotal === undefined || item.vehicleTotal === null) {
|
||||||
item.vehicleTotal = 0;
|
item.vehicleTotal = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (item.onLineCount === undefined || item.onLineCount === null) {
|
if (item.onLineCount === undefined || item.onLineCount === null) {
|
||||||
item.onLineCount = 0;
|
item.onLineCount = 0;
|
||||||
@@ -194,11 +214,16 @@ export default {
|
|||||||
}
|
}
|
||||||
newData.push({
|
newData.push({
|
||||||
name: item.name,
|
name: item.name,
|
||||||
value: cityCenter[item.name].concat(item.vehicleTotal).concat(item.onLineCount).concat(item.dayMileage).concat(item.dayHydrogen).concat(item.dayCarbon),
|
value: cityCenter[item.name]
|
||||||
|
.concat(item.vehicleTotal)
|
||||||
|
.concat(item.onLineCount)
|
||||||
|
.concat(item.dayMileage)
|
||||||
|
.concat(item.dayHydrogen)
|
||||||
|
.concat(item.dayCarbon),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log('开始初始化地图');
|
console.log("开始初始化地图");
|
||||||
console.log(newData);
|
console.log(newData);
|
||||||
this.init(name, mydata, newData);
|
this.init(name, mydata, newData);
|
||||||
},
|
},
|
||||||
@@ -211,27 +236,26 @@ export default {
|
|||||||
async getGeojson2(name, mydata) {
|
async getGeojson2(name, mydata) {
|
||||||
this.code = name;
|
this.code = name;
|
||||||
this.currentMap = name;
|
this.currentMap = name;
|
||||||
console.log('加氢站_当前地图层级');
|
console.log("加氢站_当前地图层级");
|
||||||
console.log(this.currentMap);
|
console.log(this.currentMap);
|
||||||
//如果要展示南海群岛并且展示的是中国的话
|
//如果要展示南海群岛并且展示的是中国的话
|
||||||
let geoname=name
|
let geoname = name;
|
||||||
if (this.isSouthChinaSea && name == "china") {
|
if (this.isSouthChinaSea && name == "china") {
|
||||||
geoname = "chinaNanhai";
|
geoname = "chinaNanhai";
|
||||||
}
|
}
|
||||||
//如果有注册地图的话就不用再注册 了
|
//如果有注册地图的话就不用再注册 了
|
||||||
let mapjson = echarts.getMap(name);
|
let mapjson = echarts.getMap(name);
|
||||||
console.log('加氢站_已经是否已存在的地图数据');
|
console.log("加氢站_已经是否已存在的地图数据");
|
||||||
if (mapjson) {
|
if (mapjson) {
|
||||||
mapjson = mapjson.geoJson;
|
mapjson = mapjson.geoJson;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
//console.log('当前未注册地图');
|
//console.log('当前未注册地图');
|
||||||
mapjson = await GETNOBASE(`./map-geojson/${geoname}.json`).then((res) => {
|
mapjson = await GETNOBASE(`./map-geojson/${geoname}.json`).then(
|
||||||
|
(res) => {
|
||||||
return res;
|
return res;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
echarts.registerMap(name, mapjson);
|
echarts.registerMap(name, mapjson);
|
||||||
|
|
||||||
}
|
}
|
||||||
console.log(mapjson);
|
console.log(mapjson);
|
||||||
let cityCenter = {};
|
let cityCenter = {};
|
||||||
@@ -245,20 +269,24 @@ export default {
|
|||||||
let newData = [];
|
let newData = [];
|
||||||
mydata.map((item) => {
|
mydata.map((item) => {
|
||||||
if (cityCenter[item.name]) {
|
if (cityCenter[item.name]) {
|
||||||
if(item.siteTotalCount===undefined || item.siteTotalCount===null ){
|
if (
|
||||||
|
item.siteTotalCount === undefined ||
|
||||||
|
item.siteTotalCount === null
|
||||||
|
) {
|
||||||
item.siteTotalCount = 0;
|
item.siteTotalCount = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (item.siteCount === undefined || item.siteCount === null) {
|
if (item.siteCount === undefined || item.siteCount === null) {
|
||||||
item.siteCount = 0;
|
item.siteCount = 0;
|
||||||
}
|
}
|
||||||
newData.push({
|
newData.push({
|
||||||
name: item.name,
|
name: item.name,
|
||||||
value: cityCenter[item.name].concat(item.siteTotalCount).concat(item.siteCount),
|
value: cityCenter[item.name]
|
||||||
|
.concat(item.siteTotalCount)
|
||||||
|
.concat(item.siteCount),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log('加氢站_开始初始化地图');
|
console.log("加氢站_开始初始化地图");
|
||||||
console.log(newData);
|
console.log(newData);
|
||||||
this.init2(name, mydata, newData);
|
this.init2(name, mydata, newData);
|
||||||
},
|
},
|
||||||
@@ -334,6 +362,7 @@ export default {
|
|||||||
zoom: zoom,
|
zoom: zoom,
|
||||||
geoIndex: 1,
|
geoIndex: 1,
|
||||||
top: top,
|
top: top,
|
||||||
|
showLegendSymbol: false, // 存在legend时显示
|
||||||
tooltip: {
|
tooltip: {
|
||||||
show: true,
|
show: true,
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
@@ -347,7 +376,7 @@ export default {
|
|||||||
return params.name;
|
return params.name;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
backgroundColor: "rgba(0,0,0,.6)",
|
backgroundColor: "rgba(255,255,255,0.8)",
|
||||||
borderColor: "rgba(147, 235, 248, .8)",
|
borderColor: "rgba(147, 235, 248, .8)",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: "#333333",
|
color: "#333333",
|
||||||
@@ -367,7 +396,8 @@ export default {
|
|||||||
},
|
},
|
||||||
rich: {},
|
rich: {},
|
||||||
},
|
},
|
||||||
emphasis: { //高亮时显示
|
emphasis: {
|
||||||
|
//高亮时显示
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
@@ -404,10 +434,13 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: data2,
|
data: data2,
|
||||||
type: "effectScatter",
|
|
||||||
|
type: "scatter",
|
||||||
coordinateSystem: "geo",
|
coordinateSystem: "geo",
|
||||||
|
symbol:
|
||||||
|
"image://https://lnh2etest.oss-cn-shanghai.aliyuncs.com/truck25.png",
|
||||||
symbolSize: function (val) {
|
symbolSize: function (val) {
|
||||||
return 4;
|
return 20;
|
||||||
// return val[2] / 50;
|
// return val[2] / 50;
|
||||||
},
|
},
|
||||||
legendHoverLink: true,
|
legendHoverLink: true,
|
||||||
@@ -427,12 +460,31 @@ export default {
|
|||||||
if (params.data) {
|
if (params.data) {
|
||||||
console.log("params.data");
|
console.log("params.data");
|
||||||
console.log(params.data);
|
console.log(params.data);
|
||||||
console.log(params.data.name + "\n 车辆总数:"+params.data["value"][2] + "\n GPS在线总数:" + params.data["value"][3]);
|
console.log(
|
||||||
return params.data.name + "<br> 车辆总数:"+params.data["value"][2] + "<br> GPS在线总数:" + params.data["value"][3] + "<br>当日里程: " + params.data["value"][4] + "km<br>当日用量: " + params.data["value"][5] + "kg<br>当日减碳: " + params.data["value"][6] + "kg";
|
params.data.name +
|
||||||
|
"\n 车辆总数:" +
|
||||||
|
params.data["value"][2] +
|
||||||
|
"\n GPS在线总数:" +
|
||||||
|
params.data["value"][3]
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
params.data.name +
|
||||||
|
"<br> 车辆总数:" +
|
||||||
|
params.data["value"][2] +
|
||||||
|
"<br> GPS在线总数:" +
|
||||||
|
params.data["value"][3] +
|
||||||
|
"<br>当日里程: " +
|
||||||
|
params.data["value"][4] +
|
||||||
|
"km<br>当日用量: " +
|
||||||
|
params.data["value"][5] +
|
||||||
|
"kg<br>当日减碳: " +
|
||||||
|
params.data["value"][6] +
|
||||||
|
"kg"
|
||||||
|
);
|
||||||
//return '${params.name} <br />车辆总数:${params.data[value][2]} <br /> GPS在线总数:${ params.data.[value][3]}';
|
//return '${params.name} <br />车辆总数:${params.data[value][2]} <br /> GPS在线总数:${ params.data.[value][3]}';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
backgroundColor: "rgba(0,0,0,.6)",
|
backgroundColor: "rgba(255,255,255,0.8)",
|
||||||
borderColor: "rgba(147, 235, 248, .8)",
|
borderColor: "rgba(147, 235, 248, .8)",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: "#333333",
|
color: "#333333",
|
||||||
@@ -455,13 +507,6 @@ export default {
|
|||||||
show: true,
|
show: true,
|
||||||
},
|
},
|
||||||
// colorBy: "data",
|
// colorBy: "data",
|
||||||
itemStyle: {
|
|
||||||
color: "rgba(255,255,255,1)",
|
|
||||||
borderColor: "rgba(2255,255,255,2)",
|
|
||||||
borderWidth: 4,
|
|
||||||
shadowColor: "#000",
|
|
||||||
shadowBlur: 10,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
//动画效果
|
//动画效果
|
||||||
@@ -534,6 +579,7 @@ export default {
|
|||||||
data: data,
|
data: data,
|
||||||
//data: [1,100],
|
//data: [1,100],
|
||||||
selectedMode: false, //是否允许选中多个区域
|
selectedMode: false, //是否允许选中多个区域
|
||||||
|
showLegendSymbol: false, // 存在legend时显示
|
||||||
zoom: zoom,
|
zoom: zoom,
|
||||||
geoIndex: 1,
|
geoIndex: 1,
|
||||||
top: top,
|
top: top,
|
||||||
@@ -550,7 +596,7 @@ export default {
|
|||||||
return params.name;
|
return params.name;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
backgroundColor: "rgba(0,0,0,.6)",
|
backgroundColor: "rgba(255,255,255,0.8)",
|
||||||
borderColor: "rgba(147, 235, 248, .8)",
|
borderColor: "rgba(147, 235, 248, .8)",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: "#333333",
|
color: "#333333",
|
||||||
@@ -570,7 +616,8 @@ export default {
|
|||||||
},
|
},
|
||||||
rich: {},
|
rich: {},
|
||||||
},
|
},
|
||||||
emphasis: { //高亮时显示
|
emphasis: {
|
||||||
|
//高亮时显示
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
@@ -607,10 +654,18 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: data2,
|
data: data2,
|
||||||
type: "effectScatter",
|
// type: "effectScatter",
|
||||||
|
// coordinateSystem: "geo",
|
||||||
|
// symbolSize: function (val) {
|
||||||
|
// return 4;
|
||||||
|
// // return val[2] / 50;
|
||||||
|
// },
|
||||||
|
type: "scatter",
|
||||||
coordinateSystem: "geo",
|
coordinateSystem: "geo",
|
||||||
|
symbol:
|
||||||
|
"image://https://lnh2etest.oss-cn-shanghai.aliyuncs.com/station25.png",
|
||||||
symbolSize: function (val) {
|
symbolSize: function (val) {
|
||||||
return 4;
|
return 20;
|
||||||
// return val[2] / 50;
|
// return val[2] / 50;
|
||||||
},
|
},
|
||||||
legendHoverLink: true,
|
legendHoverLink: true,
|
||||||
@@ -630,11 +685,23 @@ export default {
|
|||||||
if (params.data) {
|
if (params.data) {
|
||||||
console.log("params.data");
|
console.log("params.data");
|
||||||
console.log(params.data);
|
console.log(params.data);
|
||||||
console.log(params.data.name + "\n 加氢站总数:"+params.data["value"][2] + "\n 当前运营总数:" + params.data["value"][3]);
|
console.log(
|
||||||
return params.data.name + "<br> 加氢站总数:"+params.data["value"][2] + "<br> 当前运营总数: " + params.data["value"][3];
|
params.data.name +
|
||||||
|
"\n 加氢站总数:" +
|
||||||
|
params.data["value"][2] +
|
||||||
|
"\n 当前运营总数:" +
|
||||||
|
params.data["value"][3]
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
params.data.name +
|
||||||
|
"<br> 加氢站总数:" +
|
||||||
|
params.data["value"][2] +
|
||||||
|
"<br> 当前运营总数: " +
|
||||||
|
params.data["value"][3]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
backgroundColor: "rgba(0,0,0,.6)",
|
backgroundColor: "rgba(255,255,255,0.8)",
|
||||||
borderColor: "rgba(147, 235, 248, .8)",
|
borderColor: "rgba(147, 235, 248, .8)",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: "#333333",
|
color: "#333333",
|
||||||
@@ -657,13 +724,13 @@ export default {
|
|||||||
show: true,
|
show: true,
|
||||||
},
|
},
|
||||||
// colorBy: "data",
|
// colorBy: "data",
|
||||||
itemStyle: {
|
// itemStyle: {
|
||||||
color: "rgba(255,255,255,1)",
|
// color: "rgba(255,255,255,1)",
|
||||||
borderColor: "rgba(2255,255,255,2)",
|
// borderColor: "rgba(2255,255,255,2)",
|
||||||
borderWidth: 4,
|
// borderWidth: 4,
|
||||||
shadowColor: "#000",
|
// shadowColor: "#000",
|
||||||
shadowBlur: 10,
|
// shadowBlur: 10,
|
||||||
},
|
// },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
//动画效果
|
//动画效果
|
||||||
@@ -692,7 +759,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.echartBindClick = true;
|
this.echartBindClick = true;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
// 销毁事件监听
|
// 销毁事件监听
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { currentGET } from 'api/modules'
|
import { currentGET } from "api/modules";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "BlinkingIcons",
|
name: "BlinkingIcons",
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
getData() {
|
getData() {
|
||||||
currentGET("big1").then((res) => {
|
currentGET("big1").then((res) => {
|
||||||
console.log('当日实况');
|
console.log("当日实况");
|
||||||
console.log(res);
|
console.log(res);
|
||||||
let onLineCount = 0;
|
let onLineCount = 0;
|
||||||
let vehicleCount = 0;
|
let vehicleCount = 0;
|
||||||
@@ -153,18 +153,13 @@
|
|||||||
let dayHydrogen = 0;
|
let dayHydrogen = 0;
|
||||||
let dayMileage = 0;
|
let dayMileage = 0;
|
||||||
|
|
||||||
if(res !==null && res.data !==null )
|
if (res !== null && res.data !== null) {
|
||||||
{
|
if (res.data.onLineCount !== null) onLineCount = res.data.onLineCount;
|
||||||
if(res.data.onLineCount !== null)
|
|
||||||
onLineCount = res.data.onLineCount;
|
|
||||||
if (res.data.vehicleCount !== null)
|
if (res.data.vehicleCount !== null)
|
||||||
vehicleCount = res.data.vehicleCount;
|
vehicleCount = res.data.vehicleCount;
|
||||||
if(res.data.dayCarbon !== null)
|
if (res.data.dayCarbon !== null) dayCarbon = res.data.dayCarbon;
|
||||||
dayCarbon = res.data.dayCarbon;
|
if (res.data.dayHydrogen !== null) dayHydrogen = res.data.dayHydrogen;
|
||||||
if(res.data.dayHydrogen !== null)
|
if (res.data.dayMileage !== null) dayMileage = res.data.dayMileage;
|
||||||
dayHydrogen = res.data.dayHydrogen;
|
|
||||||
if(res.data.dayMileage !== null)
|
|
||||||
dayMileage = res.data.dayMileage;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let change = this.cards[0];
|
let change = this.cards[0];
|
||||||
@@ -182,7 +177,7 @@
|
|||||||
this.$set(this.cards, 3, change);
|
this.$set(this.cards, 3, change);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -227,9 +222,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.number {
|
.number {
|
||||||
|
font-weight: 700;
|
||||||
color: #1976d2; /* 高亮数字颜色 */
|
color: #1976d2; /* 高亮数字颜色 */
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.unit {
|
.unit {
|
||||||
@@ -281,7 +276,6 @@
|
|||||||
animation-delay: 0.6s;
|
animation-delay: 0.6s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 圆形平台 */
|
/* 圆形平台 */
|
||||||
.platform-circle {
|
.platform-circle {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -329,4 +323,3 @@
|
|||||||
content: "🛡";
|
content: "🛡";
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
Reference in New Issue
Block a user