|
@@ -1,6 +1,10 @@
|
|
|
<template>
|
|
<template>
|
|
|
<Dialog>
|
|
<Dialog>
|
|
|
- <ArtTable rowKey="id" :show-table-header="false" :loading="loading" :data="data" :columns="columns"> </ArtTable>
|
|
|
|
|
|
|
+ <ArtTable rowKey="id" :show-table-header="false" :loading="loading" :data="data" :columns="columns">
|
|
|
|
|
+ <template #operation="{ row }">
|
|
|
|
|
+ <ArtButtonTable type="delete" :row="row" @click="handleDelete(row)" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </ArtTable>
|
|
|
</Dialog>
|
|
</Dialog>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup lang="tsx">
|
|
<script setup lang="tsx">
|
|
@@ -25,11 +29,17 @@
|
|
|
{ prop: 'EqpmtID', label: '设备ID' },
|
|
{ prop: 'EqpmtID', label: '设备ID' },
|
|
|
{ prop: 'EqpmtName', label: '设备名称' },
|
|
{ prop: 'EqpmtName', label: '设备名称' },
|
|
|
{ prop: 'FaultID', label: '故障ID' },
|
|
{ prop: 'FaultID', label: '故障ID' },
|
|
|
- { prop: 'FaultTime', label: '故障触发时间', formatter: (row: FaultItem) => (row.FaultTime ?? 0) + '秒' }
|
|
|
|
|
|
|
+ { prop: 'FaultTime', label: '故障触发时间', formatter: (row: FaultItem) => (row.FaultTime ?? 0) + '秒' },
|
|
|
|
|
+ { prop: 'operation', label: '操作', width: 80, useSlot: true, fixed: 'right' }
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ const handleDelete = async (row: FaultItem) => {
|
|
|
|
|
+ await request.post('/serverctrl/seteqpmtfault', { EqpmtStrID: row.EqpmtID, EventType: 0, EventId: Number(row.FaultID) })
|
|
|
|
|
+ ElMessage.success(`故障[${row.FaultID}]已取消`)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const [Dialog, dialogApi] = useDialog({
|
|
const [Dialog, dialogApi] = useDialog({
|
|
|
title: '故障设备列表',
|
|
title: '故障设备列表',
|
|
|
width: '40%',
|
|
width: '40%',
|