【web】 预警规则,触发条件修改

dev
Wangxin 8 months ago
parent 20c7d638c2
commit d7ee5ad79f
  1. 11
      ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/rules/index.vue

@ -37,7 +37,7 @@
<el-table-column label="描述" align="center" key="description" prop="description" width="240" :show-overflow-tooltip="true" />
<el-table-column label="触发条件" align="center" key="alertTemplate" prop="alertTemplate" width="240" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<span v-if="scope.row.paramName">{{ findParamName(scope.row.tableName) }} {{ scope.row.operator }} {{ scope.row.compareValue }}</span>
<span v-if="scope.row.paramName">{{ findParamName(scope.row.paramName) }} {{ scope.row.operator }} {{ scope.row.compareValue }}</span>
<span v-else></span>
</template>
</el-table-column>
@ -293,8 +293,8 @@ export default {
},
methods: {
findParamName(tableName) {
const item = this.byTableData.find(item => item.tableName == tableName);
findParamName(paramName) {
const item = this.byTableData.find(item => item.paramName == paramName);
return item ? item.paramName : '';
},
/** 查询设备列表 */
@ -344,6 +344,7 @@ export default {
}
this.form.alertRule.tableName = this.byTableItem.tableName;
}
},
// byTableDataChange(val) {
// let findData = this.waming_rules.find(item => item.columnName == val)
@ -393,10 +394,10 @@ export default {
enable:0
}
formData.alertRuleConditionList = [{
paramName: form.paramName,
paramName: this.byTableItem.paramName,
compareValue: form.compareValue2?form.compareValue1+','+form.compareValue2:form.compareValue1,
operator: form.operator,
paramType: this.byTableItem.paramType
valueType: this.byTableItem.paramType
}]
if (this.form.id != undefined) {

Loading…
Cancel
Save