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'
|
||||||
|
@ -145,32 +145,31 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getStyle} from '@/components/canvas/utils/style'
|
import { getStyle } from '@/components/canvas/utils/style'
|
||||||
import {mapState} from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
import ComponentWrapper from './ComponentWrapper'
|
import ComponentWrapper from './ComponentWrapper'
|
||||||
import {changeStyleWithScale} from '@/components/canvas/utils/translate'
|
import { changeStyleWithScale } from '@/components/canvas/utils/translate'
|
||||||
import {uuid} from 'vue-uuid'
|
import { uuid } from 'vue-uuid'
|
||||||
import {deepCopy, imgUrlTrans} from '@/components/canvas/utils/utils'
|
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
|
||||||
import eventBus from '@/components/canvas/utils/eventBus'
|
import eventBus from '@/components/canvas/utils/eventBus'
|
||||||
import elementResizeDetectorMaker from 'element-resize-detector'
|
import elementResizeDetectorMaker from 'element-resize-detector'
|
||||||
import CanvasOptBar from '@/components/canvas/components/editor/CanvasOptBar'
|
import CanvasOptBar from '@/components/canvas/components/editor/CanvasOptBar'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
import {buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch} from '@/utils/conditionUtil'
|
import { buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch } from '@/utils/conditionUtil'
|
||||||
import {hasDataPermission} from '@/utils/permission'
|
import { hasDataPermission } from '@/utils/permission'
|
||||||
import {activeWatermark} from '@/components/canvas/tools/watermark'
|
import { activeWatermark } from '@/components/canvas/tools/watermark'
|
||||||
import {proxyUserLoginInfo, userLoginInfo} from '@/api/systemInfo/userLogin'
|
import { proxyUserLoginInfo, userLoginInfo } from '@/api/systemInfo/userLogin'
|
||||||
import html2canvas from 'html2canvasde'
|
import html2canvas from 'html2canvasde'
|
||||||
import {queryAll} from '@/api/panel/pdfTemplate'
|
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 },
|
||||||
model: {
|
model: {
|
||||||
prop: 'show',
|
prop: 'show',
|
||||||
event: 'change'
|
event: 'change'
|
||||||
@ -207,14 +206,14 @@ export default {
|
|||||||
componentData: {
|
componentData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: false,
|
required: false,
|
||||||
default: function () {
|
default: function() {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
canvasStyleData: {
|
canvasStyleData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: false,
|
required: false,
|
||||||
default: function () {
|
default: function() {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -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)
|
||||||
@ -649,7 +648,7 @@ export default {
|
|||||||
},
|
},
|
||||||
clearAllLinkage() {
|
clearAllLinkage() {
|
||||||
this.$store.commit('clearPanelLinkageInfo')
|
this.$store.commit('clearPanelLinkageInfo')
|
||||||
bus.$emit('clear_panel_linkage', {viewId: 'all'})
|
bus.$emit('clear_panel_linkage', { viewId: 'all' })
|
||||||
},
|
},
|
||||||
changeStyleWithScale,
|
changeStyleWithScale,
|
||||||
getStyle,
|
getStyle,
|
||||||
@ -714,7 +713,7 @@ export default {
|
|||||||
},
|
},
|
||||||
deselectCurComponent(e) {
|
deselectCurComponent(e) {
|
||||||
if (!this.isClickComponent) {
|
if (!this.isClickComponent) {
|
||||||
this.$store.commit('setCurComponent', {component: null, index: null})
|
this.$store.commit('setCurComponent', { component: null, index: null })
|
||||||
if (this.$refs?.['canvas-opt-bar']) {
|
if (this.$refs?.['canvas-opt-bar']) {
|
||||||
this.$refs['canvas-opt-bar'].setWidgetStatus()
|
this.$refs['canvas-opt-bar'].setWidgetStatus()
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
|
@ -77,7 +77,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
setPanelInfo() {
|
setPanelInfo() {
|
||||||
loadResource(this.resourceId,this.user).then(res => {
|
loadResource(this.resourceId, this.user).then(res => {
|
||||||
this.show = false
|
this.show = false
|
||||||
let loadingCount = 0
|
let loadingCount = 0
|
||||||
const watermarkInfo = {
|
const watermarkInfo = {
|
||||||
|
Loading…
Reference in New Issue
Block a user