feat: webAddress
This commit is contained in:
@@ -104,16 +104,13 @@
|
||||
const proJectId = computed(() => route.params.id)
|
||||
|
||||
const handleOpenReport = (data, isUrls = false) => {
|
||||
if (isUrls) {
|
||||
previewRef.value.setUrls(data)
|
||||
} else {
|
||||
previewRef.value.setSessionId(data)
|
||||
}
|
||||
previewRef.value.setSessionId(data)
|
||||
previewType.value = 'report'
|
||||
}
|
||||
|
||||
const handleOpenUrls = (data) => {
|
||||
handleOpenReport(data, true)
|
||||
previewRef.value.setUrls(data)
|
||||
previewType.value = 'url'
|
||||
}
|
||||
|
||||
watch(
|
||||
@@ -129,6 +126,9 @@
|
||||
onMounted(() => {
|
||||
MyEvent.add('openReport', handleOpenReport)
|
||||
MyEvent.add('openUrls', handleOpenUrls)
|
||||
MyEvent.add('OpenSketch', ()=>{
|
||||
previewType.value = 'sketch'
|
||||
})
|
||||
projectStore.clearProject()
|
||||
if (proJectId.value) {
|
||||
handleGetProjectInfoAndHistory()
|
||||
@@ -137,6 +137,9 @@
|
||||
onUnmounted(() => {
|
||||
MyEvent.remove('openReport', handleOpenReport)
|
||||
MyEvent.remove('openUrls', handleOpenUrls)
|
||||
MyEvent.remove('OpenSketch', ()=>{
|
||||
previewType.value = 'sketch'
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user