mirror of
https://github.com/dataease/dataease.git
synced 2026-05-20 02:58:10 +08:00
refactor(仪表板): 优化仪表板公共链接水印展示逻辑,用户信息取分享人
This commit is contained in:
@@ -8,6 +8,15 @@ export function userLoginInfo() {
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
userLoginInfo
|
||||
export function proxyUserLoginInfo(userId) {
|
||||
return request({
|
||||
url: '/systemInfo/proxyUserLoginInfo/' + userId,
|
||||
method: 'get',
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
userLoginInfo,
|
||||
proxyUserLoginInfo
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
:style="customStyle"
|
||||
@scroll="canvasScroll"
|
||||
>
|
||||
<canvas-opt-bar />
|
||||
<canvas-opt-bar/>
|
||||
<div
|
||||
:id="previewDomId"
|
||||
:ref="previewRefId"
|
||||
@@ -74,7 +74,7 @@ import bus from '@/utils/bus'
|
||||
import { buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch } from '@/utils/conditionUtil'
|
||||
import { hasDataPermission } from '@/utils/permission'
|
||||
import { activeWatermark } from '@/components/canvas/tools/watermark'
|
||||
import { userLoginInfo } from '@/api/systemInfo/userLogin'
|
||||
import { proxyUserLoginInfo, userLoginInfo } from '@/api/systemInfo/userLogin'
|
||||
|
||||
const erd = elementResizeDetectorMaker()
|
||||
|
||||
@@ -140,6 +140,10 @@ export default {
|
||||
type: String,
|
||||
require: false,
|
||||
default: 'canvas-main'
|
||||
},
|
||||
userId: {
|
||||
type: String,
|
||||
require: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -316,7 +320,8 @@ export default {
|
||||
methods: {
|
||||
initWatermark() {
|
||||
if (this.panelInfo.watermarkInfo) {
|
||||
userLoginInfo().then(res => {
|
||||
const method = this.userId ? proxyUserLoginInfo : userLoginInfo
|
||||
method(this.userId).then(res => {
|
||||
const userInfo = res.data
|
||||
activeWatermark(this.panelInfo.watermarkInfo.settingContent, userInfo, 'preview-main-canvas-main', this.canvasId, this.panelInfo.watermarkOpen)
|
||||
})
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
:component-data="mainCanvasComponentData"
|
||||
:canvas-style-data="canvasStyleData"
|
||||
:panel-info="panelInfo"
|
||||
:user-id="user"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user