NEZ-3142 fix:新建图表引用dashboard变量选择多个值后点击刷新按钮,group重复显示
This commit is contained in:
@@ -198,7 +198,6 @@ export default {
|
||||
const series = this.$lodash.cloneDeep(this.series)
|
||||
const dataArg = series.filter((seriesItem, seriesIndex) => !this.isGrey[seriesIndex])
|
||||
const option = this.renderYAxis(dataArg, chartInfo, 'legend')
|
||||
console.log(option)
|
||||
getChart(this.chartId) && getChart(this.chartId).setOption({
|
||||
yAxis: [
|
||||
...option.yAxis
|
||||
|
||||
@@ -594,7 +594,6 @@ export default {
|
||||
})
|
||||
this.onScroll(this.scrollTop)
|
||||
},
|
||||
|
||||
// group设置repeat 便利变量重复渲染图表
|
||||
repeatVariableFn () {
|
||||
// 防止group中的chartList执行
|
||||
@@ -742,7 +741,6 @@ export default {
|
||||
handler (newVal, oldVal) {
|
||||
// 比较变量 图表是否显示/隐藏
|
||||
this.compareVariables()
|
||||
|
||||
this.repeatVariableFn()
|
||||
}
|
||||
},
|
||||
@@ -785,7 +783,8 @@ export default {
|
||||
const position = getLayoutPosition(n)
|
||||
this.$store.commit('setChartLastPosition', position)
|
||||
}
|
||||
const tempList = n.map(item => {
|
||||
const cloneDataList = this.$lodash.cloneDeep(n)
|
||||
const tempList = cloneDataList.map(item => {
|
||||
let param = ''
|
||||
let height = item.height || ''
|
||||
if (this.isPhone && item.type !== 'group') {
|
||||
@@ -848,11 +847,10 @@ export default {
|
||||
})
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.copyDataList = JSON.parse(JSON.stringify(tempList))
|
||||
this.copyDataList = this.$lodash.cloneDeep(tempList)
|
||||
this.tempList = JSON.parse(JSON.stringify(this.copyDataList))
|
||||
// 比较变量 图表是否显示/隐藏
|
||||
this.compareVariables()
|
||||
|
||||
this.repeatVariableFn()
|
||||
setTimeout(() => {
|
||||
this.gridLayoutShow = true
|
||||
|
||||
@@ -6,7 +6,6 @@ export default {
|
||||
methods: {
|
||||
renderYAxis (chartDatas, chartInfo, type) {
|
||||
let chartData = lodash.cloneDeep(chartDatas)
|
||||
console.log(chartData)
|
||||
if (type === 'legend') {
|
||||
chartData.forEach(item => {
|
||||
item.values = item.data
|
||||
@@ -32,7 +31,6 @@ export default {
|
||||
// 左y轴
|
||||
const leftData = chartData.filter(item => item[0] && !item[0].yAxisIndex)
|
||||
const leftInfo = this.getMinMaxFromData(leftData, chartInfo.unit, chartInfo.param) //
|
||||
console.log(leftData, leftInfo)
|
||||
chartOption.yAxis[0].minInterval = chartDataFormat.Interval(leftInfo.maxValue, leftInfo.copies, leftInfo.unit.type, 'min')
|
||||
chartOption.yAxis[0].maxInterval = chartDataFormat.Interval(leftInfo.maxValue, leftInfo.copies, leftInfo.unit.type, 'max') * Math.ceil(this.series.length / 5)
|
||||
if (chartInfo.param.stack) {
|
||||
@@ -65,7 +63,6 @@ export default {
|
||||
const allRight = this.series.every(item => item.yAxisIndex == 1)
|
||||
chartOption.yAxis[1].splitLine.show = allRight
|
||||
const rightData = chartData.filter(item => item[0] && item[0].yAxisIndex)
|
||||
console.log(rightData, unit)
|
||||
const rightInfo = this.getMinMaxFromData(rightData, lodash.get(chartInfo, 'param.rightYAxis.unit', 2), lodash.get(chartInfo, 'param.rightYAxis', {}))//
|
||||
chartOption.yAxis[1].minInterval = chartDataFormat.Interval(rightInfo.maxValue, rightInfo.copies, rightInfo.unit.type, 'min')
|
||||
chartOption.yAxis[1].maxInterval = chartDataFormat.Interval(rightInfo.maxValue, rightInfo.copies, rightInfo.unit.type, 'max') * Math.ceil(this.series.length / 5)
|
||||
@@ -95,7 +92,6 @@ export default {
|
||||
delete chartOption.yAxis[1].max
|
||||
}
|
||||
}
|
||||
console.log(chartOption)
|
||||
return chartOption
|
||||
},
|
||||
getMinMaxFromData (originalDatas, chartUnit = 2, params) {
|
||||
|
||||
@@ -114,9 +114,6 @@ export default {
|
||||
const consoleBox = document.getElementById('ternimalContainer' + this.idIndex)
|
||||
const width = document.body.clientWidth - 10// 可视宽度
|
||||
const height = parseInt(consoleBox.offsetHeight) - 10
|
||||
console.log(width, height)
|
||||
console.log(this.term.cols)
|
||||
console.log(this.term.rows)
|
||||
const winStyle = {
|
||||
width: width,
|
||||
height: height,
|
||||
@@ -367,14 +364,12 @@ export default {
|
||||
// }
|
||||
},
|
||||
renderTerminalSetting () {
|
||||
console.log('renderTerminalSetting')
|
||||
this.showWatermark = this.terminalSetting.watermark
|
||||
this.wordSeparator = this.terminalSetting.wordSeparator
|
||||
this.term.options = {
|
||||
scrollback: this.terminalSetting.scrollbackLines,
|
||||
wordSeparator: this.terminalSetting.wordSeparator
|
||||
}
|
||||
console.log(this.term)
|
||||
},
|
||||
copySelection () {
|
||||
let str = this.term.getSelection()
|
||||
|
||||
@@ -160,7 +160,6 @@ export default {
|
||||
methods: {
|
||||
init () {
|
||||
this.loading = false
|
||||
console.log(this.alertLabelData)
|
||||
},
|
||||
getRemoteText (record) {
|
||||
return `${record.loginUser}@${record.host}:${record.port}`
|
||||
|
||||
@@ -221,7 +221,6 @@ export default {
|
||||
if (simpleTemp.indexOf(',') !== -1) {
|
||||
simpleTemp = simpleTemp.substr(0, simpleTemp.length - 1)
|
||||
}
|
||||
console.log(simpleTemp)
|
||||
tableData.tableDateAll = simpleTemp
|
||||
tableDates.push(tableData)
|
||||
}
|
||||
|
||||
@@ -81,7 +81,6 @@ export default {
|
||||
methods: {
|
||||
// 创建连接
|
||||
create () {
|
||||
console.log('create')
|
||||
const that = this
|
||||
if (this.terminalSocket) {
|
||||
this.terminalSocket.close()
|
||||
@@ -206,7 +205,6 @@ export default {
|
||||
},
|
||||
|
||||
consoleResize () {
|
||||
console.log('consoleResize')
|
||||
this.$nextTick(() => {
|
||||
this.termFitAddon.fit()
|
||||
})
|
||||
|
||||
@@ -383,8 +383,7 @@ export default {
|
||||
this.$set(this.$parent.showPanel, 'starred', this.starredList.some(item => item.id === this.showPanel.id) ? 1 : 0)
|
||||
}
|
||||
})
|
||||
},
|
||||
300, true),
|
||||
}, 300, true),
|
||||
// 删除收藏
|
||||
delStarred: bus.debounceFn(function (data) {
|
||||
this.$delete('/sys/user/starred?type=dashboard&tid=' + data.id).then(async response => {
|
||||
|
||||
@@ -459,7 +459,6 @@ export default {
|
||||
reader.onload = (evt) => { // 读取完文件之后会回来这里
|
||||
let fileString = evt.target.result // 读取文件内容
|
||||
fileString = JSON.parse(fileString)
|
||||
console.log(fileString)
|
||||
if (!fileString.topo) {
|
||||
this.$message.error(this.$t('IMPORT_FORMAT_ERROR', { 0: '' }))
|
||||
return
|
||||
@@ -468,7 +467,6 @@ export default {
|
||||
fileString.topo.pens.forEach(item => {
|
||||
item.imageId = ''
|
||||
})
|
||||
console.log(fileString)
|
||||
this.$post(this.importUrl, fileString).then(response => {
|
||||
if (response.code == 200 && response.msg == 'success') {
|
||||
this.$message.success(this.$t('overall.result.success'))
|
||||
|
||||
@@ -332,7 +332,6 @@ export default {
|
||||
this.renderTopology()
|
||||
},
|
||||
renderTopology () {
|
||||
console.log('render')
|
||||
getTopology(this.meta2dId).render()
|
||||
},
|
||||
penEnter (pen, e) { // 移入节点
|
||||
|
||||
@@ -145,7 +145,6 @@ export default {
|
||||
} else {
|
||||
this.$emit('clickProfile', false)
|
||||
}
|
||||
console.log(this.editProfile)
|
||||
localStorage.setItem('nz-userInfo', JSON.stringify(this.editProfile))
|
||||
bus.$emit('login')
|
||||
} else {
|
||||
|
||||
@@ -281,7 +281,6 @@ export default {
|
||||
changeInr () {
|
||||
if (!this.editRecordRule.inr) {
|
||||
setTimeout(() => {
|
||||
console.log(123123)
|
||||
this.editRecordRule.inr = undefined
|
||||
}, 100)
|
||||
}
|
||||
|
||||
@@ -187,7 +187,6 @@ export default {
|
||||
this.esc(false)
|
||||
},
|
||||
iconActive (subItem) {
|
||||
console.log(subItem, this.editSoftwareType.icon)
|
||||
if (this.editSoftwareType.icon === subItem.value) {
|
||||
this.editSoftwareType.icon = undefined
|
||||
this.$set(this.editSoftwareType, 'icon', '')
|
||||
|
||||
@@ -226,7 +226,6 @@ export default {
|
||||
if (timePickerLocked) {
|
||||
const timePickerRange = localStorage.getItem('nz-time-picker-range') ? JSON.parse(localStorage.getItem('nz-time-picker-range')) : {}
|
||||
this.$store.dispatch('dispatchTimePickerRange', timePickerRange)
|
||||
console.log('mounted', timePickerRange, this.timePickerLocked)
|
||||
}
|
||||
this.$store.dispatch('dispatchTimePickerLocked', timePickerLocked)
|
||||
},
|
||||
@@ -353,7 +352,6 @@ export default {
|
||||
localStorage.setItem('nz-time-picker-locked', JSON.stringify(this.timePickerLocked))
|
||||
this.$store.dispatch('dispatchTimePickerLocked', this.timePickerLocked)
|
||||
if (this.timePickerLocked) {
|
||||
console.log(this.searchTime, this.nowTimeType)
|
||||
this.$store.dispatch('dispatchTimePickerRange', {
|
||||
time: this.searchTime,
|
||||
nowTimeType: this.nowTimeType
|
||||
|
||||
@@ -155,7 +155,6 @@ export default {
|
||||
if (timePickerLocked) {
|
||||
const timePickerRange = localStorage.getItem('nz-time-picker-range') ? JSON.parse(localStorage.getItem('nz-time-picker-range')) : {}
|
||||
this.$store.dispatch('dispatchTimePickerRange', timePickerRange)
|
||||
console.log('mounted', timePickerRange, this.timePickerLocked)
|
||||
}
|
||||
this.$store.dispatch('dispatchTimePickerLocked', timePickerLocked)
|
||||
}
|
||||
|
||||
@@ -457,7 +457,6 @@ export default {
|
||||
if (!q.startAt) {
|
||||
this.searchTime[2] = 'all'
|
||||
}
|
||||
console.log(this.searchTime[2], this.searchTime[0], this.searchTime[1])
|
||||
switch (this.searchTime[2]) {
|
||||
case '5m' :
|
||||
this.defaultPick = 1
|
||||
@@ -864,7 +863,6 @@ export default {
|
||||
const path = this.fromRoute.alertMessage
|
||||
const routePathParams = this.$lodash.cloneDeep(param)
|
||||
delete routePathParams.statistics
|
||||
console.log(this.searchTime)
|
||||
routePathParams.body.startAt = this.searchTime[0] ? this.momentStrToTimestamp(this.searchTime[0]) : ''
|
||||
routePathParams.body.endAt = this.searchTime[1] ? this.momentStrToTimestamp(this.searchTime[1]) : ''
|
||||
routePathParams.body.timeType = this.searchTime[2]
|
||||
|
||||
@@ -3658,7 +3658,6 @@ export default {
|
||||
},
|
||||
setTimePickerRange () {
|
||||
this.$nextTick(() => {
|
||||
console.log(this.timePickerLocked, !this.timePickerRange.nowTimeType)
|
||||
if (!this.timePickerLocked || !this.timePickerRange.nowTimeType) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ const timePicker = {
|
||||
store.commit('setTimePickerLocked', flag)
|
||||
},
|
||||
dispatchTimePickerRange (store, range) {
|
||||
console.log('dispatchTimePickerRange', range)
|
||||
store.commit('setTimePickerRange', range)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user