From 5de657f52957325088d5c9cdbde36f16ea2823b1 Mon Sep 17 00:00:00 2001
From: fanluyan <754122931@qq.com>
Date: Tue, 8 Apr 2025 17:29:52 +0800
Subject: [PATCH] a
---
src/components/Sidebar.vue | 4 +
src/router/index.js | 11 +
src/utils/api/index.js | 19 +
src/utils/api/reportApi.js | 10 -
src/views/photoTotal/index.vue | 547 ++++++++++++++++++
src/views/realTimeSearch/index.vue | 20 +-
src/views/reportData/index.vue | 27 -
.../photoTotal/components/ipDialog.vue | 184 ------
.../photoTotal/components/photoList.vue | 235 --------
.../photoTotal/components/photoTimeList.vue | 193 ------
src/views/reportData/photoTotal/index.vue | 526 -----------------
src/views/waterMark/index.vue | 2 +-
12 files changed, 601 insertions(+), 1177 deletions(-)
create mode 100644 src/views/photoTotal/index.vue
delete mode 100644 src/views/reportData/photoTotal/components/ipDialog.vue
delete mode 100644 src/views/reportData/photoTotal/components/photoList.vue
delete mode 100644 src/views/reportData/photoTotal/components/photoTimeList.vue
delete mode 100644 src/views/reportData/photoTotal/index.vue
diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue
index ae15b7e..7b26e59 100644
--- a/src/components/Sidebar.vue
+++ b/src/components/Sidebar.vue
@@ -127,6 +127,10 @@ export default {
index: "/reportData",
title: "数据报表",
},
+ // {
+ // index: "/photoTotal",
+ // title: "图片数据统计",
+ // },
],
},
{
diff --git a/src/router/index.js b/src/router/index.js
index 033cbe6..dbbfa1a 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -220,6 +220,17 @@ const routes = [
requiresAuth: true,
},
},
+ {
+ path: "/photoTotal",
+ component: () => import("../views/photoTotal/index.vue"),
+ name: "photoTotal",
+ meta: {
+ title: "图片数据统计",
+ icon: "",
+ keepAlive: true,
+ requiresAuth: true,
+ },
+ },
{
path: "/aiwork",
component: () => import("../views/system/drawPic.vue"),
diff --git a/src/utils/api/index.js b/src/utils/api/index.js
index da29936..e3b5647 100644
--- a/src/utils/api/index.js
+++ b/src/utils/api/index.js
@@ -1051,3 +1051,22 @@ export function deletePresetApi(data) {
},
});
}
+//图片统计结果
+
+export function getPhotoStatApi(data) {
+ return request({
+ url: "/xymanager/getPhotoStat",
+ method: "post",
+ data,
+ });
+}
+
+//导出图片统计结果
+export function exportPhotoJoggle(data) {
+ return request({
+ url: "/xymanager/exportPhotoStat",
+ method: "get",
+ params: data,
+ responseType: "blob", // 关键!必须添加这个配置
+ });
+}
diff --git a/src/utils/api/reportApi.js b/src/utils/api/reportApi.js
index fd10ed7..2053da6 100644
--- a/src/utils/api/reportApi.js
+++ b/src/utils/api/reportApi.js
@@ -59,13 +59,3 @@ export function getActivityApi(data) {
params: data,
});
}
-
-//图片统计结果
-
-export function getPhotoStatApi(data) {
- return request({
- url: "/xymanager/getPhotoStat",
- method: "post",
- data,
- });
-}
diff --git a/src/views/photoTotal/index.vue b/src/views/photoTotal/index.vue
new file mode 100644
index 0000000..e8afeb3
--- /dev/null
+++ b/src/views/photoTotal/index.vue
@@ -0,0 +1,547 @@
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 通道{{ channelItem.channelId }}-预置位{{
+ presetItem.presetId
+ }}
+ -
+ {{ wrongHour.hour }}-多{{ wrongHour.total - 2 }}少{{ 2 - wrongHour.total }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/realTimeSearch/index.vue b/src/views/realTimeSearch/index.vue
index aa48c49..8ad996e 100644
--- a/src/views/realTimeSearch/index.vue
+++ b/src/views/realTimeSearch/index.vue
@@ -105,6 +105,9 @@
查询
+
+ 导出数据
+
@@ -216,6 +219,7 @@ import {
getSearchInfo,
getRealtimePhoto,
deletePicList,
+ exportPhotoJoggle,
} from "@/utils/api/index";
import defaultImage from "../../assets/img/nodatapic2.jpg";
export default {
@@ -413,7 +417,21 @@ export default {
this.page = 1;
this.getPicData();
},
-
+ exportData() {
+ console.log(this.formdata);
+ exportPhotoJoggle(this.formdata)
+ .then((res) => {
+ console.log(res);
+ const now = this.$moment(new Date());
+ const formattedTime = now.format("YYYY年MM月DD日HH时mm分"); // 格式化时间字符串,例如 "2023-04-01_15_30_00"
+ const blob = new Blob([res]);
+ const link = document.createElement("a");
+ link.href = window.URL.createObjectURL(blob);
+ link.download = `运维数据报表_${formattedTime}.xls`;
+ link.click();
+ })
+ .catch((err) => {});
+ },
//点击分页
handleCurrentChange(val) {
this.page = val;
diff --git a/src/views/reportData/index.vue b/src/views/reportData/index.vue
index b2742b4..ffccf81 100644
--- a/src/views/reportData/index.vue
+++ b/src/views/reportData/index.vue
@@ -29,19 +29,6 @@
:statusFlag="statusFlag"
>
-
@@ -50,13 +37,11 @@ import {} from "@/utils/api/index";
import photostatis from "./photostatis/index";
import equipmentStatus from "./equipmentStatus/index";
-import photoTotal from "./photoTotal/index";
export default {
name: "reportData",
components: {
photostatis,
equipmentStatus,
- photoTotal,
},
data() {
return {
@@ -90,14 +75,6 @@ export default {
this.$refs.equipmentStatusRef.initfn(); // 假设someOtherMethod是你要调用的方法
//this.$refs.equipmentStatusRef.onSubmit(); // 假设someOtherMethod是你要调用的方法
}
- } else if (tabName === "图片数量统计") {
- this.picSearchFlag = false;
- this.statusFlag = false;
- this.pictotalFlag = true;
- if (this.$refs.photoTotalRef) {
- this.$refs.photoTotalRef.initfn(); // 假设someOtherMethod是你要调用的方法
- //this.$refs.equipmentStatusRef.onSubmit(); // 假设someOtherMethod是你要调用的方法
- }
}
// 可以继续添加其他标签页的逻辑
},
@@ -109,10 +86,6 @@ export default {
console.log("bbbbbb");
this.$refs.equipmentStatusRef.showSearch();
},
- handlepicTotal() {
- console.log("ccc");
- this.$refs.photoTotalRef.showSearch();
- },
},
};
diff --git a/src/views/reportData/photoTotal/components/ipDialog.vue b/src/views/reportData/photoTotal/components/ipDialog.vue
deleted file mode 100644
index c8ac2d7..0000000
--- a/src/views/reportData/photoTotal/components/ipDialog.vue
+++ /dev/null
@@ -1,184 +0,0 @@
-
-
- 装置编号:{{ rowData.cmdid }}
- 总数:{{ total }}
-
-
-
-
-
-
-
-
- {{ scope.$index + 1 }}
-
-
-
-
- {{
- scope.row.createTime == null || scope.row.createTime == 0
- ? ""
- : scope.row.createTime
- }}
-
-
-
-
- {{
- scope.row.heartbeatTime == null || scope.row.heartbeatTime == 0
- ? ""
- : $moment(scope.row.heartbeatTime * 1000).format(
- "YYYY-MM-DD HH:mm:ss"
- )
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/reportData/photoTotal/components/photoList.vue b/src/views/reportData/photoTotal/components/photoList.vue
deleted file mode 100644
index b64bf56..0000000
--- a/src/views/reportData/photoTotal/components/photoList.vue
+++ /dev/null
@@ -1,235 +0,0 @@
-
-
-
- 装置编号:{{ rowData.cmdid }}
- 图片总数:{{ total }}
-
- 全部
- 通道1
- 通道2
- 通道3
- 通道4
- 通道5
- 通道6
- 通道7
- 通道8
-
-
-
-
-
-
-
-
-
- {{ (page - 1) * pageSize + scope.$index + 1 }}
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.mediaType == 0 ? "图片" : "视频" }}
-
-
-
-
-
-
-
- {{ scope.row.picid }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/reportData/photoTotal/components/photoTimeList.vue b/src/views/reportData/photoTotal/components/photoTimeList.vue
deleted file mode 100644
index 1d60397..0000000
--- a/src/views/reportData/photoTotal/components/photoTimeList.vue
+++ /dev/null
@@ -1,193 +0,0 @@
-
-
- {{ rowData.cmdid }}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/reportData/photoTotal/index.vue b/src/views/reportData/photoTotal/index.vue
deleted file mode 100644
index b33ccd0..0000000
--- a/src/views/reportData/photoTotal/index.vue
+++ /dev/null
@@ -1,526 +0,0 @@
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
-
-
-
-
-
-
-
-
-
-
- {{ (page - 1) * pageSize + scope.$index + 1 }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/waterMark/index.vue b/src/views/waterMark/index.vue
index e0de9c8..f61f086 100644
--- a/src/views/waterMark/index.vue
+++ b/src/views/waterMark/index.vue
@@ -152,7 +152,7 @@ export default {
for (let j = 0; j < this.checkList.length; j++) {
for (let i = 0; i < this.cmdidArr.length; i++) {
var command =
- ".\\bin\\xympadmn.exe --server=61.169.135.150 --port=6891 --act=osd --cmdid=" +
+ ".\\bin\\xympadmn.exe --server=61.169.135.150 --port=6891 --udp=1 --showTime=1 --showText=0 --text= --act=osd --cmdid=" +
this.cmdidArr[i] +
" --flag=1 --channel=" +
this.checkList[j] +