fix: 大屏优化403问题 以及conData组件不加载问题

This commit is contained in:
huanghao1412 2024-03-04 10:17:33 +08:00
parent 2cfcfe48b7
commit 3c662921f7
3 changed files with 16 additions and 9 deletions

View File

@ -1,7 +1,7 @@
<template>
<n-space vertical>
<setting-item-box name="组态ID" :alone="true">
<n-input-number v-model:value="mapId" size="small" placeholder="请输入组态ID"/>
<n-input-number :value="props.customData.mapId" @update:value="setMapId" size="small" placeholder="请输入组态ID"/>
</setting-item-box>
</n-space>
</template>
@ -14,17 +14,17 @@ 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)
// 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)
})
// watch(() => {
// return mapId.value
// }, (v: null | number) => {
// setMapId(v)
// })
</script>
<style lang="scss" scoped>

View File

@ -47,7 +47,8 @@ const handleMsg = (event: any) => {
if (event.origin === origin) {
//
let obj = event.data
if(obj.type === 'changeRoute') {
if(obj.page !== 'engineering') return
if(obj.type === 'changeTopmostRoute') {
postMessageToParent({
type: 'changeRouterV1',
url: obj.path

View File

@ -126,7 +126,13 @@ export const useSync = () => {
const intComponent = (target: CreateComponentType) => {
if (!window['$vue'].component(target.chartConfig.chartKey)) {
window['$vue'].component(target.chartConfig.chartKey, fetchChartComponent(target.chartConfig))
// window['$vue'].component(target.chartConfig.conKey, fetchConfigComponent(target.chartConfig))
// window['$vue'].component(target.chartConfig.conDataKey, fetchConfigDataComponent(target.chartConfig))
}
if (!window['$vue'].component(target.chartConfig.conKey)) {
window['$vue'].component(target.chartConfig.conKey, fetchConfigComponent(target.chartConfig))
}
if (!window['$vue'].component(target.chartConfig.conDataKey)) {
window['$vue'].component(target.chartConfig.conDataKey, fetchConfigDataComponent(target.chartConfig))
}
}