diff --git a/core/core-frontend/src/components/data-visualization/DvToolbar.vue b/core/core-frontend/src/components/data-visualization/DvToolbar.vue
index 40dceb75cb..ee8b0a78f0 100644
--- a/core/core-frontend/src/components/data-visualization/DvToolbar.vue
+++ b/core/core-frontend/src/components/data-visualization/DvToolbar.vue
@@ -93,10 +93,13 @@ const saveCanvasWithCheck = () => {
const saveResource = () => {
wsCache.delete('DE-DV-CATCH-' + dvInfo.value.id)
if (styleChangeTimes.value > 0) {
- snapshotStore.resetStyleChangeTimes()
- canvasSave(() => {
- ElMessage.success('保存成功')
- window.history.pushState({}, '', `#/dvCanvas?dvId=${dvInfo.value.id}`)
+ eventBus.emit('hideArea-canvas-main')
+ nextTick(() => {
+ snapshotStore.resetStyleChangeTimes()
+ canvasSave(() => {
+ ElMessage.success('保存成功')
+ window.history.pushState({}, '', `#/dvCanvas?dvId=${dvInfo.value.id}`)
+ })
})
}
}
diff --git a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue
index 28addd5895..66077baac5 100644
--- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue
+++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue
@@ -207,7 +207,11 @@ const deepScale = computed(() => scale.value / 100)
@userViewEnlargeOpen="opt => emits('userViewEnlargeOpen', opt)"
>
diff --git a/core/core-frontend/src/custom-component/de-video/VideoLinks.vue b/core/core-frontend/src/custom-component/de-video/VideoLinks.vue
index d0df1d2593..bf8e805aa3 100644
--- a/core/core-frontend/src/custom-component/de-video/VideoLinks.vue
+++ b/core/core-frontend/src/custom-component/de-video/VideoLinks.vue
@@ -1,6 +1,5 @@
- --{{ linkInfo }}
{
}
const handleBlur = e => {
- element.value.propValue = e.target.innerHTML || ' '
+ element.value.propValue = e.target.innerHTML || ''
const html = e.target.innerHTML
if (html !== '') {
element.value.propValue = e.target.innerHTML
} else {
element.value.propValue = ''
nextTick(function () {
- element.value.propValue = ' '
+ element.value.propValue = ''
})
}
canEdit.value = false
diff --git a/core/core-frontend/src/custom-component/v-query/Component.vue b/core/core-frontend/src/custom-component/v-query/Component.vue
index 7271cb437d..82c6a6f0ce 100644
--- a/core/core-frontend/src/custom-component/v-query/Component.vue
+++ b/core/core-frontend/src/custom-component/v-query/Component.vue
@@ -389,7 +389,7 @@ const autoStyle = computed(() => {
-
+
{{ customStyle.title }}
diff --git a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue
index d7f8c1392b..57ed61c35b 100644
--- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue
+++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue
@@ -501,7 +501,6 @@ const validate = () => {
const isMultiple = +ele.displayType === 7 || ele.multiple
ele.selectValue = isMultiple ? [] : undefined
ele.defaultValue = isMultiple ? [] : undefined
- return false
}
if (ele.displayType === '1') {
@@ -587,7 +586,7 @@ const validate = () => {
return false
}
- if (ele.optionValueSource === 2 && !ele.valueSource?.length) {
+ if (ele.optionValueSource === 2 && !ele.valueSource?.filter(ele => !!ele).length) {
ElMessage.error('手工输入-选项值不能为空')
return true
}
@@ -687,6 +686,19 @@ const setConditionOut = () => {
init(conditions.value[conditions.value.length - 1].id)
}
+const setActiveSelectTab = (arr, id) => {
+ let activelist = 'dimensionList'
+ arr.some((ele, index) => {
+ if ((ele || []).some(itx => itx.id === id)) {
+ activelist = ['dimensionList', 'quotaList', 'parameterList'][index]
+ return true
+ }
+ return false
+ })
+
+ return activelist
+}
+
const init = (queryId: string) => {
if (!datasetTree.value.length) {
initDataset()
@@ -725,7 +737,12 @@ const init = (queryId: string) => {
fields.value = datasetFieldList.value
.map(ele => {
if (!datasetMap[ele.tableId]) return null
- return { ...datasetMap[ele.tableId], componentId: ele.id }
+ const activeCom = datasetMap[ele.tableId].fields || {}
+ const activelist = setActiveSelectTab(
+ [activeCom.dimensionList, activeCom.quotaList, activeCom.parameterList],
+ curComponent.value.checkedFieldsMap[ele.id]
+ )
+ return { ...datasetMap[ele.tableId], componentId: ele.id, activelist }
})
.filter(ele => !!ele)
})
@@ -813,6 +830,13 @@ const handleCondition = item => {
idMap.includes(ele)
)
if (!!fields.value?.length) {
+ fields.value.forEach(ele => {
+ const activeCom = ele.fields
+ ele.activelist = setActiveSelectTab(
+ [activeCom.dimensionList, activeCom.quotaList, activeCom.parameterList],
+ curComponent.value.checkedFieldsMap[ele.componentId]
+ )
+ })
handleCheckedFieldsChange(curComponent.value.checkedFields)
}
multipleChange(curComponent.value.multiple)
@@ -1337,7 +1361,7 @@ defineExpose({
value="1"
/>
@@ -1544,11 +1568,7 @@ defineExpose({
+
diff --git a/core/core-frontend/src/custom-component/v-query/Select.vue b/core/core-frontend/src/custom-component/v-query/Select.vue
index 77ee7ecb1e..4cea917edd 100644
--- a/core/core-frontend/src/custom-component/v-query/Select.vue
+++ b/core/core-frontend/src/custom-component/v-query/Select.vue
@@ -334,15 +334,19 @@ watch(
watch(
() => config.value.optionValueSource,
- val => {
- debounceOptions(val)
+ (valNew, newOld) => {
+ if ([valNew, newOld].includes(2)) {
+ selectValue.value = Array.isArray(selectValue.value) ? [] : undefined
+ config.value.selectValue = cloneDeep(selectValue.value)
+ config.value.defaultValue = cloneDeep(selectValue.value)
+ }
+ debounceOptions(valNew)
}
)
watch(
[() => config.value.checkedFields, () => config.value.checkedFieldsMap],
() => {
- if (!props.isConfig) return
debounceOptions(config.value.optionValueSource)
},
{
diff --git a/core/core-frontend/src/utils/canvasStyle.ts b/core/core-frontend/src/utils/canvasStyle.ts
index 7b5b7b0896..92942dbf59 100644
--- a/core/core-frontend/src/utils/canvasStyle.ts
+++ b/core/core-frontend/src/utils/canvasStyle.ts
@@ -125,8 +125,14 @@ export const customAttrTrans = {
'wordSizeRange',
'wordSpacing'
],
- label: ['fontSize'],
- tooltip: ['fontSize'],
+ label: {
+ fontSize: '',
+ seriesLabelFormatter: ['fontSize']
+ },
+ tooltip: {
+ fontSize: '',
+ seriesTooltipFormatter: ['fontSize']
+ },
indicator: ['fontSize', 'suffixFontSize'],
indicatorName: ['fontSize', 'nameValueSpacing']
}
@@ -296,15 +302,25 @@ export function recursionTransObj(template, infoObj, scale, terminal) {
// 如果是数组 进行赋值计算
if (template[templateKey] instanceof Array) {
template[templateKey].forEach(templateProp => {
- if (infoObj[templateKey] && infoObj[templateKey][templateProp]) {
+ if (
+ infoObj[templateKey] &&
+ (infoObj[templateKey][templateProp] || infoObj[templateKey].length)
+ ) {
// 移动端特殊属性值设置
if (terminal === 'mobile' && mobileSpecialProps[templateProp] !== undefined) {
infoObj[templateKey][templateProp] = mobileSpecialProps[templateProp]
} else {
- infoObj[templateKey][templateProp] = getScaleValue(
- infoObj[templateKey][templateProp],
- scale
- )
+ // 数组依次设置
+ if (infoObj[templateKey] instanceof Array) {
+ infoObj[templateKey].forEach(v => {
+ v[templateProp] = getScaleValue(v[templateProp], scale)
+ })
+ } else {
+ infoObj[templateKey][templateProp] = getScaleValue(
+ infoObj[templateKey][templateProp],
+ scale
+ )
+ }
}
}
})
diff --git a/core/core-frontend/src/utils/canvasUtils.ts b/core/core-frontend/src/utils/canvasUtils.ts
index 0db7b454a3..d21ae7b72e 100644
--- a/core/core-frontend/src/utils/canvasUtils.ts
+++ b/core/core-frontend/src/utils/canvasUtils.ts
@@ -152,7 +152,7 @@ export function initCanvasDataPrepare(dvId, busiFlag, callBack) {
})
}
-export function initCanvasData(dvId, busiFlag, callBack) {
+export async function initCanvasData(dvId, busiFlag, callBack) {
initCanvasDataPrepare(
dvId,
busiFlag,
diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue
index 91157a90b7..2047acb07b 100644
--- a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue
+++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue
@@ -64,10 +64,15 @@ const changeThreshold = () => {
const changeSplitThreshold = (threshold: string) => {
// check input
if (threshold) {
+ const regex = /^(\d+)(,\d+)*$/
+ if (!regex.test(threshold)) {
+ ElMessage.error(t('chart.gauge_threshold_format_error'))
+ return
+ }
const arr = threshold.split(',')
for (let i = 0; i < arr.length; i++) {
const ele = arr[i]
- if (parseFloat(ele).toString() === 'NaN' || parseFloat(ele) <= 0 || parseFloat(ele) >= 100) {
+ if (parseFloat(ele) <= 0 || parseFloat(ele) >= 100) {
ElMessage.error(t('chart.gauge_threshold_format_error'))
return
}
diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue
index 392a5e099c..a331eb2a7d 100644
--- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue
+++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue
@@ -560,7 +560,7 @@ onMounted(() => {
:effect="themes"
v-model="state.basicStyleForm.showZoom"
:predefine="predefineColors"
- @change="changeBasicStyle('zoomShow')"
+ @change="changeBasicStyle('showZoom')"
>
{{ t('chart.show_zoom') }}
diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/DualYAxisSelectorInner.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/DualYAxisSelectorInner.vue
index 58eb11adc0..e3508f9d1a 100644
--- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/DualYAxisSelectorInner.vue
+++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/DualYAxisSelectorInner.vue
@@ -33,6 +33,12 @@ const state = reactive({
const emit = defineEmits(['onChangeYAxisForm'])
+const splitLineStyle = [
+ { label: t('chart.line_type_solid'), value: 'solid' },
+ { label: t('chart.line_type_dashed'), value: 'dashed' },
+ { label: t('chart.line_type_dotted'), value: 'dotted' }
+]
+
watch(
() => props.form,
() => {
@@ -284,10 +290,26 @@ onMounted(() => {
is-custom
/>
+
+
+
+
+
{
is-custom
/>
+
+
+
+
+
{
/>
-
-
-
-
-
{
is-custom
/>
+
+
+
+
+
{
/>
-
-
-
-
-
item.id === chart.drillFilters[0].fieldId
+ )
+ const drillEnterField = xAxis[drillEnterFieldIndex]
+ fieldMap[curDrillField.dataeaseName] = {
+ width: fieldMap[drillEnterField.dataeaseName]?.width
+ }
+ }
style.colCfg.width = node => {
const width = node.spreadsheet.container.cfg.el.offsetWidth
if (!basicStyle.tableFieldWidth?.length) {
diff --git a/core/core-frontend/src/views/data-visualization/index.vue b/core/core-frontend/src/views/data-visualization/index.vue
index fc3775cbda..2f58c0be5f 100644
--- a/core/core-frontend/src/views/data-visualization/index.vue
+++ b/core/core-frontend/src/views/data-visualization/index.vue
@@ -79,7 +79,7 @@ const dvLayout = ref(null)
const canvasCenterRef = ref(null)
const state = reactive({
datasetTree: [],
- scaleHistory: 100,
+ scaleHistory: null,
canvasId: 'canvas-main',
canvasInitStatus: false,
sourcePid: null,
@@ -204,10 +204,10 @@ const doUseCache = flag => {
}
}
-const initLocalCanvasData = () => {
+const initLocalCanvasData = async () => {
const { opt, sourcePid, resourceId } = state
const busiFlg = opt === 'copy' ? 'dataV-copy' : 'dataV'
- initCanvasData(resourceId, busiFlg, function () {
+ await initCanvasData(resourceId, busiFlg, function () {
state.canvasInitStatus = true
// afterInit
nextTick(() => {
@@ -238,7 +238,9 @@ watch(
() => editMode.value,
val => {
if (val === 'edit') {
- canvasStyleData.value.scale = state.scaleHistory
+ if (state.scaleHistory) {
+ canvasStyleData.value.scale = state.scaleHistory
+ }
initScroll()
} else {
previewScaleChange()
@@ -288,7 +290,7 @@ onMounted(async () => {
if (canvasCache) {
canvasCacheOutRef.value?.dialogInit({ canvasType: 'dataV', resourceId: dvId })
} else {
- initLocalCanvasData()
+ await initLocalCanvasData()
}
} else if (opt && opt === 'create') {
state.canvasInitStatus = false
diff --git a/core/core-frontend/src/views/visualized/data/dataset/ExportExcel.vue b/core/core-frontend/src/views/visualized/data/dataset/ExportExcel.vue
index 24da79ecdb..97186d51a0 100644
--- a/core/core-frontend/src/views/visualized/data/dataset/ExportExcel.vue
+++ b/core/core-frontend/src/views/visualized/data/dataset/ExportExcel.vue
@@ -347,7 +347,7 @@ defineExpose({
@@ -357,15 +357,15 @@ defineExpose({
{{ $t('data_export.download_all') }}
{{ $t('data_export.download') }}
- {{ $t('data_export.del_all') }}
- {{ $t('commons.delete') }}
diff --git a/core/core-frontend/src/views/visualized/data/dataset/index.vue b/core/core-frontend/src/views/visualized/data/dataset/index.vue
index 08d42c6066..eb7842987c 100644
--- a/core/core-frontend/src/views/visualized/data/dataset/index.vue
+++ b/core/core-frontend/src/views/visualized/data/dataset/index.vue
@@ -35,7 +35,9 @@ import type { TabPaneName } from 'element-plus-secondary'
import { timestampFormatDate } from './form/util'
import { interactiveStoreWithOut } from '@/store/modules/interactive'
import { XpackComponent } from '@/components/plugin'
+import { useCache } from '@/hooks/web/useCache'
const interactiveStore = interactiveStoreWithOut()
+const { wsCache } = useCache()
interface Field {
fieldShortName: string
name: string
@@ -86,6 +88,7 @@ let originResourceTree = []
const sortTypeChange = sortType => {
state.datasetTree = treeSort(originResourceTree, sortType)
state.curSortType = sortType
+ wsCache.set('TreeSort-dataset', state.curSortType)
}
const resourceCreate = (pid, name) => {
@@ -211,10 +214,12 @@ const getData = () => {
rootManage.value = nodeData[0]['weight'] >= 7
state.datasetTree = nodeData[0]['children'] || []
originResourceTree = cloneDeep(unref(state.datasetTree))
+ sortTypeChange(state.curSortType)
return
}
state.datasetTree = nodeData
originResourceTree = cloneDeep(unref(state.datasetTree))
+ sortTypeChange(state.curSortType)
})
.finally(() => {
dtLoading.value = false
@@ -252,6 +257,7 @@ const dfsDatasetTree = (ds, id) => {
onBeforeMount(() => {
nodeInfo.id = (route.params.id as string) || ''
+ loadInit()
getData()
})
@@ -471,6 +477,13 @@ const sortList = [
}
]
+const loadInit = () => {
+ const historyTreeSort = wsCache.get('TreeSort-dataset')
+ if (historyTreeSort) {
+ state.curSortType = historyTreeSort
+ }
+}
+
const sortTypeTip = computed(() => {
return sortList.find(ele => ele.value === state.curSortType).name
})
diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/index.vue b/core/core-frontend/src/views/visualized/data/datasource/form/index.vue
index 7b5e7db117..4f6bd7cf52 100644
--- a/core/core-frontend/src/views/visualized/data/datasource/form/index.vue
+++ b/core/core-frontend/src/views/visualized/data/datasource/form/index.vue
@@ -73,8 +73,8 @@ const selectDsType = (type: string) => {
currentDsType.value = type
activeStep.value = 1
activeApiStep.value = 1
- detail.value.initForm(type)
nextTick(() => {
+ detail.value.initForm(type)
if (!dsTree.value) return
currentTypeList.value
.map(ele => ele.dbList)
@@ -493,7 +493,9 @@ const init = (nodeInfo: Form | Param, id?: string, res?: object) => {
excel.value.appendReplaceExcel(res)
})
}
- detail.value.clearForm()
+ nextTick(() => {
+ detail.value.clearForm()
+ })
})
}
}
@@ -653,7 +655,7 @@ defineExpose({
:form="form"
:editDs="editDs"
:active-step="activeApiStep"
- v-show="activeStep !== 0 && currentDsType && currentDsType !== 'Excel'"
+ v-if="activeStep !== 0 && currentDsType && currentDsType !== 'Excel' && visible"
>
diff --git a/core/core-frontend/src/views/visualized/data/datasource/index.vue b/core/core-frontend/src/views/visualized/data/datasource/index.vue
index 5a806a186f..9ae8a67083 100644
--- a/core/core-frontend/src/views/visualized/data/datasource/index.vue
+++ b/core/core-frontend/src/views/visualized/data/datasource/index.vue
@@ -42,6 +42,7 @@ import { useMoveLine } from '@/hooks/web/useMoveLine'
import { cloneDeep } from 'lodash-es'
import { interactiveStoreWithOut } from '@/store/modules/interactive'
import treeSort from '@/utils/treeSortUtils'
+import { useCache } from '@/hooks/web/useCache'
const route = useRoute()
const interactiveStore = interactiveStoreWithOut()
interface Field {
@@ -51,7 +52,7 @@ interface Field {
originName: string
deType: number
}
-
+const { wsCache } = useCache()
const { t } = useI18n()
const router = useRouter()
const appStore = useAppStoreWithOut()
@@ -165,6 +166,7 @@ let originResourceTree = []
const sortTypeChange = sortType => {
state.datasourceTree = treeSort(originResourceTree, sortType)
state.curSortType = sortType
+ wsCache.set('TreeSort-datasource', state.curSortType)
}
const handleSizeChange = pageSize => {
state.paginationConfig.currentPage = 1
@@ -391,10 +393,12 @@ const listDs = () => {
rootManage.value = nodeData[0]['weight'] >= 7
state.datasourceTree = nodeData[0]['children'] || []
originResourceTree = cloneDeep(unref(state.datasourceTree))
+ sortTypeChange(state.curSortType)
return
}
originResourceTree = cloneDeep(unref(state.datasourceTree))
state.datasourceTree = nodeData
+ sortTypeChange(state.curSortType)
})
.finally(() => {
mounted.value = true
@@ -734,8 +738,17 @@ const defaultProps = {
children: 'children',
label: 'name'
}
+
+const loadInit = () => {
+ const historyTreeSort = wsCache.get('TreeSort-datasource')
+ if (historyTreeSort) {
+ state.curSortType = historyTreeSort
+ }
+}
+
onMounted(() => {
nodeInfo.id = (route.params.id as string) || ''
+ loadInit()
listDs()
const { opt } = router.currentRoute.value.query
if (opt && opt === 'create') {
diff --git a/de-xpack b/de-xpack
index 448c319f8e..e66bdc3a8d 160000
--- a/de-xpack
+++ b/de-xpack
@@ -1 +1 @@
-Subproject commit 448c319f8e519be5f4b47663258136bcb6fc3faa
+Subproject commit e66bdc3a8d18a29287be512a7c929f1f1659cf0f