|
|
@@ -6,6 +6,7 @@ import dayjs from 'dayjs'
|
|
|
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
|
|
import { TableColumnCtx } from 'element-plus/es/components/table/src/table-column/defaults'
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
+import download from '@/utils/download'
|
|
|
|
|
|
defineOptions({ name: 'DailyReport' })
|
|
|
|
|
|
@@ -549,6 +550,23 @@ watch(
|
|
|
const expandRowKeys = computed(() => {
|
|
|
return list.value.filter((item) => item.lastGroupIdFlag).map((item) => item.id.toString())
|
|
|
})
|
|
|
+
|
|
|
+const exportLoading = ref(false)
|
|
|
+
|
|
|
+const handleExport = () => {
|
|
|
+ exportLoading.value = true
|
|
|
+ if (tab.value === '井') {
|
|
|
+ IotRyDailyReportApi.exportIotRyDailyReportWell(query.value).then((data) => {
|
|
|
+ download.excel(data, '瑞鹰井日报统计.xls')
|
|
|
+ exportLoading.value = false
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ IotRyDailyReportApi.exportIotRyDailyReportTeam(query.value).then((data) => {
|
|
|
+ download.excel(data, '瑞鹰队伍日报统计.xls')
|
|
|
+ exportLoading.value = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
@@ -599,6 +617,9 @@ const expandRowKeys = computed(() => {
|
|
|
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
|
|
</el-button>
|
|
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" />重置</el-button>
|
|
|
+ <el-button plain type="success" @click="handleExport" :loading="exportLoading">
|
|
|
+ <Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|