|
|
|
@ -2,26 +2,38 @@
|
|
|
|
|
<div class="mod-config">
|
|
|
|
|
<el-form :inline="true" :model="dataForm">
|
|
|
|
|
<el-form-item :label="$t('eq.groupname')">
|
|
|
|
|
<strong>{{ $route.params.groupName }}</strong></el-form-item
|
|
|
|
|
<strong>{{ $route.params.groupName || '--' }}</strong></el-form-item
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<el-form-item :label="$t('eq.groupcode')">
|
|
|
|
|
<strong>{{ $route.params.groupCode }}</strong>
|
|
|
|
|
<strong>{{ $route.params.groupCode || '--' }}</strong>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item>
|
|
|
|
|
<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
<br />
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<!-- <el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button> -->
|
|
|
|
|
<el-button v-if="$hasPermission('monitoring:equipmentgroupalarm:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
|
|
|
|
<!-- 报警编码/内容检索 -->
|
|
|
|
|
<el-input :placeholder="$t('alarm.code') + '/' + $t('alarm.content')" v-model="dataForm.key" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
|
|
|
|
|
<el-button v-if="$route.params.id && $hasPermission('monitoring:equipmentgroupalarm:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
|
|
|
|
<!-- <el-button v-if="$hasPermission('monitoring:equipmentgroupalarm:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">
|
|
|
|
|
批量删除
|
|
|
|
|
</el-button> -->
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
|
|
|
|
|
<base-table
|
|
|
|
|
:page="pageIndex"
|
|
|
|
|
:size="pageSize"
|
|
|
|
|
:data="dataList"
|
|
|
|
|
:table-head-configs="tableConfigs"
|
|
|
|
|
:max-height="calcMaxHeight(8)"
|
|
|
|
|
@operate-event="handleOperations"
|
|
|
|
|
@refreshDataList="getDataList"
|
|
|
|
|
/>
|
|
|
|
|
<el-pagination
|
|
|
|
|
@size-change="sizeChangeHandle"
|
|
|
|
|
@current-change="currentChangeHandle"
|
|
|
|
@ -64,6 +76,7 @@ const tableConfigs = [
|
|
|
|
|
{ prop: 'typeDictValue', name: i18n.t('alarm.type'), filter: dictFilter(dictEntries.alarmType.value) },
|
|
|
|
|
{ prop: 'gradeDictValue', name: i18n.t('alarm.level'), filter: dictFilter(dictEntries.alarmLevel.value) },
|
|
|
|
|
{ prop: 'alarmContent', name: i18n.t('alarm.content') },
|
|
|
|
|
{ prop: 'externalCode', name: i18n.t('alarm.externalCode') },
|
|
|
|
|
{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
@ -71,10 +84,11 @@ const addOrUpdateConfigs = {
|
|
|
|
|
type: 'dialog',
|
|
|
|
|
infoUrl: '/monitoring/equipmentGroupAlarm',
|
|
|
|
|
fields: [
|
|
|
|
|
{ name: 'code', label: i18n.t('alarm.code'), required: true },
|
|
|
|
|
{ name: 'code', label: i18n.t('alarm.code'), api: '/monitoring/equipmentGroupAlarm/getCode', required: true },
|
|
|
|
|
{ name: 'typeDictValue', label: i18n.t('alarm.type'), type: 'select', options: [] },
|
|
|
|
|
{ name: 'gradeDictValue', label: i18n.t('alarm.level'), type: 'select', options: [] },
|
|
|
|
|
{ name: 'alarmContent', label: i18n.t('alarm.content'), required: true }
|
|
|
|
|
{ name: 'alarmContent', label: i18n.t('alarm.content'), required: true },
|
|
|
|
|
{ name: 'externalCode', label: i18n.t('alarm.externalCode') }
|
|
|
|
|
],
|
|
|
|
|
operations: [
|
|
|
|
|
{ name: 'cancel', showAlways: true },
|
|
|
|
@ -129,14 +143,19 @@ export default {
|
|
|
|
|
// 获取数据列表
|
|
|
|
|
getDataList() {
|
|
|
|
|
this.dataListLoading = true
|
|
|
|
|
this.$http({
|
|
|
|
|
url: this.$http.adornUrl('/monitoring/equipmentGroupAlarm/page'),
|
|
|
|
|
method: 'get',
|
|
|
|
|
params: this.$http.adornParams({
|
|
|
|
|
|
|
|
|
|
const queryParams = {
|
|
|
|
|
page: this.pageIndex,
|
|
|
|
|
limit: this.pageSize,
|
|
|
|
|
groupId: this.$route.params.id
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.dataForm.key && this.dataForm.key.trim() !== '') queryParams.key = this.dataForm.key
|
|
|
|
|
|
|
|
|
|
this.$http({
|
|
|
|
|
url: this.$http.adornUrl('/monitoring/equipmentGroupAlarm/page'),
|
|
|
|
|
method: 'get',
|
|
|
|
|
params: this.$http.adornParams(queryParams)
|
|
|
|
|
}).then(({ data }) => {
|
|
|
|
|
if (data && data.code === 0) {
|
|
|
|
|
this.dataList = data.data.list
|
|
|
|
|