fix: 组态优化 快捷键

This commit is contained in:
huanghao1412 2024-02-28 17:30:53 +08:00
parent eea358ccad
commit 1ae9c7c982
3 changed files with 19 additions and 4 deletions

View File

@ -41,7 +41,7 @@
</SettingItem>
</SettingItemBox>
<SettingItemBox name="提示" :alone="true">
<n-text>在预览页使用alt+滚轮进行缩放</n-text>
<n-text>在预览页可以使用 alt+'+' alt+'-' 进行缩放</n-text>
</SettingItemBox>
</CollapseItem>
</template>

View File

@ -1,15 +1,30 @@
<template>
<n-space vertical>
<setting-item-box name="组态ID" :alone="true">
<n-input-number v-model:value="props.customData.mapId" size="small" placeholder="请输入组态ID"/>
<n-input-number v-model:value="mapId" size="small" placeholder="请输入组态ID"/>
</setting-item-box>
</n-space>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue'
import type { Ref } from 'vue'
import { debounce } from 'lodash'
import { SettingItemBox } from '@/components/Pages/ChartItemSetting'
const props = defineProps(['customData', 'request'])
let mapId: Ref<null | number> = ref(null)
mapId.value = props.customData.mapId as (null | number)
const setMapId = debounce((v: null | number) => {
props.customData.mapId = v
}, 500)
watch(() => {
return mapId.value
}, (v: null | number) => {
setMapId(v)
})
</script>
<style lang="scss" scoped>

View File

@ -31,7 +31,7 @@ let url = computed(() => {
const account = 'admin'
const password = 'laimi@123'
let origin = process.env.NODE_ENV === 'production' ? window.location.origin : 'http://192.168.0.42:9528'
let str = `${origin}/static/#/dynamicRing/schematicDiagram/${props.chartConfig.customData.mapId}?parentOrigin=${window.location.origin}&isIframe=true&account=${account}&password=${password}`
let str = `${origin}/static/#/dynamicRing/schematicDiagram/${props.chartConfig.customData.mapId}?parentOrigin=${window.location.origin}&isScreenIframe=true&account=${account}&password=${password}`
return str
})
@ -54,7 +54,7 @@ const handleMsg = (event: any) => {
})
}
else if(obj.type === 'loaded') {
sessionStorage.removeItem("pageLoadMethod")
// sessionStorage.removeItem("pageLoadMethod")
postMsgToChild({
type: 'setTop&Left&Scale',
top: option.value.top,