|
@@ -12,14 +12,18 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { ref, toRefs, computed, watch } from 'vue'
|
|
|
|
|
|
|
+import { ref, toRefs, computed, watch, nextTick, onBeforeUnmount } from 'vue'
|
|
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
|
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
|
|
|
|
+import { useChartLayoutStore } from '@/store/modules/chartLayoutStore/chartLayoutStore'
|
|
|
|
|
|
|
|
const chartEditStore = useChartEditStore()
|
|
const chartEditStore = useChartEditStore()
|
|
|
|
|
+const chartLayoutStore = useChartLayoutStore()
|
|
|
const designStore = useDesignStore()
|
|
const designStore = useDesignStore()
|
|
|
|
|
|
|
|
const { width, height } = toRefs(chartEditStore.getEditCanvasConfig)
|
|
const { width, height } = toRefs(chartEditStore.getEditCanvasConfig)
|
|
|
|
|
+const { scale, lockScale } = toRefs(chartEditStore.getEditCanvas)
|
|
|
|
|
+const { getLayers, getCharts, getDetails } = toRefs(chartLayoutStore)
|
|
|
|
|
|
|
|
const configShow = ref(true)
|
|
const configShow = ref(true)
|
|
|
|
|
|
|
@@ -49,25 +53,47 @@ const canvasBox = () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const scale = computed(() => {
|
|
|
|
|
- return chartEditStore.getEditCanvas.scale
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
// 颜色
|
|
// 颜色
|
|
|
const themeColor = computed(() => {
|
|
const themeColor = computed(() => {
|
|
|
return designStore.getAppTheme
|
|
return designStore.getAppTheme
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
// 处理标尺重制大小
|
|
// 处理标尺重制大小
|
|
|
-watch(
|
|
|
|
|
- () => scale.value,
|
|
|
|
|
- () => {
|
|
|
|
|
- configShow.value = false
|
|
|
|
|
|
|
+const ruleChangeHandle = () => {
|
|
|
|
|
+ configShow.value = false
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ configShow.value = true
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const ruleChangeHandleTimeOut = () => {
|
|
|
|
|
+ if (lockScale.value) {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- configShow.value = true
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ ruleChangeHandle()
|
|
|
|
|
+ }, 500)
|
|
|
}
|
|
}
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+watch(
|
|
|
|
|
+ () => scale.value,
|
|
|
|
|
+ () => ruleChangeHandle()
|
|
|
)
|
|
)
|
|
|
|
|
+
|
|
|
|
|
+watch(
|
|
|
|
|
+ () => getLayers.value,
|
|
|
|
|
+ () => ruleChangeHandleTimeOut()
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
|
|
+watch(
|
|
|
|
|
+ () => getCharts.value,
|
|
|
|
|
+ () => ruleChangeHandleTimeOut()
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
|
|
+watch(
|
|
|
|
|
+ () => getDetails.value,
|
|
|
|
|
+ () => ruleChangeHandleTimeOut()
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
<style>
|