From 6bd229588de589768016f51a926f929264a0eaca Mon Sep 17 00:00:00 2001
From: fanluyan <754122931@qq.com>
Date: Thu, 20 Jul 2023 13:28:08 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96=EF=BC=8C?=
=?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=98=BE=E7=A4=BA=E5=8E=9F=E5=9B=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/common/Sidebar.vue | 2 +-
src/utils/api/index.js | 8 +
src/views/alarmHandling/index.vue | 12 +-
src/views/components/carouselChart.vue | 7 +-
src/views/realTimeSearch/index.vue | 36 ++-
src/views/stritl/index.vue | 357 ++++++++++++++++++++++++-
6 files changed, 405 insertions(+), 17 deletions(-)
diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue
index 7c900b5..d9f18de 100644
--- a/src/components/common/Sidebar.vue
+++ b/src/components/common/Sidebar.vue
@@ -55,7 +55,7 @@ export default {
items: [
{
icon: "el-icon-s-home",
- index: "/videoHistory",
+ index: "/stritl",
title: "首页",
},
{
diff --git a/src/utils/api/index.js b/src/utils/api/index.js
index 7256edb..005c5ef 100644
--- a/src/utils/api/index.js
+++ b/src/utils/api/index.js
@@ -7,6 +7,14 @@ export function loginJoggle(data) {
data,
});
}
+//获取装置总数图表
+export function getTermStatistics(data) {
+ return request({
+ url: "/api/getTermStatistics",
+ method: "get",
+ params: data,
+ });
+}
//获取所有杆塔下的图片列表,实时监控
export function getTowerAndPhotoList(data) {
diff --git a/src/views/alarmHandling/index.vue b/src/views/alarmHandling/index.vue
index c9792af..56967bf 100644
--- a/src/views/alarmHandling/index.vue
+++ b/src/views/alarmHandling/index.vue
@@ -445,7 +445,10 @@ export default {
var y = e.pageY - img.offsetTop;
// 添加鼠标移动事件
personBox.addEventListener("mousemove", move);
+ console.log(personBox.addEventListener("mousemove", move));
+ console.log(personBox.style);
function move(e) {
+ console.log(personBox.style.left);
personBox.style.left = e.pageX - x + "px";
personBox.style.top = e.pageY - y + "px";
}
@@ -995,8 +998,8 @@ export default {
cursor: pointer;
.picboxI {
position: relative;
- width: 1366px;
- height: 768px;
+ width: 1538px;
+ height: 865px;
margin: auto;
animation-name: scaleDraw;
/*关键帧名称*/
@@ -1009,8 +1012,9 @@ export default {
align-items: center;
justify-content: center;
img {
- max-width: 1366px;
- max-height: 768px;
+ max-width: 1538px;
+ max-height: 865px;
+
margin: auto;
position: absolute;
cursor: grab;
diff --git a/src/views/components/carouselChart.vue b/src/views/components/carouselChart.vue
index 584a2a1..00fae2f 100644
--- a/src/views/components/carouselChart.vue
+++ b/src/views/components/carouselChart.vue
@@ -16,7 +16,12 @@
:style="'backgroundImage:url(' + bigPicPath + ')'"
>
-
![]()
+
diff --git a/src/views/realTimeSearch/index.vue b/src/views/realTimeSearch/index.vue
index 9ff382b..8a5271d 100644
--- a/src/views/realTimeSearch/index.vue
+++ b/src/views/realTimeSearch/index.vue
@@ -116,7 +116,7 @@
class="bigpic"
v-if="item.path.indexOf('videos') == -1"
>
-
+
@@ -284,7 +284,11 @@ export default {
this.dyOptions = this.dyOptions.concat(res.data.list);
console.log(this.dyOptions);
//this.formdata.dyid = this.dyOptions[0].id;
- this.formdata.dyid = Number(this.$route.query.dyId);
+ if (JSON.stringify(this.$route.query) === "{}") {
+ this.formdata.dyid = this.dyOptions[0].id;
+ } else {
+ this.formdata.dyid = Number(this.$route.query.dyId);
+ }
// this.$set(this.formdata, 'dyid', this.dyOptions[0].id)
this.getSearchxl();
@@ -298,7 +302,12 @@ export default {
this.xlOptions = [{ id: -1, name: "全部" }];
this.xlOptions = this.xlOptions.concat(res.data.list);
// this.formdata.lineid = this.xlOptions[0].id;
- this.formdata.lineid = Number(this.$route.query.lineId);
+ if (JSON.stringify(this.$route.query) === "{}") {
+ this.formdata.lineid = this.xlOptions[0].id;
+ } else {
+ this.formdata.lineid = Number(this.$route.query.lineId);
+ }
+
this.getSearchgt();
})
.catch((err) => {});
@@ -310,7 +319,12 @@ export default {
this.gtOptions = [{ id: -1, name: "全部" }];
this.gtOptions = this.gtOptions.concat(res.data.list);
// this.formdata.towerid = this.gtOptions[0].id;
- this.formdata.towerid = Number(this.$route.query.towerId);
+ if (JSON.stringify(this.$route.query) === "{}") {
+ this.formdata.towerid = this.gtOptions[0].id;
+ } else {
+ this.formdata.towerid = Number(this.$route.query.towerId);
+ }
+
this.getSearchzz();
})
.catch((err) => {});
@@ -322,7 +336,12 @@ export default {
this.zzOptions = [{ id: -1, name: "全部" }];
this.zzOptions = this.zzOptions.concat(res.data.list);
// this.formdata.termid = this.zzOptions[0].id;
- this.formdata.termid = Number(this.$route.query.termId);
+ if (JSON.stringify(this.$route.query) === "{}") {
+ this.formdata.termid = this.zzOptions[0].id;
+ } else {
+ this.formdata.termid = Number(this.$route.query.termId);
+ }
+
this.getSearchtd();
})
.catch((err) => {});
@@ -334,7 +353,12 @@ export default {
this.tdOptions = [{ id: -1, name: "全部", alias: null }];
this.tdOptions = this.tdOptions.concat(res.data.list);
//this.formdata.channelid = this.tdOptions[0].id;
- this.formdata.channelid = Number(this.$route.query.channelId);
+ if (JSON.stringify(this.$route.query) === "{}") {
+ this.formdata.channelid = this.tdOptions[0].id;
+ } else {
+ this.formdata.channelid = Number(this.$route.query.channelId);
+ }
+
// if (this.signtype == 0) {
// this.getPicData();
// }
diff --git a/src/views/stritl/index.vue b/src/views/stritl/index.vue
index f79e003..0209fa4 100644
--- a/src/views/stritl/index.vue
+++ b/src/views/stritl/index.vue
@@ -1,13 +1,360 @@
- 首页
+
+
+
+ 装置数量统计
+
+
+
+ 装置总数
+ 1
+
+
+ 在线数量
+ 2
+
+
+ 杆塔覆盖率
+ 3%
+
+
+ 在线率
+ 4%
+
+
+
+
+
+
+ 装置在线统计
+
+
+
+
+
+ 隐患数量统计
+
+
+
+
+
+
+
+ 隐患分类统计
+
+
+
+
+
+
+
+
+
+ getEchart2() {
+ this.$nextTick(() => {
+ this.$echarts.init(document.getElementById("echart2")).dispose();
+ this.myChart2 = this.$echarts.init(document.getElementById("echart2"));
+ let option = {
+ // title: {
+ // text: "装置在线统计",
+ // },
+ tooltip: {
+ trigger: "item",
+ },
+ legend: {
+ top: "5%",
+ left: "center",
+ },
+ series: [
+ {
+ type: "pie",
+ radius: ["40%", "70%"],
+ avoidLabelOverlap: false,
+ itemStyle: {
+ borderRadius: 10,
+ borderColor: "#fff",
+ borderWidth: 2,
+ },
+ label: {
+ show: true,
+ fontSize: 16,
+ fontWeight: "bold",
+ formatter: "{b}\n{d}%",
+ },
+ emphasis: {
+ label: {
+ show: true,
+ fontSize: 26,
+ fontWeight: "bold",
+ formatter: "{b}\n{d}%",
+ },
+ },
+ labelLine: {
+ show: true,
+ },
+ data: [
+ { value: 1048, name: "在线" },
+ { value: 735, name: "离线" },
+ ],
+ },
+ ],
+ };
+ this.myChart2.setOption(option);
+ window.addEventListener("resize", () => {
+ this.myChart2.resize();
+ });
+ });
+ },
+
+ getEchart3() {
+ this.$nextTick(() => {
+ this.$echarts.init(document.getElementById("echart3")).dispose();
+ this.myChart3 = this.$echarts.init(document.getElementById("echart3"));
+ let option = {
+ // title: {
+ // text: "隐患分类统计",
+ // },
+ xAxis: {
+ type: "category",
+ data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+ },
+ yAxis: { type: "value" },
+ series: [
+ {
+ data: [120, 200, 150, 80, 70, 110, 130],
+ type: "bar",
+ showBackground: true,
+ backgroundStyle: { color: "rgba(180, 180, 180, 0.2)" },
+ },
+ ],
+ };
+ this.myChart3.setOption(option);
+ window.addEventListener("resize", () => {
+ this.myChart3.resize();
+ });
+ });
+ },
+ getEchart4() {
+ this.$nextTick(() => {
+ this.$echarts.init(document.getElementById("echart4")).dispose();
+ this.myChart4 = this.$echarts.init(document.getElementById("echart4"));
+ let option = {
+ // title: {
+ // text: "隐患分类统计",
+ // },
+ xAxis: {
+ type: "category",
+ data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+ },
+ yAxis: { type: "value" },
+ series: [
+ {
+ data: [120, 200, 150, 80, 70, 110, 130],
+ type: "bar",
+ showBackground: true,
+ backgroundStyle: { color: "rgba(180, 180, 180, 0.2)" },
+ },
+ ],
+ };
+ this.myChart4.setOption(option);
+ window.addEventListener("resize", () => {
+ this.myChart4.resize();
+ });
+ });
+ },
+ },
+};
+