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)) {
|
||||
url = url + "&attachParams=" + attachParams;
|
||||
}
|
||||
String fromLink = request.getParameter("fromLink");
|
||||
if (StringUtils.isNotEmpty(fromLink)) {
|
||||
url = url + "&fromLink=" + fromLink;
|
||||
}
|
||||
response.sendRedirect(url);
|
||||
} catch (IOException e) {
|
||||
LogUtil.error(e.getMessage());
|
||||
|
@ -33,6 +33,7 @@
|
||||
const user = getQueryVariable('user')
|
||||
const terminal = getQueryVariable('terminal')
|
||||
const attachParams = getQueryVariable('attachParams')
|
||||
const fromLink = getQueryVariable('fromLink')
|
||||
const baseUrl = window.location.pathname.replace('link.html', '')
|
||||
let url = baseUrl + "#/delink?link=" + encodeURIComponent(link)
|
||||
if (terminal) {
|
||||
@ -44,6 +45,9 @@
|
||||
if (attachParams) {
|
||||
url += '&attachParams=' + encodeURIComponent(attachParams)
|
||||
}
|
||||
if (fromLink) {
|
||||
url += '&fromLink=' + fromLink
|
||||
}
|
||||
window.location.href = url
|
||||
</script>
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
>
|
||||
<el-button-group size="mini">
|
||||
<el-button
|
||||
v-if="!isNewBlank"
|
||||
v-if="fromLink"
|
||||
size="mini"
|
||||
type="button"
|
||||
@click="back2Last"
|
||||
@ -89,8 +89,8 @@ export default {
|
||||
isPublicLink() {
|
||||
return this.$router.currentRoute.path === '/delink'
|
||||
},
|
||||
isNewBlank() {
|
||||
return window.history.length === 1
|
||||
fromLink() {
|
||||
return this.$route.query.fromLink === 'true'
|
||||
},
|
||||
containerClass() {
|
||||
return this.isPublicLink ? 'trans-pc' : 'bar-main'
|
||||
|
@ -145,32 +145,31 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getStyle} from '@/components/canvas/utils/style'
|
||||
import {mapState} from 'vuex'
|
||||
import { getStyle } from '@/components/canvas/utils/style'
|
||||
import { mapState } from 'vuex'
|
||||
import ComponentWrapper from './ComponentWrapper'
|
||||
import {changeStyleWithScale} from '@/components/canvas/utils/translate'
|
||||
import {uuid} from 'vue-uuid'
|
||||
import {deepCopy, imgUrlTrans} from '@/components/canvas/utils/utils'
|
||||
import { changeStyleWithScale } from '@/components/canvas/utils/translate'
|
||||
import { uuid } from 'vue-uuid'
|
||||
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
|
||||
import eventBus from '@/components/canvas/utils/eventBus'
|
||||
import elementResizeDetectorMaker from 'element-resize-detector'
|
||||
import CanvasOptBar from '@/components/canvas/components/editor/CanvasOptBar'
|
||||
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 {proxyUserLoginInfo, userLoginInfo} from '@/api/systemInfo/userLogin'
|
||||
import { buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch } from '@/utils/conditionUtil'
|
||||
import { hasDataPermission } from '@/utils/permission'
|
||||
import { activeWatermark } from '@/components/canvas/tools/watermark'
|
||||
import { proxyUserLoginInfo, userLoginInfo } from '@/api/systemInfo/userLogin'
|
||||
import html2canvas from 'html2canvasde'
|
||||
import {queryAll} from '@/api/panel/pdfTemplate'
|
||||
import { queryAll } from '@/api/panel/pdfTemplate'
|
||||
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 {hexColorToRGBA} from "@/views/chart/chart/util";
|
||||
import {isMobile} from '@/utils/index'
|
||||
|
||||
import { hexColorToRGBA } from '@/views/chart/chart/util'
|
||||
import { isMobile } from '@/utils/index'
|
||||
|
||||
const erd = elementResizeDetectorMaker()
|
||||
export default {
|
||||
components: {UserViewDialog, ComponentWrapper, CanvasOptBar, PDFPreExport},
|
||||
components: { UserViewDialog, ComponentWrapper, CanvasOptBar, PDFPreExport },
|
||||
model: {
|
||||
prop: 'show',
|
||||
event: 'change'
|
||||
@ -207,14 +206,14 @@ export default {
|
||||
componentData: {
|
||||
type: Array,
|
||||
required: false,
|
||||
default: function () {
|
||||
default: function() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
canvasStyleData: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: function () {
|
||||
default: function() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
@ -463,7 +462,7 @@ export default {
|
||||
return this.$refs['viewWrapperChild']
|
||||
},
|
||||
getAllWrapperChildRefs() {
|
||||
let allChildRefs = []
|
||||
const allChildRefs = []
|
||||
const currentChildRefs = this.getWrapperChildRefs()
|
||||
if (currentChildRefs && currentChildRefs.length > 0) {
|
||||
allChildRefs.push.apply(allChildRefs, currentChildRefs)
|
||||
@ -649,7 +648,7 @@ export default {
|
||||
},
|
||||
clearAllLinkage() {
|
||||
this.$store.commit('clearPanelLinkageInfo')
|
||||
bus.$emit('clear_panel_linkage', {viewId: 'all'})
|
||||
bus.$emit('clear_panel_linkage', { viewId: 'all' })
|
||||
},
|
||||
changeStyleWithScale,
|
||||
getStyle,
|
||||
@ -714,7 +713,7 @@ export default {
|
||||
},
|
||||
deselectCurComponent(e) {
|
||||
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']) {
|
||||
this.$refs['canvas-opt-bar'].setWidgetStatus()
|
||||
}
|
||||
|
@ -1038,7 +1038,7 @@ export default {
|
||||
if (this.publicLinkStatus) {
|
||||
// 判断是否有公共链接ID
|
||||
if (jumpInfo.publicJumpId) {
|
||||
const url = '/link/' + jumpInfo.publicJumpId
|
||||
const url = '/link/' + jumpInfo.publicJumpId + '?fromLink=true'
|
||||
const currentUrl = window.location.href
|
||||
localStorage.setItem('beforeJumpUrl', currentUrl)
|
||||
this.windowsJump(url, jumpInfo.jumpType)
|
||||
|
@ -77,7 +77,7 @@ export default {
|
||||
})
|
||||
},
|
||||
setPanelInfo() {
|
||||
loadResource(this.resourceId,this.user).then(res => {
|
||||
loadResource(this.resourceId, this.user).then(res => {
|
||||
this.show = false
|
||||
let loadingCount = 0
|
||||
const watermarkInfo = {
|
||||
|
Loading…
Reference in New Issue
Block a user