<template>
|
<el-divider content-position="left">相关事件 {{ total }}次</el-divider>
|
<el-table :data="list" style="width: 100%">
|
<el-table-column prop="id" label="id" />
|
<el-table-column prop="name" label="名称" />
|
<el-table-column prop="industry_type_str" label="任务类型" />
|
<el-table-column prop="ai_type_str" label="关联算法" />
|
<el-table-column prop="event_number" label="事件工单" />
|
<el-table-column prop="remark" label="备注" />
|
<el-table-column prop="area_code" label="地区代码" />
|
<el-table-column prop="begin_time" label="开始时间" />
|
<el-table-column prop="end_time" label="结束时间" />
|
<el-table-column prop="device_names" label="设备名称" />
|
<el-table-column prop="creator_name" label="创建者姓名" />
|
</el-table>
|
<el-pagination
|
background
|
:page-sizes="[10, 20, 30, 50]"
|
v-model:current-page="sizeParams.current"
|
v-model:page-size="sizeParams.size"
|
layout="total, sizes, prev, pager, next, jumper"
|
:total="total"
|
@change="pageChange"
|
/>
|
</template>
|
<script setup>
|
import { useStore } from 'vuex'
|
import { getDeviceJobList } from '@/api/home/machineNest'
|
|
const list = ref([])
|
const params = ref({
|
device_sn: null,
|
})
|
const sizeParams = ref({
|
current: 1,
|
size: 1,
|
})
|
const store = useStore()
|
const child_sn = computed(() => store.state.home.singleUavHome.child_sn)
|
const total = ref(0)
|
|
const getList = () => {
|
params.value.device_sn = child_sn.value
|
getDeviceJobList(params.value, sizeParams.value).then(res => {
|
const resData = res?.data?.data || {}
|
list.value = resData.records
|
total.value = resData.total
|
})
|
}
|
const pageChange = val => {
|
sizeParams.value.current = val
|
getList()
|
}
|
onMounted(() => {
|
getList()
|
})
|
</script>
|
<style scoped lang="scss"></style>
|