-
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue
new file mode 100644
index 00000000..316dc860
--- /dev/null
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue
new file mode 100644
index 00000000..6c014a17
--- /dev/null
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
index d05658eb..0ae0c253 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
@@ -37,8 +37,9 @@ import { getLayerData } from "./utils/layerImages";
import { debounce } from "lodash";
import { eventMap, cacheRemoveFunc } from "./utils/buttonEvent";
-import ControlCamera from "./../Dialogs/ControlCamera/index.vue"
import Bg1 from "@screen/components/Decorations/bg-1.vue"
+import ControlCamera from "./../Dialogs/ControlCamera/index.vue"
+import DrivingGuidance from "./../Dialogs/DrivingGuidance/index.vue"
import Camera from "./../Dialogs/Camera/index.vue";
export default {
@@ -46,6 +47,7 @@ export default {
components: {
ControlCamera,
Camera,
+ DrivingGuidance,
Bg1
},
data() {
@@ -59,7 +61,7 @@ export default {
// 0 有 可控(球机) ControlCamera | 1 ⽆ 不可控(枪机) Camera
component: void 0,
data: void 0,
- // component: ControlCamera,
+ // component: DrivingGuidance,
// data: {
// camId: "57937",
// }
@@ -97,12 +99,17 @@ export default {
this.tabContentData = item.children;
},
handleDevice: debounce(function (item) {
- this.$emit("onClickItem", item);
const key = `${this.active}/${item.title}`;
- eventMap[`${key}${item.status ? "_close" : ""}`]?.call(this, item);
+ const status = item.status;
item.status = item.status ? "" : "_active";
+
+ console.log("%c [ key ]-102-「index.vue」", "font-size:15px; background:#9d63e9; color:#e1a7ff;", key);
+
+ if (!eventMap[`${key}${status ? "_close" : ""}`]) return this.$emit("onClickItem", item);
+
+ eventMap[`${key}${status ? "_close" : ""}`]?.call(this, item);
}, 360),
handleCleared() {
const { mapIns } = this.getMap();
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
index 2a0700ae..d47ba033 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
@@ -3,7 +3,7 @@ import { Message } from "element-ui";
const PilePointJSON = require(`@screen/pages/Home/components/AMapContainer/data/lcz.json`);
-import { setMarkerCluster } from "./map";
+import { setMarkToMap } from "./map";
// 0 有 可控(球机)ControlCamera | 1 ⽆ 不可控(枪机)Camera
const cameraCtrlMap = {
@@ -18,9 +18,6 @@ export const cacheRemoveFunc = {
export const eventMap = {
async "路测设备/摄像机"(item) {
// https://lbs.amap.com/demo/javascript-api-v2/example/mass-markers/labelmarker-mass
- const { AMap, mapIns } = this.getMap();
-
- if (!mapIns) return Message.error("地图加载失败!");
// {
// camId: "57937",
@@ -43,73 +40,67 @@ export const eventMap = {
.get("/system/camera/camList")
// .get("/system/dept/camTreeselect")
.catch(() => ({}));
- // const { code, data } = { code: 200 };
+ // const { code, data } = { code: 200, data: [] };
if (code != 200) return Message.error("摄像机加载失败!");
cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.();
- const normal = require(`@screen/images/layer${item.id.replace(
- /^\.|[^/]+(?=.svg$)/g,
- (data) => (data === "." ? "" : `${data}_active`)
- )}`);
- const fault = require(`@screen/images/layer${item.id.replace(
- /^\.|[^/]+(?=.svg$)/g,
- (data) => (data === "." ? "" : `${data}_fault`)
- )}`);
- const faultBg = require(`@screen/images/mapBg/fault.svg`);
- const normalBg = require(`@screen/images/mapBg/active.svg`);
+ cacheRemoveFunc.DriveTestEquipment_Camera_Remove = setMarkToMap.call(
+ this,
+ item,
+ data,
+ () => {
+ const { lng, lat } = PilePointJSON[item.pileNum] || {};
- const markerClick = (e) => {
- const extData = e.target.getExtData();
+ return {
+ lnglat: [lng, lat],
+ };
+ },
+ (extData) => {
+ this.dialogConfig = {
+ // 0 有(球机) 1 ⽆(枪机)
+ component: cameraCtrlMap[extData.ptzCtrl],
+ data: extData,
+ };
+ }
+ );
+ },
+ async "路测设备/摄像机_close"() {
+ cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.();
+ },
+ async "路测设备/行车诱导_close"() {
+ cacheRemoveFunc.Driving_Guidance_Remove?.();
+ },
+ async "路测设备/行车诱导"(item) {
+ const { code, data } = await axiosIns
+ .get("/system/camera/camList")
+ // .get("/system/dept/camTreeselect")
+ .catch(() => ({}));
+ // const { code, data } = { code: 200, data: [] };
- this.dialogConfig = {
- // 0 有(球机) 1 ⽆(枪机)
- component: cameraCtrlMap[extData.ptzCtrl],
- data: extData,
- };
+ if (code != 200) return Message.error("摄像机加载失败!");
- console.log(this.dialogConfig);
- };
+ cacheRemoveFunc.Driving_Guidance_Remove?.();
- const markerCluster = await setMarkerCluster(
- mapIns,
- data.map((item) => {
+ cacheRemoveFunc.Driving_Guidance_Remove = setMarkToMap.call(
+ this,
+ item,
+ data,
+ () => {
const { lng, lat } = PilePointJSON[item.pileNum] || {};
return {
- weight: 1,
lnglat: [lng, lat],
- name: "",
- extData: item,
- content: `
-
-
`,
};
- }),
- markerClick
+ },
+ (extData) => {
+ this.dialogConfig = {
+ component: "DrivingGuidance",
+ data: extData,
+ };
+ }
);
-
- cacheRemoveFunc.DriveTestEquipment_Camera_Remove = () =>
- markerCluster.setMap(null);
-
- mapIns.setFitView(markerCluster.U, false, [360, 360, 360, 360]);
- },
- async "路测设备/摄像机_close"() {
- cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.();
+ // cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.();
},
};
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
index 263bef6f..eb721cfe 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
@@ -86,3 +86,74 @@ export async function setMarkerCluster(map, points, markerFun) {
return markerCluster;
}
+
+/**
+ *
+ * @param {*} item
+ * @param {*} resolveMarker 处理数据 返回 { lnglat: [lng, lat], content: '' }
+ * @param {*} _markerClick marker 点击
+ * @returns
+ */
+export function setMarkToMap(item, data, resolveMarker, _markerClick) {
+ const { mapIns } = this.getMap();
+
+ if (!mapIns) return Message.error("地图加载失败!");
+
+ const normal = require(`@screen/images/layer${item.id.replace(
+ /^\.|[^/]+(?=.svg$)/g,
+ (data) => (data === "." ? "" : `${data}_active`)
+ )}`);
+
+ const fault = require(`@screen/images/layer${item.id.replace(
+ /^\.|[^/]+(?=.svg$)/g,
+ (data) => (data === "." ? "" : `${data}_fault`)
+ )}`);
+
+ const faultBg = require(`@screen/images/mapBg/fault.svg`);
+ const normalBg = require(`@screen/images/mapBg/active.svg`);
+
+ const markerClick = (e) => {
+ const extData = e.target.getExtData();
+
+ _markerClick(extData, e);
+ };
+
+ const markerCluster = setMarkerCluster(
+ mapIns,
+ data.map((item) => {
+ const { lnglat, content } = resolveMarker(item);
+ // const { lng, lat } = PilePointJSON[item.pileNum] || {};
+
+ return {
+ weight: 1,
+ lnglat,
+ name: "",
+ extData: item,
+ content:
+ content ||
+ `
+
+
`,
+ };
+ }),
+ markerClick
+ );
+
+ mapIns.setFitView(markerCluster.U, false, [360, 360, 360, 360]);
+
+ return () => markerCluster.setMap(null);
+}
diff --git a/ruoyi-ui/src/views/JiHeExpressway/utils/axios/auth.js b/ruoyi-ui/src/views/JiHeExpressway/utils/axios/auth.js
index 757ffb27..5ed52934 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/utils/axios/auth.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/utils/axios/auth.js
@@ -6,10 +6,10 @@ import axios from "axios";
// 后台
const RequestURL = `http://10.168.77.209:1024/dev-api`;
-// const UN = "jhgskj",
-// PD = "jhgskj@2023",
-const UN = "admin",
- PD = "admin123",
+const UN = "jhgskj",
+ PD = "jhgskj@2023",
+ // const UN = "admin",
+ // PD = "admin123",
tokeKey = "LOCAL_TOKEN";
let continueRefreshToken = true;
@@ -21,7 +21,8 @@ function getToken() {
return new Promise((resolve, reject) => {
axios
- .post(`${RequestURL}/login`, {
+ // .post(`${RequestURL}/login`, {
+ .post(`${RequestURL}/apiLogin`, {
username: UN,
password: PD,
})