forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
a9cca87c7f
@ -378,7 +378,7 @@
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
<nonFilteredFileExtensions>
|
||||
<nonFilteredFileExtension>xls</nonFilteredFileExtension>
|
||||
<nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
|
||||
</nonFilteredFileExtensions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
@ -15,9 +15,9 @@ public class HttpClientConfig {
|
||||
private Map<String, String> header = new HashMap<>();
|
||||
|
||||
// 设置连接超时时间,单位毫秒
|
||||
private int connectTimeout = 5000;
|
||||
private int connectTimeout = 30000;
|
||||
// 设置从connect Manager获取Connection 超时时间,单位毫秒。这个属性是新加的属性,因为目前版本是可以共享连接池的
|
||||
private int connectionRequestTimeout = 5000;
|
||||
private int connectionRequestTimeout = 30000;
|
||||
// 请求获取数据的超时时间,单位毫秒。 如果访问一个接口,多少时间内无法返回数据,就直接放弃此次调用
|
||||
private int socketTimeout = 60000;
|
||||
|
||||
|
@ -14,4 +14,6 @@ public class TemplateCategory {
|
||||
private String name;
|
||||
|
||||
private String slug;
|
||||
|
||||
private Integer priority;
|
||||
}
|
||||
|
@ -86,8 +86,8 @@ public class PanelAppTemplateService {
|
||||
String snapshotName = "app-template-" + request.getId() + ".jpeg";
|
||||
staticResourceService.saveSingleFileToServe(snapshotName, request.getSnapshot().replace("data:image/jpeg;base64,", ""));
|
||||
requestTemplate.setSnapshot("/" + UPLOAD_URL_PREFIX + '/' + snapshotName);
|
||||
panelAppTemplateMapper.insertSelective(requestTemplate);
|
||||
}
|
||||
panelAppTemplateMapper.insertSelective(requestTemplate);
|
||||
}
|
||||
|
||||
|
||||
@ -193,11 +193,26 @@ public class PanelAppTemplateService {
|
||||
public Map<String, String> applyDatasetField(List<DatasetTableField> datasetTableFieldsInfo, Map<String, String> datasetsRealMap) {
|
||||
Map<String, String> datasetFieldsRealMap = new HashMap<>();
|
||||
for (DatasetTableField datasetTableField : datasetTableFieldsInfo) {
|
||||
String oldId = datasetTableField.getId();
|
||||
datasetTableField.setTableId(datasetsRealMap.get(datasetTableField.getTableId()));
|
||||
datasetTableField.setId(null);
|
||||
DatasetTableField newTableField = dataSetTableFieldsService.save(datasetTableField);
|
||||
datasetFieldsRealMap.put(oldId, newTableField.getId());
|
||||
if(datasetTableField.getExtField()!=2){
|
||||
String oldId = datasetTableField.getId();
|
||||
datasetTableField.setTableId(datasetsRealMap.get(datasetTableField.getTableId()));
|
||||
datasetTableField.setId(null);
|
||||
DatasetTableField newTableField = dataSetTableFieldsService.save(datasetTableField);
|
||||
datasetFieldsRealMap.put(oldId, newTableField.getId());
|
||||
}
|
||||
}
|
||||
//数据集计算字段替换
|
||||
for (DatasetTableField datasetTableField : datasetTableFieldsInfo) {
|
||||
if(datasetTableField.getExtField()==2){
|
||||
String oldId = datasetTableField.getId();
|
||||
datasetTableField.setTableId(datasetsRealMap.get(datasetTableField.getTableId()));
|
||||
datasetTableField.setId(null);
|
||||
datasetFieldsRealMap.forEach((k, v) -> {
|
||||
datasetTableField.setOriginName(datasetTableField.getOriginName().replaceAll(k, v));
|
||||
});
|
||||
DatasetTableField newTableField = dataSetTableFieldsService.save(datasetTableField);
|
||||
datasetFieldsRealMap.put(oldId, newTableField.getId());
|
||||
}
|
||||
}
|
||||
return datasetFieldsRealMap;
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -76,7 +77,7 @@ public class TemplateMarketService {
|
||||
String resultStr = marketGet(basicInfo.getTemplateMarketUlr()+CATEGORIES_API,basicInfo.getTemplateAccessKey());
|
||||
List<TemplateCategory> categories = JSONObject.parseObject(resultStr).getJSONArray("data").toJavaList(TemplateCategory.class);
|
||||
if(CollectionUtils.isNotEmpty(categories)){
|
||||
return categories.stream().map(TemplateCategory :: getName).collect(Collectors.toList());
|
||||
return categories.stream().sorted(Comparator.comparing(TemplateCategory::getPriority)).map(TemplateCategory :: getName).collect(Collectors.toList());
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
BIN
backend/src/main/resources/excel/user.xlsx
Normal file
BIN
backend/src/main/resources/excel/user.xlsx
Normal file
Binary file not shown.
@ -26,7 +26,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/g2plot": "^2.4.9",
|
||||
"@antv/l7-maps": "^2.8.35",
|
||||
"@antv/l7": "2.8.31",
|
||||
"@antv/l7-component": "2.8.31",
|
||||
"@antv/l7-core": "2.8.31",
|
||||
"@antv/l7-layers": "2.8.31",
|
||||
"@antv/l7-maps": "2.8.31",
|
||||
"@antv/l7-renderer": "2.8.31",
|
||||
"@antv/l7-scene": "2.8.31",
|
||||
"@antv/l7-source": "2.8.31",
|
||||
"@antv/l7-utils": "2.8.31",
|
||||
"@antv/s2": "^1.11.0",
|
||||
"@antv/util": "^2.0.17",
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
|
@ -262,12 +262,22 @@ export default {
|
||||
this._updateH()
|
||||
this.$nextTick(() => {
|
||||
on(document, 'mouseup', this._popoverHideFun)
|
||||
this.bindScroll()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
off(document, 'mouseup', this._popoverHideFun)
|
||||
this.unbindScroll()
|
||||
},
|
||||
methods: {
|
||||
bindScroll() {
|
||||
window.onmousewheel = this._popoverHideFun
|
||||
on(document, 'DOMMouseScroll', this._popoverHideFun)
|
||||
},
|
||||
unbindScroll() {
|
||||
window.onmousewheel = null
|
||||
off(document, 'DOMMouseScroll', this._popoverHideFun)
|
||||
},
|
||||
showPopover() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.input.focus()
|
||||
|
@ -553,12 +553,22 @@ export default {
|
||||
sourceCustomAttr[param.property][param.value.modifyName] = param.value[param.value.modifyName]
|
||||
this.sourceCustomAttrStr = JSON.stringify(sourceCustomAttr)
|
||||
this.chart.customAttr = this.sourceCustomAttrStr
|
||||
this.$store.commit('updateComponentViewsData', {
|
||||
viewId: this.chart.id,
|
||||
propertyKey: 'customAttr',
|
||||
propertyValue: this.sourceCustomAttrStr
|
||||
})
|
||||
updateParams['customAttr'] = this.sourceCustomAttrStr
|
||||
} else if (param.custom === 'customStyle') {
|
||||
const sourceCustomStyle = JSON.parse(this.sourceCustomStyleStr)
|
||||
sourceCustomStyle[param.property][param.value.modifyName] = param.value[param.value.modifyName]
|
||||
this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle)
|
||||
this.chart.customStyle = this.sourceCustomStyleStr
|
||||
this.$store.commit('updateComponentViewsData', {
|
||||
viewId: this.chart.id,
|
||||
propertyKey: 'customStyle',
|
||||
propertyValue: this.sourceCustomStyleStr
|
||||
})
|
||||
updateParams['customStyle'] = this.sourceCustomStyleStr
|
||||
}
|
||||
viewPropsSave(this.panelInfo.id, updateParams).then(rsp => {
|
||||
|
@ -608,10 +608,22 @@ const data = {
|
||||
if (element === id) {
|
||||
delete state.batchOptViews[id]
|
||||
state.curBatchOptComponents.splice(index, 1)
|
||||
this.commit('setBatchOptChartInfo')
|
||||
break
|
||||
}
|
||||
}
|
||||
if (state.curBatchOptComponents.length === 1) {
|
||||
const lastViewId = state.curBatchOptComponents[0]
|
||||
const viewBaseInfo = state.componentViewsData[lastViewId]
|
||||
state.changeProperties.customAttr = JSON.parse(viewBaseInfo.customAttr)
|
||||
state.changeProperties.customStyle = JSON.parse(viewBaseInfo.customStyle)
|
||||
}
|
||||
if (state.curBatchOptComponents.length === 0) {
|
||||
state.changeProperties = {
|
||||
customStyle: {},
|
||||
customAttr: {}
|
||||
}
|
||||
}
|
||||
this.commit('setBatchOptChartInfo')
|
||||
},
|
||||
addCurBatchComponent(state, id) {
|
||||
if (id) {
|
||||
@ -621,11 +633,18 @@ const data = {
|
||||
// get properties
|
||||
const viewConfig = state.allViewRender.filter(item => item.render === viewBaseInfo.render && item.value === viewBaseInfo.type)
|
||||
if (viewConfig && viewConfig.length > 0) {
|
||||
if (state.curBatchOptComponents.length === 1) {
|
||||
state.changeProperties.customAttr = JSON.parse(viewBaseInfo.customAttr)
|
||||
state.changeProperties.customStyle = JSON.parse(viewBaseInfo.customStyle)
|
||||
}
|
||||
state.batchOptViews[id] = viewConfig[0]
|
||||
this.commit('setBatchOptChartInfo')
|
||||
}
|
||||
}
|
||||
},
|
||||
updateComponentViewsData(state, { viewId, propertyKey, propertyValue }) {
|
||||
state.componentViewsData[viewId][propertyKey] = propertyValue
|
||||
},
|
||||
removeCurMultiplexingComponentWithId(state, id) {
|
||||
delete state.curMultiplexingComponents[id]
|
||||
},
|
||||
|
@ -207,8 +207,10 @@ export default {
|
||||
mounted() {
|
||||
this.preDraw()
|
||||
},
|
||||
destroyed() {
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.myChart.resize)
|
||||
this.myChart.dispose()
|
||||
this.myChart = null
|
||||
},
|
||||
created() {
|
||||
this.loadThemeStyle()
|
||||
@ -403,9 +405,7 @@ export default {
|
||||
const chart = this.myChart
|
||||
this.setBackGroundBorder()
|
||||
setTimeout(chart.setOption(option, true), 500)
|
||||
window.onresize = function() {
|
||||
chart.resize()
|
||||
}
|
||||
window.removeEventListener('resize', chart.resize)
|
||||
},
|
||||
setBackGroundBorder() {
|
||||
if (this.chart.customStyle) {
|
||||
|
@ -155,6 +155,11 @@ export default {
|
||||
this.drawEcharts()
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.myChart.destroy()
|
||||
window.removeEventListener('resize', this.calcHeightDelay)
|
||||
this.myChart = null
|
||||
},
|
||||
mounted() {
|
||||
this.preDraw()
|
||||
},
|
||||
@ -202,10 +207,7 @@ export default {
|
||||
new Promise((resolve) => { resolve() }).then(() => {
|
||||
this.drawView()
|
||||
})
|
||||
const that = this
|
||||
window.onresize = function() {
|
||||
that.calcHeightDelay()
|
||||
}
|
||||
window.addEventListener('resize', this.calcHeightDelay)
|
||||
},
|
||||
drawView() {
|
||||
const chart = this.chart
|
||||
|
@ -195,6 +195,9 @@ export default {
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.scrollTimer)
|
||||
window.removeEventListener('resize', this.onResize)
|
||||
this.myChart.destroy()
|
||||
this.myChart = null
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
@ -221,21 +224,16 @@ export default {
|
||||
this.tableData = data
|
||||
},
|
||||
preDraw() {
|
||||
this.onResize()
|
||||
window.addEventListener('resize', this.onResize)
|
||||
},
|
||||
onResize() {
|
||||
this.initData()
|
||||
this.initTitle()
|
||||
this.calcHeightDelay()
|
||||
new Promise((resolve) => { resolve() }).then(() => {
|
||||
this.drawView()
|
||||
})
|
||||
const that = this
|
||||
window.onresize = function() {
|
||||
that.initData()
|
||||
that.initTitle()
|
||||
that.calcHeightDelay()
|
||||
new Promise((resolve) => { resolve() }).then(() => {
|
||||
that.drawView()
|
||||
})
|
||||
}
|
||||
},
|
||||
drawView() {
|
||||
const chart = this.chart
|
||||
|
@ -133,15 +133,13 @@ export default {
|
||||
},
|
||||
beforeDestroy() {
|
||||
eventBus.$off('resizing', this.chartResize)
|
||||
window.removeEventListener('resize', this.calcHeight)
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
const that = this
|
||||
this.initStyle()
|
||||
this.resultFormat()
|
||||
window.onresize = function() {
|
||||
that.calcHeight()
|
||||
}
|
||||
window.addEventListener('resize', this.calcHeight)
|
||||
this.setBackGroundBorder()
|
||||
this.initRemark()
|
||||
},
|
||||
|
@ -161,14 +161,12 @@ export default {
|
||||
},
|
||||
beforeDestroy() {
|
||||
eventBus.$off('resizing', this.chartResize)
|
||||
window.removeEventListener('resize', this.calcHeight)
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
const that = this
|
||||
this.initStyle()
|
||||
window.onresize = function() {
|
||||
that.calcHeight()
|
||||
}
|
||||
window.addEventListener('resize', this.calcHeight)
|
||||
this.setBackGroundBorder()
|
||||
this.initRemark()
|
||||
},
|
||||
|
@ -50,8 +50,10 @@
|
||||
|
||||
<template
|
||||
slot="header"
|
||||
slot-scope="scope"
|
||||
>
|
||||
<el-input
|
||||
:id="scope.$index"
|
||||
v-model="keyWord"
|
||||
size="mini"
|
||||
placeholder="输入关键字搜索"
|
||||
|
@ -155,7 +155,7 @@
|
||||
>
|
||||
<el-checkbox
|
||||
v-model="labelForm.show"
|
||||
@change="changeLabelAttr"
|
||||
@change="changeLabelAttr('show')"
|
||||
>{{ $t('chart.show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
<div v-show="labelForm.show">
|
||||
@ -167,7 +167,7 @@
|
||||
v-model="labelForm.fontSize"
|
||||
:placeholder="$t('chart.text_fontsize')"
|
||||
size="mini"
|
||||
@change="changeLabelAttr"
|
||||
@change="changeLabelAttr('fontSize')"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in fontSize"
|
||||
@ -185,7 +185,7 @@
|
||||
v-model="labelForm.color"
|
||||
class="color-picker-style"
|
||||
:predefine="predefineColors"
|
||||
@change="changeLabelAttr"
|
||||
@change="changeLabelAttr('color')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -194,7 +194,7 @@
|
||||
>
|
||||
<el-select
|
||||
v-model="labelForm.gaugeLabelFormatter.type"
|
||||
@change="changeLabelAttr"
|
||||
@change="changeLabelAttr('gaugeLabelFormatter')"
|
||||
>
|
||||
<el-option
|
||||
v-for="type in typeList"
|
||||
@ -215,7 +215,7 @@
|
||||
:min="0"
|
||||
:max="10"
|
||||
size="mini"
|
||||
@change="changeLabelAttr"
|
||||
@change="changeLabelAttr('gaugeLabelFormatter')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -227,7 +227,7 @@
|
||||
v-model="labelForm.gaugeLabelFormatter.unit"
|
||||
:placeholder="$t('chart.pls_select_field')"
|
||||
size="mini"
|
||||
@change="changeLabelAttr"
|
||||
@change="changeLabelAttr('gaugeLabelFormatter')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in unitList"
|
||||
@ -246,7 +246,7 @@
|
||||
size="mini"
|
||||
clearable
|
||||
:placeholder="$t('commons.input_content')"
|
||||
@change="changeLabelAttr"
|
||||
@change="changeLabelAttr('gaugeLabelFormatter')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -255,7 +255,7 @@
|
||||
>
|
||||
<el-checkbox
|
||||
v-model="labelForm.gaugeLabelFormatter.thousandSeparator"
|
||||
@change="changeLabelAttr"
|
||||
@change="changeLabelAttr('gaugeLabelFormatter')"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
@ -168,6 +168,7 @@ export default {
|
||||
beforeDestroy() {
|
||||
eventBus.$off('resizing', this.chartResize)
|
||||
clearInterval(this.scrollTimer)
|
||||
window.removeEventListener('resize', this.calcHeightDelay)
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
@ -187,7 +188,6 @@ export default {
|
||||
}
|
||||
},
|
||||
initData() {
|
||||
const that = this
|
||||
let data = []
|
||||
this.showPage = false
|
||||
if (this.chart.data) {
|
||||
@ -229,9 +229,7 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.initStyle()
|
||||
})
|
||||
window.onresize = function() {
|
||||
that.calcHeightDelay()
|
||||
}
|
||||
window.addEventListener('resize', this.calcHeightDelay)
|
||||
},
|
||||
calcHeightRightNow() {
|
||||
this.$nextTick(() => {
|
||||
|
@ -568,10 +568,11 @@ export default {
|
||||
this.filterField(val)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.calcHeight)
|
||||
},
|
||||
mounted() {
|
||||
window.onresize = () => {
|
||||
this.calcHeight()
|
||||
}
|
||||
window.addEventListener('resize', this.calcHeight)
|
||||
this.calcHeight()
|
||||
this.initField()
|
||||
},
|
||||
|
@ -312,11 +312,12 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.calHeight)
|
||||
},
|
||||
mounted() {
|
||||
this.initDataSource()
|
||||
window.onresize = () => {
|
||||
this.calHeight()
|
||||
}
|
||||
window.addEventListener('resize', this.calHeight)
|
||||
this.calHeight()
|
||||
},
|
||||
activated() {
|
||||
|
@ -140,10 +140,11 @@ export default {
|
||||
this.getUnionData()
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.calHeight)
|
||||
},
|
||||
mounted() {
|
||||
window.onresize = () => {
|
||||
this.calHeight()
|
||||
}
|
||||
window.addEventListener('resize', this.calHeight)
|
||||
this.calHeight()
|
||||
|
||||
if (this.param && this.param.id && this.param.tableId) {
|
||||
|
@ -328,11 +328,12 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.calHeight)
|
||||
},
|
||||
mounted() {
|
||||
this.initDataSource()
|
||||
window.onresize = () => {
|
||||
this.calHeight()
|
||||
}
|
||||
window.addEventListener('resize', this.calHeight)
|
||||
this.calHeight()
|
||||
},
|
||||
activated() {
|
||||
|
@ -304,10 +304,11 @@ export default {
|
||||
return this.nameList.filter((ele) => ele !== this.originName)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.calHeight)
|
||||
},
|
||||
mounted() {
|
||||
window.onresize = () => {
|
||||
this.calHeight()
|
||||
}
|
||||
window.addEventListener('resize', this.calHeight)
|
||||
this.calHeight()
|
||||
},
|
||||
created() {
|
||||
|
@ -675,10 +675,11 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.calHeight)
|
||||
},
|
||||
async mounted() {
|
||||
window.onresize = () => {
|
||||
this.calHeight()
|
||||
}
|
||||
window.addEventListener('resize', this.calHeight)
|
||||
this.calHeight()
|
||||
await this.initDataSource()
|
||||
this.$refs.myCm.codemirror.on('keypress', () => {
|
||||
|
@ -57,12 +57,13 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.calHeight)
|
||||
},
|
||||
mounted() {
|
||||
this.initPreview()
|
||||
this.calHeight()
|
||||
window.onresize = () => {
|
||||
this.calHeight()
|
||||
}
|
||||
window.addEventListener('resize', this.calHeight)
|
||||
},
|
||||
methods: {
|
||||
calHeight: _.debounce(function() {
|
||||
|
@ -80,12 +80,6 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// window.onresize = () => {
|
||||
// return (() => {
|
||||
// this.height = window.innerHeight / 3
|
||||
// })()
|
||||
// }
|
||||
// this.height = window.innerHeight / 3
|
||||
this.$nextTick(() => {
|
||||
this.height =
|
||||
document.getElementById('dsData').parentNode.offsetHeight - 16 - 14 - 5
|
||||
|
@ -794,10 +794,11 @@ export default {
|
||||
this.filterField(val)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.calcHeight)
|
||||
},
|
||||
mounted() {
|
||||
window.onresize = () => {
|
||||
this.calcHeight()
|
||||
}
|
||||
window.addEventListener('resize', this.calcHeight)
|
||||
this.calcHeight()
|
||||
this.initField()
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user