This commit is contained in:
geting 2024-11-05 17:26:57 +08:00
parent 6ea18e89b5
commit 48e5ab1bab

View File

@ -46,7 +46,7 @@
<template #default="scope">
<div class="tableOperate comfirmed" v-if="scope.row.confirmed">已确认</div>
<div class="tableOperate" v-else>
<a @click="okSubmit(scope.row)">确认</a>
<a @click="open(scope.row)">确认</a>
</div>
</template>
</el-table-column>
@ -71,7 +71,7 @@
<script setup lang="ts">
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 { AlarmsFieldsEnums, AlarmsTableType, GetAlarmsTableParam } from './type'
import { getAlarmListReq, eventComfirm } from '/@/api/backend/alarms/request'
@ -207,6 +207,23 @@ const timestampToTime = (timestamp: any) => {
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 reqData: any = [
{