diff --git a/README.md b/README.md index c8aeffeb6b..448119d367 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

人人可用的开源数据可视化分析工具

License: GPL v2 - Codacy + Codacy Latest release Stars Downloads @@ -12,17 +12,17 @@ DataEase 是开源的数据可视化分析工具,帮助用户快速分析数 ### DataEase 的功能: -- 图表展示:支持 PC 端、移动端及大屏; -- 图表制作:支持丰富的图表类型(基于 Apache ECharts 实现)、支持拖拉拽方式快速制作仪表板; -- 数据引擎:支持直连模式、本地模式(基于 Apache Doris / Kettle 实现); -- 数据连接:支持关系型数据库、Excel 等文件、Hadoop 等大数据平台、NoSQL 等各种数据源。 +- 图表展示:支持 PC 端、移动端及大屏; +- 图表制作:支持丰富的图表类型(基于 Apache ECharts 实现)、支持拖拉拽方式快速制作仪表板; +- 数据引擎:支持直连模式、本地模式(基于 Apache Doris / Kettle 实现); +- 数据连接:支持关系型数据库、Excel 等文件、Hadoop 等大数据平台、NoSQL 等各种数据源。 ### DataEase 的优势: -- 开源开放:零门槛,线上快速获取和安装;快速获取用户反馈、按月发布新版本; -- 简单易用:极易上手,通过鼠标点击和拖拽即可完成分析; -- 秒级响应:集成 Apache Doris,超大数据量下秒级查询返回延时; -- 安全分享:支持多种数据分享方式,确保数据安全。 +- 开源开放:零门槛,线上快速获取和安装;快速获取用户反馈、按月发布新版本; +- 简单易用:极易上手,通过鼠标点击和拖拽即可完成分析; +- 秒级响应:集成 Apache Doris,超大数据量下秒级查询返回延时; +- 安全分享:支持多种数据分享方式,确保数据安全。 ## UI 展示 @@ -49,8 +49,8 @@ DataEase 是开源的数据可视化分析工具,帮助用户快速分析数 curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_start.sh | sh ``` -- [在线文档](https://dataease.io/docs/) -- [演示视频](https://dataease.oss-cn-hangzhou.aliyuncs.com/video/de-v1-demo.mp4) +- [在线文档](https://dataease.io/docs/) +- [演示视频](https://dataease.oss-cn-hangzhou.aliyuncs.com/video/de-v1-demo.mp4) ## 微信群 diff --git a/backend/src/main/java/io/dataease/auth/filter/JWTFilter.java b/backend/src/main/java/io/dataease/auth/filter/JWTFilter.java index 5f31bf8eea..1c45756a52 100644 --- a/backend/src/main/java/io/dataease/auth/filter/JWTFilter.java +++ b/backend/src/main/java/io/dataease/auth/filter/JWTFilter.java @@ -7,6 +7,7 @@ import io.dataease.auth.service.AuthUserService; import io.dataease.auth.util.JWTUtils; import io.dataease.commons.utils.CommonBeanFactory; import io.dataease.commons.utils.LogUtil; +import io.dataease.exception.DataEaseException; import io.dataease.i18n.Translator; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authc.AuthenticationException; @@ -95,7 +96,7 @@ public class JWTFilter extends BasicHttpAuthenticationFilter { AuthUserService authUserService = CommonBeanFactory.getBean(AuthUserService.class); SysUserEntity user = authUserService.getUserById(tokenInfo.getUserId()); if(user == null){ - throw new Exception(Translator.get("i18n_not_find_user")); + DataEaseException.throwException(Translator.get("i18n_not_find_user")); } String password = user.getPassword(); diff --git a/backend/src/main/java/io/dataease/auth/server/AuthServer.java b/backend/src/main/java/io/dataease/auth/server/AuthServer.java index 4be4f80693..ae1f33e357 100644 --- a/backend/src/main/java/io/dataease/auth/server/AuthServer.java +++ b/backend/src/main/java/io/dataease/auth/server/AuthServer.java @@ -14,6 +14,7 @@ import io.dataease.commons.utils.BeanUtils; import io.dataease.commons.utils.CodingUtil; import io.dataease.commons.utils.ServletUtils; +import io.dataease.exception.DataEaseException; import io.dataease.i18n.Translator; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; @@ -40,10 +41,10 @@ public class AuthServer implements AuthApi { SysUserEntity user = authUserService.getUserByName(username); if (ObjectUtils.isEmpty(user)) { - throw new RuntimeException(Translator.get("i18n_id_or_pwd_error")); + DataEaseException.throwException(Translator.get("i18n_id_or_pwd_error")); } if (user.getEnabled() == 0) { - throw new RuntimeException(Translator.get("i18n_id_or_pwd_error")); + DataEaseException.throwException(Translator.get("i18n_id_or_pwd_error")); } String realPwd = user.getPassword(); //私钥解密 @@ -52,7 +53,7 @@ public class AuthServer implements AuthApi { pwd = CodingUtil.md5(pwd); if (!StringUtils.equals(pwd, realPwd)) { - throw new RuntimeException(Translator.get("i18n_id_or_pwd_error")); + DataEaseException.throwException(Translator.get("i18n_id_or_pwd_error")); } Map result = new HashMap<>(); TokenInfo tokenInfo = TokenInfo.builder().userId(user.getUserId()).username(username).build(); diff --git a/backend/src/main/java/io/dataease/auth/util/JWTUtils.java b/backend/src/main/java/io/dataease/auth/util/JWTUtils.java index 1fa0a37f8f..7736983d55 100644 --- a/backend/src/main/java/io/dataease/auth/util/JWTUtils.java +++ b/backend/src/main/java/io/dataease/auth/util/JWTUtils.java @@ -7,6 +7,7 @@ import com.auth0.jwt.exceptions.JWTDecodeException; import com.auth0.jwt.interfaces.DecodedJWT; import io.dataease.auth.entity.TokenInfo; import io.dataease.commons.utils.CommonBeanFactory; +import io.dataease.exception.DataEaseException; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.core.env.Environment; @@ -50,7 +51,7 @@ public class JWTUtils { String username = jwt.getClaim("username").asString(); Long userId = jwt.getClaim("userId").asLong(); if (StringUtils.isEmpty(username) || ObjectUtils.isEmpty(userId) ){ - throw new RuntimeException("token格式错误!"); + DataEaseException.throwException("token格式错误!"); } TokenInfo tokenInfo = TokenInfo.builder().username(username).userId(userId).build(); return tokenInfo; diff --git a/backend/src/main/java/io/dataease/controller/LicenseController.java b/backend/src/main/java/io/dataease/controller/LicenseController.java index 160dc80d1b..0fa489a799 100644 --- a/backend/src/main/java/io/dataease/controller/LicenseController.java +++ b/backend/src/main/java/io/dataease/controller/LicenseController.java @@ -5,6 +5,7 @@ package io.dataease.controller; import com.google.gson.Gson; import io.dataease.commons.license.DefaultLicenseService; import io.dataease.commons.license.F2CLicenseResponse; +import io.dataease.exception.DataEaseException; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -35,11 +36,12 @@ public class LicenseController { return ResultHolder.success(null); case expired: String expired = f2CLicenseResponse.getLicense().getExpired(); - throw new Exception("License has expired since " + expired + ", please update license."); + DataEaseException.throwException("License has expired since " + expired + ", please update license."); case invalid: - throw new Exception(f2CLicenseResponse.getMessage()); + DataEaseException.throwException(f2CLicenseResponse.getMessage()); default: - throw new Exception("Invalid License."); + DataEaseException.throwException("Invalid License."); } + return new ResultHolder(); } } diff --git a/backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java b/backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java index 3dd744e673..e2d759c838 100644 --- a/backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java +++ b/backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java @@ -7,6 +7,7 @@ import io.dataease.datasource.dto.MysqlConfigration; import io.dataease.datasource.dto.SqlServerConfigration; import io.dataease.datasource.dto.TableFiled; import io.dataease.datasource.request.DatasourceRequest; +import io.dataease.exception.DataEaseException; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; @@ -31,9 +32,9 @@ public class JdbcProvider extends DatasourceProvider { ResultSet rs = stat.executeQuery(datasourceRequest.getQuery()); list = fetchResult(rs); } catch (SQLException e) { - throw new Exception("ERROR:" + e.getMessage(), e); + DataEaseException.throwException(e); } catch (Exception e) { - throw new Exception("ERROR:" + e.getMessage(), e); + DataEaseException.throwException(e); } finally { if(connection != null){ connection.close(); @@ -50,9 +51,9 @@ public class JdbcProvider extends DatasourceProvider { Boolean result = stat.execute(datasourceRequest.getQuery()); stat.close(); } catch (SQLException e) { - throw new Exception("ERROR:" + e.getMessage(), e); + DataEaseException.throwException(e); } catch (Exception e) { - throw new Exception("ERROR:" + e.getMessage(), e); + DataEaseException.throwException(e); } finally { if(connection != null){ connection.close(); @@ -70,14 +71,15 @@ public class JdbcProvider extends DatasourceProvider { rs = stat.executeQuery(datasourceRequest.getQuery()); return fetchResult(rs); } catch (SQLException e) { - throw new Exception("ERROR:" + e.getMessage(), e); + DataEaseException.throwException(e); } catch (Exception e) { - throw new Exception("ERROR:" + e.getMessage(), e); + DataEaseException.throwException(e); } finally { if(connection != null){ connection.close(); } } + return new ArrayList<>(); } private List fetchResult(ResultSet rs) throws Exception { @@ -112,14 +114,15 @@ public class JdbcProvider extends DatasourceProvider { rs = stat.executeQuery(datasourceRequest.getQuery()); return fetchResultField(rs); } catch (SQLException e) { - throw new Exception("ERROR:" + e.getMessage(), e); + DataEaseException.throwException(e); } catch (Exception e) { - throw new Exception("ERROR:" + e.getMessage(), e); + DataEaseException.throwException(e); } finally { if(connection != null){ connection.close(); } } + return new ArrayList<>(); } @Override @@ -139,14 +142,15 @@ public class JdbcProvider extends DatasourceProvider { result.put("fieldList", fieldList); return result; } catch (SQLException e) { - throw new Exception("ERROR:" + e.getMessage(), e); + DataEaseException.throwException(e); } catch (Exception e) { - throw new Exception("ERROR:" + e.getMessage(), e); + DataEaseException.throwException(e); } finally { if(connection != null){ connection.close(); } } + return new HashMap<>(); } private List fetchResultField(ResultSet rs) throws Exception { @@ -183,12 +187,13 @@ public class JdbcProvider extends DatasourceProvider { statement.close(); return tables; } catch (Exception e) { - throw new Exception("ERROR: " + e.getMessage(), e); + DataEaseException.throwException(e); } finally { if(con != null){ con.close(); } } + return new ArrayList<>(); } @Override @@ -222,9 +227,9 @@ public class JdbcProvider extends DatasourceProvider { } resultSet.close(); } catch (SQLException e) { - throw new Exception("ERROR:" + e.getMessage(), e); + DataEaseException.throwException(e); } catch (Exception e) { - throw new Exception("ERROR:" + e.getMessage(), e); + DataEaseException.throwException(e); } finally { if(connection != null){ connection.close(); @@ -244,7 +249,7 @@ public class JdbcProvider extends DatasourceProvider { resultSet.close(); ps.close(); } catch (Exception e) { - throw new Exception("ERROR: " + e.getMessage(), e); + DataEaseException.throwException(e); } finally { if(con != null){con.close();} } @@ -261,7 +266,7 @@ public class JdbcProvider extends DatasourceProvider { return resultSet.getLong(1); } } catch (Exception e) { - throw new Exception("ERROR: " + e.getMessage(), e); + DataEaseException.throwException( e); } finally { con.close(); } @@ -423,4 +428,4 @@ public class JdbcProvider extends DatasourceProvider { return "show tables;"; } } -} \ No newline at end of file +} diff --git a/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java b/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java index a2a54328b5..921e7d2b61 100644 --- a/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java +++ b/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java @@ -18,6 +18,7 @@ import io.dataease.datasource.provider.ProviderFactory; import io.dataease.datasource.request.DatasourceRequest; import io.dataease.dto.DatasourceDTO; import io.dataease.dto.dataset.DataTableInfoDTO; +import io.dataease.exception.DataEaseException; import io.dataease.i18n.Translator; import io.dataease.service.dataset.DataSetGroupService; import org.apache.commons.collections4.CollectionUtils; @@ -97,7 +98,7 @@ public class DatasourceService { example.createCriteria().andDataSourceIdEqualTo(datasourceId); List datasetTables = datasetTableMapper.selectByExample(example); if(CollectionUtils.isNotEmpty(datasetTables)){ - throw new Exception(datasetTables.size() + Translator.get("i18n_datasource_not_allow_delete_msg")); + DataEaseException.throwException(datasetTables.size() + Translator.get("i18n_datasource_not_allow_delete_msg")); } datasourceMapper.deleteByPrimaryKey(datasourceId); } diff --git a/backend/src/main/java/io/dataease/excel/utils/EasyExcelExporter.java b/backend/src/main/java/io/dataease/excel/utils/EasyExcelExporter.java index 46ae5bdf6e..56c18986ea 100644 --- a/backend/src/main/java/io/dataease/excel/utils/EasyExcelExporter.java +++ b/backend/src/main/java/io/dataease/excel/utils/EasyExcelExporter.java @@ -4,6 +4,7 @@ import com.alibaba.excel.EasyExcel; import com.alibaba.excel.write.metadata.style.WriteCellStyle; import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; import io.dataease.commons.utils.LogUtil; +import io.dataease.exception.DataEaseException; import io.dataease.exception.ExcelException; import javax.servlet.http.HttpServletResponse; @@ -31,10 +32,10 @@ public class EasyExcelExporter { EasyExcel.write(response.getOutputStream(), this.clazz).registerWriteHandler(horizontalCellStyleStrategy).sheet(sheetName).doWrite(data); } catch (UnsupportedEncodingException e) { LogUtil.error(e.getMessage(), e); - throw new ExcelException("Utf-8 encoding is not supported"); + DataEaseException.throwException("Utf-8 encoding is not supported"); } catch (IOException e) { LogUtil.error(e.getMessage(), e); - throw new ExcelException("IO exception"); + DataEaseException.throwException("IO exception"); } } diff --git a/backend/src/main/java/io/dataease/job/sechedule/ScheduleManager.java b/backend/src/main/java/io/dataease/job/sechedule/ScheduleManager.java index 4465c81c30..14c8b9600b 100644 --- a/backend/src/main/java/io/dataease/job/sechedule/ScheduleManager.java +++ b/backend/src/main/java/io/dataease/job/sechedule/ScheduleManager.java @@ -1,22 +1,8 @@ package io.dataease.job.sechedule; import io.dataease.commons.utils.LogUtil; -import org.quartz.Job; -import org.quartz.JobDataMap; -import org.quartz.JobKey; -import org.quartz.Scheduler; -import org.quartz.SchedulerException; -import org.quartz.TriggerKey; -import org.quartz.JobBuilder; -import org.quartz.JobDetail; -import org.quartz.SimpleTrigger; -import org.quartz.TriggerBuilder; -import org.quartz.SimpleScheduleBuilder; -import org.quartz.Trigger; -import org.quartz.CronScheduleBuilder; -import org.quartz.CronTrigger; -import org.quartz.CronExpression; -import org.quartz.JobExecutionContext; +import io.dataease.exception.DataEaseException; +import org.quartz.*; import org.springframework.stereotype.Component; import javax.annotation.Resource; @@ -111,7 +97,7 @@ public class ScheduleManager { } catch (Exception e) { LogUtil.error(e.getMessage(), e); - throw new RuntimeException(e); + DataEaseException.throwException(e); } } @@ -141,7 +127,7 @@ public class ScheduleManager { } catch (Exception e) { LogUtil.error(e.getMessage(), e); - throw new RuntimeException(e); + DataEaseException.throwException(e); } } @@ -202,7 +188,7 @@ public class ScheduleManager { // addJob(jobName, jobGroupName, triggerName, triggerGroupName, jobClass, cron); /** 方式二 :先删除,然后在创建一个新的Job */ } catch (Exception e) { - throw new RuntimeException(e); + DataEaseException.throwException(e); } } @@ -254,7 +240,7 @@ public class ScheduleManager { } catch (Exception e) { LogUtil.error(e.getMessage(), e); - throw new RuntimeException(e); + DataEaseException.throwException(e); } } @@ -286,7 +272,7 @@ public class ScheduleManager { } } catch (Exception e) { LogUtil.error(e.getMessage(), e); - throw new RuntimeException(e); + DataEaseException.throwException(e); } } @@ -310,7 +296,7 @@ public class ScheduleManager { } catch (Exception e) { LogUtil.error(e.getMessage(), e); - throw new RuntimeException(e); + DataEaseException.throwException(e); } } @@ -320,7 +306,7 @@ public class ScheduleManager { sched.start(); } catch (Exception e) { LogUtil.error(e.getMessage(), e); - throw new RuntimeException(e); + DataEaseException.throwException(e); } } @@ -332,7 +318,7 @@ public class ScheduleManager { } } catch (Exception e) { LogUtil.error(e.getMessage(), e); - throw new RuntimeException(e); + DataEaseException.throwException(e); } } @@ -431,7 +417,7 @@ public class ScheduleManager { public static CronTrigger getCronTrigger(String cron) { if (!CronExpression.isValidExpression(cron)) { - throw new RuntimeException("cron :" + cron + " error"); + DataEaseException.throwException("cron :" + cron + " error"); } return TriggerBuilder.newTrigger().withIdentity("Calculate Date").withSchedule(CronScheduleBuilder.cronSchedule(cron)).build(); diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java index b0c1df05be..4b13db735a 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -18,6 +18,7 @@ import io.dataease.datasource.provider.JdbcProvider; import io.dataease.datasource.provider.ProviderFactory; import io.dataease.datasource.request.DatasourceRequest; import io.dataease.dto.dataset.*; +import io.dataease.exception.DataEaseException; import io.dataease.i18n.Translator; import io.dataease.provider.DDLProvider; import io.dataease.provider.QueryProvider; @@ -412,7 +413,7 @@ public class DataSetTableService { String sql = new Gson().fromJson(dataSetTableRequest.getInfo(), DataTableInfoDTO.class).getSql(); if (StringUtils.isEmpty(sql)) { - throw new Exception(Translator.get("i18n_sql_not_empty")); + DataEaseException.throwException(Translator.get("i18n_sql_not_empty")); } QueryProvider qp = ProviderFactory.getQueryProvider(ds.getType()); String sqlAsTable = qp.createSQLPreview(sql, null); @@ -734,7 +735,7 @@ public class DataSetTableService { }); sort(sqlFileds); if (!originNameFileds.equals(sqlFileds)) { - throw new Exception(Translator.get("i18n_sql_add_not_matching") + sqlFileds.toString()); + DataEaseException.throwException(Translator.get("i18n_sql_add_not_matching") + sqlFileds.toString()); } } if (StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalDelete()) && StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalDelete().replace(" ", ""))) {// 增量删除 @@ -747,7 +748,7 @@ public class DataSetTableService { }); sort(sqlFileds); if (!originNameFileds.equals(sqlFileds)) { - throw new Exception(Translator.get("i18n_sql_delete_not_matching") + sqlFileds.toString()); + DataEaseException.throwException(Translator.get("i18n_sql_delete_not_matching") + sqlFileds.toString()); } } } diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java index 851daee0dd..55097ece70 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java @@ -8,6 +8,7 @@ import io.dataease.base.mapper.DatasetTableTaskMapper; import io.dataease.commons.constants.JobStatus; import io.dataease.commons.constants.ScheduleType; import io.dataease.controller.request.dataset.DataSetTaskRequest; +import io.dataease.exception.DataEaseException; import io.dataease.i18n.Translator; import io.dataease.service.ScheduleService; import org.apache.commons.lang3.ObjectUtils; @@ -71,11 +72,11 @@ public class DataSetTableTaskService { if (datasetTableTask.getType().equalsIgnoreCase("add_scope")) { DatasetTable datasetTable = dataSetTableService.get(datasetTableTask.getTableId()); if (datasetTable.getLastUpdateTime() == 0 || datasetTable.getLastUpdateTime() == null) { - throw new Exception(Translator.get("i18n_not_exec_add_sync")); + DataEaseException.throwException(Translator.get("i18n_not_exec_add_sync")); } } if (extractDataService.updateSyncStatusIsNone(dataSetTableService.get(datasetTableTask.getTableId()))) { - throw new Exception(Translator.get("i18n_sync_job_exists")); + DataEaseException.throwException(Translator.get("i18n_sync_job_exists")); } else { //write log DatasetTableTaskLog datasetTableTaskLog = new DatasetTableTaskLog(); diff --git a/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java b/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java index 19b85939a5..7faa2b5a73 100644 --- a/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java +++ b/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java @@ -21,6 +21,7 @@ import io.dataease.datasource.provider.JdbcProvider; import io.dataease.datasource.provider.ProviderFactory; import io.dataease.datasource.request.DatasourceRequest; import io.dataease.dto.dataset.DataTableInfoDTO; +import io.dataease.exception.DataEaseException; import io.dataease.provider.QueryProvider; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.io.FileUtils; @@ -460,7 +461,7 @@ public class ExtractDataService { if (jobStatus.getStatusDescription().equals("Finished")) { return; } else { - throw new Exception(jobStatus.getLoggingString()); + DataEaseException.throwException((jobStatus.getLoggingString())); } } diff --git a/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java b/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java index 2a63827f7f..87e218c4ba 100644 --- a/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java +++ b/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java @@ -10,6 +10,7 @@ import io.dataease.commons.utils.TreeUtils; import io.dataease.controller.request.panel.PanelGroupRequest; import io.dataease.dto.chart.ChartViewDTO; import io.dataease.dto.panel.PanelGroupDTO; +import io.dataease.exception.DataEaseException; import io.dataease.i18n.Translator; import io.dataease.service.chart.ChartViewService; import io.dataease.service.sys.SysAuthService; @@ -119,7 +120,7 @@ public class PanelGroupService { List checkResult = panelGroupMapper.selectByExample(groupExample); if (CollectionUtils.isNotEmpty(checkResult)) { - throw new RuntimeException(Translator.get("i18n_same_folder_can_not_repeat")); + DataEaseException.throwException(Translator.get("i18n_same_folder_can_not_repeat")); } } diff --git a/backend/src/main/java/io/dataease/service/panel/PanelSubjectService.java b/backend/src/main/java/io/dataease/service/panel/PanelSubjectService.java index d1385cf178..dc36cc27e6 100644 --- a/backend/src/main/java/io/dataease/service/panel/PanelSubjectService.java +++ b/backend/src/main/java/io/dataease/service/panel/PanelSubjectService.java @@ -41,13 +41,16 @@ public class PanelSubjectService { public List query(PanelSubjectRequest request){ PanelSubjectExample example = new PanelSubjectExample(); - return panelSubjectMapper.selectByExampleWithBLOBs(null); + example.setOrderByClause( "create_time asc"); + return panelSubjectMapper.selectByExampleWithBLOBs(example); } public List querySubjectWithGroup(PanelSubjectRequest request){ List result = new ArrayList(); int pageSize = 4; - List allInfo = panelSubjectMapper.selectByExampleWithBLOBs(null); + PanelSubjectExample example = new PanelSubjectExample(); + example.setOrderByClause( "create_time asc"); + List allInfo = panelSubjectMapper.selectByExampleWithBLOBs(example); for(int i =0;i tmp = allInfo.subList(i,i+pageSize this.maxWidth) console.warn('[Vdr warn]: Invalid prop: minWidth cannot be greater than maxWidth') - // eslint-disable-next-line 无效prop:minHeight不能大于maxHeight' + // minHeight不能大于maxHeight if (this.maxWidth && this.minHeight > this.maxHeight) console.warn('[Vdr warn]: Invalid prop: minHeight cannot be greater than maxHeight') this.elmX = 0 this.elmY = 0 diff --git a/frontend/src/components/RightPanel/index.vue b/frontend/src/components/RightPanel/index.vue index 79b23bba81..ca2af469ca 100644 --- a/frontend/src/components/RightPanel/index.vue +++ b/frontend/src/components/RightPanel/index.vue @@ -2,9 +2,9 @@

- - - + + +
diff --git a/frontend/src/components/canvas/assets/iconfont/iconfont.js b/frontend/src/components/canvas/assets/iconfont/iconfont.js index a496b1bad0..13792184d8 100644 --- a/frontend/src/components/canvas/assets/iconfont/iconfont.js +++ b/frontend/src/components/canvas/assets/iconfont/iconfont.js @@ -1 +1 @@ -!function(t){var e,h,c,l,n,o,a='',i=(i=document.getElementsByTagName("script"))[i.length-1].getAttribute("data-injectcss");if(i&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}function d(){n||(n=!0,c())}e=function(){var t,e,h,c;(c=document.createElement("div")).innerHTML=a,a=null,(h=c.getElementsByTagName("svg")[0])&&(h.setAttribute("aria-hidden","true"),h.style.position="absolute",h.style.width=0,h.style.height=0,h.style.overflow="hidden",t=h,(e=document.body).firstChild?(c=t,(h=e.firstChild).parentNode.insertBefore(c,h)):e.appendChild(t))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(e,0):(h=function(){document.removeEventListener("DOMContentLoaded",h,!1),e()},document.addEventListener("DOMContentLoaded",h,!1)):document.attachEvent&&(c=e,l=t.document,n=!1,(o=function(){try{l.documentElement.doScroll("left")}catch(t){return void setTimeout(o,50)}d()})(),l.onreadystatechange=function(){"complete"==l.readyState&&(l.onreadystatechange=null,d())})}(window); \ No newline at end of file +!(function(t) { var e; var h; var c; var l; var n; var o; var a = ''; var i = (i = document.getElementsByTagName('script'))[i.length - 1].getAttribute('data-injectcss'); if (i && !t.__iconfont__svg__cssinject__) { t.__iconfont__svg__cssinject__ = !0; try { document.write('') } catch (t) { console && console.log(t) } } function d() { n || (n = !0, c()) }e = function() { var t, e, h, c; (c = document.createElement('div')).innerHTML = a, a = null, (h = c.getElementsByTagName('svg')[0]) && (h.setAttribute('aria-hidden', 'true'), h.style.position = 'absolute', h.style.width = 0, h.style.height = 0, h.style.overflow = 'hidden', t = h, (e = document.body).firstChild ? (c = t, (h = e.firstChild).parentNode.insertBefore(c, h)) : e.appendChild(t)) }, document.addEventListener ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) ? setTimeout(e, 0) : (h = function() { document.removeEventListener('DOMContentLoaded', h, !1), e() }, document.addEventListener('DOMContentLoaded', h, !1)) : document.attachEvent && (c = e, l = t.document, n = !1, (o = function() { try { l.documentElement.doScroll('left') } catch (t) { return void setTimeout(o, 50) }d() })(), l.onreadystatechange = function() { l.readyState == 'complete' && (l.onreadystatechange = null, d()) }) }(window)) diff --git a/frontend/src/components/canvas/components/AnimationList.vue b/frontend/src/components/canvas/components/AnimationList.vue index b2583dcd8e..ef44a0a983 100644 --- a/frontend/src/components/canvas/components/AnimationList.vue +++ b/frontend/src/components/canvas/components/AnimationList.vue @@ -1,41 +1,41 @@ diff --git a/frontend/src/components/canvas/components/Editor/ContextMenu.vue b/frontend/src/components/canvas/components/Editor/ContextMenu.vue index 813b86c9cd..85c189b244 100644 --- a/frontend/src/components/canvas/components/Editor/ContextMenu.vue +++ b/frontend/src/components/canvas/components/Editor/ContextMenu.vue @@ -59,7 +59,7 @@ export default { bus.$emit('component-dialog-edit') } - //编辑样式组件 + // 编辑样式组件 if (this.curComponent.type === 'v-text' || this.curComponent.type === 'rect-shape') { bus.$emit('component-dialog-style') diff --git a/frontend/src/components/canvas/components/EventList.vue b/frontend/src/components/canvas/components/EventList.vue index f69a87b247..301a76f557 100644 --- a/frontend/src/components/canvas/components/EventList.vue +++ b/frontend/src/components/canvas/components/EventList.vue @@ -1,30 +1,30 @@ diff --git a/frontend/src/components/canvas/components/Modal.vue b/frontend/src/components/canvas/components/Modal.vue index 21b853c337..2040566ab4 100644 --- a/frontend/src/components/canvas/components/Modal.vue +++ b/frontend/src/components/canvas/components/Modal.vue @@ -1,32 +1,32 @@ @@ -46,4 +46,4 @@ export default { height: 100%; } } - \ No newline at end of file + diff --git a/frontend/src/components/canvas/components/Toolbar.vue b/frontend/src/components/canvas/components/Toolbar.vue index 0642b4b894..d4bee9a54b 100644 --- a/frontend/src/components/canvas/components/Toolbar.vue +++ b/frontend/src/components/canvas/components/Toolbar.vue @@ -3,12 +3,12 @@
- + {{ $t('panel.matrix_design') }}
- + {{ $t('panel.canvas_self_adaption') }}
diff --git a/frontend/src/components/canvas/custom-component/Group.vue b/frontend/src/components/canvas/custom-component/Group.vue index 3a256d56b0..96fc1d7688 100644 --- a/frontend/src/components/canvas/custom-component/Group.vue +++ b/frontend/src/components/canvas/custom-component/Group.vue @@ -1,54 +1,54 @@ diff --git a/frontend/src/components/canvas/custom-component/Picture.vue b/frontend/src/components/canvas/custom-component/Picture.vue index bc7cf13107..a30b20d78c 100644 --- a/frontend/src/components/canvas/custom-component/Picture.vue +++ b/frontend/src/components/canvas/custom-component/Picture.vue @@ -1,17 +1,17 @@ @@ -20,4 +20,4 @@ img { width: 100%; height: 100%; } - \ No newline at end of file + diff --git a/frontend/src/components/canvas/custom-component/VButton.vue b/frontend/src/components/canvas/custom-component/VButton.vue index ef168ceeb8..f1c181725b 100644 --- a/frontend/src/components/canvas/custom-component/VButton.vue +++ b/frontend/src/components/canvas/custom-component/VButton.vue @@ -1,15 +1,15 @@ @@ -44,4 +44,4 @@ export default { color: #3a8ee6; } } - \ No newline at end of file + diff --git a/frontend/src/components/canvas/store/animation.js b/frontend/src/components/canvas/store/animation.js index 0db25da68a..2132e002a2 100644 --- a/frontend/src/components/canvas/store/animation.js +++ b/frontend/src/components/canvas/store/animation.js @@ -1,11 +1,11 @@ export default { - mutations: { - addAnimation({ curComponent }, animation) { - curComponent.animations.push(animation) - }, - - removeAnimation({ curComponent }, index) { - curComponent.animations.splice(index, 1) - }, + mutations: { + addAnimation({ curComponent }, animation) { + curComponent.animations.push(animation) }, -} \ No newline at end of file + + removeAnimation({ curComponent }, index) { + curComponent.animations.splice(index, 1) + } + } +} diff --git a/frontend/src/components/canvas/store/contextmenu.js b/frontend/src/components/canvas/store/contextmenu.js index c54729a016..9134e71b7a 100644 --- a/frontend/src/components/canvas/store/contextmenu.js +++ b/frontend/src/components/canvas/store/contextmenu.js @@ -1,18 +1,18 @@ export default { - state: { - menuTop: 0, // 右击菜单数据 - menuLeft: 0, - menuShow: false, + state: { + menuTop: 0, // 右击菜单数据 + menuLeft: 0, + menuShow: false + }, + mutations: { + showContextMenu(state, { top, left }) { + state.menuShow = true + state.menuTop = top + state.menuLeft = left }, - mutations: { - showContextMenu(state, { top, left }) { - state.menuShow = true - state.menuTop = top - state.menuLeft = left - }, - hideContextMenu(state) { - state.menuShow = false - }, - }, -} \ No newline at end of file + hideContextMenu(state) { + state.menuShow = false + } + } +} diff --git a/frontend/src/components/canvas/store/copy.js b/frontend/src/components/canvas/store/copy.js index b10d829046..468cce3e31 100644 --- a/frontend/src/components/canvas/store/copy.js +++ b/frontend/src/components/canvas/store/copy.js @@ -4,64 +4,64 @@ import generateID from '@/components/canvas/utils/generateID' import { deepCopy } from '@/components/canvas/utils/utils' export default { - state: { - copyData: null, // 复制粘贴剪切 - isCut: false, + state: { + copyData: null, // 复制粘贴剪切 + isCut: false + }, + mutations: { + copy(state) { + if (!state.curComponent) return + state.copyData = { + data: deepCopy(state.curComponent), + index: state.curComponentIndex + } + + state.isCut = false }, - mutations: { - copy(state) { - if (!state.curComponent) return - state.copyData = { - data: deepCopy(state.curComponent), - index: state.curComponentIndex, - } - state.isCut = false - }, + paste(state, isMouse) { + if (!state.copyData) { + toast('请选择组件') + return + } - paste(state, isMouse) { - if (!state.copyData) { - toast('请选择组件') - return - } + const data = state.copyData.data - const data = state.copyData.data + if (isMouse) { + data.style.top = state.menuTop + data.style.left = state.menuLeft + } else { + data.style.top += 10 + data.style.left += 10 + } - if (isMouse) { - data.style.top = state.menuTop - data.style.left = state.menuLeft - } else { - data.style.top += 10 - data.style.left += 10 - } - - data.id = generateID() - store.commit('addComponent', { component: deepCopy(data) }) - if (state.isCut) { - state.copyData = null - } - }, - - cut(state) { - if (!state.curComponent) { - toast('请选择组件') - return - } - - if (state.copyData) { - const data = deepCopy(state.copyData.data) - const index = state.copyData.index - data.id = generateID() - store.commit('addComponent', { component: data, index }) - if (state.curComponentIndex >= index) { - // 如果当前组件索引大于等于插入索引,需要加一,因为当前组件往后移了一位 - state.curComponentIndex++ - } - } - - store.commit('copy') - store.commit('deleteComponent') - state.isCut = true - }, + data.id = generateID() + store.commit('addComponent', { component: deepCopy(data) }) + if (state.isCut) { + state.copyData = null + } }, + + cut(state) { + if (!state.curComponent) { + toast('请选择组件') + return + } + + if (state.copyData) { + const data = deepCopy(state.copyData.data) + const index = state.copyData.index + data.id = generateID() + store.commit('addComponent', { component: data, index }) + if (state.curComponentIndex >= index) { + // 如果当前组件索引大于等于插入索引,需要加一,因为当前组件往后移了一位 + state.curComponentIndex++ + } + } + + store.commit('copy') + store.commit('deleteComponent') + state.isCut = true + } + } } diff --git a/frontend/src/components/canvas/store/event.js b/frontend/src/components/canvas/store/event.js index 4b838ac5e9..fc1e63d5e6 100644 --- a/frontend/src/components/canvas/store/event.js +++ b/frontend/src/components/canvas/store/event.js @@ -1,11 +1,11 @@ export default { - mutations: { - addEvent({ curComponent }, { event, param }) { - curComponent.events[event] = param - }, - - removeEvent({ curComponent }, event) { - delete curComponent.events[event] - }, + mutations: { + addEvent({ curComponent }, { event, param }) { + curComponent.events[event] = param }, -} \ No newline at end of file + + removeEvent({ curComponent }, event) { + delete curComponent.events[event] + } + } +} diff --git a/frontend/src/components/canvas/store/lock.js b/frontend/src/components/canvas/store/lock.js index ed0c17bac2..bfa7d7cbab 100644 --- a/frontend/src/components/canvas/store/lock.js +++ b/frontend/src/components/canvas/store/lock.js @@ -1,11 +1,11 @@ export default { - mutations: { - lock({ curComponent }) { - curComponent.isLock = true - }, - - unlock({ curComponent }) { - curComponent.isLock = false - }, + mutations: { + lock({ curComponent }) { + curComponent.isLock = true }, -} \ No newline at end of file + + unlock({ curComponent }) { + curComponent.isLock = false + } + } +} diff --git a/frontend/src/components/canvas/utils/animationClassData.js b/frontend/src/components/canvas/utils/animationClassData.js index 531303c546..5ab527b6df 100644 --- a/frontend/src/components/canvas/utils/animationClassData.js +++ b/frontend/src/components/canvas/utils/animationClassData.js @@ -1,94 +1,94 @@ export default [ - { - label: '进入', - children: [ - { label: '渐显', value: 'fadeIn' }, - { label: '向右进入', value: 'fadeInLeft' }, - { label: '向左进入', value: 'fadeInRight' }, - { label: '向上进入', value: 'fadeInUp' }, - { label: '向下进入', value: 'fadeInDown' }, - { label: '向右长距进入', value: 'fadeInLeftBig' }, - { label: '向左长距进入', value: 'fadeInRightBig' }, - { label: '向上长距进入', value: 'fadeInUpBig' }, - { label: '向下长距进入', value: 'fadeInDownBig' }, - { label: '旋转进入', value: 'rotateIn' }, - { label: '左顺时针旋转', value: 'rotateInDownLeft' }, - { label: '右逆时针旋转', value: 'rotateInDownRight' }, - { label: '左逆时针旋转', value: 'rotateInUpLeft' }, - { label: '右逆时针旋转', value: 'rotateInUpRight' }, - { label: '弹入', value: 'bounceIn' }, - { label: '向右弹入', value: 'bounceInLeft' }, - { label: '向左弹入', value: 'bounceInRight' }, - { label: '向上弹入', value: 'bounceInUp' }, - { label: '向下弹入', value: 'bounceInDown' }, - { label: '光速从右进入', value: 'lightSpeedInRight' }, - { label: '光速从左进入', value: 'lightSpeedInLeft' }, - { label: '光速从右退出', value: 'lightSpeedOutRight' }, - { label: '光速从左退出', value: 'lightSpeedOutLeft' }, - { label: 'Y轴旋转', value: 'flip' }, - { label: '中心X轴旋转', value: 'flipInX' }, - { label: '中心Y轴旋转', value: 'flipInY' }, - { label: '左长半径旋转', value: 'rollIn' }, - { label: '由小变大进入', value: 'zoomIn' }, - { label: '左变大进入', value: 'zoomInLeft' }, - { label: '右变大进入', value: 'zoomInRight' }, - { label: '向上变大进入', value: 'zoomInUp' }, - { label: '向下变大进入', value: 'zoomInDown' }, - { label: '向右滑动展开', value: 'slideInLeft' }, - { label: '向左滑动展开', value: 'slideInRight' }, - { label: '向上滑动展开', value: 'slideInUp' }, - { label: '向下滑动展开', value: 'slideInDown' }, - ], - }, - { - label: '强调', - children: [ - { label: '弹跳', value: 'bounce' }, - { label: '闪烁', value: 'flash' }, - { label: '放大缩小', value: 'pulse' }, - { label: '放大缩小弹簧', value: 'rubberBand' }, - { label: '左右晃动', value: 'headShake' }, - { label: '左右扇形摇摆', value: 'swing' }, - { label: '放大晃动缩小', value: 'tada' }, - { label: '扇形摇摆', value: 'wobble' }, - { label: '左右上下晃动', value: 'jello' }, - { label: 'Y轴旋转', value: 'flip' }, - ], - }, - { - label: '退出', - children: [ - { label: '渐隐', value: 'fadeOut' }, - { label: '向左退出', value: 'fadeOutLeft' }, - { label: '向右退出', value: 'fadeOutRight' }, - { label: '向上退出', value: 'fadeOutUp' }, - { label: '向下退出', value: 'fadeOutDown' }, - { label: '向左长距退出', value: 'fadeOutLeftBig' }, - { label: '向右长距退出', value: 'fadeOutRightBig' }, - { label: '向上长距退出', value: 'fadeOutUpBig' }, - { label: '向下长距退出', value: 'fadeOutDownBig' }, - { label: '旋转退出', value: 'rotateOut' }, - { label: '左顺时针旋转', value: 'rotateOutDownLeft' }, - { label: '右逆时针旋转', value: 'rotateOutDownRight' }, - { label: '左逆时针旋转', value: 'rotateOutUpLeft' }, - { label: '右逆时针旋转', value: 'rotateOutUpRight' }, - { label: '弹出', value: 'bounceOut' }, - { label: '向左弹出', value: 'bounceOutLeft' }, - { label: '向右弹出', value: 'bounceOutRight' }, - { label: '向上弹出', value: 'bounceOutUp' }, - { label: '向下弹出', value: 'bounceOutDown' }, - { label: '中心X轴旋转', value: 'flipOutX' }, - { label: '中心Y轴旋转', value: 'flipOutY' }, - { label: '左长半径旋转', value: 'rollOut' }, - { label: '由小变大退出', value: 'zoomOut' }, - { label: '左变大退出', value: 'zoomOutLeft' }, - { label: '右变大退出', value: 'zoomOutRight' }, - { label: '向上变大退出', value: 'zoomOutUp' }, - { label: '向下变大退出', value: 'zoomOutDown' }, - { label: '向左滑动收起', value: 'slideOutLeft' }, - { label: '向右滑动收起', value: 'slideOutRight' }, - { label: '向上滑动收起', value: 'slideOutUp' }, - { label: '向下滑动收起', value: 'slideOutDown' }, - ], - }, + { + label: '进入', + children: [ + { label: '渐显', value: 'fadeIn' }, + { label: '向右进入', value: 'fadeInLeft' }, + { label: '向左进入', value: 'fadeInRight' }, + { label: '向上进入', value: 'fadeInUp' }, + { label: '向下进入', value: 'fadeInDown' }, + { label: '向右长距进入', value: 'fadeInLeftBig' }, + { label: '向左长距进入', value: 'fadeInRightBig' }, + { label: '向上长距进入', value: 'fadeInUpBig' }, + { label: '向下长距进入', value: 'fadeInDownBig' }, + { label: '旋转进入', value: 'rotateIn' }, + { label: '左顺时针旋转', value: 'rotateInDownLeft' }, + { label: '右逆时针旋转', value: 'rotateInDownRight' }, + { label: '左逆时针旋转', value: 'rotateInUpLeft' }, + { label: '右逆时针旋转', value: 'rotateInUpRight' }, + { label: '弹入', value: 'bounceIn' }, + { label: '向右弹入', value: 'bounceInLeft' }, + { label: '向左弹入', value: 'bounceInRight' }, + { label: '向上弹入', value: 'bounceInUp' }, + { label: '向下弹入', value: 'bounceInDown' }, + { label: '光速从右进入', value: 'lightSpeedInRight' }, + { label: '光速从左进入', value: 'lightSpeedInLeft' }, + { label: '光速从右退出', value: 'lightSpeedOutRight' }, + { label: '光速从左退出', value: 'lightSpeedOutLeft' }, + { label: 'Y轴旋转', value: 'flip' }, + { label: '中心X轴旋转', value: 'flipInX' }, + { label: '中心Y轴旋转', value: 'flipInY' }, + { label: '左长半径旋转', value: 'rollIn' }, + { label: '由小变大进入', value: 'zoomIn' }, + { label: '左变大进入', value: 'zoomInLeft' }, + { label: '右变大进入', value: 'zoomInRight' }, + { label: '向上变大进入', value: 'zoomInUp' }, + { label: '向下变大进入', value: 'zoomInDown' }, + { label: '向右滑动展开', value: 'slideInLeft' }, + { label: '向左滑动展开', value: 'slideInRight' }, + { label: '向上滑动展开', value: 'slideInUp' }, + { label: '向下滑动展开', value: 'slideInDown' } + ] + }, + { + label: '强调', + children: [ + { label: '弹跳', value: 'bounce' }, + { label: '闪烁', value: 'flash' }, + { label: '放大缩小', value: 'pulse' }, + { label: '放大缩小弹簧', value: 'rubberBand' }, + { label: '左右晃动', value: 'headShake' }, + { label: '左右扇形摇摆', value: 'swing' }, + { label: '放大晃动缩小', value: 'tada' }, + { label: '扇形摇摆', value: 'wobble' }, + { label: '左右上下晃动', value: 'jello' }, + { label: 'Y轴旋转', value: 'flip' } + ] + }, + { + label: '退出', + children: [ + { label: '渐隐', value: 'fadeOut' }, + { label: '向左退出', value: 'fadeOutLeft' }, + { label: '向右退出', value: 'fadeOutRight' }, + { label: '向上退出', value: 'fadeOutUp' }, + { label: '向下退出', value: 'fadeOutDown' }, + { label: '向左长距退出', value: 'fadeOutLeftBig' }, + { label: '向右长距退出', value: 'fadeOutRightBig' }, + { label: '向上长距退出', value: 'fadeOutUpBig' }, + { label: '向下长距退出', value: 'fadeOutDownBig' }, + { label: '旋转退出', value: 'rotateOut' }, + { label: '左顺时针旋转', value: 'rotateOutDownLeft' }, + { label: '右逆时针旋转', value: 'rotateOutDownRight' }, + { label: '左逆时针旋转', value: 'rotateOutUpLeft' }, + { label: '右逆时针旋转', value: 'rotateOutUpRight' }, + { label: '弹出', value: 'bounceOut' }, + { label: '向左弹出', value: 'bounceOutLeft' }, + { label: '向右弹出', value: 'bounceOutRight' }, + { label: '向上弹出', value: 'bounceOutUp' }, + { label: '向下弹出', value: 'bounceOutDown' }, + { label: '中心X轴旋转', value: 'flipOutX' }, + { label: '中心Y轴旋转', value: 'flipOutY' }, + { label: '左长半径旋转', value: 'rollOut' }, + { label: '由小变大退出', value: 'zoomOut' }, + { label: '左变大退出', value: 'zoomOutLeft' }, + { label: '右变大退出', value: 'zoomOutRight' }, + { label: '向上变大退出', value: 'zoomOutUp' }, + { label: '向下变大退出', value: 'zoomOutDown' }, + { label: '向左滑动收起', value: 'slideOutLeft' }, + { label: '向右滑动收起', value: 'slideOutRight' }, + { label: '向上滑动收起', value: 'slideOutUp' }, + { label: '向下滑动收起', value: 'slideOutDown' } + ] + } ] diff --git a/frontend/src/components/canvas/utils/decomposeComponent.js b/frontend/src/components/canvas/utils/decomposeComponent.js index e3105b14cc..9bc060997e 100644 --- a/frontend/src/components/canvas/utils/decomposeComponent.js +++ b/frontend/src/components/canvas/utils/decomposeComponent.js @@ -3,18 +3,18 @@ import { mod360 } from './translate' // 将组合中的各个子组件拆分出来,并计算它们新的 style export default function decomposeComponent(component, editorRect, parentStyle) { - const componentRect = $(`#component${component.id}`).getBoundingClientRect() - // 获取元素的中心点坐标 - const center = { - x: componentRect.left - editorRect.left + componentRect.width / 2, - y: componentRect.top - editorRect.top + componentRect.height / 2, - } + const componentRect = $(`#component${component.id}`).getBoundingClientRect() + // 获取元素的中心点坐标 + const center = { + x: componentRect.left - editorRect.left + componentRect.width / 2, + y: componentRect.top - editorRect.top + componentRect.height / 2 + } - component.style.rotate = mod360(component.style.rotate + parentStyle.rotate) - component.style.width = parseFloat(component.groupStyle.width) / 100 * parentStyle.width - component.style.height = parseFloat(component.groupStyle.height) / 100 * parentStyle.height - // 计算出元素新的 top left 坐标 - component.style.left = center.x - component.style.width / 2 - component.style.top = center.y - component.style.height / 2 - component.groupStyle = {} -} \ No newline at end of file + component.style.rotate = mod360(component.style.rotate + parentStyle.rotate) + component.style.width = parseFloat(component.groupStyle.width) / 100 * parentStyle.width + component.style.height = parseFloat(component.groupStyle.height) / 100 * parentStyle.height + // 计算出元素新的 top left 坐标 + component.style.left = center.x - component.style.width / 2 + component.style.top = center.y - component.style.height / 2 + component.groupStyle = {} +} diff --git a/frontend/src/components/canvas/utils/eventBus.js b/frontend/src/components/canvas/utils/eventBus.js index 58ac2c9e94..badb6db3fb 100644 --- a/frontend/src/components/canvas/utils/eventBus.js +++ b/frontend/src/components/canvas/utils/eventBus.js @@ -1,3 +1,3 @@ import Vue from 'vue' // 用于监听、触发事件 -export default new Vue() \ No newline at end of file +export default new Vue() diff --git a/frontend/src/components/canvas/utils/events.js b/frontend/src/components/canvas/utils/events.js index 88cc427323..d5fa56b820 100644 --- a/frontend/src/components/canvas/utils/events.js +++ b/frontend/src/components/canvas/utils/events.js @@ -1,39 +1,39 @@ // 编辑器自定义事件 const events = { - redirect(url) { - if (url) { - window.location.href = url - } - }, + redirect(url) { + if (url) { + window.location.href = url + } + }, - alert(msg) { - if (msg) { - alert(msg) - } - }, + alert(msg) { + if (msg) { + alert(msg) + } + } } const mixins = { - methods: events, + methods: events } const eventList = [ - { - key: 'redirect', - label: '跳转事件', - event: events.redirect, - param: '', - }, - { - key: 'alert', - label: 'alert 事件', - event: events.alert, - param: '', - }, + { + key: 'redirect', + label: '跳转事件', + event: events.redirect, + param: '' + }, + { + key: 'alert', + label: 'alert 事件', + event: events.alert, + param: '' + } ] export { - mixins, - events, - eventList, -} \ No newline at end of file + mixins, + events, + eventList +} diff --git a/frontend/src/components/canvas/utils/generateID.js b/frontend/src/components/canvas/utils/generateID.js index 5dce36e3bc..d057f91b16 100644 --- a/frontend/src/components/canvas/utils/generateID.js +++ b/frontend/src/components/canvas/utils/generateID.js @@ -1,5 +1,5 @@ let id = 0 // 主要用于 Vue 的 diff 算法,为每个元素创建一个独一无二的 ID export default function generateID() { - return id++ -} \ No newline at end of file + return id++ +} diff --git a/frontend/src/components/canvas/utils/runAnimation.js b/frontend/src/components/canvas/utils/runAnimation.js index b1e63ecf26..3601bdb53a 100644 --- a/frontend/src/components/canvas/utils/runAnimation.js +++ b/frontend/src/components/canvas/utils/runAnimation.js @@ -1,18 +1,18 @@ export default async function runAnimation($el, animations = []) { - const play = (animation) => new Promise(resolve => { - $el.classList.add(animation.value, 'animated') - const removeAnimation = () => { - $el.removeEventListener('animationend', removeAnimation) - $el.removeEventListener('animationcancel', removeAnimation) - $el.classList.remove(animation.value, 'animated') - resolve() - } - - $el.addEventListener('animationend', removeAnimation) - $el.addEventListener('animationcancel', removeAnimation) - }) - - for (let i = 0, len = animations.length; i < len; i++) { - await play(animations[i]) + const play = (animation) => new Promise(resolve => { + $el.classList.add(animation.value, 'animated') + const removeAnimation = () => { + $el.removeEventListener('animationend', removeAnimation) + $el.removeEventListener('animationcancel', removeAnimation) + $el.classList.remove(animation.value, 'animated') + resolve() } + + $el.addEventListener('animationend', removeAnimation) + $el.addEventListener('animationcancel', removeAnimation) + }) + + for (let i = 0, len = animations.length; i < len; i++) { + await play(animations[i]) + } } diff --git a/frontend/src/components/canvas/utils/shortcutKey.js b/frontend/src/components/canvas/utils/shortcutKey.js index 0e445ccc64..0952a555ff 100644 --- a/frontend/src/components/canvas/utils/shortcutKey.js +++ b/frontend/src/components/canvas/utils/shortcutKey.js @@ -1,143 +1,143 @@ import store from '@/store' import eventBus from '@/components/canvas/utils/eventBus' -const ctrlKey = 17, - vKey = 86, // 粘贴 - cKey = 67, // 复制 - xKey = 88, // 剪切 +const ctrlKey = 17 +const vKey = 86 // 粘贴 +const cKey = 67 // 复制 +const xKey = 88 // 剪切 - yKey = 89, // 重做 - zKey = 90, // 撤销 +const yKey = 89 // 重做 +const zKey = 90 // 撤销 - gKey = 71, // 组合 - bKey = 66, // 拆分 +const gKey = 71 // 组合 +const bKey = 66 // 拆分 - lKey = 76, // 锁定 - uKey = 85, // 解锁 +const lKey = 76 // 锁定 +const uKey = 85 // 解锁 - sKey = 83, // 保存 - pKey = 80, // 预览 - dKey = 68, // 删除 - deleteKey = 46, // 删除 - eKey = 69 // 清空画布 +const sKey = 83 // 保存 +const pKey = 80 // 预览 +const dKey = 68 // 删除 +const deleteKey = 46 // 删除 +const eKey = 69 // 清空画布 export const keycodes = [66, 67, 68, 69, 71, 76, 80, 83, 85, 86, 88, 89, 90] // 与组件状态无关的操作 const basemap = { - [vKey]: paste, - [yKey]: redo, - [zKey]: undo, - [sKey]: save, - [pKey]: preview, - [eKey]: clearCanvas, + [vKey]: paste, + [yKey]: redo, + [zKey]: undo, + [sKey]: save, + [pKey]: preview, + [eKey]: clearCanvas } // 组件锁定状态下可以执行的操作 const lockMap = { - ...basemap, - [uKey]: unlock, + ...basemap, + [uKey]: unlock } // 组件未锁定状态下可以执行的操作 const unlockMap = { - ...basemap, - [cKey]: copy, - [xKey]: cut, - [gKey]: compose, - [bKey]: decompose, - [dKey]: deleteComponent, - [deleteKey]: deleteComponent, - [lKey]: lock, + ...basemap, + [cKey]: copy, + [xKey]: cut, + [gKey]: compose, + [bKey]: decompose, + [dKey]: deleteComponent, + [deleteKey]: deleteComponent, + [lKey]: lock } let isCtrlDown = false // 全局监听按键操作并执行相应命令 export function listenGlobalKeyDown() { - window.onkeydown = (e) => { - const { curComponent } = store.state - if (e.keyCode == ctrlKey) { - isCtrlDown = true - } else if (e.keyCode == deleteKey && curComponent) { - store.commit('deleteComponent') - store.commit('recordSnapshot') - } else if (isCtrlDown) { - if (!curComponent || !curComponent.isLock) { - e.preventDefault() - unlockMap[e.keyCode] && unlockMap[e.keyCode]() - } else if (curComponent && curComponent.isLock) { - e.preventDefault() - lockMap[e.keyCode] && lockMap[e.keyCode]() - } - } + window.onkeydown = (e) => { + const { curComponent } = store.state + if (e.keyCode == ctrlKey) { + isCtrlDown = true + } else if (e.keyCode == deleteKey && curComponent) { + store.commit('deleteComponent') + store.commit('recordSnapshot') + } else if (isCtrlDown) { + if (!curComponent || !curComponent.isLock) { + e.preventDefault() + unlockMap[e.keyCode] && unlockMap[e.keyCode]() + } else if (curComponent && curComponent.isLock) { + e.preventDefault() + lockMap[e.keyCode] && lockMap[e.keyCode]() + } } + } - window.onkeyup = (e) => { - if (e.keyCode == ctrlKey) { - isCtrlDown = false - } + window.onkeyup = (e) => { + if (e.keyCode == ctrlKey) { + isCtrlDown = false } + } } function copy() { - store.commit('copy') + store.commit('copy') } function paste() { - store.commit('paste') - store.commit('recordSnapshot') + store.commit('paste') + store.commit('recordSnapshot') } function cut() { - store.commit('cut') + store.commit('cut') } function redo() { - store.commit('redo') + store.commit('redo') } function undo() { - store.commit('undo') + store.commit('undo') } function compose() { - if (store.state.areaData.components.length) { - store.commit('compose') - store.commit('recordSnapshot') - } + if (store.state.areaData.components.length) { + store.commit('compose') + store.commit('recordSnapshot') + } } function decompose() { - const curComponent = store.state.curComponent - if (curComponent && !curComponent.isLock && curComponent.component == 'Group') { - store.commit('decompose') - store.commit('recordSnapshot') - } + const curComponent = store.state.curComponent + if (curComponent && !curComponent.isLock && curComponent.component == 'Group') { + store.commit('decompose') + store.commit('recordSnapshot') + } } function save() { - eventBus.$emit('save') + eventBus.$emit('save') } function preview() { - eventBus.$emit('preview') + eventBus.$emit('preview') } function deleteComponent() { - if (store.state.curComponent) { - store.commit('deleteComponent') - store.commit('recordSnapshot') - } + if (store.state.curComponent) { + store.commit('deleteComponent') + store.commit('recordSnapshot') + } } function clearCanvas() { - eventBus.$emit('clearCanvas') + eventBus.$emit('clearCanvas') } function lock() { - store.commit('lock') + store.commit('lock') } function unlock() { - store.commit('unlock') + store.commit('unlock') } diff --git a/frontend/src/components/canvas/utils/toast.js b/frontend/src/components/canvas/utils/toast.js index fad84177b7..859e53e6f5 100644 --- a/frontend/src/components/canvas/utils/toast.js +++ b/frontend/src/components/canvas/utils/toast.js @@ -1,9 +1,9 @@ import { Message } from 'element-ui' export default function toast(message = '', type = 'error', duration = 1500) { - Message({ - message, - type, - duration, - }) -} \ No newline at end of file + Message({ + message, + type, + duration + }) +} diff --git a/frontend/src/components/canvas/utils/utils.js b/frontend/src/components/canvas/utils/utils.js index 4900a4b28c..cdce9342c3 100644 --- a/frontend/src/components/canvas/utils/utils.js +++ b/frontend/src/components/canvas/utils/utils.js @@ -1,26 +1,26 @@ export function deepCopy(target) { - if (typeof target == 'object') { - const result = Array.isArray(target)? [] : {} - for (const key in target) { - if (typeof target[key] == 'object') { - result[key] = deepCopy(target[key]) - } else { - result[key] = target[key] - } - } - - return result + if (typeof target === 'object') { + const result = Array.isArray(target) ? [] : {} + for (const key in target) { + if (typeof target[key] === 'object') { + result[key] = deepCopy(target[key]) + } else { + result[key] = target[key] + } } - - return target + + return result + } + + return target } export function swap(arr, i, j) { - const temp = arr[i] - arr[i] = arr[j] - arr[j] = temp + const temp = arr[i] + arr[i] = arr[j] + arr[j] = temp } export function $(selector) { - return document.querySelector(selector) -} \ No newline at end of file + return document.querySelector(selector) +} diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index f61cbdcc22..30f2962361 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -871,6 +871,13 @@ export default { input_limit_2_25: '2-25 chars', input_limit_0_50: '0-50 chars' }, + pblink: { + key_pwd: 'Please enter the password to open the link', + input_placeholder: 'Please enter the 4-digit password', + pwd_error: 'Wrong password', + pwd_format_error: 'Please enter the 4-digit password', + sure_bt: 'Confirm' + }, panel: { no_auth_role: 'Unshared roles', auth_role: 'Shared roles', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 962c9e3e77..ef81334f33 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -871,6 +871,13 @@ export default { input_limit_2_25: '2-25字符', input_limit_0_50: '0-50字符' }, + pblink: { + key_pwd: '請輸入密碼打開鏈接', + input_placeholder: '請輸入4位數字密碼', + pwd_error: '密碼錯誤', + pwd_format_error: '請輸入4位數字密碼', + sure_bt: '確定' + }, panel: { no_auth_role: '未分享角色', auth_role: '已分享角色', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index a7f0fa5671..799ee3af6a 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -871,6 +871,13 @@ export default { input_limit_2_25: '2-25字符', input_limit_0_50: '0-50字符' }, + pblink: { + key_pwd: '请输入密码打开链接', + input_placeholder: '请输入4位数字密码', + pwd_error: '密码错误', + pwd_format_error: '请输入4位数字密码', + sure_bt: '确定' + }, panel: { no_auth_role: '未分享角色', auth_role: '已分享角色', diff --git a/frontend/src/styles/deicon/demo_index.html b/frontend/src/styles/deicon/demo_index.html index 0185d772da..229efa567a 100644 --- a/frontend/src/styles/deicon/demo_index.html +++ b/frontend/src/styles/deicon/demo_index.html @@ -38,7 +38,7 @@

- +

    - +
  • 矩形
    &#xe648;
  • - +
  • text
    &#xe959;
  • - +
  • picture
    &#xe643;
  • - +
  • 输入
    &#xe6ab;
  • - +
  • &#xe628;
  • - +
  • 查询搜索
    &#xe615;
  • - +
  • 季度
    &#xe624;
  • - +
  • 数字顺序
    &#xe7de;
  • - +
  • 树列表
    &#xe6a6;
  • - +
  • 日期
    &#xe639;
  • - +
  • 左侧-区间
    &#xe6dd;
  • - +
  • 列表
    &#xe66f;
  • - +
  • 下拉框
    &#xe8ca;
  • - +
  • 下拉树
    &#xe8d0;
  • - +
  • 重置
    &#xe611;
  • - +
  • &#xe691;
  • - +
  • &#xe692;
  • - +
  • &#xe695;
  • - +

Unicode 引用

@@ -207,7 +207,7 @@
    - +
  • @@ -216,7 +216,7 @@
    .icon-juxing
  • - +
  • @@ -225,7 +225,7 @@
    .icon-text
  • - +
  • @@ -234,7 +234,7 @@
    .icon-picture
  • - +
  • @@ -243,7 +243,7 @@
    .icon-shuru
  • - +
  • @@ -252,7 +252,7 @@
    .icon-tree
  • - +
  • @@ -261,7 +261,7 @@
    .icon-chaxunsousuo
  • - +
  • @@ -270,7 +270,7 @@
    .icon-jidu
  • - +
  • @@ -279,7 +279,7 @@
    .icon-shuzishunxu
  • - +
  • @@ -288,7 +288,7 @@
    .icon-Group-
  • - +
  • @@ -297,7 +297,7 @@
    .icon-riqi
  • - +
  • @@ -306,7 +306,7 @@
    .icon-zuoce-qujian
  • - +
  • @@ -315,7 +315,7 @@
    .icon-liebiao
  • - +
  • @@ -324,7 +324,7 @@
    .icon-xialakuang
  • - +
  • @@ -333,7 +333,7 @@
    .icon-xialashu
  • - +
  • @@ -342,7 +342,7 @@
    .icon-zhongzhi
  • - +
  • @@ -351,7 +351,7 @@
    .icon-ri
  • - +
  • @@ -360,7 +360,7 @@
    .icon-nian
  • - +
  • @@ -369,7 +369,7 @@
    .icon-yue
  • - +

font-class 引用

@@ -396,7 +396,7 @@
    - +
  • 矩形
    #icon-juxing
  • - +
  • text
    #icon-text
  • - +
  • picture
    #icon-picture
  • - +
  • 输入
    #icon-shuru
  • - +
  • #icon-tree
  • - +
  • 查询搜索
    #icon-chaxunsousuo
  • - +
  • 季度
    #icon-jidu
  • - +
  • 数字顺序
    #icon-shuzishunxu
  • - +
  • 树列表
    #icon-Group-
  • - +
  • 日期
    #icon-riqi
  • - +
  • 左侧-区间
    #icon-zuoce-qujian
  • - +
  • 列表
    #icon-liebiao
  • - +
  • 下拉框
    #icon-xialakuang
  • - +
  • 下拉树
    #icon-xialashu
  • - +
  • 重置
    #icon-zhongzhi
  • - +
  • #icon-ri
  • - +
  • #icon-nian
  • - +
  • #icon-yue
  • - +

Symbol 引用

diff --git a/frontend/src/styles/deicon/iconfont.js b/frontend/src/styles/deicon/iconfont.js index c5ccd4d7c0..515bb2ce73 100644 --- a/frontend/src/styles/deicon/iconfont.js +++ b/frontend/src/styles/deicon/iconfont.js @@ -1 +1 @@ -!function(c){var h,a,l,v,t,o,i='',e=(e=document.getElementsByTagName("script"))[e.length-1].getAttribute("data-injectcss");if(e&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function z(){t||(t=!0,l())}h=function(){var c,h,a;(a=document.createElement("div")).innerHTML=i,i=null,(h=a.getElementsByTagName("svg")[0])&&(h.setAttribute("aria-hidden","true"),h.style.position="absolute",h.style.width=0,h.style.height=0,h.style.overflow="hidden",c=h,(a=document.body).firstChild?(h=a.firstChild).parentNode.insertBefore(c,h):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),h()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(l=h,v=c.document,t=!1,(o=function(){try{v.documentElement.doScroll("left")}catch(c){return void setTimeout(o,50)}z()})(),v.onreadystatechange=function(){"complete"==v.readyState&&(v.onreadystatechange=null,z())})}(window); \ No newline at end of file +!(function(c) { var h; var a; var l; var v; var t; var o; var i = ''; var e = (e = document.getElementsByTagName('script'))[e.length - 1].getAttribute('data-injectcss'); if (e && !c.__iconfont__svg__cssinject__) { c.__iconfont__svg__cssinject__ = !0; try { document.write('') } catch (c) { console && console.log(c) } } function z() { t || (t = !0, l()) }h = function() { var c, h, a; (a = document.createElement('div')).innerHTML = i, i = null, (h = a.getElementsByTagName('svg')[0]) && (h.setAttribute('aria-hidden', 'true'), h.style.position = 'absolute', h.style.width = 0, h.style.height = 0, h.style.overflow = 'hidden', c = h, (a = document.body).firstChild ? (h = a.firstChild).parentNode.insertBefore(c, h) : a.appendChild(c)) }, document.addEventListener ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) ? setTimeout(h, 0) : (a = function() { document.removeEventListener('DOMContentLoaded', a, !1), h() }, document.addEventListener('DOMContentLoaded', a, !1)) : document.attachEvent && (l = h, v = c.document, t = !1, (o = function() { try { v.documentElement.doScroll('left') } catch (c) { return void setTimeout(o, 50) }z() })(), v.onreadystatechange = function() { v.readyState == 'complete' && (v.onreadystatechange = null, z()) }) }(window)) diff --git a/frontend/src/views/link/pwd/index.vue b/frontend/src/views/link/pwd/index.vue index b365faa011..9ce3dc973e 100644 --- a/frontend/src/views/link/pwd/index.vue +++ b/frontend/src/views/link/pwd/index.vue @@ -5,14 +5,18 @@
- 请输入密码打开链接 + {{ $t('pblink.key_pwd') }}
- + + + + +
@@ -22,7 +26,7 @@
- 确定 + {{ $t('pblink.sure_bt') }}
@@ -45,24 +49,38 @@ export default { }, data() { return { - pwd: null, - msg: null + msg: null, + form: { password: null }, + rule: { + password: [ + { required: true, message: this.$t('pblink.key_pwd'), trigger: 'blur' }, + { + required: true, + pattern: /^\d{4}$/, + message: this.$t('pblink.pwd_format_error'), + trigger: 'blur' + } + ] + } } }, methods: { // 验证密码是否正确 如果正确 设置请求头部带LINK-PWD-TOKEN=entrypt(pwd)再刷新页面 refresh() { - const param = { - password: encrypt(this.pwd), - resourceId: this.resourceId - } - validatePwd(param).then(res => { - if (!res.data) { - this.msg = '密码错误' - } else { - window.location.reload() + this.$refs.pwdForm.validate(valid => { + if (!valid) return false + const param = { + password: encrypt(this.form.password), + resourceId: this.resourceId } + validatePwd(param).then(res => { + if (!res.data) { + this.msg = this.$t('pblink.pwd_error') + } else { + window.location.reload() + } + }) }) } } @@ -145,25 +163,25 @@ export default { display: block; } .input-layout{ - width: 152px; + width: 200px; position: relative; margin: 0px auto; padding: 0; display: block; } .input-main { - width: 150px; - height: 30px; + width: 192px; + height: 35px; position: relative; margin-top: 30px; border: 1px solid #e8eaed; display: block; } - .div-input { - inset: 2px 4px; - position: absolute; - display: block; - } + // .div-input { + // inset: 2px 4px; + // position: absolute; + // display: block; + // } .abs-input { height: 20px; position: relative; @@ -183,18 +201,18 @@ export default { color: #E65251; box-sizing: border-box; } - .real-input { - width: 100%; - height: 100%; - border: none; - outline: none; - padding: 0px; - margin: 0px; - inset: 0px; - position: absolute; - display: block; + // .real-input { + // width: 100%; + // height: 100%; + // border: none; + // outline: none; + // padding: 0px; + // margin: 0px; + // inset: 0px; + // position: absolute; + // display: block; - } + // } .auth-root-class { margin: 15px 0px 5px; text-align: center; diff --git a/frontend/src/views/panel/SubjectSetting/PreSubject/SubjectTemplateItemback.vue b/frontend/src/views/panel/SubjectSetting/PreSubject/SubjectTemplateItemback.vue index eb6d94f9cd..2310a7163c 100644 --- a/frontend/src/views/panel/SubjectSetting/PreSubject/SubjectTemplateItemback.vue +++ b/frontend/src/views/panel/SubjectSetting/PreSubject/SubjectTemplateItemback.vue @@ -80,7 +80,7 @@ export default { background: '0% 0% / cover rgb(239, 241, 244)' } if (this.subjectItemDetails) { - if (this.subjectItemDetails.panel.backgroundType === 'image'&&this.subjectItemDetails.panel.imageUrl) { + if (this.subjectItemDetails.panel.backgroundType === 'image' && this.subjectItemDetails.panel.imageUrl) { style = { width: '100%', height: '100%', diff --git a/frontend/src/views/panel/SubjectSetting/index.vue b/frontend/src/views/panel/SubjectSetting/index.vue index 74c0874338..30661989fc 100644 --- a/frontend/src/views/panel/SubjectSetting/index.vue +++ b/frontend/src/views/panel/SubjectSetting/index.vue @@ -20,16 +20,16 @@ - - - - - + + + + +
diff --git a/frontend/src/views/panel/list/PanelList.vue b/frontend/src/views/panel/list/PanelList.vue index 2854abe3a6..540b707bc3 100644 --- a/frontend/src/views/panel/list/PanelList.vue +++ b/frontend/src/views/panel/list/PanelList.vue @@ -178,7 +178,7 @@ import bus from '@/utils/bus' import EditPanel from './EditPanel' import { addGroup, delGroup, groupTree, defaultTree, findOne } from '@/api/panel/panel' import { - DEFAULT_COMMON_CANVAS_STYLE_STRING + DEFAULT_COMMON_CANVAS_STYLE_STRING } from '@/views/panel/panel' export default {