浏览代码

完善opc

whj 1 年之前
父节点
当前提交
e21968bd33
共有 2 个文件被更改,包括 27 次插入3 次删除
  1. 16 0
      src/api/report/sbinfo.js
  2. 11 3
      src/views/dashboard/SbInfoTypeReport.vue

+ 16 - 0
src/api/report/sbinfo.js

@@ -33,6 +33,22 @@ export function exportMonthReport (parameter) {
     responseType: 'blob'
   })
 }
+/**
+ * export file
+ * parameter: { }
+ * @param parameter :
+  * @returns {*}
+ */
+export function exportMonthInfoReport (parameter) {
+  return axios({
+    url: '/sb/infos/export/sb/detail?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    responseType: 'blob'
+  })
+}
 /**
  * page func
  * parameter: { }

+ 11 - 3
src/views/dashboard/SbInfoTypeReport.vue

@@ -65,8 +65,8 @@
                     rowKey="month">
                     <span slot="action" slot-scope="record">
                       <template>
-                        <!--                        <a @click="handleView(record)">查看明细</a>
-                        <a-divider type="vertical" />-->
+                        <a @click="doExportInfo(record)">明细导出</a>
+                        <a-divider type="vertical" />
                         <a @click="doExportDetail(record)">导出</a>
                       </template>
                     </span>
@@ -84,7 +84,7 @@
 </template>
 
 <script>
-import { getMonthReport, exportMonthReport, getSbType, getSbTypeReport } from '@/api/report/sbinfo'
+import { getMonthReport, exportMonthReport, getSbType, getSbTypeReport, exportMonthInfoReport } from '@/api/report/sbinfo'
 import { Chart } from '@antv/g2'
 import PrintInSbInfoTypeReport from '@/views/dashboard/modules/PrintInSbInfoTypeReport'
 import DetailMeasureLogReport from '@/views/dashboard/modules/DetailMeasureLogReport'
@@ -240,6 +240,14 @@ export default {
         this.BaseTool.UPLOAD.downLoadExportExcel(file)
       })
     },
+    doExportInfo (record) {
+      const parameter = {
+        typeId: record.id
+      }
+      exportMonthInfoReport(parameter).then(file => {
+        this.BaseTool.UPLOAD.downLoadExportExcel(file)
+      })
+    },
     handlePrint (record) {
       const modal = this.$refs.basePrintModal
       this.visible = false