forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
7052f9b945
@ -1,6 +1,6 @@
|
|||||||
FROM registry.cn-qingdao.aliyuncs.com/dataease/fabric8-java-alpine-openjdk8-jre:3.15.0
|
FROM registry.cn-qingdao.aliyuncs.com/dataease/fabric8-java-alpine-openjdk8-jre:edge
|
||||||
|
|
||||||
RUN echo -e 'http://mirrors.aliyun.com/alpine/v3.15/main/\nhttp://mirrors.aliyun.com/alpine/v3.15/community/' > /etc/apk/repositories
|
RUN echo -e 'http://mirrors.aliyun.com/alpine/edge/main/\nhttp://mirrors.aliyun.com/alpine/edge/community/' > /etc/apk/repositories
|
||||||
|
|
||||||
RUN apk add chromium chromium-chromedriver fontconfig --no-cache --allow-untrusted
|
RUN apk add chromium chromium-chromedriver fontconfig --no-cache --allow-untrusted
|
||||||
|
|
||||||
|
@ -407,6 +407,17 @@
|
|||||||
<include name="*.html"/>
|
<include name="*.html"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</move>
|
</move>
|
||||||
|
|
||||||
|
<move todir="src/main/resources/static/de-app">
|
||||||
|
<fileset dir="../../dataease-app/dist/build/h5">
|
||||||
|
<exclude name="*.html"/>
|
||||||
|
</fileset>
|
||||||
|
</move>
|
||||||
|
|
||||||
|
|
||||||
|
<move file="../../dataease-app/dist/build/h5/index.html" tofile="src/main/resources/templates/app.html" />
|
||||||
|
|
||||||
|
|
||||||
</target>
|
</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
<goals>
|
<goals>
|
||||||
|
@ -61,7 +61,7 @@ public class IndexController {
|
|||||||
|
|
||||||
@GetMapping("/tempMobileLink/{id}/{token}")
|
@GetMapping("/tempMobileLink/{id}/{token}")
|
||||||
public void tempMobileLink(@PathVariable("id") String id, @PathVariable("token") String token) {
|
public void tempMobileLink(@PathVariable("id") String id, @PathVariable("token") String token) {
|
||||||
String url = "http://localhost:8081/#preview/" + id;
|
String url = "/#preview/" + id;
|
||||||
HttpServletResponse response = ServletUtils.response();
|
HttpServletResponse response = ServletUtils.response();
|
||||||
Cookie cookie = new Cookie("Authorization", token);
|
Cookie cookie = new Cookie("Authorization", token);
|
||||||
cookie.setPath("/");
|
cookie.setPath("/");
|
||||||
|
@ -770,15 +770,11 @@ public class CKQueryProvider extends QueryProvider {
|
|||||||
for (ChartFieldCustomFilterDTO request : requestList) {
|
for (ChartFieldCustomFilterDTO request : requestList) {
|
||||||
List<SQLObj> list = new ArrayList<>();
|
List<SQLObj> list = new ArrayList<>();
|
||||||
DatasetTableField field = request.getField();
|
DatasetTableField field = request.getField();
|
||||||
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
|
||||||
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
|
||||||
if (ObjectUtils.isEmpty(field)) {
|
if (ObjectUtils.isEmpty(field)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String value = filterItemDTO.getValue();
|
|
||||||
String whereName = "";
|
String whereName = "";
|
||||||
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
|
||||||
String whereValue = "";
|
|
||||||
String originName;
|
String originName;
|
||||||
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
||||||
// 解析origin name中有关联的字段生成sql表达式
|
// 解析origin name中有关联的字段生成sql表达式
|
||||||
@ -802,6 +798,18 @@ public class CKQueryProvider extends QueryProvider {
|
|||||||
} else {
|
} else {
|
||||||
whereName = originName;
|
whereName = originName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StringUtils.equalsIgnoreCase(request.getFilterType(), "enum")) {
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getEnumCheckField())) {
|
||||||
|
res.add("(" + whereName + " IN ('" + String.join("','", request.getEnumCheckField()) + "'))");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
||||||
|
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
||||||
|
String value = filterItemDTO.getValue();
|
||||||
|
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
||||||
|
String whereValue = "";
|
||||||
|
|
||||||
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
||||||
whereValue = "";
|
whereValue = "";
|
||||||
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
||||||
@ -844,6 +852,7 @@ public class CKQueryProvider extends QueryProvider {
|
|||||||
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -737,15 +737,11 @@ public class Db2QueryProvider extends QueryProvider {
|
|||||||
for (ChartFieldCustomFilterDTO request : requestList) {
|
for (ChartFieldCustomFilterDTO request : requestList) {
|
||||||
List<SQLObj> list = new ArrayList<>();
|
List<SQLObj> list = new ArrayList<>();
|
||||||
DatasetTableField field = request.getField();
|
DatasetTableField field = request.getField();
|
||||||
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
|
||||||
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
|
||||||
if (ObjectUtils.isEmpty(field)) {
|
if (ObjectUtils.isEmpty(field)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String value = filterItemDTO.getValue();
|
|
||||||
String whereName = "";
|
String whereName = "";
|
||||||
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
|
||||||
String whereValue = "";
|
|
||||||
String originName;
|
String originName;
|
||||||
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
||||||
// 解析origin name中有关联的字段生成sql表达式
|
// 解析origin name中有关联的字段生成sql表达式
|
||||||
@ -770,6 +766,18 @@ public class Db2QueryProvider extends QueryProvider {
|
|||||||
} else {
|
} else {
|
||||||
whereName = originName;
|
whereName = originName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StringUtils.equalsIgnoreCase(request.getFilterType(), "enum")) {
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getEnumCheckField())) {
|
||||||
|
res.add("(" + whereName + " IN ('" + String.join("','", request.getEnumCheckField()) + "'))");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
||||||
|
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
||||||
|
String value = filterItemDTO.getValue();
|
||||||
|
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
||||||
|
String whereValue = "";
|
||||||
|
|
||||||
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
||||||
whereValue = "";
|
whereValue = "";
|
||||||
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
||||||
@ -801,6 +809,7 @@ public class Db2QueryProvider extends QueryProvider {
|
|||||||
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -752,16 +752,11 @@ public class DorisQueryProvider extends QueryProvider {
|
|||||||
for (ChartFieldCustomFilterDTO request : requestList) {
|
for (ChartFieldCustomFilterDTO request : requestList) {
|
||||||
List<SQLObj> list = new ArrayList<>();
|
List<SQLObj> list = new ArrayList<>();
|
||||||
DatasetTableField field = request.getField();
|
DatasetTableField field = request.getField();
|
||||||
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
|
||||||
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
|
||||||
if (ObjectUtils.isEmpty(field)) {
|
if (ObjectUtils.isEmpty(field)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String value = filterItemDTO.getValue();
|
|
||||||
String whereName = "";
|
String whereName = "";
|
||||||
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
|
||||||
String whereValue = "";
|
|
||||||
|
|
||||||
String originName;
|
String originName;
|
||||||
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
||||||
// 解析origin name中有关联的字段生成sql表达式
|
// 解析origin name中有关联的字段生成sql表达式
|
||||||
@ -785,6 +780,18 @@ public class DorisQueryProvider extends QueryProvider {
|
|||||||
} else {
|
} else {
|
||||||
whereName = originName;
|
whereName = originName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StringUtils.equalsIgnoreCase(request.getFilterType(), "enum")) {
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getEnumCheckField())) {
|
||||||
|
res.add("(" + whereName + " IN ('" + String.join("','", request.getEnumCheckField()) + "'))");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
||||||
|
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
||||||
|
String value = filterItemDTO.getValue();
|
||||||
|
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
||||||
|
String whereValue = "";
|
||||||
|
|
||||||
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
||||||
whereValue = "";
|
whereValue = "";
|
||||||
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
||||||
@ -816,6 +823,7 @@ public class DorisQueryProvider extends QueryProvider {
|
|||||||
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -767,15 +767,11 @@ public class EsQueryProvider extends QueryProvider {
|
|||||||
for (ChartFieldCustomFilterDTO request : requestList) {
|
for (ChartFieldCustomFilterDTO request : requestList) {
|
||||||
List<SQLObj> list = new ArrayList<>();
|
List<SQLObj> list = new ArrayList<>();
|
||||||
DatasetTableField field = request.getField();
|
DatasetTableField field = request.getField();
|
||||||
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
|
||||||
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
|
||||||
if (ObjectUtils.isEmpty(field)) {
|
if (ObjectUtils.isEmpty(field)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String value = filterItemDTO.getValue();
|
|
||||||
String whereName = "";
|
String whereName = "";
|
||||||
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
|
||||||
String whereValue = "";
|
|
||||||
String originName;
|
String originName;
|
||||||
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
||||||
// 解析origin name中有关联的字段生成sql表达式
|
// 解析origin name中有关联的字段生成sql表达式
|
||||||
@ -799,6 +795,18 @@ public class EsQueryProvider extends QueryProvider {
|
|||||||
} else {
|
} else {
|
||||||
whereName = originName;
|
whereName = originName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StringUtils.equalsIgnoreCase(request.getFilterType(), "enum")) {
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getEnumCheckField())) {
|
||||||
|
res.add("(" + whereName + " IN ('" + String.join("','", request.getEnumCheckField()) + "'))");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
||||||
|
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
||||||
|
String value = filterItemDTO.getValue();
|
||||||
|
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
||||||
|
String whereValue = "";
|
||||||
|
|
||||||
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
||||||
whereValue = "";
|
whereValue = "";
|
||||||
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
||||||
@ -819,13 +827,13 @@ public class EsQueryProvider extends QueryProvider {
|
|||||||
.whereTermAndValue(whereTerm + whereValue)
|
.whereTermAndValue(whereTerm + whereValue)
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> strList = new ArrayList<>();
|
List<String> strList = new ArrayList<>();
|
||||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -731,15 +731,11 @@ public class HiveQueryProvider extends QueryProvider {
|
|||||||
for (ChartFieldCustomFilterDTO request : requestList) {
|
for (ChartFieldCustomFilterDTO request : requestList) {
|
||||||
List<SQLObj> list = new ArrayList<>();
|
List<SQLObj> list = new ArrayList<>();
|
||||||
DatasetTableField field = request.getField();
|
DatasetTableField field = request.getField();
|
||||||
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
|
||||||
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
|
||||||
if (ObjectUtils.isEmpty(field)) {
|
if (ObjectUtils.isEmpty(field)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String value = filterItemDTO.getValue();
|
|
||||||
String whereName = "";
|
String whereName = "";
|
||||||
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
|
||||||
String whereValue = "";
|
|
||||||
String originName;
|
String originName;
|
||||||
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
||||||
// 解析origin name中有关联的字段生成sql表达式
|
// 解析origin name中有关联的字段生成sql表达式
|
||||||
@ -763,6 +759,18 @@ public class HiveQueryProvider extends QueryProvider {
|
|||||||
} else {
|
} else {
|
||||||
whereName = originName;
|
whereName = originName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StringUtils.equalsIgnoreCase(request.getFilterType(), "enum")) {
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getEnumCheckField())) {
|
||||||
|
res.add("(" + whereName + " IN ('" + String.join("','", request.getEnumCheckField()) + "'))");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
||||||
|
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
||||||
|
String value = filterItemDTO.getValue();
|
||||||
|
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
||||||
|
String whereValue = "";
|
||||||
|
|
||||||
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
||||||
whereValue = "";
|
whereValue = "";
|
||||||
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
||||||
@ -790,6 +798,7 @@ public class HiveQueryProvider extends QueryProvider {
|
|||||||
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -710,15 +710,11 @@ public class MongoQueryProvider extends QueryProvider {
|
|||||||
for (ChartFieldCustomFilterDTO request : requestList) {
|
for (ChartFieldCustomFilterDTO request : requestList) {
|
||||||
List<SQLObj> list = new ArrayList<>();
|
List<SQLObj> list = new ArrayList<>();
|
||||||
DatasetTableField field = request.getField();
|
DatasetTableField field = request.getField();
|
||||||
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
|
||||||
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
|
||||||
if (ObjectUtils.isEmpty(field)) {
|
if (ObjectUtils.isEmpty(field)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String value = filterItemDTO.getValue();
|
|
||||||
String whereName = "";
|
String whereName = "";
|
||||||
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
|
||||||
String whereValue = "";
|
|
||||||
String originName;
|
String originName;
|
||||||
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == DeTypeConstants.DE_INT) {
|
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == DeTypeConstants.DE_INT) {
|
||||||
// 解析origin name中有关联的字段生成sql表达式
|
// 解析origin name中有关联的字段生成sql表达式
|
||||||
@ -729,6 +725,18 @@ public class MongoQueryProvider extends QueryProvider {
|
|||||||
originName = String.format(MongoConstants.KEYWORD_FIX, tableObj.getTableAlias(), field.getOriginName());
|
originName = String.format(MongoConstants.KEYWORD_FIX, tableObj.getTableAlias(), field.getOriginName());
|
||||||
}
|
}
|
||||||
whereName = originName;
|
whereName = originName;
|
||||||
|
|
||||||
|
if (StringUtils.equalsIgnoreCase(request.getFilterType(), "enum")) {
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getEnumCheckField())) {
|
||||||
|
res.add("(" + whereName + " IN ('" + String.join("','", request.getEnumCheckField()) + "'))");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
||||||
|
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
||||||
|
String value = filterItemDTO.getValue();
|
||||||
|
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
||||||
|
String whereValue = "";
|
||||||
|
|
||||||
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
||||||
whereValue = "";
|
whereValue = "";
|
||||||
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
||||||
@ -756,6 +764,7 @@ public class MongoQueryProvider extends QueryProvider {
|
|||||||
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -771,9 +771,6 @@ public class MysqlQueryProvider extends QueryProvider {
|
|||||||
} else {
|
} else {
|
||||||
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
||||||
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
||||||
if (ObjectUtils.isEmpty(field)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
String value = filterItemDTO.getValue();
|
String value = filterItemDTO.getValue();
|
||||||
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
||||||
String whereValue = "";
|
String whereValue = "";
|
||||||
|
@ -786,16 +786,11 @@ public class OracleQueryProvider extends QueryProvider {
|
|||||||
for (ChartFieldCustomFilterDTO request : requestList) {
|
for (ChartFieldCustomFilterDTO request : requestList) {
|
||||||
List<SQLObj> list = new ArrayList<>();
|
List<SQLObj> list = new ArrayList<>();
|
||||||
DatasetTableField field = request.getField();
|
DatasetTableField field = request.getField();
|
||||||
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
|
||||||
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
|
||||||
if (ObjectUtils.isEmpty(field)) {
|
if (ObjectUtils.isEmpty(field)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String value = filterItemDTO.getValue();
|
|
||||||
String whereName = "";
|
String whereName = "";
|
||||||
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
|
||||||
String whereValue = "";
|
|
||||||
|
|
||||||
String originName;
|
String originName;
|
||||||
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
||||||
// 解析origin name中有关联的字段生成sql表达式
|
// 解析origin name中有关联的字段生成sql表达式
|
||||||
@ -820,6 +815,18 @@ public class OracleQueryProvider extends QueryProvider {
|
|||||||
} else {
|
} else {
|
||||||
whereName = originName;
|
whereName = originName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StringUtils.equalsIgnoreCase(request.getFilterType(), "enum")) {
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getEnumCheckField())) {
|
||||||
|
res.add("(" + whereName + " IN ('" + String.join("','", request.getEnumCheckField()) + "'))");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
||||||
|
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
||||||
|
String value = filterItemDTO.getValue();
|
||||||
|
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
||||||
|
String whereValue = "";
|
||||||
|
|
||||||
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
||||||
whereValue = "";
|
whereValue = "";
|
||||||
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
||||||
@ -851,6 +858,7 @@ public class OracleQueryProvider extends QueryProvider {
|
|||||||
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -762,15 +762,11 @@ public class PgQueryProvider extends QueryProvider {
|
|||||||
for (ChartFieldCustomFilterDTO request : requestList) {
|
for (ChartFieldCustomFilterDTO request : requestList) {
|
||||||
List<SQLObj> list = new ArrayList<>();
|
List<SQLObj> list = new ArrayList<>();
|
||||||
DatasetTableField field = request.getField();
|
DatasetTableField field = request.getField();
|
||||||
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
|
||||||
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
|
||||||
if (ObjectUtils.isEmpty(field)) {
|
if (ObjectUtils.isEmpty(field)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String value = filterItemDTO.getValue();
|
|
||||||
String whereName = "";
|
String whereName = "";
|
||||||
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
|
||||||
String whereValue = "";
|
|
||||||
String originName;
|
String originName;
|
||||||
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
||||||
// 解析origin name中有关联的字段生成sql表达式
|
// 解析origin name中有关联的字段生成sql表达式
|
||||||
@ -794,6 +790,18 @@ public class PgQueryProvider extends QueryProvider {
|
|||||||
} else {
|
} else {
|
||||||
whereName = originName;
|
whereName = originName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StringUtils.equalsIgnoreCase(request.getFilterType(), "enum")) {
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getEnumCheckField())) {
|
||||||
|
res.add("(" + whereName + " IN ('" + String.join("','", request.getEnumCheckField()) + "'))");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
||||||
|
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
||||||
|
String value = filterItemDTO.getValue();
|
||||||
|
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
||||||
|
String whereValue = "";
|
||||||
|
|
||||||
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
||||||
whereValue = "";
|
whereValue = "";
|
||||||
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
||||||
@ -821,6 +829,7 @@ public class PgQueryProvider extends QueryProvider {
|
|||||||
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -703,15 +703,11 @@ public class RedshiftQueryProvider extends QueryProvider {
|
|||||||
for (ChartFieldCustomFilterDTO request : requestList) {
|
for (ChartFieldCustomFilterDTO request : requestList) {
|
||||||
List<SQLObj> list = new ArrayList<>();
|
List<SQLObj> list = new ArrayList<>();
|
||||||
DatasetTableField field = request.getField();
|
DatasetTableField field = request.getField();
|
||||||
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
|
||||||
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
|
||||||
if (ObjectUtils.isEmpty(field)) {
|
if (ObjectUtils.isEmpty(field)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String value = filterItemDTO.getValue();
|
|
||||||
String whereName = "";
|
String whereName = "";
|
||||||
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
|
||||||
String whereValue = "";
|
|
||||||
String originName;
|
String originName;
|
||||||
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
||||||
// 解析origin name中有关联的字段生成sql表达式
|
// 解析origin name中有关联的字段生成sql表达式
|
||||||
@ -735,6 +731,18 @@ public class RedshiftQueryProvider extends QueryProvider {
|
|||||||
} else {
|
} else {
|
||||||
whereName = originName;
|
whereName = originName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StringUtils.equalsIgnoreCase(request.getFilterType(), "enum")) {
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getEnumCheckField())) {
|
||||||
|
res.add("(" + whereName + " IN ('" + String.join("','", request.getEnumCheckField()) + "'))");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
||||||
|
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
||||||
|
String value = filterItemDTO.getValue();
|
||||||
|
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
||||||
|
String whereValue = "";
|
||||||
|
|
||||||
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
||||||
whereValue = PgConstants.WHERE_VALUE_NULL;
|
whereValue = PgConstants.WHERE_VALUE_NULL;
|
||||||
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
||||||
@ -758,6 +766,7 @@ public class RedshiftQueryProvider extends QueryProvider {
|
|||||||
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -796,15 +796,11 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
for (ChartFieldCustomFilterDTO request : requestList) {
|
for (ChartFieldCustomFilterDTO request : requestList) {
|
||||||
List<SQLObj> list = new ArrayList<>();
|
List<SQLObj> list = new ArrayList<>();
|
||||||
DatasetTableField field = request.getField();
|
DatasetTableField field = request.getField();
|
||||||
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
|
||||||
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
|
||||||
if (ObjectUtils.isEmpty(field)) {
|
if (ObjectUtils.isEmpty(field)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String value = filterItemDTO.getValue();
|
|
||||||
String whereName = "";
|
String whereName = "";
|
||||||
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
|
||||||
String whereValue = "";
|
|
||||||
String originName;
|
String originName;
|
||||||
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
if (ObjectUtils.isNotEmpty(field.getExtField()) && field.getExtField() == 2) {
|
||||||
// 解析origin name中有关联的字段生成sql表达式
|
// 解析origin name中有关联的字段生成sql表达式
|
||||||
@ -828,6 +824,18 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
} else {
|
} else {
|
||||||
whereName = originName;
|
whereName = originName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StringUtils.equalsIgnoreCase(request.getFilterType(), "enum")) {
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getEnumCheckField())) {
|
||||||
|
res.add("(" + whereName + " IN ('" + String.join("','", request.getEnumCheckField()) + "'))");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
List<ChartCustomFilterItemDTO> filter = request.getFilter();
|
||||||
|
for (ChartCustomFilterItemDTO filterItemDTO : filter) {
|
||||||
|
String value = filterItemDTO.getValue();
|
||||||
|
String whereTerm = transMysqlFilterTerm(filterItemDTO.getTerm());
|
||||||
|
String whereValue = "";
|
||||||
|
|
||||||
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "null")) {
|
||||||
whereValue = "";
|
whereValue = "";
|
||||||
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_null")) {
|
||||||
@ -855,6 +863,7 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
res.add("(" + String.join(" " + getLogic(request.getLogic()) + " ", strList) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
return CollectionUtils.isNotEmpty(res) ? "(" + String.join(" AND ", res) + ")" : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -509,7 +509,7 @@ public class ChartViewService {
|
|||||||
if (StringUtils.equalsIgnoreCase(resultData, "sub")) {
|
if (StringUtils.equalsIgnoreCase(resultData, "sub")) {
|
||||||
item[dataIndex] = new BigDecimal(cValue).subtract(new BigDecimal(lastValue)).toString();
|
item[dataIndex] = new BigDecimal(cValue).subtract(new BigDecimal(lastValue)).toString();
|
||||||
} else if (StringUtils.equalsIgnoreCase(resultData, "percent")) {
|
} else if (StringUtils.equalsIgnoreCase(resultData, "percent")) {
|
||||||
if (Integer.parseInt(lastValue) == 0) {
|
if (new BigDecimal(lastValue).compareTo(BigDecimal.ZERO) == 0) {
|
||||||
item[dataIndex] = null;
|
item[dataIndex] = null;
|
||||||
} else {
|
} else {
|
||||||
item[dataIndex] = new BigDecimal(cValue)
|
item[dataIndex] = new BigDecimal(cValue)
|
||||||
|
@ -169,11 +169,7 @@ export default {
|
|||||||
this.$store.commit('setCurComponent', { component: this.config, index: this.index })
|
this.$store.commit('setCurComponent', { component: this.config, index: this.index })
|
||||||
},
|
},
|
||||||
showViewDetails() {
|
showViewDetails() {
|
||||||
if (this.terminal === 'pc') {
|
|
||||||
this.$refs.wrapperChild.openChartDetailsDialog()
|
this.$refs.wrapperChild.openChartDetailsDialog()
|
||||||
} else {
|
|
||||||
this.previewVisible = true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
closePreview() {
|
closePreview() {
|
||||||
this.previewVisible = false
|
this.previewVisible = false
|
||||||
|
@ -266,7 +266,7 @@ export default {
|
|||||||
if (this.terminal === 'pc') {
|
if (this.terminal === 'pc') {
|
||||||
this.chartDetailsVisible = true
|
this.chartDetailsVisible = true
|
||||||
} else {
|
} else {
|
||||||
this.mobileChartDetailsVisible
|
this.mobileChartDetailsVisible = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
:chart="chart"
|
:chart="chart"
|
||||||
:track-menu="trackMenu"
|
:track-menu="trackMenu"
|
||||||
:search-count="searchCount"
|
:search-count="searchCount"
|
||||||
|
:terminal-type="scaleCoefficientType"
|
||||||
@onChartClick="chartClick"
|
@onChartClick="chartClick"
|
||||||
@onJumpClick="jumpClick"
|
@onJumpClick="jumpClick"
|
||||||
/>
|
/>
|
||||||
@ -141,10 +142,17 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
scaleCoefficient() {
|
scaleCoefficient() {
|
||||||
if (this.terminal === 'pc') {
|
if (this.terminal === 'pc' && !this.mobileLayoutStatus) {
|
||||||
return 1.1
|
return 1.1
|
||||||
} else {
|
} else {
|
||||||
return 4
|
return 4.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scaleCoefficientType() {
|
||||||
|
if (this.terminal === 'pc' && !this.mobileLayoutStatus) {
|
||||||
|
return 'pc'
|
||||||
|
} else {
|
||||||
|
return 'mobile'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
editBarViewShowFlag() {
|
editBarViewShowFlag() {
|
||||||
@ -227,7 +235,8 @@ export default {
|
|||||||
'nowPanelTrackInfo',
|
'nowPanelTrackInfo',
|
||||||
'nowPanelJumpInfo',
|
'nowPanelJumpInfo',
|
||||||
'publicLinkStatus',
|
'publicLinkStatus',
|
||||||
'previewCanvasScale'
|
'previewCanvasScale',
|
||||||
|
'mobileLayoutStatus'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -310,17 +319,18 @@ export default {
|
|||||||
const scale = Math.min(this.previewCanvasScale.scalePointWidth, this.previewCanvasScale.scalePointHeight) * this.scaleCoefficient
|
const scale = Math.min(this.previewCanvasScale.scalePointWidth, this.previewCanvasScale.scalePointHeight) * this.scaleCoefficient
|
||||||
const customAttrChart = JSON.parse(this.sourceCustomAttrStr)
|
const customAttrChart = JSON.parse(this.sourceCustomAttrStr)
|
||||||
const customStyleChart = JSON.parse(this.sourceCustomStyleStr)
|
const customStyleChart = JSON.parse(this.sourceCustomStyleStr)
|
||||||
recursionTransObj(customAttrTrans, customAttrChart, scale)
|
recursionTransObj(customAttrTrans, customAttrChart, scale, this.scaleCoefficientType)
|
||||||
recursionTransObj(customStyleTrans, customStyleChart, scale)
|
recursionTransObj(customStyleTrans, customStyleChart, scale, this.scaleCoefficientType)
|
||||||
|
|
||||||
|
// 移动端地图标签不显示
|
||||||
|
if (this.chart.type === 'map' && this.scaleCoefficientType === 'mobile') {
|
||||||
|
customAttrChart.label.show = false
|
||||||
|
}
|
||||||
this.chart = {
|
this.chart = {
|
||||||
...this.chart,
|
...this.chart,
|
||||||
customAttr: JSON.stringify(customAttrChart),
|
customAttr: JSON.stringify(customAttrChart),
|
||||||
customStyle: JSON.stringify(customStyleChart)
|
customStyle: JSON.stringify(customStyleChart)
|
||||||
}
|
}
|
||||||
// console.log('customAttrChartSource:' + JSON.stringify(JSON.parse(this.sourceCustomAttrStr)))
|
|
||||||
// console.log('customAttrChart:' + JSON.stringify(customAttrChart))
|
|
||||||
// console.log('customStyleChartSource:' + JSON.stringify(JSON.parse(this.sourceCustomStyleStr)))
|
|
||||||
// console.log('customStyleChart:' + JSON.stringify(customStyleChart))
|
|
||||||
this.mergeStyle()
|
this.mergeStyle()
|
||||||
},
|
},
|
||||||
mergeStyle() {
|
mergeStyle() {
|
||||||
|
@ -150,27 +150,36 @@ export const customStyleTrans = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 移动端特殊属性
|
||||||
|
export const mobileSpecialProps = {
|
||||||
|
'lineWidth': 3, // 线宽固定值
|
||||||
|
'lineSymbolSize': 5// 折点固定值
|
||||||
|
}
|
||||||
|
|
||||||
export function getScaleValue(propValue, scale) {
|
export function getScaleValue(propValue, scale) {
|
||||||
const propValueTemp = Math.round(propValue * scale)
|
const propValueTemp = Math.round(propValue * scale)
|
||||||
return propValueTemp > 1 ? propValueTemp : 1
|
return propValueTemp > 1 ? propValueTemp : 1
|
||||||
}
|
}
|
||||||
|
|
||||||
export function recursionTransObj(template, infoObj, scale) {
|
export function recursionTransObj(template, infoObj, scale, terminal) {
|
||||||
// console.log('recursionObj++')
|
|
||||||
for (const templateKey in template) {
|
for (const templateKey in template) {
|
||||||
// 如果是数组 进行赋值计算
|
// 如果是数组 进行赋值计算
|
||||||
if (template[templateKey] instanceof Array) {
|
if (template[templateKey] instanceof Array) {
|
||||||
template[templateKey].forEach(templateProp => {
|
template[templateKey].forEach(templateProp => {
|
||||||
if (infoObj[templateKey] && infoObj[templateKey][templateProp]) {
|
if (infoObj[templateKey] && infoObj[templateKey][templateProp]) {
|
||||||
const afterValue = getScaleValue(infoObj[templateKey][templateProp], scale)
|
// 移动端特殊属性值设置
|
||||||
console.log(templateKey + '.' + templateProp + '=' + infoObj[templateKey][templateProp] + ';scale:' + scale + ',after:' + afterValue)
|
if (terminal === 'mobile' && mobileSpecialProps[templateProp] !== undefined) {
|
||||||
infoObj[templateKey][templateProp] = afterValue
|
// console.log('mobile:' + templateProp + mobileSpecialProps[templateProp])
|
||||||
|
infoObj[templateKey][templateProp] = mobileSpecialProps[templateProp]
|
||||||
|
} else {
|
||||||
|
infoObj[templateKey][templateProp] = getScaleValue(infoObj[templateKey][templateProp], scale)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// 如果是对象 继续进行递归
|
// 如果是对象 继续进行递归
|
||||||
if (infoObj[templateKey]) {
|
if (infoObj[templateKey]) {
|
||||||
recursionTransObj(template[templateKey], infoObj[templateKey], scale)
|
recursionTransObj(template[templateKey], infoObj[templateKey], scale, terminal)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,10 @@ import { hexColorToRGBA } from '@/views/chart/chart/util'
|
|||||||
import { componentStyle } from '../common/common'
|
import { componentStyle } from '../common/common'
|
||||||
|
|
||||||
let bubbleArray = []
|
let bubbleArray = []
|
||||||
|
let terminalType = 'pc'
|
||||||
|
|
||||||
export function baseScatterOption(chart_option, chart) {
|
export function baseScatterOption(chart_option, chart, terminal = 'pc') {
|
||||||
|
terminalType = terminal
|
||||||
// 处理shape attr
|
// 处理shape attr
|
||||||
let customAttr = {}
|
let customAttr = {}
|
||||||
if (chart.customAttr) {
|
if (chart.customAttr) {
|
||||||
@ -59,7 +61,7 @@ export function baseScatterOption(chart_option, chart) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const funcSize = function(data) {
|
const funcSize = function(data) {
|
||||||
const k = 80
|
const k = terminalType === 'pc' ? 80 : 30
|
||||||
const max = Math.max(...bubbleArray)
|
const max = Math.max(...bubbleArray)
|
||||||
return (data[2] / max) * k
|
return (data[2] / max) * k
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,10 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
required: false,
|
required: false,
|
||||||
default: 0
|
default: 0
|
||||||
|
},
|
||||||
|
terminalType: {
|
||||||
|
type: String,
|
||||||
|
default: 'pc'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -154,7 +158,7 @@ export default {
|
|||||||
} else if (chart.type === 'gauge') {
|
} else if (chart.type === 'gauge') {
|
||||||
chart_option = baseGaugeOption(JSON.parse(JSON.stringify(BASE_GAUGE)), chart)
|
chart_option = baseGaugeOption(JSON.parse(JSON.stringify(BASE_GAUGE)), chart)
|
||||||
} else if (chart.type === 'scatter') {
|
} else if (chart.type === 'scatter') {
|
||||||
chart_option = baseScatterOption(JSON.parse(JSON.stringify(BASE_SCATTER)), chart)
|
chart_option = baseScatterOption(JSON.parse(JSON.stringify(BASE_SCATTER)), chart, this.terminalType)
|
||||||
} else if (chart.type === 'treemap') {
|
} else if (chart.type === 'treemap') {
|
||||||
chart_option = baseTreemapOption(JSON.parse(JSON.stringify(BASE_TREEMAP)), chart)
|
chart_option = baseTreemapOption(JSON.parse(JSON.stringify(BASE_TREEMAP)), chart)
|
||||||
} else if (chart.type === 'chart-mix') {
|
} else if (chart.type === 'chart-mix') {
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
<div style="display: inline-block;">
|
<div style="display: inline-block;">
|
||||||
<el-button icon="el-icon-plus" circle size="mini" style="margin-bottom: 10px;" @click="addFilter" />
|
<el-button icon="el-icon-plus" circle size="mini" style="margin-bottom: 10px;" @click="addFilter" />
|
||||||
<el-radio-group
|
<el-radio-group
|
||||||
|
v-show="item.filter && item.filter.length > 1"
|
||||||
v-model="logic"
|
v-model="logic"
|
||||||
size="mini"
|
size="mini"
|
||||||
style="margin-left: 10px;"
|
style="margin-left: 10px;"
|
||||||
@ -61,6 +62,7 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="enumCheckField"
|
v-model="enumCheckField"
|
||||||
filterable
|
filterable
|
||||||
|
collapse-tags
|
||||||
multiple
|
multiple
|
||||||
:placeholder="$t('chart.pls_slc')"
|
:placeholder="$t('chart.pls_slc')"
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -215,6 +217,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.initOptions()
|
this.initOptions()
|
||||||
this.init()
|
this.init()
|
||||||
|
this.initEnumOptions()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initOptions() {
|
initOptions() {
|
||||||
@ -232,10 +235,14 @@ export default {
|
|||||||
this.logic = this.item.logic
|
this.logic = this.item.logic
|
||||||
this.filterType = this.item.filterType
|
this.filterType = this.item.filterType
|
||||||
this.enumCheckField = this.item.enumCheckField
|
this.enumCheckField = this.item.enumCheckField
|
||||||
// 查找枚举的
|
},
|
||||||
|
initEnumOptions() {
|
||||||
|
// 查找枚举值
|
||||||
|
if (this.item.deType === 0 || this.item.deType === 5) {
|
||||||
multFieldValues([this.item.id]).then(res => {
|
multFieldValues([this.item.id]).then(res => {
|
||||||
this.fieldOptions = this.optionDatas(res.data)
|
this.fieldOptions = this.optionDatas(res.data)
|
||||||
})
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
optionDatas(datas) {
|
optionDatas(datas) {
|
||||||
if (!datas) return null
|
if (!datas) return null
|
||||||
|
@ -112,7 +112,7 @@
|
|||||||
<el-row v-if="mobileLayoutStatus" class="mobile_canvas_main">
|
<el-row v-if="mobileLayoutStatus" class="mobile_canvas_main">
|
||||||
<el-col :span="8" class="this_mobile_canvas_cell">
|
<el-col :span="8" class="this_mobile_canvas_cell">
|
||||||
<div
|
<div
|
||||||
v-proportion="2.5"
|
v-proportion="2.1"
|
||||||
:style="customCanvasMobileStyle"
|
:style="customCanvasMobileStyle"
|
||||||
class="this_mobile_canvas"
|
class="this_mobile_canvas"
|
||||||
@drop="handleDrop"
|
@drop="handleDrop"
|
||||||
@ -955,10 +955,10 @@ export default {
|
|||||||
|
|
||||||
.this_mobile_canvas{
|
.this_mobile_canvas{
|
||||||
border-radius:30px;
|
border-radius:30px;
|
||||||
min-width: 280px;
|
min-width: 300px;
|
||||||
max-width: 300px;
|
max-width: 350px;
|
||||||
min-height: 700px;
|
min-height: 600px;
|
||||||
max-height: 750px;
|
max-height: 700px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #000000;
|
background-color: #000000;
|
||||||
background-size:100% 100% !important;
|
background-size:100% 100% !important;
|
||||||
|
Loading…
Reference in New Issue
Block a user