فهرست منبع

重新打包后台管理系统

zhoupeng 1 سال پیش
والد
کامیت
e89bd77fc7

+ 72 - 0
industry-system/industry-da/src/main/java/com/example/opc_da/validate/reportTable/EventReportTableValidate.java

@@ -0,0 +1,72 @@
+package com.example.opc_da.validate.reportTable;
+
+import cn.hutool.core.collection.CollUtil;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.cqcy.ei.influxdb.entity.Item;
+import com.example.opc_common.util.Blank;
+import com.example.opc_da.config.SpringContextUtils;
+import com.example.opc_da.policy.EventReportDataPolicyTaskRegister;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 事件报表验证抽象类
+ */
+public abstract class EventReportTableValidate implements ReportTableValidate {
+
+    EventReportDataPolicyTaskRegister eventReportDataPolicyTaskRegister = SpringContextUtils.getBean(EventReportDataPolicyTaskRegister.class);
+
+    /**
+     * 回填表格数据,如果没得数据回填,则全部为空
+     *
+     * @param sheetData
+     * @param itemDataMap
+     */
+    public static void echoSheetAll(JSONArray sheetData, Map<String, List<Item>> itemDataMap) {
+        for (int i = 0; i < sheetData.size(); i++) {
+            JSONArray row = sheetData.getJSONArray(i);
+            for (int j = 0; j < row.size(); j++) {
+                JSONObject rowCol = row.getJSONObject(j);
+                if (Blank.isNotEmpty(rowCol)) {
+                    //能解析的数据才赋值
+                    try {
+                        JSONObject rowColJson = JSONObject.parseObject(rowCol.getString("v"));
+                        String type = rowColJson.getString("type");
+                        //如果类型为数据,则存入数据
+                        if (type.equals("data")) {
+                            JSONObject rowColData = rowColJson.getJSONObject("data");
+                            String itemId = rowColData.getString("itemId");
+                            if (Blank.isNotEmpty(itemId)) {
+                                List<Item> itemList = itemDataMap.get(itemId);
+                                if (CollUtil.isNotEmpty(itemList)) {
+                                    String value = itemList.get(0).getValue();
+                                    rowCol.put("v", value);
+                                    rowCol.put("m", value);
+                                    itemList.remove(0);
+                                } else {
+                                    rowCol.put("v", null);
+                                    rowCol.put("m", null);
+                                }
+                            }
+                            //如果类型为时间,则存入时间
+                        } else if (type.equals("datatime")) {
+                            List<Item> itemList = itemDataMap.entrySet().stream().findFirst().get().getValue();
+                            if (CollUtil.isNotEmpty(itemList)) {
+                                String time = itemList.get(0).getTime();
+                                rowCol.put("v", time);
+                                rowCol.put("m", time);
+                            } else {
+                                rowCol.put("v", null);
+                                rowCol.put("m", null);
+                            }
+                        }
+                    } catch (Exception e) {
+
+                    }
+                }
+            }
+        }
+    }
+}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
industry-system/industry-da/src/main/resources/static/page/index.html


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
industry-system/industry-da/src/main/resources/static/page/static/js/app.30c89522.js


+ 1 - 1
industry-system/industry-da/src/main/resources/static/page/static/js/chunk-2d0bd283.4869d429.js → industry-system/industry-da/src/main/resources/static/page/static/js/chunk-2d0bd283.72cc391d.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0bd283"],{"2b96":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("iframe",{style:{height:"90vh",width:"100%",border:"none",display:"block"},attrs:{id:"myIframe",src:e.iframeSrc},on:{load:e.load}})},n=[],s=r("5f87"),i={watch:{"$route.query.t":{handler:function(e,t){this.sendMsg({cmd:"show",data:{reportId:this.$route.query.id}})}}},data:function(){return{reportId:this.$route.query.id,type:this.$route.query.type,files:this.$route.query.files,iframeSrc:"/reportSheet/index.html"}},methods:{load:function(){var e=this,t=localStorage.getItem("IMPORT_FILES_JSON");e.sendMsg({cmd:"init",data:{token:Object(s["c"])(),url:"",reportId:this.reportId,type:this.type,files:t}}),localStorage.setItem("IMPORT_FILES_JSON",""),window.addEventListener("message",(function(t){var r=t.data;"close"===r.cmd&&e.$router.go(-1)}))},sendMsg:function(e){document.getElementById("myIframe").contentWindow.postMessage(e,"*")}},destroyed:function(){window.removeEventListener("message",(function(e){console.log(e)}))}},d=i,a=r("2877"),c=Object(a["a"])(d,o,n,!1,null,null,null);t["default"]=c.exports}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0bd283"],{"2b96":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("iframe",{style:{height:"90vh",width:"100%",border:"none",display:"block"},attrs:{id:"myIframe",src:e.iframeSrc},on:{load:e.load}})},n=[],s=r("5f87"),i={watch:{"$route.query.t":{handler:function(e,t){this.sendMsg({cmd:"show",data:{reportId:this.$route.query.id}})}}},data:function(){return{reportId:this.$route.query.id,type:this.$route.query.type,files:this.$route.query.files,iframeSrc:"/reportSheet/index.html"}},methods:{load:function(){var e=this,t=localStorage.getItem("IMPORT_FILES_JSON");e.sendMsg({cmd:"init",data:{token:Object(s["c"])(),url:"",reportId:this.reportId,type:this.type,files:t}}),localStorage.setItem("IMPORT_FILES_JSON",""),window.addEventListener("message",(function(t){var r=t.data;"close"===r.cmd&&e.$router.go(-1)}))},sendMsg:function(e){document.getElementById("myIframe").contentWindow.postMessage(e,"*")}},destroyed:function(){window.removeEventListener("message",(function(e){console.log(e)}))}},d=i,a=r("2877"),c=Object(a["a"])(d,o,n,!1,null,null,null);t["default"]=c.exports}}]);

+ 1 - 1
industry-system/industry-da/src/main/resources/static/page/static/js/chunk-2d213e6a.47e896e4.js → industry-system/industry-da/src/main/resources/static/page/static/js/chunk-2d213e6a.6727e252.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d213e6a"],{af3b:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("iframe",{style:{height:"90vh",width:"100%",border:"none",display:"block"},attrs:{id:"myIframe",src:e.iframeSrc},on:{load:e.sendToken}})])},o=[],s=n("5f87"),d={watch:{"$route.query.t":{handler:function(e,t){this.sendMsg({cmd:"show",data:{reportId:this.$route.query.id}})}}},data:function(){return{reportId:this.$route.query.id,iframeSrc:"/reportSheet/report-history.html"}},methods:{sendToken:function(){var e=this;e.sendMsg({cmd:"init",data:{token:Object(s["c"])(),url:"",reportId:this.reportId}}),window.addEventListener("message",(function(t){var n=t.data;"close"===n.cmd&&e.$router.go(-1)}))},sendMsg:function(e){document.getElementById("myIframe").contentWindow.postMessage(e,"*")}},destroyed:function(){window.removeEventListener("message",(function(e){console.log(e)}))}},i=d,a=n("2877"),c=Object(a["a"])(i,r,o,!1,null,null,null);t["default"]=c.exports}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d213e6a"],{af3b:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("iframe",{style:{height:"90vh",width:"100%",border:"none",display:"block"},attrs:{id:"myIframe",src:e.iframeSrc},on:{load:e.sendToken}})])},o=[],s=n("5f87"),d={watch:{"$route.query.t":{handler:function(e,t){this.sendMsg({cmd:"show",data:{reportId:this.$route.query.id}})}}},data:function(){return{reportId:this.$route.query.id,iframeSrc:"/reportSheet/report-history.html"}},methods:{sendToken:function(){var e=this;e.sendMsg({cmd:"init",data:{token:Object(s["c"])(),url:"",reportId:this.reportId}}),window.addEventListener("message",(function(t){var n=t.data;"close"===n.cmd&&e.$router.go(-1)}))},sendMsg:function(e){document.getElementById("myIframe").contentWindow.postMessage(e,"*")}},destroyed:function(){window.removeEventListener("message",(function(e){console.log(e)}))}},i=d,a=n("2877"),c=Object(a["a"])(i,r,o,!1,null,null,null);t["default"]=c.exports}}]);

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
industry-system/industry-da/src/main/resources/static/page/static/js/chunk-2ff9c2aa.4a8669e4.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
industry-system/industry-da/src/main/resources/static/page/static/js/chunk-3c7280bc.326bb34f.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
industry-system/industry-da/src/main/resources/static/page/static/js/chunk-49846205.dcbc3206.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
industry-system/industry-da/src/main/resources/static/page/static/js/chunk-7cd04953.f26dc502.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
industry-system/industry-da/src/main/resources/static/page/static/js/chunk-844beabe.3c156594.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
industry-system/industry-da/src/main/resources/static/page/static/js/chunk-c6993184.d61da4a7.js


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است