mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix(仪表板): 分享链接 Ticket 过期后提示文案错误
This commit is contained in:
committed by
fit2cloud-chenyw
parent
658ef0da49
commit
9fec02e579
@@ -3702,7 +3702,15 @@ export default {
|
||||
'Unit: minutes, range: [0-1440], 0 means no time limit, starting from the first access using the ticket',
|
||||
arg_val_tips: 'Please enter parameter values',
|
||||
arg_format_tips:
|
||||
'Please use JSON format string, example single valued [argVal], multi valued [argVal1, argVal2]'
|
||||
'Please use JSON format string, example single valued [argVal], multi valued [argVal1, argVal2]',
|
||||
param_error: 'Ticket parameter error!',
|
||||
exp_error: 'Ticket has expired!',
|
||||
disable_error: 'Sharing feature has been disabled, please contact administrator!',
|
||||
pe_require_error: 'Expiration password is required, current link is invalid!',
|
||||
iframe_error:
|
||||
'Only embedded version and enterprise version support iframe embedding of public links!',
|
||||
link_error: 'Link does not exist!',
|
||||
link_exp_error: 'Link has expired!'
|
||||
},
|
||||
pblink: {
|
||||
key_pwd: 'Please enter the password to open the link',
|
||||
|
||||
@@ -3595,7 +3595,14 @@ export default {
|
||||
refresh: '刷新',
|
||||
time_tips: '單位: 分鐘,範圍: [0-1440],0代表無期限,自首次使用ticket訪問開始',
|
||||
arg_val_tips: '請輸入參數值',
|
||||
arg_format_tips: '請使用JSON格式字符串,示例單值[argVal],多值[argVal1, argVal2]'
|
||||
arg_format_tips: '請使用JSON格式字符串,示例單值[argVal],多值[argVal1, argVal2]',
|
||||
param_error: 'Ticket 參數錯誤!',
|
||||
exp_error: 'Ticket 已過期!',
|
||||
disable_error: '已禁用分享功能,請聯系管理員!',
|
||||
pe_require_error: '已設置有效期密碼必填,當前鏈接無效!',
|
||||
iframe_error: '僅嵌入式版和企業版支持iframe方式內嵌公共鏈接!',
|
||||
link_error: '鏈接不存在!',
|
||||
link_exp_error: '鏈接已過期!'
|
||||
},
|
||||
pblink: {
|
||||
key_pwd: '請輸入密碼開啟連結',
|
||||
|
||||
@@ -3601,7 +3601,14 @@ export default {
|
||||
refresh: '刷新',
|
||||
time_tips: '单位: 分钟,范围: [0-1440],0代表无期限,自首次使用ticket访问开始',
|
||||
arg_val_tips: '请输入参数值',
|
||||
arg_format_tips: '请使用JSON格式字符串,示例单值[argVal],多值[argVal1, argVal2]'
|
||||
arg_format_tips: '请使用JSON格式字符串,示例单值[argVal],多值[argVal1, argVal2]',
|
||||
param_error: 'Ticket 参数错误!',
|
||||
exp_error: 'Ticket 已过期!',
|
||||
disable_error: '已禁用分享功能,请联系管理员!',
|
||||
pe_require_error: '已设置有效期密码必填,当前链接无效!',
|
||||
iframe_error: '仅嵌入式版和企业版支持iframe方式内嵌公共链接!',
|
||||
link_error: '链接不存在!',
|
||||
link_exp_error: '链接已过期!'
|
||||
},
|
||||
pblink: {
|
||||
key_pwd: '请输入密码打开链接',
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
import EmptyBackground from '@/components/empty-background/src/EmptyBackground.vue'
|
||||
</script>
|
||||
<template>
|
||||
<EmptyBackground
|
||||
img-type="noneWhite"
|
||||
description="仅嵌入式版和企业版支持iframe方式内嵌公共链接"
|
||||
/>
|
||||
</template>
|
||||
@@ -1,6 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
import EmptyBackground from '@/components/empty-background/src/EmptyBackground.vue'
|
||||
</script>
|
||||
<template>
|
||||
<EmptyBackground img-type="noneWhite" description="Ticket参数错误" />
|
||||
</template>
|
||||
@@ -1,6 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
import EmptyBackground from '@/components/empty-background/src/EmptyBackground.vue'
|
||||
</script>
|
||||
<template>
|
||||
<EmptyBackground img-type="noneWhite" description="链接不存在" />
|
||||
</template>
|
||||
@@ -1,6 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
import EmptyBackground from '@/components/empty-background/src/EmptyBackground.vue'
|
||||
</script>
|
||||
<template>
|
||||
<EmptyBackground img-type="noneWhite" description="链接已过期" />
|
||||
</template>
|
||||
@@ -3,17 +3,22 @@
|
||||
class="link-container"
|
||||
v-loading="loading || requestStore.loadingMap[permissionStore.currentPath]"
|
||||
>
|
||||
<ErrorTemplate v-if="!loading && disableError" msg="已禁用分享功能,请联系管理员!" />
|
||||
<IframeError v-else-if="!loading && iframeError" />
|
||||
<ErrorTemplate v-if="!loading && disableError" :msg="t('link_ticket.disable_error')" />
|
||||
<ErrorTemplate v-else-if="!loading && iframeError" :msg="t('link_ticket.iframe_error')" />
|
||||
<ErrorTemplate
|
||||
v-else-if="!loading && peRequireError"
|
||||
msg="已设置有效期密码必填,当前链接无效!"
|
||||
:msg="t('link_ticket.pe_require_error')"
|
||||
/>
|
||||
<LinkError v-else-if="!loading && !linkExist" />
|
||||
<Exp v-else-if="!loading && linkExp" />
|
||||
<ErrorTemplate v-else-if="!loading && !linkExist" :msg="t('link_ticket.link_error')" />
|
||||
<ErrorTemplate v-else-if="!loading && linkExp" :msg="t('link_ticket.link_exp_error')" />
|
||||
<PwdTips v-else-if="!loading && !pwdValid" />
|
||||
<TicketError
|
||||
v-else-if="!loading && (!state.ticketValidVO.ticketValid || state.ticketValidVO.ticketExp)"
|
||||
<ErrorTemplate
|
||||
v-else-if="!loading && !state.ticketValidVO.ticketValid"
|
||||
:msg="t('link_ticket.param_error')"
|
||||
/>
|
||||
<ErrorTemplate
|
||||
v-else-if="!loading && state.ticketValidVO.ticketExp"
|
||||
:msg="t('link_ticket.exp_error')"
|
||||
/>
|
||||
<PreviewCanvas
|
||||
v-else
|
||||
@@ -30,13 +35,10 @@ import { useRequestStoreWithOut } from '@/store/modules/request'
|
||||
import { usePermissionStoreWithOut } from '@/store/modules/permission'
|
||||
import PreviewCanvas from '@/views/data-visualization/PreviewCanvas.vue'
|
||||
import { ProxyInfo, shareProxy } from './ShareProxy'
|
||||
import Exp from './exp.vue'
|
||||
import LinkError from './error.vue'
|
||||
import PwdTips from './pwd.vue'
|
||||
import IframeError from './IframeError.vue'
|
||||
import TicketError from './TicketError.vue'
|
||||
import ErrorTemplate from './ErrorTemplate.vue'
|
||||
import { useLinkStoreWithOut } from '@/store/modules/link'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
const linkStore = useLinkStoreWithOut()
|
||||
const requestStore = useRequestStoreWithOut()
|
||||
const permissionStore = usePermissionStoreWithOut()
|
||||
@@ -48,6 +50,7 @@ const linkExist = ref(false)
|
||||
const loading = ref(true)
|
||||
const linkExp = ref(false)
|
||||
const pwdValid = ref(false)
|
||||
const { t } = useI18n()
|
||||
const state = reactive({
|
||||
ticketValidVO: {
|
||||
ticketValid: false,
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
<template>
|
||||
<div class="mobile-link-container" v-loading="loading">
|
||||
<ErrorTemplate v-if="!loading && disableError" msg="已禁用分享功能,请联系管理员!" />
|
||||
<IframeError v-else-if="!loading && iframeError" />
|
||||
<ErrorTemplate v-if="!loading && disableError" :msg="t('link_ticket.disable_error')" />
|
||||
<ErrorTemplate v-else-if="!loading && iframeError" :msg="t('link_ticket.iframe_error')" />
|
||||
<ErrorTemplate
|
||||
v-else-if="!loading && peRequireError"
|
||||
msg="已设置有效期密码必填,当前链接无效!"
|
||||
:msg="t('link_ticket.pe_require_error')"
|
||||
/>
|
||||
<LinkError v-else-if="!loading && !linkExist" />
|
||||
<Exp v-else-if="!loading && linkExp" />
|
||||
<ErrorTemplate v-else-if="!loading && !linkExist" :msg="t('link_ticket.link_error')" />
|
||||
<ErrorTemplate v-else-if="!loading && linkExp" :msg="t('link_ticket.link_exp_error')" />
|
||||
<PwdTips v-else-if="!loading && !pwdValid" />
|
||||
<TicketError
|
||||
v-else-if="!loading && (!state.ticketValidVO.ticketValid || state.ticketValidVO.ticketExp)"
|
||||
<ErrorTemplate
|
||||
v-else-if="!loading && !state.ticketValidVO.ticketValid"
|
||||
:msg="t('link_ticket.param_error')"
|
||||
/>
|
||||
<ErrorTemplate
|
||||
v-else-if="!loading && state.ticketValidVO.ticketExp"
|
||||
:msg="t('link_ticket.exp_error')"
|
||||
/>
|
||||
<PreviewCanvas
|
||||
v-else
|
||||
@@ -25,11 +30,8 @@
|
||||
import { onMounted, nextTick, ref, reactive } from 'vue'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import PreviewCanvas from '@/views/data-visualization/PreviewCanvasMobile.vue'
|
||||
import TicketError from './TicketError.vue'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { ProxyInfo, shareProxy } from './ShareProxy'
|
||||
import Exp from './exp.vue'
|
||||
import LinkError from './error.vue'
|
||||
import IframeError from './IframeError.vue'
|
||||
import PwdTips from './pwd.vue'
|
||||
import ErrorTemplate from './ErrorTemplate.vue'
|
||||
const disableError = ref(true)
|
||||
@@ -42,6 +44,7 @@ const pwdValid = ref(false)
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const pcanvas = ref(null)
|
||||
const curType = ref('')
|
||||
const { t } = useI18n()
|
||||
const state = reactive({
|
||||
ticketValidVO: {
|
||||
ticketValid: false,
|
||||
|
||||
Reference in New Issue
Block a user