From b97647a711c84958ef247b36781f870dabd9b78c Mon Sep 17 00:00:00 2001 From: "lj7788@126.com" Date: Fri, 18 Jul 2025 18:25:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E6=9D=90=E6=96=99=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yanzhu-bigscreen/src/api/machmater.js | 23 +- .../src/components/consumeChart.vue | 221 +++++++ .../components/manyBarChart.vue | 36 +- .../machmater/components/appFormDialog.vue | 392 ++++++++++++ .../views/machmater/components/manyChart.vue | 38 +- .../src/views/machmater/materialManage.vue | 589 +++++++++++++++++- .../bigscreen/MachMaterController.java | 44 ++ 7 files changed, 1313 insertions(+), 30 deletions(-) create mode 100644 yanzhu-bigscreen/src/components/consumeChart.vue rename yanzhu-bigscreen/src/{views/machmater => }/components/manyBarChart.vue (86%) create mode 100644 yanzhu-bigscreen/src/views/machmater/components/appFormDialog.vue diff --git a/yanzhu-bigscreen/src/api/machmater.js b/yanzhu-bigscreen/src/api/machmater.js index ee0acdbb..15630515 100644 --- a/yanzhu-bigscreen/src/api/machmater.js +++ b/yanzhu-bigscreen/src/api/machmater.js @@ -211,6 +211,24 @@ const materGetConcreteOrderDetailsInfoService=data=>{ }) } +//材料销号制-工单运输信息 +const materGetConcreteOrderMSSelectService=data=>{ + return request({ + url: '/manage/bgscreen/machMater/materGetConcreteOrderMSSelectService', + method: 'get', + params: data + }) +} + +//材料销号制-工单人员信息 +const materGetFlowInfo2LogInfoByBusibessIdPageService=data=>{ + return request({ + url: '/manage/bgscreen/machMater/materGetFlowInfo2LogInfoByBusibessIdPageService', + method: 'get', + params: data + }) +} + export default{ machGetManageQuota, machGetEquipmentOverview, @@ -231,5 +249,8 @@ export default{ materGetProjectChaoHaoStatisticsRPTService, materGetReportConcreteExceedReasonService, materGetReportConcreteExceedMaterielTopService, - materGetConcreteOrderDetailsInfoService + materGetConcreteOrderDetailsInfoService, + materGetConcreteOrderMSSelectService, + materGetFlowInfo2LogInfoByBusibessIdPageService + } \ No newline at end of file diff --git a/yanzhu-bigscreen/src/components/consumeChart.vue b/yanzhu-bigscreen/src/components/consumeChart.vue new file mode 100644 index 00000000..23a115ae --- /dev/null +++ b/yanzhu-bigscreen/src/components/consumeChart.vue @@ -0,0 +1,221 @@ + + + + + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/views/machmater/components/manyBarChart.vue b/yanzhu-bigscreen/src/components/manyBarChart.vue similarity index 86% rename from yanzhu-bigscreen/src/views/machmater/components/manyBarChart.vue rename to yanzhu-bigscreen/src/components/manyBarChart.vue index 491cec7f..bad0ba74 100644 --- a/yanzhu-bigscreen/src/views/machmater/components/manyBarChart.vue +++ b/yanzhu-bigscreen/src/components/manyBarChart.vue @@ -1,5 +1,5 @@ + + diff --git a/yanzhu-bigscreen/src/views/machmater/components/manyChart.vue b/yanzhu-bigscreen/src/views/machmater/components/manyChart.vue index a003e9bb..d252790c 100644 --- a/yanzhu-bigscreen/src/views/machmater/components/manyChart.vue +++ b/yanzhu-bigscreen/src/views/machmater/components/manyChart.vue @@ -1,9 +1,8 @@ diff --git a/yanzhu-bigscreen/src/views/machmater/materialManage.vue b/yanzhu-bigscreen/src/views/machmater/materialManage.vue index c0ee2302..e20e6def 100644 --- a/yanzhu-bigscreen/src/views/machmater/materialManage.vue +++ b/yanzhu-bigscreen/src/views/machmater/materialManage.vue @@ -3,7 +3,8 @@
- + @@ -42,8 +43,88 @@ - + +
+ + +
+
+
+ +
+
+
+
销号设计量
+

{{ finishGhBaseUseTired.finishGhSjl }}{{ unit }}

+
+
+
+ +
+
+
+ +
+
+
+
销号实耗
+

{{ finishGhBaseUseTired.finishGhshl }}{{ unit }}

+
+
+
+ +
+
+
+ +
+
+
+
节超量
+

{{ finishGhBaseUseTired.finishGhJcl }}{{ unit }}

+
+
+
+ +
+
+
+ +
+
+
+
节超率
+

{{ finishGhBaseUseTired.finishGhJclRate }} %

+
+
+
+
+
+ +
+
+
超耗率TOP5材料
+
+ +
+
+
+ + +
+
+
超耗原因分析 混凝土(m³)
+
+
+ +
+
+ +
+
@@ -51,15 +132,21 @@ import debounce from "lodash.debounce"; import moreButton from "./components/moreButton.vue"; import manyChart from "./components/manyChart.vue"; +import consumeChart from "@/components/consumeChart.vue"; +import appFormDialog from "./components/appFormDialog.vue"; + export default { components: { moreButton, manyChart, + consumeChart, + appFormDialog, }, data() { return { dpi: "", selProject: null, + unit: 'm³', //混凝土:m³,钢筋:t //今日工单 todaysWorkOrderData: { labels: [], @@ -78,6 +165,25 @@ export default { moreData: [], workerOrderKey: 0, workerOrderLoading: false, + //项目开累应用情况 + finishGhBaseUseTired: { + finishGhSjl: 0, + finishGhshl: 0, + finishGhJcl: 0, + finishGhJclRate: 0.0 + }, + //超耗情况 超耗率TOP5材料 + excessRateData: [], + excessRateDataKey: 0, + excessNameWidth: 100, + erHeight: 30, + //超耗情况 超耗原因分析 + typEreasonData: [], + excessReasonKey: 100000, + excessTitle: 100, + excessReasonLegendOpt: {}, + chart3Height: 300, + }; }, mounted() { @@ -110,18 +216,191 @@ export default { this.chartKey++; this.orderDataKey++; this.workerOrderKey++; + this.excessNameWidth = is1K ? 250 : is2K ? 400 : 650; + this.excessRateDataKey++; + this.excessReasonKey++; + this.chart3Height = is1K ? 250 : is2K ? 400 : 600; + this.erHeight = is1K ? 80 : is2K ? 100 : 150; + }, init() { + if (!this.selProject) { return; } - + this.initExcessReasonLegendOpt(); //今日工单 this.loadTodaysWorkOrderData(); //获取工号信息 this.loadWorkOrderData(); + //获取用量情况统计服务 + this.getProjectChaoHaoStatisticsRPTService(); + + //超耗率TOP5材料 + this.getReportExceedMaterielTopService(); + + //超耗原因分析 + this.getReportConcreteExceedReasonService(); + + }, + onInspectionPopup(row) { + console.log(row) + + this.$refs.appFormDialog.showDialog(this.selProject.id, row) + }, + initExcessReasonLegendOpt() { + let is1K = this.$dpi() == "1K"; + let is2K = this.$dpi() == "2K"; + this.excessReasonLegendOpt = { + icon: "rect", + orient: "vertical", + itemWidth: "50%", + + itemWidth: 20, + itemGap: 20, + itemHeight: 20, + type: "scroll", + pageTextStyle: { + color: "#c3dbfd", + fontSize: is1K ? 12 : is2K ? 16 : 24, + }, + scroll: { + y: is1K ? 300 : is2K ? 500 : 600, + bar: { + show: true, + width: 5, + height: 10, + }, + }, + textStyle: { + padding: [0, 0, 0, 0], + fontSize: is1K ? 12 : is2K ? 16 : 24, + color: "#c3dbfd", + align: "center", + rich: { + name: { + fontSize: is1K ? 12 : is2K ? 16 : 24, + color: "#c3dbfd", + padding: [5, 2, 5, 2], + }, + percent: { + fontSize: is1K ? 12 : is2K ? 16 : 24, + color: "#4676FD", + padding: [0, 2, 0, 2], + }, + }, + }, + }; + }, + changeChart3(opt) { + if (this.$dpi() == "1K") { + opt.legend[0].left = 200; + return opt; + } else if (this.$dpi() == "2K") { + opt.legend[0].left = 290; + return opt; + } else { + opt.legend[0].left = 500; + return opt; + } + }, + getReportConcreteExceedReasonService() { + this.$api.machMater.materGetReportConcreteExceedReasonService({ + projectId: this.selProject.id + }).then(d => { + this.excessTitle = 0; + let result = d.data; + if (result && result.code == '000000' && result.data) { + var temp = {} + let datas2 = [] + for (let i = 0; i < result.data.length; i++) { + if (result.data[i].causeName.indexOf('其他') != -1) { + for (let k in result.data[i]) { + temp[k] = result.data[i][k] + } + temp.name = "其它原因" + temp.value = Number(temp.chActQuantity).toFixed(1); + result.data.splice(i, 1) + break; + } + } + + for (let i = 0; i < result.data.length; i++) { + if (i < 5) { + result.data[i].value = Number(result.data[i].chActQuantity).toFixed(1); + result.data[i].name = result.data[i].causeName; + datas2.push( + result.data[i] + ) + } else { + temp.value = Number(Number(temp.value) + Number(Number(result.data[i].chActQuantity).toFixed(1))).toFixed(1) + } + } + + datas2 = datas2.sort((next, prev) => prev.value - next.value) + if (Object.keys(temp).length > 0) { + datas2.push(temp) + } + this.typEreasonData = datas2; + } + this.typEreasonData.forEach(item => { + this.excessTitle += item.value * 1; + }); + this.excessReasonKey++; + this.excessTitle = Number(this.excessTitle).toFixed(1); + + }); + }, + getReportExceedMaterielTopService() { + this.$api.machMater.materGetReportConcreteExceedMaterielTopService({ + projectId: this.selProject.id, + top: 5 + }).then(d => { + let res = d.data; + if (res && res.code == '000000') { + let objs = res.data || []; + objs = objs; + this.excessRateData = objs.map((item, index) => { + return { + value: index + 1, + prop: parseFloat(parseFloat(item.chPer || "0").toFixed(1)), + text: item.materielName + '(' + item.materielModel + ')' + } + }).sort((a, b) => a.prop - b.prop); + this.excessRateDataKey++; + console.log("+++++>", this.excessRateData) + } + }); + }, + getProjectChaoHaoStatisticsRPTService() { + this.$api.machMater.materGetProjectChaoHaoStatisticsRPTService({ + projectId: this.selProject.id, + }).then(d => { + let res = d.data; + this.finishGhBaseUseTired = { + finishGhSjl: 0, + finishGhshl: 0, + finishGhJcl: 0, + finishGhJclRate: 0.0 + } + + if (res && res.code == '000000' && res.data && res.data.length > 0) { + let tmp = res.data[0]; + if (!tmp) { + return; + } + //完工工号设计量(混凝土) + this.finishGhBaseUseTired.finishGhSjl = parseFloat(tmp.concrete_finish_designtotal_not_loss).toFixed(1); + //完工工号实耗量(混凝土) + this.finishGhBaseUseTired.finishGhshl = parseFloat(tmp.concrete_real_consume).toFixed(1); + //完工工号节超量(混凝土) + this.finishGhBaseUseTired.finishGhJcl = parseFloat(tmp.concrete_deviation_not_loss).toFixed(1); + //完工工号节超率(混凝土) + this.finishGhBaseUseTired.finishGhJclRate = isNaN(parseFloat((tmp.concrete_deviation_not_loss / tmp.concrete_finish_designtotal_not_loss) * 100).toFixed(1)) ? '0.0' : parseFloat((tmp.concrete_deviation_not_loss / tmp.concrete_finish_designtotal_not_loss) * 100).toFixed(1); + } + }); }, //获取材料销号制混凝土楼号维度信息 async getConcreteMaterialActQuantityBuildingNoInfoService(type) { @@ -136,6 +415,7 @@ export default { this.workerOrderLoading = true let result = await this.$api.machMater.materGetConcreteMaterialActQuantityBuildingNoInfoService(postData) result = result.data; + this.workerOrderLoading = false if (result && result.code == '000000' && result.data) { let moreDataTemp = [] result.data.forEach(item => { @@ -185,7 +465,7 @@ export default { } else { this.moreData = [] } - this.workerOrderLoading = false + this.workerOrderKey++; }, @@ -203,6 +483,7 @@ export default { this.workerOrderLoading = true let result = await this.$api.machMater.materGetConcreteMaterialActQuantityFloorLevelInfoService(postData); result = result.data; + this.workerOrderLoading = false if (result && result.code == '000000' && result.data) { let moreDataTemp = [] result.data.forEach(item => { @@ -241,7 +522,7 @@ export default { }) }) this.moreData = moreDataTemp.sort((prev, next) => prev.time - next.time) - this.workerOrderLoading = false + this.workerOrderKey++; } @@ -517,7 +798,7 @@ export default { } &.h33 { - height: calc(33% - 20px); + height: calc(33% - 11px); } } @@ -567,6 +848,39 @@ export default { } } + .excess-rate { + height: 400px; + + .rank-chart { + height: 100%; + + .rank-chart-title {} + + .consume-chart { + height: calc(100% - 40px); + } + } + } + + .excess-reason { + .rank-chart { + .rank-chart-title {} + } + + .excess-chart { + position: relative; + top: -10px; + + .chart-gif, + .chart-text { + width: 120px; + height: 120px; + left: 44px; + top: 65px !important; + } + } + } + @media (max-width: 1920px) { .order-data-module { .element-table-ranking { @@ -583,5 +897,266 @@ export default { } } } + + @media (min-width: 1921px) and (max-width: 2560px) { + .screen-module { + &.h33 { + height: calc(33% - 7px); + } + } + + .concrete-module { + .xhz-concrete-nav { + margin-top: 0px; + } + + .xhz-concrete-chart { + + height: calc(100% - 40px); + margin-top: 0px; + + .no-data { + + .no-data-img { + width: 150px; + } + + .no-data-text { + font-size: 16px; + } + } + } + + } + + .xhz-device-data { + .xhz-device-data-min { + .survey_content { + .xhz-education_bgd { + width: 110px; + height: 110px; + background-size: 90px 70px; + + img { + width: 40px; + height: 40px; + margin-top: 35px + } + } + } + + .xhz-current-value-data { + font-size: 24px; + + .led-number { + font-size: 40px; + } + } + } + } + + .excess-rate { + height: 520px; + + .rank-chart { + height: 100%; + + .rank-chart-title { + font-size: 24px; + + } + + .consume-chart { + height: calc(100% - 40px); + } + } + } + + .excess-reason { + margin-top: 30px; + + .rank-chart { + .rank-chart-title { + font-size: 24px; + + span { + font-size: 16px; + } + } + } + + .excess-chart { + position: relative; + top: -10px; + + .chart-gif, + .chart-text { + width: 190px; + height: 190px; + left: 49px; + top: 106px !important; + } + } + } + } + + @media (min-width: 2561px) { + + .screen-module { + &.h33 { + height: calc(33% + 1px); + } + } + + .concrete-module { + .xhz-concrete-nav { + margin-top: 0px; + + .sjk-chart-line-title { + div { + font-size: 30px; + padding: 10px 20px; + } + } + + .xhz-concrete-legend { + font-size: 28px; + + button { + width: 40px; + height: 30px; + } + } + + .sjk-chart-line-title-tz { + button { + font-size: 30px; + padding: 10px 20px; + } + + .more-btn { + font-size: 30px; + padding: 10px 20px; + + } + + .header-btn-list { + top: 40px; + + .header-btn-list-item { + width: 1030px !important; + + .header-btn-list-padding { + button { + width: 315px !important; + height: 60px; + line-height: 60px; + } + } + } + } + } + + } + + .xhz-concrete-chart { + + height: calc(100% - 120px); + margin-top: 30px; + + .no-data { + + .no-data-img { + width: 240px; + } + + .no-data-text { + font-size: 24px; + } + } + } + } + + .xhz-device-data { + .xhz-device-data-min { + .survey_content { + .xhz-education_bgd { + width: 160px; + height: 160px; + background-size: 130px 110px; + + img { + width: 70px; + height: 70px; + margin-top: 45px + } + } + } + + .xhz-current-value-data { + font-size: 32px; + + .led-number { + font-size: 50px; + } + } + } + } + + .excess-rate { + height: 920px; + + .rank-chart { + height: 100%; + + .rank-chart-title { + font-size: 32px; + height: 80px; + } + + .consume-chart { + height: calc(100% - 40px); + } + } + } + + .excess-reason { + margin-top: 60px; + + .rank-chart { + .rank-chart-title { + font-size: 32px; + height: 80px; + line-height: 80px; + + span { + font-size: 24px; + } + } + } + + .excess-chart { + position: relative; + top: -30px; + + .chart-gif, + .chart-text { + width: 290px; + height: 290px; + left: 78px; + top: 155px !important; + + .chart-text-title { + font-size: 48px; + } + + .chart-text-sub-title { + font-size: 28px; + } + } + } + } + + } } - + \ No newline at end of file diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/bigscreen/MachMaterController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/bigscreen/MachMaterController.java index df367dff..15479949 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/bigscreen/MachMaterController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/bigscreen/MachMaterController.java @@ -393,4 +393,48 @@ public class MachMaterController extends BaseController { return AjaxResult.success(JSONObject.parseObject(result)); } + + /** + * 材料销号制-工单运输信息 + */ + @GetMapping("/materGetConcreteOrderMSSelectService") + public AjaxResult materGetConcreteOrderMSSelectService(Long projectId, String initialId, String businessId) throws Exception { + Map map = getConfig(projectId, "mater"); + String url = map.get("url").toString(); + url += "/MklBaseController/getService"; + JSONObject paramJson = (JSONObject) map.get("obj"); + if (StringUtils.isNotEmpty(initialId)) { + paramJson.put("initialId", initialId); + } + if (StringUtils.isNotEmpty(businessId)) { + paramJson.put("businessId", businessId); + } + paramJson.put("service", "getConcreteOrderMSSelectService"); + HttpUtils httpUtils = new HttpUtils(); + + String result = httpUtils.sendGet(url, HttpUtils.jsonToGetParams(paramJson)); + return AjaxResult.success(JSONObject.parseObject(result)); + } + + /** + * 材料销号制-工单人员信息 + */ + @GetMapping("/materGetFlowInfo2LogInfoByBusibessIdPageService") + public AjaxResult materGetFlowInfo2LogInfoByBusibessIdPageService(Long projectId, String initialId, String businessId) throws Exception { + Map map = getConfig(projectId, "mater"); + String url = map.get("url").toString(); + url += "/MklBaseController/getService"; + JSONObject paramJson = (JSONObject) map.get("obj"); + if (StringUtils.isNotEmpty(initialId)) { + paramJson.put("initialId", initialId); + } + if (StringUtils.isNotEmpty(businessId)) { + paramJson.put("businessId", businessId); + } + paramJson.put("service", "getFlowInfo2LogInfoByBusibessIdPageService"); + HttpUtils httpUtils = new HttpUtils(); + + String result = httpUtils.sendGet(url, HttpUtils.jsonToGetParams(paramJson)); + return AjaxResult.success(JSONObject.parseObject(result)); + } }