forked from github/dataease
fix(仪表板): 分享链接可以获取到分享者敏感信息 #13135
This commit is contained in:
parent
680c3419cd
commit
861bdceaa2
@ -32,6 +32,8 @@ export const queryFormApi = uid => request.get({ url: `/user/queryById/${uid}` }
|
||||
|
||||
export const personInfoApi = () => request.get({ url: `/user/personInfo` })
|
||||
|
||||
export const ipInfoApi = () => request.get({ url: `/user/ipInfo` })
|
||||
|
||||
export const roleCreateApi = data => request.post({ url: '/role/create', data })
|
||||
|
||||
export const roleEditApi = data => request.post({ url: '/role/edit', data })
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { ref } from 'vue'
|
||||
import { personInfoApi } from '@/api/user'
|
||||
import { ipInfoApi } from '@/api/user'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
|
||||
const { dvInfo } = storeToRefs(dvMainStore)
|
||||
@ -163,7 +163,7 @@ export function activeWatermarkCheckUser(domId, canvasId, scale = 1) {
|
||||
scale
|
||||
)
|
||||
} else {
|
||||
personInfoApi().then(res => {
|
||||
ipInfoApi().then(res => {
|
||||
userInfo.value = res.data
|
||||
if (userInfo.value && userInfo.value.model !== 'lose') {
|
||||
activeWatermark(
|
||||
|
@ -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>
|
||||
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 7d763d1a73750889a5a6abc6faf658aab3c48099
|
||||
Subproject commit 5f7b10e1f05d5819cffb0633b2b9b76d20d005d5
|
@ -51,6 +51,10 @@ public interface UserApi {
|
||||
@GetMapping("/personInfo")
|
||||
UserFormVO personInfo();
|
||||
|
||||
@Operation(summary = "查询客户端IP信息")
|
||||
@GetMapping("/ipInfo")
|
||||
CurIpVO ipInfo();
|
||||
|
||||
@Operation(summary = "创建")
|
||||
@DePermit("m:read")
|
||||
@PostMapping("/create")
|
||||
|
@ -0,0 +1,18 @@
|
||||
package io.dataease.api.permissions.user.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class CurIpVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -3025566841330382707L;
|
||||
|
||||
private String account;
|
||||
|
||||
private String name;
|
||||
|
||||
private String ip;
|
||||
}
|
Loading…
Reference in New Issue
Block a user