告警
This commit is contained in:
parent
6ea18e89b5
commit
48e5ab1bab
@ -46,7 +46,7 @@
|
|||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div class="tableOperate comfirmed" v-if="scope.row.confirmed">已确认</div>
|
<div class="tableOperate comfirmed" v-if="scope.row.confirmed">已确认</div>
|
||||||
<div class="tableOperate" v-else>
|
<div class="tableOperate" v-else>
|
||||||
<a @click="okSubmit(scope.row)">确认</a>
|
<a @click="open(scope.row)">确认</a>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -71,7 +71,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref, onMounted } from 'vue'
|
import { reactive, ref, onMounted } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
import { AlarmsFieldsEnums, AlarmsTableType, GetAlarmsTableParam } from './type'
|
import { AlarmsFieldsEnums, AlarmsTableType, GetAlarmsTableParam } from './type'
|
||||||
import { getAlarmListReq, eventComfirm } from '/@/api/backend/alarms/request'
|
import { getAlarmListReq, eventComfirm } from '/@/api/backend/alarms/request'
|
||||||
@ -207,6 +207,23 @@ const timestampToTime = (timestamp: any) => {
|
|||||||
return Y + M + D + h + m
|
return Y + M + D + h + m
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const open = (val: any) => {
|
||||||
|
ElMessageBox.confirm('是否确认?', '提示', {
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
okSubmit(val)
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'info',
|
||||||
|
message: '取消确认',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const okSubmit = (val: any) => {
|
const okSubmit = (val: any) => {
|
||||||
const reqData: any = [
|
const reqData: any = [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user