@@ -148,6 +145,7 @@ export default {
.bottom {
display: flex;
justify-content: end;
+ gap: 9px;
}
.status {
diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue
index ceb69809..b1584042 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue
@@ -9,7 +9,7 @@
diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Video/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Video/index.vue
index 06a95af3..1d4648b5 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/components/Video/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/components/Video/index.vue
@@ -1,9 +1,10 @@
-
+
+
diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js b/ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js
index be75edd2..fdbe8bae 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js
@@ -1,4 +1,4 @@
-import mpegts from "mpegts.js";
+import flvJs from "flv.js";
import { getCameraStream } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
/**
@@ -18,9 +18,9 @@ export async function openVideoStream(container, { camId, url } = {}) {
if (!url) return;
- console.log(mpegts.getFeatureList().mseLivePlayback);
+ // console.log(flvJs.getFeatureList().mseLivePlayback);
- const player = mpegts.createPlayer({
+ const player = flvJs.createPlayer({
type: "flv",
url: url,
isLive: true,
@@ -33,5 +33,102 @@ export async function openVideoStream(container, { camId, url } = {}) {
player.load();
player.play();
+ player.on(flvJs.Events.ERROR, (e) => {});
+
return player;
}
+
+export class HttpLivePlayer {
+ /**
+ * @type { flvJs.Player }
+ */
+ player;
+
+ /**
+ * @type { HTMLVideoElement }
+ */
+ container;
+
+ url;
+
+ // 解码 帧
+ lastDecodedFrames;
+
+ constructor(container, options) {
+ this.container = container;
+
+ this.getUrl(options).then(() => {
+ this.initLiveVideo();
+ });
+ }
+
+ async getUrl({ camId, url } = {}) {
+ if (camId) {
+ const { code, data } = await getCameraStream(camId).catch(() => ({}));
+
+ if (code != 200) return;
+
+ url = data.liveUrl;
+ }
+
+ if (!url) return Promise.reject("获取 url 失败!");
+
+ return (this.url = url);
+ }
+
+ destroy() {
+ if (!this.player) return;
+
+ this.player.pause();
+ this.player.unload();
+ this.player.detachMediaElement();
+ this.player.destroy();
+ this.player = null;
+ }
+
+ initLiveVideo() {
+ this.destroy();
+
+ this.lastDecodedFrames = null;
+
+ this.player = flvJs.createPlayer(
+ {
+ type: "flv",
+ url: this.url,
+ isLive: true,
+ // hasVideo: true,
+ hasAudio: false,
+ },
+ {
+ autoCleanupSourceBuffer: true,
+ enableWorker: false, //不启用分离线程
+ enableStashBuffer: true, //关闭IO隐藏缓冲区
+ isLive: true,
+ lazyLoad: false,
+ }
+ );
+
+ this.player.on(flvJs.Events.ERROR, (errorType, errorDetail, errorInfo) => {
+ console.log("errorType", errorType);
+ console.log("errorDetail", errorDetail);
+ console.log("errorInfo", errorInfo);
+
+ // 视频出错后销毁重建
+ this.destroy();
+ this.init();
+ });
+
+ // 视频断流
+ this.player.on(flvJs.Events.STATISTICS_INFO, function (res) {
+ if (this.lastDecodedFrames != res.decodedFrames) {
+ this.lastDecodedFrames = res.decodedFrames;
+ } else {
+ this.lastDecodedFrames = 0;
+ this.destroy();
+ this.init();
+ }
+ });
+
+ this.player.attachMediaElement(this.container);
+ }
+}
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
index 6c014a17..b5c5f4ef 100644
--- 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
@@ -42,7 +42,7 @@ export default {
data() {
return {
activeName: 'first',
- deviceControlVisible: true,
+ deviceControlVisible: false,
data: {
deviceType: "行车诱导",
deviceStation: "k094+079",
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/components/EditEventInformationDialog/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/components/EditEventInformationDialog/data.js
new file mode 100644
index 00000000..c7075cba
--- /dev/null
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/components/EditEventInformationDialog/data.js
@@ -0,0 +1,39 @@
+import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
+
+export const formConfigList = [
+ {
+ label: "事故类型:",
+ key: "key13",
+ type: "select",
+ },
+ PresetFormItems.trafficAccidentType,
+ PresetFormItems.callPolicePersonName,
+ PresetFormItems.callPolicePersonPhone,
+ PresetFormItems.route,
+ PresetFormItems.direction,
+ PresetFormItems.eventLevel,
+ PresetFormItems.station,
+ PresetFormItems.locationMode,
+ PresetFormItems.pressure,
+ PresetFormItems.eventHappenTime,
+ PresetFormItems.aEstimatedReleaseTime,
+ PresetFormItems.weatherConditions,
+ PresetFormItems.effect,
+ PresetFormItems.isMaintenanceAccident,
+ PresetFormItems.isCongestionAhead,
+ PresetFormItems.isCurveRoad,
+ PresetFormItems.isInTunnel,
+ PresetFormItems.isArrives,
+ PresetFormItems.isForkRoad,
+ PresetFormItems.emptyLine,
+ PresetFormItems.trafficPolicePhone,
+ {
+ ...PresetFormItems.emptyLine,
+ key: "096993",
+ },
+ PresetFormItems.wreckerCalls,
+ PresetFormItems.spillName,
+ PresetFormItems.ownerPhone,
+ PresetFormItems.laneOccupancy,
+ PresetFormItems.vehicleCondition,
+];
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/components/EditEventInformationDialog/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/components/EditEventInformationDialog/index.vue
new file mode 100644
index 00000000..93583e0a
--- /dev/null
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/components/EditEventInformationDialog/index.vue
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/index.vue
index 190b3565..20720dc2 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/index.vue
@@ -26,7 +26,16 @@