Zimo 3 дней назад
Родитель
Сommit
82b7bc00ec

+ 4 - 0
src/api/pms/iotrddailyreport/index.ts

@@ -113,5 +113,9 @@ export const IotRdDailyReportApi = {
   },
   getIotRdDailyReportSummaryPolyline: async (params: any) => {
     return await request.get({ url: `/pms/iot-rd-daily-report/polylineStatistics`, params })
+  },
+
+  exportRdDailyReportStatistics: async (params) => {
+    return await request.download({ url: `/pms/iot-rd-daily-report/exportStatistics`, params })
   }
 }

+ 3 - 23
src/views/pms/iotrddailyreport/fillDailyReport.vue

@@ -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>
@@ -158,7 +152,6 @@
 
 <script setup lang="ts">
 import { dateFormatter2 } from '@/utils/formatTime'
-import download from '@/utils/download'
 import { IotRdDailyReportApi, IotRdDailyReportVO } from '@/api/pms/iotrddailyreport'
 import { DICT_TYPE } from '@/utils/dict'
 import DeptTree2 from '@/views/pms/iotrhdailyreport/DeptTree2.vue'
@@ -319,7 +312,6 @@ const queryParams = reactive({
   createTime: []
 })
 const queryFormRef = ref() // 搜索的表单
-const exportLoading = ref(false) // 导出的加载中
 
 /** 查询列表 */
 const getList = async () => {
@@ -390,20 +382,8 @@ const handleDetail = async (id: number) => {
   }
 }
 
-/** 导出按钮操作 */
-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 exportLoading = ref(false)
+const handleExport = async () => {}
 
 /** 初始化 **/
 onMounted(() => {

+ 3 - 23
src/views/pms/iotrddailyreport/index.vue

@@ -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>
@@ -283,7 +277,6 @@
 
 <script setup lang="ts">
 import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
-import download from '@/utils/download'
 import { IotRdDailyReportApi, IotRdDailyReportVO } from '@/api/pms/iotrddailyreport'
 import IotRdDailyReportForm from './IotRdDailyReportForm.vue'
 import { DICT_TYPE } from '@/utils/dict'
@@ -447,7 +440,6 @@ const queryParams = reactive({
   createTime: []
 })
 const queryFormRef = ref() // 搜索的表单
-const exportLoading = ref(false) // 导出的加载中
 
 const rootDeptId = ref(163)
 
@@ -695,20 +687,8 @@ const handleDelete = async (id: number) => {
   } catch {}
 }
 
-/** 导出按钮操作 */
-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 exportLoading = ref(false)
+const handleExport = async () => {}
 
 // 声明 ResizeObserver 实例
 let resizeObserver: ResizeObserver | null = null

+ 20 - 27
src/views/pms/iotrddailyreport/statistics.vue

@@ -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 实例

+ 4 - 3
src/views/pms/iotrddailyreport/summary.vue

@@ -11,6 +11,7 @@ import { Motion, AnimatePresence } from 'motion-v'
 import { rangeShortcuts } from '@/utils/formatTime'
 
 import { useUserStore } from '@/store/modules/user'
+import download from '@/utils/download'
 
 const deptId = useUserStore().getUser.deptId
 
@@ -220,7 +221,7 @@ const getList = useDebounceFn(async () => {
           cumulativeRunCount: other.cumulativeRunCount || 0,
           cumulativeWorkingWell: other.cumulativeWorkingWell || 0,
           cumulativeHourCount: other.cumulativeHourCount || 0,
-          totalDailyFuel: ((other.totalDailyFuel || 0) / 10000).toFixed(4),
+          totalDailyFuel: (other.totalDailyFuel || 0).toFixed(2),
           cumulativeWaterVolume: other.cumulativeWaterVolume || 0,
           cumulativeWorkingLayers: other.cumulativeWorkingLayers || 0,
           cumulativePumpTrips: other.cumulativePumpTrips || 0,
@@ -476,8 +477,8 @@ const exportChart = () => {
 }
 
 const exportData = async () => {
-  // const res = await IotRdDailyReportApi.exportRdDailyReportStatistics(query.value)
-  // download.excel(res, '瑞恒日报统计数据.xlsx')
+  const res = await IotRdDailyReportApi.exportRdDailyReportStatistics(query.value)
+  download.excel(res, '瑞恒日报统计数据.xlsx')
 }
 
 const exportAll = async () => {

+ 16 - 24
src/views/pms/iotrydailyreport/index.vue

@@ -63,21 +63,15 @@
             <el-button @click="resetQuery"
               ><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button
             >
-            <el-button
+            <!-- <el-button
               type="primary"
               plain
               @click="openForm('create')"
               v-hasPermi="['pms:iot-ry-daily-report:create']"
             >
               <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" /> 导出
             </el-button>
           </el-form-item>
@@ -441,7 +435,6 @@
 
 <script setup lang="ts">
 import { dateFormatter, dateFormatter2, rangeShortcuts } from '@/utils/formatTime'
-import download from '@/utils/download'
 import { IotRyDailyReportApi, IotRyDailyReportVO } from '@/api/pms/iotrydailyreport'
 import IotRyDailyReportForm from './IotRyDailyReportForm.vue'
 import { DICT_TYPE } from '@/utils/dict'
@@ -452,6 +445,7 @@ import quarterOfYear from 'dayjs/plugin/quarterOfYear'
 import { useDebounceFn } from '@vueuse/core'
 
 import { useUserStore } from '@/store/modules/user'
+import download from '@/utils/download'
 
 dayjs.extend(quarterOfYear)
 
@@ -513,7 +507,6 @@ let queryParams = reactive({
   nonProductFlag: 'N'
 })
 const queryFormRef = ref() // 搜索的表单
-const exportLoading = ref(false) // 导出的加载中
 
 // 表格引用
 const tableRef = ref()
@@ -909,21 +902,20 @@ const handleDeptNodeClick = async (row) => {
   await getList()
 }
 
-/** 导出按钮操作 */
+const exportLoading = ref(false)
 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 实例
 let resizeObserver: ResizeObserver | null = null
 

+ 15 - 23
src/views/pms/iotrydailyreport/xjindex.vue

@@ -63,21 +63,15 @@
             <el-button @click="resetQuery"
               ><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button
             >
-            <el-button
+            <!-- <el-button
               type="primary"
               plain
               @click="openForm('create')"
               v-hasPermi="['pms:iot-rh-daily-report:create']"
             >
               <Icon icon="ep:plus" class="mr-5px" /> 新增
-            </el-button>
-            <el-button
-              type="success"
-              plain
-              @click="handleExport"
-              :loading="exportLoading"
-              v-hasPermi="['pms:iot-rh-daily-report:export']"
-            >
+            </el-button> -->
+            <el-button type="success" plain @click="handleExport" :loading="exportLoading">
               <Icon icon="ep:download" class="mr-5px" /> 导出
             </el-button>
           </el-form-item>
@@ -470,7 +464,6 @@ let queryParams = reactive({
   nonProductFlag: 'N'
 })
 const queryFormRef = ref() // 搜索的表单
-const exportLoading = ref(false) // 导出的加载中
 
 const rootDeptId = ref(useUserStore().getUser.deptId)
 
@@ -922,21 +915,20 @@ const handleDeptNodeClick = async (row) => {
   await getList()
 }
 
-/** 导出按钮操作 */
+const exportLoading = ref(false)
 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 实例
 let resizeObserver: ResizeObserver | null = null