Explorar el Código

事件驱动报表配置相应的时间线

zhoupeng hace 1 año
padre
commit
504d5bcf65

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

@@ -1688,8 +1688,9 @@ export default {
           showAlertMsgWin(this, null, '事件驱动项有且仅有一个!')
           return
         }
-        c = 0
+        c = 1
         r = 1
+        luckysheet.setCellValue(0, 0, '时间')
       } else {
         let rangeWithFlatten = luckysheet.getRangeWithFlatten()
         c = rangeWithFlatten[0].c

+ 14 - 3
chuanyi_client2/src/views/run_config/index.vue

@@ -1356,6 +1356,18 @@ export default {
       // 事件驱动报表
       if (type == 2 || type == 4) {
         tableItemList.forEach((tableItem, i) => {
+          if (i == 0) {
+            let valueTimeList = tableItem.valueTimeList ? tableItem.valueTimeList.split(',') : []
+            let xAxis = tableItem.xaxis
+            let yAxis = 0
+            if (valueTimeList.length == 0) {
+              luckysheet.setCellValue(xAxis, yAxis, '')
+            } else {
+              valueTimeList.forEach((v, j) => {
+                luckysheet.setCellValue(xAxis + j, yAxis, v)
+              })
+            }
+          }
           let valueList = tableItem.valueList ? tableItem.valueList.split(',') : []
           let xAxis = tableItem.xaxis
           let yAxis = tableItem.yaxis
@@ -1563,7 +1575,7 @@ export default {
       console.log(this.printForm.reportTableId)
       stopAutoPrintById(this.printForm.reportTableId).then(res => {
         showAlertWin(this, null, res.data)
-        if(res.code==200){
+        if (res.code == 200) {
           this.dialogAutoPrintVisible = false;
         }
       }).catch(e => {
@@ -2243,8 +2255,7 @@ export default {
             }, 1000);
           })
         });
-      }
-      else {
+      } else {
         // 获取打印区域的行列
         let RowColumn = this.getPrintSheetArea();
         // 因需要打印左边的边框,需重新设置第一列