页面报错不切换
This commit is contained in:
parent
a4ec4eb0d4
commit
cbc84b8273
@ -389,16 +389,11 @@ export async function initCanvasData(dvId, busiFlag, callBack) {
|
|||||||
dvMainStore.setCanvasViewInfo(canvasViewInfoPreview)
|
dvMainStore.setCanvasViewInfo(canvasViewInfoPreview)
|
||||||
// 刷新联动信息
|
// 刷新联动信息
|
||||||
getPanelAllLinkageInfo(dvInfo.id).then(rsp => {
|
getPanelAllLinkageInfo(dvInfo.id).then(rsp => {
|
||||||
if(rsp && rsp.data){
|
dvMainStore.setNowPanelTrackInfo(rsp.data)
|
||||||
dvMainStore.setNowPanelTrackInfo(rsp.data)
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
})
|
||||||
// 刷新跳转信息
|
// 刷新跳转信息
|
||||||
queryVisualizationJumpInfo(dvInfo.id).then(rsp => {
|
queryVisualizationJumpInfo(dvInfo.id).then(rsp => {
|
||||||
if(rsp && rsp.data){
|
dvMainStore.setNowPanelJumpInfo(rsp.data)
|
||||||
dvMainStore.setNowPanelJumpInfo(rsp.data)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
callBack({ canvasDataResult, canvasStyleResult, dvInfo, canvasViewInfoPreview })
|
callBack({ canvasDataResult, canvasStyleResult, dvInfo, canvasViewInfoPreview })
|
||||||
}
|
}
|
||||||
|
@ -125,6 +125,10 @@ const runCode = async () => {
|
|||||||
route: route
|
route: route
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
prevApp.config.errorHandler = (err, vm, info) => {
|
||||||
|
console.error('Vue error:', err, 'Info:', info);
|
||||||
|
// 不要在此 throw 错误,否则仍会中断程序
|
||||||
|
};
|
||||||
prevApp.use(router)
|
prevApp.use(router)
|
||||||
prevApp.use(route)
|
prevApp.use(route)
|
||||||
prevApp.use(i18n)
|
prevApp.use(i18n)
|
||||||
@ -132,13 +136,13 @@ const runCode = async () => {
|
|||||||
prevApp.mount(previewContainer.value)
|
prevApp.mount(previewContainer.value)
|
||||||
|
|
||||||
} catch (error:any) {
|
} catch (error:any) {
|
||||||
// console.error('运行时错误:', error)
|
console.error('运行时错误:', error)
|
||||||
previewContainer.value.innerHTML = `
|
// previewContainer.value.innerHTML = `
|
||||||
<div class="error">
|
// <div class="error">
|
||||||
<h3>错误</h3>
|
// <h3>错误</h3>
|
||||||
<pre>${error.message}</pre>
|
// <pre>${error.message}</pre>
|
||||||
</div>
|
// </div>
|
||||||
`
|
// `
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -55,19 +55,19 @@ function childmenuclick(item: any) {
|
|||||||
currentMoudleId.value = item.module_id
|
currentMoudleId.value = item.module_id
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (currentrow.value.module_type == '03') {
|
if (currentrow.value.module_type == '03') {
|
||||||
currentMoudleType.value = 'dataV'
|
currentMoudleType.value = 'dataV'
|
||||||
showcontent.value = 'dataVisualization'
|
showcontent.value = 'dataVisualization'
|
||||||
} else if (currentrow.value.module_type == '0301') {
|
} else if (currentrow.value.module_type == '0301') {
|
||||||
currentMoudleType.value = 'dashboard'
|
currentMoudleType.value = 'dashboard'
|
||||||
showcontent.value = 'dataVisualization'
|
showcontent.value = 'dataVisualization'
|
||||||
} else if (currentrow.value.module_type == '05') {
|
} else if (currentrow.value.module_type == '05') {
|
||||||
showcontent.value = 'FormCreate'
|
showcontent.value = 'FormCreate'
|
||||||
}
|
}
|
||||||
const currentInfo = {
|
const currentInfo = {
|
||||||
showcontent: showcontent.value,
|
showcontent: showcontent.value,
|
||||||
currentrow: currentrow.value
|
currentrow: currentrow.value
|
||||||
}
|
}
|
||||||
localStorage.setItem('currentInfo', JSON.stringify(currentInfo))
|
localStorage.setItem('currentInfo', JSON.stringify(currentInfo))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -118,7 +118,6 @@ onBeforeUnmount(() => {
|
|||||||
});
|
});
|
||||||
function init() {
|
function init() {
|
||||||
showcontent.value = ''
|
showcontent.value = ''
|
||||||
currentMoudleType.value = ''
|
|
||||||
userList.value = JSON.parse(localStorage.getItem('userInfo') || '{}')
|
userList.value = JSON.parse(localStorage.getItem('userInfo') || '{}')
|
||||||
navtitle.value = userList.value.app_name
|
navtitle.value = userList.value.app_name
|
||||||
applicationId.value = userList.id
|
applicationId.value = userList.id
|
||||||
@ -244,11 +243,11 @@ function userdetails() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="system-box-content" style="height: calc(100vh - 65px);">
|
<div class="system-box-content" style="height: calc(100vh - 65px);">
|
||||||
<dataVisualization v-if="showcontent === 'dataVisualization'" :appId="currentrow.module_id"
|
<dataVisualization v-if="showcontent == 'dataVisualization'" :appId="currentrow.module_id"
|
||||||
:busiFlag="currentMoudleType" />
|
:busiFlag="currentMoudleType" />
|
||||||
<FormCreate v-if="showcontent === 'FormCreate'" :appId="currentrow.module_id" />
|
<FormCreate v-if="showcontent == 'FormCreate'" :appId="currentrow.module_id" />
|
||||||
<PermissionSet v-if="showcontent === 'PermissionSet'" :isshowheader="true" />
|
<PermissionSet v-if="showcontent == 'PermissionSet'" :isshowheader="true" />
|
||||||
<UserInfoSet v-if="showcontent === 'UserInfoSet'" :userList="userList" :applicationId="applicationId" />
|
<UserInfoSet v-if="showcontent == 'UserInfoSet'" :userList="userList" :applicationId="applicationId" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user