|
|
@@ -46,12 +46,12 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button @click="handleQuery"
|
|
|
- ><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button
|
|
|
- >
|
|
|
- <el-button @click="resetQuery"
|
|
|
- ><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button
|
|
|
- >
|
|
|
+ <el-button @click="handleQuery">
|
|
|
+ <Icon icon="ep:search" class="mr-5px" /> 搜索
|
|
|
+ </el-button>
|
|
|
+ <el-button @click="resetQuery">
|
|
|
+ <Icon icon="ep:refresh" class="mr-5px" /> 重置
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
plain
|
|
|
@@ -60,13 +60,7 @@
|
|
|
>
|
|
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- plain
|
|
|
- @click="handleExport"
|
|
|
- :loading="exportLoading"
|
|
|
- v-hasPermi="['pms:iot-rd-daily-report:export']"
|
|
|
- >
|
|
|
+ <el-button type="success" plain @click="handleExport" :loading="exportLoading">
|
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
@@ -210,7 +204,6 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
-import download from '@/utils/download'
|
|
|
import { IotRdDailyReportApi, IotRdDailyReportVO } from '@/api/pms/iotrddailyreport'
|
|
|
import IotRdDailyReportForm from './IotRdDailyReportForm.vue'
|
|
|
import { DICT_TYPE, getDictLabel } from '@/utils/dict'
|
|
|
@@ -219,6 +212,7 @@ import DeptTree2 from '@/views/pms/iotrhdailyreport/DeptTree2.vue'
|
|
|
|
|
|
import dayjs from 'dayjs'
|
|
|
import quarterOfYear from 'dayjs/plugin/quarterOfYear'
|
|
|
+import download from '@/utils/download'
|
|
|
|
|
|
dayjs.extend(quarterOfYear)
|
|
|
|
|
|
@@ -369,7 +363,7 @@ const queryParams = reactive({
|
|
|
createTime: []
|
|
|
})
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
-const exportLoading = ref(false) // 导出的加载中
|
|
|
+// 导出的加载中
|
|
|
|
|
|
const rootDeptId = ref(163)
|
|
|
|
|
|
@@ -609,19 +603,18 @@ const handleDelete = async (id: number) => {
|
|
|
} catch {}
|
|
|
}
|
|
|
|
|
|
-/** 导出按钮操作 */
|
|
|
+const exportLoading = ref(false)
|
|
|
const handleExport = async () => {
|
|
|
- try {
|
|
|
- // 导出的二次确认
|
|
|
- await message.exportConfirm()
|
|
|
- // 发起导出
|
|
|
- exportLoading.value = true
|
|
|
- const data = await IotRdDailyReportApi.exportIotRdDailyReport(queryParams)
|
|
|
- download.excel(data, '瑞都日报.xls')
|
|
|
- } catch {
|
|
|
- } finally {
|
|
|
- exportLoading.value = false
|
|
|
- }
|
|
|
+ const res = await IotRdDailyReportApi.exportIotRdDailyReport({
|
|
|
+ createTime: queryParams.createTime,
|
|
|
+ contractName: queryParams.contractName,
|
|
|
+ taskName: queryParams.taskName,
|
|
|
+ // pageNo: queryParams.pageNo,
|
|
|
+ // pageSize: queryParams.pageSize,
|
|
|
+ deptId: queryParams.deptId
|
|
|
+ })
|
|
|
+
|
|
|
+ download.excel(res, '瑞都日报汇总.xlsx')
|
|
|
}
|
|
|
|
|
|
// 声明 ResizeObserver 实例
|