mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 12:03:05 +08:00
Merge branch 'v1.5' of github.com:dataease/dataease into v1.5
This commit is contained in:
commit
917e6fe5e7
@ -1,7 +1,9 @@
|
||||
package io.dataease.controller;
|
||||
|
||||
import io.dataease.commons.exception.DEException;
|
||||
import io.dataease.commons.license.DefaultLicenseService;
|
||||
import io.dataease.commons.license.F2CLicenseResponse;
|
||||
import io.dataease.commons.utils.LogUtil;
|
||||
import io.dataease.commons.utils.ServletUtils;
|
||||
import io.dataease.service.panel.PanelLinkService;
|
||||
import org.springframework.stereotype.Controller;
|
||||
@ -11,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
@Controller
|
||||
@RequestMapping
|
||||
@ -45,13 +48,15 @@ public class IndexController {
|
||||
}
|
||||
|
||||
@GetMapping("/link/{index}")
|
||||
public String link(@PathVariable(value = "index", required = true) Long index) {
|
||||
public void link(@PathVariable(value = "index", required = true) Long index) {
|
||||
String url = panelLinkService.getUrlByIndex(index);
|
||||
HttpServletResponse response = ServletUtils.response();
|
||||
String param = url.substring(url.indexOf("?") + 1);
|
||||
Cookie cookie = new Cookie("link", param.split("=")[1]);
|
||||
response.addCookie(cookie);
|
||||
return url;
|
||||
try {
|
||||
response.sendRedirect(url);
|
||||
} catch (IOException e) {
|
||||
LogUtil.error(e.getMessage());
|
||||
DEException.throwException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -327,7 +327,7 @@ function init() {
|
||||
const vm = this
|
||||
recalcCellWidth.call(this)
|
||||
resetPositionBox.call(this)
|
||||
// initPosition(this)
|
||||
initPosition(this)
|
||||
let i = 0
|
||||
const timeid = setInterval(function() {
|
||||
if (i >= vm.yourList.length) {
|
||||
@ -471,13 +471,11 @@ function removeItem(index) {
|
||||
this.yourList.splice(index, 1, {})
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
// 矩阵设计初始化的时候 预占位,防止编辑仪表板页面,初始化和视图编辑返回时出现组件位置变化问题
|
||||
function initPosition(_this) {
|
||||
_this.yourList.forEach(item => {
|
||||
checkItemPosition.call(_this, item, {
|
||||
x: item.x,
|
||||
y: item.y
|
||||
})
|
||||
fillPositionBox.call(_this, item.y + item.sizey)
|
||||
addItemToPositionBox.call(_this, item)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,8 @@
|
||||
:expand-on-click-node="true"
|
||||
:filter-node-method="filterNode"
|
||||
@node-click="nodeClick"
|
||||
@node-expand="nodeExpand"
|
||||
@node-collapse="nodeCollapse"
|
||||
>
|
||||
<span v-if="data.modelInnerType ==='group'" slot-scope="{ node, data }" class="custom-tree-node father">
|
||||
<span style="display: flex;flex: 1;width: 0;">
|
||||
@ -673,14 +675,6 @@ export default {
|
||||
if (data.modelInnerType !== 'group') {
|
||||
this.$emit('switchComponent', { name: 'ChartEdit', param: data })
|
||||
}
|
||||
if (node.expanded) {
|
||||
this.expandedArray.push(data.id)
|
||||
} else {
|
||||
const index = this.expandedArray.indexOf(data.id)
|
||||
if (index > -1) {
|
||||
this.expandedArray.splice(index, 1)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
back() {
|
||||
|
@ -45,6 +45,8 @@
|
||||
highlight-current
|
||||
:expand-on-click-node="true"
|
||||
:filter-node-method="filterNode"
|
||||
@node-expand="nodeExpand"
|
||||
@node-collapse="nodeCollapse"
|
||||
@node-click="nodeClick"
|
||||
>
|
||||
<span v-if="data.modelInnerType === 'group'" slot-scope="{ node, data }" class="custom-tree-node father">
|
||||
@ -524,14 +526,6 @@ export default {
|
||||
if (data.modelInnerType !== 'group') {
|
||||
this.$emit('switchComponent', { name: 'ViewTable', param: data })
|
||||
}
|
||||
if (node.expanded) {
|
||||
this.expandedArray.push(data.id)
|
||||
} else {
|
||||
const index = this.expandedArray.indexOf(data.id)
|
||||
if (index > -1) {
|
||||
this.expandedArray.splice(index, 1)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
back() {
|
||||
|
@ -29,7 +29,6 @@
|
||||
<div class="block">
|
||||
<el-tree
|
||||
ref="default_panel_tree"
|
||||
:default-expanded-keys="expandedArray"
|
||||
:data="defaultData"
|
||||
node-key="id"
|
||||
:highlight-current="activeTree==='system'"
|
||||
@ -84,6 +83,8 @@
|
||||
:highlight-current="activeTree==='self'"
|
||||
:expand-on-click-node="true"
|
||||
:filter-node-method="filterNode"
|
||||
@node-expand="nodeExpand"
|
||||
@node-collapse="nodeCollapse"
|
||||
@node-click="nodeClick"
|
||||
>
|
||||
<span slot-scope="{ node, data }" class="custom-tree-node-list father">
|
||||
@ -677,13 +678,15 @@ export default {
|
||||
bus.$emit('set-panel-show-type', 0)
|
||||
})
|
||||
}
|
||||
if (node.expanded) {
|
||||
},
|
||||
nodeExpand(data) {
|
||||
if (data.id) {
|
||||
this.expandedArray.push(data.id)
|
||||
} else {
|
||||
const index = this.expandedArray.indexOf(data.id)
|
||||
if (index > -1) {
|
||||
this.expandedArray.splice(index, 1)
|
||||
}
|
||||
},
|
||||
nodeCollapse(data) {
|
||||
if (data.id) {
|
||||
this.expandedArray.splice(this.expandedArray.indexOf(data.id), 1)
|
||||
}
|
||||
},
|
||||
back() {
|
||||
|
Loading…
Reference in New Issue
Block a user