Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
b82e4f2863
@ -370,6 +370,9 @@ public class ExcelXlsReader implements HSSFListener {
|
|||||||
|
|
||||||
|
|
||||||
private String checkType(String str, int thisColumn) {
|
private String checkType(String str, int thisColumn) {
|
||||||
|
if (str.length() > 19) {
|
||||||
|
return "TEXT";
|
||||||
|
}
|
||||||
String type = null;
|
String type = null;
|
||||||
try {
|
try {
|
||||||
double d = Double.valueOf(str);
|
double d = Double.valueOf(str);
|
||||||
|
|||||||
@ -5,16 +5,17 @@ import com.auth0.jwt.interfaces.DecodedJWT;
|
|||||||
import io.dataease.auth.filter.F2CLinkFilter;
|
import io.dataease.auth.filter.F2CLinkFilter;
|
||||||
import io.dataease.commons.constants.SysLogConstants;
|
import io.dataease.commons.constants.SysLogConstants;
|
||||||
import io.dataease.commons.utils.DeLogUtils;
|
import io.dataease.commons.utils.DeLogUtils;
|
||||||
import io.dataease.plugins.common.base.domain.PanelGroupWithBLOBs;
|
|
||||||
import io.dataease.plugins.common.base.domain.PanelLink;
|
|
||||||
import io.dataease.controller.panel.api.LinkApi;
|
import io.dataease.controller.panel.api.LinkApi;
|
||||||
import io.dataease.controller.request.chart.ChartExtRequest;
|
import io.dataease.controller.request.chart.ChartExtRequest;
|
||||||
import io.dataease.controller.request.panel.link.*;
|
import io.dataease.controller.request.panel.link.*;
|
||||||
import io.dataease.dto.panel.link.GenerateDto;
|
import io.dataease.dto.panel.link.GenerateDto;
|
||||||
import io.dataease.dto.panel.link.ValidateDto;
|
import io.dataease.dto.panel.link.ValidateDto;
|
||||||
|
import io.dataease.plugins.common.base.domain.PanelGroupWithBLOBs;
|
||||||
|
import io.dataease.plugins.common.base.domain.PanelLink;
|
||||||
import io.dataease.service.chart.ChartViewService;
|
import io.dataease.service.chart.ChartViewService;
|
||||||
import io.dataease.service.panel.PanelLinkService;
|
import io.dataease.service.panel.PanelLinkService;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@ -25,6 +26,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@ -65,22 +67,32 @@ public class LinkServer implements LinkApi {
|
|||||||
@Override
|
@Override
|
||||||
public ValidateDto validate(@RequestBody LinkValidateRequest request) throws Exception {
|
public ValidateDto validate(@RequestBody LinkValidateRequest request) throws Exception {
|
||||||
String link = request.getLink();
|
String link = request.getLink();
|
||||||
link = URLDecoder.decode(link, "UTF-8");
|
link = URLDecoder.decode(link, StandardCharsets.UTF_8);
|
||||||
String json = panelLinkService.decryptParam(link);
|
String json = panelLinkService.decryptParam(link);
|
||||||
|
String[] jsonArray = json.split(",");
|
||||||
|
String uuid = null;
|
||||||
|
int len = jsonArray.length;
|
||||||
|
if (len > 1) {
|
||||||
|
uuid = jsonArray[1];
|
||||||
|
}
|
||||||
String user = request.getUser();
|
String user = request.getUser();
|
||||||
user = URLDecoder.decode(user, "UTF-8");
|
user = URLDecoder.decode(user, StandardCharsets.UTF_8);
|
||||||
user = panelLinkService.decryptParam(user);
|
user = panelLinkService.decryptParam(user);
|
||||||
|
|
||||||
ValidateDto dto = new ValidateDto();
|
ValidateDto dto = new ValidateDto();
|
||||||
dto.setUserId(user);
|
dto.setUserId(user);
|
||||||
String resourceId = json;
|
String resourceId = jsonArray[0];
|
||||||
PanelLink one = panelLinkService.findOne(resourceId, Long.valueOf(user));
|
PanelLink one = panelLinkService.findOne(resourceId, Long.valueOf(user));
|
||||||
dto.setResourceId(resourceId);
|
dto.setResourceId(resourceId);
|
||||||
if (ObjectUtils.isEmpty(one)) {
|
if (ObjectUtils.isEmpty(one)) {
|
||||||
dto.setValid(false);
|
dto.setValid(false);
|
||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
|
String mappingUuid = panelLinkService.getMappingUuid(one);
|
||||||
|
if (!StringUtils.equals(uuid, mappingUuid)) {
|
||||||
|
dto.setValid(false);
|
||||||
|
return dto;
|
||||||
|
}
|
||||||
dto.setValid(one.getValid());
|
dto.setValid(one.getValid());
|
||||||
dto.setEnablePwd(one.getEnablePwd());
|
dto.setEnablePwd(one.getEnablePwd());
|
||||||
dto.setPassPwd(panelLinkService.validateHeads(one));
|
dto.setPassPwd(panelLinkService.validateHeads(one));
|
||||||
@ -94,8 +106,8 @@ public class LinkServer implements LinkApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object resourceDetail(@PathVariable String resourceId,@PathVariable String userId) {
|
public Object resourceDetail(@PathVariable String resourceId, @PathVariable String userId) {
|
||||||
return panelLinkService.resourceInfo(resourceId,userId);
|
return panelLinkService.resourceInfo(resourceId, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -125,7 +137,7 @@ public class LinkServer implements LinkApi {
|
|||||||
operateType = SysLogConstants.OPERATE_TYPE.MB_VIEW;
|
operateType = SysLogConstants.OPERATE_TYPE.MB_VIEW;
|
||||||
}
|
}
|
||||||
if (ObjectUtils.isEmpty(userId)) return;
|
if (ObjectUtils.isEmpty(userId)) return;
|
||||||
PanelGroupWithBLOBs panelGroupWithBLOBs = panelLinkService.resourceInfo(panelId,String.valueOf(userId));
|
PanelGroupWithBLOBs panelGroupWithBLOBs = panelLinkService.resourceInfo(panelId, String.valueOf(userId));
|
||||||
String pid = panelGroupWithBLOBs.getPid();
|
String pid = panelGroupWithBLOBs.getPid();
|
||||||
DeLogUtils.save(operateType, SysLogConstants.SOURCE_TYPE.LINK, panelId, pid, userId, SysLogConstants.SOURCE_TYPE.USER);
|
DeLogUtils.save(operateType, SysLogConstants.SOURCE_TYPE.LINK, panelId, pid, userId, SysLogConstants.SOURCE_TYPE.USER);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,17 +3,15 @@
|
|||||||
<mapper namespace="io.dataease.ext.MobileDirMapper">
|
<mapper namespace="io.dataease.ext.MobileDirMapper">
|
||||||
|
|
||||||
<select id="query" resultType="io.dataease.mobile.entity.PanelEntity">
|
<select id="query" resultType="io.dataease.mobile.entity.PanelEntity">
|
||||||
SELECT
|
SELECT id,
|
||||||
id,
|
NAME AS text,
|
||||||
NAME AS text,
|
pid,
|
||||||
pid,
|
node_type AS `type`
|
||||||
node_type AS `type`
|
FROM panel_group g,
|
||||||
FROM
|
(SELECT GET_V_AUTH_MODEL_ID_P_USE_MOBILE(#{userId}, 'panel') cids) t
|
||||||
panel_group g,
|
WHERE g.pid = #{pid}
|
||||||
( SELECT GET_V_AUTH_MODEL_ID_P_USE_MOBILE ( #{userId}, 'panel' ) cids ) t
|
AND FIND_IN_SET(g.id, cids)
|
||||||
WHERE
|
ORDER BY g.panel_sort desc, CONVERT(g.name using gbk)
|
||||||
g.pid = #{pid}
|
|
||||||
AND FIND_IN_SET( g.id, cids )
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryWithName" resultType="io.dataease.mobile.entity.PanelEntity">
|
<select id="queryWithName" resultType="io.dataease.mobile.entity.PanelEntity">
|
||||||
@ -26,35 +24,34 @@
|
|||||||
panel_group g,
|
panel_group g,
|
||||||
( SELECT GET_V_AUTH_MODEL_ID_P_USE_MOBILE ( #{userId}, 'panel' ) cids ) t
|
( SELECT GET_V_AUTH_MODEL_ID_P_USE_MOBILE ( #{userId}, 'panel' ) cids ) t
|
||||||
WHERE
|
WHERE
|
||||||
FIND_IN_SET( g.id, cids )
|
FIND_IN_SET( g.id, cids )
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
and name like CONCAT('%', #{name, jdbcType=VARCHAR}, '%')
|
and name like CONCAT('%', #{name, jdbcType=VARCHAR}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
ORDER BY g.panel_sort desc, CONVERT(g.name using gbk)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="idsWithUser" resultType="java.lang.String">
|
<select id="idsWithUser" resultType="java.lang.String">
|
||||||
select a.auth_source
|
select a.auth_source
|
||||||
from sys_auth a
|
from sys_auth a
|
||||||
left join sys_auth_detail d on a.id = d.auth_id
|
left join sys_auth_detail d on a.id = d.auth_id
|
||||||
where
|
where a.auth_target_type = 'user'
|
||||||
a.auth_target_type = 'user' and
|
and a.auth_target = #{userId}
|
||||||
a.auth_target = #{userId} and
|
and a.auth_source_type = 'panel'
|
||||||
a.auth_source_type = 'panel' and
|
and d.privilege_type = 1
|
||||||
d.privilege_type = 1 and
|
and d.privilege_value = 1
|
||||||
d.privilege_value = 1
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="idsWithDept" resultType="java.lang.String">
|
<select id="idsWithDept" resultType="java.lang.String">
|
||||||
select a.auth_source
|
select a.auth_source
|
||||||
from sys_auth a
|
from sys_auth a
|
||||||
left join sys_auth_detail d on a.id = d.auth_id
|
left join sys_auth_detail d on a.id = d.auth_id
|
||||||
where
|
where a.auth_target_type = 'dept'
|
||||||
a.auth_target_type = 'dept' and
|
and a.auth_target = #{deptId}
|
||||||
a.auth_target = #{deptId} and
|
and a.auth_source_type = 'panel'
|
||||||
a.auth_source_type = 'panel' and
|
and d.privilege_type = 1
|
||||||
d.privilege_type = 1 and
|
and d.privilege_value = 1
|
||||||
d.privilege_value = 1
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="idsWithRoles" resultType="java.lang.String">
|
<select id="idsWithRoles" resultType="java.lang.String">
|
||||||
@ -62,20 +59,16 @@
|
|||||||
from sys_auth a
|
from sys_auth a
|
||||||
left join sys_auth_detail d on a.id = d.auth_id
|
left join sys_auth_detail d on a.id = d.auth_id
|
||||||
where
|
where
|
||||||
a.auth_target_type = 'role' and
|
a.auth_target_type = 'role' and
|
||||||
a.auth_target in
|
a.auth_target in
|
||||||
<foreach collection="roleIds" item="roleId" open='(' separator=',' close=')'>
|
<foreach collection="roleIds" item="roleId" open='(' separator=',' close=')'>
|
||||||
#{roleId}
|
#{roleId}
|
||||||
</foreach>
|
</foreach>
|
||||||
and
|
and
|
||||||
a.auth_source_type = 'panel' and
|
a.auth_source_type = 'panel' and
|
||||||
d.privilege_type = 1 and
|
d.privilege_type = 1 and
|
||||||
d.privilege_value = 1
|
d.privilege_value = 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -63,15 +63,15 @@ public class DorisDDLProvider extends DDLProviderImpl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sql = sql.replace("`UNIQUE_KEY`", "`" + String.join("`, `", keys) + "`")
|
sql = sql.replace("`UNIQUE_KEY`", "`" + String.join("`, `", keys) + "`")
|
||||||
.replace("DISTRIBUTED_BY_HASH", keys.get(0)).replace("Column_Fields", createDorisTableColumnSql(datasetTableFields, version));
|
.replace("DISTRIBUTED_BY_HASH", keys.get(0)).replace("Column_Fields", createDorisTableColumnSql(datasetTableFields, version, keys));
|
||||||
} else {
|
} else {
|
||||||
sql = sql.replace("UNIQUE_KEY", "dataease_uuid").replace("DISTRIBUTED_BY_HASH", "dataease_uuid").replace("Column_Fields", createDorisTableColumnSql(datasetTableFields, version));
|
sql = sql.replace("UNIQUE_KEY", "dataease_uuid").replace("DISTRIBUTED_BY_HASH", "dataease_uuid").replace("Column_Fields", createDorisTableColumnSql(datasetTableFields, version, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String createDorisTableColumnSql(final List<DatasetTableField> datasetTableFields, String version) {
|
private String createDorisTableColumnSql(final List<DatasetTableField> datasetTableFields, String version, List<String> keys) {
|
||||||
StringBuilder Column_Fields = new StringBuilder("`");
|
StringBuilder Column_Fields = new StringBuilder("`");
|
||||||
for (DatasetTableField datasetTableField : datasetTableFields) {
|
for (DatasetTableField datasetTableField : datasetTableFields) {
|
||||||
Column_Fields.append(datasetTableField.getDataeaseName()).append("` ");
|
Column_Fields.append(datasetTableField.getDataeaseName()).append("` ");
|
||||||
@ -81,11 +81,14 @@ public class DorisDDLProvider extends DDLProviderImpl {
|
|||||||
}
|
}
|
||||||
switch (datasetTableField.getDeExtractType()) {
|
switch (datasetTableField.getDeExtractType()) {
|
||||||
case 0:
|
case 0:
|
||||||
Column_Fields.append("STRING".replace("length", String.valueOf(size))).append(",`");
|
if (size <= 65533 || (keys != null && keys.contains(datasetTableField.getDataeaseName()))) {
|
||||||
|
Column_Fields.append("VARCHAR(length)".replace("length", String.valueOf(size))).append(",`");
|
||||||
|
} else {
|
||||||
|
Column_Fields.append("STRING".replace("length", String.valueOf(size))).append(",`");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
size = size < 50 ? 50 : size;
|
Column_Fields.append("DATETIME").append(",`");
|
||||||
Column_Fields.append("STRING".replace("length", String.valueOf(size))).append(",`");
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Column_Fields.append("bigint").append(",`");
|
Column_Fields.append("bigint").append(",`");
|
||||||
@ -99,7 +102,7 @@ public class DorisDDLProvider extends DDLProviderImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Column_Fields.append("DOUBLE").append(",`");
|
Column_Fields.append("DECIMAL(27,8)").append(",`");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
|||||||
@ -437,10 +437,10 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSQLTableInfo(String table, List<ChartViewFieldDTO> xAxis, FilterTreeObj fieldCustomFilter, List<DataSetRowPermissionsTreeDTO> rowPermissionsTree, List<ChartExtFilterRequest> extFilterRequestList, Datasource ds, ChartViewWithBLOBs view) {
|
public String getSQLTableInfo(String table, List<ChartViewFieldDTO> xAxis, FilterTreeObj fieldCustomFilter, List<DataSetRowPermissionsTreeDTO> rowPermissionsTree, List<ChartExtFilterRequest> extFilterRequestList, Datasource ds, ChartViewWithBLOBs view) {
|
||||||
return originTableInfo(table, xAxis, fieldCustomFilter, rowPermissionsTree, extFilterRequestList, ds, view, true, true);
|
return originTableInfo(table, xAxis, fieldCustomFilter, rowPermissionsTree, extFilterRequestList, ds, view, true, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String originTableInfo(String table, List<ChartViewFieldDTO> xAxis, FilterTreeObj fieldCustomFilter, List<DataSetRowPermissionsTreeDTO> rowPermissionsTree, List<ChartExtFilterRequest> extFilterRequestList, Datasource ds, ChartViewWithBLOBs view, boolean needOrder, boolean needResultCount) {
|
public String originTableInfo(String table, List<ChartViewFieldDTO> xAxis, FilterTreeObj fieldCustomFilter, List<DataSetRowPermissionsTreeDTO> rowPermissionsTree, List<ChartExtFilterRequest> extFilterRequestList, Datasource ds, ChartViewWithBLOBs view, boolean needOrder, boolean needResultCount, boolean ignoreOrder) {
|
||||||
SQLObj tableObj = SQLObj.builder()
|
SQLObj tableObj = SQLObj.builder()
|
||||||
.tableName((table.startsWith("(") && table.endsWith(")")) ? table : String.format(SqlServerSQLConstants.KEYWORD_TABLE, table))
|
.tableName((table.startsWith("(") && table.endsWith(")")) ? table : String.format(SqlServerSQLConstants.KEYWORD_TABLE, table))
|
||||||
.tableAlias(String.format(TABLE_ALIAS_PREFIX, 0))
|
.tableAlias(String.format(TABLE_ALIAS_PREFIX, 0))
|
||||||
@ -494,13 +494,15 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
groups.addAll(xFields);
|
groups.addAll(xFields);
|
||||||
// 外层再次套sql
|
// 外层再次套sql
|
||||||
List<SQLObj> orders = new ArrayList<>();
|
List<SQLObj> orders = new ArrayList<>();
|
||||||
orders.addAll(xOrders);
|
if (!ignoreOrder) {
|
||||||
if (needOrder && CollectionUtils.isEmpty(xOrders)) {
|
orders.addAll(xOrders);
|
||||||
orders.add(SQLObj.builder()
|
if (needOrder && CollectionUtils.isEmpty(xOrders)) {
|
||||||
.orderField(String.format(SQLConstants.FIELD_ALIAS_X_PREFIX, 0))
|
orders.add(SQLObj.builder()
|
||||||
.orderAlias(String.format(SQLConstants.FIELD_ALIAS_X_PREFIX, 0))
|
.orderField(String.format(SQLConstants.FIELD_ALIAS_X_PREFIX, 0))
|
||||||
.orderDirection("ASC")
|
.orderAlias(String.format(SQLConstants.FIELD_ALIAS_X_PREFIX, 0))
|
||||||
.build());
|
.orderDirection("ASC")
|
||||||
|
.build());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
STGroup stg = new STGroupFile(SQLConstants.SQL_TEMPLATE);
|
STGroup stg = new STGroupFile(SQLConstants.SQL_TEMPLATE);
|
||||||
@ -526,8 +528,8 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
return st.render();
|
return st.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String originSQLAsTmpTableInfo(String sql, List<ChartViewFieldDTO> xAxis, FilterTreeObj fieldCustomFilter, List<DataSetRowPermissionsTreeDTO> rowPermissionsTree, List<ChartExtFilterRequest> extFilterRequestList, Datasource ds, ChartViewWithBLOBs view, boolean needOrder) {
|
public String originSQLAsTmpTableInfo(String sql, List<ChartViewFieldDTO> xAxis, FilterTreeObj fieldCustomFilter, List<DataSetRowPermissionsTreeDTO> rowPermissionsTree, List<ChartExtFilterRequest> extFilterRequestList, Datasource ds, ChartViewWithBLOBs view, boolean needOrder, boolean ignoreOrder) {
|
||||||
return originTableInfo("(" + sqlFix(sql) + ")", xAxis, fieldCustomFilter, rowPermissionsTree, extFilterRequestList, null, view, needOrder, true);
|
return originTableInfo("(" + sqlFix(sql) + ")", xAxis, fieldCustomFilter, rowPermissionsTree, extFilterRequestList, null, view, needOrder, true, ignoreOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSQLWithPage(boolean isTable, String sql, List<ChartViewFieldDTO> xAxis, FilterTreeObj fieldCustomFilter, List<DataSetRowPermissionsTreeDTO> rowPermissionsTree, List<ChartExtFilterRequest> extFilterRequestList, Datasource ds, ChartViewWithBLOBs view, PageInfo pageInfo) {
|
public String getSQLWithPage(boolean isTable, String sql, List<ChartViewFieldDTO> xAxis, FilterTreeObj fieldCustomFilter, List<DataSetRowPermissionsTreeDTO> rowPermissionsTree, List<ChartExtFilterRequest> extFilterRequestList, Datasource ds, ChartViewWithBLOBs view, PageInfo pageInfo) {
|
||||||
@ -541,9 +543,9 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
boolean isPage = (pageInfo.getGoPage() != null && pageInfo.getPageSize() != null);
|
boolean isPage = (pageInfo.getGoPage() != null && pageInfo.getPageSize() != null);
|
||||||
String limit = (isPage ? " OFFSET " + (pageInfo.getGoPage() - 1) * pageInfo.getPageSize() + " ROW FETCH NEXT " + pageInfo.getPageSize() + " ROW ONLY " : "");
|
String limit = (isPage ? " OFFSET " + (pageInfo.getGoPage() - 1) * pageInfo.getPageSize() + " ROW FETCH NEXT " + pageInfo.getPageSize() + " ROW ONLY " : "");
|
||||||
if (isTable) {
|
if (isTable) {
|
||||||
return originTableInfo(sql, xAxis, fieldCustomFilter, rowPermissionsTree, extFilterRequestList, ds, view, true, !isPage) + limit;
|
return originTableInfo(sql, xAxis, fieldCustomFilter, rowPermissionsTree, extFilterRequestList, ds, view, true, !isPage, false) + limit;
|
||||||
} else {
|
} else {
|
||||||
return originTableInfo("(" + sqlFix(sql) + ")", xAxis, fieldCustomFilter, rowPermissionsTree, extFilterRequestList, ds, view, true, !isPage) + limit;
|
return originTableInfo("(" + sqlFix(sql) + ")", xAxis, fieldCustomFilter, rowPermissionsTree, extFilterRequestList, ds, view, true, !isPage, false) + limit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1788,9 +1790,9 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
@Override
|
@Override
|
||||||
public String getResultCount(boolean isTable, String sql, List<ChartViewFieldDTO> xAxis, FilterTreeObj fieldCustomFilter, List<DataSetRowPermissionsTreeDTO> rowPermissionsTree, List<ChartExtFilterRequest> extFilterRequestList, Datasource ds, ChartViewWithBLOBs view) {
|
public String getResultCount(boolean isTable, String sql, List<ChartViewFieldDTO> xAxis, FilterTreeObj fieldCustomFilter, List<DataSetRowPermissionsTreeDTO> rowPermissionsTree, List<ChartExtFilterRequest> extFilterRequestList, Datasource ds, ChartViewWithBLOBs view) {
|
||||||
if (isTable) {
|
if (isTable) {
|
||||||
return "SELECT COUNT(*) AS count from (" + originTableInfo(sql, xAxis, fieldCustomFilter, rowPermissionsTree, extFilterRequestList, ds, view, false, true) + ") COUNT_TEMP";
|
return "SELECT COUNT(*) AS count from (" + originTableInfo(sql, xAxis, fieldCustomFilter, rowPermissionsTree, extFilterRequestList, ds, view, false, true, true) + ") COUNT_TEMP";
|
||||||
} else {
|
} else {
|
||||||
return "SELECT COUNT(*) AS count from (" + originSQLAsTmpTableInfo(sql, xAxis, fieldCustomFilter, rowPermissionsTree, extFilterRequestList, ds, view, false) + ") COUNT_TEMP";
|
return "SELECT COUNT(*) AS count from (" + originSQLAsTmpTableInfo(sql, xAxis, fieldCustomFilter, rowPermissionsTree, extFilterRequestList, ds, view, false, true) + ") COUNT_TEMP";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2949,6 +2949,9 @@ public class DataSetTableService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String cellType(String value) {
|
private String cellType(String value) {
|
||||||
|
if (value.length() > 19) {
|
||||||
|
return "TEXT";
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
sdf.parse(value);
|
sdf.parse(value);
|
||||||
|
|||||||
@ -449,6 +449,7 @@ public class ExtractDataService {
|
|||||||
datasetTableField.setDeExtractType(0);
|
datasetTableField.setDeExtractType(0);
|
||||||
datasetTableField.setDataeaseName("dataease_uuid");
|
datasetTableField.setDataeaseName("dataease_uuid");
|
||||||
datasetTableField.setOriginName("dataease_uuid");
|
datasetTableField.setOriginName("dataease_uuid");
|
||||||
|
datasetTableField.setSize(0);
|
||||||
datasetTableFields.add(0, datasetTableField);
|
datasetTableFields.add(0, datasetTableField);
|
||||||
return datasetTableFields;
|
return datasetTableFields;
|
||||||
}
|
}
|
||||||
@ -479,9 +480,10 @@ public class ExtractDataService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void extractApiData(DatasetTable datasetTable, Datasource datasource, List<DatasetTableField> datasetTableFields, String extractType) throws Exception {
|
private void extractApiData(DatasetTable datasetTable, Datasource datasource, List<DatasetTableField> datasetTableFields, String extractType) throws Exception {
|
||||||
|
DataTableInfoDTO dataTableInfoDTO = new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class);
|
||||||
List<ApiDefinition> lists = new Gson().fromJson(datasource.getConfiguration(), new TypeToken<ArrayList<ApiDefinition>>() {
|
List<ApiDefinition> lists = new Gson().fromJson(datasource.getConfiguration(), new TypeToken<ArrayList<ApiDefinition>>() {
|
||||||
}.getType());
|
}.getType());
|
||||||
lists = lists.stream().filter(item -> item.getName().equalsIgnoreCase(new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class).getTable())).collect(Collectors.toList());
|
lists = lists.stream().filter(item -> item.getName().equalsIgnoreCase(dataTableInfoDTO.getTable())).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isEmpty(lists)) {
|
if (CollectionUtils.isEmpty(lists)) {
|
||||||
throw new Exception("未找到API数据表");
|
throw new Exception("未找到API数据表");
|
||||||
}
|
}
|
||||||
@ -521,15 +523,16 @@ public class ExtractDataService {
|
|||||||
script = String.format(streamLoadScript, dorisConfiguration.getUsername(), dorisConfiguration.getPassword(), System.currentTimeMillis(), separator, columns, "APPEND", dataFile, dorisConfiguration.getHost(), dorisConfiguration.getHttpPort(), dorisConfiguration.getDataBase(), TableUtils.tableName(datasetTable.getId()), dataFile);
|
script = String.format(streamLoadScript, dorisConfiguration.getUsername(), dorisConfiguration.getPassword(), System.currentTimeMillis(), separator, columns, "APPEND", dataFile, dorisConfiguration.getHost(), dorisConfiguration.getHttpPort(), dorisConfiguration.getDataBase(), TableUtils.tableName(datasetTable.getId()), dataFile);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BufferedWriter bw = new BufferedWriter(new FileWriter(dataFile));
|
BufferedWriter bw = new BufferedWriter(new FileWriter(dataFile));
|
||||||
for (String[] strings : dataList) {
|
for (String[] strings : dataList) {
|
||||||
String content = "";
|
String content = "";
|
||||||
for (int i = 0; i < strings.length; i++) {
|
for (int i = 0; i < strings.length; i++) {
|
||||||
content = content + strings[i] + separator;
|
content = i != strings.length - 1 ? content + strings[i] + separator : content + strings[i];
|
||||||
|
}
|
||||||
|
boolean isSetKey = dataTableInfoDTO.isSetKey() && CollectionUtils.isNotEmpty(dataTableInfoDTO.getKeys());
|
||||||
|
if (!isSetKey) {
|
||||||
|
content = Md5Utils.md5(content) + separator + content;
|
||||||
}
|
}
|
||||||
content = content + Md5Utils.md5(content);
|
|
||||||
bw.write(content);
|
bw.write(content);
|
||||||
bw.newLine();
|
bw.newLine();
|
||||||
}
|
}
|
||||||
@ -565,8 +568,8 @@ public class ExtractDataService {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw e;
|
throw e;
|
||||||
} finally {
|
} finally {
|
||||||
File deleteFile = new File(root_path + datasetTable.getId() + ".sh");
|
// File deleteFile = new File(root_path + datasetTable.getId() + ".sh");
|
||||||
FileUtils.forceDelete(deleteFile);
|
// FileUtils.forceDelete(deleteFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -520,8 +520,7 @@ public class DatasourceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ApiDefinition checkApiDatasource(ApiDefinition apiDefinition) throws Exception {
|
public ApiDefinition checkApiDatasource(ApiDefinition apiDefinition) throws Exception {
|
||||||
BasicInfo basicInfo = systemParameterService.basicInfo();
|
String response = ApiProvider.execHttpRequest(apiDefinition, apiDefinition.getApiQueryTimeout() == null || apiDefinition.getApiQueryTimeout() <= 0 ? 30 : apiDefinition.getApiQueryTimeout());
|
||||||
String response = ApiProvider.execHttpRequest(apiDefinition, StringUtils.isNotBlank(basicInfo.getFrontTimeOut()) ? Integer.parseInt(basicInfo.getFrontTimeOut()) : 10);
|
|
||||||
return ApiProvider.checkApiDefinition(apiDefinition, response);
|
return ApiProvider.checkApiDefinition(apiDefinition, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,10 @@ import io.dataease.auth.config.RsaProperties;
|
|||||||
import io.dataease.auth.util.JWTUtils;
|
import io.dataease.auth.util.JWTUtils;
|
||||||
import io.dataease.auth.util.RsaUtil;
|
import io.dataease.auth.util.RsaUtil;
|
||||||
import io.dataease.commons.constants.SysLogConstants;
|
import io.dataease.commons.constants.SysLogConstants;
|
||||||
import io.dataease.commons.utils.*;
|
import io.dataease.commons.utils.AuthUtils;
|
||||||
|
import io.dataease.commons.utils.CodingUtil;
|
||||||
|
import io.dataease.commons.utils.DeLogUtils;
|
||||||
|
import io.dataease.commons.utils.ServletUtils;
|
||||||
import io.dataease.controller.request.panel.link.EnablePwdRequest;
|
import io.dataease.controller.request.panel.link.EnablePwdRequest;
|
||||||
import io.dataease.controller.request.panel.link.LinkRequest;
|
import io.dataease.controller.request.panel.link.LinkRequest;
|
||||||
import io.dataease.controller.request.panel.link.OverTimeRequest;
|
import io.dataease.controller.request.panel.link.OverTimeRequest;
|
||||||
@ -127,6 +130,16 @@ public class PanelLinkService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getMappingUuid(PanelLink link) {
|
||||||
|
String resourceId = link.getResourceId();
|
||||||
|
Long userId = link.getUserId();
|
||||||
|
PanelLinkMappingExample example = new PanelLinkMappingExample();
|
||||||
|
example.createCriteria().andResourceIdEqualTo(resourceId).andUserIdEqualTo(userId);
|
||||||
|
List<PanelLinkMapping> mappings = panelLinkMappingMapper.selectByExample(example);
|
||||||
|
if (CollectionUtils.isNotEmpty(mappings)) return mappings.get(0).getUuid();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public GenerateDto currentGenerate(String resourceId) {
|
public GenerateDto currentGenerate(String resourceId) {
|
||||||
PanelLink one = findOne(resourceId, AuthUtils.getUser().getUserId());
|
PanelLink one = findOne(resourceId, AuthUtils.getUser().getUserId());
|
||||||
@ -143,14 +156,17 @@ public class PanelLinkService {
|
|||||||
PanelLinkMappingExample example = new PanelLinkMappingExample();
|
PanelLinkMappingExample example = new PanelLinkMappingExample();
|
||||||
example.createCriteria().andResourceIdEqualTo(resourceId).andUserIdEqualTo(AuthUtils.getUser().getUserId());
|
example.createCriteria().andResourceIdEqualTo(resourceId).andUserIdEqualTo(AuthUtils.getUser().getUserId());
|
||||||
List<PanelLinkMapping> mappings = panelLinkMappingMapper.selectByExample(example);
|
List<PanelLinkMapping> mappings = panelLinkMappingMapper.selectByExample(example);
|
||||||
|
PanelLinkMapping mapping = null;
|
||||||
if (CollectionUtils.isEmpty(mappings)) {
|
if (CollectionUtils.isEmpty(mappings)) {
|
||||||
PanelLinkMapping mapping = new PanelLinkMapping();
|
mapping = new PanelLinkMapping();
|
||||||
mapping.setResourceId(resourceId);
|
mapping.setResourceId(resourceId);
|
||||||
mapping.setUserId(AuthUtils.getUser().getUserId());
|
mapping.setUserId(AuthUtils.getUser().getUserId());
|
||||||
mapping.setUuid(CodingUtil.shortUuid());
|
mapping.setUuid(CodingUtil.shortUuid());
|
||||||
panelLinkMappingMapper.insert(mapping);
|
panelLinkMappingMapper.insert(mapping);
|
||||||
|
} else {
|
||||||
|
mapping = mappings.get(0);
|
||||||
}
|
}
|
||||||
return convertDto(one);
|
return convertDto(one, mapping.getUuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteByResourceId(String resourceId) {
|
public void deleteByResourceId(String resourceId) {
|
||||||
@ -177,20 +193,24 @@ public class PanelLinkService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String buildLinkParam(PanelLink link) {
|
private String buildLinkParam(PanelLink link, String uuid) {
|
||||||
String linkParam = encrypt(link.getResourceId());
|
String resourceId = link.getResourceId();
|
||||||
|
if (StringUtils.isNotBlank(uuid)) {
|
||||||
|
resourceId += ("," + uuid);
|
||||||
|
}
|
||||||
|
String linkParam = encrypt(resourceId);
|
||||||
if (link.getUserId() != null) {
|
if (link.getUserId() != null) {
|
||||||
linkParam = linkParam + USERPARAM + encrypt(link.getUserId().toString());
|
linkParam = linkParam + USERPARAM + encrypt(link.getUserId().toString());
|
||||||
}
|
}
|
||||||
return linkParam;
|
return linkParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
private GenerateDto convertDto(PanelLink link) {
|
private GenerateDto convertDto(PanelLink link, String uuid) {
|
||||||
GenerateDto result = new GenerateDto();
|
GenerateDto result = new GenerateDto();
|
||||||
result.setValid(link.getValid());
|
result.setValid(link.getValid());
|
||||||
result.setEnablePwd(link.getEnablePwd());
|
result.setEnablePwd(link.getEnablePwd());
|
||||||
result.setPwd(link.getPwd());
|
result.setPwd(link.getPwd());
|
||||||
result.setUri(BASEURL + buildLinkParam(link));
|
result.setUri(BASEURL + buildLinkParam(link, uuid));
|
||||||
result.setOverTime(link.getOverTime());
|
result.setOverTime(link.getOverTime());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -237,8 +257,8 @@ public class PanelLinkService {
|
|||||||
return pass;
|
return pass;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PanelGroupDTO resourceInfo(String resourceId,String userId) {
|
public PanelGroupDTO resourceInfo(String resourceId, String userId) {
|
||||||
PanelGroupDTO result = extPanelGroupMapper.findOneWithPrivileges(resourceId,userId);
|
PanelGroupDTO result = extPanelGroupMapper.findOneWithPrivileges(resourceId, userId);
|
||||||
result.setWatermarkInfo(panelWatermarkMapper.selectByPrimaryKey("system_default"));
|
result.setWatermarkInfo(panelWatermarkMapper.selectByPrimaryKey("system_default"));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -261,7 +281,7 @@ public class PanelLinkService {
|
|||||||
if (StringUtils.isNotBlank(mapping.getUuid())) {
|
if (StringUtils.isNotBlank(mapping.getUuid())) {
|
||||||
one.setResourceId("error-resource-id");
|
one.setResourceId("error-resource-id");
|
||||||
}
|
}
|
||||||
return convertDto(one).getUri();
|
return convertDto(one, mapping.getUuid()).getUri();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUrlByUuid(String uuid) {
|
public String getUrlByUuid(String uuid) {
|
||||||
@ -271,12 +291,12 @@ public class PanelLinkService {
|
|||||||
if (CollectionUtils.isEmpty(mappings)) {
|
if (CollectionUtils.isEmpty(mappings)) {
|
||||||
PanelLink panelLink = new PanelLink();
|
PanelLink panelLink = new PanelLink();
|
||||||
panelLink.setResourceId("error-resource-id");
|
panelLink.setResourceId("error-resource-id");
|
||||||
return BASEURL + buildLinkParam(panelLink);
|
return BASEURL + buildLinkParam(panelLink, null);
|
||||||
}
|
}
|
||||||
PanelLinkMapping mapping = mappings.get(0);
|
PanelLinkMapping mapping = mappings.get(0);
|
||||||
String resourceId = mapping.getResourceId();
|
String resourceId = mapping.getResourceId();
|
||||||
Long userId = mapping.getUserId();
|
Long userId = mapping.getUserId();
|
||||||
PanelLink one = findOne(resourceId, userId);
|
PanelLink one = findOne(resourceId, userId);
|
||||||
return convertDto(one).getUri();
|
return convertDto(one, uuid).getUri();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,12 @@
|
|||||||
ALTER TABLE `datasource`
|
ALTER TABLE `datasource`
|
||||||
ADD COLUMN `version` varchar(255) NULL COMMENT '版本' AFTER `status`;
|
ADD COLUMN `version` varchar(255) NULL COMMENT '版本' AFTER `status`;
|
||||||
|
|
||||||
ALTER TABLE `sys_auth`
|
ALTER TABLE `sys_auth`
|
||||||
MODIFY COLUMN `auth_details` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '授权明细' AFTER `auth_time`;
|
MODIFY COLUMN `auth_details` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '授权明细' AFTER `auth_time`;
|
||||||
|
|
||||||
ALTER TABLE `sys_auth_detail`
|
ALTER TABLE `sys_auth_detail`
|
||||||
MODIFY COLUMN `privilege_type` int(6) NULL DEFAULT NULL COMMENT '权限类型:1 使用/查看 3 导出/管理 5 仪表板管理 15 授权' AFTER `privilege_name`,
|
MODIFY COLUMN `privilege_type` int(6) NULL DEFAULT NULL COMMENT '权限类型:1 使用/查看 3 导出/管理 5 仪表板管理 15 授权' AFTER `privilege_name`,
|
||||||
MODIFY COLUMN `privilege_value` int(6) NULL DEFAULT NULL COMMENT '权限值:1 可用 0 不可用' AFTER `privilege_type`;
|
MODIFY COLUMN `privilege_value` int(6) NULL DEFAULT NULL COMMENT '权限值:1 可用 0 不可用' AFTER `privilege_type`;
|
||||||
|
|
||||||
|
ALTER TABLE `sys_task_email`
|
||||||
|
MODIFY COLUMN `groups` longtext NULL COMMENT '群聊' AFTER `view_data_range`;
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dataease",
|
"name": "dataease",
|
||||||
"version": "1.18.14",
|
"version": "1.18.15",
|
||||||
"description": "dataease front",
|
"description": "dataease front",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
v-if="isPublicLink"
|
v-if="isPublicLink"
|
||||||
ref="widget-div"
|
ref="widget-div"
|
||||||
class="function-div"
|
class="function-div"
|
||||||
:class="functionClass"
|
:class="[{['function-back-div']: backToTopBtn},functionClass]"
|
||||||
>
|
>
|
||||||
<el-button-group size="mini">
|
<el-button-group size="mini">
|
||||||
<el-button
|
<el-button
|
||||||
@ -39,8 +39,8 @@
|
|||||||
icon-class="link-down"
|
icon-class="link-down"
|
||||||
/>{{ $t('panel.down') }}</span></el-button>
|
/>{{ $t('panel.down') }}</span></el-button>
|
||||||
<el-button
|
<el-button
|
||||||
id="fullscreenElement"
|
|
||||||
v-if="isPcTerminal"
|
v-if="isPcTerminal"
|
||||||
|
id="fullscreenElement"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="toggleFullscreen"
|
@click="toggleFullscreen"
|
||||||
>
|
>
|
||||||
@ -48,15 +48,8 @@
|
|||||||
style="width: 12px;height: 12px"
|
style="width: 12px;height: 12px"
|
||||||
:icon-class="fullscreenState?'public_fullscreen_exit':'public_fullscreen'"
|
:icon-class="fullscreenState?'public_fullscreen_exit':'public_fullscreen'"
|
||||||
/>{{ fullscreenState?$t('panel.fullscreen_exit'): $t('panel.fullscreen_preview') }}</span></el-button>
|
/>{{ fullscreenState?$t('panel.fullscreen_exit'): $t('panel.fullscreen_preview') }}</span></el-button>
|
||||||
<el-button
|
|
||||||
v-show="backToTopBtn"
|
|
||||||
size="mini"
|
|
||||||
type="warning"
|
|
||||||
@click="backToTop"
|
|
||||||
><i class="icon iconfont icon-back-top" />{{ $t('panel.back_to_top') }}</el-button>
|
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-else-if="existLinkage || backToTopBtn"
|
v-else-if="existLinkage || backToTopBtn"
|
||||||
class="bar-main-right"
|
class="bar-main-right"
|
||||||
@ -75,6 +68,16 @@
|
|||||||
@click="backToTop"
|
@click="backToTop"
|
||||||
><i class="icon iconfont icon-back-top" />{{ $t('panel.back_to_top') }}</el-button>
|
><i class="icon iconfont icon-back-top" />{{ $t('panel.back_to_top') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
v-show="isPublicLink && backToTopBtn"
|
||||||
|
class="link-public"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="warning"
|
||||||
|
@click="backToTop"
|
||||||
|
><i class="icon iconfont icon-back-top" />{{ $t('panel.back_to_top') }}</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -131,7 +134,7 @@ export default {
|
|||||||
return this.$route.query.fromLink === 'true'
|
return this.$route.query.fromLink === 'true'
|
||||||
},
|
},
|
||||||
containerClass() {
|
containerClass() {
|
||||||
return this.isPublicLink ? 'trans-pc' : 'bar-main'
|
return this.isPublicLink && this.isPcTerminal ? 'trans-pc' : 'bar-main'
|
||||||
},
|
},
|
||||||
...mapState([
|
...mapState([
|
||||||
'componentData'
|
'componentData'
|
||||||
@ -293,4 +296,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.link-public {
|
||||||
|
top: -49px;
|
||||||
|
right: 8px;
|
||||||
|
opacity: 0.8;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.function-back-div {
|
||||||
|
right: 100px!important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -846,6 +846,7 @@ export default {
|
|||||||
canvasScroll() {
|
canvasScroll() {
|
||||||
// 当滚动距离超过 100px 时显示返回顶部按钮,否则隐藏按钮
|
// 当滚动距离超过 100px 时显示返回顶部按钮,否则隐藏按钮
|
||||||
this.backToTopBtnShow = this.$refs[this.previewOutRefId].scrollTop > 200
|
this.backToTopBtnShow = this.$refs[this.previewOutRefId].scrollTop > 200
|
||||||
|
console.log('top=' + this.$refs[this.previewOutRefId].scrollTop + ';this.backToTopBtnShow=' + this.backToTopBtnShow)
|
||||||
bus.$emit('onScroll')
|
bus.$emit('onScroll')
|
||||||
},
|
},
|
||||||
initListen() {
|
initListen() {
|
||||||
|
|||||||
@ -175,7 +175,8 @@ export default {
|
|||||||
const range = document.createRange()
|
const range = document.createRange()
|
||||||
const sel = window.getSelection()
|
const sel = window.getSelection()
|
||||||
if (myDiv.childNodes) {
|
if (myDiv.childNodes) {
|
||||||
range.setStart(myDiv.childNodes[myDiv.childNodes.length - 1], 1)
|
range.setStart(myDiv.childNodes[myDiv.childNodes.length - 1]
|
||||||
|
.childNodes[myDiv.childNodes[myDiv.childNodes.length - 1].childNodes.length - 1], 1)
|
||||||
range.collapse(false)
|
range.collapse(false)
|
||||||
sel.removeAllRanges()
|
sel.removeAllRanges()
|
||||||
sel.addRange(range)
|
sel.addRange(range)
|
||||||
|
|||||||
@ -250,7 +250,9 @@ export default {
|
|||||||
const range = document.createRange()
|
const range = document.createRange()
|
||||||
const sel = window.getSelection()
|
const sel = window.getSelection()
|
||||||
if (myDiv.childNodes) {
|
if (myDiv.childNodes) {
|
||||||
range.setStart(myDiv.childNodes[myDiv.childNodes.length - 1], 1)
|
range.setStart(myDiv.childNodes[myDiv.childNodes.length - 1]
|
||||||
|
.childNodes[myDiv.childNodes[myDiv.childNodes.length - 1].childNodes.length - 1],
|
||||||
|
myDiv.childNodes[myDiv.childNodes.length - 1].childNodes[myDiv.childNodes[myDiv.childNodes.length - 1].childNodes.length - 1].length)
|
||||||
range.collapse(false)
|
range.collapse(false)
|
||||||
sel.removeAllRanges()
|
sel.removeAllRanges()
|
||||||
sel.addRange(range)
|
sel.addRange(range)
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
>
|
>
|
||||||
<de-main-container
|
<de-main-container
|
||||||
v-show="showChartCanvas"
|
v-show="showChartCanvas"
|
||||||
|
v-loading="exportLoading"
|
||||||
style="overflow: hidden"
|
style="overflow: hidden"
|
||||||
:element-loading-text="$t('panel.data_loading')"
|
:element-loading-text="$t('panel.data_loading')"
|
||||||
element-loading-spinner="el-icon-loading"
|
element-loading-spinner="el-icon-loading"
|
||||||
|
|||||||
@ -554,6 +554,7 @@ export default {
|
|||||||
if (this.isCustomSortWidget && this.element.options.attrs?.sort?.sort === 'custom') {
|
if (this.isCustomSortWidget && this.element.options.attrs?.sort?.sort === 'custom') {
|
||||||
tempData = mergeCustomSortOption(this.element.options.attrs.sort.list, tempData)
|
tempData = mergeCustomSortOption(this.element.options.attrs.sort.list, tempData)
|
||||||
}
|
}
|
||||||
|
this.filterInvalidValue(tempData)
|
||||||
return tempData.map(item => {
|
return tempData.map(item => {
|
||||||
return {
|
return {
|
||||||
id: item,
|
id: item,
|
||||||
@ -561,6 +562,20 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
filterInvalidValue(data) {
|
||||||
|
if (this.value === null) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.length) {
|
||||||
|
this.value = null
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.element.options.attrs.multiple) {
|
||||||
|
this.value = this.value.filter(item => data.includes(item))
|
||||||
|
} else {
|
||||||
|
this.value = data.includes(this.value) ? this.value : null
|
||||||
|
}
|
||||||
|
},
|
||||||
setOptionWidth(event) {
|
setOptionWidth(event) {
|
||||||
this.onFocus = true
|
this.onFocus = true
|
||||||
// 下拉框弹出时,设置弹框的宽度
|
// 下拉框弹出时,设置弹框的宽度
|
||||||
|
|||||||
@ -55,9 +55,9 @@
|
|||||||
<ul class="icon_lists dib-box">
|
<ul class="icon_lists dib-box">
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont"></span>
|
<span class="icon iconfont"></span>
|
||||||
<div class="name">返回顶部</div>
|
<div class="name">返回顶部</div>
|
||||||
<div class="code-name">&#xe667;</div>
|
<div class="code-name">&#xe63f;</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
@ -828,9 +828,9 @@
|
|||||||
<pre><code class="language-css"
|
<pre><code class="language-css"
|
||||||
>@font-face {
|
>@font-face {
|
||||||
font-family: 'iconfont';
|
font-family: 'iconfont';
|
||||||
src: url('iconfont.woff2?t=1705486315942') format('woff2'),
|
src: url('iconfont.woff2?t=1706079293312') format('woff2'),
|
||||||
url('iconfont.woff?t=1705486315942') format('woff'),
|
url('iconfont.woff?t=1706079293312') format('woff'),
|
||||||
url('iconfont.ttf?t=1705486315942') format('truetype');
|
url('iconfont.ttf?t=1706079293312') format('truetype');
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 2459092 */
|
font-family: "iconfont"; /* Project id 2459092 */
|
||||||
src: url('iconfont.woff2?t=1705486315942') format('woff2'),
|
src: url('iconfont.woff2?t=1706079293312') format('woff2'),
|
||||||
url('iconfont.woff?t=1705486315942') format('woff'),
|
url('iconfont.woff?t=1706079293312') format('woff'),
|
||||||
url('iconfont.ttf?t=1705486315942') format('truetype');
|
url('iconfont.ttf?t=1706079293312') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
@ -14,7 +14,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon-back-top:before {
|
.icon-back-top:before {
|
||||||
content: "\e667";
|
content: "\e63f";
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-adaptor:before {
|
.icon-adaptor:before {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -6,11 +6,11 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
{
|
{
|
||||||
"icon_id": "831197",
|
"icon_id": "8224825",
|
||||||
"name": "返回顶部",
|
"name": "返回顶部",
|
||||||
"font_class": "back-top",
|
"font_class": "back-top",
|
||||||
"unicode": "e667",
|
"unicode": "e63f",
|
||||||
"unicode_decimal": 58983
|
"unicode_decimal": 58943
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "34289857",
|
"icon_id": "34289857",
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -170,7 +170,7 @@ div:focus {
|
|||||||
padding-right: 50px !important;
|
padding-right: 50px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.de-tabs {
|
.de-tabs-component {
|
||||||
.el-tabs__header {
|
.el-tabs__header {
|
||||||
margin: 0 0 0 0 !important;
|
margin: 0 0 0 0 !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('system_parameter_setting.ds_sync_log_retention_time')"
|
:label="$t('system_parameter_setting.ds_sync_log_retention_time')"
|
||||||
prop="logTimeOut"
|
prop="dsSyncLogTimeOut"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formInline.dsSyncLogTimeOut"
|
v-model="formInline.dsSyncLogTimeOut"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dataease-mobile",
|
"name": "dataease-mobile",
|
||||||
"version": "1.18.14",
|
"version": "1.18.15",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "npm run dev:h5",
|
"serve": "npm run dev:h5",
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@ -9,7 +9,7 @@
|
|||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<dataease.version>1.18.14</dataease.version>
|
<dataease.version>1.18.15</dataease.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<name>dataease</name>
|
<name>dataease</name>
|
||||||
|
|||||||
@ -13,7 +13,7 @@ public enum DatasourceTypes {
|
|||||||
StarRocks("StarRocks", "StarRocks", "`", "`", "'", "'", "characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true", true, DatasourceCalculationMode.DIRECT_AND_SYNC, null, null, true, DatabaseClassification.OLAP, ""),
|
StarRocks("StarRocks", "StarRocks", "`", "`", "'", "'", "characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true", true, DatasourceCalculationMode.DIRECT_AND_SYNC, null, null, true, DatabaseClassification.OLAP, ""),
|
||||||
ds_doris("ds_doris", "Doris", "`", "`", "'", "'", "characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true", true, DatasourceCalculationMode.DIRECT_AND_SYNC, null, null, true, DatabaseClassification.OLAP, ""),
|
ds_doris("ds_doris", "Doris", "`", "`", "'", "'", "characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true", true, DatasourceCalculationMode.DIRECT_AND_SYNC, null, null, true, DatabaseClassification.OLAP, ""),
|
||||||
pg("pg", "PostgreSQL", "\"", "\"", "\"", "\"", "", true, DatasourceCalculationMode.DIRECT_AND_SYNC, null, null, true, DatabaseClassification.OLTP, "12,13,14,15,16"),
|
pg("pg", "PostgreSQL", "\"", "\"", "\"", "\"", "", true, DatasourceCalculationMode.DIRECT_AND_SYNC, null, null, true, DatabaseClassification.OLTP, "12,13,14,15,16"),
|
||||||
sqlServer("sqlServer", "SQL Server", "\"", "\"", "\"", "\"", "", true, DatasourceCalculationMode.DIRECT_AND_SYNC, null, null, true, DatabaseClassification.OLTP, "13,14,15,16"),
|
sqlServer("sqlServer", "SQL Server", "\"", "\"", "\"", "\"", "", true, DatasourceCalculationMode.DIRECT_AND_SYNC, null, null, true, DatabaseClassification.OLTP, "10,13,14,15,16"),
|
||||||
oracle("oracle", "Oracle", "\"", "\"", "\"", "\"", "", true, DatasourceCalculationMode.DIRECT_AND_SYNC, Arrays.asList("Default", "GBK", "BIG5", "ISO-8859-1", "UTF-8", "UTF-16", "CP850", "EUC_JP", "EUC_KR", "US7ASCII", "AL32UTF8"), Arrays.asList("Default", "GBK", "UTF-8"), true, DatabaseClassification.OLTP, "8,9,10,11,12"),
|
oracle("oracle", "Oracle", "\"", "\"", "\"", "\"", "", true, DatasourceCalculationMode.DIRECT_AND_SYNC, Arrays.asList("Default", "GBK", "BIG5", "ISO-8859-1", "UTF-8", "UTF-16", "CP850", "EUC_JP", "EUC_KR", "US7ASCII", "AL32UTF8"), Arrays.asList("Default", "GBK", "UTF-8"), true, DatabaseClassification.OLTP, "8,9,10,11,12"),
|
||||||
mongo("mongo", "MongoDB", "`", "`", "\"", "\"", "rebuildschema=true&authSource=admin", true, DatasourceCalculationMode.DIRECT, null, null, true, DatabaseClassification.OLTP, "3,4"),
|
mongo("mongo", "MongoDB", "`", "`", "\"", "\"", "rebuildschema=true&authSource=admin", true, DatasourceCalculationMode.DIRECT, null, null, true, DatabaseClassification.OLTP, "3,4"),
|
||||||
ck("ck", "ClickHouse", "`", "`", "", "", "", true, DatasourceCalculationMode.DIRECT, null, null, true, DatabaseClassification.OLAP, "18,19,20,21,22,23"),
|
ck("ck", "ClickHouse", "`", "`", "", "", "", true, DatasourceCalculationMode.DIRECT, null, null, true, DatabaseClassification.OLAP, "18,19,20,21,22,23"),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user