fix: panelTabNew 增加默认值

This commit is contained in:
@changcode
2021-12-21 18:42:17 +08:00
parent ee445f1d96
commit 08a177c9ed

View File

@@ -155,6 +155,7 @@ import { fromRoute } from '@/components/common/js/constants'
import chartTempBox from '@/components/common/rightBox/chartTempBox' import chartTempBox from '@/components/common/rightBox/chartTempBox'
import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions' import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions'
import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin' import detailViewRightMixin from '@/components/common/mixin/detailViewRightMixin'
import { randomcolor } from '@/components/common/js/radomcolor/randomcolor'
export default { export default {
name: 'panelTabNew', name: 'panelTabNew',
mixins: [subDataListMixin, detailViewRightMixin], mixins: [subDataListMixin, detailViewRightMixin],
@@ -202,20 +203,29 @@ export default {
chart: {}, chart: {},
blankChart: { blankChart: {
id: '', id: '',
title: '', name: '',
type: 'line', type: 'line',
span: 12, span: 4,
height: '400', datasource: 'metrics',
height: 4,
unit: 2, unit: 2,
param: { param: {
url: '', stack: 0,
threshold: '' nullType: 'null',
legend: { placement: 'bottom', values: [], show: true },
enable: {
legend: true,
valueMapping: false,
thresholds: false
},
thresholdShow: true,
thresholds: [{ value: undefined, color: randomcolor() }]
}, },
elements: [{ expression: '', legend: '', type: 'expert', id: '' }], elements: [{ expression: '', legend: '', type: 'expert', id: '', name: 'A' }],
panel: '', panel: '',
sync: 0, sync: 0,
name: '', remark: '',
remark: '' groupId: ''
}, },
pageObj: { pageObj: {
pageNo: 1, pageNo: 1,