diff --git a/yanzhu-bigscreen/src/api/index.js b/yanzhu-bigscreen/src/api/index.js index 6c42d644..689acbc6 100644 --- a/yanzhu-bigscreen/src/api/index.js +++ b/yanzhu-bigscreen/src/api/index.js @@ -6,6 +6,7 @@ import dict from "./dict"; import greenCarbon from "./greenCarbon"; import videoMonitor from "./videoMonitor"; import safety from "./safety"; +import tower from "./tower"; export default { http: axios, downFile: download, @@ -16,4 +17,5 @@ export default { greenCarbon, videoMonitor, safety, + tower, }; diff --git a/yanzhu-bigscreen/src/api/tower.js b/yanzhu-bigscreen/src/api/tower.js new file mode 100644 index 00000000..20b7fc77 --- /dev/null +++ b/yanzhu-bigscreen/src/api/tower.js @@ -0,0 +1,50 @@ +import request from "@/utils/request"; +// 查询塔基配置列表 +const findTowerConfigGroupOnline = (data) => { + return request({ + url: `/manage/bgscreen/tower/findTowerConfigGroupOnline`, + method: "get", + params: data, + }); +}; + +// 查询塔基配置列表 +const findTowerConfigListByProjectId = (data) => { + return request({ + url: `/manage/bgscreen/tower/findTowerConfigListByProjectId`, + method: "get", + params: data, + }); +}; + +// 查询塔基运行统计 +const findTowerStatisticsView = (deviceSn) => { + return request({ + url: `/manage/bgscreen/tower/findTowerStatisticsView?deviceSn=${deviceSn}`, + method: "get", + }); +}; + +// 查询塔基限位数据 +const selectDevTowerDataLimitList = (deviceSn) => { + return request({ + url: `/manage/bgscreen/tower/selectDevTowerDataLimitList?deviceKey=${deviceSn}&pageNum=1&pageSize=10`, + method: "get", + }); +}; + +// 查询塔基实时数据 +const selectDevTowerDataRunList = (deviceSn) => { + return request({ + url: `manage/bgscreen/tower/selectDevTowerDataRunList?deviceKey=${deviceSn}&pageNum=1&pageSize=10&warnings=Y`, + method: "get", + }); +}; + +export default { + findTowerConfigGroupOnline, + findTowerConfigListByProjectId, + findTowerStatisticsView, + selectDevTowerDataLimitList, + selectDevTowerDataRunList, +}; diff --git a/yanzhu-bigscreen/src/assets/icons/svg/meter1.svg b/yanzhu-bigscreen/src/assets/icons/svg/meter1.svg new file mode 100644 index 00000000..ad12bd37 --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/meter1.svg @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/meter2.svg b/yanzhu-bigscreen/src/assets/icons/svg/meter2.svg new file mode 100644 index 00000000..5f3ad78f --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/meter2.svg @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/meter3.svg b/yanzhu-bigscreen/src/assets/icons/svg/meter3.svg new file mode 100644 index 00000000..a03eb493 --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/meter3.svg @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/meter4.svg b/yanzhu-bigscreen/src/assets/icons/svg/meter4.svg new file mode 100644 index 00000000..b318898d --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/meter4.svg @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/meter5.svg b/yanzhu-bigscreen/src/assets/icons/svg/meter5.svg new file mode 100644 index 00000000..edf4ae71 --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/meter5.svg @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/meter6.svg b/yanzhu-bigscreen/src/assets/icons/svg/meter6.svg new file mode 100644 index 00000000..a51325ce --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/meter6.svg @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/tower.svg b/yanzhu-bigscreen/src/assets/icons/svg/tower.svg new file mode 100644 index 00000000..3413a695 --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/tower.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/components/header.vue b/yanzhu-bigscreen/src/components/header.vue index edba6942..63ed95de 100644 --- a/yanzhu-bigscreen/src/components/header.vue +++ b/yanzhu-bigscreen/src/components/header.vue @@ -206,6 +206,9 @@ export default { case 301: this.$router.push("/safetyCheck"); break; + case 304: + this.$router.push("/towerCrane"); + break; case 4: this.$router.push("/prjQuality"); break; diff --git a/yanzhu-bigscreen/src/components/staffSurveyChart.vue b/yanzhu-bigscreen/src/components/staffSurveyChart.vue index dc84c59d..327caff5 100644 --- a/yanzhu-bigscreen/src/components/staffSurveyChart.vue +++ b/yanzhu-bigscreen/src/components/staffSurveyChart.vue @@ -1,51 +1,51 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/components/tower-crane-value-1.js b/yanzhu-bigscreen/src/components/tower-crane-value-1.js new file mode 100644 index 00000000..3306b408 --- /dev/null +++ b/yanzhu-bigscreen/src/components/tower-crane-value-1.js @@ -0,0 +1,183 @@ +/** + * 顶部header + */ +Vue.component("tower-crane-value-1", { + template: ` +
+
+ +
+
+ + +
+

塔身高度

+
0 m
+
+
+

当前吊重

+
0 t
+
+
+

当前回转

+
0 °
+
+
+

当前幅度

+
m
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+

水平倾角

+
0 °
+
+
+

垂直倾角

+
0 °
+
+
+

重量百分比

+
0 %
+
+
+

力矩百分比

+
%
+
+
+
+
+
+ + `, + props: { + value:{ + type:Object + }, + width:{ + type:Number + }, + height:{ + type:Number + }, + top:{ + type:Number + }, + left:{ + type:Number + }, + tHeight:{ + type:String + }, + tLoad:{ + type:String + }, + tRotation:{ + type:String + }, + tRange:{ + type:String + }, + tLeanAngleX:{ + type:String + }, + tLeanAngleY:{ + type:String + }, + tLoadPercent:{ + type:String + }, + tMomentPercent:{ + type:String + }, + }, + data() { + return { + + } + }, + mounted(){ + //this.animation() + }, + methods: { + animation(){ + var leftValue = this.tRange //幅度 + var brachium = this.value.frontBrachium //臂长 //定制 + + leftValue = leftValue < 0 ? 0 : leftValue + var left = leftValue / brachium * 100 + + 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.tLeanAngleX) //角度 + var degValue = -value + setTimeout(function () { + $("#slider").animate({left:left+'%'},1000); + $("#dot").animate({left:left+'%'},1000); + $("#needle").css("transform","rotate("+degValue+"deg)") + setTimeout(function () { + $("#towrope").animate({height:height+'px'},1000); + },1000) + },1000) + }, + }, + watch:{ + value:function () { + this.animation() + }, + tHeight:function () { + this.animation() + }, + tLoad:function () { + this.animation() + }, + tRotation:function () { + this.animation() + }, + tRange:function () { + this.animation() + }, + tLeanAngleX:function () { + this.animation() + }, + tLeanAngleY:function () { + this.animation() + }, + tLoadPercent:function () { + this.animation() + }, + tMomentPercent:function () { + this.animation() + }, + } + +}) diff --git a/yanzhu-bigscreen/src/components/tower-crane-value-2.js b/yanzhu-bigscreen/src/components/tower-crane-value-2.js new file mode 100644 index 00000000..3a4954a8 --- /dev/null +++ b/yanzhu-bigscreen/src/components/tower-crane-value-2.js @@ -0,0 +1,165 @@ +/** + * 顶部header + */ +Vue.component("tower-crane-value-2", { + template: ` +
+
+ +
+
+ + +
+

后臂长

+
0 m
+
+
+

前臂长

+
0 m
+
+
+

塔身高

+
0 m
+
+
+

功率

+
kw
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+

力矩比

+
0 %
+
+
+

安全吊重

+
0 t
+
+
+

进场时间

+
0
+
+
+

扶墙高度

+
+
+
+
+
+
+ + `, + props: { + value:{ + type:Object + }, + width:{ + type:Number + }, + height:{ + type:Number + }, + top:{ + type:Number + }, + left:{ + type:Number + }, + ampdata:{ + type:Number + }, + forearmlength:{ + type:Number + }, + heightdata:{ + type:Number + }, + downheight:{ + type:Number + }, + angledata:{ + type:Number + }, + }, + data() { + return { + + } + }, + mounted(){ + this.animation() + }, + methods: { + animation(){ + var leftValue = this.ampdata //幅度 + var brachium = this.forearmlength //臂长 //定制 + + leftValue = leftValue < 0 ? 0 : leftValue + var left = leftValue / brachium * 100 + + + + var heightValue = this.heightdata //高度 + var towerHeight = this.downheight //塔身高度 + + var height = (towerHeight - heightValue) * this.height / towerHeight + height = height > this.height ? this.height : height + + var value = Number(this.angledata) //角度 + var degValue = -value + setTimeout(function () { + $("#slider").animate({left:left+'%'},1000); + $("#dot").animate({left:left+'%'},1000); + $("#needle").css("transform","rotate("+degValue+"deg)") + setTimeout(function () { + $("#towrope").animate({height:height+'px'},1000); + },1000) + },1000) + + }, + }, + watch:{ + ampdata:function () { + this.animation() + }, + forearmlength:function () { + this.animation() + }, + heightdata:function () { + this.animation() + }, + downheight:function () { + this.animation() + }, + angledata:function () { + this.animation() + }, + } + +}) diff --git a/yanzhu-bigscreen/src/pages-old/init.js b/yanzhu-bigscreen/src/pages-old/init.js index 103914d3..20cc05af 100644 --- a/yanzhu-bigscreen/src/pages-old/init.js +++ b/yanzhu-bigscreen/src/pages-old/init.js @@ -1,69 +1,77 @@ -import Vue from 'vue' -import Api from '../api/index' -import dayjs from 'dayjs' -import './style/index.less' -import dayfilter from '@/utils/dayfilter' -import {tryToJson} from '../utils/tools' +import Vue from "vue"; +import Api from "../api/index"; +import dayjs from "dayjs"; +import "./style/index.less"; +import dayfilter from "@/utils/dayfilter"; +import { tryToJson } from "../utils/tools"; //import H265Player from '../components/h265-player/index' -import { Loading } from 'element-ui'; -1 -import moduleOne11 from '../components/module/module-one-1-1.vue' -import moduleOne12 from '../components/module/module-one-1-2.vue' -import moduleOne21 from '../components/module/module-one-2-1.vue' -import projectOverviewChart from '../components/project-overview-chart.vue' -import peopleNumber from '../components/people-number.vue' -import header from '../components/header.vue' +import { Loading } from "element-ui"; +1; +import moduleOne11 from "../components/module/module-one-1-1.vue"; +import moduleOne12 from "../components/module/module-one-1-2.vue"; +import moduleOne21 from "../components/module/module-one-2-1.vue"; +import staffSurveyChart from "../components/staffSurveyChart.vue"; +import projectOverviewChart from "../components/project-overview-chart.vue"; +import peopleNumber from "../components/people-number.vue"; +import header from "../components/header.vue"; Loading.install(Vue); //H265Player.install(Vue); dayfilter(Vue); -const vue=new Vue(); -Vue.component("screen-header",header) -1 -Vue.component("module-one-1-1",moduleOne11) -Vue.component("module-one-1-2",moduleOne12) -Vue.component("module-one-2-1",moduleOne21) -Vue.component("people-number",peopleNumber) -Vue.component("project-overview-chart",projectOverviewChart) -Vue.prototype.$api=Api; -Vue.prototype.$bus=vue; -Vue.prototype.$apiPath="/jhapi" -Vue.prototype.$dt=dayjs; -Vue.prototype.$tryToJson=tryToJson -Vue.prototype.$toggleFullScreen=(el)=>{ - if(document.fullscreenElement==el){ - let screen = document.cancelFullScreen || document.webkitCancelFullScreen || document.mozCancelFullScreen || document.exitFullScreen - if (typeof screen != "undefined" && screen) { - screen.call(document); - return; - } - - }else{ - let screen = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullScreen - if (typeof screen != "undefined" && screen) { - screen.call(el); - return; - } +const vue = new Vue(); +Vue.component("screen-header", header); +Vue.component("module-one-1-1", moduleOne11); +Vue.component("module-one-1-2", moduleOne12); +Vue.component("module-one-2-1", moduleOne21); +Vue.component("people-number", peopleNumber); +Vue.component("staff-survey-chart", staffSurveyChart); +Vue.component("project-overview-chart", projectOverviewChart); +Vue.prototype.$api = Api; +Vue.prototype.$bus = vue; +Vue.prototype.$apiPath = "/jhapi"; +Vue.prototype.$dt = dayjs; +Vue.prototype.$tryToJson = tryToJson; +Vue.prototype.$toggleFullScreen = (el) => { + if (document.fullscreenElement == el) { + let screen = + document.cancelFullScreen || + document.webkitCancelFullScreen || + document.mozCancelFullScreen || + document.exitFullScreen; + if (typeof screen != "undefined" && screen) { + screen.call(document); + return; } -} -window.__isfull__=false; -window.fullscreenInterval=setInterval(()=>{ - if(document.fullscreenElement){ - if(!window.__isfull__){ - vue.$emit("fullscreen",true); - window.__isfull__=true; - } - }else{ - if(window.__isfull__){ - vue.$emit("fullscreen",false); - window.__isfull__=false; - } + } else { + let screen = + el.requestFullScreen || + el.webkitRequestFullScreen || + el.mozRequestFullScreen || + el.msRequestFullScreen; + if (typeof screen != "undefined" && screen) { + screen.call(el); + return; } -},500); -window.xdcaches={}; + } +}; +window.__isfull__ = false; +window.fullscreenInterval = setInterval(() => { + if (document.fullscreenElement) { + if (!window.__isfull__) { + vue.$emit("fullscreen", true); + window.__isfull__ = true; + } + } else { + if (window.__isfull__) { + vue.$emit("fullscreen", false); + window.__isfull__ = false; + } + } +}, 500); +window.xdcaches = {}; /* Api.project.getInfo().then(d=>{ if(d.code==200){ window.__info__=d; } }) -*/ \ No newline at end of file +*/ diff --git a/yanzhu-bigscreen/src/router/index.js b/yanzhu-bigscreen/src/router/index.js index 58e1450d..4f27cf84 100644 --- a/yanzhu-bigscreen/src/router/index.js +++ b/yanzhu-bigscreen/src/router/index.js @@ -60,7 +60,18 @@ const routes = [ name: "safetyCheck", meta: { nav: 301 }, component: () => - import(/* webpackChunkName: "safetyCheck" */ "../views/safetyCheck.vue"), + import( + /* webpackChunkName: "safetyCheck" */ "../views/safety/safetyCheck.vue" + ), + }, + { + path: "/towerCrane", + name: "towerCrane", + meta: { nav: 304 }, + component: () => + import( + /* webpackChunkName: "safetyCheck" */ "../views/safety/towerCrane.vue" + ), }, ]; const router = new VueRouter({ diff --git a/yanzhu-bigscreen/src/views/init.js b/yanzhu-bigscreen/src/views/init.js index b56dd5b4..a1910000 100644 --- a/yanzhu-bigscreen/src/views/init.js +++ b/yanzhu-bigscreen/src/views/init.js @@ -13,6 +13,7 @@ import moduleOne21 from "../components/module/module-one-2-1.vue"; import moduleOne22 from "../components/module/module-one-2-2.vue"; import moduleOne23 from "../components/module/module-one-2-3.vue"; import moduleOne31 from "../components/module/module-one-3-1.vue"; +import staffSurveyChart from "../components/staffSurveyChart.vue"; import peopleNumber from "@/components/people-number.vue"; import dictTag from "@/components/DictTag/index.vue"; import MyDialog from "@/components/MyDialog.vue"; @@ -34,6 +35,7 @@ Vue.component("module-one-2-2", moduleOne22); Vue.component("module-one-2-3", moduleOne23); Vue.component("module-one-3-1", moduleOne31); Vue.component("people-number", peopleNumber); +Vue.component("staff-survey-chart", staffSurveyChart); Vue.component("my-chart", MyChart); Vue.component("dict-tag", dictTag); Vue.component("MyDialog", MyDialog); diff --git a/yanzhu-bigscreen/src/views/safety/demo.vue b/yanzhu-bigscreen/src/views/safety/demo.vue new file mode 100644 index 00000000..814893d8 --- /dev/null +++ b/yanzhu-bigscreen/src/views/safety/demo.vue @@ -0,0 +1,56 @@ + + + + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/views/safety/safetyCheckDialog.vue b/yanzhu-bigscreen/src/views/safety/dialog/safetyCheckDialog.vue similarity index 100% rename from yanzhu-bigscreen/src/views/safety/safetyCheckDialog.vue rename to yanzhu-bigscreen/src/views/safety/dialog/safetyCheckDialog.vue diff --git a/yanzhu-bigscreen/src/views/safetyCheck.vue b/yanzhu-bigscreen/src/views/safety/safetyCheck.vue similarity index 99% rename from yanzhu-bigscreen/src/views/safetyCheck.vue rename to yanzhu-bigscreen/src/views/safety/safetyCheck.vue index 1aa41cec..3af307b5 100644 --- a/yanzhu-bigscreen/src/views/safetyCheck.vue +++ b/yanzhu-bigscreen/src/views/safety/safetyCheck.vue @@ -268,7 +268,7 @@ + + \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataCollide.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataCollide.java index 361dcabb..e8cc665d 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataCollide.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataCollide.java @@ -34,7 +34,26 @@ public class DevTowerDataCollide extends BaseEntity @Excel(name = "项目名称") private String projectName; - /** 总包单位主键 */ + private Long deptId; + @Excel(name = "总包单位") + private String deptName; + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + private Long comId; /** 设备序列号 */ diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataLimit.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataLimit.java index 3c7caf07..3c6df272 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataLimit.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataLimit.java @@ -31,7 +31,25 @@ public class DevTowerDataLimit extends BaseEntity @Excel(name = "项目名称") private String projectName; - /** 总包单位主键 */ + private Long deptId; + @Excel(name = "总包单位") + private String deptName; + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } private Long comId; /** 设备序列号 */ diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataLocal.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataLocal.java index 96badf45..041369ad 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataLocal.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataLocal.java @@ -30,7 +30,25 @@ public class DevTowerDataLocal extends BaseEntity @Excel(name = "项目名称") private String projectName; - /** 总包单位主键 */ + private Long deptId; + @Excel(name = "总包单位") + private String deptName; + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } private Long comId; /** 设备序列号 */ diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataRound.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataRound.java index 5f61f8a8..a13a27d4 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataRound.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataRound.java @@ -32,7 +32,25 @@ public class DevTowerDataRound extends BaseEntity @Excel(name = "项目名称") private String projectName; - /** 总包单位主键 */ + private Long deptId; + @Excel(name = "总包单位") + private String deptName; + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } private Long comId; /** 设备序列号 */ diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataRun.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataRun.java index 0614f1f0..f3cc1d40 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataRun.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataRun.java @@ -31,7 +31,25 @@ public class DevTowerDataRun extends BaseEntity @Excel(name = "项目名称") private String projectName; - /** 总包单位主键 */ + private Long deptId; + @Excel(name = "总包单位") + private String deptName; + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } private Long comId; diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataWarning.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataWarning.java index 61672f11..d29a474b 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataWarning.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerDataWarning.java @@ -32,7 +32,25 @@ public class DevTowerDataWarning extends BaseEntity @Excel(name = "项目名称") private String projectName; - /** 总包单位主键 */ + private Long deptId; + @Excel(name = "总包单位") + private String deptName; + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } private Long comId; /** 设备序列号 */ diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerProjectConfig.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerProjectConfig.java index 38e4648a..87b4f456 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerProjectConfig.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevTowerProjectConfig.java @@ -28,7 +28,25 @@ public class DevTowerProjectConfig extends BaseEntity @Excel(name = "项目名称") private String projectName; - /** 总包单位主键 */ + private Long deptId; + @Excel(name = "总包单位") + private String deptName; + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } private Long comId; diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataCollideMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataCollideMapper.xml index 597adfb6..742d6872 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataCollideMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataCollideMapper.xml @@ -10,6 +10,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -57,10 +59,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select dtdc.id, dtdc.cfg_id, dtdc.project_id, dtdc.com_id, sp.dept_name projectName, sd.dept_name com_name, dtdc.device_key, dtdc.device_source, dtdc.tower_id, dtdc.coordinate_x, dtdc.coordinate_y, dtdc.front_brachium, dtdc.after_brachium, dtdc.tower_body_height, dtdc.height, dtdc.angle, dtdc.range, dtdc.early_warning_distance, dtdc.alarm_warning_distance, dtdc.contour_value, dtdc.is_del, dtdc.create_by, dtdc.create_time, dtdc.update_by, dtdc.update_time, dtdc.remark + select dtdc.id, dtdc.cfg_id, dtdc.project_id, dtdc.com_id, sp.dept_name projectName, sd.dept_name com_name,dtdc.dept_id,pd.sub_dept_name dept_name, + dtdc.device_key, dtdc.device_source, dtdc.tower_id, dtdc.coordinate_x, dtdc.coordinate_y, dtdc.front_brachium, dtdc.after_brachium, dtdc.tower_body_height, dtdc.height, dtdc.angle, dtdc.range, dtdc.early_warning_distance, dtdc.alarm_warning_distance, dtdc.contour_value, dtdc.is_del, dtdc.create_by, dtdc.create_time, dtdc.update_by, dtdc.update_time, dtdc.remark from dev_tower_data_collide dtdc - left join sys_dept sp on sp.dept_id = dtdc.project_id - left join sys_dept sd on sd.dept_id = dtdc.com_id + left join sys_dept sp on sp.dept_id = dtdc.project_id + left join sys_dept sd on sd.dept_id = dtdc.com_id + left join pro_project_info_subdepts pd on pd.id=dtdc.dept_id select count(1) as total from dev_tower_data_collide - and cfg_id = (select dc.id from dev_tower_project_config dc where dc.device_sn=#{deviceKey}) and device_key = #{deviceKey} + and cfg_id in (select dc.id from dev_tower_project_config dc where dc.device_sn=#{deviceKey}) and device_key = #{deviceKey} and date(create_time) between #{params.beginCreateTime} and #{params.endCreateTime} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataLimitMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataLimitMapper.xml index 4885e2d0..2ca72723 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataLimitMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataLimitMapper.xml @@ -11,6 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -57,10 +59,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select dtdl.id, dtdl.cfg_id, dtdl.project_id, dtdl.com_id, sp.dept_name projectName, sd.dept_name com_name, dtdl.device_key, dtdl.device_source, dtdl.tower_id, dtdl.wind_speed_warning, dtdl.wind_speed_alarm, dtdl.load_warning, dtdl.load_alarm, dtdl.moment_warning, dtdl.moment_alarm, dtdl.high_limit_warning, dtdl.high_limit_alarm, dtdl.low_limit_warning, dtdl.low_limit_alarm, dtdl.left_limit_warning, dtdl.left_limit_alarm, dtdl.right_limit_warning, dtdl.right_limit_alarm, dtdl.front_limit_warning, dtdl.front_limit_alarm, dtdl.back_limit_warning, dtdl.back_limit_alarm, dtdl.collision_angle_warning, dtdl.collision_angle_alarm, dtdl.collision_distance_warning, dtdl.collision_distance_alarm, dtdl.h_distance_warning, dtdl.h_distance_alarm, dtdl.v_distance_warning, dtdl.v_distance_alarm, dtdl.lean_warning, dtdl.lean_alarm, dtdl.range_limit_start, dtdl.range_limit_end, dtdl.height_limit_start, dtdl.height_limit_end, dtdl.rotation_limit_start, dtdl.rotation_limit_end, dtdl.is_del, dtdl.create_by, dtdl.create_time, dtdl.update_by, dtdl.update_time, dtdl.remark + select dtdl.id, dtdl.cfg_id, dtdl.project_id, dtdl.com_id, sp.dept_name projectName, sd.dept_name com_name,dtdl.dept_id,pd.sub_dept_name dept_name, + dtdl.device_key, dtdl.device_source, dtdl.tower_id, dtdl.wind_speed_warning, dtdl.wind_speed_alarm, dtdl.load_warning, dtdl.load_alarm, dtdl.moment_warning, dtdl.moment_alarm, dtdl.high_limit_warning, dtdl.high_limit_alarm, dtdl.low_limit_warning, dtdl.low_limit_alarm, dtdl.left_limit_warning, dtdl.left_limit_alarm, dtdl.right_limit_warning, dtdl.right_limit_alarm, dtdl.front_limit_warning, dtdl.front_limit_alarm, dtdl.back_limit_warning, dtdl.back_limit_alarm, dtdl.collision_angle_warning, dtdl.collision_angle_alarm, dtdl.collision_distance_warning, dtdl.collision_distance_alarm, dtdl.h_distance_warning, dtdl.h_distance_alarm, dtdl.v_distance_warning, dtdl.v_distance_alarm, dtdl.lean_warning, dtdl.lean_alarm, dtdl.range_limit_start, dtdl.range_limit_end, dtdl.height_limit_start, dtdl.height_limit_end, dtdl.rotation_limit_start, dtdl.rotation_limit_end, dtdl.is_del, dtdl.create_by, dtdl.create_time, dtdl.update_by, dtdl.update_time, dtdl.remark from dev_tower_data_limit dtdl left join sys_dept sp on sp.dept_id = dtdl.project_id left join sys_dept sd on sd.dept_id = dtdl.com_id + left join pro_project_info_subdepts pd on pd.id=dtdl.dept_id + @@ -70,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and dtdl.cfg_id = #{cfgId} and dtdl.project_id = #{projectId} and dtdl.com_id = #{comId} + and dtdl.dept_id = #{deptId} and dtdl.project_id in (select spv.dept_id from sys_dept spv where spv.dept_name like concat('%', #{projectName}, '%')) and dtdl.dept_id in (select sdv.dept_id from sys_dept sdv where sdv.dept_name like concat('%', #{comName}, '%')) and dtdl.device_key = #{deviceKey} @@ -91,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" cfg_id, project_id, com_id, + dept_id, device_key, device_source, tower_id, @@ -139,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{cfgId}, #{projectId}, #{comId}, + #{deptId}, #{deviceKey}, #{deviceSource}, #{towerId}, @@ -191,6 +199,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" cfg_id = #{cfgId}, project_id = #{projectId}, com_id = #{comId}, + dept_id = #{deptId}, device_key = #{deviceKey}, device_source = #{deviceSource}, tower_id = #{towerId}, diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataLocalMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataLocalMapper.xml index 4a0ff633..ca0ba21a 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataLocalMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataLocalMapper.xml @@ -11,6 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -46,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" dtdl.project_id, dtdl.com_id, sp.dept_name projectName, - sd.dept_name com_name, + sd.dept_name com_name,dtdl.dept_id,pd.sub_dept_name dept_name, dtdl.device_key, dtdl.device_source, dtdl.tower_id, @@ -77,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from dev_tower_data_local dtdl left join sys_dept sp on sp.dept_id = dtdl.project_id left join sys_dept sd on sd.dept_id = dtdl.com_id + left join pro_project_info_subdepts pd on pd.id=dtdl.dept_id @@ -102,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and dtdr.cfg_id = #{cfgId} and dtdr.project_id = #{projectId} and dtdr.com_id = #{comId} + and dtdr.dept_id = #{deptId} and dtdr.project_id in (select spv.dept_id from sys_dept spv where spv.dept_name like concat('%', #{projectName}, '%')) and dtdr.dept_id in (select sdv.dept_id from sys_dept sdv where sdv.dept_name like concat('%', #{comName}, '%')) and dtdr.device_key = #{deviceKey} @@ -123,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" cfg_id, project_id, com_id, + dept_id, device_key, device_source, tower_id, @@ -164,6 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{cfgId}, #{projectId}, #{comId}, + #{deptId}, #{deviceKey}, #{deviceSource}, #{towerId}, @@ -209,6 +215,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" cfg_id = #{cfgId}, project_id = #{projectId}, com_id = #{comId}, + dept_id = #{deptId}, device_key = #{deviceKey}, device_source = #{deviceSource}, tower_id = #{towerId}, @@ -263,7 +270,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select count(1) as total from dev_tower_data_run - and cfg_id = (select dc.id from dev_tower_project_config dc where dc.device_sn=#{deviceKey}) and device_key = #{deviceKey} + and cfg_id in (select dc.id from dev_tower_project_config dc where dc.device_sn=#{deviceKey}) and device_key = #{deviceKey} and is_alarm = 1 and date(create_time) between #{params.beginCreateTime} and #{params.endCreateTime} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataWarningMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataWarningMapper.xml index bb1d1469..cc08f443 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataWarningMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevTowerDataWarningMapper.xml @@ -11,6 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -33,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" dtdw.project_id, dtdw.com_id, sp.dept_name projectName, - sd.dept_name com_name, + sd.dept_name com_name,dtdw.dept_id,pd.sub_dept_name dept_name, dtdw.device_key, dtdw.device_source, dtdw.tower_id, @@ -51,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from dev_tower_data_warning dtdw left join sys_dept sp on sp.dept_id = dtdw.project_id left join sys_dept sd on sd.dept_id = dtdw.com_id + left join pro_project_info_subdepts pd on pd.id=dtdw.dept_id @@ -75,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and dtpc.project_id = #{projectId} and sp.projectName like concat('%', #{projectName}, '%') and dtpc.com_id = #{comId} + and dtpc.dept_id = #{deptId} and sd.dept_name like concat('%', #{comName}, '%') and dtpc.device_sn like concat('%', #{deviceSn}, '%') and dtpc.device_name like concat('%', #{deviceName}, '%') @@ -96,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" project_id, com_id, + dept_id, device_sn, device_name, device_source, @@ -123,6 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{projectId}, #{comId}, + #{deptId}, #{deviceSn}, #{deviceName}, #{deviceSource}, @@ -154,6 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" project_id = #{projectId}, com_id = #{comId}, + dept_id = #{deptId}, device_sn = #{deviceSn}, device_name = #{deviceName}, device_source = #{deviceSource}, diff --git a/yanzhu-ui-vue3/src/views/device/towerDataCollide/index.vue b/yanzhu-ui-vue3/src/views/device/towerDataCollide/index.vue index b988d710..37d99f1a 100644 --- a/yanzhu-ui-vue3/src/views/device/towerDataCollide/index.vue +++ b/yanzhu-ui-vue3/src/views/device/towerDataCollide/index.vue @@ -4,13 +4,17 @@ label-width="68px"> + placeholder="请选择所属项目" style="width: 200px" @change="queryProjectChange"> - - + + + + + + @@ -233,6 +238,7 @@ import { listTowerDataCollide, getTowerDataCollide, delTowerDataCollide, addTowerDataCollide, updateTowerDataCollide } from "@/api/device/towerDataCollide"; +import { listProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts"; import useUserStore from '@/store/modules/user' import { findMyProjectList } from "@/api/publics"; export default { @@ -288,6 +294,7 @@ export default { isAdmin: false, projects: [], currentPrjId: null, + subDepts: [], }; }, created() { @@ -297,10 +304,26 @@ export default { this.queryParams.projectId = this.userStore.currentPrjId; this.queryParams.comId = this.userStore.currentComId; this.currentPrjId = this.userStore.currentPrjId; + this.queryProjectChange(); this.getList(); this.getProjectList(); }, methods: { + queryProjectChange() { + this.subDepts = [] + this.queryParams.deptId = ""; + if (this.queryParams.projectId) { + this.getSubDepts(this.queryParams.projectId, data => { + this.subDepts = data; + }) + } + }, + getSubDepts(prjId, cb) { + listProProjectInfoSubdepts({ projectId: prjId, pageNum: 1, pageSize: 100, activeTags: "finished" }).then(d => { + let subdepts = d.rows || []; + cb && cb(subdepts); + }); + }, /** 查询项目列表 */ getProjectList() { findMyProjectList({ pageNum: 1, pageSize: 100 }).then(response => { diff --git a/yanzhu-ui-vue3/src/views/device/towerDataLimit/index.vue b/yanzhu-ui-vue3/src/views/device/towerDataLimit/index.vue index e34e06bc..0f610709 100644 --- a/yanzhu-ui-vue3/src/views/device/towerDataLimit/index.vue +++ b/yanzhu-ui-vue3/src/views/device/towerDataLimit/index.vue @@ -4,13 +4,17 @@ label-width="68px"> + placeholder="请选择所属项目" style="width: 200px" @change="queryProjectChange"> - - + + + + + + @@ -238,6 +243,7 @@ import { listTowerDataLimit, getTowerDataLimit, delTowerDataLimit, addTowerDataLimit, updateTowerDataLimit } from "@/api/device/towerDataLimit"; +import { listProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts"; import useUserStore from '@/store/modules/user' import { findMyProjectList } from "@/api/publics"; export default { @@ -289,6 +295,7 @@ export default { isAdmin: false, projects: [], currentPrjId: null, + subDepts: [], }; }, created() { @@ -298,10 +305,26 @@ export default { this.queryParams.projectId = this.userStore.currentPrjId; this.queryParams.comId = this.userStore.currentComId; this.currentPrjId = this.userStore.currentPrjId; + this.queryProjectChange(); this.getList(); this.getProjectList(); }, methods: { + queryProjectChange() { + this.subDepts = [] + this.queryParams.deptId = ""; + if (this.queryParams.projectId) { + this.getSubDepts(this.queryParams.projectId, data => { + this.subDepts = data; + }) + } + }, + getSubDepts(prjId, cb) { + listProProjectInfoSubdepts({ projectId: prjId, pageNum: 1, pageSize: 100, activeTags: "finished" }).then(d => { + let subdepts = d.rows || []; + cb && cb(subdepts); + }); + }, /** 查询项目列表 */ getProjectList() { findMyProjectList({ pageNum: 1, pageSize: 100 }).then(response => { diff --git a/yanzhu-ui-vue3/src/views/device/towerDataRound/index.vue b/yanzhu-ui-vue3/src/views/device/towerDataRound/index.vue index eb30124b..db0f8b13 100644 --- a/yanzhu-ui-vue3/src/views/device/towerDataRound/index.vue +++ b/yanzhu-ui-vue3/src/views/device/towerDataRound/index.vue @@ -4,11 +4,18 @@ label-width="68px"> + placeholder="请选择所属项目" style="width: 240px" @change="queryProjectChange"> + + + + + + + - + @@ -210,6 +218,7 @@ import { addTowerDataRound, updateTowerDataRound, } from "@/api/device/towerDataRound"; +import { listProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts"; import useUserStore from '@/store/modules/user' import { findMyProjectList } from "@/api/publics"; export default { @@ -261,6 +270,7 @@ export default { isAdmin: false, projects: [], currentPrjId: null, + subDepts: [], }; }, created() { @@ -270,10 +280,26 @@ export default { this.queryParams.projectId = this.userStore.currentPrjId; this.queryParams.comId = this.userStore.currentComId; this.currentPrjId = this.userStore.currentPrjId; + this.queryProjectChange(); this.getList(); this.getProjectList(); }, methods: { + queryProjectChange() { + this.subDepts = [] + this.queryParams.deptId = ""; + if (this.queryParams.projectId) { + this.getSubDepts(this.queryParams.projectId, data => { + this.subDepts = data; + }) + } + }, + getSubDepts(prjId, cb) { + listProProjectInfoSubdepts({ projectId: prjId, pageNum: 1, pageSize: 100, activeTags: "finished" }).then(d => { + let subdepts = d.rows || []; + cb && cb(subdepts); + }); + }, /** 查询项目列表 */ getProjectList() { findMyProjectList({ pageNum: 1, pageSize: 100 }).then(response => { diff --git a/yanzhu-ui-vue3/src/views/device/towerDataRun/index.vue b/yanzhu-ui-vue3/src/views/device/towerDataRun/index.vue index ace64cec..1c28bf1e 100644 --- a/yanzhu-ui-vue3/src/views/device/towerDataRun/index.vue +++ b/yanzhu-ui-vue3/src/views/device/towerDataRun/index.vue @@ -4,11 +4,18 @@ label-width="68px"> + placeholder="请选择所属项目" style="width: 240px" @change="queryProjectChange"> + + + + + + +