接口对接完

main
许宏杰 2 months ago
parent d1c75bf9e9
commit 8c00aab826

@ -5,4 +5,6 @@ VUE_APP_TITLE = 云坤地图
ENV = 'production' ENV = 'production'
# 云坤地图/生产环境 # 云坤地图/生产环境
VUE_APP_BASE_API = 'http://39.101.188.84:9066' VUE_APP_BASE_API = 'http://192.168.0.77:9066'
VUE_APP_BASE_API2 = 'http://192.168.0.77/map'
VUE_APP_BASE_API_YUNKUN = 'http://192.168.0.91/gps-web/api'

@ -1,5 +1,5 @@
import request from "@/utils/request-yunkun.js"; import request from "@/utils/request-yunkun.js";
const sessionId = localStorage.getItem("SESSION_ID");
// 登录 // 登录
export function lgoin(query) { export function lgoin(query) {
return request({ return request({
@ -12,7 +12,7 @@ export function lgoin(query) {
// 查询车辆明细列表 // 查询车辆明细列表
export function getCarList(query) { export function getCarList(query) {
query.sessionId = sessionId; query.sessionId = localStorage.getItem("SESSION_ID");
return request({ return request({
url: "/get_car_list.jsp", url: "/get_car_list.jsp",
method: "GET", method: "GET",
@ -23,7 +23,7 @@ export function getCarList(query) {
//车辆点位查询 //车辆点位查询
export function getCarPoint(query) { export function getCarPoint(query) {
query.sessionId = localStorage.getItem("SESSION_ID"); //无感获取sessionID是异步的与setInterval使用防止没有取到或者不是最新的 query.sessionId = localStorage.getItem("SESSION_ID");
return request({ return request({
url: "/get_gps_r.jsp", url: "/get_gps_r.jsp",
method: "GET", method: "GET",
@ -33,7 +33,7 @@ export function getCarPoint(query) {
// 车辆实时定位查询(根据车牌号) // 车辆实时定位查询(根据车牌号)
export function getCarByCarplate(query) { export function getCarByCarplate(query) {
query.sessionId = sessionId; query.sessionId = localStorage.getItem("SESSION_ID");
return request({ return request({
url: "/get_gps_r_plate.jsp", url: "/get_gps_r_plate.jsp",
method: "GET", method: "GET",
@ -43,7 +43,7 @@ export function getCarByCarplate(query) {
// 查看车辆历史轨迹 // 查看车辆历史轨迹
export function historyLine(query) { export function historyLine(query) {
query.sessionId = sessionId; query.sessionId = localStorage.getItem("SESSION_ID");
return request({ return request({
url: "/get_gps_h.jsp", url: "/get_gps_h.jsp",
method: "GET", method: "GET",
@ -53,7 +53,7 @@ export function historyLine(query) {
// 按天查询车辆里程 // 按天查询车辆里程
export function carMidle(query) { export function carMidle(query) {
query.sessionId = sessionId; query.sessionId = localStorage.getItem("SESSION_ID");
return request({ return request({
url: "get_gps_mile_day.jsp", url: "get_gps_mile_day.jsp",
method: "GET", method: "GET",

@ -157,8 +157,23 @@
width: 260px; width: 260px;
background: url("../images/diy-popup.png"); background: url("../images/diy-popup.png");
background-size: 100% 100%; background-size: 100% 100%;
padding: 20px 25px; padding: 15px 12px 14px 23px;
// overflow-y: auto;
& > div {
height: 100%;
width: 100%;
overflow-y: auto;
}
::-webkit-scrollbar {
width: 3px; /* 滚动条宽度 */
}
::-webkit-scrollbar-track {
background: transparent; /* 滚动条轨道背景 */
}
::-webkit-scrollbar-thumb {
background: #032b57; /* 滚动条颜色 */
}
.pointer { .pointer {
position: absolute; position: absolute;
left: -145px; left: -145px;

@ -145,7 +145,7 @@ export default {
handleTimeUpdate(event, index) { handleTimeUpdate(event, index) {
const currentTime = event.target.currentTime; const currentTime = event.target.currentTime;
// == 300 // == 300
if (currentTime >= 15) { if (currentTime >= 300) {
this.toclose(index); this.toclose(index);
if (index == "0521") { if (index == "0521") {
this.dialogSate = false; this.dialogSate = false;

@ -113,7 +113,7 @@ service.interceptors.response.use(
noToke = res.data.rspDesc.includes("登录会话"); noToke = res.data.rspDesc.includes("登录会话");
} }
// console.log(res.data.rspCode); // console.log(res.data.rspCode);
if (res.data.rspCode == 0 && !isRefreshRequest(res.config)) { if (res.data.rspCode == 0 && noToke && !isRefreshRequest(res.config)) {
const isSucceed = await refreshToken(); const isSucceed = await refreshToken();
if (isSucceed) { if (isSucceed) {
//重新给接口中的sessionId赋值 //重新给接口中的sessionId赋值

@ -56,12 +56,12 @@
import MarsMap from "@/components/mars-map"; import MarsMap from "@/components/mars-map";
import { getfindByPlateNums } from "@/api/yunkun/index.js"; import { getfindByPlateNums } from "@/api/yunkun/index.js";
import { getCarPoint, getCarByCarplate } from "@/api/yunkun/yunkun.js"; import { getCarPoint, getCarByCarplate } from "@/api/yunkun/yunkun.js";
import { adjustCanvasSize, changeBorderColor } from "@/utils/carCanvas.js";
export default { export default {
data() { data() {
const basePathUrl = window.basePathUrl || ""; const basePathUrl = window.basePathUrl || "";
return { return {
timer: null,
searchList: [], searchList: [],
searchText: "", searchText: "",
searchQuery: { searchQuery: {
@ -104,6 +104,9 @@ export default {
control: { control: {
contextmenu: { preventDefault: false, hasDefault: false }, contextmenu: { preventDefault: false, hasDefault: false },
}, },
terrain: {
show: false,
},
basemaps: [ basemaps: [
{ {
name: "影像地图", name: "影像地图",
@ -172,6 +175,7 @@ export default {
...{ ...{
missionName: missionItem[0].name, missionName: missionItem[0].name,
missionType: missionType, missionType: missionType,
missionId: missionItem[0].id,
}, },
}; };
} else { } else {
@ -180,6 +184,7 @@ export default {
...{ ...{
missionName: "未识别", missionName: "未识别",
missionType: 1, missionType: 1,
missionId: null,
}, },
}; };
} }
@ -228,7 +233,7 @@ export default {
this.map.addLayer(this.mapLayer.car); this.map.addLayer(this.mapLayer.car);
this.createCar(); this.createCar();
}, },
/**创建车辆 */ /**创建车辆 苏E17360*/
async createCar(type) { async createCar(type) {
this.list = await this.carPoint(true); this.list = await this.carPoint(true);
@ -246,7 +251,7 @@ export default {
style: { style: {
url: this.carUrl, url: this.carUrl,
scale: 0.5, scale: 0.5,
minimumPixelSize: 35, minimumPixelSize: 32,
silhouette: true, silhouette: true,
silhouetteColor: "#008cff", silhouetteColor: "#008cff",
pitch: 0, // pitch: 0, //
@ -269,10 +274,12 @@ export default {
}, },
attr: { attr: {
index: item.carId, index: item.carId,
missionId: item.missionId,
missionName: item.missionName,
missionType: item.missionType, missionType: item.missionType,
}, },
}); });
console.log(item.missionType, "类型");
this.mapLayer.car.addGraphic(graphic); this.mapLayer.car.addGraphic(graphic);
this.mapLayer.car.enabledEvent = true; // this.mapLayer.car.enabledEvent = true; //
graphic.bindPopup( graphic.bindPopup(
@ -294,7 +301,6 @@ export default {
); );
graphic.openPopup(); graphic.openPopup();
graphic.on(mars3d.EventType.highlightOpen, (e) => { graphic.on(mars3d.EventType.highlightOpen, (e) => {
console.log(e.target.attr, "ssss");
e.target.setOptions({ e.target.setOptions({
// //
circle: { circle: {
@ -329,19 +335,28 @@ export default {
}); });
graphic.on(mars3d.EventType.click, (e) => { graphic.on(mars3d.EventType.click, (e) => {
const attr = e.target.attr;
if (!attr.missionId) {
this.$modal.msgError("该车辆暂无任务!");
return;
}
this.$router.push({ this.$router.push({
path: "/carInfo", path: "/carInfo",
query: { carId: e.target.attr.index }, query: {
carId: e.target.attr.index,
missionId: attr.missionId,
missionName: item.missionName,
},
}); });
}); });
} }
// setInterval // setInterval
this.changePosition(0); this.changePosition(0);
// const interval = 15; const interval = 10;
// this.changePosition(interval); this.changePosition(interval);
// this.time = setInterval(() => { this.time = setInterval(() => {
// this.changePosition(interval); this.changePosition(interval);
// }, interval * 1000); }, interval * 1000);
}, },
async changePosition(interval) { async changePosition(interval) {
@ -372,11 +387,18 @@ export default {
}, },
/**根据车牌号查询车辆实时定位 */ /**根据车牌号查询车辆实时定位 */
async handleSearch() { async handleSearch() {
if (!this.searchQuery.carPlate) return; if (!this.searchQuery.carPlate) {
this.inputClear();
return;
}
// //
if (this.timer) clearInterval(this.timer); if (this.timer) clearInterval(this.timer);
const result = await getCarByCarplate(this.searchQuery); const result = await getCarByCarplate(this.searchQuery);
if (result.list) { if (result.list) {
if (result.list[0].stateCn.includes("离线")) {
this.$modal.msgError(`该车${result.list[0].stateCn}!`);
return;
}
this.searchList = result.list; this.searchList = result.list;
} else { } else {
this.searchText = result.rspDesc; this.searchText = result.rspDesc;
@ -398,7 +420,6 @@ export default {
* 清除操作 * 清除操作
*/ */
inputClear() { inputClear() {
if (!this.searchQuery.carPlate) return;
if (this.timer) clearInterval(this.timer); if (this.timer) clearInterval(this.timer);
this.searchList = []; this.searchList = [];
this.searchText = ""; this.searchText = "";
@ -429,27 +450,32 @@ export default {
this.selectedItems.push(item); this.selectedItems.push(item);
} }
if (this.selectedItems.length > 0) { if (this.selectedItems.length == 0) {
this.selectedItems.forEach((item) => {
let type = item == "营运线路" ? 1 : item == "维护线路" ? 2 : 3;
this.mapLayer.car.eachGraphic((graphic) => {
if (graphic.attr.missionType == type) {
graphic.show = false;
graphic.closePopup();
} else {
if (graphic.show) return;
graphic.show = true;
graphic.openPopup();
}
});
});
} else {
this.mapLayer.car.eachGraphic((graphic) => { this.mapLayer.car.eachGraphic((graphic) => {
if (graphic.show) return; if (graphic.show) return;
graphic.show = true; graphic.show = true;
graphic.openPopup(); graphic.openPopup();
}); });
return;
} }
this.mapLayer.car.eachGraphic((graphic) => {
let missionTetx =
graphic.attr.missionType == 1
? "营运线路"
: graphic.attr.missionType == 2
? "维护线路"
: "临时任务";
if (this.selectedItems.includes(missionTetx)) {
if (!graphic.show) return;
graphic.show = false;
graphic.closePopup();
} else {
if (graphic.show) return;
graphic.show = true;
graphic.openPopup();
}
});
}, },
isSelected(item) { isSelected(item) {
// //

@ -47,6 +47,9 @@ export default {
pitch: -31.5, pitch: -31.5,
}, },
}, },
terrain: {
show: false,
},
control: { control: {
contextmenu: { preventDefault: false, hasDefault: false }, contextmenu: { preventDefault: false, hasDefault: false },
}, },

@ -7,7 +7,7 @@
</div> </div>
<div class="real-time"> <div class="real-time">
<img src="../assets/images/realTime.png" alt="" /> <img src="../assets/images/realTime.png" alt="" />
<span>{{ mileData.mile ? ileData.mile : 0 }}</span> <span>{{ mileData.mile }}</span>
</div> </div>
</div> </div>
<div class="albuginea backBtn" @click="initTilesetLayer()"> <div class="albuginea backBtn" @click="initTilesetLayer()">
@ -18,7 +18,7 @@
</div> </div>
<mars-map @mapLoad="mapLoad" :options="options"></mars-map> <mars-map @mapLoad="mapLoad" :options="options"></mars-map>
<div class="video-list"> <div class="video-list">
<!-- <grids></grids> --> <grids></grids>
</div> </div>
</div> </div>
</template> </template>
@ -26,16 +26,15 @@
<script> <script>
import MarsMap from "@/components/mars-map"; import MarsMap from "@/components/mars-map";
import grids from "@/components/grids.vue"; import grids from "@/components/grids.vue";
import { getfindByPlateNum } from "@/api/yunkun/index.js";
import { getCarIdInfo } from "@/api/yunkun/index.js"; import { getCarIdInfo } from "@/api/yunkun/index.js";
import { historyLine, carMidle, getCarPoint } from "@/api/yunkun/yunkun.js"; import { historyLine, getCarPoint, carMidle } from "@/api/yunkun/yunkun.js";
export default { export default {
data() { data() {
const basePathUrl = window.basePathUrl || ""; const basePathUrl = window.basePathUrl || "";
return { return {
missionId: null, //id missionData: {}, //id
mileData: { mileData: {
mile: "", // mile: 0, //
}, },
queryParams: { queryParams: {
startTime: undefined, startTime: undefined,
@ -83,6 +82,7 @@ export default {
}, },
Line: [], Line: [],
carUrl: basePathUrl + "static/qiche.gltf", carUrl: basePathUrl + "static/qiche.gltf",
timer: null,
}; };
}, },
components: { MarsMap, grids }, components: { MarsMap, grids },
@ -92,16 +92,30 @@ export default {
this.mapLayer.car = null; this.mapLayer.car = null;
}, },
created() { created() {
this.missionId = this.$route.query.missionId; this.missionData = {
missionId: this.$route.query.missionId,
missionName: this.$route.query.missionName,
};
const { startOfDay, endOfDay } = this.getStartAndEndOfDayFormatted(true); const { startOfDay, endOfDay } = this.getStartAndEndOfDayFormatted(true);
this.queryParams = { this.queryParams = {
carId: this.$route.query.carId, carId: this.$route.query.carId,
startTime: startOfDay, startTime: startOfDay,
endTime: endOfDay, endTime: endOfDay,
}; };
this.getCarMidle();
}, },
methods: { methods: {
/**获取车辆天里程 */
async getCarMidle() {
const { startOfDay, endOfDay } = this.getStartAndEndOfDayFormatted();
let result = await carMidle({
carId: this.queryParams.carId,
startDate: startOfDay,
endDate: endOfDay,
});
this.mileData.mile = result.mile;
},
/**地图渲染完毕 */ /**地图渲染完毕 */
mapLoad(map) { mapLoad(map) {
map.set; map.set;
@ -192,11 +206,11 @@ export default {
id: this.queryParams.carId, id: this.queryParams.carId,
name: "漫游对象", name: "漫游对象",
// positions: [[parseFloat(lastPoint.lng), parseFloat(lastPoint.lat)]], // positions: [[parseFloat(lastPoint.lng), parseFloat(lastPoint.lat)]],
// camera: { camera: {
// type: "gs", type: "gs",
// heading: 0, heading: 0,
// radius: 3000, radius: 3000,
// }, },
model: { model: {
show: true, show: true,
url: this.carUrl, url: this.carUrl,
@ -206,6 +220,7 @@ export default {
silhouetteColor: "#FFB200", silhouetteColor: "#FFB200",
pitch: 0, pitch: 0,
roll: 0, roll: 0,
clampToGround: true,
// heading: parseFloat(lastPoint.drct), // heading: parseFloat(lastPoint.drct),
}, },
circle: { circle: {
@ -227,16 +242,17 @@ export default {
}, },
}); });
this.mapLayer.car.addGraphic(car); this.mapLayer.car.addGraphic(car);
// let res = await getCarIdInfo("4289f2c2ea0d4d7cb5853e6d4095918d"); let res = await getCarIdInfo(this.missionData.missionId);
// this.bindPopup(car, res.data); console.log(this.missionData);
// car.openPopup(); this.bindPopup(car, res.data);
// car.start(); car.openPopup();
car.start();
const interval = 15; const interval = 15;
this.changePosition(interval); this.changePosition(interval);
// this.time = setInterval(() => { this.timer = setInterval(() => {
// this.changePosition(interval); this.changePosition(interval);
// }, interval * 1000); }, interval * 1000);
}, },
async changePosition(interval) { async changePosition(interval) {
let list = await this.carPoint(); let list = await this.carPoint();
@ -246,6 +262,7 @@ export default {
//StyleOptions({ //StyleOptions({
// heading:parseFloat(list[0].drct) // heading:parseFloat(list[0].drct)
// }) // })
this.mileData.mile = list[0].preMile;
let position = Cesium.Cartesian3.fromDegrees( let position = Cesium.Cartesian3.fromDegrees(
parseFloat(list[0].lng), parseFloat(list[0].lng),
parseFloat(list[0].lat), parseFloat(list[0].lat),
@ -278,9 +295,10 @@ export default {
}); });
let html = `<div class="diy-popup"> let html = `<div class="diy-popup">
<div>
<div class="pointer"></div> <div class="pointer"></div>
<div class="popup-title">001号线_01_早送_守押<br/> <div class="popup-title">${this.missionData.missionName}<br/>
001_苏E12345
</div> </div>
<div class="popup-item"> <div class="popup-item">
<div class="popup-lable">线路类型</div> <div class="popup-lable">线路类型</div>
@ -301,6 +319,7 @@ export default {
<div class="popup-value">${data.bdwInfo.count}</div> <div class="popup-value">${data.bdwInfo.count}</div>
</div> </div>
</div> </div>
</div>
</div>`; </div>`;
fixedRoute.bindPopup(html, { fixedRoute.bindPopup(html, {

@ -41,7 +41,9 @@ export default {
control: { control: {
contextmenu: { preventDefault: false, hasDefault: false }, contextmenu: { preventDefault: false, hasDefault: false },
}, },
terrain: {
show: false,
},
basemaps: [ basemaps: [
{ {
name: "影像地图", name: "影像地图",

@ -1,390 +0,0 @@
<template>
<div class="map-container">
<div class="extend-box">
<div class="sub-title"></div>
<div class="data-total">{{ total }}</div>
</div>
<mars-map @mapLoad="mapLoad" :options="options"></mars-map>
</div>
</template>
<script>
import point1 from "@/assets/images/levelcity.png";
import point2 from "@/assets/images/province.png";
import linePoint1 from "@/assets/images/linePoint1.png";
import linePoint2 from "@/assets/images/linePoint2.png";
import MarsMap from "@/components/mars-map";
// import province from "@/assets/images/province.png";
import { getProvince } from "@/api/yunkun/index.js";
export default {
data() {
const basePathUrl = window.basePathUrl || "";
return {
cityAttr: {},
total: 0,
options: {
scene: {
center: {
lat: -9.65789,
lng: 110.718514,
alt: 13807610.5,
heading: 351.3,
pitch: -73,
},
showSun: false,
showMoon: false,
showSkyBox: false,
showSkyAtmosphere: false,
fog: false,
sceneMode: 1,
backgroundColor: "rgba(0,0,0,0)",
backgroundImage: `url(${require("../assets/images/big_bg.png")})`,
orderIndependentTranslucency: false,
contextOptions: { webgl: { antialias: mars3d.Util.isPCBroswer() } },
globe: {
show: false, //
showGroundAtmosphere: false,
enableLighting: false,
},
},
control: {
// contextmenu: { preventDefault: false, hasDefault: false },
},
basemaps: [
{
name: "mapbox影像图",
icon: "img/basemaps/mapboxSatellite.png",
type: "mapbox",
username: "sharealex",
styleId: "cly5i21fn00e901prgq643t4r",
token:
"pk.eyJ1Ijoic2hhcmVhbGV4IiwiYSI6ImNsaXNhZmRjbTFhbnczZmxib3h1OW05YXYifQ.PhlKv60ar3K359d8x2yBPw",
tilesize: 256,
scaleFactor: false,
show: false,
},
],
},
map: null,
mapLayer: {},
chinaUrl: basePathUrl + "lib/geoJson/json/china.json",
};
},
methods: {
mapLoad(map) {
this.map = map;
map.setSceneOptions({
cameraController: {
// enableZoom: false,
// enableTranslate: false,
// enableRotate: false,
// enableTilt: false,
},
});
this.mapLayer.china = new mars3d.layer.GraphicLayer({
zIndex: 10,
});
map.addLayer(this.mapLayer.china);
//
this.initChina();
},
initChina() {
mars3d.Util.fetchJson({ url: this.chinaUrl }).then((res) => {
const arr = mars3d.Util.geoJsonToGraphics(res);
arr.map((item, index) => {
this.cityAttr[item.attr.name] = item.attr;
const polygonEntity = new mars3d.graphic.PolygonEntity({
positions: item.positions,
style: {
fill: true,
lastMaterialType: "Image",
materialOptions: {
materialType: "Image",
image: require("../assets/images/map-bg.jpg"),
opacity: 1,
repeat_x: 1,
repeat_y: 1,
transparent: false,
},
materialType: "Image",
opacity: 1,
outline: true,
outlineWidth: 1.5,
outlineColor: "#00BEFF",
setHeight: 1000000,
},
});
const wall = new mars3d.graphic.WallPrimitive({
positions: item.positions,
style: {
setHeight: -20000,
diffHeight: 1000000, //
width: 15,
materialType: mars3d.MaterialType.Image2,
materialOptions: {
image: require("../assets/images/fence-top.png"),
color: "#0064F8",
},
},
});
this.mapLayer.china.addGraphic(polygonEntity);
this.mapLayer.china.addGraphic(wall);
});
this.createEchartsLayer();
});
},
async createEchartsLayer() {
const options = await this.getEchartsOption();
const echartsLayer = new mars3d.layer.EchartsLayer(options);
this.map.addLayer(echartsLayer);
//
window.addEventListener("resize", function () {
echartsLayer.resize();
});
},
async getEchartsOption() {
let res = await getProvince();
this.total = res.data.length;
const items = res.data.map((item, index) => {
if (index == 0) {
item = {
level: 1,
name: item.city,
label: item.city,
value: this.cityAttr[item.city].center,
symbol: "",
symbolSize: [65, 65],
};
} else {
item = {
level: 2,
symbol: "",
name: item.city,
label: item.city,
category: 0,
active: true,
speed: 6,
value: this.cityAttr[item.city].center,
belong: res.data[0].city,
symbolSize: [40, 40],
};
}
return item;
});
// const items = [
// {
// level: 1,
// name: "",
// label: "jiangsu",
// value: [118.767413, 32.041544],
// symbol: "",
// symbolSize: [30, 30],
// },
// {
// level: 2,
// symbol: "",
// name: "",
// label: "anhui",
// category: 0,
// active: true,
// speed: 6,
// value: [117.283042, 31.86119],
// belong: "",
// },
// {
// level: 2,
// symbol: "",
// name: "",
// category: 0,
// active: true,
// speed: 6,
// value: [120.153576, 30.287459],
// belong: "",
// },
// {
// level: 2,
// symbol: "",
// name: "",
// category: 0,
// active: true,
// speed: 6,
// value: [102.712251, 25.040609],
// belong: "",
// },
// {
// level: 2,
// symbol: "",
// name: "",
// category: 0,
// active: true,
// speed: 6,
// value: [101.778916, 36.623178],
// belong: "",
// },
// {
// level: 2,
// symbol: "",
// name: "",
// category: 0,
// active: true,
// speed: 6,
// value: [111.670801, 40.818311],
// belong: "",
// },
// ];
const lineColor = ["#fff", "#7BF7AD", "#00fcff"];
//
const symbolList = ["image://" + point1, "image://" + point2];
// 线
const pointSymbol = ["image://" + linePoint1, "image://" + linePoint2];
// level = 1
items.forEach((el) => {
el.symbol = symbolList[el.level - 1];
});
const dataArr = [[], [], []];
items.forEach((el) => {
if (el.belong) {
items.forEach((element) => {
if (el.belong === element.name) {
console.log(dataArr[el.level - 1]);
dataArr[el.level - 1].push([
{
coord: element.value,
},
{
coord: el.value,
},
]);
}
});
}
});
const seriesOne = [
{
type: "effectScatter",
layout: "none",
showEffectOn: "emphasis",
// coordinateSystem: "cartesian2d",
coordinateSystem: "mars3dMap",
symbolSize: [20, 20],
symbolOffset: [0, -10],
zlevel: 3,
circular: {
rotateLabel: true,
},
label: {
normal: {
show: true,
position: "bottom",
formatter: function (e) {
return e.data.level == 1 ? "" : e.name;
},
fontSize: 12,
color: "#fff",
textBorderColor: "#2aa4e8",
offset: [0, 0],
},
},
itemStyle: {
normal: {
shadowColor: "none",
},
},
data: items,
},
];
//线
const lineSeries = [];
dataArr.forEach((el, index) => {
lineSeries.push({
name: "",
type: "lines",
// coordinateSystem: "cartesian2d",
coordinateSystem: "mars3dMap",
zlevel: 1,
effect: {
show: true,
smooth: false,
trailLength: 0,
symbol: pointSymbol[index],
symbolSize: [10, 30],
period: 4,
},
lineStyle: {
width: 2,
color: lineColor[index],
curveness: -0.2,
},
data: el,
});
});
const seriesData = seriesOne.concat(lineSeries);
const option = {
animation: false,
// backgroundColor: '#000',
fixedHeight: 900009,
series: seriesData,
};
return option;
},
},
components: {
MarsMap,
},
};
</script>
<style lang="scss" scoped>
.extend-box {
position: absolute;
left: 50%;
top: 103px;
z-index: 60;
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
.sub-title {
width: 200px;
height: 38px;
background: url("../assets/images/extend.png");
background-size: 100% 100%;
margin-bottom: 8px;
}
.data-total {
font-size: 40px;
color: #ffffff;
letter-spacing: 1px;
text-align: center;
font-weight: bold;
background-image: linear-gradient(0deg, #00e5ff 0%, #d8d8d8 100%);
-webkit-background-clip: text; /* 使用-webkit-前缀兼容WebKit内核浏览器 */
background-clip: text;
color: transparent;
}
}
</style>

@ -18,7 +18,8 @@ module.exports = {
// 部署生产环境和开发环境下的URL。 // 部署生产环境和开发环境下的URL。
// 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.NODE_ENV === "production" ? "/demo/yunkunPc" : "/", // publicPath: process.env.NODE_ENV === "production" ? "/demo/yunkunPc" : "/",
publicPath: process.env.NODE_ENV === "production" ? "/yunkunPc" : "/",
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和 baseUrl 的生产环境路径一致默认dist // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和 baseUrl 的生产环境路径一致默认dist
outputDir: "dist", outputDir: "dist",
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
@ -33,6 +34,12 @@ module.exports = {
port: port, port: port,
open: true, open: true,
proxy: { proxy: {
"/map": {
target: `http://192.168.0.77/map`,
pathRewrite: {
"^/map": "",
},
},
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://192.168.0.77:9066`, target: `http://192.168.0.77:9066`,
@ -41,13 +48,6 @@ module.exports = {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",
}, },
}, },
"/map": {
target: `http://192.168.0.77/map`,
pathRewrite: {
"^/map": "",
},
},
}, },
disableHostCheck: true, disableHostCheck: true,
}, },

Loading…
Cancel
Save