+
+
+
+ {{ baseFilter.label }}
+
-
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+ (state.datasetExpand = !state.datasetExpand)"
+ >
+
+
+
+
+
图表
+
关联字段或参数
+
+
+
+
+
+ (baseDatasetInfo.viewExpand = !baseDatasetInfo.viewExpand)"
+ >
+
+
+
+
+
+
+
+ {{ baseDatasetInfo.name }}
+
+
-
- {{ item.title }}
-
-
-
-
-
-
-
-
-
-
-
- {{ viewField.name }}
+ {{ item.name }}
-
-
-
-
-
+
+
+
+ 选择关联的图表
+ 全选
+
+
+
+
+
+ {{ viewInfo.chartName }}
+
+
+
-
-
-
- {{ t('visualization.add_param_link_field') }}
-
-
@@ -177,7 +226,7 @@
import { ref, reactive, computed, nextTick } from 'vue'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { storeToRefs } from 'pinia'
-import { ElMessage } from 'element-plus-secondary'
+import { ElCol, ElMessage } from 'element-plus-secondary'
import { useI18n } from '@/hooks/web/useI18n'
import { deepCopy } from '@/utils/utils'
import generateID from '@/utils/generateID'
@@ -196,6 +245,8 @@ const curEditDataId = ref(null)
const snapshotStore = snapshotStoreWithOut()
const state = reactive({
+ filterExpand: true,
+ datasetExpand: true,
loading: false,
outerParamsSetVisible: false,
optMenu: [
@@ -220,6 +271,7 @@ const state = reactive({
outerParamsInfoArray: []
},
baseDatasetInfo: [],
+ baseFilterInfo: [],
outerParamsInfoArray: [],
mapOuterParamsInfoArray: {},
panelList: [],
@@ -286,12 +338,27 @@ const getFieldArray = id => {
}
const initParams = async () => {
+ state.baseFilterInfo = []
+ state.baseDatasetInfo = []
+ // 同步过滤组件信息
+ componentData.value.forEach(componentItem => {
+ if (componentItem.component === 'VQuery') {
+ state.baseFilterInfo.push(componentItem)
+ }
+ })
+ // 同步基础数据集信息
+ await queryOuterParamsDsInfo(dvInfo.value.id).then(rsp => {
+ state.baseDatasetInfo = rsp.data
+ })
// 获取当前仪表板外部跳转信息
queryWithVisualizationId(dvInfo.value.id).then(rsp => {
state.outerParams = rsp.data
state.outerParamsInfoArray = state.outerParams?.outerParamsInfoArray
if (state.outerParamsInfoArray.length >= 1) {
state.outerParamsInfoArray.forEach(outerParamsInfo => {
+ const newBaseFilterInfo = deepCopy(state.baseFilterInfo)
+ const newBaseDatasetInfo = deepCopy(state.baseDatasetInfo)
+ paramsCheckedAdaptor(outerParamsInfo, newBaseFilterInfo, newBaseDatasetInfo)
state.mapOuterParamsInfoArray[outerParamsInfo.paramsInfoId] = outerParamsInfo
})
state.curNodeId = null
@@ -301,12 +368,52 @@ const initParams = async () => {
})
}
})
- await queryOuterParamsDsInfo(dvInfo.value.id).then(rsp => {
- state.baseDatasetInfo = rsp.data
- })
+
getPanelViewList(dvInfo.value.id)
}
+const paramsCheckedAdaptor = (outerParamsInfo, newBaseFilterInfo, newBaseDatasetInfo) => {
+ const dsFieldIdSelected = {}
+ const viewMatchIds = []
+ outerParamsInfo.targetViewInfoList.forEach(targetViewInfo => {
+ viewMatchIds.push(targetViewInfo.targetViewId)
+ dsFieldIdSelected[targetViewInfo.targetDsId] =
+ targetViewInfo.targetFieldId === 'empty'
+ ? targetViewInfo.targetViewId
+ : targetViewInfo.targetFieldId
+ })
+ if (newBaseDatasetInfo) {
+ newBaseDatasetInfo.forEach(datasetInfo => {
+ datasetInfo['fieldIdSelected'] = dsFieldIdSelected[datasetInfo.id]
+ datasetInfo['viewExpand'] = true
+ let viewCheckCount = 0
+ datasetInfo.datasetViews.forEach(dsView => {
+ if (viewMatchIds.includes(dsView.chartId)) {
+ dsView['checked'] = true
+ viewCheckCount++
+ } else {
+ dsView['checked'] = false
+ }
+ })
+ datasetInfo['checkAll'] = viewCheckCount === datasetInfo.datasetViews.length
+ datasetInfo['checkAllIsIndeterminate'] =
+ viewCheckCount > 0 && viewCheckCount < datasetInfo.datasetViews.length
+ })
+ }
+ if (newBaseFilterInfo) {
+ newBaseFilterInfo.forEach(filterInfo => {
+ filterInfo['filterSelected'] = dsFieldIdSelected[filterInfo.id]
+ })
+ }
+ outerParamsInfo['filterInfo'] = newBaseFilterInfo
+ outerParamsInfo['datasetInfo'] = newBaseDatasetInfo
+ console.log('outerParamsInfo=' + JSON.stringify(outerParamsInfo))
+ console.log('newBaseFilterInfo=' + JSON.stringify(newBaseFilterInfo))
+ console.log('newBaseDatasetInfo=' + JSON.stringify(newBaseDatasetInfo))
+ console.log('dsFieldIdSelected=' + JSON.stringify(dsFieldIdSelected))
+ console.log('viewMatchIds=' + JSON.stringify(viewMatchIds))
+}
+
const cancel = () => {
state.outerParamsSetVisible = false
}
@@ -414,6 +521,14 @@ const removeOuterParamsInfo = (node, data) => {
state.curNodeId = null
}
}
+const batchSelectChange = (value, baseDatasetInfo) => {
+ // do change
+ baseDatasetInfo.datasetViews.forEach(viewInfo => {
+ viewInfo.checked = value
+ })
+ baseDatasetInfo.checkAll = value
+ baseDatasetInfo.checkAllIsIndeterminate = false
+}
const optInit = () => {
state.outerParamsSetVisible = true
@@ -497,7 +612,7 @@ defineExpose({
.view-type-icon {
color: var(--ed-color-primary);
width: 22px;
- height: 16px;
+ height: 14px;
}
.custom-tree {
@@ -533,8 +648,21 @@ defineExpose({
.inner-content {
width: 100%;
- padding: 16px 16px 8px 16px;
- font-size: 14px !important;
+ font-size: 14px;
+}
+
+.outer-filter-content {
+ width: 100%;
+}
+
+.inner-filter-content {
+ width: 100%;
+ margin-top: 12px;
+}
+
+.inner-dataset-content {
+ width: 100%;
+ margin-top: 12px;
}
.slot-class {
@@ -648,4 +776,40 @@ defineExpose({
.params-class ::deep(.ed-dialog__body) {
padding: 10px 20px 20px;
}
+
+.new-params-title {
+ height: 56px;
+ font-size: 14px;
+ font-weight: 500;
+ padding: 16px;
+ border-bottom: 1px solid rgba(31, 35, 41, 0.15);
+}
+
+.new-params-filter {
+ padding: 16px;
+ border-bottom: 1px solid rgba(31, 35, 41, 0.15);
+}
+
+.new-params-ds {
+ padding: 16px;
+}
+
+.expand-custom {
+ width: 16px;
+ height: 16px;
+ border-radius: 4px;
+ padding: 0px 1px;
+ &:hover {
+ background: rgba(31, 35, 41, 0.1);
+ cursor: pointer;
+ }
+}
+
+.ds-view-content {
+ width: 100%;
+ border-radius: 4px;
+ margin-top: 8px;
+ padding: 12px;
+ background: rgba(245, 246, 247, 1);
+}
diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/dataset/vo/CoreDatasetGroupVO.java b/sdk/api/api-base/src/main/java/io/dataease/api/dataset/vo/CoreDatasetGroupVO.java
index 30e3abea5a..f45f24f295 100644
--- a/sdk/api/api-base/src/main/java/io/dataease/api/dataset/vo/CoreDatasetGroupVO.java
+++ b/sdk/api/api-base/src/main/java/io/dataease/api/dataset/vo/CoreDatasetGroupVO.java
@@ -2,6 +2,7 @@ package io.dataease.api.dataset.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.dataease.api.chart.vo.ChartBaseVO;
import lombok.Data;
import java.io.Serializable;
@@ -88,4 +89,6 @@ public class CoreDatasetGroupVO implements Serializable {
private String unionSql;
private List datasetFields = new ArrayList<>();
+
+ private List datasetViews = new ArrayList<>();
}
diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/dataset/vo/CoreDatasetTableFieldVO.java b/sdk/api/api-base/src/main/java/io/dataease/api/dataset/vo/CoreDatasetTableFieldVO.java
index f8b0f615a1..3810db5c3e 100644
--- a/sdk/api/api-base/src/main/java/io/dataease/api/dataset/vo/CoreDatasetTableFieldVO.java
+++ b/sdk/api/api-base/src/main/java/io/dataease/api/dataset/vo/CoreDatasetTableFieldVO.java
@@ -3,10 +3,12 @@ package io.dataease.api.dataset.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
+import lombok.NoArgsConstructor;
import java.io.Serializable;
@Data
+@NoArgsConstructor
public class CoreDatasetTableFieldVO implements Serializable {
private static final long serialVersionUID = 1L;
@@ -121,4 +123,10 @@ public class CoreDatasetTableFieldVO implements Serializable {
// 附加ID 兼容自定义参数ID
private String attachId;
+
+ public CoreDatasetTableFieldVO(String attachId, String name, Integer deType) {
+ this.attachId = attachId;
+ this.name = name;
+ this.deType = deType;
+ }
}
From 060eaba7535992cb8ce0981526c6462bda26ed81 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Thu, 22 Aug 2024 13:07:29 +0800
Subject: [PATCH 13/32] =?UTF-8?q?revert:=20=E5=8E=BB=E6=8E=89=E5=A4=9A?=
=?UTF-8?q?=E4=BD=99=E6=97=A5=E5=BF=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/visualization/OuterParamsSet.vue | 5 -----
1 file changed, 5 deletions(-)
diff --git a/core/core-frontend/src/components/visualization/OuterParamsSet.vue b/core/core-frontend/src/components/visualization/OuterParamsSet.vue
index 8cb75187e4..fa9f0868f2 100644
--- a/core/core-frontend/src/components/visualization/OuterParamsSet.vue
+++ b/core/core-frontend/src/components/visualization/OuterParamsSet.vue
@@ -407,11 +407,6 @@ const paramsCheckedAdaptor = (outerParamsInfo, newBaseFilterInfo, newBaseDataset
}
outerParamsInfo['filterInfo'] = newBaseFilterInfo
outerParamsInfo['datasetInfo'] = newBaseDatasetInfo
- console.log('outerParamsInfo=' + JSON.stringify(outerParamsInfo))
- console.log('newBaseFilterInfo=' + JSON.stringify(newBaseFilterInfo))
- console.log('newBaseDatasetInfo=' + JSON.stringify(newBaseDatasetInfo))
- console.log('dsFieldIdSelected=' + JSON.stringify(dsFieldIdSelected))
- console.log('viewMatchIds=' + JSON.stringify(viewMatchIds))
}
const cancel = () => {
From db37df2c93f0aaf692285c74e1848a291c4a0b3b Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Thu, 22 Aug 2024 13:18:03 +0800
Subject: [PATCH 14/32] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E6=8E=A7?=
=?UTF-8?q?=E5=88=B6=E5=8F=B0=E6=97=A5=E5=BF=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/chart/components/editor/editor-senior/Senior.vue | 1 -
.../src/views/chart/components/editor/index.vue | 1 -
.../components/views/components/ChartComponentG2Plot.vue | 2 +-
.../chart/components/views/components/ChartComponentS2.vue | 2 +-
.../src/views/system/parameter/engine/EngineEdit.vue | 1 -
.../visualized/data/datasource/form/ApiHttpRequestDraw.vue | 4 ++--
core/core-frontend/src/websocket/index.ts | 6 +++---
7 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/Senior.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/Senior.vue
index 74dc1e66bc..36bfbd924d 100644
--- a/core/core-frontend/src/views/chart/components/editor/editor-senior/Senior.vue
+++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/Senior.vue
@@ -127,7 +127,6 @@ const onMapMappingChange = val => {
}
const onBubbleAnimateChange = val => {
- console.log(val)
emit('onBubbleAnimateChange', val)
}
diff --git a/core/core-frontend/src/views/chart/components/editor/index.vue b/core/core-frontend/src/views/chart/components/editor/index.vue
index b88c890b5c..e28cd17459 100644
--- a/core/core-frontend/src/views/chart/components/editor/index.vue
+++ b/core/core-frontend/src/views/chart/components/editor/index.vue
@@ -855,7 +855,6 @@ const onAreaChange = val => {
const onTypeChange = (render, type) => {
const viewConf = getViewConfig(type)
- console.log(view.value)
if (viewConf.isPlugin) {
view.value.plugin = {
isPlugin: true,
diff --git a/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue b/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue
index e5cf52bdb5..960bc6cae8 100644
--- a/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue
+++ b/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue
@@ -542,7 +542,7 @@ onBeforeUnmount(() => {
myChart?.destroy()
resizeObserver?.disconnect()
} catch (e) {
- console.log(e)
+ console.warn(e)
}
})
diff --git a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue
index f6fc417390..fd4faebdc2 100644
--- a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue
+++ b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue
@@ -587,7 +587,7 @@ onBeforeUnmount(() => {
myChart = null
resizeObserver?.disconnect()
} catch (e) {
- console.log(e)
+ console.warn(e)
}
})
diff --git a/core/core-frontend/src/views/system/parameter/engine/EngineEdit.vue b/core/core-frontend/src/views/system/parameter/engine/EngineEdit.vue
index 95f783b8cc..3268914669 100644
--- a/core/core-frontend/src/views/system/parameter/engine/EngineEdit.vue
+++ b/core/core-frontend/src/views/system/parameter/engine/EngineEdit.vue
@@ -205,7 +205,6 @@ const submitForm = async () => {
.post({ url: '/engine/save', data: data })
.then(res => {
if (res !== undefined) {
- console.log(res)
ElMessage.success(t('common.save_success'))
emits('saved')
reset()
diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/ApiHttpRequestDraw.vue b/core/core-frontend/src/views/visualized/data/datasource/form/ApiHttpRequestDraw.vue
index 301218d590..fef054ac44 100644
--- a/core/core-frontend/src/views/visualized/data/datasource/form/ApiHttpRequestDraw.vue
+++ b/core/core-frontend/src/views/visualized/data/datasource/form/ApiHttpRequestDraw.vue
@@ -186,7 +186,7 @@ const showApiData = () => {
originFieldItem.jsonFields = response.data.jsonFields
})
.catch(error => {
- console.log(error?.message)
+ console.warn(error?.message)
})
loading.value = false
} else {
@@ -295,7 +295,7 @@ const next = () => {
.catch(error => {
disabledNext.value = false
formLoading.value = false
- console.log(error?.message)
+ console.warn(error?.message)
})
}
})
diff --git a/core/core-frontend/src/websocket/index.ts b/core/core-frontend/src/websocket/index.ts
index 456c5fdfe8..e14e82f910 100644
--- a/core/core-frontend/src/websocket/index.ts
+++ b/core/core-frontend/src/websocket/index.ts
@@ -57,7 +57,7 @@ export default {
})
},
error => {
- console.log('连接失败: ' + error)
+ console.error('连接失败: ' + error)
}
)
}
@@ -66,10 +66,10 @@ export default {
if (stompClient && stompClient.connected) {
stompClient.disconnect(
function () {
- console.log('断开连接')
+ console.info('断开连接')
},
function (error) {
- console.log('断开连接失败: ' + error)
+ console.info('断开连接失败: ' + error)
}
)
}
From c5d13ae024e551460740c2f62f9297b5f9c99913 Mon Sep 17 00:00:00 2001
From: fit2cloud-chenyw
Date: Thu, 22 Aug 2024 13:39:49 +0800
Subject: [PATCH 15/32] =?UTF-8?q?perf(X-Pack):=20=E9=98=88=E5=80=BC?=
=?UTF-8?q?=E5=91=8A=E8=AD=A6=E8=B7=9F=E9=9A=8F=E4=BB=AA=E8=A1=A8=E6=9D=BF?=
=?UTF-8?q?=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
de-xpack | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/de-xpack b/de-xpack
index 902de4d87e..bab1ca0e38 160000
--- a/de-xpack
+++ b/de-xpack
@@ -1 +1 @@
-Subproject commit 902de4d87eb7e93ab0e3fc6263f4007fb888e9fb
+Subproject commit bab1ca0e386dc0f4941b163e626253b8d6f11bc2
From 4a0cd02138aef9f3d332cc3712dcaf5a267a9993 Mon Sep 17 00:00:00 2001
From: jianneng-fit2cloud
Date: Thu, 22 Aug 2024 14:44:32 +0800
Subject: [PATCH 16/32] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8-=E6=8C=87=E6=A0=87?=
=?UTF-8?q?=E5=8D=A1):=20=E4=BF=AE=E5=A4=8D=E6=8C=87=E6=A0=87=E5=8D=A1?=
=?UTF-8?q?=E5=90=8C=E6=AF=94=E8=AE=A1=E7=AE=97=E4=B8=8D=E7=94=9F=E6=95=88?=
=?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../charts/impl/numeric/IndicatorHandler.java | 17 ++---
.../drag-item/components/CompareEdit.vue | 73 ++++++++++++++-----
2 files changed, 62 insertions(+), 28 deletions(-)
diff --git a/core/core-backend/src/main/java/io/dataease/chart/charts/impl/numeric/IndicatorHandler.java b/core/core-backend/src/main/java/io/dataease/chart/charts/impl/numeric/IndicatorHandler.java
index e39125fcb5..8ff6b8c71d 100644
--- a/core/core-backend/src/main/java/io/dataease/chart/charts/impl/numeric/IndicatorHandler.java
+++ b/core/core-backend/src/main/java/io/dataease/chart/charts/impl/numeric/IndicatorHandler.java
@@ -10,6 +10,7 @@ import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
@Component
public class IndicatorHandler extends YoyChartHandler {
@@ -36,23 +37,19 @@ public class IndicatorHandler extends YoyChartHandler {
var xAxis = formatResult.getAxisMap().get(ChartAxis.xAxis);
var yAxis = formatResult.getAxisMap().get(ChartAxis.yAxis);
var allFields = (List) filterResult.getContext().get("allFields");
- ChartViewFieldDTO chartViewFieldDTO = yAxis.get(0);
- ChartFieldCompareDTO compareCalc = chartViewFieldDTO.getCompareCalc();
+ ChartViewFieldDTO yAxisChartViewFieldDTO = yAxis.get(0);
+ ChartFieldCompareDTO compareCalc = yAxisChartViewFieldDTO.getCompareCalc();
boolean isYoy = org.apache.commons.lang3.StringUtils.isNotEmpty(compareCalc.getType())
&& !org.apache.commons.lang3.StringUtils.equalsIgnoreCase(compareCalc.getType(), "none");
if (isYoy) {
xAxis.clear();
// 设置维度字段,从同环比中获取用户选择的字段
- xAxis.addAll(allFields.stream().filter(i -> org.springframework.util.StringUtils.endsWithIgnoreCase(i.getId().toString(), yAxis.get(0).getCompareCalc().getField().toString())).toList());
+ xAxis.addAll(allFields.stream().filter(i -> org.springframework.util.StringUtils.endsWithIgnoreCase(i.getId().toString(), compareCalc.getField().toString())).toList());
xAxis.get(0).setSort("desc");
- if (org.springframework.util.StringUtils.endsWithIgnoreCase("month_mom", compareCalc.getType())) {
- xAxis.get(0).setDateStyle("y_M");
- }
- if (org.springframework.util.StringUtils.endsWithIgnoreCase("day_mom", compareCalc.getType())) {
+ if(Objects.isNull(compareCalc.getCustom())){
xAxis.get(0).setDateStyle("y_M_d");
- }
- if (org.springframework.util.StringUtils.endsWithIgnoreCase("year_mom", compareCalc.getType())) {
- xAxis.get(0).setDateStyle("y");
+ }else{
+ xAxis.get(0).setDateStyle(compareCalc.getCustom().getTimeType());
}
}
formatResult.getAxisMap().put(ChartAxis.xAxis, xAxis);
diff --git a/core/core-frontend/src/views/chart/components/editor/drag-item/components/CompareEdit.vue b/core/core-frontend/src/views/chart/components/editor/drag-item/components/CompareEdit.vue
index 26c2b07681..f6903829c0 100644
--- a/core/core-frontend/src/views/chart/components/editor/drag-item/components/CompareEdit.vue
+++ b/core/core-frontend/src/views/chart/components/editor/drag-item/components/CompareEdit.vue
@@ -28,20 +28,48 @@ const props = defineProps({
}
})
-const { compareItem, chart } = toRefs(props)
+const {compareItem, chart} = toRefs(props)
const state = reactive({
fieldList: [],
- compareList: []
+ compareList: [],
+ dateFormatter: 'y_M_d'
})
+const dateFormatterList = [
+ {name: '年', value: 'y'},
+ {name: '年月', value: 'y_M'},
+ {name: '年月日', value: 'y_M_d'}
+]
+
+const changeDateFormatter = () => {
+ const checkedField = state.fieldList.filter(ele => ele.id === compareItem.value.compareCalc.field)
+ if (checkedField && checkedField.length > 0) {
+ checkedField[0].dateStyle = state.dateFormatter
+ if (!compareItem.value.compareCalc.custom) {
+ compareItem.value.compareCalc.custom = {timeType: 'y_M_d'}
+ }
+ compareItem.value.compareCalc.custom.timeType = state.dateFormatter
+ }
+ initCompareType()
+}
+
+const initDateFormatter = () => {
+ const timeType = compareItem.value.compareCalc.custom?.timeType
+ if (isIndicator.value && timeType) {
+ state.dateFormatter = timeType
+ changeDateFormatter()
+ }
+}
+
watch(
() => props.chart,
() => {
initFieldList()
initCompareType()
+ initDateFormatter()
},
- { deep: true }
+ {deep: true}
)
const isIndicator = computed(() => {
@@ -109,15 +137,6 @@ const initCompareType = () => {
} else {
state.compareList = []
}
- if (isIndicator.value) {
- state.compareList = [
- { name: 'day_mom', value: 'day_mom' },
- { name: 'month_mom', value: 'month_mom' },
- { name: 'year_mom', value: 'year_mom' },
- { name: 'month_yoy', value: 'month_yoy' },
- { name: 'year_yoy', value: 'year_yoy' }
- ]
- }
// 如果没有选中一个同环比类型,则默认选中第一个
if (
(!compareItem.value.compareCalc.type ||
@@ -136,9 +155,9 @@ const fieldFormatter = field => {
return field.name + '(' + t('chart.' + field.dateStyle) + ')'
}
}
-
initFieldList()
initCompareType()
+initDateFormatter()
@@ -158,12 +177,26 @@ initCompareType()
/>
-
+
+
+
+
+
{{
- t('chart.' + radio.value)
- }}
+ t('chart.' + radio.value)
+ }}
+
@@ -176,10 +209,10 @@ initCompareType()
本期数据 - 上期数据本期数据 - 上期数据
(本期数据 / |上期数据| - 1) * 100%(本期数据 / |上期数据| - 1) * 100%
@@ -196,18 +229,22 @@ initCompareType()
.ed-form-item {
margin-bottom: 10px !important;
}
+
.compare-form :deep(.ed-form-item__label) {
font-size: 12px !important;
font-weight: 400 !important;
padding-top: 8px !important;
}
+
.compare-form :deep(.ed-radio__label) {
font-size: 12px !important;
font-weight: 400 !important;
}
+
.el-select-dropdown__item :deep(span) {
font-size: 12px !important;
}
+
.exp-style {
color: #c0c4cc;
font-size: 12px;
From 257aa34118b568d25e089f3fc4c82aeb0fca3928 Mon Sep 17 00:00:00 2001
From: dataeaseShu
Date: Thu, 22 Aug 2024 15:25:26 +0800
Subject: [PATCH 17/32] =?UTF-8?q?feat(xpack):=20=E6=94=AF=E6=8C=81?=
=?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=A4=96=E8=A7=82=E7=9A=84=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/store/modules/appearance.ts | 24 +++++++++++++++++
.../src/views/mobile/login/index.vue | 26 +++++++++++++++++--
2 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/core/core-frontend/src/store/modules/appearance.ts b/core/core-frontend/src/store/modules/appearance.ts
index 31c94c3f02..2333f02119 100644
--- a/core/core-frontend/src/store/modules/appearance.ts
+++ b/core/core-frontend/src/store/modules/appearance.ts
@@ -12,6 +12,8 @@ interface AppearanceState {
customColor?: string
navigateBg?: string
navigate?: string
+ mobileLogin?: string
+ mobileLoginBg?: string
help?: string
showAi?: string
showDoc?: string
@@ -36,6 +38,8 @@ export const useAppearanceStore = defineStore('appearanceStore', {
customColor: '',
navigateBg: '',
navigate: '',
+ mobileLogin: '',
+ mobileLoginBg: '',
help: '',
showDoc: '0',
showAi: '0',
@@ -60,6 +64,18 @@ export const useAppearanceStore = defineStore('appearanceStore', {
}
return null
},
+ getMobileLogin(): string {
+ if (this.mobileLogin) {
+ return baseUrl + this.mobileLogin
+ }
+ return null
+ },
+ getMobileLoginBg(): string {
+ if (this.mobileLoginBg) {
+ return baseUrl + this.mobileLoginBg
+ }
+ return null
+ },
getHelp(): string {
return this.help
},
@@ -128,6 +144,12 @@ export const useAppearanceStore = defineStore('appearanceStore', {
setNavigate(data: string) {
this.navigate = data
},
+ setMobileLogin(data: string) {
+ this.mobileLogin = data
+ },
+ setMobileLoginBg(data: string) {
+ this.mobileLoginBg = data
+ },
setHelp(data: string) {
this.help = data
},
@@ -177,6 +199,8 @@ export const useAppearanceStore = defineStore('appearanceStore', {
return
}
this.navigate = data.navigate
+ this.mobileLogin = data.mobileLogin
+ this.mobileLoginBg = data.mobileLoginBg
this.help = data.help
this.showAi = data.showAi
this.showDoc = data.showDoc
diff --git a/core/core-frontend/src/views/mobile/login/index.vue b/core/core-frontend/src/views/mobile/login/index.vue
index d9a23a5035..7068f39b5c 100644
--- a/core/core-frontend/src/views/mobile/login/index.vue
+++ b/core/core-frontend/src/views/mobile/login/index.vue
@@ -1,7 +1,9 @@