From 005505b747269b10184e5cc53e79e6e87aa8ea7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Wed, 14 Aug 2024 01:11:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/device/tower/index.js | 38 +- src/components/tower-crane-value-1.js | 96 ++-- src/pages/safe/towerCrane.vue | 784 ++++++++++++++++---------- 3 files changed, 571 insertions(+), 347 deletions(-) diff --git a/src/api/device/tower/index.js b/src/api/device/tower/index.js index d2003d3..5badf59 100644 --- a/src/api/device/tower/index.js +++ b/src/api/device/tower/index.js @@ -1,30 +1,48 @@ import request from '@/utils/request' // 查询塔基配置列表 -const findtowerConfigGroupOnline=(deptId, projectId)=> { +const findTowerConfigGroupOnline=(deptId, projectId)=> { return request({ - url: `bgscreen/tower/findtowerConfigGroupOnline?deptId=${deptId||0}&projectId=${projectId||0}`, + url: `bgscreen/tower/findTowerConfigGroupOnline?deptId=${deptId||0}&projectId=${projectId||0}`, method: 'get' }) } // 查询塔基配置列表 -const findtowerConfigListByProjectId=(deptId, projectId)=> { +const findTowerConfigListByProjectId=(deptId, projectId)=> { return request({ - url: `bgscreen/tower/findtowerConfigListByProjectId?deptId=${deptId||0}&projectId=${projectId||0}`, + url: `bgscreen/tower/findTowerConfigListByProjectId?deptId=${deptId||0}&projectId=${projectId||0}`, method: 'get' }) } -// 查询塔基运行数据 -const findtowerStatisticsView=(deviceSn)=> { +// 查询塔基运行统计 +const findTowerStatisticsView=(deviceSn)=> { return request({ - url: `bgscreen/tower/findtowerStatisticsView?deviceSn=${deviceSn}`, + url: `bgscreen/tower/findTowerStatisticsView?deviceSn=${deviceSn}`, method: 'get' }) } +// 查询塔基限位数据 +const selectDevTowerDataLimitList=(deviceSn)=> { + return request({ + url: `bgscreen/tower/selectDevTowerDataLimitList?deviceKey=${deviceSn}&pageNum=1&pageSize=10`, + method: 'get' + }) +} + +// 查询塔基实时数据 +const selectDevTowerDataRunList=(deviceSn)=> { + return request({ + url: `bgscreen/tower/selectDevTowerDataRunList?deviceKey=${deviceSn}&pageNum=1&pageSize=10&warnings=Y`, + method: 'get' + }) +} + export default{ - findtowerConfigGroupOnline, - findtowerConfigListByProjectId, - findtowerStatisticsView + findTowerConfigGroupOnline, + findTowerConfigListByProjectId, + findTowerStatisticsView, + selectDevTowerDataLimitList, + selectDevTowerDataRunList } \ No newline at end of file diff --git a/src/components/tower-crane-value-1.js b/src/components/tower-crane-value-1.js index ac140ae..3306b40 100644 --- a/src/components/tower-crane-value-1.js +++ b/src/components/tower-crane-value-1.js @@ -5,26 +5,26 @@ Vue.component("tower-crane-value-1", { template: `
- +
-

后臂长

-
0 m
+

塔身高度

+
0 m
-

前臂长

-
0 m
+

当前吊重

+
0 t
-

塔身高

-
0 m
+

当前回转

+
0 °
-

功率

-
kw
+

当前幅度

+
m
@@ -54,20 +54,20 @@ Vue.component("tower-crane-value-1", {
-

力矩比

-
0 %
+

水平倾角

+
0 °
-

安全吊重

-
0 t
+

垂直倾角

+
0 °
-

进场时间

-
0
+

重量百分比

+
0 %
-

扶墙高度

-
+

力矩百分比

+
%
@@ -91,20 +91,29 @@ Vue.component("tower-crane-value-1", { left:{ type:Number }, - ampdata:{ - type:Number + tHeight:{ + type:String }, - forearmlength:{ - type:Number + tLoad:{ + type:String }, - heightdata:{ - type:Number + tRotation:{ + type:String }, - downheight:{ - type:Number + tRange:{ + type:String }, - angledata:{ - type:Number + tLeanAngleX:{ + type:String + }, + tLeanAngleY:{ + type:String + }, + tLoadPercent:{ + type:String + }, + tMomentPercent:{ + type:String }, }, data() { @@ -114,25 +123,22 @@ Vue.component("tower-crane-value-1", { }, mounted(){ //this.animation() - }, methods: { animation(){ - - var leftValue = this.ampdata //幅度 - var brachium = this.forearmlength //臂长 //定制 + var leftValue = this.tRange //幅度 + var brachium = this.value.frontBrachium //臂长 //定制 leftValue = leftValue < 0 ? 0 : leftValue var left = leftValue / brachium * 100 - var heightValue = this.heightdata //高度 - var towerHeight = this.downheight //塔身高度 + var heightValue = this.tHeight //高度 + var towerHeight = this.towerBodyHeight //塔身高度 var height = (towerHeight - heightValue) * this.height / towerHeight height = height > this.height ? this.height : height - - var value = Number(this.angledata) //角度 + var value = Number(this.tLeanAngleX) //角度 var degValue = -value setTimeout(function () { $("#slider").animate({left:left+'%'},1000); @@ -146,22 +152,30 @@ Vue.component("tower-crane-value-1", { }, watch:{ value:function () { - console.log(this.value) this.animation() }, - ampdata:function () { + tHeight:function () { this.animation() }, - forearmlength:function () { + tLoad:function () { this.animation() }, - heightdata:function () { + tRotation:function () { this.animation() }, - downheight:function () { + tRange:function () { this.animation() }, - angledata:function () { + tLeanAngleX:function () { + this.animation() + }, + tLeanAngleY:function () { + this.animation() + }, + tLoadPercent:function () { + this.animation() + }, + tMomentPercent:function () { this.animation() }, } diff --git a/src/pages/safe/towerCrane.vue b/src/pages/safe/towerCrane.vue index ea56c96..46aa770 100644 --- a/src/pages/safe/towerCrane.vue +++ b/src/pages/safe/towerCrane.vue @@ -2,62 +2,107 @@
- +
- + + fill="" + p-id="3341" + >
-

塔机总数

-
{{towerTotalNum}}
+

塔机总数

+
+ {{ towerTotalNum }} +
- + + p-id="4373" + >
-

监控总数

-
{{towerTotalNum}}
+

监控总数

+
+ {{ towerTotalNum }} +
- - + + - -
+ +
监控列表
-
+
- + + fill="#1195db" + p-id="5289" + >
@@ -73,8 +118,9 @@
设备状态: - {{ it.online == 2 ? '离线' : '在线' - }} + {{ + it.online == 2 ? "离线" : "在线" + }}
@@ -115,83 +161,98 @@ - - + + -
-
吊重次数(10次)
+
+
吊重次数({{ towerConfigStat.a0 }}次)
本月
-
5
+
{{ towerConfigStat.a1 }}
累计
-
500
+
{{ towerConfigStat.a0 }}
-
-
超载次数(10次)
+
+
超载次数({{ towerConfigStat.b0 }}次)
本月
-
5
+
{{ towerConfigStat.b1 }}
累计
-
500
+
{{ towerConfigStat.b0 }}
- -
-
超载率(10%)
+
+
+ 超载率({{ getRoudValue(towerConfigStat.b0, towerConfigStat.a0) }}) +
本月
-
10%
+
+ {{ getRoudValue(towerConfigStat.b1, towerConfigStat.a1) }} +
累计
-
12%
+
+ {{ getRoudValue(towerConfigStat.b0, towerConfigStat.a0) }} +
- -
+
告警次数(10次)
本月
-
5
+
{{ towerConfigStat.c1 }}
累计
-
500
+
{{ towerConfigStat.c0 }}
-
-
+
@@ -200,10 +261,22 @@
- +
@@ -223,23 +296,36 @@
塔机监测
-
-
暂无预警数据
-
-
{{ item.warn_name }}
-
-
- -
-
-
{{ item.towerName }}发生{{ item.warn_context }} -
-
{{ item.warn_time }}
-
-
-
项目:{{ item.project_abbreviation }}
+
+
+ 暂无预警数据 +
+ +
+ + + + + +
@@ -249,62 +335,154 @@
力矩曲线
- +
- - +
{{ it.title }} - + + fill="#363636" + p-id="11358" + > - + + p-id="6962" + > - + + fill="#666666" + p-id="7868" + > - + + p-id="8743" + > - - + + + fill="#666666" + p-id="9824" + > - + + fill="#272636" + p-id="10418" + >
@@ -312,9 +490,12 @@
报警:{{ it.data1 }} - 报警:{{ it.data2 - }} - {{ it.scale1 }} + 报警:{{ it.data2 }} {{ it.scale2 }}
@@ -322,167 +503,87 @@ -
-