浏览代码

Merge branch 'master' of http://116.63.33.55/git/industry-data-platform into master

# Conflicts:
#	industry-admin/src/views/source/itemGroup/itemChooseTree.vue
lhy 1 年之前
父节点
当前提交
e67fca322e

二进制
industry-admin/src/assets/images/change.png


二进制
industry-admin/src/assets/images/cond.png


二进制
industry-admin/src/assets/images/time.png


+ 3 - 1
industry-admin/src/components/CommonTable/index.vue

@@ -33,7 +33,9 @@
                     </el-option>
                 </el-select>
                 <div v-if="item.type == 'html'" v-html="item.formatter(scope.row)"
-                    @click="operateMethod(scope.row, item.methodName)"></div>
+                    @click="operateMethod(scope.row, item.methodName)">
+
+                </div>
 
             </template>
         </el-table-column>

+ 1 - 1
industry-admin/src/views/collector/index.vue

@@ -233,7 +233,7 @@
           <el-input placeholder="请输入采集间隔" v-model="itemForm.interval">
             <template slot="append">
               <div class="unit-my">
-                <el-select v-model="itemForm.unit">
+                <el-select v-model="itemForm.unit" style="width: 80px">
                   <el-option label="毫秒" value="ms" />
                   <el-option label="秒" value="s" />
                   <el-option label="分" value="m" />

+ 11 - 9
industry-admin/src/views/report/reportTable/index.vue

@@ -122,17 +122,19 @@ export default {
                     labelName: "分享信息",
                     type: "html",
                     formatter: (row, column, cellValue, index) => {
-                        let html = '<el-tag style="margin-right: 5px;"  type="'
-                        if (row.userId == this.uid) {
-                            html += 'success">'
-                            html += '已分享</el-tag>'
-                            return html
+                        let grouplist = JSON.parse(JSON.stringify(row.userGroupList));
+                        let groupnameList = '';
+                        if(grouplist.length>0){
+                          for(let i in grouplist){
+                            groupnameList = groupnameList + grouplist[i].userGroupName + ',';
+                          }
+                          groupnameList = groupnameList.slice(0, -1);
+                          return '已分享至(' + groupnameList +')'
                         }
-                        html += 'warning">'
-                        html += row.userName + '被分享</el-tag>'
-                        return html
+
                     },
-                    align: "left"
+                    align: "left",
+                    width: '200'
                 },
                 {
                     propName: "createTime",

+ 1 - 2
industry-admin/src/views/report/reportTablePolicy/index.vue

@@ -7,7 +7,6 @@
                     <el-col :span="1.5">
                         <el-button type="primary" icon="el-icon-plus" size="small"
                             @click="addPolicyEvent">新增</el-button>
-
                     </el-col>
                 </el-row>
                 <!-- 数据组表格信息 -->
@@ -79,7 +78,7 @@ export default {
                     formatter: (row, column, cellValue, index) => {
                       let result = ''
                         if (row.readMode == 0) {
-                            return '<i class="el-icon-alarm-clock"></i> <span>按周期读取</span>' //'按周期读取'
+                            return '<span>按周期读取</span>' //'按周期读取'
                         } else if (row.readMode == 1) {
                             result = '按值改变读取'
                         } else if (row.readMode == 2) {

+ 13 - 0
industry-admin/src/views/report/runConfig/index.vue

@@ -127,6 +127,19 @@ export default {
                     align: "left",
                     width: '200'
                 },
+              {
+                propName: "shareGroup",
+                labelName: "分享信息",
+                type: "html",
+                formatter: (row, column, cellValue, index) => {
+                  if(row.shareGroup){
+                    return '已分享至(' + row.shareGroup + ')'
+                  }
+
+                },
+                align: "left",
+                width: '200'
+              },
                 {
                     propName: "createTime",
                     labelName: "创建时间",

+ 5 - 5
industry-admin/src/views/source/dataQuery/index.vue

@@ -55,9 +55,9 @@
                             </el-form-item>
                         </el-col>
                         <el-col :xl="5">
-                            <el-form-item label="数据项" prop="itemListTitile">
+                            <el-form-item label="点位" prop="itemListTitile">
                                 <el-input :title="chartForm.itemListTitile" v-model="chartForm.itemListTitile" readonly
-                                    placeholder="请选择数据项" maxlength="10" style="width: 200px;">
+                                    placeholder="请选择点位" maxlength="10" style="width: 200px;">
                                     <el-button size="mini" type="primary" slot="append" icon="el-icon-search"
                                         @click="chooseItemEvent">选择</el-button>
                                 </el-input>
@@ -381,7 +381,7 @@ export default {
             this.destroyChart()
             if (this.chartForm.idList.length == 0) {
                 this.$message({
-                    message: '请选择数据项',
+                    message: '请选择点位',
                     type: 'warning'
                 })
                 return
@@ -761,7 +761,7 @@ export default {
         saveSchemeEvent() {
             if (this.chartForm.idList.length == 0) {
                 this.$message({
-                    message: '请选择数据项',
+                    message: '请选择点位',
                     type: 'warning'
                 })
                 return
@@ -872,7 +872,7 @@ export default {
         exportItemListData(type) {
             if (this.chartForm.idList.length == 0) {
                 this.$message({
-                    message: '请选择数据项',
+                    message: '请选择点位',
                     type: 'warning'
                 })
                 return

+ 20 - 18
industry-admin/src/views/source/itemGroup/itemChooseTree.vue

@@ -59,24 +59,26 @@
                                             node.label
                                           }}</span>
                                     </span>
-                </virtual-tree>
-              </div>
-              <!-- 树节点对应的叶节点 -->
-              <div style="height: 30vh; overflow: auto">
-                <el-divider content-position="left" style="margin-bottom: 15px !important">
-                  <i></i>
-                  <span>(共{{ leavesList.length }}项)</span>
-                </el-divider>
-                <el-input placeholder="输入关键字进行过滤" style="margin-top: -10px; width: calc(100% - 60px)"
-                          size="mini" @input="filterLeavesEvent" v-model="filterLeavesText"></el-input>
-                <el-checkbox v-model="isSelectAllLeaves" @change="handleCheckAllLeavesChange"
-                             style="margin-left: 5px">全选
-                </el-checkbox>
-                <div class="cy-leaves-div">
-                  <p-virtual-check ref="pvc" :data-sources="leavesList"
-                                   @check-change-all="checkChangeAllLeaves"
-                                   @check-change="checkChangeLeaves"></p-virtual-check>
-                </div>
+</virtual-tree>
+                            </div>
+                            <!-- 树节点对应的叶节点 -->
+                            <div style="height: 40vh; overflow: auto">
+                                <el-divider content-position="left" style="margin-bottom: 15px !important">
+                                    <i></i>
+                                    <span>(共{{ leavesList.length }}项)</span>
+                                </el-divider>
+                                <el-input placeholder="输入关键字进行过滤" style="margin-top: -10px; width: calc(100% - 60px)"
+                                    size="mini" @input="filterLeavesEvent" v-model="filterLeavesText"></el-input>
+                                <el-checkbox v-model="isSelectAllLeaves" @change="handleCheckAllLeavesChange"
+                                    style="margin-left: 5px">全选</el-checkbox>
+                                <div class="cy-leaves-div">
+                                    <p-virtual-check ref="pvc" :data-sources="leavesList"
+                                        @check-change-all="checkChangeAllLeaves"
+                                        @check-change="checkChangeLeaves"></p-virtual-check>
+                                </div>
+                            </div>
+                        </div>
+                    </div>                </div>
               </div>
             </div>
           </div>

+ 1 - 0
industry-system/cqcy-ei-common/src/main/java/com/example/opc_common/entity/ReportTable.java

@@ -44,6 +44,7 @@ public class ReportTable extends BaseSchedule implements Serializable {
     private String printIp;
     //打印配置id
     private Integer printConfigId;
+    private String shareGroup;
     /**
      * 用户组id
      */

+ 1 - 1
industry-system/industry-da/src/main/java/com/example/opc_da/service/impl/ReportDataPolicyServiceImpl.java

@@ -411,7 +411,7 @@ public class ReportDataPolicyServiceImpl implements ReportDataPolicyService {
         LocalDateTime sDateTime = startLocalDateTime;
         LocalDateTime eDateTime;
         //如果sDateTime小于endDateTime
-        while (sDateTime.isBefore(endLocalDateTime)) {
+        while (sDateTime.isBefore(endLocalDateTime) || sDateTime.isEqual(endLocalDateTime)) {
             eDateTime = BucketTypeFactory.getBucketType(bucketType).plusLocalDateTime(sDateTime, bucketValue);
             List<String> valueList = new ArrayList<>();
             if (CollUtil.isNotEmpty(dataValueList)) {

+ 18 - 0
industry-system/industry-da/src/main/resources/mapper/ReportTableDao.xml

@@ -436,6 +436,24 @@
 
     <select id="getAllReportTable" resultType="com.example.opc_common.entity.ReportTable">
         select
+        r.id
+        , r.report_table_type, r.table_template_id, r.user_id, r.report_table_name, r.start_time, r.current_num,
+        r.is_gen_count_time, r.version, r.is_run_print, r.print_ip, r.print_config_id, r.cron_id, r.type, r.cron , r.run_state, r.create_time, r.is_delete,
+        (select GROUP_CONCAT(u.user_group_name) from t_table_user_group g left outer join t_user_group u on u.id=g.user_group_id where r.id=g.table_id) shareGroup
+        from t_report_table r
+        where r.user_id = #{userId}
+        <if test="reportTableName != null and reportTableName != ''">
+            AND r.report_table_name LIKE CONCAT('%', #{reportTableName}, '%')
+        </if>
+        AND r.report_table_type IN ( 0, 1, 2 ,5 )
+        <if test="reportTableType != null">
+            AND r.report_table_type = #{reportTableType}
+        </if>
+        order by r.create_time desc
+        limit #{startNum},#{limitNum}
+    </select>
+    <select id="getAllReportTable2" resultType="com.example.opc_common.entity.ReportTable">
+        select
         <include refid="reportTableCronNoData"/>
         from t_report_table
         where user_id = #{userId}

+ 1 - 0
industry-system/industry-da/src/main/resources/static/reportSheet/js/src/model/sheet-util.js

@@ -70,6 +70,7 @@ layui.define(function(exports) {
 			if (sheetConfig && sheetConfig.data) {
 				option.data = sheetConfig.data
 			}
+			console.log(option)
 			option.hook = {
 				cellEditBefore: function(range) {
 					const cell = luckysheet.getCellValue((range[0].row)[0], (range[0].column)[0], {type: 'v'})