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

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

Zt 2 роки тому
батько
коміт
b6d1bb1b23
78 змінених файлів з 266 додано та 170 видалено
  1. 26 0
      chaunyi_opc/opc_da/src/main/java/com/example/opc_da/config/InitRunner.java
  2. 1 1
      chaunyi_opc/opc_da/src/main/java/com/example/opc_da/controller/DataModelController.java
  3. 4 0
      chaunyi_opc/opc_da/src/main/java/com/example/opc_da/dao/RawDataDao.java
  4. 1 1
      chaunyi_opc/opc_da/src/main/java/com/example/opc_da/service/impl/DataModelServiceImpl.java
  5. 11 16
      chaunyi_opc/opc_da/src/main/java/com/example/opc_da/service/impl/ItemGroupServiceImpl.java
  6. 20 4
      chaunyi_opc/opc_da/src/main/java/com/example/opc_da/service/impl/ReportTableServiceImpl.java
  7. 0 1
      chaunyi_opc/opc_da/src/main/java/com/example/opc_da/util/OpcDaUtil.java
  8. 1 1
      chaunyi_opc/opc_da/src/main/resources/application-dev.yml
  9. 2 2
      chaunyi_opc/opc_da/src/main/resources/application-prod.yml
  10. 1 1
      chaunyi_opc/opc_da/src/main/resources/application.yml
  11. 0 1
      chaunyi_opc/opc_da/src/main/resources/mapper/ItemGroupDao.xml
  12. 13 0
      chaunyi_opc/opc_da/src/main/resources/mapper/RawDataDao.xml
  13. 2 2
      chaunyi_opc/opc_da/src/main/resources/static/app/index.html
  14. BIN
      chaunyi_opc/opc_da/src/main/resources/static/app/static/fonts/uniicons.b6d3756e.ttf
  15. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/chunk-vendors.35954aaa.js
  16. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/chunk-vendors.7d651a70.js
  17. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/index.604be2df.js
  18. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/index.c46a03fd.js
  19. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-login-index.921bd4fd.js
  20. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-login-index.d9000766.js
  21. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-login-index~pages-reportForm-report-detail-index~pages-user-index.c40b969a.js
  22. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-login-index~pages-user-index.44d1c315.js
  23. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-message-index.0bfc02b3.js
  24. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-message-index.dd1a599d.js
  25. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-message-index~pages-message-msg-detail-index~pages-reportForm-index~pages-reportForm-report-de~6cb3cfb9.0f26c040.js
  26. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-message-index~pages-message-msg-detail-index~pages-reportForm-index~pages-reportForm-report-de~7378e1f1.4b1019b3.js
  27. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-message-index~pages-reportForm-index.c9a4fb74.js
  28. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-message-index~pages-reportForm-index.ec286111.js
  29. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-message-msg-detail-index.62eb5040.js
  30. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-message-msg-detail-index.a1ecaa18.js
  31. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-reportForm-index.439211c8.js
  32. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-reportForm-index.6dc8493b.js
  33. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-reportForm-report-detail-index.81d1b26f.js
  34. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-reportForm-report-detail-index.de8c2f97.js
  35. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-reportForm-report-detail-index~pages-user-index.4d192f8b.js
  36. 1 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-reportForm-report-detail-recordDetail.3ad1a00a.js
  37. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-user-index.721e0999.js
  38. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-user-index.a6f66f4d.js
  39. 1 1
      chaunyi_opc/opc_da/src/main/resources/static/page/index.html
  40. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/page/static/css/chunk-3435f92b.d25958e6.css
  41. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/page/static/css/chunk-6b6c4f4e.df74abf1.css
  42. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/page/static/css/chunk-9ad6dad4.587f22e3.css
  43. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/page/static/js/app.15e47cd4.js
  44. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/page/static/js/chunk-3154de5d.612bd2a9.js
  45. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/page/static/js/chunk-3435f92b.c69fbda0.js
  46. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/page/static/js/chunk-6b6c4f4e.81eea199.js
  47. 0 0
      chaunyi_opc/opc_da/src/main/resources/static/page/static/js/chunk-9ad6dad4.41991f1f.js
  48. 2 2
      chaunyi_opc/opc_ua/src/main/resources/application-dev.yml
  49. 2 2
      chaunyi_opc/opc_ua/src/main/resources/application-prod.yml
  50. 4 4
      chaunyi_opc/opc_ua/src/main/resources/mapper/ItemGroupDao.xml
  51. 75 50
      chuanyi_client2/src/components/HeaderMain/index.vue
  52. 2 1
      chuanyi_client2/src/permission.js
  53. 89 74
      chuanyi_client2/src/views/group_item/index.vue
  54. 1 1
      chuanyi_client2/src/views/report_template/index.vue
  55. 3 3
      chuanyi_client2/src/views/user_group/index.vue
  56. 2 2
      reado-app/unpackage/dist/build/h5/index.html
  57. BIN
      reado-app/unpackage/dist/build/h5/static/fonts/uniicons.b6d3756e.ttf
  58. 1 0
      reado-app/unpackage/dist/build/h5/static/jquery.min.js
  59. 0 0
      reado-app/unpackage/dist/build/h5/static/js/index.604be2df.js
  60. 0 0
      reado-app/unpackage/dist/build/h5/static/js/index.8b6b38d7.js
  61. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-login-index.c7063e47.js
  62. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-login-index.d9000766.js
  63. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-login-index~pages-reportForm-report-detail-index~pages-user-index.c40b969a.js
  64. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-login-index~pages-user-index.be72c672.js
  65. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-message-index.0bfc02b3.js
  66. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-message-index.ecc7aa27.js
  67. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-message-index~pages-message-msg-detail-index~pages-reportForm-index~pages-reportForm-report-de~6cb3cfb9.0f26c040.js
  68. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-message-index~pages-message-msg-detail-index~pages-reportForm-index~pages-reportForm-report-de~7378e1f1.ef51d87f.js
  69. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-message-msg-detail-index.a1ecaa18.js
  70. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-message-msg-detail-index.a393e18c.js
  71. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-reportForm-index.3bb42d0b.js
  72. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-reportForm-index.439211c8.js
  73. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-reportForm-report-detail-index.9c7dfd89.js
  74. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-reportForm-report-detail-index.de8c2f97.js
  75. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-reportForm-report-detail-index~pages-user-index.4d192f8b.js
  76. 1 0
      reado-app/unpackage/dist/build/h5/static/js/pages-reportForm-report-detail-recordDetail.3ad1a00a.js
  77. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-user-index.721e0999.js
  78. 0 0
      reado-app/unpackage/dist/build/h5/static/js/pages-user-index.9b09c104.js

+ 26 - 0
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/config/InitRunner.java

@@ -1,9 +1,13 @@
 package com.example.opc_da.config;
 
 import com.example.opc_common.entity.DataSource;
+import com.example.opc_common.entity.Item;
+import com.example.opc_common.entity.ItemGroup;
 import com.example.opc_common.enums.DataSourceTypeEnum;
 import com.example.opc_common.util.Blank;
 import com.example.opc_da.dao.DataSourceDao;
+import com.example.opc_da.dao.ItemGroupDao;
+import com.example.opc_da.dao.RawDataDao;
 import com.example.opc_da.task.OpcAsyncTask;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -20,9 +24,15 @@ import java.util.List;
 public class InitRunner {
 
     @Autowired
+    private ItemGroupDao itemGroupDao;
+
+    @Autowired
     private DataSourceDao dataSourceDao;
 
     @Autowired
+    private RawDataDao rawDataDao;
+
+    @Autowired
     private OpcAsyncTask opcAsyncTask;
 
     @PostConstruct
@@ -42,5 +52,21 @@ public class InitRunner {
                 }
             }
         }
+
+        //组装系统挂了没有组装的数据
+        List<Integer> itemGroupIdList = rawDataDao.getRawDataGroupIdList();
+        if (Blank.isNotEmpty(itemGroupIdList)) {
+            for (Integer itemGroupId : itemGroupIdList) {
+                List<String> belongTimeList = rawDataDao.getRawDataBelongTime(itemGroupId);
+                if (Blank.isNotEmpty(belongTimeList)) {
+                    for (int i = 0; i < belongTimeList.size(); i++) {
+                        List<Item> itemList = itemGroupDao.getItemListByGroupId(itemGroupId);
+                        ItemGroup itemGroup = itemGroupDao.getItemGroupById(itemGroupId);
+                        Integer dataSourceId = itemGroup.getDataSourceId();
+                        opcAsyncTask.packageRawDataList(itemList, dataSourceId, belongTimeList.get(i));
+                    }
+                }
+            }
+        }
     }
 }

+ 1 - 1
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/controller/DataModelController.java

@@ -128,7 +128,7 @@ public class DataModelController {
         if (Blank.isEmpty(parameter, mathString, dataValue)) {
             return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
         }
-        return Result.ok(MathUtil.quadricOperation(parameter, mathString, new BigDecimal(dataValue)));
+        return Result.ok(MathUtil.quadricOperation(parameter, mathString, new BigDecimal(dataValue.toString())));
     }
 
 }

+ 4 - 0
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/dao/RawDataDao.java

@@ -36,4 +36,8 @@ public interface RawDataDao {
     Integer updateRawData(Integer remainder, RawData rawData);
 
     List<Long> getMeetIndexList(Integer itemGroupId, Integer dataSourceId, List<Item> itemList, String valueBelongTime, Integer notMeetChange);
+
+    List<Integer> getRawDataGroupIdList();
+
+    List<String> getRawDataBelongTime(Integer itemGroupId);
 }

+ 1 - 1
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/service/impl/DataModelServiceImpl.java

@@ -90,6 +90,6 @@ public class DataModelServiceImpl implements DataModelService {
         if (Blank.isEmpty(dataModel)) {
             return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "没有相应的数据模型");
         }
-        return Result.ok(MathUtil.quadricOperation(dataModel.getMathParameter(), dataModel.getOperationRule(), new BigDecimal(dataValue)));
+        return Result.ok(MathUtil.quadricOperation(dataModel.getMathParameter(), dataModel.getOperationRule(), new BigDecimal(dataValue.toString())));
     }
 }

+ 11 - 16
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/service/impl/ItemGroupServiceImpl.java

@@ -126,18 +126,18 @@ public class ItemGroupServiceImpl implements ItemGroupService {
             }
             itemGroupDao.delItemByGroupId(id);
             if (Blank.isNotEmpty(itemGroup.getItemList())) {
-                List<Item> itemList = itemGroup.getItemList();
                 if (dataSourceType.getDataSourceTypeKey().equals(DataSourceTypeEnum.OPC_DA_REAL.getValue())) {
-                    itemGroup.setItemList(OpcDaUtil.genReadNameDa(dataSource, itemList));
+                    itemGroup.setItemList(OpcDaUtil.genReadNameDa(dataSource, itemGroup.getItemList()));
                 }
+                List<Item> itemList = itemGroup.getItemList();
                 int count = 0;
                 for (Item item : itemList) {
                     if (Blank.isNotEmpty(item.getTableReportId())) {
-                        count += 1;
+                        count++;
                     }
                 }
                 if (count > 1) {
-                    return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "一个数据组中,最多只能配置一个事件驱动报表");
+                    throw new CustomException(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "一个数据组中,最多只能配置一个事件驱动报表");
                 }
                 itemGroupDao.addItem(id, itemList);
             }
@@ -336,18 +336,6 @@ public class ItemGroupServiceImpl implements ItemGroupService {
         if (itemGroup.getRunState() == ConstantStr.START_UP) {
             return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "此数据组现在处于运行中,不允许修改");
         }
-        if (Blank.isNotEmpty(item.getTableReportId())) {
-            List<Item> itemList = itemGroupDao.getItemListByGroupId(itemGroup.getId());
-            if (Blank.isNotEmpty(itemList)) {
-                for (Item item2 : itemList) {
-                    if (Blank.isNotEmpty(item2.getTableReportId())) {
-                        if (!item2.getId().equals(item.getId())) {
-                            return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "此数据组中有其他项配置了事件驱动报表,修改失败");
-                        }
-                    }
-                }
-            }
-        }
         if (itemGroupDao.updateItem(item) <= 0) {
             return Result.no(ResultEnum.SERVER_ERROR.getRespCode(), "修改item失败");
         }
@@ -397,6 +385,13 @@ public class ItemGroupServiceImpl implements ItemGroupService {
     @Override
     public Result batchSetExpresses(ItemGroup itemGroup) {
         List<Item> itemList = itemGroup.getItemList();
+        Integer itemGroupId = itemList.get(0).getItemGroupId();
+        ItemGroup itemGroup1 = itemGroupDao.getItemGroupById(itemGroupId);
+        if (Blank.isNotEmpty(itemGroup1)) {
+            if (itemGroup1.getRunState() == ConstantStr.START_UP) {
+                return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "此数据组现在处于运行中,不允许设置表达式");
+            }
+        }
         for (Item item : itemList) {
             if (Blank.isNotEmpty(item.getId())) {
                 itemGroupDao.updateItemExpresses(item.getId(), item.getDataModelId());

+ 20 - 4
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/service/impl/ReportTableServiceImpl.java

@@ -154,6 +154,17 @@ public class ReportTableServiceImpl implements ReportTableService {
             return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "自动报表不能够删除,需要转换为手动报表,然后进行删除");
         }
         if (reportTable.getIsAutoReport() == ConstantStr.EVENT_DRIVEN_REPORT) {
+            List<ItemGroup> itemGroupList = itemGroupDao.getItemGroupListByTableId(id);
+            if (Blank.isNotEmpty(itemGroupList)) {
+                String message = "";
+                for (int i = 0; i < itemGroupList.size(); i++) {
+                    message += itemGroupList.get(i).getGroupName();
+                    if (i != itemGroupList.size() - 1) {
+                        message += ",";
+                    }
+                }
+                return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "事件驱动报表被配置在【" + message + "】数据组中,不能直接删除");
+            }
             return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "事件驱动报表不能够直接删除,需要转换为手动报表,然后进行删除");
         }
         if (!reportTable.getUserId().equals(userUtil.getCurrentUserId())) {
@@ -178,15 +189,20 @@ public class ReportTableServiceImpl implements ReportTableService {
         if (Blank.isNotEmpty(userGroupList)) {
             reportTable.setUserGroupList(userGroupList);
         }
-        if (isAutoReport == ConstantStr.AUTOMATIC_REPORT) {
+        if (reportTable.getIsAutoReport() == ConstantStr.EVENT_DRIVEN_REPORT) {
             List<ItemGroup> itemGroupList = itemGroupDao.getItemGroupListByTableId(id);
             if (Blank.isNotEmpty(itemGroupList)) {
-                for (ItemGroup itemGroup : itemGroupList) {
-                    if (itemGroup.getRunState() == ConstantStr.START_UP) {
-                        return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "此报表作为事件驱动报表,已被配置在运行的数据组上了,请停止运行数据组后再试");
+                String message = "";
+                for (int i = 0; i < itemGroupList.size(); i++) {
+                    message += itemGroupList.get(i).getGroupName();
+                    if (i != itemGroupList.size() - 1) {
+                        message += ",";
                     }
                 }
+                return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "事件驱动报表被配置在【" + message + "】数据组中,不能直接转换");
             }
+        }
+        if (isAutoReport == ConstantStr.AUTOMATIC_REPORT) {
             if (Blank.isEmpty(cron)) {
                 return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "cron表达式不能为空");
             }

+ 0 - 1
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/util/OpcDaUtil.java

@@ -297,7 +297,6 @@ public class OpcDaUtil {
             }
         } else if (dataSource.getClsId().toUpperCase().equals(OpcDaDriverEnum.YOKOGAWA.getValue())) {
             for (int i = 0; i < itemList.size(); i++) {
-                int n = itemList.get(i).getItemName().indexOf(".");
                 itemList.get(i).setItemReadName(itemList.get(i).getItemName().replaceFirst("\\.", "!"));
             }
         } else if (dataSource.getClsId().toUpperCase().equals(OpcDaDriverEnum.OPCIFIX.getValue())) {

+ 1 - 1
chaunyi_opc/opc_da/src/main/resources/application-dev.yml

@@ -10,7 +10,7 @@ spring:
       max-request-size: 500MB
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://localhost:3306/chuanyi?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
+    url: jdbc:mysql://localhost:3306/ei_rptdb?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
     username: root
     password: root
   resources:

+ 2 - 2
chaunyi_opc/opc_da/src/main/resources/application-prod.yml

@@ -10,7 +10,7 @@ spring:
       max-request-size: 500MB
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://localhost:3306/chuanyi?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
+    url: jdbc:mysql://localhost:3306/ei_rptdb?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
     username: root
     password: root
   resources:
@@ -30,4 +30,4 @@ spring:
 #mybatis:
 #  configuration:
     #开启sql日志文件
-#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

+ 1 - 1
chaunyi_opc/opc_da/src/main/resources/application.yml

@@ -15,4 +15,4 @@ opc_ua_server:
   address: "http://localhost:8082"
 
 opc_storage:
-  time_format: "yyyy-MM-dd HH"
+  time_format: "yyyy-MM-dd HH"

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

@@ -64,7 +64,6 @@
     <update id="updateItem">
         update t_item
         set data_model_id=#{dataModelId},
-            table_report_id=#{tableReportId},
             `describe`=#{describe}
         where id = #{id}
     </update>

+ 13 - 0
chaunyi_opc/opc_da/src/main/resources/mapper/RawDataDao.xml

@@ -161,4 +161,17 @@
         GROUP BY
         data_index;
     </select>
+
+    <select id="getRawDataGroupIdList" resultType="java.lang.Integer">
+        SELECT item_group_id
+        FROM t_raw_data
+        GROUP BY item_group_id;
+    </select>
+
+    <select id="getRawDataBelongTime" resultType="java.lang.String">
+        SELECT value_belong_time
+        FROM t_raw_data
+        WHERE item_group_id = #{itemGroupId}
+        GROUP BY value_belong_time;
+    </select>
 </mapper>

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

@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>reado-app</title><script src=./static/jquery.min.js></script><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS
+<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>Easy Industrial Report</title><script src=./static/jquery.min.js></script><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS
 				.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><link rel=stylesheet href=./static/luckysheet/dist/plugins/plugins.css><link rel=stylesheet href=./static/luckysheet/dist/plugins/css/pluginsCss.css><link rel=stylesheet href=./static/luckysheet/dist/css/luckysheet.css><link rel=stylesheet href=./static/luckysheet/dist/assets/iconfont/iconfont.css><script src=./static/luckysheet/dist/luckysheet.umd.js></script><script src=./static/luckysheet/dist/plugins/js/plugin.js></script></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.c46a03fd.js></script></body></html>
+				(coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=./static/index.63b34199.css><link rel=stylesheet href=./static/luckysheet/dist/plugins/plugins.css><link rel=stylesheet href=./static/luckysheet/dist/plugins/css/pluginsCss.css><link rel=stylesheet href=./static/luckysheet/dist/css/luckysheet.css><link rel=stylesheet href=./static/luckysheet/dist/assets/iconfont/iconfont.css><script src=./static/luckysheet/dist/luckysheet.umd.js></script><script src=./static/luckysheet/dist/plugins/js/plugin.js></script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.7d651a70.js></script><script src=./static/js/index.604be2df.js></script></body></html>

BIN
chaunyi_opc/opc_da/src/main/resources/static/app/static/fonts/uniicons.b6d3756e.ttf


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


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


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


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


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


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


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


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


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


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


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-message-index~pages-message-msg-detail-index~pages-reportForm-index~pages-reportForm-report-de~6cb3cfb9.0f26c040.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-message-index~pages-message-msg-detail-index~pages-reportForm-index~pages-reportForm-report-de~7378e1f1.4b1019b3.js


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


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


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


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


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


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


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


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


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


+ 1 - 0
chaunyi_opc/opc_da/src/main/resources/static/app/static/js/pages-reportForm-report-detail-recordDetail.3ad1a00a.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-reportForm-report-detail-recordDetail"],{adb5:function(t,e,n){"use strict";n.r(e);var o=n("debe"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},c5ef:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}));var o={Nav:n("da9e").default},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("Nav",{attrs:{title:t.title,isBack:!0,isRight:!0},on:{goBack:function(e){arguments[0]=e=t.$handleEvent(e),t.handelBack.apply(void 0,arguments)}}}),n("v-uni-view",{staticStyle:{margin:"0px",padding:"0px",position:"absolute",width:"100%",height:"95%",left:"0px",top:"80rpx"},attrs:{id:"luckysheet"}})],1)},a=[]},ce19:function(t,e,n){"use strict";n.r(e);var o=n("c5ef"),i=n("adb5");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);var r=n("f0c5"),d=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,"97e82f3e",null,!1,o["a"],void 0);e["default"]=d.exports},debe:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={data:function(){return{title:null,id:null,option:null}},onLoad:function(t){this.id=t.id},onReady:function(){this.id&&this.getRecordDetail()},methods:{handelBack:function(){uni.navigateBack()},getRecordDetail:function(){var t=this;uni.$http.get("/reportTable/getReportTableById/"+this.id).then((function(e){var n=e.data;if(200===n.code){t.title=n.data.reportTableName;var o=JSON.parse(n.data.reportTableData);t.option=o.option,t.option&&(o.option.allowEdit=!1,t.showToolbar(o),luckysheet.create(t.option))}}))},showToolbar:function(t){t.showtoolbar=!1,this.option.enableAddRow=!1,this.option.enableAddBackTop=!1;var e=t.option.showtoolbarConfig;for(var n in e)e[n]=!1}}};e.default=o}}]);

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


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


Різницю між файлами не показано, бо вона завелика
+ 1 - 1
chaunyi_opc/opc_da/src/main/resources/static/page/index.html


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/page/static/css/chunk-3435f92b.d25958e6.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/page/static/css/chunk-6b6c4f4e.df74abf1.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/page/static/css/chunk-9ad6dad4.587f22e3.css


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


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/page/static/js/chunk-3154de5d.612bd2a9.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/page/static/js/chunk-3435f92b.c69fbda0.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/page/static/js/chunk-6b6c4f4e.81eea199.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
chaunyi_opc/opc_da/src/main/resources/static/page/static/js/chunk-9ad6dad4.41991f1f.js


+ 2 - 2
chaunyi_opc/opc_ua/src/main/resources/application-dev.yml

@@ -11,7 +11,7 @@ spring:
       max-request-size: 500MB
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://localhost:3306/chuanyi?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
+    url: jdbc:mysql://localhost:3306/ei_rptdb?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
     username: root
     password: root
   resources:
@@ -31,4 +31,4 @@ spring:
 mybatis:
   configuration:
     #日志
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

+ 2 - 2
chaunyi_opc/opc_ua/src/main/resources/application-prod.yml

@@ -11,7 +11,7 @@ spring:
       max-request-size: 500MB
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://localhost:3306/chuanyi?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
+    url: jdbc:mysql://localhost:3306/ei_rptdb?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
     username: root
     password: root
   resources:
@@ -30,4 +30,4 @@ spring:
 
 #mybatis:
 #  configuration:
-#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

+ 4 - 4
chaunyi_opc/opc_ua/src/main/resources/mapper/ItemGroupDao.xml

@@ -4,13 +4,13 @@
 
     <sql id="itemGroup">
         id
-        , user_id, group_name, group_describe, data_source_id, read_mode, mode_value, run_state,
-            start_read_time, end_read_time , create_time
+        , user_id, group_name, group_describe, data_source_id, read_mode, event_mode, read_mode_type, mode_value,
+            read_week, run_state, cron_id, start_read_time, end_read_time , create_time
     </sql>
 
     <sql id="item">
         id
-        , item_group_id, item_name, item_read_name, node_index , data_type, `describe`, data_model_id, event_mode, event_value, table_report_id
+        , item_group_id, item_name, item_read_name, node_index , data_type, `describe`, data_model_id, table_report_id
     </sql>
 
 
@@ -26,7 +26,7 @@
         <include refid="item"/>
         from t_item
         where item_group_id = #{itemGroupId}
-        order by event_mode DESC,item_name
+        order by item_name
     </select>
 
     <select id="getAllItemGroup" resultType="com.example.opc_common.entity.ItemGroup">

+ 75 - 50
chuanyi_client2/src/components/HeaderMain/index.vue

@@ -441,10 +441,11 @@
         :visible.sync="dialogReportEventConfigVisible"
         :close-on-click-modal="false"
         :append-to-body="true">
-      <el-form :model="reportEventConfigForm" ref="reportEventConfigForm" :rules="reportEventConfigFormRules" label-position="top">
+      <el-form :model="reportEventConfigForm" ref="reportEventConfigForm" :rules="reportEventConfigFormRules" label-position="top"
+               style="height: 50vh; overflow: auto;">
         <el-form-item label="条件数据项:" prop="itemName">
           <el-radio-group v-model="reportEventConfigForm.itemName">
-            <el-radio v-for="item in groupBasicForm.itemList" :label="item.itemName" style="margin: 5px 0;">
+            <el-radio v-for="item in groupBasicForm.itemList" :label="item.itemName" style="margin: 5px 0; width: 100%;">
               {{ item.itemName }}
             </el-radio>
           </el-radio-group>
@@ -702,7 +703,7 @@ export default {
       } else if (this.groupRateForm.readMode == 2) {
         tips = '条件值'
       } else {
-        tips = '模式值'
+        tips = '周期值'
       }
       if (value == null) {
         callback(new Error(tips + '不能为空'))
@@ -944,6 +945,7 @@ export default {
         daySetting: [],
         valuePeriod: ['00:00:00', '23:59:59']
       }
+      this.updateGroupData = null
       this.chooseItemDataView = false
       this.getDataSourceList()
       this.groupDialogVisible = true
@@ -979,6 +981,8 @@ export default {
             for (let i = 0; i < _itemList.length; i ++) {
               if (_itemList[i].itemName == this.reportEventConfigForm.itemName) {
                 _itemList[i].tableReportId = this.reportEventConfigForm.tableReportId
+              } else {
+                _itemList[i].tableReportId = null
               }
             }
           }
@@ -1090,35 +1094,7 @@ export default {
         this.chooseItemDataView = true
         this.groupDialogTitle = '修改数据组'
         this.groupRateForm.readMode = item.readMode + ''
-        this.groupRateForm.modeValue = item.modeValue
-        if (item.readMode == 0) { // 周期
-          if (parseInt(item.modeValue) % 3600 == 0) { // 时
-            this.groupRateForm.modeValueH = item.modeValue / 3600
-            this.groupRateForm.modeValueM = 0
-            this.groupRateForm.modeValueS = 0
-          } else {
-            if ((parseInt(item.modeValue) % 3600) % 60 == 0) { // 分
-              this.groupRateForm.modeValueH = Math.floor(item.modeValue / 3600)
-              this.groupRateForm.modeValueM = (parseInt(item.modeValue) % 3600) / 60
-              this.groupRateForm.modeValueS = 0
-            } else { // 秒
-              this.groupRateForm.modeValueH = Math.floor(item.modeValue / 3600)
-              this.groupRateForm.modeValueM = Math.floor((parseInt(item.modeValue) % 3600) / 60)
-              this.groupRateForm.modeValueS = (parseInt(item.modeValue) % 3600) % 60
-            }
-          }
-        } else if (item.readMode == 1) { // 值改变读取
-          this.groupRateForm.readModeType = item.readModeType
-        } else if (item.readMode == 2) { // 条件读取
-          this.groupRateForm.eventMode = item.eventMode
-          let _itemList = item.itemList
-          for (let i = 0; i < _itemList.length; i ++) {
-            if (_itemList[i].tableReportId) {
-              this.reportEventConfigForm.tableReportId = _itemList[i].tableReportId
-              this.reportEventConfigForm.itemName = _itemList[i].itemName
-            }
-          }
-        }
+        this.withReadMode(item, item.readMode)
         this.groupRateForm.valuePeriod = [item.startReadTime, item.endReadTime]
         this.groupRateForm.daySetting = item.readWeek ? item.readWeek.split(',') : []
       }).catch((e) => {
@@ -1126,6 +1102,38 @@ export default {
         showAlertWin(this, e)
       })
     },
+    /** 处理模式不同值显示不同 */
+    withReadMode(item, readMode) {
+      this.groupRateForm.modeValue = item.modeValue
+      if (readMode == 0) { // 周期
+        if (parseInt(item.modeValue) % 3600 == 0) { // 时
+          this.groupRateForm.modeValueH = item.modeValue / 3600
+          this.groupRateForm.modeValueM = 0
+          this.groupRateForm.modeValueS = 0
+        } else {
+          if ((parseInt(item.modeValue) % 3600) % 60 == 0) { // 分
+            this.groupRateForm.modeValueH = Math.floor(item.modeValue / 3600)
+            this.groupRateForm.modeValueM = (parseInt(item.modeValue) % 3600) / 60
+            this.groupRateForm.modeValueS = 0
+          } else { // 秒
+            this.groupRateForm.modeValueH = Math.floor(item.modeValue / 3600)
+            this.groupRateForm.modeValueM = Math.floor((parseInt(item.modeValue) % 3600) / 60)
+            this.groupRateForm.modeValueS = (parseInt(item.modeValue) % 3600) % 60
+          }
+        }
+      } else if (readMode == 1) { // 值改变读取
+        this.groupRateForm.readModeType = item.readModeType
+      } else if (readMode == 2) { // 条件读取
+        this.groupRateForm.eventMode = item.eventMode
+        let _itemList = item.itemList
+        for (let i = 0; i < _itemList.length; i ++) {
+          if (_itemList[i].tableReportId) {
+            this.reportEventConfigForm.tableReportId = _itemList[i].tableReportId
+            this.reportEventConfigForm.itemName = _itemList[i].itemName
+          }
+        }
+      }
+    },
     /** 更新组项信息 */
     updateGroupItem() {
       let id = this.chooseGroupData.id
@@ -1348,11 +1356,10 @@ export default {
       this.groupRateForm.modeValueH = 0
       this.groupRateForm.modeValueM = 0
       this.groupRateForm.modeValueS = 0
-      this.reportEventConfigForm = {
-        itemName: '',
-        tableReportId: null,
-        tableReportName: null
-      },
+      this.resetReportEventConfigForm()
+      if (this.updateGroupData && this.updateGroupData.readMode == val) {
+        this.withReadMode(this.updateGroupData, val)
+      }
 
       this.groupRateForm.readMode = val
       this.$refs.groupRateForm.clearValidate()
@@ -1699,6 +1706,16 @@ export default {
       this.itemDataStep = 1
       this.filterItemData = ''
       this.dataLineListSelections = []
+      let flag = false
+      for (let i = 0; i < this.chooseItemDataList.length; i ++) {
+        if (this.chooseItemDataList[i].itemName == this.reportEventConfigForm.itemName) {
+          flag = true
+          break
+        }
+      }
+      if (!flag) {
+        this.resetReportEventConfigForm()
+      }
       this.dataItemDialogVisible = false
       this.chooseItemDataView = true
     },
@@ -1834,14 +1851,7 @@ export default {
         this.bomCheckKey = new Date().getTime()
         this.dataLineListSelections = []
         this.dialogReportEventConfigVisible = false
-        if (this.$refs['reportEventConfigForm']) {
-          this.reportEventConfigForm = {
-            itemName: '',
-            tableReportId: null,
-            tableReportName: null
-          }
-          this.$refs['reportEventConfigForm'].resetFields()
-        }
+        this.resetReportEventConfigForm()
       })
     },
     /** 保存数据模型事件 */
@@ -2022,16 +2032,31 @@ export default {
     },
     resetReportEventConfigForm() {
       if (this.$refs['reportEventConfigForm']) {
-        this.reportEventConfigForm = {
-          itemName: '',
-          tableReportId: null,
-          tableReportName: null
-        }
         this.$refs['reportEventConfigForm'].resetFields()
       }
+      this.reportEventConfigForm = {
+        itemName: '',
+        tableReportId: null,
+        tableReportName: null
+      }
     },
     /** 弹出层关闭事件 */
     dialogReportEventConfigClose() {
+      this.resetReportEventConfigForm()
+      if (this.updateGroupData && this.updateGroupData.readMode == 2) {
+        let _itemList = this.updateGroupData.itemList
+        for (let i = 0; i < _itemList.length; i ++) {
+          if (_itemList[i].tableReportId) {
+            let items = this.groupBasicForm.itemList
+            items.forEach((item) => {
+              if (_itemList[i].itemName == item.itemName) {
+                this.reportEventConfigForm.tableReportId = _itemList[i].tableReportId
+                this.reportEventConfigForm.itemName = _itemList[i].itemName
+              }
+            })
+          }
+        }
+      }
       if (typeof(done) === 'function') {
         done()
       } else {

+ 2 - 1
chuanyi_client2/src/permission.js

@@ -32,7 +32,8 @@ router.beforeEach(async (to, from, next) => {
                             message: '您还没有设置角色,请联系管理员!',
                             type: 'warning'
                         })
-                        await store.dispatch('user/resetToken')
+                        await store.dispatch('user/Logout')
+                        // await store.dispatch('user/resetToken')
                         next(`/login?redirect=${to.fullPath}`)
                         return
                     }

+ 89 - 74
chuanyi_client2/src/views/group_item/index.vue

@@ -111,7 +111,7 @@
     <!-- 修改数据项基础信息 -->
     <el-dialog
         title="修改数据项"
-        width="50%"
+        width="600px"
         top="10vh"
         center
         v-dialog-drag
@@ -144,29 +144,29 @@
                     maxlength="20"
                     placeholder="请输入描述信息"></el-input>
         </el-form-item>
-        <el-divider content-position="left" class="cy-divider">事件报表配置(以下任意一项配置为空都将会无效)</el-divider>
-        <el-form-item label="事件驱动产生条件:" prop="eventMode">
-          <el-radio-group v-model="itemForm.eventMode">
-            <el-radio label="0">大于</el-radio>
-            <el-radio label="1">小于</el-radio>
-            <el-radio label="2">布尔类型</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item label="阈值:" prop="eventValue">
-          <el-input v-model="itemForm.eventValue" placeholder="请输入阈值" maxlength="8">
-          </el-input>
-        </el-form-item>
-        <el-form-item label="事件驱动报表:" prop="tableReportId">
-          <el-select v-model="itemForm.tableReportId" filterable clearable
-                     placeholder="请选择事件驱动报表" style="width: 100%;">
-            <el-option
-                v-for="(item, index) in this.eventReportList"
-                :key="index"
-                :label="item.reportTableName"
-                :value="item.id">
-            </el-option>
-          </el-select>
-        </el-form-item>
+<!--        <el-divider content-position="left" class="cy-divider">事件报表配置(以下任意一项配置为空都将会无效)</el-divider>-->
+<!--        <el-form-item label="事件驱动产生条件:" prop="eventMode">-->
+<!--          <el-radio-group v-model="itemForm.eventMode">-->
+<!--            <el-radio label="0">大于</el-radio>-->
+<!--            <el-radio label="1">小于</el-radio>-->
+<!--            <el-radio label="2">布尔类型</el-radio>-->
+<!--          </el-radio-group>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="阈值:" prop="eventValue">-->
+<!--          <el-input v-model="itemForm.eventValue" placeholder="请输入阈值" maxlength="8">-->
+<!--          </el-input>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="事件驱动报表:" prop="tableReportId">-->
+<!--          <el-select v-model="itemForm.tableReportId" filterable clearable-->
+<!--                     placeholder="请选择事件驱动报表" style="width: 100%;">-->
+<!--            <el-option-->
+<!--                v-for="(item, index) in this.eventReportList"-->
+<!--                :key="index"-->
+<!--                :label="item.reportTableName"-->
+<!--                :value="item.id">-->
+<!--            </el-option>-->
+<!--          </el-select>-->
+<!--        </el-form-item>-->
       </el-form>
       <span slot='footer'>
         <el-button type="primary" @click="editConfirmEvent" style="margin-top: 20px;">确定</el-button>
@@ -237,9 +237,9 @@ export default {
       itemForm: {
         id: null,
         dataModelId: null,
-        eventMode: null,
-        eventValue: null,
-        tableReportId: null,
+        // eventMode: null,
+        // eventValue: null,
+        // tableReportId: null,
         describe: ''
       }
     }
@@ -410,63 +410,78 @@ export default {
       _this.getAllDataModel(status => {
         if (!status) return
         const loading = showLoading(_this, '加载中,请稍候···')
-        let params = {
-          'page': 1,
-          'limit': 1000,
-          'isAutoReport': 3
-        }
-        getAllReportTable(params).then(res => {
-          let eventReportList = res.data.reportTableList
-          this.eventReportList = eventReportList
-          getItemById(row.id).then(res => {
-            loading.close()
-            _this.$nextTick(() => {
-              _this.itemForm.id = row.id
-              _this.itemForm.dataModelId = res.data.dataModelId
-              _this.itemForm.describe = res.data.describe
-              _this.itemForm.tableReportId = res.data.tableReportId
-              _this.itemForm.eventMode = res.data.eventMode + ''
-              _this.itemForm.eventValue = res.data.eventValue
-              _this.dialogItemVisible = true
-            })
-          }).catch((e) => {
-            loading.close()
-            showAlertWin(_this, e)
+        getItemById(row.id).then(res => {
+          loading.close()
+          _this.$nextTick(() => {
+            _this.itemForm.id = row.id
+            _this.itemForm.dataModelId = res.data.dataModelId
+            _this.itemForm.describe = res.data.describe
+            // _this.itemForm.tableReportId = res.data.tableReportId
+            // _this.itemForm.eventMode = res.data.eventMode + ''
+            // _this.itemForm.eventValue = res.data.eventValue
+            _this.dialogItemVisible = true
           })
         }).catch((e) => {
           loading.close()
-          showAlertWin(this, e)
+          showAlertWin(_this, e)
         })
+        // let params = {
+        //   'page': 1,
+        //   'limit': 1000,
+        //   'isAutoReport': 3
+        // }
+        // getAllReportTable(params).then(res => {
+        //   let eventReportList = res.data.reportTableList
+        //   this.eventReportList = eventReportList
+        //   getItemById(row.id).then(res => {
+        //     loading.close()
+        //     _this.$nextTick(() => {
+        //       _this.itemForm.id = row.id
+        //       _this.itemForm.dataModelId = res.data.dataModelId
+        //       _this.itemForm.describe = res.data.describe
+        //       _this.itemForm.tableReportId = res.data.tableReportId
+        //       _this.itemForm.eventMode = res.data.eventMode + ''
+        //       _this.itemForm.eventValue = res.data.eventValue
+        //       _this.dialogItemVisible = true
+        //     })
+        //   }).catch((e) => {
+        //     loading.close()
+        //     showAlertWin(_this, e)
+        //   })
+        // }).catch((e) => {
+        //   loading.close()
+        //   showAlertWin(this, e)
+        // })
       })
     },
     /** 编辑确认事件 */
     editConfirmEvent() {
-      if (this.itemForm.eventValue) {
-        let reg = /^(\-)?\d+(\.\d{1,2})?$/
-        if (!reg.test(this.itemForm.eventValue)) {
-          this.$message({
-            message: '阈值不合法',
-            type: 'warning'
-          })
-          return
-        }
-        if (this.itemForm.eventMode == '2' && this.itemForm.eventValue != 0 && this.itemForm.eventValue != 1) {
-          this.$message({
-            message: '布尔类型时阈值只能为0或者1',
-            type: 'warning'
-          })
-          return
-        }
-      }
+      // if (this.itemForm.eventValue) {
+      //   let reg = /^(\-)?\d+(\.\d{1,2})?$/
+      //   if (!reg.test(this.itemForm.eventValue)) {
+      //     this.$message({
+      //       message: '阈值不合法',
+      //       type: 'warning'
+      //     })
+      //     return
+      //   }
+      //   if (this.itemForm.eventMode == '2' && this.itemForm.eventValue != 0 && this.itemForm.eventValue != 1) {
+      //     this.$message({
+      //       message: '布尔类型时阈值只能为0或者1',
+      //       type: 'warning'
+      //     })
+      //     return
+      //   }
+      // }
       const loading = showLoading(this, '加载中,请稍候···')
       // 若驱动报表事件任意一项为空,则清空报表事项
-      if ((!this.itemForm.eventMode || this.itemForm.eventMode == 'null')
-          || (this.itemForm.eventValue == null || this.itemForm.eventValue == '')
-          || !this.itemForm.tableReportId) {
-        this.itemForm.eventMode = null
-        this.itemForm.eventValue = null
-        this.itemForm.tableReportId = null
-      }
+      // if ((!this.itemForm.eventMode || this.itemForm.eventMode == 'null')
+      //     || (this.itemForm.eventValue == null || this.itemForm.eventValue == '')
+      //     || !this.itemForm.tableReportId) {
+      //   this.itemForm.eventMode = null
+      //   this.itemForm.eventValue = null
+      //   this.itemForm.tableReportId = null
+      // }
       let params = JSON.parse(JSON.stringify(this.itemForm))
       updateItem(params).then(res => {
         loading.close()

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

@@ -383,7 +383,7 @@
         </div>
         <div v-if="chooseGroupItemList.length > 0">
           <template>
-            <el-divider content-position="left">数据项排方式</el-divider>
+            <el-divider content-position="left">数据项排方式</el-divider>
             <div class="cy-line custom-tree">
               <el-radio-group v-model="itemShowParams.fieldType" @input="showDataTypeEvent">
                 <el-radio label="1">横向</el-radio>

+ 3 - 3
chuanyi_client2/src/views/user_group/index.vue

@@ -27,7 +27,7 @@
     <!-- 新增用户组 -->
     <el-dialog
         :title="userGroupTitle"
-        width="80%"
+        width="600px"
         top="10vh"
         center
         v-dialog-drag
@@ -75,10 +75,10 @@
         :close-on-click-modal="false"
         :append-to-body="true">
       <div style="display: flex;height: 50vh; overflow: auto;">
-        <div style="width: calc(20% - 15px); margin-right: 15px;">
+        <div style="width: calc(30% - 15px); margin-right: 15px;">
           <el-tree :data="departments" :default-expand-all="true" @node-click="handleNodeClick"></el-tree>
         </div>
-        <div style="width: 80%; border-left: 1px solid #d8d6d6; padding-left: 20px;">
+        <div style="width: 70%; border-left: 1px solid #d8d6d6; padding-left: 20px;">
           <el-table :data="userDataList" border :stripe="true"
                     @sort-change="sortChange1"
                     :header-cell-style="{background: '#E8E8E8'}">

+ 2 - 2
reado-app/unpackage/dist/build/h5/index.html

@@ -1,5 +1,5 @@
-<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>reado-app</title><script src=https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js></script><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS
+<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>Easy Industrial Report</title><script src=./static/jquery.min.js></script><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS
 				.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><link rel=stylesheet href=./static/luckysheet/dist/plugins/plugins.css><link rel=stylesheet href=./static/luckysheet/dist/plugins/css/pluginsCss.css><link rel=stylesheet href=./static/luckysheet/dist/css/luckysheet.css><link rel=stylesheet href=./static/luckysheet/dist/assets/iconfont/iconfont.css><script src=./static/luckysheet/dist/luckysheet.umd.js></script><script src=./static/luckysheet/dist/plugins/js/plugin.js></script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.7d651a70.js></script><script src=./static/js/index.8b6b38d7.js></script></body></html>
+				(coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=./static/index.63b34199.css><link rel=stylesheet href=./static/luckysheet/dist/plugins/plugins.css><link rel=stylesheet href=./static/luckysheet/dist/plugins/css/pluginsCss.css><link rel=stylesheet href=./static/luckysheet/dist/css/luckysheet.css><link rel=stylesheet href=./static/luckysheet/dist/assets/iconfont/iconfont.css><script src=./static/luckysheet/dist/luckysheet.umd.js></script><script src=./static/luckysheet/dist/plugins/js/plugin.js></script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.7d651a70.js></script><script src=./static/js/index.604be2df.js></script></body></html>

BIN
reado-app/unpackage/dist/build/h5/static/fonts/uniicons.b6d3756e.ttf


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
reado-app/unpackage/dist/build/h5/static/jquery.min.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/index.604be2df.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/index.8b6b38d7.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-login-index.c7063e47.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-login-index.d9000766.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-login-index~pages-reportForm-report-detail-index~pages-user-index.c40b969a.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-login-index~pages-user-index.be72c672.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-message-index.0bfc02b3.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-message-index.ecc7aa27.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-message-index~pages-message-msg-detail-index~pages-reportForm-index~pages-reportForm-report-de~6cb3cfb9.0f26c040.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-message-index~pages-message-msg-detail-index~pages-reportForm-index~pages-reportForm-report-de~7378e1f1.ef51d87f.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-message-msg-detail-index.a1ecaa18.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-message-msg-detail-index.a393e18c.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-reportForm-index.3bb42d0b.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-reportForm-index.439211c8.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-reportForm-report-detail-index.9c7dfd89.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-reportForm-report-detail-index.de8c2f97.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-reportForm-report-detail-index~pages-user-index.4d192f8b.js


+ 1 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-reportForm-report-detail-recordDetail.3ad1a00a.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-reportForm-report-detail-recordDetail"],{adb5:function(t,e,n){"use strict";n.r(e);var o=n("debe"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},c5ef:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}));var o={Nav:n("da9e").default},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("Nav",{attrs:{title:t.title,isBack:!0,isRight:!0},on:{goBack:function(e){arguments[0]=e=t.$handleEvent(e),t.handelBack.apply(void 0,arguments)}}}),n("v-uni-view",{staticStyle:{margin:"0px",padding:"0px",position:"absolute",width:"100%",height:"95%",left:"0px",top:"80rpx"},attrs:{id:"luckysheet"}})],1)},a=[]},ce19:function(t,e,n){"use strict";n.r(e);var o=n("c5ef"),i=n("adb5");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);var r=n("f0c5"),d=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,"97e82f3e",null,!1,o["a"],void 0);e["default"]=d.exports},debe:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={data:function(){return{title:null,id:null,option:null}},onLoad:function(t){this.id=t.id},onReady:function(){this.id&&this.getRecordDetail()},methods:{handelBack:function(){uni.navigateBack()},getRecordDetail:function(){var t=this;uni.$http.get("/reportTable/getReportTableById/"+this.id).then((function(e){var n=e.data;if(200===n.code){t.title=n.data.reportTableName;var o=JSON.parse(n.data.reportTableData);t.option=o.option,t.option&&(o.option.allowEdit=!1,t.showToolbar(o),luckysheet.create(t.option))}}))},showToolbar:function(t){t.showtoolbar=!1,this.option.enableAddRow=!1,this.option.enableAddBackTop=!1;var e=t.option.showtoolbarConfig;for(var n in e)e[n]=!1}}};e.default=o}}]);

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-user-index.721e0999.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
reado-app/unpackage/dist/build/h5/static/js/pages-user-index.9b09c104.js


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