NEZ-3170 fix:params改为json字符串
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
<div class="info-box-left-top">
|
||||
<chart
|
||||
ref="chart"
|
||||
:globalVariables="globalVariables"
|
||||
v-if="chartInfo.alertRule && chartInfo.alertRule.type !== 3"
|
||||
:chart-data="chartData"
|
||||
:chart-info="chartInfo"
|
||||
@@ -67,8 +68,10 @@ import logsData from '@/components/chart/logsData'
|
||||
import lodash from 'lodash'
|
||||
import alertMessageInfoTab from '@/components/common/alert/alertMessageInfoTab'
|
||||
import alertMessageInfoTimeLine from '@/components/common/alert/alertMessageInfoTimeLine'
|
||||
import globalVariablesMixin from '@/components/common/mixin/globalVariables'
|
||||
export default {
|
||||
name: 'alertMessageInfo',
|
||||
mixins: [globalVariablesMixin],
|
||||
components: {
|
||||
alertMessageInfoTab,
|
||||
chart,
|
||||
@@ -126,6 +129,7 @@ export default {
|
||||
const step = bus.getStep(startTime, endTime)
|
||||
startTime = this.$stringTimeParseToUnix(startTime)
|
||||
endTime = this.$stringTimeParseToUnix(endTime)
|
||||
this.setGlobalVariablesValue([filter.start_time, filter.end_time])
|
||||
const elements = this.chartInfo.elements || []
|
||||
if (multipleTime.length) {
|
||||
const minusTime = (new Date(bus.formateTimeToTime(filter.start_time)).getTime() - new Date(bus.formateTimeToTime(multipleTime[0])).getTime())
|
||||
|
||||
@@ -710,7 +710,7 @@ export default {
|
||||
method: this.editAlertRule.method.join(','),
|
||||
type: this.editAlertRule.type,
|
||||
condition,
|
||||
param
|
||||
param: JSON.stringify(param)
|
||||
}
|
||||
if (this.editAlertRule.trbShot && this.editAlertRule.trbShot == '<div class="editor-core ql-container ql-snow"><div class="ql-editor"><p><br></p></div></div>') {
|
||||
this.editAlertRule.trbShot = ''
|
||||
@@ -958,6 +958,8 @@ export default {
|
||||
obj.param = {
|
||||
dataLink: []
|
||||
}
|
||||
} else {
|
||||
obj.param = JSON.parse(obj.param)
|
||||
}
|
||||
this.editAlertRule = this.$lodash.cloneDeep(obj)
|
||||
this.showPanel.id = this.editAlertRule.dashboardId
|
||||
|
||||
@@ -647,7 +647,7 @@ export default {
|
||||
|
||||
// 设置dataLink
|
||||
if (this.currentMsg.alertRule.param) {
|
||||
chartInfo.param.dataLink = this.currentMsg.alertRule.param.dataLink
|
||||
chartInfo.param.dataLink = JSON.parse(this.currentMsg.alertRule.param).dataLink
|
||||
}
|
||||
|
||||
chartInfo.id = this.currentMsg.id
|
||||
|
||||
Reference in New Issue
Block a user