Merge branch 'dev' into pr@dev_memory_component
13
.github/workflows/typos_check.yml
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
name: Typos Check
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: Spell Check with Typos
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions Repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Check spelling
|
||||
uses: crate-ci/typos@master
|
||||
12
.typos.toml
Normal file
@ -0,0 +1,12 @@
|
||||
[default.extend-words]
|
||||
Rela = "Rela"
|
||||
eles = "eles"
|
||||
delink = "delink"
|
||||
testng = "testng"
|
||||
ba = "ba"
|
||||
referer = "referer"
|
||||
keynode = "keynode"
|
||||
|
||||
[files]
|
||||
extend-exclude = ["public/", "amap-wx/", "m-icon/", "uni-card/", "uni-col/", "uni-link/", "uni-list/", "uni-list-item/", "uni-row/", "migration/", "mapFiles/"]
|
||||
|
||||
@ -2,6 +2,7 @@ package io.dataease.provider;
|
||||
|
||||
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
||||
import io.dataease.plugins.common.base.domain.Datasource;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@ -41,11 +42,15 @@ public class DDLProviderImpl extends DDLProvider {
|
||||
Integer realSize = page * pageNumber < dataList.size() ? page * pageNumber : dataList.size();
|
||||
for (String[] strings : dataList.subList((page - 1) * pageNumber, realSize)) {
|
||||
String[] strings1 = new String[strings.length];
|
||||
for(int i=0; i< strings.length;i++){
|
||||
strings1[i] = strings[i].replace("'","\\'");
|
||||
for (int i = 0; i < strings.length; i++) {
|
||||
if (StringUtils.isEmpty(strings[i])) {
|
||||
strings1[i] = "";
|
||||
} else {
|
||||
strings1[i] = strings[i].replace("'", "\\'");
|
||||
}
|
||||
}
|
||||
values.append("('").append(UUID.randomUUID())
|
||||
.append("','" ).append(String.join("','", Arrays.asList(strings1)))
|
||||
.append("','").append(String.join("','", Arrays.asList(strings1)))
|
||||
.append("'),");
|
||||
}
|
||||
return insertSql + values.substring(0, values.length() - 1);
|
||||
|
||||
@ -66,10 +66,11 @@ public class ProviderFactory implements ApplicationContextAware {
|
||||
switch (type) {
|
||||
case "mysql":
|
||||
case "mariadb":
|
||||
return context.getBean("mysqlQueryProvider", QueryProvider.class);
|
||||
case "ds_doris":
|
||||
case "TiDB":
|
||||
case "StarRocks":
|
||||
return context.getBean("mysqlQueryProvider", QueryProvider.class);
|
||||
return context.getBean("dorisQueryProvider", QueryProvider.class);
|
||||
default:
|
||||
return SpringContextUtil.getApplicationContext().getBean(type + "QueryProvider", QueryProvider.class);
|
||||
}
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
package io.dataease.provider.query.doris;
|
||||
|
||||
import io.dataease.provider.query.mysql.MysqlQueryProvider;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
|
||||
@Service("dorisQueryProvider")
|
||||
public class DorisQueryProvider extends MysqlQueryProvider {
|
||||
|
||||
}
|
||||
@ -1324,4 +1324,8 @@ public class EsQueryProvider extends QueryProvider {
|
||||
"{\"dateformat\": \"yyyy-MM-dd HH:mm:ss\"}\n" +
|
||||
"]", Dateformat.class);
|
||||
}
|
||||
|
||||
public String getResultCount(boolean isTable, String sql, List<ChartViewFieldDTO> xAxis, List<ChartFieldCustomFilterDTO> fieldCustomFilter, List<DataSetRowPermissionsTreeDTO> rowPermissionsTree, List<ChartExtFilterRequest> extFilterRequestList, Datasource ds, ChartViewWithBLOBs view) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1144,7 +1144,7 @@ public class HiveQueryProvider extends QueryProvider {
|
||||
if (x.getDeType() == DeTypeConstants.DE_TIME) {
|
||||
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
|
||||
if (x.getDeExtractType() == DeTypeConstants.DE_STRING) {
|
||||
fieldName = String.format(HiveConstants.DATE_FORMAT, originField, format);
|
||||
fieldName = String.format(HiveConstants.DATE_FORMAT, String.format(HiveConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(x.getDateFormat()) ? x.getDateFormat() : HiveConstants.DEFAULT_DATE_FORMAT), format);
|
||||
} else {
|
||||
String cast = String.format(HiveConstants.CAST, originField, HiveConstants.DEFAULT_INT_FORMAT) + "/1000";
|
||||
String from_unixtime = String.format(HiveConstants.FROM_UNIXTIME, cast, HiveConstants.DEFAULT_DATE_FORMAT);
|
||||
|
||||
@ -1174,7 +1174,7 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
if (x.getDeType() == 1) {
|
||||
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
|
||||
if (x.getDeExtractType() == 0) {
|
||||
fieldName = String.format(MySQLConstants.DATE_FORMAT, originField, format);
|
||||
fieldName = String.format(MySQLConstants.DATE_FORMAT, String.format(MySQLConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(x.getDateFormat()) ? x.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT), format);
|
||||
} else {
|
||||
String cast = String.format(MySQLConstants.CAST, originField, MySQLConstants.DEFAULT_INT_FORMAT) + "/1000";
|
||||
String from_unixtime = String.format(MySQLConstants.FROM_UNIXTIME, cast, MySQLConstants.DEFAULT_DATE_FORMAT);
|
||||
|
||||
@ -457,7 +457,7 @@ public class PgQueryProvider extends QueryProvider {
|
||||
.build();
|
||||
if (CollectionUtils.isNotEmpty(orders)) st.add("orders", orders);
|
||||
if (ObjectUtils.isNotEmpty(tableSQL)) st.add("table", tableSQL);
|
||||
return sqlLimit(st.render(), view);
|
||||
return st.render();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -964,7 +964,7 @@ public class PgQueryProvider extends QueryProvider {
|
||||
}
|
||||
if (field.getDeType() == 1) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(PgConstants.CAST, originName, "timestamp");
|
||||
whereName = String.format(PgConstants.STR_TO_DATE, originName, StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : PgConstants.DEFAULT_DATE_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
String cast = String.format(PgConstants.CAST, originName, "bigint");
|
||||
@ -1063,7 +1063,7 @@ public class PgQueryProvider extends QueryProvider {
|
||||
|
||||
if (field.getDeType() == 1) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(PgConstants.CAST, originName, "timestamp");
|
||||
whereName = String.format(PgConstants.STR_TO_DATE, originName, StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : PgConstants.DEFAULT_DATE_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
String cast = String.format(PgConstants.CAST, originName, "bigint");
|
||||
@ -1177,7 +1177,9 @@ public class PgQueryProvider extends QueryProvider {
|
||||
if (x.getDeType() == DeTypeConstants.DE_TIME) {
|
||||
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
|
||||
if (x.getDeExtractType() == DeTypeConstants.DE_STRING) {
|
||||
fieldName = String.format(PgConstants.DATE_FORMAT, String.format(PgConstants.CAST, originField, "timestamp"), format);
|
||||
fieldName = String.format(PgConstants.DATE_FORMAT,
|
||||
String.format(PgConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(x.getDateFormat()) ? x.getDateFormat() : PgConstants.DEFAULT_DATE_FORMAT),
|
||||
format);
|
||||
} else {
|
||||
String cast = String.format(PgConstants.CAST, originField, "bigint");
|
||||
String from_unixtime = String.format(PgConstants.FROM_UNIXTIME, cast);
|
||||
|
||||
@ -963,7 +963,7 @@ public class RedshiftQueryProvider extends QueryProvider {
|
||||
}
|
||||
if (field.getDeType() == 1) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(PgConstants.CAST, originName, "timestamp");
|
||||
whereName = String.format(PgConstants.STR_TO_DATE, originName, StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : PgConstants.DEFAULT_DATE_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
String cast = String.format(PgConstants.CAST, originName, "bigint");
|
||||
@ -1058,7 +1058,7 @@ public class RedshiftQueryProvider extends QueryProvider {
|
||||
|
||||
if (field.getDeType() == 1) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(PgConstants.CAST, originName, "timestamp");
|
||||
whereName = String.format(PgConstants.STR_TO_DATE, originName, StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : PgConstants.DEFAULT_DATE_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
String cast = String.format(PgConstants.CAST, originName, "bigint");
|
||||
@ -1166,7 +1166,7 @@ public class RedshiftQueryProvider extends QueryProvider {
|
||||
if (x.getDeType() == DeTypeConstants.DE_TIME) {
|
||||
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
|
||||
if (x.getDeExtractType() == DeTypeConstants.DE_STRING) {
|
||||
fieldName = String.format(PgConstants.DATE_FORMAT, originField, format);
|
||||
fieldName = String.format(PgConstants.DATE_FORMAT, String.format(PgConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(x.getDateFormat()) ? x.getDateFormat() : PgConstants.DEFAULT_DATE_FORMAT), format);
|
||||
} else {
|
||||
String cast = String.format(PgConstants.CAST, originField, "bigint");
|
||||
String from_unixtime = String.format(PgConstants.FROM_UNIXTIME, cast);
|
||||
|
||||
@ -1343,4 +1343,8 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
"{\"dateformat\": \"120\", \"desc\": \"yyyy-mm-dd hh:mi:ss\"}\n" +
|
||||
"]", Dateformat.class);
|
||||
}
|
||||
|
||||
public String getResultCount(boolean isTable, String sql, List<ChartViewFieldDTO> xAxis, List<ChartFieldCustomFilterDTO> fieldCustomFilter, List<DataSetRowPermissionsTreeDTO> rowPermissionsTree, List<ChartExtFilterRequest> extFilterRequestList, Datasource ds, ChartViewWithBLOBs view) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -209,7 +209,6 @@ public class PanelAppTemplateService {
|
||||
DatasetTableField newTableField = dataSetTableFieldsService.save(datasetTableField);
|
||||
datasetFieldsRealMap.put(oldId, newTableField.getId());
|
||||
datasetFieldsMd5FormatRealMap.put(TableUtils.fieldNameShort(oldTableId + "_" + datasetTableField.getOriginName()), TableUtils.fieldNameShort(newTableField.getTableId() + "_" + datasetTableField.getOriginName()));
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
//数据集计算字段替换
|
||||
|
||||
@ -52,3 +52,7 @@ where id = '3986ba4c-5a8e-11ed-bc5b-cf4a43b3b40c';
|
||||
|
||||
|
||||
update `my_plugin` set `name` = '气泡地图插件' where `plugin_id` = 2;
|
||||
|
||||
ALTER TABLE `dataset_table_field`
|
||||
CHANGE COLUMN `origin_name` `origin_name` LONGTEXT CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_bin' NOT NULL ;
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 265 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 12 KiB |
@ -106,6 +106,7 @@ export default {
|
||||
this.$router.back(-1)
|
||||
},
|
||||
exportPDF() {
|
||||
this.$refs['widget-div'].style.display = ''
|
||||
this.$emit('link-export-pdf')
|
||||
},
|
||||
setWidgetStatus() {
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
:canvas-id="canvasId"
|
||||
:chart="chart"
|
||||
:show-position="showPosition"
|
||||
:series-id-map="seriesIdMap"
|
||||
@showViewDetails="showViewDetails"
|
||||
/>
|
||||
<div
|
||||
@ -149,7 +150,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
previewVisible: false,
|
||||
chart: null
|
||||
chart: null,
|
||||
seriesIdMap: {
|
||||
id: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -312,9 +316,14 @@ export default {
|
||||
}
|
||||
},
|
||||
clearHandler() {
|
||||
if (this.$refs.deOutWidget && this.$refs.deOutWidget.clearHandler) {
|
||||
if (this.$refs.deOutWidget?.clearHandler) {
|
||||
this.$refs.deOutWidget.clearHandler()
|
||||
}
|
||||
},
|
||||
responseResetButton() {
|
||||
if (this.$refs.wrapperChild?.responseResetButton) {
|
||||
this.$refs.wrapperChild.responseResetButton()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1106,6 +1106,11 @@ export default {
|
||||
},
|
||||
triggerResetButton() {
|
||||
this.triggerSearchButton(true)
|
||||
this.$refs['wrapperChild']?.forEach(item => {
|
||||
if (item?.['responseResetButton']) {
|
||||
item.responseResetButton()
|
||||
}
|
||||
})
|
||||
},
|
||||
refreshButtonInfo(isClear = false) {
|
||||
const result = this.buildButtonFilterMap(this.componentData, isClear)
|
||||
|
||||
@ -144,6 +144,7 @@
|
||||
<map-layer-controller
|
||||
v-if="chart && showMapLayerController"
|
||||
:chart="chart"
|
||||
:series-id-map="seriesIdMap"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -239,6 +240,14 @@ export default {
|
||||
chart: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
seriesIdMap: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
id: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
||||
@ -95,6 +95,49 @@
|
||||
@closePreExport="closePreExport"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!--视图详情-->
|
||||
<el-dialog
|
||||
:visible.sync="chartDetailsVisible"
|
||||
width="80%"
|
||||
class="dialog-css"
|
||||
:destroy-on-close="true"
|
||||
:show-close="true"
|
||||
:append-to-body="false"
|
||||
top="5vh"
|
||||
>
|
||||
<span
|
||||
v-if="chartDetailsVisible"
|
||||
style="position: absolute;right: 70px;top:15px"
|
||||
>
|
||||
<el-button
|
||||
v-if="showChartInfoType==='enlarge' && showChartInfo && showChartInfo.type !== 'symbol-map'"
|
||||
class="el-icon-picture-outline"
|
||||
size="mini"
|
||||
@click="exportViewImg"
|
||||
>
|
||||
{{ $t('chart.export_img') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="showChartInfoType==='details'"
|
||||
size="mini"
|
||||
@click="exportExcel"
|
||||
>
|
||||
<svg-icon
|
||||
icon-class="ds-excel"
|
||||
class="ds-icon-excel"
|
||||
/>{{ $t('chart.export') }}Excel
|
||||
</el-button>
|
||||
</span>
|
||||
<user-view-dialog
|
||||
v-if="chartDetailsVisible"
|
||||
ref="userViewDialog-canvas-main"
|
||||
:chart="showChartInfo"
|
||||
:chart-table="showChartTableInfo"
|
||||
:canvas-style-data="canvasStyleData"
|
||||
:open-type="showChartInfoType"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -117,10 +160,11 @@ import html2canvas from 'html2canvasde'
|
||||
import { queryAll } from '@/api/panel/pdfTemplate'
|
||||
import PDFPreExport from '@/views/panel/export/PDFPreExport'
|
||||
import { listenGlobalKeyDownPreview } from '@/components/canvas/utils/shortcutKey'
|
||||
import UserViewDialog from '@/components/canvas/customComponent/UserViewDialog'
|
||||
|
||||
const erd = elementResizeDetectorMaker()
|
||||
export default {
|
||||
components: { ComponentWrapper, CanvasOptBar, PDFPreExport },
|
||||
components: { UserViewDialog, ComponentWrapper, CanvasOptBar, PDFPreExport },
|
||||
model: {
|
||||
prop: 'show',
|
||||
event: 'change'
|
||||
@ -189,6 +233,10 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartDetailsVisible: false,
|
||||
showChartInfo: {},
|
||||
showChartTableInfo: {},
|
||||
showChartInfoType: 'details',
|
||||
mainHeightCount: null,
|
||||
userInfo: null,
|
||||
previewMainDomId: 'preview-main-' + this.canvasId,
|
||||
@ -381,6 +429,7 @@ export default {
|
||||
if (this.terminal === 'mobile') {
|
||||
this.initMobileCanvas()
|
||||
}
|
||||
this.canvasId === 'canvas-main' && bus.$on('pcChartDetailsDialog', this.openChartDetailsDialog)
|
||||
bus.$on('trigger-search-button', this.triggerSearchButton)
|
||||
bus.$on('trigger-reset-button', this.triggerResetButton)
|
||||
this.initPdfTemplate()
|
||||
@ -389,10 +438,19 @@ export default {
|
||||
erd.uninstall(this.$refs[this.previewTempRefId])
|
||||
erd.uninstall(this.$refs[this.previewRefId])
|
||||
clearInterval(this.timer)
|
||||
this.canvasId === 'canvas-main' && bus.$off('pcChartDetailsDialog', this.openChartDetailsDialog)
|
||||
bus.$off('trigger-search-button', this.triggerSearchButton)
|
||||
bus.$off('trigger-reset-button', this.triggerResetButton)
|
||||
},
|
||||
methods: {
|
||||
openChartDetailsDialog(paramInfo) {
|
||||
if (this.canvasId === 'canvas-main') {
|
||||
this.showChartInfo = paramInfo.showChartInfo
|
||||
this.showChartTableInfo = paramInfo.showChartTableInfo
|
||||
this.showChartInfoType = paramInfo.showChartInfoType
|
||||
this.chartDetailsVisible = true
|
||||
}
|
||||
},
|
||||
initWatermark(waterDomId = 'preview-main-canvas-main') {
|
||||
if (this.panelInfo.watermarkInfo && this.canvasId === 'canvas-main') {
|
||||
if (this.userInfo) {
|
||||
@ -410,6 +468,11 @@ export default {
|
||||
},
|
||||
triggerResetButton() {
|
||||
this.triggerSearchButton(true)
|
||||
this.$refs['viewWrapperChild']?.forEach(item => {
|
||||
if (item?.responseResetButton) {
|
||||
item.responseResetButton()
|
||||
}
|
||||
})
|
||||
},
|
||||
triggerSearchButton(isClear = false) {
|
||||
const result = this.buildButtonFilterMap(this.componentData, isClear)
|
||||
@ -585,10 +648,10 @@ export default {
|
||||
}
|
||||
},
|
||||
exportExcel() {
|
||||
this.$refs['userViewDialog'].exportExcel()
|
||||
this.$refs['userViewDialog-canvas-main'].exportExcel()
|
||||
},
|
||||
exportViewImg() {
|
||||
this.$refs['userViewDialog'].exportViewImg()
|
||||
this.$refs['userViewDialog-canvas-main'].exportViewImg()
|
||||
},
|
||||
deselectCurComponent(e) {
|
||||
if (!this.isClickComponent) {
|
||||
|
||||
@ -232,6 +232,11 @@ export default {
|
||||
ChartComponentG2
|
||||
},
|
||||
props: {
|
||||
inScreen: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
},
|
||||
canvasId: {
|
||||
type: String,
|
||||
required: true
|
||||
@ -469,7 +474,7 @@ export default {
|
||||
},
|
||||
'cfilters': {
|
||||
handler: function(val1, val2) {
|
||||
if ((isChange(val1, val2) || isChange(val1, this.filters)) && !this.isFirstLoad) {
|
||||
if (isChange(val1, val2) && !this.isFirstLoad) {
|
||||
this.getData(this.element.propValue.viewId)
|
||||
}
|
||||
},
|
||||
@ -555,6 +560,11 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
responseResetButton() {
|
||||
if (!this.cfilters?.length) {
|
||||
this.getData(this.element.propValue.viewId, false)
|
||||
}
|
||||
},
|
||||
exportExcel() {
|
||||
this.$refs['userViewDialog'].exportExcel()
|
||||
},
|
||||
@ -871,7 +881,13 @@ export default {
|
||||
this.showChartInfo = this.chart
|
||||
this.showChartTableInfo = tableChart
|
||||
this.showChartInfoType = params.openType
|
||||
if (this.terminal === 'pc') {
|
||||
if (!this.inScreen) {
|
||||
bus.$emit('pcChartDetailsDialog', {
|
||||
showChartInfo: this.showChartInfo,
|
||||
showChartTableInfo: this.showChartTableInfo,
|
||||
showChartInfoType: this.showChartInfoType
|
||||
})
|
||||
} else if (this.terminal === 'pc') {
|
||||
this.chartDetailsVisible = true
|
||||
} else {
|
||||
this.mobileChartDetailsVisible = true
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
import { toBottom, toTop, moveUp, moveDown } from '@/components/canvas/utils/utils'
|
||||
import { findCurComponentIndex, moveDown, moveUp, toBottom, toTop } from '@/components/canvas/utils/utils'
|
||||
import toast from '@/components/canvas/utils/toast'
|
||||
|
||||
export default {
|
||||
mutations: {
|
||||
upComponent({ componentData, curComponentIndex }) {
|
||||
|
||||
upComponent({ componentData, curComponent }) {
|
||||
const curComponentIndex = findCurComponentIndex(componentData, curComponent)
|
||||
// 上移图层 index,表示元素在数组中越往后
|
||||
if (curComponentIndex < componentData.length - 1) {
|
||||
moveUp(componentData, curComponentIndex)
|
||||
@ -12,7 +14,8 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
downComponent({ componentData, curComponentIndex }) {
|
||||
downComponent({ componentData, curComponent }) {
|
||||
const curComponentIndex = findCurComponentIndex(componentData, curComponent)
|
||||
// 下移图层 index,表示元素在数组中越往前
|
||||
if (curComponentIndex > 0) {
|
||||
moveDown(componentData, curComponentIndex)
|
||||
@ -21,14 +24,16 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
topComponent({ componentData, curComponentIndex }) {
|
||||
topComponent({ componentData, curComponent }) {
|
||||
const curComponentIndex = findCurComponentIndex(componentData, curComponent)
|
||||
// 置顶
|
||||
if (curComponentIndex < componentData.length - 1) {
|
||||
toTop(componentData, curComponentIndex)
|
||||
}
|
||||
},
|
||||
|
||||
bottomComponent({ componentData, curComponentIndex }) {
|
||||
bottomComponent({ componentData, curComponent }) {
|
||||
const curComponentIndex = findCurComponentIndex(componentData, curComponent)
|
||||
// 置底
|
||||
if (curComponentIndex > 0) {
|
||||
toBottom(componentData, curComponentIndex)
|
||||
|
||||
@ -246,3 +246,15 @@ export function getNowCanvasComponentData(canvasId, showPosition) {
|
||||
return store.state.componentData.filter(item => item.canvasId === canvasId)
|
||||
}
|
||||
}
|
||||
|
||||
export function findCurComponentIndex(componentData, curComponent) {
|
||||
let curIndex = 0
|
||||
for (let index = 0; index < componentData.length; index++) {
|
||||
const element = componentData[index]
|
||||
if (element.id && element.id === curComponent.id) {
|
||||
curIndex = index
|
||||
break
|
||||
}
|
||||
}
|
||||
return curIndex
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div
|
||||
ref="myContainer"
|
||||
class="my-container"
|
||||
:style="autoStyle"
|
||||
:style="inScreen?autoStyle:''"
|
||||
>
|
||||
<div
|
||||
ref="conditionMain"
|
||||
|
||||
@ -40,6 +40,7 @@
|
||||
:canvas-id="canvasId"
|
||||
:element="element"
|
||||
:chart="chart"
|
||||
:series-id-map="seriesIdMap"
|
||||
@showViewDetails="showViewDetails"
|
||||
@amRemoveItem="amRemoveItem"
|
||||
@amAddItem="amAddItem"
|
||||
@ -431,7 +432,10 @@ export default {
|
||||
// 是否移动 (如果没有移动 不需要记录snapshot)
|
||||
hasMove: false,
|
||||
// 上次的鼠标指针纵向位置,用来判断指针是上移还是下移
|
||||
latestMoveY: 0
|
||||
latestMoveY: 0,
|
||||
seriesIdMap: {
|
||||
id: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@ -202,9 +202,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<text-attr
|
||||
v-if="showAttr && curComponent.canvasId === activeCanvasId"
|
||||
&&
|
||||
is-edit
|
||||
v-if="showAttr && curComponent.canvasId === activeCanvasId && isEdit"
|
||||
:canvas-id="curComponent.canvasId"
|
||||
:scroll-left="scrollLeft"
|
||||
:scroll-top="scrollTop"
|
||||
@ -466,15 +464,20 @@ export default {
|
||||
}
|
||||
},
|
||||
initCarousel() {
|
||||
this.timer && clearInterval(this.timer)
|
||||
if (this.element.style.carouselEnable) {
|
||||
const switchTime = (this.element.style.switchTime || 5) * 1000
|
||||
const _this = this
|
||||
_this.timer && clearInterval(_this.timer)
|
||||
if (_this.element.style.carouselEnable) {
|
||||
const switchTime = (_this.element.style.switchTime || 5) * 1000
|
||||
let switchCount = 1
|
||||
// 轮播定时器
|
||||
this.timer = setInterval(() => {
|
||||
const nowIndex = switchCount % this.element.options.tabList.length
|
||||
_this.timer = setInterval(() => {
|
||||
const nowIndex = switchCount % _this.element.options.tabList.length
|
||||
switchCount++
|
||||
this.activeTabName = this.element.options.tabList[nowIndex].name
|
||||
_this.activeTabName = _this.element.options.tabList[nowIndex].name
|
||||
const targetRef = _this.$refs['canvasTabRef-' + _this.activeTabName]
|
||||
if (targetRef) {
|
||||
targetRef[0].restore()
|
||||
}
|
||||
}, switchTime)
|
||||
}
|
||||
},
|
||||
@ -705,21 +708,27 @@ export default {
|
||||
}
|
||||
|
||||
::v-deep .el-tabs__nav {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
}
|
||||
::v-deep .el-tabs__nav-prev {
|
||||
line-height: 25px;
|
||||
}
|
||||
::v-deep .el-tabs__nav-next {
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.tab-head-left ::v-deep .el-tabs__nav {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.tab-head-right ::v-deep .el-tabs__nav {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tab-head-center ::v-deep .el-tabs__nav {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
@ -1758,7 +1758,7 @@ export default {
|
||||
http_port: 'Http Port',
|
||||
port: 'Port',
|
||||
datasource_url: 'URL address',
|
||||
please_input_datasource_url: 'Please enter Elasticsearch 地址,e.g: http://es_host:es_port',
|
||||
please_input_datasource_url: 'Please enter Elasticsearch URL address,e.g: http://es_host:es_port',
|
||||
please_input_data_base: 'Please enter the database name',
|
||||
please_select_oracle_type: 'Select connection type',
|
||||
please_input_user_name: 'Please enter user name',
|
||||
|
||||
@ -42,6 +42,14 @@ export default {
|
||||
chart: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
seriesIdMap: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
id: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -79,11 +87,12 @@ export default {
|
||||
id: this.chart.id,
|
||||
seriesId: this.currentSeriesId
|
||||
}
|
||||
this.seriesIdMap.id = this.currentSeriesId
|
||||
bus.$emit('change-series-id', param)
|
||||
},
|
||||
|
||||
init() {
|
||||
this.currentSeriesId = this.customAttr.currentSeriesId
|
||||
this.currentSeriesId = this.seriesIdMap?.id || this.customAttr.currentSeriesId
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -860,7 +860,9 @@ export default {
|
||||
item.dateFormat = item.dateFormatType
|
||||
}
|
||||
}
|
||||
|
||||
if(item.dateFormatType === 'custom' && !item.dateFormat){
|
||||
return;
|
||||
}
|
||||
post('/dataset/field/save', item)
|
||||
.then((response) => {
|
||||
this.initField()
|
||||
@ -895,7 +897,7 @@ export default {
|
||||
if (val && val !== '') {
|
||||
this.tableFields.dimensionListData = JSON.parse(
|
||||
JSON.stringify(
|
||||
this.tableFields.dimensionListData.filter((ele) => {
|
||||
this.tableFields.dimensionList.filter((ele) => {
|
||||
return ele.name
|
||||
.toLocaleLowerCase()
|
||||
.includes(val.toLocaleLowerCase())
|
||||
|
||||
@ -861,7 +861,7 @@ export default {
|
||||
},
|
||||
disableExec(task) {
|
||||
return (
|
||||
task.status === 'Pending' || task.status === 'Exec' || !hasDataPermission('manage', task.privileges)
|
||||
(task.status === 'Stopped' && task.rate !== 'SIMPLE') || task.status === 'Pending' || task.status ==='Exec' || !hasDataPermission('manage', task.privileges)
|
||||
)
|
||||
},
|
||||
disableDelete(task) {
|
||||
|
||||
@ -729,7 +729,6 @@ export default {
|
||||
optType: 'rename',
|
||||
titlePre: this.$t('commons.edit'),
|
||||
panelInfo: {
|
||||
pid: param.data.pid,
|
||||
id: param.data.id,
|
||||
name: param.data.name,
|
||||
nodeType: param.type
|
||||
|
||||
@ -155,7 +155,7 @@
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
autocomplete="off"
|
||||
:placeholder="$t('commons.input_name')"
|
||||
:placeholder="$t('datasource.input_name')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
|
||||
@ -634,7 +634,7 @@ export default {
|
||||
)
|
||||
},
|
||||
disableExec(task) {
|
||||
return (task.status === 'Pending' || task.status === 'Exec' || !hasDataPermission('manage', task.privileges))
|
||||
return ((task.status === 'Stopped' && task.rate !== 'SIMPLE') || task.status === 'Pending' || task.status ==='Exec' || !hasDataPermission('manage', task.privileges))
|
||||
},
|
||||
disableDelete(task) {
|
||||
return false
|
||||
|
||||
@ -20,8 +20,8 @@ class DeWebsocket {
|
||||
initialize() {
|
||||
this.connection()
|
||||
const _this = this
|
||||
this.timer = this.isLoginStatu() && setInterval(() => {
|
||||
this.isLoginStatu() || this.destroy()
|
||||
this.timer = this.isLoginStatus() && setInterval(() => {
|
||||
this.isLoginStatus() || this.destroy()
|
||||
try {
|
||||
_this.client && _this.client.send('heart detection')
|
||||
} catch (error) {
|
||||
@ -41,12 +41,12 @@ class DeWebsocket {
|
||||
this.initialize()
|
||||
}
|
||||
|
||||
isLoginStatu() {
|
||||
isLoginStatus() {
|
||||
return store.state && store.state.user && store.state.user.user && store.state.user.user.userId
|
||||
}
|
||||
|
||||
connection() {
|
||||
if (!this.isLoginStatu()) {
|
||||
if (!this.isLoginStatus()) {
|
||||
return
|
||||
}
|
||||
const socket = new SockJS(this.ws_url + '?userId=' + store.state.user.user.userId)
|
||||
@ -70,6 +70,7 @@ class DeWebsocket {
|
||||
}
|
||||
).bind(this)
|
||||
}
|
||||
|
||||
subscribe() {
|
||||
this.channels.forEach(channel => {
|
||||
this.client.subscribe('/user/' + store.state.user.user.userId + channel.topic, res => {
|
||||
@ -77,6 +78,7 @@ class DeWebsocket {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
this.client && this.client.disconnect()
|
||||
}
|
||||
|
||||