|
|
@ -34,41 +34,41 @@
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<!-- <el-col :span="1.5">-->
|
|
|
|
<el-button
|
|
|
|
<!-- <el-button-->
|
|
|
|
type="primary"
|
|
|
|
<!-- type="primary"-->
|
|
|
|
plain
|
|
|
|
<!-- plain-->
|
|
|
|
icon="el-icon-plus"
|
|
|
|
<!-- icon="el-icon-plus"-->
|
|
|
|
size="mini"
|
|
|
|
<!-- size="mini"-->
|
|
|
|
@click="handleAdd"
|
|
|
|
<!-- @click="handleAdd"-->
|
|
|
|
v-hasPermi="['ems/record:recordAlarmRule:add']"
|
|
|
|
<!-- v-hasPermi="['ems/record:recordAlarmRule:add']"-->
|
|
|
|
>新增
|
|
|
|
<!-- >新增-->
|
|
|
|
</el-button>
|
|
|
|
<!-- </el-button>-->
|
|
|
|
</el-col>
|
|
|
|
<!-- </el-col>-->
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<!-- <el-col :span="1.5">-->
|
|
|
|
<el-button
|
|
|
|
<!-- <el-button-->
|
|
|
|
type="success"
|
|
|
|
<!-- type="success"-->
|
|
|
|
plain
|
|
|
|
<!-- plain-->
|
|
|
|
icon="el-icon-edit"
|
|
|
|
<!-- icon="el-icon-edit"-->
|
|
|
|
size="mini"
|
|
|
|
<!-- size="mini"-->
|
|
|
|
:disabled="single"
|
|
|
|
<!-- :disabled="single"-->
|
|
|
|
@click="handleUpdate"
|
|
|
|
<!-- @click="handleUpdate"-->
|
|
|
|
v-hasPermi="['ems/record:recordAlarmRule:edit']"
|
|
|
|
<!-- v-hasPermi="['ems/record:recordAlarmRule:edit']"-->
|
|
|
|
>修改
|
|
|
|
<!-- >修改-->
|
|
|
|
</el-button>
|
|
|
|
<!-- </el-button>-->
|
|
|
|
</el-col>
|
|
|
|
<!-- </el-col>-->
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<!-- <el-col :span="1.5">-->
|
|
|
|
<el-button
|
|
|
|
<!-- <el-button-->
|
|
|
|
type="danger"
|
|
|
|
<!-- type="danger"-->
|
|
|
|
plain
|
|
|
|
<!-- plain-->
|
|
|
|
icon="el-icon-delete"
|
|
|
|
<!-- icon="el-icon-delete"-->
|
|
|
|
size="mini"
|
|
|
|
<!-- size="mini"-->
|
|
|
|
:disabled="multiple"
|
|
|
|
<!-- :disabled="multiple"-->
|
|
|
|
@click="handleDelete"
|
|
|
|
<!-- @click="handleDelete"-->
|
|
|
|
v-hasPermi="['ems/record:recordAlarmRule:remove']"
|
|
|
|
<!-- v-hasPermi="['ems/record:recordAlarmRule:remove']"-->
|
|
|
|
>删除
|
|
|
|
<!-- >删除-->
|
|
|
|
</el-button>
|
|
|
|
<!-- </el-button>-->
|
|
|
|
</el-col>
|
|
|
|
<!-- </el-col>-->
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
type="warning"
|
|
|
|
type="warning"
|
|
|
@ -102,7 +102,7 @@
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="触发阈值次数" align="center" prop="triggerNumber" v-if="columns[7].visible"/>
|
|
|
|
<el-table-column label="触发阈值次数" align="center" prop="triggerNumber" v-if="columns[7].visible"/>
|
|
|
|
<el-table-column label="时间范围(分)" align="center" prop="timeRange" v-if="columns[8].visible"/>
|
|
|
|
<el-table-column label="时间范围(分)" align="center" prop="timeRange" v-if="columns[8].visible"/>
|
|
|
|
<el-table-column label="设备离线时间(分)" align="center" prop="deviceOfflineTime" v-if="columns[9].visible"/>
|
|
|
|
<el-table-column label="设备离线时间(分钟)" align="center" prop="deviceOfflineTime" v-if="columns[9].visible"/>
|
|
|
|
<el-table-column label="通知用户" align="center" prop="notifyUser" v-if="columns[10].visible"/>
|
|
|
|
<el-table-column label="通知用户" align="center" prop="notifyUser" v-if="columns[10].visible"/>
|
|
|
|
<el-table-column label="备注" align="center" prop="cause" v-if="columns[11].visible"/>
|
|
|
|
<el-table-column label="备注" align="center" prop="cause" v-if="columns[11].visible"/>
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
|
|
|
@ -115,14 +115,14 @@
|
|
|
|
v-hasPermi="['ems/record:recordAlarmRule:edit']"
|
|
|
|
v-hasPermi="['ems/record:recordAlarmRule:edit']"
|
|
|
|
>修改
|
|
|
|
>修改
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button
|
|
|
|
<!-- <el-button-->
|
|
|
|
size="mini"
|
|
|
|
<!-- size="mini"-->
|
|
|
|
type="text"
|
|
|
|
<!-- type="text"-->
|
|
|
|
icon="el-icon-delete"
|
|
|
|
<!-- icon="el-icon-delete"-->
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
<!-- @click="handleDelete(scope.row)"-->
|
|
|
|
v-hasPermi="['ems/record:recordAlarmRule:remove']"
|
|
|
|
<!-- v-hasPermi="['ems/record:recordAlarmRule:remove']"-->
|
|
|
|
>删除
|
|
|
|
<!-- >删除-->
|
|
|
|
</el-button>
|
|
|
|
<!-- </el-button>-->
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
@ -137,30 +137,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改异常告警规则对话框 -->
|
|
|
|
<!-- 添加或修改异常告警规则对话框 -->
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
|
|
|
<el-form-item label="规则编号" prop="ruleId">
|
|
|
|
<el-form-item label="规则编号" prop="ruleId">
|
|
|
|
<el-input v-model="form.ruleId" placeholder="请输入规则编号"/>
|
|
|
|
<el-input v-model="form.ruleId" placeholder="请输入规则编号" disabled/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="规则名称" prop="ruleName">
|
|
|
|
<el-form-item label="规则名称" prop="ruleName">
|
|
|
|
<el-input v-model="form.ruleName" placeholder="请输入规则名称"/>
|
|
|
|
<el-input v-model="form.ruleName" placeholder="请输入规则名称"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="计量设备编号" prop="monitorId">
|
|
|
|
<!-- <el-form-item label="计量设备编号" prop="monitorId">-->
|
|
|
|
<el-input v-model="form.monitorId" placeholder="请输入计量设备编号"/>
|
|
|
|
<!-- <el-input v-model="form.monitorId" placeholder="请输入计量设备编号"/>-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="记录时间" prop="collectTime">
|
|
|
|
<!-- <el-form-item label="记录时间" prop="collectTime">-->
|
|
|
|
<el-date-picker clearable
|
|
|
|
<!-- <el-date-picker clearable-->
|
|
|
|
v-model="form.collectTime"
|
|
|
|
<!-- v-model="form.collectTime"-->
|
|
|
|
type="date"
|
|
|
|
<!-- type="date"-->
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
<!-- value-format="yyyy-MM-dd"-->
|
|
|
|
placeholder="请选择记录时间"
|
|
|
|
<!-- placeholder="请选择记录时间"-->
|
|
|
|
>
|
|
|
|
<!-- >-->
|
|
|
|
</el-date-picker>
|
|
|
|
<!-- </el-date-picker>-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="能源类型" prop="energyType">
|
|
|
|
<!-- <el-form-item label="能源类型" prop="energyType">-->
|
|
|
|
<el-input v-model="form.energyType" placeholder="请输入能源类型"/>
|
|
|
|
<!-- <el-input v-model="form.energyType" placeholder="请输入能源类型"/>-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="触发规则" prop="triggerRule">
|
|
|
|
<el-form-item label="触发规则" prop="triggerRule">
|
|
|
|
<el-radio-group v-model="form.triggerRule">
|
|
|
|
<el-radio-group v-model="form.triggerRule" disabled>
|
|
|
|
<el-radio
|
|
|
|
<el-radio
|
|
|
|
v-for="dict in dict.type.trigger_rule"
|
|
|
|
v-for="dict in dict.type.trigger_rule"
|
|
|
|
:key="dict.value"
|
|
|
|
:key="dict.value"
|
|
|
@ -169,18 +169,18 @@
|
|
|
|
</el-radio>
|
|
|
|
</el-radio>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="触发阈值次数" prop="triggerNumber">
|
|
|
|
<!-- <el-form-item label="触发阈值次数" prop="triggerNumber">-->
|
|
|
|
<el-input v-model="form.triggerNumber" placeholder="请输入触发阈值次数"/>
|
|
|
|
<!-- <el-input v-model="form.triggerNumber" placeholder="请输入触发阈值次数"/>-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="时间范围(分)" prop="timeRange">
|
|
|
|
<!-- <el-form-item label="时间范围(分)" prop="timeRange">-->
|
|
|
|
<el-input v-model="form.timeRange" placeholder="请输入时间范围(分)"/>
|
|
|
|
<!-- <el-input v-model="form.timeRange" placeholder="请输入时间范围(分)"/>-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="设备离线时间(分)" prop="deviceOfflineTime">
|
|
|
|
<el-form-item label="设备离线时间(分钟)" prop="deviceOfflineTime">
|
|
|
|
<el-input v-model="form.deviceOfflineTime" placeholder="请输入设备离线时间(分)"/>
|
|
|
|
<el-input-number v-model="form.deviceOfflineTime" placeholder="请输入设备离线时间(分钟)"/>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="通知用户" prop="notifyUser">
|
|
|
|
|
|
|
|
<el-input v-model="form.notifyUser" placeholder="请输入通知用户"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<!-- <el-form-item label="通知用户" prop="notifyUser">-->
|
|
|
|
|
|
|
|
<!-- <el-input v-model="form.notifyUser" placeholder="请输入通知用户"/>-->
|
|
|
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="备注" prop="cause">
|
|
|
|
<el-form-item label="备注" prop="cause">
|
|
|
|
<el-input v-model="form.cause" placeholder="请输入备注"/>
|
|
|
|
<el-input v-model="form.cause" placeholder="请输入备注"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -253,13 +253,13 @@ export default {
|
|
|
|
{ key: 0, label: `自增标识`, visible: false },
|
|
|
|
{ key: 0, label: `自增标识`, visible: false },
|
|
|
|
{ key: 1, label: `规则编号`, visible: true },
|
|
|
|
{ key: 1, label: `规则编号`, visible: true },
|
|
|
|
{ key: 2, label: `规则名称`, visible: true },
|
|
|
|
{ key: 2, label: `规则名称`, visible: true },
|
|
|
|
{ key: 3, label: `计量设备编号`, visible: true },
|
|
|
|
{ key: 3, label: `计量设备编号`, visible: false },
|
|
|
|
{ key: 4, label: `记录时间`, visible: true },
|
|
|
|
{ key: 4, label: `记录时间`, visible: false },
|
|
|
|
{ key: 5, label: `能源类型`, visible: true },
|
|
|
|
{ key: 5, label: `能源类型`, visible: false },
|
|
|
|
{ key: 6, label: `触发规则`, visible: true },
|
|
|
|
{ key: 6, label: `触发规则`, visible: true },
|
|
|
|
{ key: 7, label: `触发阈值次数`, visible: true },
|
|
|
|
{ key: 7, label: `触发阈值次数`, visible: false },
|
|
|
|
{ key: 8, label: `时间范围(分)`, visible: true },
|
|
|
|
{ key: 8, label: `时间范围(分)`, visible: false },
|
|
|
|
{ key: 9, label: `设备离线时间(分)`, visible: true },
|
|
|
|
{ key: 9, label: `设备离线时间(分钟)`, visible: true },
|
|
|
|
{ key: 10, label: `通知用户`, visible: false },
|
|
|
|
{ key: 10, label: `通知用户`, visible: false },
|
|
|
|
{ key: 11, label: `备注`, visible: true },
|
|
|
|
{ key: 11, label: `备注`, visible: true },
|
|
|
|
{ key: 12, label: `创建人`, visible: false },
|
|
|
|
{ key: 12, label: `创建人`, visible: false },
|
|
|
|