Переглянути джерело

Merge branch 'master' of http://116.63.33.55/git/read_opc

# Conflicts:
#	reado-app/static/webview/record-wv.html
#	reado-app/static/webview/report-wv.html
Zt 1 рік тому
батько
коміт
7551252784
28 змінених файлів з 327 додано та 51 видалено
  1. 2 2
      chaunyi_opc/opc_da/src/main/java/com/example/opc_da/service/impl/ChartServiceImpl.java
  2. 8 6
      chaunyi_opc/opc_da/src/main/java/com/example/opc_da/task/PrintTask.java
  3. 187 15
      chaunyi_opc/opc_da/src/main/java/com/example/opc_da/task/ReportTableTask.java
  4. 7 1
      chaunyi_opc/opc_da/src/main/java/com/example/opc_da/task/ReportTask.java
  5. 4 0
      chaunyi_opc/opc_da/src/main/java/com/example/opc_da/util/CronUtil.java
  6. 1 1
      chaunyi_opc/opc_da/src/main/resources/mapper/ChartDao.xml
  7. 1 0
      chaunyi_opc/opc_da/src/main/resources/mapper/ReportTableDao.xml
  8. 1 1
      chaunyi_opc/opc_da/src/main/resources/static/app/index.html
  9. BIN
      chaunyi_opc/opc_da/src/main/resources/static/app/static/image/icon-demo-1126.png
  10. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/index.29ae2e0d.js
  11. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-reportForm-index.180f7e6d.js
  12. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-reportForm-index.e30bf04c.js
  13. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-user-index.49e6ebec.js
  14. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-user-index.5c000e73.js
  15. 2 2
      chaunyi_opc/opc_da/src/main/resources/static/app/static/webview/record-wv.html
  16. 3 3
      chaunyi_opc/opc_da/src/main/resources/static/app/static/webview/report-java.html
  17. 4 4
      chaunyi_opc/opc_da/src/main/resources/static/app/static/webview/report-wv.html
  18. 17 3
      chuanyi_client2/src/components/CustomDialog/UserGroup.vue
  19. 1 1
      chuanyi_client2/src/views/home/index.vue
  20. 10 1
      chuanyi_client2/src/views/my_report/index.vue
  21. 10 1
      chuanyi_client2/src/views/run_config/index.vue
  22. 28 3
      reado-app/pages/reportForm/data-item.vue
  23. 1 1
      reado-app/pages/user/index.vue
  24. BIN
      reado-app/static/image/icon-demo-1126.png
  25. 0 0
      reado-app/static/luckysheet/dist/plugins/js/uni-webview-js0.0.3_index.js
  26. 1 1
      reado-app/static/webview/record-wv.html
  27. 3 3
      reado-app/static/webview/report-java.html
  28. 36 2
      reado-app/static/webview/report-wv.html

+ 2 - 2
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/service/impl/ChartServiceImpl.java

@@ -152,7 +152,7 @@ public class ChartServiceImpl implements ChartService {
                                 List<BigDecimal> rawList = new ArrayList<>();
                                 List<String> rawTimeList = new ArrayList<>();
                                 for (int j = 0; j < rawDataList.size(); j++) {
-                                    RawData rawData = rawDataList.get(i);
+                                    RawData rawData = rawDataList.get(j);
                                     orgRawList.addAll(new ArrayList<>(Arrays.asList(JSON.parseObject(rawData.getOrgDataValue(), BigDecimal[].class))));
                                     rawList.addAll(new ArrayList<>(Arrays.asList(JSON.parseObject(rawData.getDataValue(), BigDecimal[].class))));
                                     rawTimeList.addAll(new ArrayList<>(Arrays.asList(JSON.parseObject(rawData.getDataValueTime(), String[].class))));
@@ -164,7 +164,7 @@ public class ChartServiceImpl implements ChartService {
                                 for (int j = 0; j < timeLength; j++) {
                                     List<BigDecimal> orgList = new ArrayList<>();
                                     List<BigDecimal> list = new ArrayList<>();
-                                    if (i != timeLength - 1) {
+                                    if (j != timeLength - 1) {
                                         endTimeTime = DateUtil.addTimeStamp(startTimeTime, pattern, bucketValue);
                                     } else {
                                         endTimeTime = endTime.getTime();

+ 8 - 6
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/task/PrintTask.java

@@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 
 import java.net.InetAddress;
-import java.net.UnknownHostException;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -24,16 +23,19 @@ public class PrintTask {
     private String printUrl;
 
     public void autoPrint(Print print) {
+        log.info("开始执行打印任务");
         Integer reportTableId = print.getReportTableId();
-//        String printIp = print.getPrintIp();
-        String printIp = "192.168.0.14";
+        String printIp = print.getPrintIp();
+//        String printIp = "192.168.0.14";
         try {
-//            String hostAddress = InetAddress.getLocalHost().getHostAddress();
-            String hostAddress = "192.168.1.222";
-            String url = "http://" + hostAddress + ":8081" + pageUrl + "?id=" + reportTableId;
+            String hostAddress = InetAddress.getLocalHost().getHostAddress();
+//            String hostAddress = "192.168.1.222";
+            String url = "http://" + hostAddress + ":8081/app" + pageUrl + "?id=" + reportTableId;
+            log.info("报表请求地址{}",url);
             Map<String, Object> map = new HashMap<>();
             map.put("url", url);
             String post = HttpUtil.post("http://" + printIp + ":8084" + printUrl, map);
+            log.info(post);
         } catch (Exception e) {
             String message = e.getMessage();
             if (message.contains("Connection timed out: connect")){

+ 187 - 15
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/task/ReportTableTask.java

@@ -820,10 +820,67 @@ public class ReportTableTask {
                         Integer itemType = ttci.getItemType();
                         if (itemType.equals(ConstantStr.ATTACH_ATTRIBUTES)) {
                             AttachRawData attachRawData = rawDataDao.getAttachRawData(itemGroupId, dataSourceId, itemName);
-                            reportChartItemList.add(new ReportChartItem(
-                                    reportChartId, itemId, flage ? attachRawData.getDataValue() : attachRawData.getOrgDataValue(),
-                                    attachRawData.getDataValueTime(), null
-                            ));
+                            String dataType = attachRawData.getDataType();
+                            String pattern = null;
+                            if (bucketType.equals(ConstantStr.PERIOD_TIME_DAY)) {
+                                pattern = ConstantStr.TIME_DAY_STR;
+                            } else if (bucketType.equals(ConstantStr.PERIOD_TIME_HOUR)) {
+                                pattern = ConstantStr.TIME_HOUR_STR;
+                            } else if (bucketType.equals(ConstantStr.PERIOD_TIME_MINUTE)) {
+                                pattern = ConstantStr.TIME_MINUTE_STR;
+                            } else if (bucketType.equals(ConstantStr.PERIOD_TIME_SECOND)) {
+                                pattern = ConstantStr.TIME_SECOND_STR;
+                            }
+                            int timeLength = DateUtil.timeDifference(startTime, endTime, pattern, bucketValue);
+                            String dataValueTime = attachRawData.getDataValueTime();
+                            if (dataType.toLowerCase().equals("boolean")) {
+                                List<Boolean> valueList = new ArrayList<>();
+                                List<Boolean> orgValueList = new ArrayList<>();
+                                List<String> valueTimeList = new ArrayList<>();
+                                Boolean dataBoolean = JSON.parseObject(attachRawData.getDataValue(), Boolean.class);
+                                Boolean orgBoolean = JSON.parseObject(attachRawData.getOrgDataValue(), Boolean.class);
+                                for (int i = 0; i < timeLength; i++) {
+                                    valueList.add(dataBoolean);
+                                    orgValueList.add(orgBoolean);
+                                    valueTimeList.add(dataValueTime);
+                                }
+                                reportChartItemList.add(new ReportChartItem(
+                                        reportChartId, itemId, flage ? ArrayUtil.listToStr(valueList) : ArrayUtil.listToStr(orgValueList),
+                                        ArrayUtil.listToStr(valueTimeList), null
+                                ));
+                            } else {
+                                try {
+                                    List<BigDecimal> valueList = new ArrayList<>();
+                                    List<BigDecimal> orgValueList = new ArrayList<>();
+                                    List<String> valueTimeList = new ArrayList<>();
+                                    BigDecimal dataBigDecimal = JSON.parseObject(attachRawData.getDataValue(), BigDecimal.class);
+                                    BigDecimal orgBigDecimal = JSON.parseObject(attachRawData.getOrgDataValue(), BigDecimal.class);
+                                    for (int i = 0; i < timeLength; i++) {
+                                        valueList.add(dataBigDecimal);
+                                        orgValueList.add(orgBigDecimal);
+                                        valueTimeList.add(dataValueTime);
+                                    }
+                                    reportChartItemList.add(new ReportChartItem(
+                                            reportChartId, itemId, flage ? ArrayUtil.listToStr(valueList) : ArrayUtil.listToStr(orgValueList),
+                                            ArrayUtil.listToStr(valueTimeList), null
+                                    ));
+                                } catch (Exception e) {
+                                    List<String> valueList = new ArrayList<>();
+                                    List<String> orgValueList = new ArrayList<>();
+                                    List<String> valueTimeList = new ArrayList<>();
+                                    String dataValue = attachRawData.getDataValue();
+                                    String orgDataValue = attachRawData.getOrgDataValue();
+                                    for (int i = 0; i < timeLength; i++) {
+                                        valueList.add(dataValue);
+                                        orgValueList.add(orgDataValue);
+                                        valueTimeList.add(dataValueTime);
+                                    }
+                                    reportChartItemList.add(new ReportChartItem(
+                                            reportChartId, itemId, flage ? ArrayUtil.listToStr(valueList) : ArrayUtil.listToStr(orgValueList),
+                                            ArrayUtil.listToStr(valueTimeList), null
+                                    ));
+                                }
+                            }
                             continue;
                         }
                         String valueList = null;
@@ -974,8 +1031,8 @@ public class ReportTableTask {
         }
         //根据报表的cron和开始、结束时间,生成此次执行报表抓取数据的开始时间和结束时间
         String cron = reportTable.getCron();
-        Date startTime = CronUtil.mappingTime(cron, reportTable.getStartTime());
-        Date endTime = CronUtil.mappingTime(cron, reportTable.getEndTime());
+        Date startTime = CronUtil.mappingAutoTime(cron, reportTable.getStartTime());
+        Date endTime = CronUtil.mappingAutoTime(cron, reportTable.getEndTime());
         Integer id = reportTable1.getId();
         //根据模板的取值条件获取相应的数据
         if (Blank.isNotEmpty(tableTemplateItemList)) {
@@ -999,17 +1056,75 @@ public class ReportTableTask {
                 boolean flage = valueType.equals(ConstantStr.CALCULATED_VALUE);
                 if (itemType.equals(ConstantStr.ATTACH_ATTRIBUTES)) {
                     AttachRawData attachRawData = rawDataDao.getAttachRawData(itemGroupId, dataSourceId, itemName);
-                    reportTableDao.addReportTableItem(new ReportTableItem(
-                            id, itemId, valueType, xaxis, yaxis, standby,
-                            flage ? attachRawData.getDataValue() : attachRawData.getOrgDataValue(), attachRawData.getDataValueTime(), null
-                    ));
+                    String dataType = attachRawData.getDataType();
+                    String pattern = null;
+                    if (bucketType.equals(ConstantStr.PERIOD_TIME_DAY)) {
+                        pattern = ConstantStr.TIME_DAY_STR;
+                    } else if (bucketType.equals(ConstantStr.PERIOD_TIME_HOUR)) {
+                        pattern = ConstantStr.TIME_HOUR_STR;
+                    } else if (bucketType.equals(ConstantStr.PERIOD_TIME_MINUTE)) {
+                        pattern = ConstantStr.TIME_MINUTE_STR;
+                    } else if (bucketType.equals(ConstantStr.PERIOD_TIME_SECOND)) {
+                        pattern = ConstantStr.TIME_SECOND_STR;
+                    }
+                    int timeLength = DateUtil.timeDifference(startTime, endTime, pattern, bucketValue);
+                    String dataValueTime = attachRawData.getDataValueTime();
+                    if (dataType.toLowerCase().equals("boolean")) {
+                        List<Boolean> valueList = new ArrayList<>();
+                        List<Boolean> orgValueList = new ArrayList<>();
+                        List<String> valueTimeList = new ArrayList<>();
+                        Boolean dataBoolean = JSON.parseObject(attachRawData.getDataValue(), Boolean.class);
+                        Boolean orgBoolean = JSON.parseObject(attachRawData.getOrgDataValue(), Boolean.class);
+                        for (int i = 0; i < timeLength; i++) {
+                            valueList.add(dataBoolean);
+                            orgValueList.add(orgBoolean);
+                            valueTimeList.add(dataValueTime);
+                        }
+                        reportTableDao.addReportTableItem(new ReportTableItem(
+                                id, itemId, valueType, xaxis, yaxis, standby,
+                                flage ? ArrayUtil.listToStr(valueList) : ArrayUtil.listToStr(orgValueList), ArrayUtil.listToStr(valueTimeList), null
+                        ));
+                    } else {
+                        try {
+                            List<BigDecimal> valueList = new ArrayList<>();
+                            List<BigDecimal> orgValueList = new ArrayList<>();
+                            List<String> valueTimeList = new ArrayList<>();
+                            BigDecimal dataBigDecimal = JSON.parseObject(attachRawData.getDataValue(), BigDecimal.class);
+                            BigDecimal orgBigDecimal = JSON.parseObject(attachRawData.getOrgDataValue(), BigDecimal.class);
+                            for (int i = 0; i < timeLength; i++) {
+                                valueList.add(dataBigDecimal);
+                                orgValueList.add(orgBigDecimal);
+                                valueTimeList.add(dataValueTime);
+                            }
+                            reportTableDao.addReportTableItem(new ReportTableItem(
+                                    id, itemId, valueType, xaxis, yaxis, standby,
+                                    flage ? ArrayUtil.listToStr(valueList) : ArrayUtil.listToStr(orgValueList), ArrayUtil.listToStr(valueTimeList), null
+                            ));
+                        } catch (Exception e) {
+                            List<String> valueList = new ArrayList<>();
+                            List<String> orgValueList = new ArrayList<>();
+                            List<String> valueTimeList = new ArrayList<>();
+                            String dataValue = attachRawData.getDataValue();
+                            String orgDataValue = attachRawData.getOrgDataValue();
+                            for (int i = 0; i < timeLength; i++) {
+                                valueList.add(dataValue);
+                                orgValueList.add(orgDataValue);
+                                valueTimeList.add(dataValueTime);
+                            }
+                            reportTableDao.addReportTableItem(new ReportTableItem(
+                                    id, itemId, valueType, xaxis, yaxis, standby,
+                                    flage ? ArrayUtil.listToStr(valueList) : ArrayUtil.listToStr(orgValueList), ArrayUtil.listToStr(valueTimeList), null
+                            ));
+                        }
+                    }
                     continue;
                 }
                 String valueList = null;
                 String valueTimeList = null;
                 String valueIndexList = null;
                 Map<String, String> map = new HashMap<>();
-                if (bucketType.equals(ConstantStr.PERIOD_TIME_DAY) || bucketType.equals(ConstantStr.PERIOD_TIME_HOUR) || bucketType.equals(ConstantStr.PERIOD_TIME_MINUTE) || bucketType.equals(ConstantStr.PERIOD_TIME_SECOND)) {
+                if (bucketType.equals(ConstantStr.PERIOD_TIME_DAY) || bucketType.equals(ConstantStr.PERIOD_TIME_HOUR)
+                        || bucketType.equals(ConstantStr.PERIOD_TIME_MINUTE) || bucketType.equals(ConstantStr.PERIOD_TIME_SECOND)) {
                     String startBelongTime;
                     String endBelongTime;
                     List<RawData> rawDataList = new ArrayList<>();
@@ -1082,10 +1197,67 @@ public class ReportTableTask {
                         Integer itemType = ttci.getItemType();
                         if (itemType.equals(ConstantStr.ATTACH_ATTRIBUTES)) {
                             AttachRawData attachRawData = rawDataDao.getAttachRawData(itemGroupId, dataSourceId, itemName);
-                            reportChartItemList.add(new ReportChartItem(
-                                    reportChartId, itemId, flage ? attachRawData.getDataValue() : attachRawData.getOrgDataValue(),
-                                    attachRawData.getDataValueTime(), null
-                            ));
+                            String dataType = attachRawData.getDataType();
+                            String pattern = null;
+                            if (bucketType.equals(ConstantStr.PERIOD_TIME_DAY)) {
+                                pattern = ConstantStr.TIME_DAY_STR;
+                            } else if (bucketType.equals(ConstantStr.PERIOD_TIME_HOUR)) {
+                                pattern = ConstantStr.TIME_HOUR_STR;
+                            } else if (bucketType.equals(ConstantStr.PERIOD_TIME_MINUTE)) {
+                                pattern = ConstantStr.TIME_MINUTE_STR;
+                            } else if (bucketType.equals(ConstantStr.PERIOD_TIME_SECOND)) {
+                                pattern = ConstantStr.TIME_SECOND_STR;
+                            }
+                            int timeLength = DateUtil.timeDifference(startTime, endTime, pattern, bucketValue);
+                            String dataValueTime = attachRawData.getDataValueTime();
+                            if (dataType.toLowerCase().equals("boolean")) {
+                                List<Boolean> valueList = new ArrayList<>();
+                                List<Boolean> orgValueList = new ArrayList<>();
+                                List<String> valueTimeList = new ArrayList<>();
+                                Boolean dataBoolean = JSON.parseObject(attachRawData.getDataValue(), Boolean.class);
+                                Boolean orgBoolean = JSON.parseObject(attachRawData.getOrgDataValue(), Boolean.class);
+                                for (int j = 0; j < timeLength; j++) {
+                                    valueList.add(dataBoolean);
+                                    orgValueList.add(orgBoolean);
+                                    valueTimeList.add(dataValueTime);
+                                }
+                                reportChartItemList.add(new ReportChartItem(
+                                        reportChartId, itemId, flage ? ArrayUtil.listToStr(valueList) : ArrayUtil.listToStr(orgValueList),
+                                        ArrayUtil.listToStr(valueTimeList), null
+                                ));
+                            } else {
+                                try {
+                                    List<BigDecimal> valueList = new ArrayList<>();
+                                    List<BigDecimal> orgValueList = new ArrayList<>();
+                                    List<String> valueTimeList = new ArrayList<>();
+                                    BigDecimal dataBigDecimal = JSON.parseObject(attachRawData.getDataValue(), BigDecimal.class);
+                                    BigDecimal orgBigDecimal = JSON.parseObject(attachRawData.getOrgDataValue(), BigDecimal.class);
+                                    for (int j = 0; j < timeLength; j++) {
+                                        valueList.add(dataBigDecimal);
+                                        orgValueList.add(orgBigDecimal);
+                                        valueTimeList.add(dataValueTime);
+                                    }
+                                    reportChartItemList.add(new ReportChartItem(
+                                            reportChartId, itemId, flage ? ArrayUtil.listToStr(valueList) : ArrayUtil.listToStr(orgValueList),
+                                            ArrayUtil.listToStr(valueTimeList), null
+                                    ));
+                                } catch (Exception e) {
+                                    List<String> valueList = new ArrayList<>();
+                                    List<String> orgValueList = new ArrayList<>();
+                                    List<String> valueTimeList = new ArrayList<>();
+                                    String dataValue = attachRawData.getDataValue();
+                                    String orgDataValue = attachRawData.getOrgDataValue();
+                                    for (int j = 0; j < timeLength; j++) {
+                                        valueList.add(dataValue);
+                                        orgValueList.add(orgDataValue);
+                                        valueTimeList.add(dataValueTime);
+                                    }
+                                    reportChartItemList.add(new ReportChartItem(
+                                            reportChartId, itemId, flage ? ArrayUtil.listToStr(valueList) : ArrayUtil.listToStr(orgValueList),
+                                            ArrayUtil.listToStr(valueTimeList), null
+                                    ));
+                                }
+                            }
                             continue;
                         }
                         String valueList = null;

+ 7 - 1
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/task/ReportTask.java

@@ -248,7 +248,13 @@ public class ReportTask {
                     }
                 }
             } else if (valueTakingMode.equals(ConstantStr.INSTANTANEOUS_VALUE)) {
-                value = bigDecimalList.get(0);
+                for (int i = 0; i < bigDecimalList.size(); i++) {
+                    BigDecimal bigDecimal = bigDecimalList.get(i);
+                    if (Blank.isNotEmpty(bigDecimal)) {
+                        value = bigDecimal;
+                        break;
+                    }
+                }
             } else {
                 throw new CustomException(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "目前还未适配此种类型的取值模式");
             }

+ 4 - 0
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/util/CronUtil.java

@@ -64,5 +64,9 @@ public class CronUtil {
         return new Date(date.getTime() + getTimeBefore(cron, new Date()).getTime() - getTimeBefore(cron, date).getTime());
     }
 
+    public static Date mappingAutoTime(String cron, Date date) {
+        return new Date(date.getTime() + getTimeBefore(cron, new Date()).getTime() - getTimeAfter(cron, date).getTime());
+    }
+
 
 }

+ 1 - 1
chaunyi_opc/opc_da/src/main/resources/mapper/ChartDao.xml

@@ -22,7 +22,7 @@
     </insert>
 
     <insert id="addChartItem">
-        insert into t_chart_item(chart_id, item_id, value_list, value_time_list, value_index_list)
+        insert into t_chart_item(chart_id, item_id)
         values
         <foreach collection="chartItemList" item="chartItem" index="index" separator=",">
             (#{chartId}, #{chartItem.itemId})

+ 1 - 0
chaunyi_opc/opc_da/src/main/resources/mapper/ReportTableDao.xml

@@ -341,6 +341,7 @@
         <if test="templateType != null">
             and template_type=#{templateType}
         </if>
+        ORDER BY template_type,template_name
         limit #{startNum},#{limitNum}
     </select>
 

+ 1 - 1
chaunyi_opc/opc_da/src/main/resources/static/app/index.html

@@ -2,4 +2,4 @@
 				.supports('top: constant(a)'))
 			document.write(
 				'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
-				(coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=./static/index.63b34199.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.35954aaa.js></script><script src=./static/js/index.61b06886.js></script></body></html>
+				(coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=./static/index.63b34199.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.35954aaa.js></script><script src=./static/js/index.29ae2e0d.js></script></body></html>

BIN
chaunyi_opc/opc_da/src/main/resources/static/app/static/image/icon-demo-1126.png


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/app/static/js/index.29ae2e0d.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-reportForm-index.180f7e6d.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-reportForm-index.e30bf04c.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-user-index.49e6ebec.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-user-index.5c000e73.js


+ 2 - 2
chaunyi_opc/opc_da/src/main/resources/static/app/static/webview/record-wv.html

@@ -29,14 +29,14 @@
 		<script src="../luckysheet/dist/plugins/js/plugin.js"></script>
 
 		<!-- uni 的 SDK -->
-		<script type="text/javascript" src="https://unpkg.com/@dcloudio/uni-webview-js@0.0.3/index.js"></script>
+		<script type="text/javascript" src="../luckysheet/dist/plugins/js/uni-webview-js0.0.3_index.js"></script>
 		<script>
 			document.addEventListener('UniAppJSBridgeReady', function() {
 				uni.getEnv(function(res) {
 					console.log('当前环境:' + JSON.stringify(res));
 					const id = window.location.search.split('?id=')[1]
 					$.ajax({
-						url: "http://192.168.0.40:8081/reportTable/getReportTableById/" + id,
+						url: "http://localhost:8081/reportTable/getReportTableById/" + id,
 						type: 'GET',
 						success: function(res) {
 							if (res.code === 200) {

+ 3 - 3
chaunyi_opc/opc_da/src/main/resources/static/app/static/webview/report-java.html

@@ -47,7 +47,7 @@
 		<script src="./echarts.js"></script>
 
 		<!-- uni 的 SDK -->
-		<script type="text/javascript" src="https://unpkg.com/@dcloudio/uni-webview-js@0.0.3/index.js"></script>
+		<script type="text/javascript" src="../luckysheet/dist/plugins/js/uni-webview-js0.0.3_index.js"></script>
 		<script>
 			$(function() {
 				document.addEventListener('UniAppJSBridgeReady', function() {
@@ -55,7 +55,7 @@
 						console.log('当前环境:' + JSON.stringify(res));
 						const id = window.location.search.split('?id=')[1]
 						$.ajax({
-							url: "http://192.168.0.40:8081/reportTable/getReportTableById/" + id,
+							url: "http://localhost:8081/reportTable/getReportTableById/" + id,
 							type: 'GET',
 							success: function(res) {
 								if (res.code === 200) {
@@ -414,7 +414,7 @@
 											'count'
 										]
 									},
-									url: 'http://192.168.0.40:8081/reportTable/getAutoChReportTable',
+									url: 'http://localhost:8081/reportTable/getAutoChReportTable',
 									where: {
 										autoTableId: id
 									},

+ 4 - 4
chaunyi_opc/opc_da/src/main/resources/static/app/static/webview/report-wv.html

@@ -51,7 +51,7 @@
 		<script src="./canvertChart.js"></script>
 
 		<!-- uni 的 SDK -->
-		<script type="text/javascript" src="https://unpkg.com/@dcloudio/uni-webview-js@0.0.3/index.js"></script>
+		<script type="text/javascript" src="../luckysheet/dist/plugins/js/uni-webview-js0.0.3_index.js"></script>
 		<script>
 			$(function() {
 				document.addEventListener('UniAppJSBridgeReady', function() {
@@ -59,7 +59,7 @@
 						console.log('当前环境:' + JSON.stringify(res));
 						const id = window.location.search.split('?id=')[1]
 						$.ajax({
-							url: "http://192.168.0.40:8081/reportTable/getReportTableById",
+							url: "http://localhost:8081/reportTable/getReportTableById",
 							type: 'GET',
 							data: {
 								id: id
@@ -255,7 +255,7 @@
 
 						function handelCell(data) {
 							let minR = data[0].r
-							let maxR = data[data.length - 1].r + 2
+							let maxR = data[data.length - 1].r
 							let minC = data[0].c
 							let cData = data.map(item => {
 								return item.c
@@ -481,7 +481,7 @@
 											'count'
 										]
 									},
-									url: 'http://192.168.0.40:8081/reportTable/getAutoChReportTable',
+									url: 'http://localhost:8081/reportTable/getAutoChReportTable',
 									where: {
 										autoTableId: id
 									},

+ 17 - 3
chuanyi_client2/src/components/CustomDialog/UserGroup.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog
       title="选择用户组"
-      width="635px"
+      width="680px"
       top="10vh"
       center
       v-dialog-drag
@@ -80,6 +80,20 @@ export default {
 }
 </script>
 
-<style scoped>
-
+<style>
+.el-transfer-panel {
+  border: 1px solid #e6ebf5;
+  border-radius: 4px;
+  overflow: hidden;
+  background: #FFFFFF;
+  display: inline-block;
+  vertical-align: middle;
+  width: 200px;
+  max-height: 100%;
+  box-sizing: border-box;
+  position: relative;
+}
+.ug-div .el-transfer-panel {
+  width: 200px;
+}
 </style>

+ 1 - 1
chuanyi_client2/src/views/home/index.vue

@@ -310,6 +310,6 @@ export default {
 }
 </script>
 
-<style scoped>
+<style>
 
 </style>

+ 10 - 1
chuanyi_client2/src/views/my_report/index.vue

@@ -706,6 +706,7 @@ export default {
     this.initCronList()
   },
   destroyed() {
+    if (this.reportIntervalTag) clearInterval(this.reportIntervalTag)
     luckysheet.destroy()
   },
   methods: {
@@ -1180,7 +1181,14 @@ export default {
     },
     /** 绘制基础数据项布局信息 */
     drawBaseInfo(baseData) {
-      if (!baseData) return
+      if (!baseData) {
+        baseData = {
+          'currDate': getNowFormatDate('yyyy-MM-dd'),
+          'currDateTime': getNowFormatDate('yyyy-MM-dd HH:mm:ss'),
+          'userName': getUsername(),
+          'winUserName': process.env.VUE_APP_WINNAME
+        }
+      }
       let option = luckysheet.getAllSheets()[0]
       option.celldata.map(item => {
         if (item.v.v) {
@@ -2102,6 +2110,7 @@ export default {
     },
     /** 取消保存报表 */
     cancelSaveReport() {
+      if (this.reportIntervalTag) clearInterval(this.reportIntervalTag)
       luckysheet.destroy()
 
       this.breadcrumbList = ['运行配置']

+ 10 - 1
chuanyi_client2/src/views/run_config/index.vue

@@ -833,6 +833,7 @@ export default {
     this.initCronList()
   },
   destroyed() {
+    if (this.reportIntervalTag) clearInterval(this.reportIntervalTag)
     luckysheet.destroy()
   },
   methods: {
@@ -1312,7 +1313,14 @@ export default {
     },
     /** 绘制基础数据项布局信息 */
     drawBaseInfo(baseData) {
-      if (!baseData) return
+      if (!baseData) {
+        baseData = {
+          'currDate': getNowFormatDate('yyyy-MM-dd'),
+          'currDateTime': getNowFormatDate('yyyy-MM-dd HH:mm:ss'),
+          'userName': getUsername(),
+          'winUserName': process.env.VUE_APP_WINNAME
+        }
+      }
       let option = luckysheet.getAllSheets()[0]
       option.celldata.map(item => {
         if (item.v.v) {
@@ -2376,6 +2384,7 @@ export default {
     },
     /** 取消保存报表 */
     cancelSaveReport() {
+      if (this.reportIntervalTag) clearInterval(this.reportIntervalTag)
       luckysheet.destroy()
 
       this.breadcrumbList = ['运行配置']

+ 28 - 3
reado-app/pages/reportForm/data-item.vue

@@ -145,8 +145,16 @@
 			},
 			//确认按钮查询
 			handelQuery() {
-				this.queryParams.startTime = this.range[0] + ' 00:00:00'
-				this.queryParams.endTime = this.range[1] + ' 00:00:00'
+				// 临时当前时间,需要改成选择时间----开始
+				var date = new Date()
+				var timestr = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours()
+				timestr += ':'
+				timestr += date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes()
+				timestr += ':'
+				timestr += date.getSeconds() < 10 ? ('0' + date.getSeconds()) : date.getSeconds()
+				// 临时当前时间,需要改成选择时间----结束
+				this.queryParams.startTime = this.resolvingDate2(this.range[0]) + ' ' + timestr
+				this.queryParams.endTime = this.resolvingDate2(this.range[1]) + ' ' + timestr
 				uni.$http.get('/itemGroup/itemDataQuery', this.queryParams).then(res => {
 					const data = res.data
 					if (data.code === 200) {
@@ -155,7 +163,7 @@
 							valueTimeList
 						} = data.data
 						const service = [{
-							name: "TOYOTA",
+							name: "数据项列表",
 							data: valueList
 						}]
 						this.service = service
@@ -169,6 +177,23 @@
 				this.queryParams.startTime = this.resolvingDate(date[0])
 				this.queryParams.endTime = this.resolvingDate(date[1])
 			},
+			resolvingDate2(date) {
+				if (!date) {
+					return;
+				}
+				//date是传入的时间
+				let d = new Date(date);
+
+				let month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1);
+				let day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate();
+				let hours = d.getHours() < 10 ? '0' + d.getHours() : d.getHours();
+				let min = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes();
+				let sec = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds();
+
+				let times;
+				times = d.getFullYear() + '-' + month + '-' + day;
+				return times
+			},
 			resolvingDate(date) {
 				if (!date) {
 					return;

+ 1 - 1
reado-app/pages/user/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container">
 		<view class="user">
-			<u-icon name="https://b.yzcdn.cn/vant/icon-demo-1126.png" size="100rpx" style="margin-right:20rpx" />
+			<u-icon name="../../static/image/icon-demo-1126.png" size="100rpx" style="margin-right:20rpx" />
 			<view class="user-name">
 				<view class="userName">
 					{{userName}}

BIN
reado-app/static/image/icon-demo-1126.png


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/static/luckysheet/dist/plugins/js/uni-webview-js0.0.3_index.js


+ 1 - 1
reado-app/static/webview/record-wv.html

@@ -29,7 +29,7 @@
 		<script src="../luckysheet/dist/plugins/js/plugin.js"></script>
 
 		<!-- uni 的 SDK -->
-		<script type="text/javascript" src="https://unpkg.com/@dcloudio/uni-webview-js@0.0.3/index.js"></script>
+		<script type="text/javascript" src="../luckysheet/dist/plugins/js/uni-webview-js0.0.3_index.js"></script>
 		<script>
 			document.addEventListener('UniAppJSBridgeReady', function() {
 				uni.getEnv(function(res) {

+ 3 - 3
reado-app/static/webview/report-java.html

@@ -47,7 +47,7 @@
 		<script src="./echarts.js"></script>
 
 		<!-- uni 的 SDK -->
-		<script type="text/javascript" src="https://unpkg.com/@dcloudio/uni-webview-js@0.0.3/index.js"></script>
+		<script type="text/javascript" src="../luckysheet/dist/plugins/js/uni-webview-js0.0.3_index.js"></script>
 		<script>
 			$(function() {
 				document.addEventListener('UniAppJSBridgeReady', function() {
@@ -55,7 +55,7 @@
 						console.log('当前环境:' + JSON.stringify(res));
 						const id = window.location.search.split('?id=')[1]
 						$.ajax({
-							url: "http://192.168.0.40:8081/reportTable/getReportTableById/" + id,
+							url: "http://localhost:8081/reportTable/getReportTableById/" + id,
 							type: 'GET',
 							success: function(res) {
 								if (res.code === 200) {
@@ -414,7 +414,7 @@
 											'count'
 										]
 									},
-									url: 'http://192.168.0.40:8081/reportTable/getAutoChReportTable',
+									url: 'http://localhost:8081/reportTable/getAutoChReportTable',
 									where: {
 										autoTableId: id
 									},

+ 36 - 2
reado-app/static/webview/report-wv.html

@@ -117,11 +117,11 @@
 		<script src="./canvertChart.js"></script>
 
 		<!-- uni 的 SDK -->
-		<script type="text/javascript" src="https://unpkg.com/@dcloudio/uni-webview-js@0.0.3/index.js"></script>
 		<script src="./wvIP.js"></script>
 
 		<script src="./plugins/axios.min.js"></script>
-
+		
+		<script type="text/javascript" src="../luckysheet/dist/plugins/js/uni-webview-js0.0.3_index.js"></script>
 		<script>
 			$(function() {
 				document.addEventListener('UniAppJSBridgeReady', function() {
@@ -681,6 +681,7 @@
 						$('#recordBtn').on('click', () => {
 							$('.model').show()
 
+<<<<<<< HEAD
 							$.ajax({
 								type: 'GET',
 								url: "/reportTable/getAutoChReportTable",
@@ -703,6 +704,39 @@
 												"</tr>" + "<tr >"
 											)
 										})
+=======
+								var tableReload = table.render({
+									elem: '#demo',
+									width: 300,
+									page: {
+										elem: '#demo',
+										layout: ['prev', 'page', 'next',
+											'count'
+										]
+									},
+									url: 'http://localhost:8081/reportTable/getAutoChReportTable',
+									where: {
+										autoTableId: id
+									},
+									text: {
+										none: '暂无数据' //默认:无数据。
+									},
+									cols: [
+										[{
+											field: 'reportTableName',
+											title: null,
+											width: 300
+										}]
+									],
+									parseData: function(res) {
+										return {
+											"code": 0,
+											"msg": res.msg,
+											"count": res.data.count,
+											"data": res.data
+												.reportTableList
+										};
+>>>>>>> 1808d45f36d85773c8654d57ee5f28ce304c85c1
 									}
 								}
 							})

Деякі файли не було показано, через те що забагато файлів було змінено