fix:导出功能,大屏修改跟车

This commit is contained in:
SunTao 2024-12-03 13:42:21 +08:00
parent b88f166de8
commit bfd8d39ecf
9 changed files with 94 additions and 40 deletions

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-14 10:04:12 * @Date: 2024-10-14 10:04:12
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-12-02 16:39:01 * @LastEditTime: 2024-12-03 11:43:45
* @FilePath: \znxjxt-ui\src\api\xj\task.js * @FilePath: \znxjxt-ui\src\api\xj\task.js
* @Description: 巡检任务管理接口 * @Description: 巡检任务管理接口
*/ */
@ -63,3 +63,13 @@ export function getDefectList(params) {
params, params,
}); });
} }
// 导出病害数据
export function exportDefectData(params) {
return request({
url: "/xj/defect/exportNewDefectByTaskId",
method: "get",
params,
});
}

View File

@ -2,8 +2,8 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-14 10:46:23 * @Date: 2024-10-14 10:46:23
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-11-14 16:58:34 * @LastEditTime: 2024-12-03 10:56:51
* @FilePath: \znxjxt-ui\src\views\xj\inspection\task-management\components\fssm-map.vue * @FilePath: \znxjxt-ui\src\components\map\fssm-map.vue
* @Description: 公共地图 * @Description: 公共地图
--> -->
@ -453,8 +453,6 @@ export default {
this.drawend(e); this.drawend(e);
}); });
modify.on("modifyend", (e) => { modify.on("modifyend", (e) => {
console.log(11111111);
e.features.forEach((feature) => { e.features.forEach((feature) => {
this.drawMarkers = feature.getGeometry().getCoordinates().flat(); this.drawMarkers = feature.getGeometry().getCoordinates().flat();
this.$emit("endEoordinate", this.drawMarkers); this.$emit("endEoordinate", this.drawMarkers);

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-17 11:34:00 * @Date: 2024-10-17 11:34:00
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-12-02 10:47:38 * @LastEditTime: 2024-12-03 13:03:48
* @FilePath: \znxjxt-ui\src\views\big-screen\index.vue * @FilePath: \znxjxt-ui\src\views\big-screen\index.vue
* @Description: 大屏首页 * @Description: 大屏首页
--> -->
@ -10,14 +10,14 @@
<div class="screen-content"> <div class="screen-content">
<div class="screen-header"> <div class="screen-header">
<div class="header-weather"> <div class="header-weather">
<iframe <!-- <iframe
width="150" width="150"
scrolling="no" scrolling="no"
height="45" height="45"
frameborder="0" frameborder="0"
allowtransparency="true" allowtransparency="true"
src="https://i.tianqi.com?c=code&id=12&icon=1&color=%2389C5E8&py=shenyang&num=1&site=12" src="https://i.tianqi.com?c=code&id=12&icon=1&color=%2389C5E8&py=shenyang&num=1&site=12"
></iframe> ></iframe> -->
</div> </div>
<div class="header-time"> <div class="header-time">
<!-- 消息中心 --> <!-- 消息中心 -->
@ -42,22 +42,22 @@
> >
<div class="index"> <div class="index">
<i <i
v-if="item.status === '1'" v-if="item.title === '成功'"
style="color: #67c23a" style="color: #67c23a"
class="el-icon-success" class="el-icon-success"
></i> ></i>
<i <i
v-if="item.status === '2'" v-if="item.title === '提醒'"
style="color: #e6a23c" style="color: #e6a23c"
class="el-icon-info" class="el-icon-info"
></i> ></i>
<i <i
v-if="item.status === '3'" v-if="item.title === '告警'"
style="color: #909399" style="color: #909399"
class="el-icon-warning" class="el-icon-warning"
></i> ></i>
<i <i
v-if="item.status === '4'" v-if="item.title === '错误'"
style="color: #f56c6c" style="color: #f56c6c"
class="el-icon-error" class="el-icon-error"
></i> ></i>
@ -305,14 +305,6 @@
</template> </template>
<script> <script>
// websocket
import {
connectWebsocket,
closeWebsocket,
sendMsg,
} from "@/plugins/websocket.js";
//
import { getToken } from "@/utils/auth.js";
// //
import FssmMap from "@/components/map/fssm-map.vue"; import FssmMap from "@/components/map/fssm-map.vue";
import { Feature } from "ol"; import { Feature } from "ol";
@ -564,19 +556,22 @@ export default {
// }); // });
this.messageList = [ this.messageList = [
{ {
status: "1", title: "成功",
status: "SUCCESS",
time: "2024/45/62", time: "2024/45/62",
car: "辽jskdn", car: "辽jskdn",
content: "骄傲的是否哈德half绝对符合卡的法拉第", content: "骄傲的是否哈德half绝对符合卡的法拉第",
}, },
{ {
status: "2", title: "告警",
status: "WARNING",
time: "2024/45/62", time: "2024/45/62",
car: "辽jskdn", car: "辽jskdn",
content: "骄傲的是否哈德half绝对符合卡的法拉第", content: "骄傲的是否哈德half绝对符合卡的法拉第",
}, },
{ {
status: "3", title: "提醒",
status: "REMIND",
time: "2024/45/62", time: "2024/45/62",
car: "辽jskdn", car: "辽jskdn",
content: "骄傲的是否哈德half绝对符合卡的法拉第", content: "骄傲的是否哈德half绝对符合卡的法拉第",
@ -591,7 +586,7 @@ export default {
handleMessageItemClick(value) { handleMessageItemClick(value) {
this.$router.push({ this.$router.push({
name: "Warning-center", name: "Warning-center",
params: { status: value }, params: { title: value },
}); });
}, },
@ -1264,7 +1259,7 @@ export default {
crossOrigin: "anonymous", crossOrigin: "anonymous",
src: logo, src: logo,
// //
scale: 0.03, scale: 0.04,
// ,180*π // ,180*π
rotation: (item.data.direction - 90) * (Math.PI / 180), rotation: (item.data.direction - 90) * (Math.PI / 180),
}), }),

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-11-15 13:14:03 * @Date: 2024-11-15 13:14:03
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-12-02 10:46:24 * @LastEditTime: 2024-12-03 13:10:46
* @FilePath: \znxjxt-ui\src\views\big-screen\overview-components\components\inspection-follow.vue * @FilePath: \znxjxt-ui\src\views\big-screen\overview-components\components\inspection-follow.vue
* @Description: 总览大屏-巡检车辆-跟车弹窗 * @Description: 总览大屏-巡检车辆-跟车弹窗
--> -->
@ -89,6 +89,8 @@ export default {
]); ]);
}, 10); }, 10);
} }
} else if (item.type === "defect") {
console.log(item, "生成得病害");
} }
}); });
}, },

View File

@ -2,13 +2,22 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-11-15 14:23:21 * @Date: 2024-11-15 14:23:21
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-11-15 15:06:55 * @LastEditTime: 2024-12-03 13:35:29
* @FilePath: \znxjxt-ui\src\views\big-screen\overview-components\components\inspection-view.vue * @FilePath: \znxjxt-ui\src\views\big-screen\overview-components\components\inspection-view.vue
* @Description: 总览大屏-巡检车辆-视频查看弹窗 * @Description: 总览大屏-巡检车辆-视频查看弹窗
--> -->
<template> <template>
<div class="view-content"></div> <div class="view-content">
<video
id="mmiid"
class="video-js vjs-big-play-centered vjs-fluid"
controls
preload="auto"
width="100%"
height="100%"
></video>
</div>
</template> </template>
<script> <script>
@ -33,12 +42,39 @@ export default {
methods: { methods: {
/* 获取视频url地址 */ /* 获取视频url地址 */
getVideo() { getVideo() {
console.log(this.dialogItem); //
getVideoUrl({ id: this.dialogItem.clientId }).then(({ code, data }) => { getVideoUrl({ id: this.dialogItem.clientId }).then(({ code, data }) => {
if (code === 200) { if (code === 200) {
//
if (!data) {
this.$message.error('获取视频流失败');
return;
}
// flv.js
if (flvjs.isSupported()) {
const flvPlayer = flvjs.createPlayer({
type: 'flv',
url: "http://1011.hlsplay.aodianyun.com/demo/game.flv",
isLive: true,
hasAudio: true,
hasVideo: true
});
flvPlayer.attachMediaElement(document.querySelector("#mmiid"));
flvPlayer.load();
flvPlayer.play();
} else {
this.$message.error('当前浏览器不支持FLV播放');
}
} }
}); });
// getVideoUrl({ id: this.dialogItem.clientId }).then(({ code, data }) => {
// if (code === 200) {
// console.log(data, "data");
// }
// });
}, },
}, },
}; };

View File

@ -2,8 +2,8 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-18 10:19:56 * @Date: 2024-10-18 10:19:56
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-11-12 16:18:03 * @LastEditTime: 2024-12-03 11:41:07
* @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\disease-current.vue * @FilePath: \znxjxt-ui\src\views\big-screen\overview-components\disease-current.vue
* @Description: 总览大屏-病害三维饼图 * @Description: 总览大屏-病害三维饼图
--> -->

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-11-08 09:40:18 * @Date: 2024-11-08 09:40:18
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-11-20 16:32:29 * @LastEditTime: 2024-12-03 13:19:02
* @FilePath: \znxjxt-ui\src\views\big-screen\overview-components\inspection-vehicles.vue * @FilePath: \znxjxt-ui\src\views\big-screen\overview-components\inspection-vehicles.vue
* @Description: 总览大屏-巡检车辆 * @Description: 总览大屏-巡检车辆
--> -->
@ -59,7 +59,7 @@
</div> </div>
<div> <div>
<span class="name">设备编号:</span> <span class="name">设备编号:</span>
<span class="value">{{ scope.row.appid }}</span> <span class="value">{{ scope.row.extId }}</span>
</div> </div>
<div> <div>
<span class="name">车辆状态:</span> <span class="name">车辆状态:</span>
@ -67,7 +67,7 @@
</div> </div>
<div> <div>
<span class="name">网络状态:</span> <span class="name">网络状态:</span>
<span class="value">{{ scope.row.status }}</span> <span class="value">{{ scope.row.serverStatus }}</span>
</div> </div>
<div> <div>
<span class="name">设备状态:</span> <span class="name">设备状态:</span>
@ -236,7 +236,9 @@ export default {
this.followTitle = "跟车详情"; this.followTitle = "跟车详情";
this.showCarVisible = true; this.showCarVisible = true;
const carData = { type: "carLocation", status: true }; const carData = { type: "carLocation", status: true };
const defectData = { type: "defect", status: true };
this.$ws.send(carData); this.$ws.send(carData);
this.$ws.send(defectData);
}, },
/** /**
@ -261,7 +263,9 @@ export default {
this.dialogItem = {}; this.dialogItem = {};
// //
const carData = { type: "carLocation", status: false }; const carData = { type: "carLocation", status: false };
const defectData = { type: "defect", status: false };
this.$ws.send(carData); this.$ws.send(carData);
this.$ws.send(defectData);
}, },
/** /**

View File

@ -4,7 +4,7 @@
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-11-20 15:49:28 * @LastEditTime: 2024-11-20 15:49:28
* @FilePath: \znxjxt-ui\src\views\xj\inspection-warn\warning-center\index.vue * @FilePath: \znxjxt-ui\src\views\xj\inspection-warn\warning-center\index.vue
* @Description: 巡检预警中心 * @Description: 预警中心-信息中心
--> -->
<template> <template>
@ -236,8 +236,8 @@ export default {
watch: { watch: {
$route: { $route: {
handler(val) { handler(val) {
if (val.params.status) { if (val.params.title) {
this.activeName = val.params.status; this.activeName = val.params.title;
} }
}, },
deep: true, deep: true,
@ -329,6 +329,7 @@ export default {
markNoticeRead(val.id).then(({ code }) => { markNoticeRead(val.id).then(({ code }) => {
if (code === 200) { if (code === 200) {
this.getList(); this.getList();
this.getNav();
} }
}); });
} }

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-14 09:48:43 * @Date: 2024-10-14 09:48:43
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-12-02 16:41:53 * @LastEditTime: 2024-12-03 11:44:24
* @FilePath: \znxjxt-ui\src\views\xj\inspection\task-management\index.vue * @FilePath: \znxjxt-ui\src\views\xj\inspection\task-management\index.vue
* @Description: 巡检管理-巡检任务 * @Description: 巡检管理-巡检任务
--> -->
@ -195,6 +195,7 @@ import {
getRoadType, getRoadType,
getTaskIdList, getTaskIdList,
getDefectList, getDefectList,
exportDefectData,
} from "@/api/xj/task"; } from "@/api/xj/task";
export default { export default {
@ -396,7 +397,14 @@ export default {
* @param {*} item * @param {*} item
* @return {*} * @return {*}
*/ */
handleExport(item) {}, handleExport(item) {
exportDefectData({ taskId: item.extId }).then(({ code, data }) => {
if(code===200){
console.log(data,'ddd');
}
});
},
/** /**
* @description: 切换分页 * @description: 切换分页