mirror of
https://gitee.com/dromara/go-view.git
synced 2025-06-30 00:29:16 +08:00
fix: 大屏优化403问题 以及conData组件不加载问题
This commit is contained in:
parent
2cfcfe48b7
commit
3c662921f7
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user