diff --git a/src/components/NFCloudPlatform/Attic.vue b/src/components/NFCloudPlatform/Attic.vue deleted file mode 100644 index a55aaaf..0000000 --- a/src/components/NFCloudPlatform/Attic.vue +++ /dev/null @@ -1,639 +0,0 @@ - - - - - diff --git a/src/components/NFCloudPlatform/Attic.vue b/src/components/NFCloudPlatform/Attic.vue deleted file mode 100644 index a55aaaf..0000000 --- a/src/components/NFCloudPlatform/Attic.vue +++ /dev/null @@ -1,639 +0,0 @@ - - - - - diff --git a/src/components/NFCloudPlatform/GroundFloor.vue b/src/components/NFCloudPlatform/GroundFloor.vue deleted file mode 100644 index 8c9e773..0000000 --- a/src/components/NFCloudPlatform/GroundFloor.vue +++ /dev/null @@ -1,435 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/Attic.vue b/src/components/NFCloudPlatform/Attic.vue deleted file mode 100644 index a55aaaf..0000000 --- a/src/components/NFCloudPlatform/Attic.vue +++ /dev/null @@ -1,639 +0,0 @@ - - - - - diff --git a/src/components/NFCloudPlatform/GroundFloor.vue b/src/components/NFCloudPlatform/GroundFloor.vue deleted file mode 100644 index 8c9e773..0000000 --- a/src/components/NFCloudPlatform/GroundFloor.vue +++ /dev/null @@ -1,435 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/RealTime.vue b/src/components/NFCloudPlatform/RealTime.vue deleted file mode 100644 index 8958f31..0000000 --- a/src/components/NFCloudPlatform/RealTime.vue +++ /dev/null @@ -1,179 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/Attic.vue b/src/components/NFCloudPlatform/Attic.vue deleted file mode 100644 index a55aaaf..0000000 --- a/src/components/NFCloudPlatform/Attic.vue +++ /dev/null @@ -1,639 +0,0 @@ - - - - - diff --git a/src/components/NFCloudPlatform/GroundFloor.vue b/src/components/NFCloudPlatform/GroundFloor.vue deleted file mode 100644 index 8c9e773..0000000 --- a/src/components/NFCloudPlatform/GroundFloor.vue +++ /dev/null @@ -1,435 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/RealTime.vue b/src/components/NFCloudPlatform/RealTime.vue deleted file mode 100644 index 8958f31..0000000 --- a/src/components/NFCloudPlatform/RealTime.vue +++ /dev/null @@ -1,179 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/VideoSurveillance.vue b/src/components/NFCloudPlatform/VideoSurveillance.vue deleted file mode 100644 index a5eeb3d..0000000 --- a/src/components/NFCloudPlatform/VideoSurveillance.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - - diff --git a/src/components/NFCloudPlatform/Attic.vue b/src/components/NFCloudPlatform/Attic.vue deleted file mode 100644 index a55aaaf..0000000 --- a/src/components/NFCloudPlatform/Attic.vue +++ /dev/null @@ -1,639 +0,0 @@ - - - - - diff --git a/src/components/NFCloudPlatform/GroundFloor.vue b/src/components/NFCloudPlatform/GroundFloor.vue deleted file mode 100644 index 8c9e773..0000000 --- a/src/components/NFCloudPlatform/GroundFloor.vue +++ /dev/null @@ -1,435 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/RealTime.vue b/src/components/NFCloudPlatform/RealTime.vue deleted file mode 100644 index 8958f31..0000000 --- a/src/components/NFCloudPlatform/RealTime.vue +++ /dev/null @@ -1,179 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/VideoSurveillance.vue b/src/components/NFCloudPlatform/VideoSurveillance.vue deleted file mode 100644 index a5eeb3d..0000000 --- a/src/components/NFCloudPlatform/VideoSurveillance.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - - diff --git a/src/components/configure/PushRules.vue b/src/components/configure/PushRules.vue index 69b9b5b..b235fee 100644 --- a/src/components/configure/PushRules.vue +++ b/src/components/configure/PushRules.vue @@ -33,10 +33,11 @@ - + + + -
-
-
-
-
-
-
-
视频监控
-
- -
-
-
-
-
水泵控制台
-
- 水泵状态: - - -
-
-
- 启  动 -
-
- 停  止 -
-
-
-
-
阀门控制台
-
- 阀门状态: - - -
-
-
- 启  动 -
-
- 停  止 -
-
-
-
-
-
-
阀门开度
-
- - 确定 -
-
- 最小值:0     - 最大值:100     - 提示:阀门开度尽量不要超过50 -
-
- 阀门开度值:{{ waterValue }}%     -
-
-
-
-
监控数据
- -
-
- 流量 - {{ Liuliang }} - 水位 - {{ shuiwei }} -
-
-
-
-
- - - - - diff --git a/src/components/NFCloudPlatform/GroundFloor.vue b/src/components/NFCloudPlatform/GroundFloor.vue deleted file mode 100644 index 8c9e773..0000000 --- a/src/components/NFCloudPlatform/GroundFloor.vue +++ /dev/null @@ -1,435 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/RealTime.vue b/src/components/NFCloudPlatform/RealTime.vue deleted file mode 100644 index 8958f31..0000000 --- a/src/components/NFCloudPlatform/RealTime.vue +++ /dev/null @@ -1,179 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/VideoSurveillance.vue b/src/components/NFCloudPlatform/VideoSurveillance.vue deleted file mode 100644 index a5eeb3d..0000000 --- a/src/components/NFCloudPlatform/VideoSurveillance.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - - diff --git a/src/components/configure/PushRules.vue b/src/components/configure/PushRules.vue index 69b9b5b..b235fee 100644 --- a/src/components/configure/PushRules.vue +++ b/src/components/configure/PushRules.vue @@ -33,10 +33,11 @@ - + + + - 平台站点数量及状态统计 + 站点统计 +
+ 全部 + 合同 + 临测 +
@@ -240,7 +243,7 @@ {{ item.groupName }}{{ item.RegionName }}
{ - console.log(response); + // console.log(response); if (response.status === 200) { this.ProjectList = this.ProjectList.concat(response.data.data); // console.log(this.ProjectList); @@ -429,7 +443,7 @@ message(response); }); }, - // 根据平台渲染站点数量统计及状态统计 + // 根据平台渲染站点统计 loadSiteNumForOroject(platform) { this.$http .post(this.nozzle.sysPlatformGetSiteCountAndState, { @@ -459,6 +473,36 @@ message(response); }); }, + // 单击显示平台站点 + allpreview(platform) { + this.$http + .post(this.nozzle.sysPlatformGetSiteCountAndState, { + data: { platform: platform } + }) + .then(response => { + if (response.data.code === 200) { + // 将当前数据设置成数字滚动的初始值 + this.Site.SAll = this.Site.EAll; + this.Site.SOn = this.Site.EOn; + this.Site.SOff = this.Site.EOff; + this.Project.SAll = this.Project.EAll; + this.Project.SOn = this.Project.EOn; + this.Project.SOff = this.Project.EOff; + // 将新数据设置成数字滚动的结束值 也就是展示值 + this.Site.EAll = response.data.data.sitecount; + this.Site.EOn = response.data.data.onlinecount; + this.Site.EOff = response.data.data.offlinecount; + this.Project.EAll = response.data.data.projectcount; + this.Project.EOn = response.data.data.completed; + this.Project.EOff = response.data.data.noncompleted; + } else { + message(response); + } + }) + .catch(response => { + message(response); + }); + }, // 加载项目站点覆盖排名 loadQuyuPaiMing() { this.$http @@ -1186,6 +1230,26 @@ color: rgb(0, 119, 254); vertical-align: middle; } +.previewOfSiteStatusTitleBTN { + position: absolute; + top: 8px; + color: var(--eldatebefore); + right: 20px; + border: 1px solid var(--eldatebefore); + height: 26px; + line-height: 26px; +} +.previewOfSiteStatusTitleBTN span { + float: left; + font-size: 12px; + padding: 0 10px; + cursor: pointer; + height: 100%; + border-right: 1px solid var(--eldatebefore); +} +.previewOfSiteStatusTitleBTN span:nth-child(3) { + border-right: none; +} #previewOfSiteStatusTop { position: absolute; top: 0; @@ -1255,11 +1319,11 @@ cursor: pointer; width: 48%; height: 0.213333rem; - margin-top: 0.133333rem; + margin-top: 0.1125rem; line-height: 0.213333rem; font-size: 0.093333rem; text-align: center; - border: 1px solid rgb(118, 133, 149); + border: 1px solid var(--eldatebefore); color: #fff; background: var(--pretextbg); } @@ -1364,7 +1428,7 @@ } .previewOfSiteStatusCentent3LiName { float: left; - width: 70px; + width: 90px; color: var(--white); text-align: left; height: 40px; @@ -1514,11 +1578,13 @@ width: 40%; float: left; font-size: 14px; + color: var(--white); } .GIsRightWaringListName { width: 45%; float: left; font-size: 14px; + color: var(--white); } .GIsRightWaringListType { width: 15%; @@ -1529,7 +1595,7 @@ color: red; } .Yellow { - color: yellow; + color: var(--diatitle); } .NoBaoJing { position: relative; diff --git a/src/components/NFCloudPlatform/Attic.vue b/src/components/NFCloudPlatform/Attic.vue deleted file mode 100644 index a55aaaf..0000000 --- a/src/components/NFCloudPlatform/Attic.vue +++ /dev/null @@ -1,639 +0,0 @@ - - - - - diff --git a/src/components/NFCloudPlatform/GroundFloor.vue b/src/components/NFCloudPlatform/GroundFloor.vue deleted file mode 100644 index 8c9e773..0000000 --- a/src/components/NFCloudPlatform/GroundFloor.vue +++ /dev/null @@ -1,435 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/RealTime.vue b/src/components/NFCloudPlatform/RealTime.vue deleted file mode 100644 index 8958f31..0000000 --- a/src/components/NFCloudPlatform/RealTime.vue +++ /dev/null @@ -1,179 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/VideoSurveillance.vue b/src/components/NFCloudPlatform/VideoSurveillance.vue deleted file mode 100644 index a5eeb3d..0000000 --- a/src/components/NFCloudPlatform/VideoSurveillance.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - - diff --git a/src/components/configure/PushRules.vue b/src/components/configure/PushRules.vue index 69b9b5b..b235fee 100644 --- a/src/components/configure/PushRules.vue +++ b/src/components/configure/PushRules.vue @@ -33,10 +33,11 @@ - + + + - 平台站点数量及状态统计 + 站点统计 +
+ 全部 + 合同 + 临测 +
@@ -240,7 +243,7 @@ {{ item.groupName }}{{ item.RegionName }}
{ - console.log(response); + // console.log(response); if (response.status === 200) { this.ProjectList = this.ProjectList.concat(response.data.data); // console.log(this.ProjectList); @@ -429,7 +443,7 @@ message(response); }); }, - // 根据平台渲染站点数量统计及状态统计 + // 根据平台渲染站点统计 loadSiteNumForOroject(platform) { this.$http .post(this.nozzle.sysPlatformGetSiteCountAndState, { @@ -459,6 +473,36 @@ message(response); }); }, + // 单击显示平台站点 + allpreview(platform) { + this.$http + .post(this.nozzle.sysPlatformGetSiteCountAndState, { + data: { platform: platform } + }) + .then(response => { + if (response.data.code === 200) { + // 将当前数据设置成数字滚动的初始值 + this.Site.SAll = this.Site.EAll; + this.Site.SOn = this.Site.EOn; + this.Site.SOff = this.Site.EOff; + this.Project.SAll = this.Project.EAll; + this.Project.SOn = this.Project.EOn; + this.Project.SOff = this.Project.EOff; + // 将新数据设置成数字滚动的结束值 也就是展示值 + this.Site.EAll = response.data.data.sitecount; + this.Site.EOn = response.data.data.onlinecount; + this.Site.EOff = response.data.data.offlinecount; + this.Project.EAll = response.data.data.projectcount; + this.Project.EOn = response.data.data.completed; + this.Project.EOff = response.data.data.noncompleted; + } else { + message(response); + } + }) + .catch(response => { + message(response); + }); + }, // 加载项目站点覆盖排名 loadQuyuPaiMing() { this.$http @@ -1186,6 +1230,26 @@ color: rgb(0, 119, 254); vertical-align: middle; } +.previewOfSiteStatusTitleBTN { + position: absolute; + top: 8px; + color: var(--eldatebefore); + right: 20px; + border: 1px solid var(--eldatebefore); + height: 26px; + line-height: 26px; +} +.previewOfSiteStatusTitleBTN span { + float: left; + font-size: 12px; + padding: 0 10px; + cursor: pointer; + height: 100%; + border-right: 1px solid var(--eldatebefore); +} +.previewOfSiteStatusTitleBTN span:nth-child(3) { + border-right: none; +} #previewOfSiteStatusTop { position: absolute; top: 0; @@ -1255,11 +1319,11 @@ cursor: pointer; width: 48%; height: 0.213333rem; - margin-top: 0.133333rem; + margin-top: 0.1125rem; line-height: 0.213333rem; font-size: 0.093333rem; text-align: center; - border: 1px solid rgb(118, 133, 149); + border: 1px solid var(--eldatebefore); color: #fff; background: var(--pretextbg); } @@ -1364,7 +1428,7 @@ } .previewOfSiteStatusCentent3LiName { float: left; - width: 70px; + width: 90px; color: var(--white); text-align: left; height: 40px; @@ -1514,11 +1578,13 @@ width: 40%; float: left; font-size: 14px; + color: var(--white); } .GIsRightWaringListName { width: 45%; float: left; font-size: 14px; + color: var(--white); } .GIsRightWaringListType { width: 15%; @@ -1529,7 +1595,7 @@ color: red; } .Yellow { - color: yellow; + color: var(--diatitle); } .NoBaoJing { position: relative; diff --git a/src/main.js b/src/main.js index 5d5ab70..900d84a 100644 --- a/src/main.js +++ b/src/main.js @@ -82,6 +82,15 @@ } return isExist; }; +Vue.filter("timefilter", function(time) { + var H = parseInt(time / 3600); + var M = parseInt((time / 60) % 60); + if (M > 0) { + return `${H}小时${M}分钟`; + } else { + return `${H}小时`; + } +}); /* eslint-disable no-new */ const vue = new Vue({ diff --git a/src/components/NFCloudPlatform/Attic.vue b/src/components/NFCloudPlatform/Attic.vue deleted file mode 100644 index a55aaaf..0000000 --- a/src/components/NFCloudPlatform/Attic.vue +++ /dev/null @@ -1,639 +0,0 @@ - - - - - diff --git a/src/components/NFCloudPlatform/GroundFloor.vue b/src/components/NFCloudPlatform/GroundFloor.vue deleted file mode 100644 index 8c9e773..0000000 --- a/src/components/NFCloudPlatform/GroundFloor.vue +++ /dev/null @@ -1,435 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/RealTime.vue b/src/components/NFCloudPlatform/RealTime.vue deleted file mode 100644 index 8958f31..0000000 --- a/src/components/NFCloudPlatform/RealTime.vue +++ /dev/null @@ -1,179 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/VideoSurveillance.vue b/src/components/NFCloudPlatform/VideoSurveillance.vue deleted file mode 100644 index a5eeb3d..0000000 --- a/src/components/NFCloudPlatform/VideoSurveillance.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - - diff --git a/src/components/configure/PushRules.vue b/src/components/configure/PushRules.vue index 69b9b5b..b235fee 100644 --- a/src/components/configure/PushRules.vue +++ b/src/components/configure/PushRules.vue @@ -33,10 +33,11 @@ - + + + - 平台站点数量及状态统计 + 站点统计 +
+ 全部 + 合同 + 临测 +
@@ -240,7 +243,7 @@ {{ item.groupName }}{{ item.RegionName }}
{ - console.log(response); + // console.log(response); if (response.status === 200) { this.ProjectList = this.ProjectList.concat(response.data.data); // console.log(this.ProjectList); @@ -429,7 +443,7 @@ message(response); }); }, - // 根据平台渲染站点数量统计及状态统计 + // 根据平台渲染站点统计 loadSiteNumForOroject(platform) { this.$http .post(this.nozzle.sysPlatformGetSiteCountAndState, { @@ -459,6 +473,36 @@ message(response); }); }, + // 单击显示平台站点 + allpreview(platform) { + this.$http + .post(this.nozzle.sysPlatformGetSiteCountAndState, { + data: { platform: platform } + }) + .then(response => { + if (response.data.code === 200) { + // 将当前数据设置成数字滚动的初始值 + this.Site.SAll = this.Site.EAll; + this.Site.SOn = this.Site.EOn; + this.Site.SOff = this.Site.EOff; + this.Project.SAll = this.Project.EAll; + this.Project.SOn = this.Project.EOn; + this.Project.SOff = this.Project.EOff; + // 将新数据设置成数字滚动的结束值 也就是展示值 + this.Site.EAll = response.data.data.sitecount; + this.Site.EOn = response.data.data.onlinecount; + this.Site.EOff = response.data.data.offlinecount; + this.Project.EAll = response.data.data.projectcount; + this.Project.EOn = response.data.data.completed; + this.Project.EOff = response.data.data.noncompleted; + } else { + message(response); + } + }) + .catch(response => { + message(response); + }); + }, // 加载项目站点覆盖排名 loadQuyuPaiMing() { this.$http @@ -1186,6 +1230,26 @@ color: rgb(0, 119, 254); vertical-align: middle; } +.previewOfSiteStatusTitleBTN { + position: absolute; + top: 8px; + color: var(--eldatebefore); + right: 20px; + border: 1px solid var(--eldatebefore); + height: 26px; + line-height: 26px; +} +.previewOfSiteStatusTitleBTN span { + float: left; + font-size: 12px; + padding: 0 10px; + cursor: pointer; + height: 100%; + border-right: 1px solid var(--eldatebefore); +} +.previewOfSiteStatusTitleBTN span:nth-child(3) { + border-right: none; +} #previewOfSiteStatusTop { position: absolute; top: 0; @@ -1255,11 +1319,11 @@ cursor: pointer; width: 48%; height: 0.213333rem; - margin-top: 0.133333rem; + margin-top: 0.1125rem; line-height: 0.213333rem; font-size: 0.093333rem; text-align: center; - border: 1px solid rgb(118, 133, 149); + border: 1px solid var(--eldatebefore); color: #fff; background: var(--pretextbg); } @@ -1364,7 +1428,7 @@ } .previewOfSiteStatusCentent3LiName { float: left; - width: 70px; + width: 90px; color: var(--white); text-align: left; height: 40px; @@ -1514,11 +1578,13 @@ width: 40%; float: left; font-size: 14px; + color: var(--white); } .GIsRightWaringListName { width: 45%; float: left; font-size: 14px; + color: var(--white); } .GIsRightWaringListType { width: 15%; @@ -1529,7 +1595,7 @@ color: red; } .Yellow { - color: yellow; + color: var(--diatitle); } .NoBaoJing { position: relative; diff --git a/src/main.js b/src/main.js index 5d5ab70..900d84a 100644 --- a/src/main.js +++ b/src/main.js @@ -82,6 +82,15 @@ } return isExist; }; +Vue.filter("timefilter", function(time) { + var H = parseInt(time / 3600); + var M = parseInt((time / 60) % 60); + if (M > 0) { + return `${H}小时${M}分钟`; + } else { + return `${H}小时`; + } +}); /* eslint-disable no-new */ const vue = new Vue({ diff --git a/src/router/index.js b/src/router/index.js index 13ea763..2341577 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -122,27 +122,7 @@ component: resolve => require(["@/components/DataAnalysis/StatisticalReport"], resolve) }, - { - path: "/NFCloudPlatform/VideoSurveillance", // 工业物联网云平台--视频监控 - name: "VideoSurveillance", - component: resolve => - require(["@/components/NFCloudPlatform/VideoSurveillance"], resolve) - }, - // { - // path: '/NFCloudPlatform/GroundFloor',// 工业物联网云平台--视频监控-一楼泵站 - // name: 'GroundFloor', - // component: GroundFloor - // },{ - // path: '/NFCloudPlatform/Attic',// 工业物联网云平台--视频监控-顶楼泵站 - // name: 'Attic', - // component: Attic - // }, - { - path: "/NFCloudPlatform/RealTime", // 工业物联网云平台--实时监控 - name: "RealTime", - component: resolve => - require(["@/components/NFCloudPlatform/RealTime"], resolve) - }, + { path: "/Engineering/Nowfault", // 查询实时故障数据 name: "Nowfault", diff --git a/src/components/NFCloudPlatform/Attic.vue b/src/components/NFCloudPlatform/Attic.vue deleted file mode 100644 index a55aaaf..0000000 --- a/src/components/NFCloudPlatform/Attic.vue +++ /dev/null @@ -1,639 +0,0 @@ - - - - - diff --git a/src/components/NFCloudPlatform/GroundFloor.vue b/src/components/NFCloudPlatform/GroundFloor.vue deleted file mode 100644 index 8c9e773..0000000 --- a/src/components/NFCloudPlatform/GroundFloor.vue +++ /dev/null @@ -1,435 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/RealTime.vue b/src/components/NFCloudPlatform/RealTime.vue deleted file mode 100644 index 8958f31..0000000 --- a/src/components/NFCloudPlatform/RealTime.vue +++ /dev/null @@ -1,179 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/NFCloudPlatform/VideoSurveillance.vue b/src/components/NFCloudPlatform/VideoSurveillance.vue deleted file mode 100644 index a5eeb3d..0000000 --- a/src/components/NFCloudPlatform/VideoSurveillance.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - - diff --git a/src/components/configure/PushRules.vue b/src/components/configure/PushRules.vue index 69b9b5b..b235fee 100644 --- a/src/components/configure/PushRules.vue +++ b/src/components/configure/PushRules.vue @@ -33,10 +33,11 @@ - + + + - 平台站点数量及状态统计 + 站点统计 +
+ 全部 + 合同 + 临测 +
@@ -240,7 +243,7 @@ {{ item.groupName }}{{ item.RegionName }}
{ - console.log(response); + // console.log(response); if (response.status === 200) { this.ProjectList = this.ProjectList.concat(response.data.data); // console.log(this.ProjectList); @@ -429,7 +443,7 @@ message(response); }); }, - // 根据平台渲染站点数量统计及状态统计 + // 根据平台渲染站点统计 loadSiteNumForOroject(platform) { this.$http .post(this.nozzle.sysPlatformGetSiteCountAndState, { @@ -459,6 +473,36 @@ message(response); }); }, + // 单击显示平台站点 + allpreview(platform) { + this.$http + .post(this.nozzle.sysPlatformGetSiteCountAndState, { + data: { platform: platform } + }) + .then(response => { + if (response.data.code === 200) { + // 将当前数据设置成数字滚动的初始值 + this.Site.SAll = this.Site.EAll; + this.Site.SOn = this.Site.EOn; + this.Site.SOff = this.Site.EOff; + this.Project.SAll = this.Project.EAll; + this.Project.SOn = this.Project.EOn; + this.Project.SOff = this.Project.EOff; + // 将新数据设置成数字滚动的结束值 也就是展示值 + this.Site.EAll = response.data.data.sitecount; + this.Site.EOn = response.data.data.onlinecount; + this.Site.EOff = response.data.data.offlinecount; + this.Project.EAll = response.data.data.projectcount; + this.Project.EOn = response.data.data.completed; + this.Project.EOff = response.data.data.noncompleted; + } else { + message(response); + } + }) + .catch(response => { + message(response); + }); + }, // 加载项目站点覆盖排名 loadQuyuPaiMing() { this.$http @@ -1186,6 +1230,26 @@ color: rgb(0, 119, 254); vertical-align: middle; } +.previewOfSiteStatusTitleBTN { + position: absolute; + top: 8px; + color: var(--eldatebefore); + right: 20px; + border: 1px solid var(--eldatebefore); + height: 26px; + line-height: 26px; +} +.previewOfSiteStatusTitleBTN span { + float: left; + font-size: 12px; + padding: 0 10px; + cursor: pointer; + height: 100%; + border-right: 1px solid var(--eldatebefore); +} +.previewOfSiteStatusTitleBTN span:nth-child(3) { + border-right: none; +} #previewOfSiteStatusTop { position: absolute; top: 0; @@ -1255,11 +1319,11 @@ cursor: pointer; width: 48%; height: 0.213333rem; - margin-top: 0.133333rem; + margin-top: 0.1125rem; line-height: 0.213333rem; font-size: 0.093333rem; text-align: center; - border: 1px solid rgb(118, 133, 149); + border: 1px solid var(--eldatebefore); color: #fff; background: var(--pretextbg); } @@ -1364,7 +1428,7 @@ } .previewOfSiteStatusCentent3LiName { float: left; - width: 70px; + width: 90px; color: var(--white); text-align: left; height: 40px; @@ -1514,11 +1578,13 @@ width: 40%; float: left; font-size: 14px; + color: var(--white); } .GIsRightWaringListName { width: 45%; float: left; font-size: 14px; + color: var(--white); } .GIsRightWaringListType { width: 15%; @@ -1529,7 +1595,7 @@ color: red; } .Yellow { - color: yellow; + color: var(--diatitle); } .NoBaoJing { position: relative; diff --git a/src/main.js b/src/main.js index 5d5ab70..900d84a 100644 --- a/src/main.js +++ b/src/main.js @@ -82,6 +82,15 @@ } return isExist; }; +Vue.filter("timefilter", function(time) { + var H = parseInt(time / 3600); + var M = parseInt((time / 60) % 60); + if (M > 0) { + return `${H}小时${M}分钟`; + } else { + return `${H}小时`; + } +}); /* eslint-disable no-new */ const vue = new Vue({ diff --git a/src/router/index.js b/src/router/index.js index 13ea763..2341577 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -122,27 +122,7 @@ component: resolve => require(["@/components/DataAnalysis/StatisticalReport"], resolve) }, - { - path: "/NFCloudPlatform/VideoSurveillance", // 工业物联网云平台--视频监控 - name: "VideoSurveillance", - component: resolve => - require(["@/components/NFCloudPlatform/VideoSurveillance"], resolve) - }, - // { - // path: '/NFCloudPlatform/GroundFloor',// 工业物联网云平台--视频监控-一楼泵站 - // name: 'GroundFloor', - // component: GroundFloor - // },{ - // path: '/NFCloudPlatform/Attic',// 工业物联网云平台--视频监控-顶楼泵站 - // name: 'Attic', - // component: Attic - // }, - { - path: "/NFCloudPlatform/RealTime", // 工业物联网云平台--实时监控 - name: "RealTime", - component: resolve => - require(["@/components/NFCloudPlatform/RealTime"], resolve) - }, + { path: "/Engineering/Nowfault", // 查询实时故障数据 name: "Nowfault", diff --git a/src/util/utils.js b/src/util/utils.js index cc59bc1..12f2121 100644 --- a/src/util/utils.js +++ b/src/util/utils.js @@ -8,23 +8,23 @@ * @param {String} rootId 根结点ID * @return {Array} treeData * */ - handleTree(data, id, parentId, children, rootId){ - id = id || 'id' - parentId = parentId || 'parentId' - children = children || 'children' - rootId = rootId || '0' - let cloneData = JSON.parse(JSON.stringify(data)) - let treeData = cloneData.filter(parent =>{ - let childArr = cloneData.filter(child =>{ + handleTree(data, id, parentId, children, rootId) { + id = id || "id"; + parentId = parentId || "parentId"; + children = children || "children"; + rootId = rootId || "0"; + let cloneData = JSON.parse(JSON.stringify(data)); + let treeData = cloneData.filter(parent => { + let childArr = cloneData.filter(child => { //返回每一项的子级数组 - return parent[id] === child[parentId] - }) - childArr = childArr.sort((a, b) => a.priority - b.priority) - childArr.length > 0 ? parent.children = childArr : '' + return parent[id] === child[parentId]; + }); + childArr = childArr.sort((a, b) => a.priority - b.priority); + childArr.length > 0 ? (parent.children = childArr) : ""; //返回第一层 - return parent[parentId] === rootId - }) - return treeData != '' ? treeData : data + return parent[parentId] === rootId; + }); + return treeData != "" ? treeData : data; }, /** * 传入时间戳,转换指定的时间格式 @@ -32,24 +32,39 @@ * @param {String} dateType 要得到的时间格式 例如 YYYY-MM-DD hh:mm:ss * @return dataStr 例如 YYYY-MM-DD hh:mm:ss */ - switchTime: (val = +new Date(), dateType = 'YYYY-MM-DD hh:mm:ss') => { + switchTime: (val = +new Date(), dateType = "YYYY-MM-DD hh:mm:ss") => { // 将字符串转换成数字 - const timeStamp = +new Date(val) + const timeStamp = +new Date(val); // 如果转换成数字出错 if (!timeStamp) { - return val + return val; } - let str + let str; // 得到时间字符串 - const dateStr = new Date(timeStamp) - str = dateType.replace('YYYY', dateStr.getFullYear()) - str = str.replace('MM', (dateStr.getMonth() + 1 < 10 ? '0' : '') + (dateStr.getMonth() + 1)) - str = str.replace('DD', (dateStr.getDate() < 10 ? '0' : '') + dateStr.getDate()) - str = str.replace('hh', (dateStr.getHours() < 10 ? '0' : '') + dateStr.getHours()) - str = str.replace('mm', (dateStr.getMinutes() < 10 ? '0' : '') + dateStr.getMinutes()) - str = str.replace('ss', (dateStr.getSeconds() < 10 ? '0' : '') + dateStr.getSeconds()) + const dateStr = new Date(timeStamp); + str = dateType.replace("YYYY", dateStr.getFullYear()); + str = str.replace( + "MM", + (dateStr.getMonth() + 1 < 10 ? "0" : "") + (dateStr.getMonth() + 1) + ); + str = str.replace( + "DD", + (dateStr.getDate() < 10 ? "0" : "") + dateStr.getDate() + ); + str = str.replace( + "hh", + (dateStr.getHours() < 10 ? "0" : "") + dateStr.getHours() + ); + str = str.replace( + "mm", + (dateStr.getMinutes() < 10 ? "0" : "") + dateStr.getMinutes() + ); + str = str.replace( + "ss", + (dateStr.getSeconds() < 10 ? "0" : "") + dateStr.getSeconds() + ); - return str + return str; }, /** * 传入属性、值、类型,保存数据到本地 @@ -58,8 +73,8 @@ * @param {String} type 保存到本地的类型 */ setLocalStore(key, value, type) { - if(!key) return; - if(type === 'jsonStr') { + if (!key) return; + if (type === "jsonStr") { value = JSON.stringify(value); } localStorage.setItem(key, value); @@ -70,8 +85,8 @@ * @param {String} type 保存到本地的类型 */ getLocalStore(key, type) { - if(!localStorage.getItem(key)) return; - if(type === 'jsonStr') { + if (!localStorage.getItem(key)) return; + if (type === "jsonStr") { return JSON.parse(localStorage.getItem(key)); } return localStorage.getItem(key); @@ -81,7 +96,7 @@ * @param {String} key 保存到本地的属性名 */ removeLocalStore(key) { - if(!key) return; + if (!key) return; return localStorage.removeItem(key); } -} +};