|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<template>
|
|
|
|
|
<BasicTable class="w-4/4 xl:w-5/5" @register="registerTable">
|
|
|
|
|
<template #toolbar>
|
|
|
|
|
<a-button type="primary">导出飞行器信息</a-button>
|
|
|
|
|
<a-button type="primary" @click="exportDevice">导出飞行器信息</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
|
|
<template v-if="column.key == 'workSpaceId'">
|
|
|
|
@ -38,7 +38,7 @@ import { h, watch, onMounted, ref, nextTick } from "vue"
|
|
|
|
|
import { EditOutlined } from '@ant-design/icons-vue'
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
|
|
|
|
import { columns, searchFormSchema } from './utils'
|
|
|
|
|
import { GetUavPageList, DeleteUav } from '@/api/demo/device'
|
|
|
|
|
import { GetUavPageList, DeleteUav, ExportDevice } from '@/api/demo/device'
|
|
|
|
|
import { getClient, clientSubscribe } from '@/utils/mqtt'
|
|
|
|
|
import dayjs from "dayjs";
|
|
|
|
|
import { message, Modal } from "ant-design-vue";
|
|
|
|
@ -131,6 +131,18 @@ const delDate = (record) => {
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
const exportDevice = () => {
|
|
|
|
|
ExportDevice().then(res => {
|
|
|
|
|
const elink = document.createElement('a');
|
|
|
|
|
elink.download = '飞行器信息.xlsx';
|
|
|
|
|
elink.style.display = 'none';
|
|
|
|
|
elink.href = URL.createObjectURL(res);
|
|
|
|
|
document.body.appendChild(elink);
|
|
|
|
|
elink.click();
|
|
|
|
|
URL.revokeObjectURL(elink.href);
|
|
|
|
|
document.body.removeChild(elink);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped></style>
|
|
|
|
|