|
@@ -1,9 +1,6 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<div class="dark-el-input dark-el-button">
|
|
|
- <div style="position:absolute;text-align: right;width: 95%">
|
|
|
- <span v-loading="loading"><svg-icon slot="prefix" icon-class="alarm1" class="el-input__icon input-icon"/> {{this.alarm1}} <svg-icon slot="prefix" icon-class="alarm2" class="el-input__icon input-icon"/> {{this.alarm2}}</span>
|
|
|
- </div>
|
|
|
<el-form ref="queryForm" size="small" :inline="true" popper-class="cpp-popper">
|
|
|
<el-form-item label="时间">
|
|
|
<el-date-picker
|
|
@@ -44,15 +41,16 @@
|
|
|
<el-button type="primary" style="margin-left: 5px" icon="el-icon-search" @click="beforeQuery">导出
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- <br/>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" style="margin-left: 5px" @click="acknowledgeByStationCode">全部确认
|
|
|
+ <el-button type="primary" style="margin-left: 500px" @click="acknowledgeByStationCode">全部确认
|
|
|
+ <span v-loading="loading"><svg-icon slot="prefix" icon-class="alarm2"
|
|
|
+ class="el-input__icon input-icon"/> {{ this.alarmNum }}</span>
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
</div>
|
|
|
+
|
|
|
<div style="padding-top: 10px">
|
|
|
<vxe-table
|
|
|
ref="xTable"
|
|
@@ -75,8 +73,9 @@
|
|
|
<vxe-table-column field="voltage" title="操作人"></vxe-table-column>
|
|
|
<vxe-table-column field="" title="操作">
|
|
|
<template v-slot="{ row }">
|
|
|
- <svg-icon v-if="row.status !== 0" slot="prefix" icon-class="alarm1" class="el-input__icon input-icon"/>
|
|
|
- <svg-icon v-if="row.status === 0" slot="prefix" icon-class="alarm2" class="el-input__icon input-icon" @click="acknowledge(row)"/>
|
|
|
+ <svg-icon v-if="row.status !== 0" slot="prefix" h icon-class="alarm1" class="el-input__icon input-icon"/>
|
|
|
+ <svg-icon v-if="row.status === 0" slot="prefix" viewBox="0 0 5 5" icon-class="alarm2" class="el-input__icon input-icon"
|
|
|
+ @click="acknowledge(row)"/>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
</vxe-table>
|
|
@@ -131,8 +130,7 @@ export default {
|
|
|
searchForm: {},
|
|
|
tableData: [],
|
|
|
loading: false,
|
|
|
- alarm1: 0,
|
|
|
- alarm2: 0
|
|
|
+ alarmNum: 0
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -153,7 +151,7 @@ export default {
|
|
|
const item = this.stationList.find(item => item.value === cellValue)
|
|
|
return item ? item.label : ''
|
|
|
},
|
|
|
- alarmTypeFormat({cellValue, row, column}){
|
|
|
+ alarmTypeFormat({cellValue, row, column}) {
|
|
|
const item = this.alarmTypes.find(item => item.value === cellValue)
|
|
|
return item ? item.label : ''
|
|
|
},
|
|
@@ -176,20 +174,21 @@ export default {
|
|
|
"pageSize": this.pageSize,
|
|
|
"stationCode": this.stationCode,
|
|
|
"alarmType": this.alarmType,
|
|
|
- "startTime":startTime,
|
|
|
- "endTime":endTime
|
|
|
+ "startTime": startTime,
|
|
|
+ "endTime": endTime
|
|
|
}
|
|
|
|
|
|
this.$axios.get('/abnormalAlarm/getByTimeBetweenAndAlarmTypeAndStationCode', {params: queryParams}).then(response => {
|
|
|
this.tableData = response.data.records
|
|
|
this.total = response.data.total
|
|
|
|
|
|
- this.$axios.get('/abnormalAlarm/getCountByStatusAndStationCode', {params: {
|
|
|
+ this.$axios.get('/abnormalAlarm/getCountByStatusAndStationCode', {
|
|
|
+ params: {
|
|
|
"status": 0,
|
|
|
"stationCode": this.stationCode,
|
|
|
- }}).then(response => {
|
|
|
- this.alarm2 = response.data
|
|
|
- this.alarm1 = this.total - this.alarm2
|
|
|
+ }
|
|
|
+ }).then(response => {
|
|
|
+ this.alarmNum = response.data
|
|
|
this.loading = false
|
|
|
})
|
|
|
}).catch(() => {
|
|
@@ -205,15 +204,17 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- acknowledgeByStationCode(){
|
|
|
+ acknowledgeByStationCode() {
|
|
|
this.$confirm('是否确认执行当前场站全部确认操作?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- this.$axios.get('/abnormalAlarm/acknowledgeByStationCode', {params: {
|
|
|
+ this.$axios.get('/abnormalAlarm/acknowledgeByStationCode', {
|
|
|
+ params: {
|
|
|
"stationCode": this.stationCode,
|
|
|
- }}).then(response => {
|
|
|
+ }
|
|
|
+ }).then(response => {
|
|
|
this.beforeQuery()
|
|
|
this.$message.info("确认成功!")
|
|
|
|
|
@@ -222,15 +223,15 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- acknowledge(row){
|
|
|
- this.$confirm('是否确认执行【'+row.msg+'】确认操作?', '提示', {
|
|
|
+ acknowledge(row) {
|
|
|
+ this.$confirm('是否确认执行【' + row.msg + '】确认操作?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
row.status = 1
|
|
|
- this.$axios.post('/abnormalAlarm/save',row).then(response => {
|
|
|
- this.$message.info("【"+row.msg+"】 已确认!")
|
|
|
+ this.$axios.post('/abnormalAlarm/save', row).then(response => {
|
|
|
+ this.$message.info("【" + row.msg + "】 已确认!")
|
|
|
this.beforeQuery()
|
|
|
}).catch(() => {
|
|
|
this.loading = false
|