commit
dec226139e
@ -68,7 +68,7 @@ curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_st
|
||||
```
|
||||
|
||||
- [在线文档](https://dataease.io/docs/)
|
||||
- [演示视频](https://www.bilibili.com/video/BV1UB4y1K7jA)
|
||||
- [演示视频](https://www.bilibili.com/video/BV1i34y1v7hq/)
|
||||
|
||||
## 微信群
|
||||
|
||||
|
||||
@ -5,10 +5,7 @@ import io.dataease.auth.annotation.DePermission;
|
||||
import io.dataease.auth.annotation.DePermissionProxy;
|
||||
import io.dataease.commons.constants.DePermissionType;
|
||||
import io.dataease.commons.constants.ResourceAuthLevel;
|
||||
import io.dataease.controller.request.chart.ChartCalRequest;
|
||||
import io.dataease.controller.request.chart.ChartExtRequest;
|
||||
import io.dataease.controller.request.chart.ChartViewCacheRequest;
|
||||
import io.dataease.controller.request.chart.ChartViewRequest;
|
||||
import io.dataease.controller.request.chart.*;
|
||||
import io.dataease.controller.response.ChartDetail;
|
||||
import io.dataease.dto.chart.ChartViewDTO;
|
||||
import io.dataease.plugins.common.base.domain.ChartViewCacheWithBLOBs;
|
||||
@ -23,6 +20,7 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author gin
|
||||
@ -112,6 +110,13 @@ public class ChartViewController {
|
||||
return chartViewService.chartCopy(id, panelId);
|
||||
}
|
||||
|
||||
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_MANAGE, paramIndex = 1)
|
||||
@ApiOperation("批量复制")
|
||||
@PostMapping("chartBatchCopy/{panelId}")
|
||||
public Map<String,String> chartBatchCopy(@RequestBody ChartCopyBatchRequest request, @PathVariable String panelId) {
|
||||
return chartViewService.chartBatchCopy(request,panelId);
|
||||
}
|
||||
|
||||
@ApiIgnore
|
||||
@GetMapping("searchAdviceSceneId/{panelId}")
|
||||
public String searchAdviceSceneId(@PathVariable String panelId) {
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
package io.dataease.controller.request.chart;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Author: wangjiahao
|
||||
* Date: 2022/4/26
|
||||
* Description:
|
||||
*/
|
||||
@Data
|
||||
public class ChartCopyBatchRequest {
|
||||
|
||||
private String panelId;
|
||||
|
||||
private Map<String,String> sourceAndTargetIds;
|
||||
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package io.dataease.service.chart;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import io.dataease.auth.entity.SysUserEntity;
|
||||
@ -1024,13 +1025,35 @@ public class ChartViewService {
|
||||
return chartViewMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public String chartCopy(String id, String panelId) {
|
||||
public String chartCopy(String sourceViewId,String newViewId, String panelId) {
|
||||
extChartViewMapper.chartCopy(newViewId, sourceViewId, panelId);
|
||||
extChartViewMapper.copyCache(sourceViewId, newViewId);
|
||||
extPanelGroupExtendDataMapper.copyExtendData(sourceViewId, newViewId, panelId);
|
||||
chartViewCacheService.refreshCache(newViewId);
|
||||
return newViewId;
|
||||
}
|
||||
|
||||
public String chartCopy(String sourceViewId, String panelId) {
|
||||
String newChartId = UUID.randomUUID().toString();
|
||||
extChartViewMapper.chartCopy(newChartId, id, panelId);
|
||||
extChartViewMapper.copyCache(id, newChartId);
|
||||
extPanelGroupExtendDataMapper.copyExtendData(id, newChartId, panelId);
|
||||
chartViewCacheService.refreshCache(newChartId);
|
||||
return newChartId;
|
||||
return chartCopy(sourceViewId,newChartId,panelId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description Copy a set of views with a given source ID and target ID
|
||||
* @param request
|
||||
* @param panelId
|
||||
* @return
|
||||
*/
|
||||
public Map<String,String> chartBatchCopy(ChartCopyBatchRequest request,String panelId){
|
||||
Assert.notNull(panelId,"panelId should not be null");
|
||||
Map<String,String> sourceAndTargetIds = request.getSourceAndTargetIds();
|
||||
if(sourceAndTargetIds != null && !sourceAndTargetIds.isEmpty()){
|
||||
for(Map.Entry<String,String> entry:sourceAndTargetIds.entrySet()){
|
||||
chartCopy(entry.getKey(),entry.getValue(),panelId);
|
||||
}
|
||||
}
|
||||
return request.getSourceAndTargetIds();
|
||||
}
|
||||
|
||||
public String searchAdviceSceneId(String panelId) {
|
||||
|
||||
@ -120,6 +120,19 @@ public class ExtractDataService {
|
||||
" exit 1\n" +
|
||||
"fi\n";
|
||||
|
||||
private static final String shellScriptForDeleteFile = "result=`curl --location-trusted -u %s:%s -H \"label:%s\" -H \"column_separator:%s\" -H \"columns:%s\" -H \"merge_type: %s\" -T %s -XPUT http://%s:%s/api/%s/%s/_stream_load`\n" +
|
||||
"rm -rf %s \n" +
|
||||
"if [ $? -eq 0 ] ; then\n" +
|
||||
" failstatus=$(echo $result | grep '\"Status\": \"Fail\"')\n" +
|
||||
" if [ \"x${failstatus}\" != \"x\" ];then" +
|
||||
" echo $result\n" +
|
||||
" exit 1\n" +
|
||||
" fi\n" +
|
||||
"else\n" +
|
||||
" echo $result\n" +
|
||||
" exit 1\n" +
|
||||
"fi\n";
|
||||
|
||||
public synchronized boolean existSyncTask(DatasetTable datasetTable, DatasetTableTask datasetTableTask, Long startTime) {
|
||||
datasetTable.setSyncStatus(JobStatus.Underway.name());
|
||||
DatasetTableExample example = new DatasetTableExample();
|
||||
@ -445,14 +458,20 @@ public class ExtractDataService {
|
||||
|
||||
String dataFile = null;
|
||||
String script = null;
|
||||
String streamLoadScript = "";
|
||||
if(kettleFilesKeep){
|
||||
streamLoadScript = shellScript;
|
||||
}else {
|
||||
streamLoadScript = shellScriptForDeleteFile;
|
||||
}
|
||||
switch (extractType) {
|
||||
case "all_scope":
|
||||
dataFile = root_path + TableUtils.tmpName(TableUtils.tableName(datasetTable.getId())) + "." + extention;
|
||||
script = String.format(shellScript, dorisConfiguration.getUsername(), dorisConfiguration.getPassword(), System.currentTimeMillis(), separator, columns, "APPEND", dataFile, dorisConfiguration.getHost(), dorisConfiguration.getHttpPort(), dorisConfiguration.getDataBase(), TableUtils.tmpName(TableUtils.tableName(datasetTable.getId())));
|
||||
script = String.format(streamLoadScript, dorisConfiguration.getUsername(), dorisConfiguration.getPassword(), System.currentTimeMillis(), separator, columns, "APPEND", dataFile, dorisConfiguration.getHost(), dorisConfiguration.getHttpPort(), dorisConfiguration.getDataBase(), TableUtils.tmpName(TableUtils.tableName(datasetTable.getId())));
|
||||
break;
|
||||
default:
|
||||
dataFile = root_path + TableUtils.addName(TableUtils.tableName(datasetTable.getId())) + "." + extention;
|
||||
script = String.format(shellScript, dorisConfiguration.getUsername(), dorisConfiguration.getPassword(), System.currentTimeMillis(), separator, columns, "APPEND", dataFile, dorisConfiguration.getHost(), dorisConfiguration.getHttpPort(), dorisConfiguration.getDataBase(), TableUtils.tableName(datasetTable.getId()));
|
||||
script = String.format(streamLoadScript, dorisConfiguration.getUsername(), dorisConfiguration.getPassword(), System.currentTimeMillis(), separator, columns, "APPEND", dataFile, dorisConfiguration.getHost(), dorisConfiguration.getHttpPort(), dorisConfiguration.getDataBase(), TableUtils.tableName(datasetTable.getId()));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -744,7 +763,6 @@ public class ExtractDataService {
|
||||
DataEaseException.throwException(transStatus.getLoggingString());
|
||||
return;
|
||||
}
|
||||
|
||||
executing = true;
|
||||
String lastCarteObjectId = Job.sendToSlaveServer(jobMeta, jobExecutionConfiguration, repository, null);
|
||||
SlaveServerJobStatus jobStatus = null;
|
||||
@ -759,7 +777,7 @@ public class ExtractDataService {
|
||||
if (jobStatus.getStatusDescription().equals("Finished")) {
|
||||
return;
|
||||
} else {
|
||||
DataEaseException.throwException((jobStatus.getLoggingString()));
|
||||
DataEaseException.throwException(jobStatus.getLoggingString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -773,20 +791,26 @@ public class ExtractDataService {
|
||||
Datasource dorisDatasource = engineService.getDeEngine();
|
||||
DorisConfiguration dorisConfiguration = new Gson().fromJson(dorisDatasource.getConfiguration(), DorisConfiguration.class);
|
||||
String columns = columnFields + ",dataease_uuid";
|
||||
String streamLoadScript = "";
|
||||
if(kettleFilesKeep){
|
||||
streamLoadScript = shellScript;
|
||||
}else {
|
||||
streamLoadScript = shellScriptForDeleteFile;
|
||||
}
|
||||
switch (extractType) {
|
||||
case "all_scope":
|
||||
outFile = TableUtils.tmpName(TableUtils.tableName(datasetTable.getId()));
|
||||
jobName = "job_" + TableUtils.tableName(datasetTable.getId());
|
||||
script = String.format(shellScript, dorisConfiguration.getUsername(), dorisConfiguration.getPassword(), System.currentTimeMillis(), separator, columns, "APPEND", root_path + outFile + "." + extention, dorisConfiguration.getHost(), dorisConfiguration.getHttpPort(), dorisConfiguration.getDataBase(), TableUtils.tmpName(TableUtils.tableName(datasetTable.getId())), root_path + outFile + "." + extention);
|
||||
script = String.format(streamLoadScript, dorisConfiguration.getUsername(), dorisConfiguration.getPassword(), datasetTable.getId() + System.currentTimeMillis(), separator, columns, "APPEND", root_path + outFile + "." + extention, dorisConfiguration.getHost(), dorisConfiguration.getHttpPort(), dorisConfiguration.getDataBase(), TableUtils.tmpName(TableUtils.tableName(datasetTable.getId())), root_path + outFile + "." + extention);
|
||||
break;
|
||||
case "incremental_add":
|
||||
outFile = TableUtils.addName(datasetTable.getId());
|
||||
jobName = "job_add_" + TableUtils.tableName(datasetTable.getId());
|
||||
script = String.format(shellScript, dorisConfiguration.getUsername(), dorisConfiguration.getPassword(), System.currentTimeMillis(), separator, columns, "APPEND", root_path + outFile + "." + extention, dorisConfiguration.getHost(), dorisConfiguration.getHttpPort(), dorisConfiguration.getDataBase(), TableUtils.tableName(datasetTable.getId()), root_path + outFile + "." + extention);
|
||||
script = String.format(streamLoadScript, dorisConfiguration.getUsername(), dorisConfiguration.getPassword(), datasetTable.getId() + System.currentTimeMillis(), separator, columns, "APPEND", root_path + outFile + "." + extention, dorisConfiguration.getHost(), dorisConfiguration.getHttpPort(), dorisConfiguration.getDataBase(), TableUtils.tableName(datasetTable.getId()), root_path + outFile + "." + extention);
|
||||
break;
|
||||
case "incremental_delete":
|
||||
outFile = TableUtils.deleteName(TableUtils.tableName(datasetTable.getId()));
|
||||
script = String.format(shellScript, dorisConfiguration.getUsername(), dorisConfiguration.getPassword(), System.currentTimeMillis(), separator, columns, "DELETE", root_path + outFile + "." + extention, dorisConfiguration.getHost(), dorisConfiguration.getHttpPort(), dorisConfiguration.getDataBase(), TableUtils.tableName(datasetTable.getId()), root_path + outFile + "." + extention);
|
||||
script = String.format(streamLoadScript, dorisConfiguration.getUsername(), dorisConfiguration.getPassword(), datasetTable.getId() + System.currentTimeMillis(), separator, columns, "DELETE", root_path + outFile + "." + extention, dorisConfiguration.getHost(), dorisConfiguration.getHttpPort(), dorisConfiguration.getDataBase(), TableUtils.tableName(datasetTable.getId()), root_path + outFile + "." + extention);
|
||||
jobName = "job_delete_" + TableUtils.tableName(datasetTable.getId());
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -115,6 +115,9 @@ public class DatasourceService {
|
||||
datasourceDTO.setCalculationMode(dataSourceType.getCalculationMode());
|
||||
}
|
||||
});
|
||||
if(datasourceDTO.getType().equalsIgnoreCase(DatasourceTypes.mysql.toString())){
|
||||
datasourceDTO.setConfiguration(JSONObject.toJSONString(new Gson().fromJson(datasourceDTO.getConfiguration(), MysqlConfiguration.class)) );
|
||||
}
|
||||
if(datasourceDTO.getType().equalsIgnoreCase(DatasourceTypes.api.toString())){
|
||||
JSONArray apiDefinitionList = JSONObject.parseArray(datasourceDTO.getConfiguration());
|
||||
JSONArray apiDefinitionListWithStatus = new JSONArray();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -27,6 +27,14 @@ export function chartCopy(id, panelId) {
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
export function chartBatchCopy(params, panelId) {
|
||||
return request({
|
||||
url: '/chart/view/chartBatchCopy/' + panelId,
|
||||
method: 'post',
|
||||
data: params,
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
export function chartGroupTree(data) {
|
||||
return request({
|
||||
url: '/chart/group/tree',
|
||||
|
||||
@ -2,7 +2,7 @@ import store from '@/store/index'
|
||||
import toast from '@/components/canvas/utils/toast'
|
||||
import generateID from '@/components/canvas/utils/generateID'
|
||||
import { deepCopy } from '@/components/canvas/utils/utils'
|
||||
import { chartCopy } from '@/api/chart/chart'
|
||||
import { chartBatchCopy, chartCopy } from '@/api/chart/chart'
|
||||
import { uuid } from 'vue-uuid'
|
||||
|
||||
export default {
|
||||
@ -53,6 +53,19 @@ export default {
|
||||
newView.propValue.viewId = res.data
|
||||
store.commit('addComponent', { component: newView })
|
||||
})
|
||||
} if (data.type === 'de-tabs') {
|
||||
const sourceAndTargetIds = {}
|
||||
const newCop = deepCopy(data)
|
||||
newCop.options.tabList.forEach((item) => {
|
||||
if (item.content && item.content.type === 'view') {
|
||||
const newViewId = uuid.v1()
|
||||
sourceAndTargetIds[item.content.propValue.viewId] = newViewId
|
||||
item.content.propValue.viewId = newViewId
|
||||
}
|
||||
})
|
||||
chartBatchCopy({ 'sourceAndTargetIds': sourceAndTargetIds }, state.panel.panelInfo.id).then((rsp) => {
|
||||
store.commit('addComponent', { component: newCop })
|
||||
})
|
||||
} else {
|
||||
const newCop = deepCopy(data)
|
||||
newCop.id = uuid.v1()
|
||||
|
||||
@ -227,7 +227,8 @@ export default {
|
||||
this.onFocus = true
|
||||
// 下拉框弹出时,设置弹框的宽度
|
||||
this.$nextTick(() => {
|
||||
this.selectOptionWidth = event.srcElement.offsetWidth + 'px'
|
||||
// this.selectOptionWidth = event.srcElement.offsetWidth + 'px'
|
||||
this.selectOptionWidth = event.srcElement.parentElement.parentElement.offsetWidth + 'px'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -110,6 +110,7 @@ import { mapState } from 'vuex'
|
||||
import { deepCopy } from '@/components/canvas/utils/utils'
|
||||
import { COLOR_PANEL } from '@/views/chart/chart/chart'
|
||||
import { uploadFileResult } from '@/api/staticResource/staticResource'
|
||||
import { COMMON_BACKGROUND_NONE } from '@/components/canvas/custom-component/component-list'
|
||||
|
||||
export default {
|
||||
name: 'Background',
|
||||
@ -144,7 +145,7 @@ export default {
|
||||
if (this.curComponent && this.curComponent.commonBackground && this.curComponent.commonBackground.outerImage && typeof (this.curComponent.commonBackground.outerImage) === 'string') {
|
||||
this.fileList.push({ url: this.curComponent.commonBackground.outerImage })
|
||||
}
|
||||
this.backgroundOrigin = deepCopy(this.curComponent.commonBackground)
|
||||
this.backgroundOrigin = deepCopy(this.curComponent.commonBackground ? this.curComponent.commonBackground : COMMON_BACKGROUND_NONE)
|
||||
this.queryBackground()
|
||||
},
|
||||
queryBackground() {
|
||||
|
||||
@ -674,8 +674,7 @@ export const BASE_CHART_STRING = {
|
||||
legend: DEFAULT_LEGEND_STYLE,
|
||||
xAxis: DEFAULT_XAXIS_STYLE,
|
||||
yAxis: DEFAULT_YAXIS_STYLE,
|
||||
yAxisExt: DEFAULT_YAXIS_EXT_STYLE,
|
||||
background: DEFAULT_BACKGROUND_COLOR
|
||||
yAxisExt: DEFAULT_YAXIS_EXT_STYLE
|
||||
}),
|
||||
customFilter: '[]'
|
||||
}
|
||||
@ -698,8 +697,7 @@ export const BASE_CHART = {
|
||||
legend: DEFAULT_LEGEND_STYLE,
|
||||
xAxis: DEFAULT_XAXIS_STYLE,
|
||||
yAxis: DEFAULT_YAXIS_STYLE,
|
||||
yAxisExt: DEFAULT_YAXIS_EXT_STYLE,
|
||||
background: DEFAULT_BACKGROUND_COLOR
|
||||
yAxisExt: DEFAULT_YAXIS_EXT_STYLE
|
||||
},
|
||||
customFilter: []
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ export default {
|
||||
} else if (chart.type === 'radar') {
|
||||
chart_option = baseRadarOption(JSON.parse(JSON.stringify(BASE_RADAR)), chart)
|
||||
} else if (chart.type === 'gauge') {
|
||||
chart_option = baseGaugeOption(JSON.parse(JSON.stringify(BASE_GAUGE)), chart, this.scale)
|
||||
chart_option = baseGaugeOption(JSON.parse(JSON.stringify(BASE_GAUGE)), chart, this.terminalType === 'pc' ? this.scale : '0.7')
|
||||
} else if (chart.type === 'scatter') {
|
||||
chart_option = baseScatterOption(JSON.parse(JSON.stringify(BASE_SCATTER)), chart, this.terminalType)
|
||||
} else if (chart.type === 'treemap') {
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
export function getItemType(dimensionData, quotaData, item) {
|
||||
// Check whether the current view is in template status
|
||||
// ( dimensionData and quotaData have no data). If yes, return 'success' directly
|
||||
if (dimensionData.length === 0 && quotaData.length === 0) {
|
||||
return 'success'
|
||||
}
|
||||
// 将item的字段在数据集维度、指标字段中查询一遍,如果遇到id不存在、字段类型不一致、维度指标不一致,则提示
|
||||
const status = item.groupType
|
||||
let checked = false
|
||||
|
||||
@ -1178,7 +1178,6 @@ import bus from '@/utils/bus'
|
||||
import DatasetChartDetail from '../../dataset/common/DatasetChartDetail'
|
||||
// shape attr,component style
|
||||
import {
|
||||
DEFAULT_BACKGROUND_COLOR,
|
||||
DEFAULT_COLOR_CASE,
|
||||
DEFAULT_FUNCTION_CFG,
|
||||
DEFAULT_LABEL,
|
||||
@ -1333,7 +1332,6 @@ export default {
|
||||
xAxis: DEFAULT_XAXIS_STYLE,
|
||||
yAxis: DEFAULT_YAXIS_STYLE,
|
||||
yAxisExt: DEFAULT_YAXIS_EXT_STYLE,
|
||||
background: DEFAULT_BACKGROUND_COLOR,
|
||||
split: DEFAULT_SPLIT
|
||||
},
|
||||
senior: {
|
||||
@ -1472,7 +1470,8 @@ export default {
|
||||
})
|
||||
this.pluginRenderOptions = [...this.renderOptions, ...pluginOptions]
|
||||
},
|
||||
emptyTableData() {
|
||||
emptyTableData(id) {
|
||||
console.log('emptyTableData:' + id)
|
||||
this.table = {}
|
||||
this.dimension = []
|
||||
this.quota = []
|
||||
@ -1500,8 +1499,11 @@ export default {
|
||||
initTableData(id, optType) {
|
||||
if (id != null) {
|
||||
post('/dataset/table/getWithPermission/' + id, null).then(response => {
|
||||
this.table = response.data
|
||||
this.initTableField(id, optType)
|
||||
// If click too fast on the panel, the data here may be inconsistent, so make a verification
|
||||
if (this.view.tableId === id) {
|
||||
this.table = response.data
|
||||
this.initTableField(id, optType)
|
||||
}
|
||||
}).catch(err => {
|
||||
this.table = null
|
||||
this.resetDatasetField()
|
||||
@ -1514,17 +1516,20 @@ export default {
|
||||
initTableField(id, optType) {
|
||||
if (this.table) {
|
||||
post('/dataset/table/getFieldsFromDE', this.table).then(response => {
|
||||
this.dimension = response.data.dimension
|
||||
this.quota = response.data.quota
|
||||
this.dimensionData = JSON.parse(JSON.stringify(this.dimension))
|
||||
this.quotaData = JSON.parse(JSON.stringify(this.quota))
|
||||
this.fieldFilter(this.searchField)
|
||||
if (optType === 'change') {
|
||||
this.resetChangeTable()
|
||||
this.$nextTick(() => {
|
||||
bus.$emit('reset-change-table', 'change')
|
||||
this.calcData()
|
||||
})
|
||||
// If click too fast on the panel, the data here may be inconsistent, so make a verification
|
||||
if (this.view.tableId === id) {
|
||||
this.dimension = response.data.dimension
|
||||
this.quota = response.data.quota
|
||||
this.dimensionData = JSON.parse(JSON.stringify(this.dimension))
|
||||
this.quotaData = JSON.parse(JSON.stringify(this.quota))
|
||||
this.fieldFilter(this.searchField)
|
||||
if (optType === 'change') {
|
||||
this.resetChangeTable()
|
||||
this.$nextTick(() => {
|
||||
bus.$emit('reset-change-table', 'change')
|
||||
this.calcData()
|
||||
})
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
@ -1911,27 +1916,30 @@ export default {
|
||||
getChart(id, queryFrom = 'panel_edit') {
|
||||
if (id) {
|
||||
getChartDetails(id, this.panelInfo.id, { queryFrom: queryFrom }).then(response => {
|
||||
if (response.data.dataFrom === 'template') {
|
||||
this.emptyTableData()
|
||||
} else {
|
||||
this.initTableData(response.data.tableId)
|
||||
}
|
||||
this.view = JSON.parse(JSON.stringify(response.data))
|
||||
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
|
||||
this.view.xaxisExt = this.view.xaxisExt ? JSON.parse(this.view.xaxisExt) : []
|
||||
this.view.yaxis = this.view.yaxis ? JSON.parse(this.view.yaxis) : []
|
||||
this.view.yaxisExt = this.view.yaxisExt ? JSON.parse(this.view.yaxisExt) : []
|
||||
this.view.extStack = this.view.extStack ? JSON.parse(this.view.extStack) : []
|
||||
this.view.drillFields = this.view.drillFields ? JSON.parse(this.view.drillFields) : []
|
||||
this.view.extBubble = this.view.extBubble ? JSON.parse(this.view.extBubble) : []
|
||||
this.view.customAttr = this.view.customAttr ? JSON.parse(this.view.customAttr) : {}
|
||||
this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {}
|
||||
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {}
|
||||
this.view.senior = this.view.senior ? JSON.parse(this.view.senior) : {}
|
||||
// If click too fast on the panel, the data here may be inconsistent, so make a verification
|
||||
if (response.data.id === this.param.id) {
|
||||
if (response.data.dataFrom === 'template') {
|
||||
this.emptyTableData(response.data.id)
|
||||
} else {
|
||||
this.initTableData(response.data.tableId)
|
||||
}
|
||||
this.view = JSON.parse(JSON.stringify(response.data))
|
||||
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
|
||||
this.view.xaxisExt = this.view.xaxisExt ? JSON.parse(this.view.xaxisExt) : []
|
||||
this.view.yaxis = this.view.yaxis ? JSON.parse(this.view.yaxis) : []
|
||||
this.view.yaxisExt = this.view.yaxisExt ? JSON.parse(this.view.yaxisExt) : []
|
||||
this.view.extStack = this.view.extStack ? JSON.parse(this.view.extStack) : []
|
||||
this.view.drillFields = this.view.drillFields ? JSON.parse(this.view.drillFields) : []
|
||||
this.view.extBubble = this.view.extBubble ? JSON.parse(this.view.extBubble) : []
|
||||
this.view.customAttr = this.view.customAttr ? JSON.parse(this.view.customAttr) : {}
|
||||
this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {}
|
||||
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {}
|
||||
this.view.senior = this.view.senior ? JSON.parse(this.view.senior) : {}
|
||||
|
||||
// 将视图传入echart组件
|
||||
this.chart = response.data
|
||||
this.data = response.data.data
|
||||
// 将视图传入echart组件
|
||||
this.chart = response.data
|
||||
this.data = response.data.data
|
||||
}
|
||||
}).catch(err => {
|
||||
this.httpRequest.status = err.response.data.success
|
||||
this.httpRequest.msg = err.response.data.message
|
||||
|
||||
@ -23,16 +23,16 @@
|
||||
<panel-view-result class="attr-selector" />
|
||||
</el-row>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item :title="$t('chart.module_style')" name="component">
|
||||
<el-row class="selector-div">
|
||||
<panel-background-color-selector
|
||||
v-if="chart"
|
||||
class="attr-selector"
|
||||
:chart="chart"
|
||||
@onChangeBackgroundForm="onChangeBackgroundForm"
|
||||
/>
|
||||
</el-row>
|
||||
</el-collapse-item>
|
||||
<!-- <el-collapse-item :title="$t('chart.module_style')" name="component">-->
|
||||
<!-- <el-row class="selector-div">-->
|
||||
<!-- <panel-background-color-selector-->
|
||||
<!-- v-if="chart"-->
|
||||
<!-- class="attr-selector"-->
|
||||
<!-- :chart="chart"-->
|
||||
<!-- @onChangeBackgroundForm="onChangeBackgroundForm"-->
|
||||
<!-- />-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </el-collapse-item>-->
|
||||
<el-collapse-item :title="$t('chart.shape_attr')" name="graphical">
|
||||
<el-row class="selector-div">
|
||||
<panel-color-selector
|
||||
|
||||
@ -949,6 +949,7 @@ export default {
|
||||
hyperlinks: HYPERLINKS,
|
||||
mobileStyle: BASE_MOBILE_STYLE,
|
||||
propValue: fileResult,
|
||||
commonBackground: deepCopy(COMMON_BACKGROUND),
|
||||
style: {
|
||||
...commonStyle
|
||||
}
|
||||
|
||||
@ -277,6 +277,7 @@ export default {
|
||||
this.form = JSON.parse(JSON.stringify(row))
|
||||
this.originConfiguration = this.form.configuration
|
||||
if (row.type === 'api') {
|
||||
|
||||
} else {
|
||||
this.form.configuration = JSON.parse(this.form.configuration)
|
||||
}
|
||||
@ -320,6 +321,7 @@ export default {
|
||||
case 'ck':
|
||||
case 'mongo':
|
||||
case 'mariadb':
|
||||
case 'impala':
|
||||
if (configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port) {
|
||||
repeat = true
|
||||
repeatDsName.push(child.name)
|
||||
@ -493,7 +495,9 @@ export default {
|
||||
changeType() {
|
||||
for (let i = 0; i < this.dsTypes.length; i++) {
|
||||
if (this.dsTypes[i].type === this.form.type) {
|
||||
this.form.configuration.extraParams = this.dsTypes[i].extraParams
|
||||
if(row.type !== 'api'){
|
||||
this.form.configuration.extraParams = this.dsTypes[i].extraParams
|
||||
}
|
||||
this.datasourceType = this.dsTypes[i]
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<el-row class="demo_main">
|
||||
<div class="demo_title" />
|
||||
<div class="demo_content">
|
||||
<a href="https://www.bilibili.com/video/BV1UB4y1K7jA" target="_blank">{{ $t('wizard.demo_video_hint') }}</a>
|
||||
<a href="https://www.bilibili.com/video/BV1i34y1v7hq/" target="_blank">{{ $t('wizard.demo_video_hint') }}</a>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
@ -43,7 +43,7 @@ export default {
|
||||
head: this.$t('wizard.quick_start'),
|
||||
content: this.$t('wizard.demo_video_hint'),
|
||||
bottom: '',
|
||||
href: 'https://www.bilibili.com/video/BV1UB4y1K7jA',
|
||||
href: 'https://www.bilibili.com/video/BV1i34y1v7hq/',
|
||||
component: 'CardDetail'
|
||||
},
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user