|
@@ -63,21 +63,15 @@
|
|
|
<el-button @click="resetQuery"
|
|
<el-button @click="resetQuery"
|
|
|
><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button
|
|
><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button
|
|
|
>
|
|
>
|
|
|
- <el-button
|
|
|
|
|
|
|
+ <!-- <el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
plain
|
|
plain
|
|
|
@click="openForm('create')"
|
|
@click="openForm('create')"
|
|
|
v-hasPermi="['pms:iot-ry-daily-report:create']"
|
|
v-hasPermi="['pms:iot-ry-daily-report:create']"
|
|
|
>
|
|
>
|
|
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
|
- </el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="success"
|
|
|
|
|
- plain
|
|
|
|
|
- @click="handleExport"
|
|
|
|
|
- :loading="exportLoading"
|
|
|
|
|
- v-hasPermi="['pms:iot-ry-daily-report:export']"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ </el-button> -->
|
|
|
|
|
+ <el-button type="success" plain @click="handleExport" :loading="exportLoading">
|
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -441,7 +435,6 @@
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { dateFormatter, dateFormatter2, rangeShortcuts } from '@/utils/formatTime'
|
|
import { dateFormatter, dateFormatter2, rangeShortcuts } from '@/utils/formatTime'
|
|
|
-import download from '@/utils/download'
|
|
|
|
|
import { IotRyDailyReportApi, IotRyDailyReportVO } from '@/api/pms/iotrydailyreport'
|
|
import { IotRyDailyReportApi, IotRyDailyReportVO } from '@/api/pms/iotrydailyreport'
|
|
|
import IotRyDailyReportForm from './IotRyDailyReportForm.vue'
|
|
import IotRyDailyReportForm from './IotRyDailyReportForm.vue'
|
|
|
import { DICT_TYPE } from '@/utils/dict'
|
|
import { DICT_TYPE } from '@/utils/dict'
|
|
@@ -452,6 +445,7 @@ import quarterOfYear from 'dayjs/plugin/quarterOfYear'
|
|
|
import { useDebounceFn } from '@vueuse/core'
|
|
import { useDebounceFn } from '@vueuse/core'
|
|
|
|
|
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
|
|
+import download from '@/utils/download'
|
|
|
|
|
|
|
|
dayjs.extend(quarterOfYear)
|
|
dayjs.extend(quarterOfYear)
|
|
|
|
|
|
|
@@ -513,7 +507,6 @@ let queryParams = reactive({
|
|
|
nonProductFlag: 'N'
|
|
nonProductFlag: 'N'
|
|
|
})
|
|
})
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
-const exportLoading = ref(false) // 导出的加载中
|
|
|
|
|
|
|
|
|
|
// 表格引用
|
|
// 表格引用
|
|
|
const tableRef = ref()
|
|
const tableRef = ref()
|
|
@@ -909,21 +902,20 @@ const handleDeptNodeClick = async (row) => {
|
|
|
await getList()
|
|
await getList()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/** 导出按钮操作 */
|
|
|
|
|
|
|
+const exportLoading = ref(false)
|
|
|
const handleExport = async () => {
|
|
const handleExport = async () => {
|
|
|
- try {
|
|
|
|
|
- // 导出的二次确认
|
|
|
|
|
- await message.exportConfirm()
|
|
|
|
|
- // 发起导出
|
|
|
|
|
- exportLoading.value = true
|
|
|
|
|
- const data = await IotRyDailyReportApi.exportIotRyDailyReport(queryParams)
|
|
|
|
|
- download.excel(data, '瑞鹰日报.xls')
|
|
|
|
|
- } catch {
|
|
|
|
|
- } finally {
|
|
|
|
|
- exportLoading.value = false
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
+ const res = await IotRyDailyReportApi.exportIotRyDailyReport({
|
|
|
|
|
+ createTime: queryParams.createTime,
|
|
|
|
|
+ contractName: queryParams.contractName,
|
|
|
|
|
+ taskName: queryParams.taskName,
|
|
|
|
|
+ // pageNo: queryParams.pageNo,
|
|
|
|
|
+ // pageSize: queryParams.pageSize,
|
|
|
|
|
+ deptId: queryParams.deptId,
|
|
|
|
|
+ projectClassification: queryParams.projectClassification
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
|
|
+ download.excel(res, '瑞鹰钻井日报.xlsx')
|
|
|
|
|
+}
|
|
|
// 声明 ResizeObserver 实例
|
|
// 声明 ResizeObserver 实例
|
|
|
let resizeObserver: ResizeObserver | null = null
|
|
let resizeObserver: ResizeObserver | null = null
|
|
|
|
|
|