fix:修改新增的问题
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
<script>
|
||||
import VueGridLayout from 'vue-grid-layout'
|
||||
import { fromRoute } from '@/components/common/js/constants'
|
||||
import { getGroupHeight, getLayoutPosition } from './chart/tools'
|
||||
import {getGroupHeight, getLayoutPosition, isGroup} from './chart/tools'
|
||||
import panelChart from '@/components/chart/panelChart'
|
||||
import bus from '@/libs/bus'
|
||||
import groupData from '@/components/chart/tempGroup'
|
||||
@@ -289,8 +289,10 @@ export default {
|
||||
this.firstInit = true
|
||||
this.gridLayoutLoading = true
|
||||
this.noData = !n || n.length < 1
|
||||
if (!this.isGroup) {
|
||||
const position = getLayoutPosition(n)
|
||||
this.$store.commit('setChartLastPosition', position)
|
||||
}
|
||||
const tempList = n.map(item => {
|
||||
let param = ''
|
||||
let height = ''
|
||||
|
||||
@@ -174,10 +174,14 @@ export default {
|
||||
if (!params.groupId) {
|
||||
params.groupId = 0
|
||||
}
|
||||
if (!params.x || !params.y) {
|
||||
if (!params.x && !params.y) {
|
||||
params.x = this.chartLastPosition.x + params.span > 12 ? 0 : this.chartLastPosition.x
|
||||
params.y = this.chartLastPosition.y + 12
|
||||
}
|
||||
if (!params.x && !params.y && params.groupId) { // group 内的坐标需要单独计算
|
||||
params.x = 0
|
||||
params.y = 999
|
||||
}
|
||||
delete params.panel
|
||||
if (params.type === 'table') {
|
||||
delete params.param.tags
|
||||
|
||||
Reference in New Issue
Block a user