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