diff --git a/core/core-frontend/src/store/modules/data-visualization/snapshot.ts b/core/core-frontend/src/store/modules/data-visualization/snapshot.ts index 9e45e520dd..16f0d85bec 100644 --- a/core/core-frontend/src/store/modules/data-visualization/snapshot.ts +++ b/core/core-frontend/src/store/modules/data-visualization/snapshot.ts @@ -164,7 +164,8 @@ export const snapshotStore = defineStore('snapshot', { recordSnapshot() { this.styleChangeTimes = ++this.styleChangeTimes - if (dataPrepareState.value) { + // 移动端设计时暂不保存镜像 + if (dataPrepareState.value && !mobileInPc) { const snapshotComponentData = deepCopy(componentData.value) dvMainStore.removeGroupArea(snapshotComponentData) // 添加新的快照 diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue index 748e597fe1..3d4aa62abf 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue @@ -409,6 +409,7 @@ watch( class="attr-selector" :chart="chart" :quota-fields="props.quotaData" + :mobile-in-pc="mobileInPc" @onMiscChange="onMiscChange" /> @@ -445,9 +446,12 @@ watch( @onLabelChange="onLabelChange" /> - + { obj.placeholder = '' } currentSearch.value = obj + snapshotStore.recordSnapshotCacheToMobile('propValue') } const init = () => { @@ -182,8 +183,20 @@ const checkBold = type => { chart.value.customStyle.component[type] = chart.value.customStyle.component[type] ? '' : 'bold' } +const handleCurrentPlaceholderCustomChange = () => { + if (mobileInPc.value) { + //移动端设计 + useEmitt().emitter.emit('onMobileStatusChange', { + type: 'componentStyleChange', + value: { type: 'renderChart', component: JSON.parse(JSON.stringify(chart.value)) } + }) + } else { + snapshotStore.recordSnapshotCache() + } +} + const handleCurrentPlaceholderChange = () => { - snapshotStore.recordSnapshotCache() + snapshotStore.recordSnapshotCacheToMobile('propValue') } const checkItalic = type => { @@ -409,6 +422,7 @@ initParams() 提示词 @@ -427,10 +441,12 @@ initParams() is-custom v-model="chart.customStyle.component.text" :disabled="!chart.customStyle.component.placeholderShow" + @change="handleCurrentPlaceholderCustomChange" :predefine="predefineColors" /> propertyInner?: Array + mobileInPc?: boolean }>(), - { themes: 'dark' } + { themes: 'dark', mobileInPc: false } ) useEmitt({ @@ -391,202 +392,205 @@ onMounted(() => { - - + - {{ t('chart.fix') }} - {{ t('chart.dynamic') }} - - - - - - - - - - + {{ t('chart.fix') }} + {{ t('chart.dynamic') }} + + + + + + + + + - - - - {{ item.name }} - - - - - - - - - - - - - - - - - - - + + + + + {{ item.name }} + + + + + + + + + + + + + + + + + + + - - - {{ t('chart.fix') }} - {{ t('chart.dynamic') }} - - - - - - - - - - + {{ t('chart.fix') }} + {{ t('chart.dynamic') }} + + + + + + + + + - - - - {{ item.name }} - - - - - - - - - - - - - - - - - - - + + + + + {{ item.name }} + + + + + + + + + + + + + + + + + + + + + diff --git a/core/core-frontend/src/views/mobile/panel/index.vue b/core/core-frontend/src/views/mobile/panel/index.vue index af4f333e06..b114f4c735 100644 --- a/core/core-frontend/src/views/mobile/panel/index.vue +++ b/core/core-frontend/src/views/mobile/panel/index.vue @@ -83,7 +83,7 @@ const hanedleMessage = event => { } else if (type === 'updateTitle') { mobileViewStyleSwitch(component) useEmitt().emitter.emit('updateTitle-' + component.id) - } else if (['style', 'commonBackground', 'events'].includes(type)) { + } else if (['style', 'commonBackground', 'events', 'propValue'].includes(type)) { const mobileComponent = findComponentById(component.id) mobileComponent[type] = component[type] } diff --git a/sdk/common/src/main/java/io/dataease/utils/SnowFlake.java b/sdk/common/src/main/java/io/dataease/utils/SnowFlake.java index e820f58e13..4d0b44e22f 100644 --- a/sdk/common/src/main/java/io/dataease/utils/SnowFlake.java +++ b/sdk/common/src/main/java/io/dataease/utils/SnowFlake.java @@ -26,7 +26,7 @@ public class SnowFlake { */ private final static long MACHINE_LEFT = SEQUENCE_BIT; private final static long DATACENTER_LEFT = SEQUENCE_BIT + MACHINE_BIT; - private final static long TIMESTMP_LEFT = DATACENTER_LEFT + DATACENTER_BIT; + private final static long TIMESTAMP_LEFT = DATACENTER_LEFT + DATACENTER_BIT; private long datacenterId; //数据中心 private long machineId; //机器标识 @@ -69,7 +69,7 @@ public class SnowFlake { lastStmp = currStmp; - return (currStmp - START_STMP) << TIMESTMP_LEFT //时间戳部分 + return (currStmp - START_STMP) << TIMESTAMP_LEFT //时间戳部分 | datacenterId << DATACENTER_LEFT //数据中心部分 | machineId << MACHINE_LEFT //机器标识部分 | sequence; //序列号部分