From 8a3097c45637bb1772bd731c6847819c9acb3bb9 Mon Sep 17 00:00:00 2001 From: "lj7788@126.com" Date: Mon, 13 Oct 2025 15:31:00 +0800 Subject: [PATCH] =?UTF-8?q?10.13=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yanzhu-bigscreen/src/api/index.js | 4 +- yanzhu-bigscreen/src/api/pitmonit.js | 45 + .../src/components/classify-bar.js | 256 ++++ yanzhu-bigscreen/src/components/header.vue | 146 +- .../src/components/trend-line-chart.js | 173 +++ yanzhu-bigscreen/src/router/index.js | 6 + .../src/views/safety/excavation.vue | 1315 +++++++++++++++++ yanzhu-bigscreen/src/views/style/index.css | 142 ++ yanzhu-bigscreen/src/views/style/index.less | 2 +- .../device/PitmonitSouthsmosAlarmMapper.xml | 4 +- .../device/PitmonitSouthsmosDataMapper.xml | 4 +- .../mapper/manage/ProProjectInfoMapper.xml | 2 +- .../controller/ProCostOutputController.java | 12 +- .../bigscreen/PitMonitController.java | 81 + .../impl/ProCostOutputServiceImpl.java | 9 +- yanzhu-ui-vue3/index.html | 495 ++++--- .../src/components/BaiduMap/Map.vue | 69 +- .../views/bim/bimSetting/CustomViewpoint.vue | 149 +- .../views/flowable/task/flowForm/index.vue | 80 +- yanzhu-ui-vue3/src/views/login.vue | 16 +- .../src/views/manage/costOutput/costMonth.vue | 44 +- .../src/views/manage/costOutput/costYear.vue | 39 +- .../src/views/manage/proProjectInfo/index.vue | 4 +- 23 files changed, 2608 insertions(+), 489 deletions(-) create mode 100644 yanzhu-bigscreen/src/api/pitmonit.js create mode 100644 yanzhu-bigscreen/src/components/classify-bar.js create mode 100644 yanzhu-bigscreen/src/components/trend-line-chart.js create mode 100644 yanzhu-bigscreen/src/views/safety/excavation.vue create mode 100644 yanzhu-bigscreen/src/views/style/index.css create mode 100644 yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/bigscreen/PitMonitController.java diff --git a/yanzhu-bigscreen/src/api/index.js b/yanzhu-bigscreen/src/api/index.js index 9ae29104..971db610 100644 --- a/yanzhu-bigscreen/src/api/index.js +++ b/yanzhu-bigscreen/src/api/index.js @@ -14,6 +14,7 @@ import labor from "./labor"; import bim from "./bim" import machMater from './machmater' import checked from './checked' +import pitmonit from './pitmonit' export default { http: axios, @@ -32,5 +33,6 @@ export default { labor, bim, machMater, - checked + checked, + pitmonit }; diff --git a/yanzhu-bigscreen/src/api/pitmonit.js b/yanzhu-bigscreen/src/api/pitmonit.js new file mode 100644 index 00000000..678f1ea7 --- /dev/null +++ b/yanzhu-bigscreen/src/api/pitmonit.js @@ -0,0 +1,45 @@ +import request from "@/utils/request"; + +const totalCount=(prjId)=>{ + return request({ + url: `/manage/bgscreen/pitmonit/totalCount?prjId=${prjId}`, + method: 'get' + }) +} + +const alarmList=(prjId)=>{ + return request({ + url: `/manage/bgscreen/pitmonit/alarm?prjId=${prjId}`, + method: 'get' + }) +} + +const getLastDataForElement=(prjId)=>{ + return request({ + url: `/manage/bgscreen/pitmonit/getLastDataForElement?prjId=${prjId}`, + method: 'get' + }) +} + +const selectByDate=data=>{ + return request({ + url: `/manage/bgscreen/pitmonit/selectByDate`, + method: 'post', + data:data + }) +} + +const monitDays=(prjId)=>{ + return request({ + url: `/manage/bgscreen/pitmonit/monitDays?prjId=${prjId}`, + method: 'get' + }) +} + +export default{ + totalCount, + alarmList, + getLastDataForElement, + selectByDate, + monitDays +} \ No newline at end of file diff --git a/yanzhu-bigscreen/src/components/classify-bar.js b/yanzhu-bigscreen/src/components/classify-bar.js new file mode 100644 index 00000000..b84e5523 --- /dev/null +++ b/yanzhu-bigscreen/src/components/classify-bar.js @@ -0,0 +1,256 @@ +import Vue from 'vue' +Vue.component("classify-bar", { + template: ` +
+ +
+ `, + props: { + data:{ + type:Array + }, + height:{ + type:Number + }, + legend:{ + type:Array + }, + }, + data() { + return { + classData:[], + } + }, + mounted(){ + this.init() + }, + methods: { + init(){ + this.getChartData() + }, + getChartData(){ + //品类金额占比 饼图 + var chChartPie = echarts.init(this.$refs.chart); + this.echartPie(chChartPie,this.data) + }, + echartPie(chChart,data){ + let newPromise = new Promise((resolve) => { + resolve() + }) + + //然后异步执行echarts的初始化函数 + newPromise.then(() => { + if(data.length==0){ + return; + } + var max = data[0].total + var nameData = []; + var totalData = [] + var background = [] + var yesMonitor = [] + var notMonitor = [] + var yesProp = [] + var notProp = [] + var unitData = [] + + for (let i = data.length-1; i >=0 ; i--) { + nameData.push(data[i].name); + totalData.push(data[i].total) + unitData.push(data[i].unit) + background.push(100); + yesMonitor.push(data[i].yesMonitor); + notMonitor.push(data[i].notMonitor); + yesProp.push((data[i].yesMonitor/max)*100) + notProp.push((data[i].notMonitor/max)*100) + } + + var legend = ["已监控", "未监控"] + if(this.legend){ + legend = this.legend + } + + this.option = { + grid: { + //图表的位置 + top: "8%", + left: "3%", + right: "5%", + bottom: "-12%", + containLabel: true, + }, + legend: { + right: "0", + top: "0", + //icon: "circle", + itemWidth: 15, + itemHeight:10, + itemGap: 8, + textStyle: { + fontSize: 12, + color:'#c6d9fa' + }, + data: legend, + }, + xAxis: [{ + show: false, + }, + //由于下边X轴已经是百分比刻度了,所以需要在顶部加一个X轴,刻度是金额,也隐藏掉 + { + show: false, + } + ], + yAxis: [ + { + type: 'category', + axisLabel: { + show: false, //让Y轴数据不显示 + }, + itemStyle: { + + }, + axisTick: { + show: false, //隐藏Y轴刻度 + }, + axisLine: { + show: false, //隐藏Y轴线段 + }, + data: [], + },{ + show: false, + data: [], + axisLine: { + show: false + } + }], + series: [ + //数据条--------------------我是分割线君------------------------------// + { + show: true, + type: 'bar', + xAxisIndex: 1, //代表使用第二个X轴刻度!!!!!!!!!!!!!!!!!!!!!!!! + barGap: '-100%', + barWidth: '6', //统计条宽度 + itemStyle: { + normal: { + color: 'rgba(22,203,115,0.05)' + }, + }, + label: { + normal: { + show: true, + //label 的position位置可以是top bottom left,right,也可以是固定值 + //在这里需要上下统一对齐,所以用固定值 + position: [0, '-25'], + rich: { //富文本 + prop: { //自定义颜色 + color: '#c6d9fa', + fontSize:'14', + }, + unit:{ + color: '#6c829a', + fontSize:'12', + }, + yes:{ + color: '#55adf7', + fontSize:'14', + }, + not:{ + color: '#4677fa', + fontSize:'14', + }, + index:{ + color: '#fcbc02', + fontStyle: 'italic', + padding:[0,0,0,5], + fontSize:'14', + }, + name: { + width: 200, + color: '#c6d9fa', + padding:[0,0,0,10], + fontSize:'14', + }, + color:{ + color: '#8ca2be', + fontSize:'14', + }, + arrow:{ + width:12, + height:8, + backgroundColor: { + image: "/cdn/images/WEB_2B7C06210CD44D55BFEE6205A35DE4A7.png", + }, + }, + + }, + formatter: function(data) { + //富文本固定格式{colorName|这里填你想要写的内容} + //return '{arrow|}' + return '{arrow|}{index|No.'+(nameData.length-data.dataIndex)+'}{name|' + nameData[data.dataIndex] + '}{prop|' + totalData[data.dataIndex] + '}{unit| '+unitData[data.dataIndex]+'}{prop|(} {yes|'+yesMonitor[data.dataIndex]+'}{unit| '+unitData[data.dataIndex]+'/}{not|'+notMonitor[data.dataIndex]+'}{unit| '+unitData[data.dataIndex]+'}{prop|)} '; + }, + } + }, + data: background + }, + { + type: 'bar', + + silent: true, + yAxisIndex: 1, + barWidth: 6, + itemStyle: { + normal: { + color: 'rgba(0,82,198,0.3)' + }, + emphasis: { + color: 'rgba(0,82,198,0.3)' + } + }, + data: background + }, + { + type: 'bar', + name:legend[0], + + stack: '1', + legendHoverLink: false, + barWidth: 6, + itemStyle: { + normal: { + color: '#52adf4' + }, + emphasis: { + color: '#52adf4' + } + }, + data: yesProp + }, { + type: 'bar', + name:legend[1], + stack: '1', + legendHoverLink: false, + barWidth: 6, + itemStyle: { + normal: { + color: '#4677ff' + }, + emphasis: { + color: '#4677ff' + } + }, + data: notProp + }] + }; + + chChart.setOption(this.option); + window.onresize = chChart.resize; + }) + }, + }, + watch:{ + data: function (n,o) { + this.getChartData() + } + } + +}) diff --git a/yanzhu-bigscreen/src/components/header.vue b/yanzhu-bigscreen/src/components/header.vue index ceb87df9..3183a9b5 100644 --- a/yanzhu-bigscreen/src/components/header.vue +++ b/yanzhu-bigscreen/src/components/header.vue @@ -7,80 +7,113 @@
项目详情
劳务管理
-
+
项目概况
-
+
安全管理
-
+
质量管理
-
+
进度管理
-
+
物机管理
@@ -88,25 +121,34 @@
- + {{ selProject?.setting?.orgName || selProject?.projectName || "数字建安施工管理平台" }}
-
绿碳中心
-
+
绿碳中心
+
数字孪生
@@ -121,14 +163,17 @@
- - + + + fill p-id="3305" /> - + @@ -271,6 +316,7 @@ export default { }); }, doNav(n) { + console.log("--->",n); if (this.nav == n) { return; } @@ -294,6 +340,9 @@ export default { case 304: this.$router.push("/towerCrane"); break; + case 303: + this.$router.push("/excavation"); + break; case 306: this.$router.push("/powerIot"); break; @@ -358,7 +407,7 @@ export default { location.href = window.XDBSAPP; }); }) - .catch(() => {}); + .catch(() => { }); }, }, }; @@ -367,6 +416,7 @@ export default {
+ +
+ `, + props: { + chartdata:{ + type:Object + }, + height:{ + type:Number + }, + data:{ + type:Array + }, + fn:{ + type:Function + } + }, + data() { + return { + option:{} + } + }, + mounted(){ + this.init() + }, + methods: { + init(){ + this.getChartData() + }, + getChartData(){ + //品类金额占比 饼图 + var myChart = echarts.init(this.$refs.chart); + this.echartPie(myChart,this.chartdata) + }, + echartPie(myChart,data){ + let newPromise = new Promise((resolve) => { + resolve() + }) + //然后异步执行echarts的初始化函数 + newPromise.then(() => { + var series =[] + if(data && data.data){ + for (let i = 0; i < data.data.length; i++) { + series.push({ + name:data.legend[i], + type: "line", + smooth: true, + symbol: "circle", + symbolSize: 5, + showSymbol: true, + lineStyle: { + normal: { + width: 2, + }, + }, + data: data.data[i], + }) + } + } + var unit = '' + if(data.unit){ + unit = '单位:'+data.unit + } + + this.option = { + color : data.color, + dataZoom:[ + {show:true,type:'slider'}, + {type:'inside'} + ], + tooltip: { + trigger: "axis", + axisPointer: { + lineStyle: { + color: "#57617B", + }, + }, + }, + grid: { + top:'15%', + left: "1%", + right: "3%", + bottom: "1%", + containLabel: true, + }, + xAxis: { + type: "category", + boundaryGap: false, + data: data.dataX, + axisLine: { + //坐标轴轴线相关设置。数学上的x轴 + show: true, + lineStyle: { + color: "#25597e", + type: "dashed", + }, + }, + axisTick: { + show: false + }, + + axisLabel: { + //坐标轴刻度标签的相关设置 + textStyle: { + color: "#c5d9fc", + margin: 20, + fontSize:16 + }, + }, + }, + yAxis: { + name:unit, + nameTextStyle: { + color: '#fff', + fontSize: 14, + }, + type: "value", + axisLine: { + //坐标轴轴线相关设置。数学上的x轴 + show: false, + lineStyle: { + color: "#c5d9fc", + type: "dashed", + }, + }, + axisTick: { + show: false + }, + axisLabel: { + show: true, + //坐标轴刻度标签的相关设置 + textStyle: { + color: "#c5d9fc", + margin: 20, + fontSize:16 + }, + }, + splitLine: { + show: true, + lineStyle: { + color: "#25597e", + type: "dashed", + }, + }, + }, + series: series + }; + if(this.fn){ + this.option=this.fn(this.option); + } + myChart.setOption(this.option,true); + window.onresize = myChart.resize; + }) + }, + }, + watch:{ + /*chartdata: { + deep:true, + handler: function (val, oldVal){ + this.init() + } + },*/ + data: function (val, oldVal){ + this.init() + } + + } + +}) diff --git a/yanzhu-bigscreen/src/router/index.js b/yanzhu-bigscreen/src/router/index.js index f2023175..5d312099 100644 --- a/yanzhu-bigscreen/src/router/index.js +++ b/yanzhu-bigscreen/src/router/index.js @@ -92,6 +92,12 @@ const routes = [ name: "towerCrane", meta: { nav: 304 }, component: () => import(/* webpackChunkName: "towerCrane" */ "../views/safety/towerCrane.vue"), + }, + { + path: "/excavation", + name: "excavation", + meta: { nav: 303 }, + component: () => import(/* webpackChunkName: "excavation" */ "../views/safety/excavation.vue"), }, { path: "/powerIot", diff --git a/yanzhu-bigscreen/src/views/safety/excavation.vue b/yanzhu-bigscreen/src/views/safety/excavation.vue new file mode 100644 index 00000000..70129010 --- /dev/null +++ b/yanzhu-bigscreen/src/views/safety/excavation.vue @@ -0,0 +1,1315 @@ + + + + diff --git a/yanzhu-bigscreen/src/views/style/index.css b/yanzhu-bigscreen/src/views/style/index.css new file mode 100644 index 00000000..3dedf9a1 --- /dev/null +++ b/yanzhu-bigscreen/src/views/style/index.css @@ -0,0 +1,142 @@ +.el-tooltip__popper { + max-width: 50%; +} +.font-size-tools .set-font-size { + cursor: pointer; + position: relative; +} +.font-size-tools .set-font-size.active { + color: aqua; +} +.font-size-tools .set-font-size.active .svg-icon * { + fill: aqua; +} +.font-size-tools .set-font-size .svg-icon { + width: 40px !important; + height: 40px !important; +} +.font-size-tools .set-font-size.font-size2 { + margin-right: 4px; +} +.font-size-tools .set-font-size.font-size2::after { + content: "+"; + font-style: normal; + right: 0px; + font-weight: bold; + position: absolute; + font-size: 16px !important; +} +.font-size-tools .set-font-size.font-size0::after { + content: "-"; + font-style: normal; + right: 0px; + font-weight: bold; + position: absolute; + font-size: 16px !important; +} +.finish-0 { + color: #e6a23c; +} +.finish-1 { + color: red; +} +.finish-2 { + color: #01A9FF; +} +.finish-3 { + color: green; +} +.finish-4 { + color: #a2c8f9; +} +.hide-scroll { + overflow: hidden; +} +.bg-date-picker { + border: none; + background: transparent; +} +.bg-date-picker .el-range-input { + background: transparent; +} +.bg-date-picker .el-range-separator { + color: #fff; +} +.bg-date-picker-pop { + color: #eee; +} +.bg-date-picker-pop .el-picker-panel__sidebar { + background: transparent; + border-right-color: #01a9ff; +} +.bg-date-picker-pop .el-picker-panel__icon-btn { + color: #01A9FF; +} +.bg-date-picker-pop .el-picker-panel__icon-btn:hover { + color: #ced7db; +} +.bg-date-picker-pop .el-date-range-picker__content .el-date-table th { + border-bottom-color: #01a9ff; +} +.bg-date-picker-pop .el-date-range-picker__content .el-date-table td.in-range div { + background-color: #01A9FF; +} +.bg-date-picker-pop .el-date-range-picker__content.is-left { + border-right-color: #01a9ff; +} +.bg-date-picker-pop .popper__arrow { + border-bottom-color: #01A9FF !important; +} +.bg-date-picker-pop .popper__arrow::after { + border-bottom-color: #01A9FF !important; + border-top-color: #01a9ff !important; +} +.el-loading-mask { + background-color: rgba(255, 255, 255, 0.4); +} +.el-loading-mask .el-loading-spinner { + height: 100px; +} +.el-loading-mask .el-loading-spinner .circular { + right: unset; + width: 100px; + height: 100px; +} +.el-pagination.bg-pagination { + text-align: center; +} +.el-pagination.bg-pagination .btn-next, +.el-pagination.bg-pagination .btn-prev { + background-color: rgba(1, 169, 255, 0.4); + color: #fff; +} +.el-pagination.bg-pagination .btn-next { + margin-left: 20px; +} +.el-pagination.bg-pagination .el-pagination__total { + color: #fff; +} +.el-pagination.bg-pagination .el-pager li { + background-color: rgba(1, 169, 255, 0.4); + margin-left: 20px; + color: #fff; +} +.el-pagination.bg-pagination .el-pager li.active { + background-color: #01a9ff; +} +.el-message-box { + background-color: rgba(1, 169, 255, 0.5); + border: solid 1px #01a9ff; +} +.el-message-box__title { + color: #fff; +} +.el-message-box__btns { + text-align: center; +} +.el-message-box__content { + color: #fff; +} +.head-title-tab { + white-space: nowrap; +} diff --git a/yanzhu-bigscreen/src/views/style/index.less b/yanzhu-bigscreen/src/views/style/index.less index 0137bda9..2d34d723 100644 --- a/yanzhu-bigscreen/src/views/style/index.less +++ b/yanzhu-bigscreen/src/views/style/index.less @@ -100,7 +100,7 @@ border-bottom-color:#01A9FF !important; &::after{ border-bottom-color:#01A9FF !important; - top:0px !important; + border-top-color: #01a9ff !important; } } } diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/PitmonitSouthsmosAlarmMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/PitmonitSouthsmosAlarmMapper.xml index f4c59909..f67e415a 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/PitmonitSouthsmosAlarmMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/PitmonitSouthsmosAlarmMapper.xml @@ -222,10 +222,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"