mirror of
https://gitee.com/dromara/go-view.git
synced 2025-06-30 08:39:15 +08:00
fix: 大屏优化403问题 以及conData组件不加载问题
This commit is contained in:
parent
2cfcfe48b7
commit
3c662921f7
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<n-space vertical>
|
<n-space vertical>
|
||||||
<setting-item-box name="组态ID" :alone="true">
|
<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>
|
</setting-item-box>
|
||||||
</n-space>
|
</n-space>
|
||||||
</template>
|
</template>
|
||||||
@ -14,17 +14,17 @@ import { SettingItemBox } from '@/components/Pages/ChartItemSetting'
|
|||||||
|
|
||||||
const props = defineProps(['customData', 'request'])
|
const props = defineProps(['customData', 'request'])
|
||||||
|
|
||||||
let mapId: Ref<null | number> = ref(null)
|
// let mapId: Ref<null | number> = ref(null)
|
||||||
mapId.value = props.customData.mapId as (null | number)
|
// mapId.value = props.customData.mapId as (null | number)
|
||||||
const setMapId = debounce((v: null | number) => {
|
const setMapId = debounce((v: null | number) => {
|
||||||
props.customData.mapId = v
|
props.customData.mapId = v
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|
||||||
watch(() => {
|
// watch(() => {
|
||||||
return mapId.value
|
// return mapId.value
|
||||||
}, (v: null | number) => {
|
// }, (v: null | number) => {
|
||||||
setMapId(v)
|
// setMapId(v)
|
||||||
})
|
// })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -47,7 +47,8 @@ const handleMsg = (event: any) => {
|
|||||||
if (event.origin === origin) {
|
if (event.origin === origin) {
|
||||||
// 处理来自子级页面的消息
|
// 处理来自子级页面的消息
|
||||||
let obj = event.data
|
let obj = event.data
|
||||||
if(obj.type === 'changeRoute') {
|
if(obj.page !== 'engineering') return
|
||||||
|
if(obj.type === 'changeTopmostRoute') {
|
||||||
postMessageToParent({
|
postMessageToParent({
|
||||||
type: 'changeRouterV1',
|
type: 'changeRouterV1',
|
||||||
url: obj.path
|
url: obj.path
|
||||||
|
@ -126,7 +126,13 @@ export const useSync = () => {
|
|||||||
const intComponent = (target: CreateComponentType) => {
|
const intComponent = (target: CreateComponentType) => {
|
||||||
if (!window['$vue'].component(target.chartConfig.chartKey)) {
|
if (!window['$vue'].component(target.chartConfig.chartKey)) {
|
||||||
window['$vue'].component(target.chartConfig.chartKey, fetchChartComponent(target.chartConfig))
|
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))
|
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))
|
window['$vue'].component(target.chartConfig.conDataKey, fetchConfigDataComponent(target.chartConfig))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user