|
|
@@ -0,0 +1,67 @@
|
|
|
+<template>
|
|
|
+<a-card title="事件管理" >
|
|
|
+
|
|
|
+ <table-pro
|
|
|
+ :service="AiboxController.event"
|
|
|
+ :columns="columns"
|
|
|
+ >
|
|
|
+ <template #search >
|
|
|
+ <SelectTsx
|
|
|
+ :request="async () => (await SpaceController.devicePage({page: 1, pageSize: 10, deviceName: ''})).data"
|
|
|
+ :keys="{
|
|
|
+ name: 'deviceName',
|
|
|
+ value: 'deviceId',
|
|
|
+ key: 'deviceId'
|
|
|
+ }"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template #render="{column, record}" >
|
|
|
+ <template v-if="column.key === 'EventType'" >
|
|
|
+ {{ AiboxController.eventTypeMap.get(record.EventType)}}
|
|
|
+ </template>
|
|
|
+ <template v-if="column.key === 'saveTs'" >
|
|
|
+ {{dayjs(record.saveTs).format('YYYY/MM/DD HH:MM:ss')}}
|
|
|
+ </template>
|
|
|
+ <template v-if="column.key === 'action'" >
|
|
|
+ <a>查看详情</a>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </table-pro>
|
|
|
+</a-card>
|
|
|
+</template>
|
|
|
+<script lang='ts' setup >
|
|
|
+import { AiboxController, SpaceController } from '@/controller'
|
|
|
+import { SelectTsx } from '@/components/MicroComponents'
|
|
|
+import dayjs from 'dayjs'
|
|
|
+
|
|
|
+const columns = [
|
|
|
+ {
|
|
|
+ title: '事件ID',
|
|
|
+ dataIndex: 'DevID',
|
|
|
+ key: 'DevID'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '事件名称',
|
|
|
+ dataIndex: 'EventName',
|
|
|
+ key: 'EventName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '事件类型',
|
|
|
+ dataIndex: 'EventType',
|
|
|
+ key: 'EventType'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '保存时间',
|
|
|
+ dataIndex: 'saveTs',
|
|
|
+ key: 'saveTs'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ key: 'action'
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
+</script>
|
|
|
+<style lang='less' scoped >
|
|
|
+</style>
|