|
|
@ -242,72 +242,72 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row style="margin-bottom: 10px;"> |
|
|
|
<el-row style="margin-bottom: 10px;" v-show="tableVisiable"> |
|
|
|
<el-col> |
|
|
|
<h4>告警逻辑</h4> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col> |
|
|
|
<el-table ref="policyTable" v-loading="loading" :data="modelList" :row-key="getRowKey" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" reserve-selection="true" width="55" align="center" /> |
|
|
|
<el-table-column label="名称" align="center" prop="name"/> |
|
|
|
<el-table-column label="符号" align="center" prop="code" :width="120"/> |
|
|
|
<el-table-column label="运算符" align="center" prop="operator" :width="120"> |
|
|
|
<template #default="scope"> |
|
|
|
<dict-tag :options="operator_sign" :value="scope.row.operator"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="限值" align="center" prop="value"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item :class="{ 'is-error': isInvalid(scope.row.value,scope.row),'is-error-value': colorValue[scope.row.sort]}" label-width="0px"> |
|
|
|
<el-input v-model="scope.row.value" @change="handleValueChange(scope.row)"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="级别" align="center" prop="level" /> |
|
|
|
<el-table-column label="排序" align="center" prop="sort"/> |
|
|
|
<el-table-column label="告警方式" align="center" prop="methodIds"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item :class="{'is-error': isInvalid(scope.row.methodIds,scope.row)}" label-width="0px" > |
|
|
|
<el-select v-model="scope.row.methodIds" multiple @change="methodIdsChange" placeholder="请选择告警方式"> |
|
|
|
<el-option |
|
|
|
v-for="item in methodList" |
|
|
|
:key="item.id" |
|
|
|
:label="item.methodName" |
|
|
|
:value="item.id" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="状态值" align="center" prop="statusValue"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-select v-model="scope.row.statusValue" placeholder="请选择状态类型"> |
|
|
|
<el-option |
|
|
|
v-for="item in statusValueSelects" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="状态类型" align="center" prop="statusType"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-select v-model="scope.row.statusType" placeholder="请选择状态类型"> |
|
|
|
<el-option |
|
|
|
v-for="item in statusSelects" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-show="tableVisiable"> |
|
|
|
<el-col> |
|
|
|
<el-table ref="policyTable" v-loading="loading" :data="modelList" :row-key="getRowKey" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" reserve-selection="true" width="55" align="center" /> |
|
|
|
<el-table-column label="名称" align="center" prop="name"/> |
|
|
|
<el-table-column label="符号" align="center" prop="code" :width="120"/> |
|
|
|
<el-table-column label="运算符" align="center" prop="operator" :width="120"> |
|
|
|
<template #default="scope"> |
|
|
|
<dict-tag :options="operator_sign" :value="scope.row.operator"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="限值" align="center" prop="value"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item :class="{ 'is-error': isInvalid(scope.row.value,scope.row),'is-error-value': colorValue[scope.row.sort]}" label-width="0px"> |
|
|
|
<el-input v-model="scope.row.value" @change="handleValueChange(scope.row)"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="级别" align="center" prop="level" /> |
|
|
|
<el-table-column label="排序" align="center" prop="sort"/> |
|
|
|
<el-table-column label="告警方式" align="center" prop="methodIds"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-form-item :class="{'is-error': isInvalid(scope.row.methodIds,scope.row)}" label-width="0px" > |
|
|
|
<el-select v-model="scope.row.methodIds" multiple @change="methodIdsChange" placeholder="请选择告警方式"> |
|
|
|
<el-option |
|
|
|
v-for="item in methodList" |
|
|
|
:key="item.id" |
|
|
|
:label="item.methodName" |
|
|
|
:value="item.id" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="状态值" align="center" prop="statusValue"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-select v-model="scope.row.statusValue" placeholder="请选择状态类型"> |
|
|
|
<el-option |
|
|
|
v-for="item in statusValueSelects" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="状态类型" align="center" prop="statusType"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-select v-model="scope.row.statusType" placeholder="请选择状态类型"> |
|
|
|
<el-option |
|
|
|
v-for="item in statusSelects" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
<template #footer> |
|
|
@ -362,6 +362,7 @@ const paramTypeValue = ref(""); |
|
|
|
const logicCode = ref(""); |
|
|
|
const rowPolicySelected = ref([]); |
|
|
|
const colorValue = ref({}); |
|
|
|
const tableVisiable = ref(false); |
|
|
|
const enabledFlagTable = ref([ |
|
|
|
{label: '可用', value: 'true', elTagType: 'default', elTagClass: null}, |
|
|
|
{label: '不可用', value: 'false', elTagType: 'default', elTagClass: null} |
|
|
@ -552,7 +553,8 @@ function handlePolicy(row) { |
|
|
|
statusTypeVisiable.value=true; |
|
|
|
sortIdVisiable.value=false; |
|
|
|
methodIdsVisiable.value=true; |
|
|
|
policyEnabledVisiable.value=false; |
|
|
|
policyEnabledVisiable.value=true; |
|
|
|
tableVisiable.value=false; |
|
|
|
}else if(row.logicCode == 'B'){ |
|
|
|
getModelList(row); |
|
|
|
policyModelVisiable.value=true; |
|
|
@ -562,6 +564,7 @@ function handlePolicy(row) { |
|
|
|
sortIdVisiable.value=false; |
|
|
|
methodIdsVisiable.value=false; |
|
|
|
policyEnabledVisiable.value=true; |
|
|
|
tableVisiable.value=true; |
|
|
|
}else if(row.logicCode == 'C'){ |
|
|
|
ElMessageBox.alert('目前该告警逻辑没有实现', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|