commit
99801b2f54
@ -67,6 +67,10 @@ public class IndexController {
|
|||||||
if (StringUtils.isNotEmpty(attachParams)) {
|
if (StringUtils.isNotEmpty(attachParams)) {
|
||||||
url = url + "&attachParams=" + attachParams;
|
url = url + "&attachParams=" + attachParams;
|
||||||
}
|
}
|
||||||
|
String fromLink = request.getParameter("fromLink");
|
||||||
|
if (StringUtils.isNotEmpty(fromLink)) {
|
||||||
|
url = url + "&fromLink=" + fromLink;
|
||||||
|
}
|
||||||
response.sendRedirect(url);
|
response.sendRedirect(url);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LogUtil.error(e.getMessage());
|
LogUtil.error(e.getMessage());
|
||||||
|
|||||||
@ -653,7 +653,7 @@ public class DorisQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -602,7 +602,7 @@ public class MysqlQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -633,7 +633,7 @@ public class CKQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -621,7 +621,7 @@ public class Db2QueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -627,7 +627,7 @@ public class EsQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -586,7 +586,7 @@ public class HiveQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -573,7 +573,7 @@ public class ImpalaQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -557,7 +557,7 @@ public class MongoQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -611,7 +611,7 @@ public class MysqlQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -676,7 +676,7 @@ public class OracleQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -614,7 +614,7 @@ public class PgQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -621,7 +621,7 @@ public class RedshiftQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -623,7 +623,7 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -913,6 +913,9 @@ public class ChartViewService {
|
|||||||
ChartDrillRequest head = drillRequestList.get(0);
|
ChartDrillRequest head = drillRequestList.get(0);
|
||||||
Map<String, String> dimValMap = new HashMap<>();
|
Map<String, String> dimValMap = new HashMap<>();
|
||||||
head.getDimensionList().forEach(item -> dimValMap.put(item.getId(), item.getValue()));
|
head.getDimensionList().forEach(item -> dimValMap.put(item.getId(), item.getValue()));
|
||||||
|
|
||||||
|
boolean isAntVScatterNumberXAxis = CollectionUtils.isNotEmpty(xAxis) && StringUtils.equals(xAxis.get(0).getGroupType(), "q") && StringUtils.equalsIgnoreCase(view.getRender(), "antv");
|
||||||
|
|
||||||
for (int i = 0; i < drillRequestList.size(); i++) {
|
for (int i = 0; i < drillRequestList.size(); i++) {
|
||||||
ChartDrillRequest request = drillRequestList.get(i);
|
ChartDrillRequest request = drillRequestList.get(i);
|
||||||
ChartViewFieldDTO chartViewFieldDTO = drill.get(i);
|
ChartViewFieldDTO chartViewFieldDTO = drill.get(i);
|
||||||
@ -924,14 +927,23 @@ public class ChartViewService {
|
|||||||
dimValMap.put(requestDimension.getId(), requestDimension.getValue());
|
dimValMap.put(requestDimension.getId(), requestDimension.getValue());
|
||||||
if (!checkDrillExist(xAxis, extStack, requestDimension.getId(), view)) {
|
if (!checkDrillExist(xAxis, extStack, requestDimension.getId(), view)) {
|
||||||
chartFieldMap.put(chartViewFieldDTO.getId(), chartViewFieldDTO);
|
chartFieldMap.put(chartViewFieldDTO.getId(), chartViewFieldDTO);
|
||||||
xAxis.add(chartViewFieldDTO);
|
|
||||||
|
if (isAntVScatterNumberXAxis) {
|
||||||
|
extStack.add(chartViewFieldDTO);
|
||||||
|
} else {
|
||||||
|
xAxis.add(chartViewFieldDTO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (i == drillRequestList.size() - 1) {
|
if (i == drillRequestList.size() - 1) {
|
||||||
ChartViewFieldDTO nextDrillField = drill.get(i + 1);
|
ChartViewFieldDTO nextDrillField = drill.get(i + 1);
|
||||||
if (!checkDrillExist(xAxis, extStack, nextDrillField.getId(), view)) {
|
if (!checkDrillExist(xAxis, extStack, nextDrillField.getId(), view)) {
|
||||||
// get drill list first element's sort,then assign to nextDrillField
|
// get drill list first element's sort,then assign to nextDrillField
|
||||||
nextDrillField.setSort(getDrillSort(xAxis, drill.get(0)));
|
nextDrillField.setSort(getDrillSort(xAxis, drill.get(0)));
|
||||||
xAxis.add(nextDrillField);
|
if (isAntVScatterNumberXAxis) {
|
||||||
|
extStack.add(nextDrillField);
|
||||||
|
} else {
|
||||||
|
xAxis.add(nextDrillField);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1656,6 +1668,20 @@ public class ChartViewService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkDrillExist(List<ChartViewFieldDTO> xAxis, List<ChartViewFieldDTO> extStack, String fieldId, ChartViewWithBLOBs view) {
|
private boolean checkDrillExist(List<ChartViewFieldDTO> xAxis, List<ChartViewFieldDTO> extStack, String fieldId, ChartViewWithBLOBs view) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(xAxis)) {
|
||||||
|
//针对判断 antv 散点图
|
||||||
|
if (StringUtils.equals(xAxis.get(0).getGroupType(), "q") && StringUtils.equalsIgnoreCase(view.getRender(), "antv")) {
|
||||||
|
if (CollectionUtils.isNotEmpty(extStack)) {
|
||||||
|
for (ChartViewFieldDTO x : extStack) {
|
||||||
|
if (StringUtils.equalsIgnoreCase(x.getId(), fieldId)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxis)) {
|
if (CollectionUtils.isNotEmpty(xAxis)) {
|
||||||
for (ChartViewFieldDTO x : xAxis) {
|
for (ChartViewFieldDTO x : xAxis) {
|
||||||
if (StringUtils.equalsIgnoreCase(x.getId(), fieldId)) {
|
if (StringUtils.equalsIgnoreCase(x.getId(), fieldId)) {
|
||||||
@ -2129,7 +2155,7 @@ public class ChartViewService {
|
|||||||
JSONObject jsonObject = JSONObject.parseObject(senior);
|
JSONObject jsonObject = JSONObject.parseObject(senior);
|
||||||
List<ChartSeniorAssistDTO> list = new ArrayList<>();
|
List<ChartSeniorAssistDTO> list = new ArrayList<>();
|
||||||
JSONObject threshold = jsonObject.getJSONObject("threshold");
|
JSONObject threshold = jsonObject.getJSONObject("threshold");
|
||||||
if (ObjectUtils.isEmpty(threshold) || StringUtils.isBlank(threshold.toJSONString())){
|
if (ObjectUtils.isEmpty(threshold) || StringUtils.isBlank(threshold.toJSONString())) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
JSONArray tableThreshold = threshold.getJSONArray("tableThreshold");
|
JSONArray tableThreshold = threshold.getJSONArray("tableThreshold");
|
||||||
@ -2161,7 +2187,7 @@ public class ChartViewService {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean solveThresholdCondition(ChartSeniorAssistDTO fieldDTO, String tableId){
|
private boolean solveThresholdCondition(ChartSeniorAssistDTO fieldDTO, String tableId) {
|
||||||
String fieldId = fieldDTO.getFieldId();
|
String fieldId = fieldDTO.getFieldId();
|
||||||
String summary = fieldDTO.getSummary();
|
String summary = fieldDTO.getSummary();
|
||||||
if (StringUtils.isEmpty(fieldId) || StringUtils.isEmpty(summary)) {
|
if (StringUtils.isEmpty(fieldId) || StringUtils.isEmpty(summary)) {
|
||||||
@ -2177,7 +2203,7 @@ public class ChartViewService {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<ChartSeniorAssistDTO> getConditionFields(ChartSeniorThresholdDTO condition){
|
private List<ChartSeniorAssistDTO> getConditionFields(ChartSeniorThresholdDTO condition) {
|
||||||
List<ChartSeniorAssistDTO> list = new ArrayList<>();
|
List<ChartSeniorAssistDTO> list = new ArrayList<>();
|
||||||
if (StringUtils.equalsIgnoreCase(condition.getField(), "0")) {
|
if (StringUtils.equalsIgnoreCase(condition.getField(), "0")) {
|
||||||
return list;
|
return list;
|
||||||
|
|||||||
@ -313,7 +313,7 @@ public class ChartDataBuild {
|
|||||||
String[] row = data.get(i1);
|
String[] row = data.get(i1);
|
||||||
|
|
||||||
StringBuilder a = new StringBuilder();
|
StringBuilder a = new StringBuilder();
|
||||||
if (isDrill) {
|
if (isDrill && !xIsNumber) {
|
||||||
a.append(row[extGroupList.size() + xAxis.size() - 1]);
|
a.append(row[extGroupList.size() + xAxis.size() - 1]);
|
||||||
} else {
|
} else {
|
||||||
for (int i = extGroupList.size(); i < extGroupList.size() + xAxis.size(); i++) {
|
for (int i = extGroupList.size(); i < extGroupList.size() + xAxis.size(); i++) {
|
||||||
@ -329,7 +329,7 @@ public class ChartDataBuild {
|
|||||||
AxisChartDataAntVDTO axisChartDataDTO = new AxisChartDataAntVDTO();
|
AxisChartDataAntVDTO axisChartDataDTO = new AxisChartDataAntVDTO();
|
||||||
|
|
||||||
if (xIsNumber) {
|
if (xIsNumber) {
|
||||||
BigDecimal v = null;
|
Object v = a.toString();
|
||||||
try {
|
try {
|
||||||
v = new BigDecimal(a.toString());
|
v = new BigDecimal(a.toString());
|
||||||
} catch (Exception ignore) {
|
} catch (Exception ignore) {
|
||||||
@ -345,11 +345,20 @@ public class ChartDataBuild {
|
|||||||
List<ChartDimensionDTO> dimensionList = new ArrayList<>();
|
List<ChartDimensionDTO> dimensionList = new ArrayList<>();
|
||||||
List<ChartQuotaDTO> quotaList = new ArrayList<>();
|
List<ChartQuotaDTO> quotaList = new ArrayList<>();
|
||||||
|
|
||||||
for (int j = 0; j < xAxis.size(); j++) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroupList)) {
|
||||||
ChartDimensionDTO chartDimensionDTO = new ChartDimensionDTO();
|
for (int j = 0; j < extGroupList.size(); j++) {
|
||||||
chartDimensionDTO.setId(xAxis.get(j).getId());
|
ChartDimensionDTO chartDimensionDTO = new ChartDimensionDTO();
|
||||||
chartDimensionDTO.setValue(row[j]);
|
chartDimensionDTO.setId(extGroupList.get(j).getId());
|
||||||
dimensionList.add(chartDimensionDTO);
|
chartDimensionDTO.setValue(row[j]);
|
||||||
|
dimensionList.add(chartDimensionDTO);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (int j = 0; j < xAxis.size(); j++) {
|
||||||
|
ChartDimensionDTO chartDimensionDTO = new ChartDimensionDTO();
|
||||||
|
chartDimensionDTO.setId(xAxis.get(j).getId());
|
||||||
|
chartDimensionDTO.setValue(row[j]);
|
||||||
|
dimensionList.add(chartDimensionDTO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
axisChartDataDTO.setDimensionList(dimensionList);
|
axisChartDataDTO.setDimensionList(dimensionList);
|
||||||
|
|
||||||
@ -365,7 +374,11 @@ public class ChartDataBuild {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(extGroup) && xIsNumber) { //有分组时其实就是第一个
|
if (CollectionUtils.isNotEmpty(extGroup) && xIsNumber) { //有分组时其实就是第一个
|
||||||
axisChartDataDTO.setCategory(row[0]);
|
if (isDrill) {
|
||||||
|
axisChartDataDTO.setCategory(row[extGroupList.size() - 1]);
|
||||||
|
} else {
|
||||||
|
axisChartDataDTO.setCategory(row[0]);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
axisChartDataDTO.setCategory(yAxis.get(j).getName());
|
axisChartDataDTO.setCategory(yAxis.get(j).getName());
|
||||||
}
|
}
|
||||||
@ -988,7 +1001,7 @@ public class ChartDataBuild {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extStack)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extStack)) {
|
||||||
fields.add(extStack.get(0));
|
fields.addAll(extStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xIsNumber) {
|
if (xIsNumber) {
|
||||||
|
|||||||
@ -33,6 +33,7 @@
|
|||||||
const user = getQueryVariable('user')
|
const user = getQueryVariable('user')
|
||||||
const terminal = getQueryVariable('terminal')
|
const terminal = getQueryVariable('terminal')
|
||||||
const attachParams = getQueryVariable('attachParams')
|
const attachParams = getQueryVariable('attachParams')
|
||||||
|
const fromLink = getQueryVariable('fromLink')
|
||||||
const baseUrl = window.location.pathname.replace('link.html', '')
|
const baseUrl = window.location.pathname.replace('link.html', '')
|
||||||
let url = baseUrl + "#/delink?link=" + encodeURIComponent(link)
|
let url = baseUrl + "#/delink?link=" + encodeURIComponent(link)
|
||||||
if (terminal) {
|
if (terminal) {
|
||||||
@ -44,6 +45,9 @@
|
|||||||
if (attachParams) {
|
if (attachParams) {
|
||||||
url += '&attachParams=' + encodeURIComponent(attachParams)
|
url += '&attachParams=' + encodeURIComponent(attachParams)
|
||||||
}
|
}
|
||||||
|
if (fromLink) {
|
||||||
|
url += '&fromLink=' + fromLink
|
||||||
|
}
|
||||||
window.location.href = url
|
window.location.href = url
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
>
|
>
|
||||||
<el-button-group size="mini">
|
<el-button-group size="mini">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!isNewBlank"
|
v-if="fromLink"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="button"
|
type="button"
|
||||||
@click="back2Last"
|
@click="back2Last"
|
||||||
@ -89,8 +89,8 @@ export default {
|
|||||||
isPublicLink() {
|
isPublicLink() {
|
||||||
return this.$router.currentRoute.path === '/delink'
|
return this.$router.currentRoute.path === '/delink'
|
||||||
},
|
},
|
||||||
isNewBlank() {
|
fromLink() {
|
||||||
return window.history.length === 1
|
return this.$route.query.fromLink === 'true'
|
||||||
},
|
},
|
||||||
containerClass() {
|
containerClass() {
|
||||||
return this.isPublicLink ? 'trans-pc' : 'bar-main'
|
return this.isPublicLink ? 'trans-pc' : 'bar-main'
|
||||||
|
|||||||
@ -145,32 +145,31 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getStyle} from '@/components/canvas/utils/style'
|
import { getStyle } from '@/components/canvas/utils/style'
|
||||||
import {mapState} from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
import ComponentWrapper from './ComponentWrapper'
|
import ComponentWrapper from './ComponentWrapper'
|
||||||
import {changeStyleWithScale} from '@/components/canvas/utils/translate'
|
import { changeStyleWithScale } from '@/components/canvas/utils/translate'
|
||||||
import {uuid} from 'vue-uuid'
|
import { uuid } from 'vue-uuid'
|
||||||
import {deepCopy, imgUrlTrans} from '@/components/canvas/utils/utils'
|
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
|
||||||
import eventBus from '@/components/canvas/utils/eventBus'
|
import eventBus from '@/components/canvas/utils/eventBus'
|
||||||
import elementResizeDetectorMaker from 'element-resize-detector'
|
import elementResizeDetectorMaker from 'element-resize-detector'
|
||||||
import CanvasOptBar from '@/components/canvas/components/editor/CanvasOptBar'
|
import CanvasOptBar from '@/components/canvas/components/editor/CanvasOptBar'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
import {buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch} from '@/utils/conditionUtil'
|
import { buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch } from '@/utils/conditionUtil'
|
||||||
import {hasDataPermission} from '@/utils/permission'
|
import { hasDataPermission } from '@/utils/permission'
|
||||||
import {activeWatermark} from '@/components/canvas/tools/watermark'
|
import { activeWatermark } from '@/components/canvas/tools/watermark'
|
||||||
import {proxyUserLoginInfo, userLoginInfo} from '@/api/systemInfo/userLogin'
|
import { proxyUserLoginInfo, userLoginInfo } from '@/api/systemInfo/userLogin'
|
||||||
import html2canvas from 'html2canvasde'
|
import html2canvas from 'html2canvasde'
|
||||||
import {queryAll} from '@/api/panel/pdfTemplate'
|
import { queryAll } from '@/api/panel/pdfTemplate'
|
||||||
import PDFPreExport from '@/views/panel/export/PDFPreExport'
|
import PDFPreExport from '@/views/panel/export/PDFPreExport'
|
||||||
import {listenGlobalKeyDownPreview} from '@/components/canvas/utils/shortcutKey'
|
import { listenGlobalKeyDownPreview } from '@/components/canvas/utils/shortcutKey'
|
||||||
import UserViewDialog from '@/components/canvas/customComponent/UserViewDialog'
|
import UserViewDialog from '@/components/canvas/customComponent/UserViewDialog'
|
||||||
import {hexColorToRGBA} from "@/views/chart/chart/util";
|
import { hexColorToRGBA } from '@/views/chart/chart/util'
|
||||||
import {isMobile} from '@/utils/index'
|
import { isMobile } from '@/utils/index'
|
||||||
|
|
||||||
|
|
||||||
const erd = elementResizeDetectorMaker()
|
const erd = elementResizeDetectorMaker()
|
||||||
export default {
|
export default {
|
||||||
components: {UserViewDialog, ComponentWrapper, CanvasOptBar, PDFPreExport},
|
components: { UserViewDialog, ComponentWrapper, CanvasOptBar, PDFPreExport },
|
||||||
model: {
|
model: {
|
||||||
prop: 'show',
|
prop: 'show',
|
||||||
event: 'change'
|
event: 'change'
|
||||||
@ -207,14 +206,14 @@ export default {
|
|||||||
componentData: {
|
componentData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: false,
|
required: false,
|
||||||
default: function () {
|
default: function() {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
canvasStyleData: {
|
canvasStyleData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: false,
|
required: false,
|
||||||
default: function () {
|
default: function() {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -463,7 +462,7 @@ export default {
|
|||||||
return this.$refs['viewWrapperChild']
|
return this.$refs['viewWrapperChild']
|
||||||
},
|
},
|
||||||
getAllWrapperChildRefs() {
|
getAllWrapperChildRefs() {
|
||||||
let allChildRefs = []
|
const allChildRefs = []
|
||||||
const currentChildRefs = this.getWrapperChildRefs()
|
const currentChildRefs = this.getWrapperChildRefs()
|
||||||
if (currentChildRefs && currentChildRefs.length > 0) {
|
if (currentChildRefs && currentChildRefs.length > 0) {
|
||||||
allChildRefs.push.apply(allChildRefs, currentChildRefs)
|
allChildRefs.push.apply(allChildRefs, currentChildRefs)
|
||||||
@ -649,7 +648,7 @@ export default {
|
|||||||
},
|
},
|
||||||
clearAllLinkage() {
|
clearAllLinkage() {
|
||||||
this.$store.commit('clearPanelLinkageInfo')
|
this.$store.commit('clearPanelLinkageInfo')
|
||||||
bus.$emit('clear_panel_linkage', {viewId: 'all'})
|
bus.$emit('clear_panel_linkage', { viewId: 'all' })
|
||||||
},
|
},
|
||||||
changeStyleWithScale,
|
changeStyleWithScale,
|
||||||
getStyle,
|
getStyle,
|
||||||
@ -714,7 +713,7 @@ export default {
|
|||||||
},
|
},
|
||||||
deselectCurComponent(e) {
|
deselectCurComponent(e) {
|
||||||
if (!this.isClickComponent) {
|
if (!this.isClickComponent) {
|
||||||
this.$store.commit('setCurComponent', {component: null, index: null})
|
this.$store.commit('setCurComponent', { component: null, index: null })
|
||||||
if (this.$refs?.['canvas-opt-bar']) {
|
if (this.$refs?.['canvas-opt-bar']) {
|
||||||
this.$refs['canvas-opt-bar'].setWidgetStatus()
|
this.$refs['canvas-opt-bar'].setWidgetStatus()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<img
|
<img
|
||||||
v-if="!showLink"
|
v-if="!showLink"
|
||||||
:style="imageAdapter"
|
:style="imageAdapter"
|
||||||
:src="element.propValue"
|
:src="imgUrl"
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
v-if="showLink"
|
v-if="showLink"
|
||||||
@ -13,13 +13,15 @@
|
|||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
:style="imageAdapter"
|
:style="imageAdapter"
|
||||||
:src="element.propValue"
|
:src="imgUrl"
|
||||||
>
|
>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { imgUrlTrans } from '@/components/canvas/utils/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
element: {
|
element: {
|
||||||
@ -33,6 +35,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
imgUrl() {
|
||||||
|
return imgUrlTrans(this.element.propValue)
|
||||||
|
},
|
||||||
showLink() {
|
showLink() {
|
||||||
return this.editMode === 'preview' && this.element && this.element.hyperlinks && this.element.hyperlinks.enable
|
return this.editMode === 'preview' && this.element && this.element.hyperlinks && this.element.hyperlinks.enable
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1038,7 +1038,7 @@ export default {
|
|||||||
if (this.publicLinkStatus) {
|
if (this.publicLinkStatus) {
|
||||||
// 判断是否有公共链接ID
|
// 判断是否有公共链接ID
|
||||||
if (jumpInfo.publicJumpId) {
|
if (jumpInfo.publicJumpId) {
|
||||||
const url = '/link/' + jumpInfo.publicJumpId
|
const url = '/link/' + jumpInfo.publicJumpId + '?fromLink=true'
|
||||||
const currentUrl = window.location.href
|
const currentUrl = window.location.href
|
||||||
localStorage.setItem('beforeJumpUrl', currentUrl)
|
localStorage.setItem('beforeJumpUrl', currentUrl)
|
||||||
this.windowsJump(url, jumpInfo.jumpType)
|
this.windowsJump(url, jumpInfo.jumpType)
|
||||||
|
|||||||
@ -50,10 +50,32 @@ const unlockMap = {
|
|||||||
|
|
||||||
let isCtrlOrCommandDown = false
|
let isCtrlOrCommandDown = false
|
||||||
|
|
||||||
|
|
||||||
|
// 检查当前页面是否有弹框
|
||||||
|
const checkDialog = () => {
|
||||||
|
let haveDialog = false
|
||||||
|
document.querySelectorAll('.el-dialog__wrapper').forEach(element => {
|
||||||
|
if (window.getComputedStyle(element).getPropertyValue('display') !== 'none') {
|
||||||
|
haveDialog = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
document.querySelectorAll('.el-popover').forEach(element => {
|
||||||
|
if (window.getComputedStyle(element).getPropertyValue('display') !== 'none') {
|
||||||
|
haveDialog = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 富文本单框
|
||||||
|
if (document.querySelector('.tox-dialog-wrap')) {
|
||||||
|
haveDialog = true
|
||||||
|
}
|
||||||
|
|
||||||
|
return haveDialog
|
||||||
|
}
|
||||||
|
|
||||||
// Monitor key operations globally and execute corresponding commands
|
// Monitor key operations globally and execute corresponding commands
|
||||||
export function listenGlobalKeyDown() {
|
export function listenGlobalKeyDown() {
|
||||||
window.onkeydown = (e) => {
|
window.onkeydown = (e) => {
|
||||||
if (!store.state.isInEditor) return
|
if (!store.state.isInEditor || checkDialog()) return
|
||||||
const { keyCode } = e
|
const { keyCode } = e
|
||||||
if (keyCode === ctrlKey || keyCode === commandKey) {
|
if (keyCode === ctrlKey || keyCode === commandKey) {
|
||||||
isCtrlOrCommandDown = true
|
isCtrlOrCommandDown = true
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="right"
|
placement="left"
|
||||||
title=""
|
title=""
|
||||||
width="150"
|
width="150"
|
||||||
:append-to-body="false"
|
:append-to-body="false"
|
||||||
|
|||||||
@ -77,7 +77,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setPanelInfo() {
|
setPanelInfo() {
|
||||||
loadResource(this.resourceId,this.user).then(res => {
|
loadResource(this.resourceId, this.user).then(res => {
|
||||||
this.show = false
|
this.show = false
|
||||||
let loadingCount = 0
|
let loadingCount = 0
|
||||||
const watermarkInfo = {
|
const watermarkInfo = {
|
||||||
|
|||||||
@ -725,7 +725,7 @@ public class DmQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -747,7 +747,7 @@ public class KingbaseQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -577,7 +577,7 @@ public class KylinQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -592,7 +592,7 @@ public class MaxcomputeQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -592,7 +592,7 @@ public class MongobiQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
@ -582,7 +582,7 @@ public class PrestoQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
//然后是数值格式的情况还需要传extGroup
|
//然后是数值格式的情况还需要传extGroup
|
||||||
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
if (xIsNumber && CollectionUtils.isNotEmpty(extGroup)) {
|
||||||
xAxisList.add(extGroup.get(0));
|
xAxisList.addAll(extGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
if (CollectionUtils.isNotEmpty(xAxisList)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user