|
|
|
|
@ -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) { |
|
|
|
|
|