Alarm.vue
1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<template>
<BasicTable @register="registerTable" />
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { BasicTable, useTable } from '/@/components/Table';
import { alarmColumns, alarmSearchSchemas } from '../../config/detail.config';
import { getDeviceAlarm } from '/@/api/device/deviceManager';
export default defineComponent({
name: 'DeviceManagement',
components: {
BasicTable,
},
props: {
id: {
type: String,
required: true,
},
},
setup(props) {
const [registerTable] = useTable({
api: getDeviceAlarm(props.id, {
page: 0,
pageSize: 10,
}),
columns: alarmColumns,
formConfig: {
labelWidth: 120,
schemas: alarmSearchSchemas,
},
useSearchForm: true,
showTableSetting: true,
bordered: true,
showIndexColumn: false,
});
return {
registerTable,
};
},
});
</script>