Prechádzať zdrojové kódy

Merge branch 'master' of https://gitee.com/anji-plus/report

yanzili 4 rokov pred
rodič
commit
813f36619c
20 zmenil súbory, kde vykonal 788 pridanie a 1622 odobranie
  1. 6 38
      report-core/pom.xml
  2. 8 12
      report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/impl/ReportServiceImpl.java
  3. 0 97
      report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/ReportExcelController.java
  4. 0 43
      report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/dto/ReportExcelDto.java
  5. 0 18
      report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/param/ReportExcelParam.java
  6. 0 11
      report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/ReportExcelMapper.java
  7. 0 33
      report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/entity/ReportExcel.java
  8. 0 39
      report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/ReportExcelService.java
  9. 0 146
      report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java
  10. 0 1109
      report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/util/ReportUtil.java
  11. 0 22
      report-core/src/main/resources/mapper/ReportExcelMapper.xml
  12. 2 2
      report-ui/config/dev.env.js
  13. 43 39
      report-ui/src/views/report/bigscreen/designer/form/customColorComponents.vue
  14. 1 1
      report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue
  15. 374 0
      report-ui/src/views/report/bigscreen/designer/tools.js
  16. 342 0
      report-ui/src/views/report/bigscreen/designer/widget/pie/widgetPieNightingaleRoseArea.vue
  17. 3 3
      report-ui/src/views/report/bigscreen/designer/widget/widget.vue
  18. 2 2
      report-ui/src/views/report/datasource/index.vue
  19. 4 4
      report-ui/src/views/report/report/index.vue
  20. 3 3
      report-ui/src/views/report/resultset/index.vue

+ 6 - 38
report-core/pom.xml

@@ -38,23 +38,6 @@
             <artifactId>spring-cloud-context</artifactId>
         </dependency>
 
-        <!--模板引擎-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-freemarker</artifactId>
-        </dependency>
-
-<!--        <dependency>-->
-<!--            <groupId>com.anjiplus.template.gaea</groupId>-->
-<!--            <artifactId>template-gaea-generator</artifactId>-->
-<!--            <exclusions>-->
-<!--                <exclusion>-->
-<!--                    <groupId>org.springframework.boot</groupId>-->
-<!--                    <artifactId>spring-boot-starter-data-redis</artifactId>-->
-<!--                </exclusion>-->
-<!--            </exclusions>-->
-<!--        </dependency>-->
-
         <dependency>
             <groupId>com.baomidou</groupId>
             <artifactId>mybatis-plus-boot-starter</artifactId>
@@ -98,31 +81,16 @@
         </dependency>
 
 
-
         <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>druid</artifactId>
-            <version>1.1.22</version>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.5.2</version>
         </dependency>
 
-        <!--kudu impala驱动-->
         <dependency>
-            <groupId>owinfo</groupId>
-            <artifactId>impalajdbc41</artifactId>
-            <version>1.0.0</version>
-            <scope>system</scope>
-            <systemPath>${project.basedir}/src/main/resources/lib/ImpalaJDBC41.jar</systemPath>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.hive</groupId>
-            <artifactId>hive-jdbc</artifactId>
-            <version>1.2.1</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.eclipse.jetty.aggregate</groupId>
-                    <artifactId>jetty-all</artifactId>
-                </exclusion>
-            </exclusions>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+            <version>4.4.5</version>
         </dependency>
 
     </dependencies>

+ 8 - 12
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/impl/ReportServiceImpl.java

@@ -1,15 +1,12 @@
 package com.anjiplus.template.gaea.business.modules.report.service.impl;
 
+import com.anji.plus.gaea.constant.BaseOperationEnum;
 import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper;
+import com.anji.plus.gaea.exception.BusinessException;
 import com.anjiplus.template.gaea.business.modules.report.controller.dto.ReportDto;
 import com.anjiplus.template.gaea.business.modules.report.dao.ReportMapper;
 import com.anjiplus.template.gaea.business.modules.report.dao.entity.Report;
 import com.anjiplus.template.gaea.business.modules.report.service.ReportService;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.ReportExcelMapper;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -22,13 +19,9 @@ import org.springframework.stereotype.Service;
 @Service
 public class ReportServiceImpl implements ReportService {
 
-    private Logger logger = LoggerFactory.getLogger(this.getClass());
     @Autowired
     private ReportMapper reportMapper;
 
-    @Autowired
-    private ReportExcelMapper reportExcelMapper;
-
     @Override
     public GaeaBaseMapper<Report> getMapper() {
         return reportMapper;
@@ -38,8 +31,11 @@ public class ReportServiceImpl implements ReportService {
     @Override
     public void delReport(ReportDto reportDto) {
         deleteById(reportDto.getId());
-        QueryWrapper<ReportExcel> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("report_code" , reportDto.getReportCode());
-        reportExcelMapper.delete(queryWrapper);
+    }
+
+    @Override
+    public void processBeforeOperation(Report entity, BaseOperationEnum operationEnum) throws BusinessException {
+        //目前只有大屏一种类型
+        entity.setReportType("report_screen");
     }
 }

+ 0 - 97
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/ReportExcelController.java

@@ -1,97 +0,0 @@
-package com.anjiplus.template.gaea.business.modules.reportexcel.controller;
-
-import com.anji.plus.gaea.annotation.Permission;
-import com.anji.plus.gaea.annotation.log.GaeaAuditLog;
-import com.anji.plus.gaea.bean.ResponseBean;
-import com.anji.plus.gaea.code.ResponseCode;
-import com.anji.plus.gaea.curd.controller.GaeaBaseController;
-import com.anji.plus.gaea.curd.service.GaeaBaseService;
-import com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto.ReportExcelDto;
-import com.anjiplus.template.gaea.business.modules.reportexcel.controller.param.ReportExcelParam;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel;
-import com.anjiplus.template.gaea.business.modules.reportexcel.service.ReportExcelService;
-import io.swagger.annotations.Api;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author chenkening
- * @date 2021/4/13 15:12
- */
-@RestController
-@Api(tags = "报表表格管理")
-@RequestMapping("/reportExcel")
-public class ReportExcelController extends GaeaBaseController<ReportExcelParam, ReportExcel, ReportExcelDto> {
-
-    @Autowired
-    private ReportExcelService reportExcelService;
-
-    @Override
-    public GaeaBaseService<ReportExcelParam, ReportExcel> getService() {
-        return reportExcelService;
-    }
-
-    @Override
-    public ReportExcel getEntity() {
-        return new ReportExcel();
-    }
-
-    @Override
-    public ReportExcelDto getDTO() {
-        return new ReportExcelDto();
-    }
-
-    @GetMapping("/detailByReportCode/{reportCode}")
-    @Permission(
-            code = "DETAIL",
-            name = "详情"
-    )
-    @GaeaAuditLog(
-            pageTitle = "详情"
-    )
-    public ResponseBean detailByReportCode(@PathVariable String reportCode) {
-        ReportExcelDto reportExcelDto = reportExcelService.detailByReportCode(reportCode);
-        return ResponseBean.builder().data(reportExcelDto).build();
-    }
-
-    @PostMapping("/preview")
-    @Permission(
-            code = "DETAIL",
-            name = "预览"
-    )
-    @GaeaAuditLog(
-            pageTitle = "预览"
-    )
-    public ResponseBean preview(@RequestBody ReportExcelDto reportExcelDto) {
-        ReportExcelDto result = reportExcelService.preview(reportExcelDto);
-        return ResponseBean.builder().data(result).build();
-    }
-
-
-    @PostMapping("/exportExcel")
-    @Permission(
-            code = "IMPORT",
-            name = "导出"
-    )
-    @GaeaAuditLog(
-            pageTitle = "报表导出"
-    )
-    public ResponseBean exportExcel(@RequestBody ReportExcelDto reportExcelDto) {
-
-        return ResponseBean.builder().code(ResponseCode.SUCCESS_CODE)
-                .data(reportExcelService.exportExcel(reportExcelDto))
-                .message("导出成功,请稍后在下载中心查看").build();
-    }
-
-//    @PostMapping("/exportPdf")
-//    public ResponseBean exportPdf(@RequestBody ReportExcelDto reportExcelDto) {
-//        reportExcelService.exportPdf(reportExcelDto);
-//        return ResponseBean.builder().code(ResponseCode.SUCCESS_CODE)
-//                .build();
-//    }
-}

+ 0 - 43
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/dto/ReportExcelDto.java

@@ -1,43 +0,0 @@
-
-package com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto;
-
-import com.anji.plus.gaea.curd.dto.GaeaBaseDTO;
-import lombok.Data;
-
-import java.io.Serializable;
-
-
-/**
- * @author chenkening
- * @date 2021/4/13 15:12
- */
-@Data
-public class ReportExcelDto extends GaeaBaseDTO implements Serializable {
-    /** 报表名称 */
-    private String reportName;
-
-    /** 报表编码 */
-    private String reportCode;
-
-    /**数据集编码,以|分割*/
-    private String setCodes;
-
-    /** 分组 */
-    private String reportGroup;
-
-    /** 数据集查询参数 */
-    private String setParam;
-
-    /** 报表json字符串 */
-    private String jsonStr;
-
-    /** 报表类型 */
-    private String reportType;
-
-    /** 数据总计 */
-    private long total;
-
-    /**导出类型*/
-    private String exportType;
-
-}

+ 0 - 18
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/param/ReportExcelParam.java

@@ -1,18 +0,0 @@
-
-package com.anjiplus.template.gaea.business.modules.reportexcel.controller.param;
-
-import com.anji.plus.gaea.curd.params.PageParam;
-import lombok.Data;
-
-import java.io.Serializable;
-
-
-/**
- * @author chenkening
- * @date 2021/4/13 15:12
- */
-@Data
-public class ReportExcelParam extends PageParam implements Serializable{
-
-
-}

+ 0 - 11
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/ReportExcelMapper.java

@@ -1,11 +0,0 @@
-package com.anjiplus.template.gaea.business.modules.reportexcel.dao;
-
-import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel;
-
-/**
- * @author chenkening
- * @date 2021/4/13 15:11
- */
-public interface ReportExcelMapper extends GaeaBaseMapper<ReportExcel> {
-}

+ 0 - 33
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/entity/ReportExcel.java

@@ -1,33 +0,0 @@
-package com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity;
-
-import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * @author chenkening
- * @date 2021/4/13 15:11
- */
-@TableName(value="gaea_report_excel")
-@Data
-public class ReportExcel extends GaeaBaseEntity {
-
-    @ApiModelProperty(value = "报表编码")
-    private String reportCode;
-
-    @ApiModelProperty(value = "数据集编码,以|分割")
-    private String setCodes;
-
-    @ApiModelProperty(value = "数据集查询参数")
-    private String setParam;
-
-    @ApiModelProperty(value = "报表json字符串")
-    private String jsonStr;
-
-    @ApiModelProperty(value = "0--已禁用 1--已启用  DIC_NAME=ENABLE_FLAG")
-    private Integer enableFlag;
-
-    @ApiModelProperty(value = "0--未删除 1--已删除 DIC_NAME=DELETE_FLAG")
-    private Integer deleteFlag;
-}

+ 0 - 39
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/ReportExcelService.java

@@ -1,39 +0,0 @@
-package com.anjiplus.template.gaea.business.modules.reportexcel.service;
-
-import com.anji.plus.gaea.curd.service.GaeaBaseService;
-import com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto.ReportExcelDto;
-import com.anjiplus.template.gaea.business.modules.reportexcel.controller.param.ReportExcelParam;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel;
-
-/**
- * TODO
- *
- * @author chenkening
- * @date 2021/4/13 15:14
- */
-public interface ReportExcelService extends GaeaBaseService<ReportExcelParam, ReportExcel> {
-
-    /**
-     * 根据报表编码查询详情
-     * @param reportCode
-     * @return
-     */
-    ReportExcelDto detailByReportCode(String reportCode);
-
-    /**
-     * 报表预览
-     * @param reportExcelDto
-     * @return
-     */
-    ReportExcelDto preview(ReportExcelDto reportExcelDto);
-
-
-    /**
-     * 导出为excel
-     * @param reportExcelDto
-     * @return
-     */
-    Boolean exportExcel(ReportExcelDto reportExcelDto);
-
-//    Boolean exportPdf(ReportExcelDto reportExcelDto);
-}

+ 0 - 146
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java

@@ -1,146 +0,0 @@
-package com.anjiplus.template.gaea.business.modules.reportexcel.service.impl;
-
-import com.alibaba.fastjson.JSONObject;
-import com.anji.plus.gaea.constant.BaseOperationEnum;
-import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper;
-import com.anji.plus.gaea.exception.BusinessException;
-import com.anji.plus.gaea.export.enums.ExportTypeEnum;
-import com.anji.plus.gaea.export.utils.ExportUtil;
-import com.anji.plus.gaea.export.vo.ExportOperation;
-import com.anji.plus.gaea.holder.UserContentHolder;
-import com.anji.plus.gaea.utils.GaeaAssert;
-import com.anji.plus.gaea.utils.GaeaBeanUtils;
-import com.anjiplus.template.gaea.business.code.ResponseCode;
-import com.anjiplus.template.gaea.business.modules.report.dao.ReportMapper;
-import com.anjiplus.template.gaea.business.modules.report.dao.entity.Report;
-import com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto.ReportExcelDto;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.ReportExcelMapper;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel;
-import com.anjiplus.template.gaea.business.modules.reportexcel.service.ReportExcelService;
-import com.anjiplus.template.gaea.business.modules.reportexcel.util.ReportUtil;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
-import org.springframework.stereotype.Service;
-
-import java.time.LocalDateTime;
-
-/**
- * TODO
- *
- * @author chenkening
- * @date 2021/4/13 15:14
- */
-@Service
-public class ReportExcelServiceImpl implements ReportExcelService {
-
-    private Logger logger = LoggerFactory.getLogger(this.getClass());
-    @Autowired
-    private ReportExcelMapper reportExcelMapper;
-
-    @Autowired
-    private ThreadPoolTaskExecutor threadPoolExportExecutor;
-
-    @Autowired
-    private ReportMapper reportMapper;
-
-    @Value("${file.dist-path:''}")
-    private String dictPath;
-
-    @Autowired
-    private ReportUtil reportUtil;
-
-    @Override
-    public GaeaBaseMapper<ReportExcel> getMapper() {
-        return reportExcelMapper;
-    }
-
-    @Override
-    public ReportExcelDto detailByReportCode(String reportCode) {
-        QueryWrapper<ReportExcel> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("report_code" , reportCode);
-        ReportExcel reportExcel = reportExcelMapper.selectOne(queryWrapper);
-        if(reportExcel != null){
-            ReportExcelDto dto = new ReportExcelDto();
-            BeanUtils.copyProperties(reportExcel , dto);
-            return dto;
-        }
-        return null;
-    }
-
-    /**
-     * 操作前处理
-     *
-     * @param entity        前端传递的对象
-     * @param operationEnum 操作类型
-     * @throws BusinessException 阻止程序继续执行或回滚事务
-     */
-    @Override
-    public void processBeforeOperation(ReportExcel entity, BaseOperationEnum operationEnum) throws BusinessException {
-        if (operationEnum.equals(BaseOperationEnum.INSERT)) {
-            String reportCode = entity.getReportCode();
-            ReportExcel report = this.selectOne("report_code", reportCode);
-            if (null != report) {
-                this.deleteById(report.getId());
-            }
-        }
-    }
-
-    /**
-     * 报表预览
-     */
-    @Override
-    public ReportExcelDto preview(ReportExcelDto reportExcelDto) {
-        // 根据id查询 报表详情
-        ReportExcel reportExcel = selectOne("report_code", reportExcelDto.getReportCode());
-        QueryWrapper<Report> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("report_code" , reportExcelDto.getReportCode());
-        Report report = reportMapper.selectOne(queryWrapper);
-        GaeaAssert.notNull(reportExcel, ResponseCode.RULE_CONTENT_NOT_EXIST, "reportExcel");
-        String setParam = reportExcelDto.getSetParam();
-
-        GaeaBeanUtils.copyAndFormatter(reportExcel , reportExcelDto);
-        if(StringUtils.isNotBlank(setParam)){
-            reportExcelDto.setSetParam(setParam);
-        }
-        reportExcelDto.setReportName(report.getReportName());
-        JSONObject jsonObject = reportUtil.reportParse(reportExcelDto);
-        reportExcelDto.setJsonStr(JSONObject.toJSONString(jsonObject));
-        reportExcelDto.setTotal(jsonObject.getJSONObject("rows").size());
-        return reportExcelDto;
-    }
-
-    @Override
-    public Boolean exportExcel(ReportExcelDto reportExcelDto) {
-        ExportOperation exportOperation = new ExportOperation();
-        //指明导出数据查询到结果开始时间
-        exportOperation.setResultStartTime(LocalDateTime.now());
-        ReportExcelDto result = preview(reportExcelDto);
-        //指明导出数据查询到结果结束时间
-        exportOperation.setResultEndTime(LocalDateTime.now());
-        //指明导出数据查询到结果条数
-        exportOperation.setResultSize(result.getTotal());
-        //指明采用什么模式导出
-        exportOperation.setExportType(StringUtils.isBlank(reportExcelDto.getExportType())
-                ? ExportTypeEnum.GAEA_TEMPLATE_EXCEL.getCodeValue() : reportExcelDto.getExportType());
-        //设置导出的文件名
-        exportOperation.setFileTitle(result.getReportName());
-        //设置导出的文件存放目录
-        exportOperation.setFilePath(dictPath);
-        //设置导出的数据jsonStr
-        exportOperation.setJsonStr(result.getJsonStr());
-        //保存当前操作人
-        exportOperation.setCreaterUsername(UserContentHolder.getContext().getUsername());
-        //调用盖亚组件实现导出文件
-        threadPoolExportExecutor.execute(() -> {
-            ExportUtil.getInstance().exportByFilePathSimple(exportOperation, null);
-        });
-        return true;
-    }
-
-}

+ 0 - 1109
report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/util/ReportUtil.java

@@ -1,1109 +0,0 @@
-package com.anjiplus.template.gaea.business.modules.reportexcel.util;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.alibaba.fastjson.parser.Feature;
-import com.anji.plus.gaea.export.utils.QrCodeOrBarCodeUtil;
-import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.DataSetDto;
-import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.OriginalDataDto;
-import com.anjiplus.template.gaea.business.modules.dataSet.service.DataSetService;
-import com.anjiplus.template.gaea.business.modules.report.constant.ExpConstant;
-import com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto.ReportExcelDto;
-import freemarker.template.Configuration;
-import freemarker.template.Template;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.poi.ddf.EscherClientAnchorRecord;
-import org.apache.poi.hssf.usermodel.HSSFDataFormat;
-import org.apache.poi.ss.usermodel.BorderStyle;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.CellType;
-import org.apache.poi.ss.usermodel.ClientAnchor;
-import org.apache.poi.ss.usermodel.CreationHelper;
-import org.apache.poi.ss.usermodel.DataFormat;
-import org.apache.poi.ss.usermodel.FillPatternType;
-import org.apache.poi.ss.usermodel.HorizontalAlignment;
-import org.apache.poi.ss.usermodel.Picture;
-import org.apache.poi.ss.usermodel.Row;
-import org.apache.poi.ss.usermodel.VerticalAlignment;
-import org.apache.poi.ss.usermodel.Workbook;
-import org.apache.poi.ss.util.CellRangeAddress;
-import org.apache.poi.ss.util.RegionUtil;
-import org.apache.poi.xssf.usermodel.XSSFCellStyle;
-import org.apache.poi.xssf.usermodel.XSSFColor;
-import org.apache.poi.xssf.usermodel.XSSFDataFormat;
-import org.apache.poi.xssf.usermodel.XSSFDrawing;
-import org.apache.poi.xssf.usermodel.XSSFFont;
-import org.apache.poi.xssf.usermodel.XSSFRow;
-import org.apache.poi.xssf.usermodel.XSSFSheet;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.springframework.util.CollectionUtils;
-
-import java.io.ByteArrayOutputStream;
-import java.io.FileOutputStream;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.OptionalDouble;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-/**
- * TODO
- *
- * @author chenkening
- * @date 2021/3/26 10:30
- */
-@Component
-public class ReportUtil {
-
-    /**
-     * 记录日志
-     */
-    protected static Logger logger = LoggerFactory.getLogger(ReportUtil.class);
-
-    @Autowired
-    private DataSetService dataSetService;
-
-
-    public JSONObject reportParse(ReportExcelDto reportExcelDto) {
-
-        // 取第一个sheet
-        JSONObject jsonObject = JSONObject.parseObject(reportExcelDto.getJsonStr(), Feature.OrderedField).getJSONArray("sheet").getJSONObject(0);
-//        JSONObject jsonObject = JSONObject.parseObject(reportExcelDto.getJsonStr());
-
-        logger.info("excelJSON信息:{}\n", jsonObject);
-        JSONObject rowsJsonObject = jsonObject.getJSONObject("rows");
-        // 所有的样式数组。
-        JSONArray styles = jsonObject.getJSONArray("styles");
-//        System.out.println(styles);
-        logger.info("需要解析的JSON {}", rowsJsonObject);
-
-        //用于存储语法解析后的json
-        JSONObject syntaxJsonObject = new JSONObject(true);
-
-        Map<String, Object> dataSetMap = new HashMap<>();
-
-        Map<Integer, List<Object>> map = new HashMap<>();
-        rowsJsonObject.remove("len");
-        for (String s : rowsJsonObject.keySet()) {
-            List<Object> list = Collections.singletonList(rowsJsonObject.getJSONObject(s));
-            map.put(Integer.parseInt(s), list);
-        }
-
-        // 解决rows 行乱序
-        syntaxParse(map, syntaxJsonObject, reportExcelDto.getSetCodes(), reportExcelDto.getSetParam(), dataSetMap);
-        JSONObject jsonMap = new JSONObject(true);
-
-        JSONObject jsonObject1 = JSONObject.parseObject(JSON.toJSONString(syntaxJsonObject), Feature.OrderedField);
-        jsonObject1.put("len", jsonObject1.size() + 30);
-        jsonObject.put("rows", jsonObject1);
-        jsonObject.put("name", reportExcelDto.getReportName());
-        return jsonObject;
-    }
-
-    /**
-     * 包含动态表达式的行解析
-     *
-     * @param mapss            rows
-     * @param syntaxJsonObject 存储解析后的json
-     * @param dbCode           编码
-     * @param setParam         查询条件数据集
-     * @param dataSetMap       数据集
-     */
-    public void syntaxParse(Map<Integer, List<Object>> mapss, JSONObject syntaxJsonObject, String dbCode, String setParam, Map<String, Object> dataSetMap) {
-
-        String[] split = dbCode.split("\\|");
-        // 解析过几次表达式列。
-        int count = 1;
-        for (Map.Entry<Integer, List<Object>> integerListEntry : mapss.entrySet()) {
-            List<Object> listobj = Stream.of(integerListEntry.getValue()).collect(Collectors.toList());
-            JSONArray jsonObject1 = JSONArray.parseArray(listobj.toString());
-            JSONArray jsonArray = (JSONArray) jsonObject1.get(0);
-            // cells json
-            JSONObject jsonObject2 = JSONObject.parseObject(jsonArray.get(0).toString());
-            for (Map.Entry<String, Object> stringObjectEntry2 : jsonObject2.entrySet()) {
-                if (stringObjectEntry2.getKey() == "cells") {
-                    JSONObject cell = (JSONObject) stringObjectEntry2.getValue();
-                    if (jsonObject2.toString().contains("#{")) {
-
-                        for (int i = 0; i < split.length; i++) {
-                            JSONObject setParamJson = JSONObject.parseObject(setParam);
-
-                            String code = split[i];
-
-                            String newCode = String.format("#{%s", code);
-                            //  如果表达式包含具体code编码,进。否则不做处理
-                            if (jsonObject2.toString().contains(newCode) && StringUtils.isNotBlank(code)) {
-                                DataSetDto dto = new DataSetDto();
-                                dto.setSetCode(code);
-                                Map<String, Object> map = new HashMap<>();
-                                // 查询条件
-                                if (setParamJson.containsKey(code)) {
-                                    JSONObject paramCondition = setParamJson.getJSONObject(code);
-                                    paramCondition.entrySet().forEach(item -> map.put(item.getKey(), item.getValue()));
-                                }
-
-                                dto.setContextData(map);
-                                OriginalDataDto originalDataDto = dataSetService.getData(dto);
-                                dataSetMap.clear();
-                                List<JSONObject> list = (List<JSONObject>) JSONObject.toJSON(originalDataDto.getData());
-                                dataSetMap.put("list", list);
-                                boolean flag = true;
-                                //仅拿到为cells的json  ,目前推拽有问题,会存在 列为-1 ,排除掉不解析
-                                for (Map.Entry<String, Object> objectEntry : cell.entrySet()) {
-                                    JSONObject object = (JSONObject) objectEntry.getValue();
-                                    for (Map.Entry<String, Object> stringObjectEntry : object.entrySet()) {
-                                        if (stringObjectEntry.getKey().equals("-1")) {
-                                            flag = false;
-                                        }
-                                    }
-                                }
-                                if (flag) {
-                                    if (syntaxJsonObject.size() == 0) {
-                                        StringBuffer sb = new StringBuffer();
-                                        String str = jsonObject2.toString().replaceAll("#\\{", "\\${");
-                                        sb.append(String.format("{<#list list as %s> ", code));
-                                        sb.append(String.format("\"${%s_index+%s}\":%s,", code, integerListEntry.getKey(), str));
-                                        sb.append("</#list>");
-                                        sb.append("}");
-                                        logger.info("替换后的str: {}", sb);
-                                        String parseJsonStr = parseTemplate(sb.toString(), dataSetMap);
-                                        if (parseJsonStr.equals("{}")) {
-                                            syntaxJsonObject.putAll(isNullParseJson(jsonObject2, newCode, syntaxJsonObject.size(), integerListEntry.getKey(), 0));
-                                        } else {
-                                            syntaxJsonObject.putAll(JSONObject.parseObject(parseJsonStr, Feature.OrderedField));
-                                        }
-                                    } else {
-                                        StringBuffer sb = new StringBuffer();
-                                        String str = jsonObject2.toString().replaceAll("#\\{", "\\${").replaceAll("\\\\n", "");
-                                        sb.append(String.format("{<#list list as %s> ", code));
-                                        sb.append(String.format("\"${%s_index+%s}\":%s,", code, syntaxJsonObject.size() + integerListEntry.getKey() - count, str));
-                                        sb.append("</#list>");
-                                        sb.append("}");
-                                        logger.info("替换后的str: {}", sb);
-                                        String parseJsonStr = parseTemplate(sb.toString(), dataSetMap);
-                                        syntaxJsonObject.putAll(JSONObject.parseObject(parseJsonStr, Feature.OrderedField));
-                                        // 如果查出来没有数据,会被替换为 {} ,不能put到  syntaxJsonObject,就会少一行,不操作count
-                                        if (parseJsonStr.equals("{}")) {
-                                            syntaxJsonObject.putAll(isNullParseJson(jsonObject2, newCode, syntaxJsonObject.size(), integerListEntry.getKey(), count));
-                                        } else {
-                                            syntaxJsonObject.putAll(JSONObject.parseObject(parseJsonStr, Feature.OrderedField));
-                                        }
-                                        count++;
-                                    }
-                                }
-                            }
-                        }
-                        // 存在 函数表达式
-                    } else if (!CollectionUtils.isEmpty(ExpConstant.getExpFunction(jsonObject2.toString()))) {
-                        // 函数下标集合
-                        List<Integer> indexs = ExpConstant.getExpFunction(jsonObject2.toString());
-                        for (Integer index : indexs) {
-                            // 函数值
-                            String exp = ExpConstant.FUNCTION[index];
-
-                            List<BigDecimal> bigDecimalList = new ArrayList<>();
-                            for (Map.Entry<String, Object> entryHanShu : jsonObject2.entrySet()) {
-                                JSONObject jb3 = (JSONObject) entryHanShu.getValue();
-                                for (Map.Entry<String, Object> entry4 : jb3.entrySet()) {
-                                    // 得到最下面的   {"style":1,"text":"=SUM(A3)"}
-                                    JSONObject cellJson = (JSONObject) entry4.getValue();
-                                    if (cellJson.containsKey("text")) {
-                                        if (StringUtils.isNotBlank(cellJson.get("text").toString()) && cellJson.get("text").toString().contains(exp)) {
-                                            for (Map.Entry<String, Object> rowsJson : syntaxJsonObject.entrySet()) {
-                                                // 拿到一行 中的cells
-                                                JSONObject rowsJsonToCells = (JSONObject) JSONObject.parseObject(rowsJson.getValue().toString()).get("cells");
-                                                if (rowsJsonToCells.containsKey(entry4.getKey())) {
-                                                    JSONObject textJson = (JSONObject) rowsJsonToCells.get(entry4.getKey());
-                                                    if (textJson.containsKey("text")) {
-                                                        // 列值。
-                                                        String value = textJson.get("text").toString();
-                                                        try {
-                                                            bigDecimalList.add(new BigDecimal(value));
-                                                        } catch (Exception exception) {
-                                                            logger.info("函数计算错误,错误列{}、值{}", entry4, value);
-                                                        }
-                                                    }
-                                                }
-                                            }
-                                            if (!CollectionUtils.isEmpty(bigDecimalList)) {
-                                                switch (exp) {
-                                                    case "=MIN(":
-                                                        Optional<BigDecimal> min = bigDecimalList.stream().min((o1, o2) -> o1.compareTo(o2));
-                                                        cellJson.replace("text", cellJson.get("text"), min.get() + "");
-                                                        break;
-                                                    case "=MAX(":
-                                                        Optional<BigDecimal> max = bigDecimalList.stream().max((o1, o2) -> o1.compareTo(o2));
-                                                        cellJson.replace("text", cellJson.get("text"), max.get() + "");
-                                                        break;
-                                                    case "=SUM(":
-                                                        BigDecimal sums = bigDecimalList.stream().reduce(BigDecimal.ZERO, BigDecimal::add);
-                                                        cellJson.replace("text", cellJson.get("text"), sums + "");
-                                                        break;
-                                                    case "=AVERAGE(":
-                                                        OptionalDouble average = bigDecimalList.stream().mapToDouble(BigDecimal::doubleValue).average();
-                                                        cellJson.replace("text", cellJson.get("text"), average.getAsDouble() + "");
-                                                        break;
-                                                    default:
-                                                        break;
-                                                }
-                                            } else {
-                                                cellJson.replace("text", cellJson.get("text"), "");
-                                            }
-                                        }
-                                    }
-                                }
-                            }
-
-                        }
-                        if (syntaxJsonObject.size() == 0) {
-                            syntaxJsonObject.put(integerListEntry.getKey() + "", jsonObject2);
-                        } else {
-                            syntaxJsonObject.put(syntaxJsonObject.size() + integerListEntry.getKey() - count + "", jsonObject2);
-                            count++;
-                        }
-                    } else {
-
-                        if (count == 1 && syntaxJsonObject.size() == 0) {
-                            syntaxJsonObject.put(integerListEntry.getKey() + "", jsonObject2);
-                        } else {
-                            syntaxJsonObject.put(syntaxJsonObject.size() + integerListEntry.getKey() - count + "", jsonObject2);
-                            count++;
-                        }
-                    }
-                }
-            }
-        }
-
-    }
-
-    /**
-     * 解析的表达式未null 即 {}
-     *
-     * @param jsonObject 本行json
-     * @param newCode    表达式编码
-     * @param syntax     存储解析后的json大小
-     * @param entryNum   本次循环的num
-     * @param count
-     * @return
-     */
-    public static JSONObject isNullParseJson(JSONObject jsonObject, String newCode, Integer syntax, Integer entryNum, int count) {
-        JSONObject cellsJson = jsonObject.getJSONObject("cells");
-        for (Map.Entry<String, Object> entry : cellsJson.entrySet()) {
-            JSONObject elementJson = JSONObject.parseObject(entry.getValue().toString());
-            if (elementJson.containsKey("text")) {
-                String text = (String) elementJson.get("text");
-                if (text.contains(newCode)) {
-                    elementJson.put("text", "");
-                }
-            }
-            cellsJson.put(entry.getKey(), elementJson);
-        }
-        jsonObject.put("cells", cellsJson);
-        JSONObject newJson = new JSONObject();
-        newJson.put(String.valueOf((syntax + entryNum - count)), jsonObject);
-        return newJson;
-    }
-
-    /**
-     * 报表格式化解析
-     *
-     * @param templateValue
-     * @param maps
-     * @return
-     */
-    private static String parseTemplate(String templateValue, Map<String, Object> maps) {
-        try {
-            Configuration configuration = new Configuration();
-            configuration.setNumberFormat("#.#########");
-            configuration.setClassicCompatible(true);
-            StringWriter writer = new StringWriter();
-            Template template = new Template("template", new StringReader(templateValue), configuration);
-            template.process(maps, writer);
-            return writer.toString();
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    public static void main(String[] args) {
-        String str = "{\"sheet\":[{\"name\":\"sheet2\",\"freeze\":\"A1\",\"styles\":[{\"valign\":\"top\"}],\"merges\":[],\"rows\":{\"0\":{\"cells\":{\"0\":{\"text\":{\"type\":\"QRCode\",\"content\":\"http://gaea.anji-plus.com\",\"width\":125,\"height\":125,\"ri\":0,\"ci\":0},\"style\":0}},\"height\":163},\"len\":100},\"cols\":{\"len\":20},\"validations\":[],\"autofilter\":{}}]}";
-
-        // 取第一个sheet
-        JSONObject jsonObject = JSONObject.parseObject(str);
-//        XSSFWorkbook workbook = new XSSFWorkbook();
-//        XSSFSheet sheet = workbook.createSheet();
-        try {
-            exportExcel(jsonObject);
-//            makePhoto(jsonArray , workbook , sheet);
-//            workbook.write(new FileOutputStream("E:\\excel\\e\\dsad.xlsx"));
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-
-    }
-
-    public static Map<String, Object> exportExcel(JSONObject a) {
-//        JSONObject jsonObject = JSONObject.parseObject(result.getJsonStr());
-        JSONObject jsonObject = a.getJSONArray("sheet").getJSONObject(0);
-        JSONObject rows = jsonObject.getJSONObject("rows");
-        JSONObject cols = jsonObject.getJSONObject("cols");
-        if (cols.containsKey("len")) {
-            cols.remove("len");
-        }
-        EscherClientAnchorRecord escherClientAnchorRecord;
-
-        if (rows.containsKey("-1")) {
-            rows.remove("-1");
-        }
-//        JSONArray photos = jsonObject.getJSONArray("QRCodeOrBarCode");
-        // 所有的样式数组。
-        JSONArray styles = jsonObject.getJSONArray("styles");
-
-//        1.创建一个工作簿
-        XSSFWorkbook workbook = new XSSFWorkbook();
-
-
-//        2.创建一个工作表
-        XSSFSheet sheet = workbook.createSheet("news");
-        try {
-            sheet.autoSizeColumn(1, true);
-            // 设置默认列宽
-            sheet.setDefaultColumnWidth(12);
-            sheet.setDefaultRowHeight((short) 360);
-            Iterator<String> colsIte = cols.keySet().iterator();
-            while (colsIte.hasNext()) {
-                String next = colsIte.next();   //列
-                JSONObject colStyle = cols.getJSONObject(next);
-                if (colStyle.containsKey("width")) {
-                    // 自定义 width * 32
-                    sheet.setColumnWidth(Integer.parseInt(next), colStyle.getInteger("width") * 30);
-                }
-            }
-
-//            if (photos != null) {
-//                // make photo
-//                makePhoto(photos, workbook, sheet);
-//            }
-            for (Map.Entry<String, Object> entry : rows.entrySet()) {
-                if (!entry.getKey().contains("len")) {
-
-                    // 创建一行
-                    Row row = sheet.createRow(Integer.parseInt(entry.getKey()));
-                    JSONObject jsonObject1 = (JSONObject) entry.getValue();
-
-                    //设置行高
-                    if (jsonObject1.containsKey("height")) {
-                        int height = (int) jsonObject1.get("height");
-                        row.setHeight((short) (height * 14.7));
-                    }
-                    // cells 获取到一行
-                    JSONObject cells = (JSONObject) jsonObject1.get("cells");
-                    if (cells.containsKey("-1")) {
-                        cells.remove("-1");
-                    }
-
-                    setCellStyle(cells, workbook , sheet , styles, row);
-
-                }
-            }
-
-            Iterator<String> iterator = rows.keySet().iterator();
-            while (iterator.hasNext()) {
-                String rownum = iterator.next();    //行
-                if (rownum.equals("len")) {
-                    continue;
-                }
-                JSONObject cells = rows.getJSONObject(rownum).getJSONObject("cells");
-                if (cells == null) {
-                    continue;
-                } else {
-                    Iterator<String> cellsIte = cells.keySet().iterator();
-                    while (cellsIte.hasNext()) {
-                        String cellnum = cellsIte.next();    //列
-                        JSONObject cellJSON = cells.getJSONObject(cellnum);
-                        if (cellJSON != null) {
-                            if (cellJSON.containsKey("merge")) {
-                                List<Integer> list = (List<Integer>) cellJSON.get("merge");
-//                        // 起始行, 终止行, 起始列, 终止列
-                                CellRangeAddress cra = new CellRangeAddress(Integer.parseInt(rownum), Integer.parseInt(rownum) + list.get(0), Integer.parseInt(cellnum), Integer.parseInt(cellnum) + list.get(1));
-                                sheet.addMergedRegion(cra);
-
-
-                                if (cellJSON.containsKey("style")) {
-                                    int style = (int) cellJSON.get("style");
-                                    JSONObject jsonObject4 = (JSONObject) styles.get(style);
-                                    if (jsonObject4.containsKey("border")) {
-                                        JSONObject borders = (JSONObject) jsonObject4.get("border");
-
-                                        Iterator<String> borderIterator = borders.keySet().iterator();
-                                        while (borderIterator.hasNext()) {
-                                            String borderSide = borderIterator.next();
-                                            // 设置单元格的边框
-                                            switch (borderSide) {
-                                                case "top":
-                                                    JSONArray top = borders.getJSONArray("top");
-                                                    // 上边框
-                                                    RegionUtil.setBorderTop(BorderStyle.valueOf(top.get(0).toString().toUpperCase()).getCode(), cra, sheet);
-                                                case "left":
-                                                    JSONArray left = borders.getJSONArray("left");
-                                                    // 左边框
-                                                    RegionUtil.setBorderLeft(BorderStyle.valueOf(left.get(0).toString().toUpperCase()).getCode(), cra, sheet);
-                                                case "bottom":
-                                                    JSONArray bottom = borders.getJSONArray("bottom");
-                                                    // 下边框
-                                                    RegionUtil.setBorderBottom(BorderStyle.valueOf(bottom.get(0).toString().toUpperCase()).getCode(), cra, sheet);
-                                                case "right":
-                                                    JSONArray right = borders.getJSONArray("right");
-                                                    // 右边框
-                                                    RegionUtil.setBorderRight(BorderStyle.valueOf(right.get(0).toString().toUpperCase()).getCode(), cra, sheet);
-                                                default:
-                                                    break;
-                                            }
-                                        }
-                                    }
-                                }
-
-                            }
-                        }
-
-                    }
-                }
-            }
-
-
-
-
-            String fileName = (new SimpleDateFormat("yyyyMMddHHmmss")).format(new Date());
-
-            FileOutputStream fos = new FileOutputStream("E:\\excel\\e\\" + fileName + ".xlsx");
-            workbook.write(fos);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    public static Map<String, Object> exportExcel(ReportExcelDto result) {
-        // 取第一个sheet
-//        JSONObject jsonObject = JSONObject.parseObject(result.getJsonStr(), Feature.OrderedField).getJSONArray("sheet").getJSONObject(0);
-        JSONObject jsonObject = JSONObject.parseObject(result.getJsonStr());
-//        jsonObject.put("QRCodeOrBarCode", "[\n" +
-//                "        {\n" +
-//                "            \"type\": \"QRCode\",\n" +
-//                "            \"content\": \"https://gaea.anji-plus.com\",\n" +
-//                "            \"height\": \"128\",\n" +
-//                "            \"width\": \"128\",\n" +
-//                "            \"backgroundColor\": \"#FFFFFF\",\n" +
-//                "            \"foregroundColor\": \"#000000\",\n" +
-//                "            \"ri\": 1,\n" +
-//                "            \"ci\": \"1\"\n" +
-//                "        },\n" +
-//                "        {\n" +
-//                "            \"type\": \"BarCode\",\n" +
-//                "            \"content\": \"6926557300360\",\n" +
-//                "            \"height\": \"50\",\n" +
-//                "            \"width\": \"450\",\n" +
-//                "            \"backgroundColor\": \"#FFFFFF\",\n" +
-//                "            \"foregroundColor\": \"#000000\",\n" +
-//                "            \"ri\": 1,\n" +
-//                "            \"ci\": \"1\"\n" +
-//                "        }\n" +
-//                "    ]");
-        JSONObject rows = (JSONObject) jsonObject.get("rows");
-        JSONObject cols = (JSONObject) jsonObject.get("cols");
-        if (cols.containsKey("len")) {
-            cols.remove("len");
-        }
-        if (rows.containsKey("-1")) {
-            rows.remove("-1");
-        }
-        JSONArray photos = jsonObject.getJSONArray("QRCodeOrBarCode");
-        // 所有的样式数组。
-        JSONArray styles = jsonObject.getJSONArray("styles");
-
-//        1.创建一个工作簿
-        XSSFWorkbook workbook = new XSSFWorkbook();
-
-
-//        2.创建一个工作表
-        XSSFSheet sheet = workbook.createSheet(result.getReportName());
-        try {
-            sheet.autoSizeColumn(1, true);
-            // 设置默认列宽
-            sheet.setDefaultColumnWidth(12);
-            Iterator<String> colsIte = cols.keySet().iterator();
-            while (colsIte.hasNext()) {
-                String next = colsIte.next();   //列
-                JSONObject colStyle = cols.getJSONObject(next);
-                if (colStyle.containsKey("width")) {
-                    // 自定义 width * 32
-                    sheet.setColumnWidth(Integer.parseInt(next), colStyle.getInteger("width") * 32);
-                }
-            }
-            for (Map.Entry<String, Object> entry : rows.entrySet()) {
-                if (!entry.getKey().contains("len")) {
-
-                    // 创建一行
-                    Row row = sheet.createRow(Integer.parseInt(entry.getKey()));
-                    JSONObject jsonObject1 = (JSONObject) entry.getValue();
-
-                    //设置行高
-                    if (jsonObject1.containsKey("height")) {
-                        int height = (int) jsonObject1.get("height");
-                        row.setHeight((short) (height * 14.7));
-                    } else {
-                        row.setHeight((short) 360);
-                    }
-                    // cells 获取到一行
-                    JSONObject cells = (JSONObject) jsonObject1.get("cells");
-                    if (cells.containsKey("-1")) {
-                        cells.remove("-1");
-                    }
-
-                    setCellStyle(cells, workbook, sheet , styles, row);
-
-                }
-            }
-
-            Iterator<String> iterator = rows.keySet().iterator();
-            while (iterator.hasNext()) {
-                String rownum = iterator.next();    //行
-                if (rownum.equals("len")) {
-                    continue;
-                }
-                JSONObject cells = rows.getJSONObject(rownum).getJSONObject("cells");
-                if (cells == null) {
-                    continue;
-                } else {
-                    Iterator<String> cellsIte = cells.keySet().iterator();
-                    while (cellsIte.hasNext()) {
-                        String cellnum = cellsIte.next();    //列
-                        JSONObject cellJSON = cells.getJSONObject(cellnum);
-                        if (cellJSON != null) {
-                            if (cellJSON.containsKey("merge")) {
-                                List<Integer> list = (List<Integer>) cellJSON.get("merge");
-//                        // 起始行, 终止行, 起始列, 终止列
-                                CellRangeAddress cra = new CellRangeAddress(Integer.parseInt(rownum), Integer.parseInt(rownum) + list.get(0), Integer.parseInt(cellnum), Integer.parseInt(cellnum) + list.get(1));
-                                sheet.addMergedRegion(cra);
-
-
-                                if (cellJSON.containsKey("style")) {
-                                    int style = (int) cellJSON.get("style");
-                                    JSONObject jsonObject4 = (JSONObject) styles.get(style);
-                                    if (jsonObject4.containsKey("border")) {
-                                        JSONObject borders = (JSONObject) jsonObject4.get("border");
-
-                                        Iterator<String> borderIterator = borders.keySet().iterator();
-                                        while (borderIterator.hasNext()) {
-                                            String borderSide = borderIterator.next();
-                                            // 设置单元格的边框
-                                            switch (borderSide) {
-                                                case "top":
-                                                    JSONArray top = borders.getJSONArray("top");
-                                                    // 上边框
-                                                    RegionUtil.setBorderTop(BorderStyle.valueOf(top.get(0).toString().toUpperCase()).getCode(), cra, sheet);
-                                                case "left":
-                                                    JSONArray left = borders.getJSONArray("left");
-                                                    // 左边框
-                                                    RegionUtil.setBorderLeft(BorderStyle.valueOf(left.get(0).toString().toUpperCase()).getCode(), cra, sheet);
-                                                case "bottom":
-                                                    JSONArray bottom = borders.getJSONArray("bottom");
-                                                    // 下边框
-                                                    RegionUtil.setBorderBottom(BorderStyle.valueOf(bottom.get(0).toString().toUpperCase()).getCode(), cra, sheet);
-                                                case "right":
-                                                    JSONArray right = borders.getJSONArray("right");
-                                                    // 右边框
-                                                    RegionUtil.setBorderRight(BorderStyle.valueOf(right.get(0).toString().toUpperCase()).getCode(), cra, sheet);
-                                                default:
-                                                    break;
-                                            }
-                                        }
-                                    }
-                                }
-
-                            }
-                        }
-
-                    }
-                }
-            }
-            Map<String, Object> map = new HashMap<>();
-            if (photos != null) {
-                // make photo
-                makePhoto(photos, workbook, sheet);
-            }
-            String fileName = result.getReportName() + (new SimpleDateFormat("yyyyMMddHHmmss")).format(new Date());
-
-            FileOutputStream fos = new FileOutputStream("E:\\excel\\e\\" + fileName + ".xlsx");
-            workbook.write(fos);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    /**
-     * @param cells    当前行每一列
-     * @param workbook
-     * @param styles   样式
-     * @param row      当前行
-     */
-    private static void setCellStyle(JSONObject cells, XSSFWorkbook workbook, XSSFSheet sheet ,JSONArray styles, Row row) {
-
-        for (Map.Entry<String, Object> entry2 : cells.entrySet()) {
-
-            XSSFCellStyle cellStyle = workbook.createCellStyle();
-            DataFormat df = workbook.createDataFormat();
-
-            JSONObject jsonObject3 = (JSONObject) entry2.getValue();
-            // 创建一列
-            Cell cell = row.createCell(Integer.parseInt(entry2.getKey()));
-            Object text = jsonObject3.get("text");
-            String cellValue = null;
-            if(text instanceof JSONObject){
-                JSONObject jsonObject = (JSONObject) text;
-                JSONArray jsonArray = new JSONArray();
-                jsonArray.add(jsonObject);
-                try {
-                    makePhoto(jsonArray , workbook , sheet );
-                } catch (Exception e) {
-                    logger.info("makePhoto error" , e);
-                }
-            } else if(text instanceof String){
-                cell = (Cell) text;
-                // 创建第 某行 第几个单元格
-                if (StringUtils.isNotBlank(cellValue)) {
-                    cell.setCellValue(cellValue);
-                    if (!CollectionUtils.isEmpty(ExpConstant.getExpFunction(cellValue))) {
-                        cell.setCellFormula(cellValue.substring(1));
-                        cellStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00"));
-                        cell.setCellType(CellType.FORMULA);
-                    }
-                }
-            }
-
-
-            if (StringUtils.isNotBlank(jsonObject3.getString("style"))) {
-                // 样式 id
-                int style = (int) jsonObject3.get("style");
-                JSONObject jsonObject4 = (JSONObject) styles.get(style);
-
-                if (!jsonObject4.containsKey("valign")) {
-                    cellStyle.setVerticalAlignment(VerticalAlignment.valueOf("CENTER"));
-                } else {
-                    String str1 = jsonObject4.getString("valign").toUpperCase();
-                    if ("MIDDLE".equals(str1)) {
-                        str1 = "CENTER";
-                    }
-                    cellStyle.setVerticalAlignment(VerticalAlignment.valueOf(str1));
-                }
-                // 设置局中
-                if (jsonObject4.containsKey("align")) {
-                    String align = (String) jsonObject4.get("align");
-                    cellStyle.setAlignment(HorizontalAlignment.valueOf(align.toUpperCase()));
-
-                }
-
-                //------------------------bgColor
-                if (jsonObject4.containsKey("bgcolor")) {
-
-                    String str1 = jsonObject4.getString("bgcolor");
-                    XSSFColor xSSFColor = new XSSFColor();
-                    if (str1.indexOf("#") != -1) {
-                        byte[] arrayOfByte = {(byte) Integer.parseInt(str1.substring(1, 3), 16), (byte) Integer.parseInt(str1.substring(3, 5), 16), (byte) Integer.parseInt(str1.substring(5, 7), 16)};
-                        xSSFColor.setRGB(arrayOfByte);
-                    }
-                    cellStyle.setFillForegroundColor(xSSFColor);
-                    cellStyle.setFillBackgroundColor(xSSFColor);
-                    cellStyle.setFillPattern(FillPatternType.BIG_SPOTS);
-                }
-
-
-                if (jsonObject4.containsKey("format")) {
-                    String format = (String) jsonObject4.get("format");
-                    if(text instanceof String){
-                        switch (format) {
-                            case "formula":
-                                // 函数
-                                cell.setCellType(CellType.FORMULA);
-                                break;
-                            case "rmb":
-                                //货币
-                                if (StringUtils.isNotBlank(cellValue)) {
-                                    try {
-
-                                        cell.setCellValue(Integer.parseInt(cellValue));
-                                        XSSFDataFormat xssfDataFormat = workbook.createDataFormat();
-                                        cellStyle.setDataFormat(xssfDataFormat.getFormat("¥#,##0_);\\[Red](¥#,##0)"));
-                                        cell.setCellStyle(cellStyle);
-                                    } catch (Exception e) {
-                                    }
-                                }
-                                break;
-                            case "number":
-                                // 数值
-                                if (StringUtils.isNotBlank(cellValue)) {
-
-                                    try {
-                                        cell.setCellValue(Integer.parseInt(cellValue));
-                                        cellStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00"));
-                                        cell.setCellStyle(cellStyle);
-
-                                    } catch (Exception e) {
-                                    }
-                                }
-                                break;
-                            case "date":
-
-                                break;
-                            case "date2":
-
-                                break;
-                            case "time":
-
-                                break;
-                            case "datetime":
-
-                                break;
-                            case "percent":
-                                //百分比
-                                if (StringUtils.isNotBlank(cellValue)) {
-
-                                    try {
-                                        cell.setCellValue(Integer.parseInt(cellValue) / 100);
-                                        cellStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00%"));
-                                        cell.setCellStyle(cellStyle);
-
-                                    } catch (Exception e) {
-                                    }
-                                }
-                                break;
-                            case "eur":
-                                //欧元
-                                if (StringUtils.isNotBlank(cellValue)) {
-//
-                                    try {
-
-                                        cell.setCellValue(Integer.parseInt(cellValue));
-                                        XSSFDataFormat xssfDataFormat = workbook.createDataFormat();
-                                        cellStyle.setDataFormat(xssfDataFormat.getFormat("€#,##0_);\\[Red](¥#,##0)"));
-                                        cell.setCellStyle(cellStyle);
-
-                                    } catch (Exception e) {
-                                    }
-                                }
-                                break;
-                            case "usd":
-                                //美元
-                                if (StringUtils.isNotBlank(cellValue)) {
-//
-                                    try {
-                                        cell.setCellValue(Integer.parseInt(cellValue));
-                                        XSSFDataFormat xssfDataFormat = workbook.createDataFormat();
-                                        cellStyle.setDataFormat(xssfDataFormat.getFormat("$#,##0_);\\[Red](¥#,##0)"));
-                                        cell.setCellStyle(cellStyle);
-
-                                    } catch (Exception e) {
-                                    }
-                                }
-                                break;
-                            default:
-                                cell.setCellType(CellType.STRING);
-
-                        }
-                    }
-                }
-//                ------------------------------border--------------------------
-                if (jsonObject4.containsKey("border")) {
-                    JSONObject borders = (JSONObject) jsonObject4.get("border");
-
-                    Iterator<String> borderIterator = borders.keySet().iterator();
-                    while (borderIterator.hasNext()) {
-                        String borderSide = borderIterator.next();
-                        // 设置单元格的边框
-                        switch (borderSide) {
-                            case "top":
-                                JSONArray top = borders.getJSONArray("top");
-                                tracingBorder(BorderStyle.valueOf(top.get(0).toString().toUpperCase()).getCode(), "top", cellStyle);
-                            case "left":
-                                JSONArray left = borders.getJSONArray("left");
-                                tracingBorder(BorderStyle.valueOf(left.get(0).toString().toUpperCase()).getCode(), "left", cellStyle);
-                            case "bottom":
-                                JSONArray bottom = borders.getJSONArray("bottom");
-                                tracingBorder(BorderStyle.valueOf(bottom.get(0).toString().toUpperCase()).getCode(), "bottom", cellStyle);
-                            case "right":
-                                JSONArray right = borders.getJSONArray("right");
-                                tracingBorder(BorderStyle.valueOf(right.get(0).toString().toUpperCase()).getCode(), "right", cellStyle);
-                        }
-                    }
-                }
-
-                if (jsonObject4.containsKey("font") || jsonObject4.containsKey("underline") || jsonObject4.containsKey("strike") || jsonObject4.containsKey("color")) {
-                    XSSFFont xSSFFont = workbook.createFont();
-
-                    //------------------------------font--------------------------
-                    JSONObject fontObj = (JSONObject) jsonObject4.get("font");
-                    Object object1 = jsonObject4.get("underline");
-                    Object object2 = jsonObject4.get("strike");
-                    if (null != fontObj) {
-                        if (fontObj.containsKey("name")) {
-                            xSSFFont.setFontName(fontObj.getString("name"));
-                        }
-                        if (fontObj.containsKey("italic")) {
-                            xSSFFont.setItalic(true);
-                        }
-                        if (fontObj.containsKey("size")) {
-                            xSSFFont.setFontHeightInPoints(fontObj.getShort("size").shortValue());
-                        }
-                        if (fontObj.containsKey("bold")) {
-                            boolean bool = fontObj.getBoolean("bold").booleanValue();
-                            xSSFFont.setBold(bool);
-                        }
-                    }
-
-                    if (null != object1) {
-                        xSSFFont.setUnderline((byte) 1);
-                    }
-                    if (null != object2) {
-                        xSSFFont.setStrikeout(true);
-                    }
-
-                    //------------------------------color--------------------------
-                    if (jsonObject4.containsKey("color")) {
-                        String colorStr = jsonObject4.getString("color");
-                        XSSFColor xssfColor = new XSSFColor();
-
-                        if (colorStr.length() > 6) {
-                            if (colorStr.contains("rgb")) {
-                                colorStr = colorStr.replace("rgb", "").replace("(", "").replace(")", "");
-                                String[] arrayOfString = colorStr.split(",");
-                                if (arrayOfString.length == 3) {
-                                    byte[] arrayOfByte = {(byte) Integer.parseInt(arrayOfString[0]), (byte) Integer.parseInt(arrayOfString[1]), (byte) Integer.parseInt(arrayOfString[2])};
-                                    xssfColor.setRGB(arrayOfByte);
-                                }
-                            } else if (colorStr.contains("#")) {
-                                byte[] arrayOfByte = {(byte) Integer.parseInt(colorStr.substring(1, 3), 16), (byte) Integer.parseInt(colorStr.substring(3, 5), 16), (byte) Integer.parseInt(colorStr.substring(5, 7), 16)};
-                                xssfColor.setRGB(arrayOfByte);
-                            }
-                        }
-                        xSSFFont.setColor(xssfColor);
-                    }
-                    cellStyle.setFont(xSSFFont);
-
-                }
-                cellStyle.setWrapText(true);
-                cell.setCellStyle((cellStyle));
-
-            }
-
-
-        }
-    }
-
-
-    /**
-     * @param borderCode BordetStyle 枚举值
-     * @param border     top、right、bottom 、left
-     * @param cellStyle
-     */
-    public static void tracingBorder(int borderCode, String border, XSSFCellStyle cellStyle) {
-
-        switch (borderCode) {
-            case 0:
-                switch (border) {
-                    case "top":
-                        cellStyle.setBorderTop(BorderStyle.NONE);
-                        break;
-                    case "left":
-                        cellStyle.setBorderLeft(BorderStyle.NONE);
-                        break;
-                    case "bottom":
-                        cellStyle.setBorderBottom(BorderStyle.NONE);
-                        break;
-                    case "right":
-                        cellStyle.setBorderRight(BorderStyle.NONE);
-                        break;
-                    default:
-                        break;
-                }
-                break;
-            case 1:
-                switch (border) {
-                    case "top":
-                        cellStyle.setBorderTop(BorderStyle.THIN);
-                        break;
-                    case "left":
-                        cellStyle.setBorderLeft(BorderStyle.THIN);
-                        break;
-                    case "bottom":
-                        cellStyle.setBorderBottom(BorderStyle.THIN);
-                        break;
-                    case "right":
-                        cellStyle.setBorderRight(BorderStyle.THIN);
-                        break;
-                    default:
-                        break;
-                }
-                break;
-            case 2:
-                switch (border) {
-                    case "top":
-                        cellStyle.setBorderTop(BorderStyle.MEDIUM);
-                        break;
-                    case "left":
-                        cellStyle.setBorderLeft(BorderStyle.MEDIUM);
-                        break;
-                    case "bottom":
-                        cellStyle.setBorderBottom(BorderStyle.MEDIUM);
-                        break;
-                    case "right":
-                        cellStyle.setBorderRight(BorderStyle.MEDIUM);
-                        break;
-                    default:
-                        break;
-                }
-                break;
-            case 3:
-                switch (border) {
-                    case "top":
-                        cellStyle.setBorderTop(BorderStyle.DASHED);
-                        break;
-                    case "left":
-                        cellStyle.setBorderLeft(BorderStyle.DASHED);
-                        break;
-                    case "bottom":
-                        cellStyle.setBorderBottom(BorderStyle.DASHED);
-                        break;
-                    case "right":
-                        cellStyle.setBorderRight(BorderStyle.DASHED);
-                        break;
-                    default:
-                        break;
-                }
-                break;
-            case 4:
-                cellStyle.setBorderBottom(BorderStyle.DOTTED);
-                break;
-            case 5:
-                cellStyle.setBorderBottom(BorderStyle.THICK);
-                break;
-            case 6:
-                cellStyle.setBorderBottom(BorderStyle.DOUBLE);
-                break;
-            case 7:
-                cellStyle.setBorderBottom(BorderStyle.HAIR);
-                break;
-            case 8:
-                cellStyle.setBorderBottom(BorderStyle.MEDIUM_DASHED);
-                break;
-            case 9:
-                cellStyle.setBorderBottom(BorderStyle.DASH_DOT);
-                break;
-            case 10:
-                cellStyle.setBorderBottom(BorderStyle.MEDIUM_DASH_DOT);
-                break;
-            case 11:
-                cellStyle.setBorderBottom(BorderStyle.DASH_DOT_DOT);
-                break;
-            case 12:
-                cellStyle.setBorderBottom(BorderStyle.MEDIUM_DASH_DOT_DOT);
-                break;
-            case 13:
-                cellStyle.setBorderBottom(BorderStyle.SLANTED_DASH_DOT);
-                break;
-            default:
-                break;
-        }
-    }
-
-    /**
-     * 导出excel生成图片
-     * @param photos    图片数组
-     * @param workbook
-     * @param sheet
-     * @throws Exception
-     */
-    public static void makePhoto(JSONArray photos, Workbook workbook, XSSFSheet sheet) throws Exception {
-        ByteArrayOutputStream byteArrayOut = null;
-        for (int i = 0; i < photos.size(); i++) {
-            JSONObject qrCodeJson = (JSONObject) photos.get(i);
-
-            if(qrCodeJson.get("type").toString().equals("QRCode")){
-                // 二维码
-                byteArrayOut = QrCodeOrBarCodeUtil.encodeQRCode
-                        (qrCodeJson.getString("content"),  "", qrCodeJson.getInteger("width"), qrCodeJson.getInteger("height"));
-
-            }else if(qrCodeJson.get("type").toString().equals("BarCode")){
-                // 条形码
-                byteArrayOut = QrCodeOrBarCodeUtil.encodeBarCode
-                        (qrCodeJson.getString("content"),  qrCodeJson.getInteger("width"), qrCodeJson.getInteger("height"));
-
-            }
-
-            XSSFRow row = null;
-            if(sheet.getRow(qrCodeJson.getInteger("ri")) == null){
-                row = sheet.createRow(qrCodeJson.getInteger("ri"));
-                row.setHeight((short) 360);
-            } else {
-                row = sheet.getRow(qrCodeJson.getInteger("ri"));
-            }
-
-            // 原图片宽高。
-            double imageWidth = qrCodeJson.getInteger("width");
-            double imageHeight = qrCodeJson.getInteger("height");
-
-            // 列宽像素
-            double cellWidth = sheet.getColumnWidthInPixels(qrCodeJson.getInteger("ci"));
-            // getHeightInPoints()方法获取的是点(磅),就是excel设置的行高,1英寸有72磅,一般显示屏一英寸是96个像素: 行高像素
-            double cellHeight = row.getHeightInPoints() / 72 * 96;
-
-            // 图片宽 / 列宽
-            double cellWidthD = imageWidth / cellWidth;
-            int cellWidthI= (int) cellWidthD;
-
-            // 图片高 / 列高
-            double rowHeightD = imageHeight / cellHeight;
-            int rowHeightDI = (int) rowHeightD;
-            //  1023、255 为宽高  此从第r行、c列开始 、、、 扩充到 r+rowHeightDI行、c+cellWidthI列
-//            XSSFClientAnchor anchor = new XSSFClientAnchor
-//                    (0,0,1025,255,
-//                            qrCodeJson.getInteger("ci"),
-//                            row.getRowNum(),
-//                            qrCodeJson.getInteger("ci")+ (cellWidthI == 0 ? 1 : cellWidthI),
-//                            row.getRowNum() + (rowHeightDI == 0 ? 1 : rowHeightDI));
-//            anchor.setAnchorType(ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE);
-//            //画图器    一个sheet只能一个
-            XSSFDrawing drawing = sheet.createDrawingPatriarch();
-//            drawing.createPicture(anchor , workbook.addPicture(byteArrayOut.toByteArray() , XSSFWorkbook.PICTURE_TYPE_PNG));
-
-
-            CreationHelper helper = workbook.getCreationHelper();
-            int jdpictureIdx = workbook.addPicture(byteArrayOut.toByteArray(), Workbook.PICTURE_TYPE_JPEG);// 根据需要调整参数,如果是PNG,就改为 Workbook.PICTURE_TYPE_PNG
-            // 插入图片,如果原图宽度大于最终要求的图片宽度,就按比例缩小,否则展示原图
-            ClientAnchor jdanchor = helper.createClientAnchor();
-            // 起始画图的行列。
-            jdanchor.setCol1(qrCodeJson.getInteger("ci"));
-            jdanchor.setRow1(row.getRowNum());
-            Picture pict = drawing.createPicture(jdanchor, jdpictureIdx);
-            pict.resize();
-        }
-    }
-}

+ 0 - 22
report-core/src/main/resources/mapper/ReportExcelMapper.xml

@@ -1,22 +0,0 @@
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.anjiplus.template.gaea.business.modules.reportexcel.dao.ReportExcelMapper">
-
-    <resultMap type="com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel" id="ReportMap">
-        <!--jdbcType="{column.columnType}"-->
-        <result property="id" column="id"  />
-        <result property="reportCode" column="report_code"  />
-        <result property="setCods" column="set_codes"  />
-        <result property="setParam" column="set_param"  />
-        <result property="jsonStr" column="json_str"  />
-        <result property="enableFlag" column="enable_flag"  />
-        <result property="deleteFlag" column="delete_flag"  />
-        <result property="createBy" column="create_by"  />
-        <result property="createTime" column="create_time"  />
-        <result property="updateBy" column="update_by"  />
-        <result property="updateTime" column="update_time"  />
-        <result property="version" column="version"  />
-
-    </resultMap>
-
-
-</mapper>

+ 2 - 2
report-ui/config/dev.env.js

@@ -4,6 +4,6 @@ const prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
-  // BASE_API: '"http://127.0.0.1:9095"'
-  BASE_API: '"http://10.108.26.197:9095"'
+  BASE_API: '"http://127.0.0.1:9095"'
+  // BASE_API: '"http://10.108.26.197:9095"'
 })

+ 43 - 39
report-ui/src/views/report/bigscreen/designer/form/customColorComponents.vue

@@ -1,60 +1,61 @@
 <template>
   <div>
-    <el-button type="primary"
-               icon="el-icon-plus"
-               plain
-               @click="handleAddClick">新增</el-button>
-    <el-table :data="formData"
-              style="width: 100%">
-      <el-table-column prop="color"
-                       label="颜色"
-                       align="center">
+    <el-button type="primary" icon="el-icon-plus" plain @click="handleAddClick"
+      >新增</el-button
+    >
+    <el-table :data="formData" style="width: 100%">
+      <el-table-column prop="color" label="颜色" align="center">
         <template slot-scope="scope">
-          <span class="color-box"
-                :style="{ background: scope.row.color }" />
+          <span class="color-box" :style="{ background: scope.row.color }" />
         </template>
       </el-table-column>
-      <el-table-column label="位置"
-                       align="center">
+      <el-table-column label="位置" align="center">
         <template slot-scope="scope">
-          <span class="editor"
-                @click="handleEditorClick(scope.$index, scope.row)">
+          <span
+            class="editor"
+            @click="handleEditorClick(scope.$index, scope.row)"
+          >
             <i class="el-icon-edit" /> 编辑
           </span>
         </template>
       </el-table-column>
-      <el-table-column label="操作"
-                       align="center">
+      <el-table-column label="操作" align="center">
         <template slot-scope="scope">
-          <span class="editor"
-                @click="handleDeleteClick(scope.$index, scope.row)">
+          <span
+            class="editor"
+            @click="handleDeleteClick(scope.$index, scope.row)"
+          >
             <i class="el-icon-delete" /> 删除
           </span>
         </template>
       </el-table-column>
     </el-table>
 
-    <el-dialog title="新增"
-               :visible.sync="dialogVisible"
-               width="30%"
-               :before-close="handleClose">
+    <el-dialog
+      title="新增"
+      :visible.sync="dialogVisible"
+      width="30%"
+      :before-close="handleClose"
+    >
       <el-form>
         <el-form-item label="颜色">
-          <el-input v-model="colorValue"
-                    style="width: 200px"
-                    placeholder="请输入颜色">
+          <el-input
+            v-model="colorValue"
+            style="width: 200px"
+            placeholder="请输入颜色"
+          >
             <template slot="append">
-              <el-color-picker v-model="colorValue"
-                               :predefine="predefineColors" />
+              <el-color-picker
+                v-model="colorValue"
+                :predefine="predefineColors"
+              />
             </template>
           </el-input>
         </el-form-item>
       </el-form>
-      <span slot="footer"
-            class="dialog-footer">
+      <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary"
-                   @click="handleSaveClick">确 定</el-button>
+        <el-button type="primary" @click="handleSaveClick">确 定</el-button>
       </span>
     </el-dialog>
   </div>
@@ -69,7 +70,7 @@ export default {
   props: {
     formData: Array
   },
-  data () {
+  data() {
     return {
       predefineColors: [
         "#ff4500",
@@ -86,21 +87,21 @@ export default {
       indexEditor: -1 // 编辑第几个数据
     };
   },
-  mounted () { },
+  mounted() {},
   methods: {
     // 弹出框关闭
-    handleClose () {
+    handleClose() {
       this.dialogVisible = false;
       this.colorValue = "";
     },
     // 新增
-    handleAddClick () {
+    handleAddClick() {
       this.colorValue = "";
       this.flag = true;
       this.dialogVisible = true;
     },
     // 确定
-    handleSaveClick () {
+    handleSaveClick() {
       if (this.flag) {
         // 新增
         const obj = {
@@ -114,17 +115,20 @@ export default {
         this.dialogVisible = false;
       }
       this.$emit("input", this.formData);
+      this.$emit("change", this.formData);
     },
     // 编辑
-    handleEditorClick (index, row) {
+    handleEditorClick(index, row) {
       this.flag = false;
       this.colorValue = row.color;
       this.dialogVisible = true;
       this.indexEditor = index;
     },
     // 删除
-    handleDeleteClick (index) {
+    handleDeleteClick(index) {
       this.formData.splice(index, 1);
+      this.$emit("input", this.formData);
+      this.$emit("change", this.formData);
     }
   }
 };

+ 1 - 1
report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue

@@ -1,4 +1,3 @@
-/* eslint-disable vue/valid-v-for */
 <!--
  * @Author: lide1202@hotmail.com
  * @Date: 2021-4-6 11:04:24
@@ -242,6 +241,7 @@
                   v-if="itemChildList.type == 'customColor'"
                   :key="'b-' + idx"
                   v-model="formData[itemChildList.name]"
+                  @change="changed($event, itemChildList.name)"
                 />
               </template>
             </el-collapse-item>

+ 374 - 0
report-ui/src/views/report/bigscreen/designer/tools.js

@@ -4466,6 +4466,380 @@ const widgetTools = [
   //   label: '中国地图',
   //   icon: 'chinaMapChart',
   // },
+  {
+    code: 'WidgetPieNightingaleRoseArea',
+    type: 'chart',
+    label: '饼图-南丁格尔-面积',
+    icon: 'iconicon_tubiao_bingtu',
+    options: {
+      // 配置
+      setup: [
+        {
+          type: 'el-input-text',
+          label: '图层名称',
+          name: 'layerName',
+          required: false,
+          placeholder: '',
+          value: '饼图',
+        },
+        {
+          type: 'vue-color',
+          label: '背景颜色',
+          name: 'background',
+          required: false,
+          placeholder: '',
+          value: ''
+        },
+        [
+          {
+            name: '标题设置',
+            list: [
+              {
+                type: 'el-switch',
+                label: '标题',
+                name: 'isNoTitle',
+                required: false,
+                placeholder: '',
+                value: true
+              },
+              {
+                type: 'el-input-text',
+                label: '标题',
+                name: 'titleText',
+                required: false,
+                placeholder: '',
+                value: ''
+              },
+              {
+                type: 'vue-color',
+                label: '字体颜色',
+                name: 'textColor',
+                required: false,
+                placeholder: '',
+                value: '#fff'
+              },
+              {
+                type: 'el-select',
+                label: '字体粗细',
+                name: 'textFontWeight',
+                required: false,
+                placeholder: '',
+                selectOptions: [
+                  { code: 'normal', name: '正常' },
+                  { code: 'bold', name: '粗体' },
+                  { code: 'bolder', name: '特粗体' },
+                  { code: 'lighter', name: '细体' }
+                ],
+                value: 'normal'
+              },
+              {
+                type: 'el-input-number',
+                label: '字体大小',
+                name: 'textFontSize',
+                required: false,
+                placeholder: '',
+                value: 20
+              },
+              {
+                type: 'el-select',
+                label: '字体位置',
+                name: 'textAlign',
+                required: false,
+                placeholder: '',
+                selectOptions: [
+                  { code: 'center', name: '居中' },
+                  { code: 'left', name: '左对齐' },
+                  { code: 'right', name: '右对齐' },
+                ],
+                value: 'left'
+              },
+              {
+                type: 'el-input-text',
+                label: '副标题',
+                name: 'subText',
+                required: false,
+                placeholder: '',
+                value: ''
+              },
+              {
+                type: 'vue-color',
+                label: '字体颜色',
+                name: 'subTextColor',
+                required: false,
+                placeholder: '',
+                value: ''
+              },
+              {
+                type: 'el-select',
+                label: '字体粗细',
+                name: 'subTextFontWeight',
+                required: false,
+                placeholder: '',
+                selectOptions: [
+                  { code: 'normal', name: '正常' },
+                  { code: 'bold', name: '粗体' },
+                  { code: 'bolder', name: '特粗体' },
+                  { code: 'lighter', name: '细体' }
+                ],
+                value: 'normal'
+              },
+              {
+                type: 'el-input-number',
+                label: '字体大小',
+                name: 'subTextFontSize',
+                required: false,
+                placeholder: '',
+                value: 12
+              },
+            ],
+          },
+          {
+            name: '数值设定',
+            list: [
+              {
+                type: 'el-switch',
+                label: '显示',
+                name: 'isShow',
+                required: false,
+                placeholder: '',
+                value: true,
+              },
+              {
+                type: 'el-switch',
+                label: '数值',
+                name: 'numberValue',
+                require: false,
+                placeholder: '',
+                value: true,
+              },
+              {
+                type: 'el-switch',
+                label: '百分比',
+                name: 'percentage',
+                require: false,
+                placeholder: '',
+                value: false,
+              },
+              {
+                type: 'el-input-number',
+                label: '字体大小',
+                name: 'fontSize',
+                required: false,
+                placeholder: '',
+                value: 14,
+              },
+              {
+                type: 'vue-color',
+                label: '字体颜色',
+                name: 'subTextColor',
+                required: false,
+                placeholder: '',
+                value: ''
+              },
+              {
+                type: 'el-select',
+                label: '字体粗细',
+                name: 'fontWeight',
+                required: false,
+                placeholder: '',
+                selectOptions: [
+                  { code: 'normal', name: '正常' },
+                  { code: 'bold', name: '粗体' },
+                  { code: 'bolder', name: '特粗体' },
+                  { code: 'lighter', name: '细体' }
+                ],
+                value: 'normal'
+              },
+            ],
+          },
+          {
+            name: '提示语设置',
+            list: [
+              {
+                type: 'el-input-number',
+                label: '字体大小',
+                name: 'fontSize',
+                required: false,
+                placeholder: '',
+                value: 12
+              },
+              {
+                type: 'vue-color',
+                label: '网格线颜色',
+                name: 'lineColor',
+                required: false,
+                placeholder: '',
+                value: ''
+              },
+            ],
+          },
+          {
+            name: '图例操作',
+            list: [
+              {
+                type: 'el-switch',
+                label: '图例',
+                name: 'isShowLegend',
+                required: false,
+                placeholder: '',
+                value: true,
+              },
+              {
+                type: 'vue-color',
+                label: '字体颜色',
+                name: 'lengedColor',
+                required: false,
+                placeholder: '',
+                value: '#fff',
+              },
+              {
+                type: 'el-input-text',
+                label: '字体大小',
+                name: 'lengedFontSize',
+                required: false,
+                placeholder: '',
+                value: 16,
+              },
+              {
+                type: 'el-input-number',
+                label: '图例宽度',
+                name: 'lengedWidth',
+                required: false,
+                placeholder: '',
+                value: 15,
+              },
+              {
+                type: 'el-select',
+                label: '横向位置',
+                name: 'lateralPosition',
+                required: false,
+                placeholder: '',
+                selectOptions: [
+                  { code: 'left', name: '左对齐' },
+                  { code: 'right', name: '右对齐' },
+                ],
+                value: ''
+              },
+              {
+                type: 'el-select',
+                label: '纵向位置',
+                name: 'longitudinalPosition',
+                required: false,
+                placeholder: '',
+                selectOptions: [
+                  { code: 'top', name: '顶部' },
+                  { code: 'bottom', name: '底部' },
+                ],
+                value: ''
+              },
+              {
+                type: 'el-select',
+                label: '布局前置',
+                name: 'layoutFront',
+                required: false,
+                placeholder: '',
+                selectOptions: [
+                  { code: 'vertical', name: '竖排' },
+                  { code: 'horizontal', name: '横排' },
+                ],
+                value: ''
+              },
+            ],
+          },
+          {
+            name: '自定义配色',
+            list: [
+              {
+                type: 'customColor',
+                label: '',
+                name: 'customColor',
+                required: false,
+                value: [{ color: '#ED0E0E' }, { color: '#6CCD17' }, { color: '#172CCD' }, { color: '#B817CD' }, { color: '#AFCD17' }],
+              },
+            ],
+          },
+        ],
+      ],
+      // 数据
+      data: [
+        {
+          type: 'el-radio-group',
+          label: '数据类型',
+          name: 'dataType',
+          require: false,
+          placeholder: '',
+          selectValue: true,
+          selectOptions: [
+            {
+              code: 'staticData',
+              name: '静态数据',
+            },
+            {
+              code: 'dynamicData',
+              name: '动态数据',
+            },
+          ],
+          value: 'staticData',
+        },
+        {
+          type: 'el-button',
+          label: '静态数据',
+          name: 'staticData',
+          required: false,
+          placeholder: 'px',
+          relactiveDom: 'dataType',
+          relactiveDomValue: 'staticData',
+          value: '[{"value": 1048,"name": "搜索引擎"},{"value": 735, "name": "直接访问"},{"value": 580, "name": "邮件营销"},{"value": 484,"name":"联盟广告"},{"value":300,"name":"视频广告"}]',
+        },
+        {
+          type: 'dycustComponents',
+          label: '',
+          name: 'dynamicData',
+          required: false,
+          placeholder: 'px',
+          relactiveDom: 'dataType',
+          chartType: 'widget-piechart',
+          relactiveDomValue: 'dynamicData',
+          value: '',
+        },
+      ],
+      // 坐标
+      position: [
+        {
+          type: 'el-input-number',
+          label: '左边距',
+          name: 'left',
+          required: false,
+          placeholder: 'px',
+          value: 0,
+        },
+        {
+          type: 'el-input-number',
+          label: '上边距',
+          name: 'top',
+          required: false,
+          placeholder: 'px',
+          value: 0,
+        },
+        {
+          type: 'el-input-number',
+          label: '宽度',
+          name: 'width',
+          required: false,
+          placeholder: '该容器在1920px大屏中的宽度',
+          value: 400,
+        },
+        {
+          type: 'el-input-number',
+          label: '高度',
+          name: 'height',
+          required: false,
+          placeholder: '该容器在1080px大屏中的高度',
+          value: 200,
+        },
+      ],
+    },
+  },
 ]
 
 const getToolByCode = function (code) {

+ 342 - 0
report-ui/src/views/report/bigscreen/designer/widget/pie/widgetPieNightingaleRoseArea.vue

@@ -0,0 +1,342 @@
+<template>
+  <div :style="styleObj">
+    <v-chart :options="options" autoresize/>
+  </div>
+</template>
+
+<script>
+import echarts from 'echarts';
+export default {
+  name: 'WidgetPieNightingaleRoseArea',  //南丁格尔玫瑰图面积模式 参考:https://echarts.apache.org/examples/zh/editor.html?c=pie-roseType-simple
+  components: {},
+  props: {
+    value: Object,
+    ispreview: Boolean,
+  },
+  data() {
+    return {
+      options: {
+        legend: {
+          top: 'bottom'
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            mark: {show: true},
+            dataView: {show: true, readOnly: false},
+            restore: {show: true},
+            saveAsImage: {show: true}
+          }
+        },
+        series: [
+          {
+            name: '面积模式',
+            type: 'pie',
+            radius: [50, 250],
+            center: ['50%', '50%'],
+            roseType: 'area',
+            itemStyle: {
+              borderRadius: 8
+            },
+            data: [
+              {value: 40, name: 'rose 1'},
+              {value: 38, name: 'rose 2'},
+              {value: 32, name: 'rose 3'},
+              {value: 30, name: 'rose 4'},
+              {value: 28, name: 'rose 5'},
+              {value: 26, name: 'rose 6'},
+              {value: 22, name: 'rose 7'},
+              {value: 18, name: 'rose 8'}
+            ]
+          }
+        ]
+      },
+      optionsStyle: {}, // 样式
+      optionsData: {}, // 数据
+      optionsSetup: {},
+    }
+  },
+  computed: {
+    styleObj() {
+      return {
+        position: this.ispreview ? 'absolute' : 'static',
+        width: this.optionsStyle.width + 'px',
+        height: this.optionsStyle.height + 'px',
+        left: this.optionsStyle.left + 'px',
+        top: this.optionsStyle.top + 'px',
+        background: this.optionsSetup.background,
+      }
+    },
+  },
+  watch: {
+    value: {
+      handler(val) {
+        console.log(val)
+        this.optionsStyle = val.position
+        this.optionsData = val.data
+        this.optionsCollapse = val.setup
+        this.optionsSetup = val.setup
+        this.editorOptions()
+      },
+      deep: true,
+    },
+  },
+  mounted() {
+    this.optionsStyle = this.value.position
+    this.optionsData = this.value.data
+    this.optionsCollapse = this.value.setup
+    this.optionsSetup = this.value.setup
+    this.editorOptions()
+  },
+  methods: {
+    // 修改图标options属性
+    editorOptions() {
+      this.setOptionsTitle()
+      // this.setOptionsX()
+      // this.setOptionsY()
+      // this.setOptionsTop()
+      // this.setOptionsTooltip()
+      // this.setOptionsMargin()
+      // this.setOptionsLegend()
+      // this.setOptionsColor()
+      this.setOptionsData()
+    },
+    // 标题修改
+    setOptionsTitle() {
+      const optionsCollapse = this.optionsSetup
+      const title = {}
+      title.text = optionsCollapse.titleText
+      title.show = optionsCollapse.isNoTitle
+      title.left = optionsCollapse.textAlign
+      title.textStyle = {
+        color: optionsCollapse.textColor,
+        fontSize: optionsCollapse.textFontSize,
+        fontWeight: optionsCollapse.textFontWeight,
+      }
+      title.subtext = optionsCollapse.subText
+      title.subtextStyle = {
+        color: optionsCollapse.subTextColor,
+        fontWeight: optionsCollapse.subTextFontWeight,
+        fontSize: optionsCollapse.subTextFontSize,
+      }
+
+      this.options.title = title
+    },
+    // X轴设置
+    setOptionsX() {
+      const optionsCollapse = this.optionsSetup
+      const xAxis = {
+        type: 'category',
+        show: optionsCollapse.hideX, // 坐标轴是否显示
+        name: optionsCollapse.xName, // 坐标轴名称
+        nameTextStyle: {
+          color: optionsCollapse.xNameColor,
+          fontSize: optionsCollapse.xNameFontSize,
+        },
+        nameRotate: optionsCollapse.textAngle, // 文字角度
+        inverse: optionsCollapse.reversalX, // 轴反转
+        axisLabel: {
+          show: true,
+          interval: optionsCollapse.textInterval, // 文字角度
+          rotate: optionsCollapse.textAngle, // 文字角度
+          textStyle: {
+            color: optionsCollapse.Xcolor, // x轴 坐标文字颜色
+            fontSize: optionsCollapse.fontSizeX,
+          },
+        },
+        axisLine: {
+          show: true,
+          lineStyle: {
+            color: '#fff',
+          },
+        },
+      }
+      this.options.xAxis = xAxis
+    },
+    // Y轴设置
+    setOptionsY() {
+      const optionsCollapse = this.optionsSetup
+      const yAxis = {
+        type: 'value',
+        show: optionsCollapse.isShowY, // 坐标轴是否显示
+        name: optionsCollapse.textNameY, // 坐标轴名称
+        nameTextStyle: {
+          color: optionsCollapse.NameColorY,
+          fontSize: optionsCollapse.NameFontSizeY,
+        },
+        inverse: optionsCollapse.reversalY, // 轴反转
+        axisLabel: {
+          show: true,
+          textStyle: {
+            color: optionsCollapse.colorY, // x轴 坐标文字颜色
+            fontSize: optionsCollapse.fontSizeY,
+          },
+        },
+        splitLine: {
+          show: false,
+        },
+        axisLine: {
+          show: true,
+          lineStyle: {
+            color: '#fff',
+          },
+        },
+      }
+
+      this.options.yAxis = yAxis
+    },
+    // 数值设定 or 柱体设置
+    setOptionsTop() {
+      const optionsCollapse = this.optionsSetup
+      const series = this.options.series
+
+      for (const key in series) {
+        if (series[key].type == 'bar') {
+          series[key].label = {
+            show: optionsCollapse.isShow,
+            position: 'top',
+            distance: 10,
+            fontSize: optionsCollapse.fontSize,
+            color: optionsCollapse.subTextColor,
+            fontWeight: optionsCollapse.fontWeight,
+          }
+          series[key].barWidth = optionsCollapse.maxWidth
+          series[key].barMinHeight = optionsCollapse.minHeight
+        }
+      }
+      this.options.series = series
+    },
+    // tooltip 设置
+    setOptionsTooltip() {
+      const optionsCollapse = this.optionsSetup
+      const tooltip = {
+        trigger: 'item',
+        show: true,
+        textStyle: {
+          color: optionsCollapse.lineColor,
+          fontSize: optionsCollapse.fontSize,
+        },
+      }
+      this.options.tooltip = tooltip
+    },
+    // 边距设置
+    setOptionsMargin() {
+      const optionsCollapse = this.optionsSetup
+      const grid = {
+        left: optionsCollapse.marginLeft,
+        right: optionsCollapse.marginRight,
+        bottom: optionsCollapse.marginBottom,
+        top: optionsCollapse.marginTop,
+        containLabel: true,
+      }
+      this.options.grid = grid
+    },
+    // 图例操作 legend
+    setOptionsLegend() {
+      const optionsCollapse = this.optionsSetup
+      const legend = this.options.legend
+      legend.show = optionsCollapse.isShowLegend
+      legend.left = optionsCollapse.lateralPosition == 'left' ? 0 : 'auto'
+      legend.right = optionsCollapse.lateralPosition == 'right' ? 0 : 'auto'
+      legend.top = optionsCollapse.longitudinalPosition == 'top' ? 0 : 'auto'
+      legend.bottom = optionsCollapse.longitudinalPosition == 'bottom' ? 0 : 'auto'
+      legend.orient = optionsCollapse.layoutFront
+      legend.textStyle = {
+        color: optionsCollapse.lengedColor,
+        fontSize: optionsCollapse.fontSize,
+      }
+      legend.itemWidth = optionsCollapse.lengedWidth
+    },
+    // 图例颜色修改
+    setOptionsColor() {
+      const optionsCollapse = this.optionsSetup
+      const customColor = optionsCollapse.customColor
+      if (!customColor) return
+      const arrColor = []
+      for (let i = 0; i < customColor.length; i++) {
+        arrColor.push(customColor[i].color)
+      }
+      const itemStyle = {
+        normal: {
+          color: (params) => {
+            return arrColor[params.dataIndex]
+          },
+          barBorderRadius: optionsCollapse.radius,
+        },
+      }
+      for (const key in this.options.series) {
+        if (this.options.series[key].type == 'bar') {
+          this.options.series[key].itemStyle = itemStyle
+        }
+      }
+      this.options = Object.assign({}, this.options)
+    },
+    // 数据解析
+    setOptionsData() {
+      const optionsSetup = this.optionsSetup
+      console.log(optionsSetup)
+      const optionsData = this.optionsData // 数据类型 静态 or 动态
+      console.log(optionsData)
+      optionsData.dataType == 'staticData' ? this.staticDataFn(optionsData.staticData, optionsSetup) : this.dynamicDataFn(optionsData.dynamicData, optionsSetup)
+    },
+    // 静态数据
+    staticDataFn(val, optionsSetup) {
+      const staticData = JSON.parse(val)
+      // x轴
+      if (optionsSetup.verticalShow) {
+        this.options.xAxis.data = []
+        this.options.yAxis.data = staticData.categories
+        this.options.xAxis.type = 'value'
+        this.options.yAxis.type = 'category'
+      } else {
+        this.options.xAxis.data = staticData.categories
+        this.options.yAxis.data = []
+        this.options.xAxis.type = 'category'
+        this.options.yAxis.type = 'value'
+      }
+      // series
+      const series = this.options.series
+      for (const i in series) {
+        if (series[i].type == 'bar') {
+          series[i].data = staticData.series[0].data
+        }
+      }
+    },
+    // 动态数据
+    dynamicDataFn(val, optionsSetup) {
+      console.log(val)
+      if (!val) return
+      // x轴
+      if (optionsSetup.verticalShow) {
+        this.options.xAxis.data = []
+        this.options.yAxis.data = val.xAxis
+        this.options.xAxis.type = 'value'
+        this.options.yAxis.type = 'category'
+      } else {
+        this.options.xAxis.data = val.xAxis
+        this.options.yAxis.data = []
+        this.options.xAxis.type = 'category'
+        this.options.yAxis.type = 'value'
+      }
+
+      // series
+      const series = this.options.series
+      for (const i in series) {
+        if (series[i].type == 'bar') {
+          series[i].data = val.series[i].data
+        }
+      }
+    },
+  },
+}
+</script>
+
+<style scoped lang="scss">
+.echarts {
+  width: 100%;
+  height: 100%;
+  min-width: 200px;
+  min-height: 200px;
+  overflow: hidden;
+}
+</style>

+ 3 - 3
report-ui/src/views/report/bigscreen/designer/widget/widget.vue

@@ -36,6 +36,7 @@ import WidgetPiechart from "./widgetPiechart.vue";
 import WidgetHollowPiechart from "./widgetHollowPiechart.vue";
 import WidgetFunnel from "./widgetFunnel.vue";
 import WidgetGauge from "./widgetGauge.vue";
+import WidgetPieNightingaleRoseArea from "./pie/widgetPieNightingaleRoseArea";
 export default {
   name: "Widget",
   components: {
@@ -54,7 +55,8 @@ export default {
     WidgetPiechart,
     WidgetHollowPiechart,
     WidgetFunnel,
-    WidgetGauge
+    WidgetGauge,
+    WidgetPieNightingaleRoseArea
   },
   model: {
     prop: "value",
@@ -101,11 +103,9 @@ export default {
   },
   mounted() {},
   methods: {
-    //获取焦点
     handleFocus({ index, left, top, width, height }) {
       // console.log(index, left, top, width, height);
     },
-    //失去焦点
     handleBlur({ index, left, top, width, height }) {
       this.$emit("onActivated", { index, left, top, width, height });
       this.$refs.draggable.setActive(true);

+ 2 - 2
report-ui/src/views/report/datasource/index.vue

@@ -88,13 +88,13 @@
                        label="数据源名称[编码]" />
       <el-table-column prop="sourceDesc"
                        label="数据源描述" />
-      <el-table-column prop="createByView"
+      <el-table-column prop="createBy"
                        label="创建人"
                        width="100" />
       <el-table-column prop="createTime"
                        label="创建时间"
                        width="140" />
-      <el-table-column prop="updateByView"
+      <el-table-column prop="updateBy"
                        label="修改人"
                        width="100" />
       <el-table-column prop="updateTime"

+ 4 - 4
report-ui/src/views/report/report/index.vue

@@ -43,7 +43,7 @@
                 :md="12"
                 :lg="6"
                 :xl="4">
-          <el-form-item label="报表类型" 
+          <el-form-item label="报表类型"
                         size="mini">
             <Dictionary v-model="params.reportType"
                         :updata-dict="params.reportType"
@@ -97,11 +97,11 @@
       </el-table-column> -->
       <el-table-column prop="reportDesc"
                        label="备注" />
-      <el-table-column prop="createByView"
+      <el-table-column prop="createBy"
                        label="创建人" />
       <el-table-column prop="createTime"
                        label="创建时间" />
-      <el-table-column prop="updateByView"
+      <el-table-column prop="updateBy"
                        label="更新人" />
       <el-table-column prop="updateTime"
                        label="更新时间" />
@@ -408,4 +408,4 @@ export default {
     },
   },
 }
-</script>
+</script>

+ 3 - 3
report-ui/src/views/report/resultset/index.vue

@@ -78,13 +78,13 @@
           <el-button @click="isShowCaseResult(scope.row)">查看</el-button>
         </template>
       </el-table-column>
-      <el-table-column prop="createByView"
+      <el-table-column prop="createBy"
                        width="100"
                        label="创建人" />
       <el-table-column prop="createTime"
                        width="140"
                        label="创建人" />
-      <el-table-column prop="updateByView"
+      <el-table-column prop="updateBy"
                        width="100"
                        label="更新人" />
       <el-table-column prop="updateTime"
@@ -390,7 +390,7 @@
   </div>
 </template>
 
-<script>  
+<script>
 import { queryAllDataSourceSet, verificationSet, testTransformSet, dataSetPreview, addDataSet, editDataSet, deleteDataSet, dataSetPageList } from '@/api/report'
 import Dictionary from '@/components/Dictionary/index'
 import { codemirror } from 'vue-codemirror' // 引入codeMirror全局实例