forked from github/dataease
Merge pull request #6494 from dataease/pr@dev@perf_link_jump
perf: 公共链接跳转返回上一级
This commit is contained in:
commit
0bc5b415ff
@ -67,6 +67,10 @@ public class IndexController {
|
|||||||
if (StringUtils.isNotEmpty(attachParams)) {
|
if (StringUtils.isNotEmpty(attachParams)) {
|
||||||
url = url + "&attachParams=" + attachParams;
|
url = url + "&attachParams=" + attachParams;
|
||||||
}
|
}
|
||||||
|
String fromLink = request.getParameter("fromLink");
|
||||||
|
if (StringUtils.isNotEmpty(fromLink)) {
|
||||||
|
url = url + "&fromLink=" + fromLink;
|
||||||
|
}
|
||||||
response.sendRedirect(url);
|
response.sendRedirect(url);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LogUtil.error(e.getMessage());
|
LogUtil.error(e.getMessage());
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
const user = getQueryVariable('user')
|
const user = getQueryVariable('user')
|
||||||
const terminal = getQueryVariable('terminal')
|
const terminal = getQueryVariable('terminal')
|
||||||
const attachParams = getQueryVariable('attachParams')
|
const attachParams = getQueryVariable('attachParams')
|
||||||
|
const fromLink = getQueryVariable('fromLink')
|
||||||
const baseUrl = window.location.pathname.replace('link.html', '')
|
const baseUrl = window.location.pathname.replace('link.html', '')
|
||||||
let url = baseUrl + "#/delink?link=" + encodeURIComponent(link)
|
let url = baseUrl + "#/delink?link=" + encodeURIComponent(link)
|
||||||
if (terminal) {
|
if (terminal) {
|
||||||
@ -44,6 +45,9 @@
|
|||||||
if (attachParams) {
|
if (attachParams) {
|
||||||
url += '&attachParams=' + encodeURIComponent(attachParams)
|
url += '&attachParams=' + encodeURIComponent(attachParams)
|
||||||
}
|
}
|
||||||
|
if (fromLink) {
|
||||||
|
url += '&fromLink=' + fromLink
|
||||||
|
}
|
||||||
window.location.href = url
|
window.location.href = url
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
>
|
>
|
||||||
<el-button-group size="mini">
|
<el-button-group size="mini">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!isNewBlank"
|
v-if="fromLink"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="button"
|
type="button"
|
||||||
@click="back2Last"
|
@click="back2Last"
|
||||||
@ -89,8 +89,8 @@ export default {
|
|||||||
isPublicLink() {
|
isPublicLink() {
|
||||||
return this.$router.currentRoute.path === '/delink'
|
return this.$router.currentRoute.path === '/delink'
|
||||||
},
|
},
|
||||||
isNewBlank() {
|
fromLink() {
|
||||||
return window.history.length === 1
|
return this.$route.query.fromLink === 'true'
|
||||||
},
|
},
|
||||||
containerClass() {
|
containerClass() {
|
||||||
return this.isPublicLink ? 'trans-pc' : 'bar-main'
|
return this.isPublicLink ? 'trans-pc' : 'bar-main'
|
||||||
|
@ -164,10 +164,9 @@ import {queryAll} from '@/api/panel/pdfTemplate'
|
|||||||
import PDFPreExport from '@/views/panel/export/PDFPreExport'
|
import PDFPreExport from '@/views/panel/export/PDFPreExport'
|
||||||
import { listenGlobalKeyDownPreview } from '@/components/canvas/utils/shortcutKey'
|
import { listenGlobalKeyDownPreview } from '@/components/canvas/utils/shortcutKey'
|
||||||
import UserViewDialog from '@/components/canvas/customComponent/UserViewDialog'
|
import UserViewDialog from '@/components/canvas/customComponent/UserViewDialog'
|
||||||
import {hexColorToRGBA} from "@/views/chart/chart/util";
|
import { hexColorToRGBA } from '@/views/chart/chart/util'
|
||||||
import { isMobile } from '@/utils/index'
|
import { isMobile } from '@/utils/index'
|
||||||
|
|
||||||
|
|
||||||
const erd = elementResizeDetectorMaker()
|
const erd = elementResizeDetectorMaker()
|
||||||
export default {
|
export default {
|
||||||
components: { UserViewDialog, ComponentWrapper, CanvasOptBar, PDFPreExport },
|
components: { UserViewDialog, ComponentWrapper, CanvasOptBar, PDFPreExport },
|
||||||
@ -463,7 +462,7 @@ export default {
|
|||||||
return this.$refs['viewWrapperChild']
|
return this.$refs['viewWrapperChild']
|
||||||
},
|
},
|
||||||
getAllWrapperChildRefs() {
|
getAllWrapperChildRefs() {
|
||||||
let allChildRefs = []
|
const allChildRefs = []
|
||||||
const currentChildRefs = this.getWrapperChildRefs()
|
const currentChildRefs = this.getWrapperChildRefs()
|
||||||
if (currentChildRefs && currentChildRefs.length > 0) {
|
if (currentChildRefs && currentChildRefs.length > 0) {
|
||||||
allChildRefs.push.apply(allChildRefs, currentChildRefs)
|
allChildRefs.push.apply(allChildRefs, currentChildRefs)
|
||||||
|
@ -1038,7 +1038,7 @@ export default {
|
|||||||
if (this.publicLinkStatus) {
|
if (this.publicLinkStatus) {
|
||||||
// 判断是否有公共链接ID
|
// 判断是否有公共链接ID
|
||||||
if (jumpInfo.publicJumpId) {
|
if (jumpInfo.publicJumpId) {
|
||||||
const url = '/link/' + jumpInfo.publicJumpId
|
const url = '/link/' + jumpInfo.publicJumpId + '?fromLink=true'
|
||||||
const currentUrl = window.location.href
|
const currentUrl = window.location.href
|
||||||
localStorage.setItem('beforeJumpUrl', currentUrl)
|
localStorage.setItem('beforeJumpUrl', currentUrl)
|
||||||
this.windowsJump(url, jumpInfo.jumpType)
|
this.windowsJump(url, jumpInfo.jumpType)
|
||||||
|
Loading…
Reference in New Issue
Block a user