mirror of
https://github.com/dataease/dataease.git
synced 2026-05-23 22:08:34 +08:00
fix(仪表板): 分享链接可以获取到分享者敏感信息 #13135
This commit is contained in:
@@ -16,9 +16,12 @@ import { Icon } from '@/components/icon-custom'
|
||||
import { download2AppTemplate, downloadCanvas2 } from '@/utils/imgUtils'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { ElMessage } from 'element-plus-secondary'
|
||||
import { personInfoApi } from '@/api/user'
|
||||
import AppExportForm from '@/components/de-app/AppExportForm.vue'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||
const userStore = useUserStoreWithOut()
|
||||
|
||||
const userName = computed(() => userStore.getName)
|
||||
const appExportFormRef = ref(null)
|
||||
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
@@ -35,8 +38,7 @@ const state = reactive({
|
||||
canvasStylePreview: null,
|
||||
canvasViewInfoPreview: null,
|
||||
dvInfo: null,
|
||||
curPreviewGap: 0,
|
||||
userLoginInfo: {}
|
||||
curPreviewGap: 0
|
||||
})
|
||||
|
||||
const { fullscreenFlag, canvasViewDataInfo } = storeToRefs(dvMainStore)
|
||||
@@ -141,7 +143,7 @@ const downLoadToAppPre = () => {
|
||||
appName: state.dvInfo.name,
|
||||
icon: null,
|
||||
version: '2.0',
|
||||
creator: state.userLoginInfo?.name,
|
||||
creator: userName.value,
|
||||
required: '2.9.0',
|
||||
description: null
|
||||
})
|
||||
@@ -189,18 +191,11 @@ const resourceNodeClick = data => {
|
||||
}
|
||||
|
||||
const previewShowFlag = computed(() => !!dvMainStore.dvInfo?.name)
|
||||
const findUserData = callback => {
|
||||
personInfoApi().then(rsp => {
|
||||
callback(rsp)
|
||||
})
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
if (showPosition.value === 'preview') {
|
||||
dvMainStore.canvasDataInit()
|
||||
}
|
||||
findUserData(res => {
|
||||
state.userLoginInfo = res.data
|
||||
})
|
||||
})
|
||||
const sideTreeStatus = ref(true)
|
||||
const changeSideTreeStatus = val => {
|
||||
|
||||
@@ -17,10 +17,14 @@ import { download2AppTemplate, downloadCanvas2 } from '@/utils/imgUtils'
|
||||
import MultiplexPreviewShow from '@/views/data-visualization/MultiplexPreviewShow.vue'
|
||||
import DvPreview from '@/views/data-visualization/DvPreview.vue'
|
||||
import AppExportForm from '@/components/de-app/AppExportForm.vue'
|
||||
import { personInfoApi } from '@/api/user'
|
||||
import { ElMessage } from 'element-plus-secondary'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
|
||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||
const userStore = useUserStoreWithOut()
|
||||
|
||||
const userName = computed(() => userStore.getName)
|
||||
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { dvInfo, canvasViewDataInfo } = storeToRefs(dvMainStore)
|
||||
const previewCanvasContainer = ref(null)
|
||||
@@ -136,7 +140,7 @@ const downLoadToAppPre = () => {
|
||||
appName: state.dvInfo.name,
|
||||
icon: null,
|
||||
version: '2.0',
|
||||
creator: state.userLoginInfo?.name,
|
||||
creator: userName.value,
|
||||
required: '2.9.0',
|
||||
description: null
|
||||
})
|
||||
@@ -170,8 +174,7 @@ const state = reactive({
|
||||
canvasStylePreview: null,
|
||||
canvasViewInfoPreview: null,
|
||||
dvInfo: null,
|
||||
curPreviewGap: 0,
|
||||
userLoginInfo: {}
|
||||
curPreviewGap: 0
|
||||
})
|
||||
|
||||
const sideTreeStatus = ref(true)
|
||||
@@ -195,12 +198,6 @@ const downLoadApp = appAttachInfo => {
|
||||
fileDownload('app', appAttachInfo)
|
||||
}
|
||||
|
||||
const findUserData = callback => {
|
||||
personInfoApi().then(rsp => {
|
||||
callback(rsp)
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
useEmitt({
|
||||
name: 'canvasDownload',
|
||||
@@ -218,9 +215,6 @@ onBeforeMount(() => {
|
||||
if (props.showPosition === 'preview') {
|
||||
dvMainStore.canvasDataInit()
|
||||
}
|
||||
findUserData(res => {
|
||||
state.userLoginInfo = res.data
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user