소스 검색

动环诊断导出接口代码提交

jingyuanchao 1 년 전
부모
커밋
6e31d8db30
1개의 변경된 파일16개의 추가작업 그리고 16개의 파일을 삭제
  1. 16 16
      src/views/iot/sensorData/index.vue

+ 16 - 16
src/views/iot/sensorData/index.vue

@@ -87,15 +87,14 @@
               </el-col>
 
 
-            <el-col :span="1.5">
+              <el-col :span="1.5">
                 <el-button
                   type="primary"
                   icon="el-icon-download"
                   size="mini"
                   @click="handleExport"
-                  v-hasPermi="['core:task:export']"
-                  >导出</el-button
-                >
+                >导出数据
+                </el-button>
               </el-col>
 
               <right-toolbar
@@ -156,6 +155,7 @@ import  DetailDialog  from "./dialog.detail.vue";
 import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
 import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
 import { mapGetters } from "vuex";
+import dayjs from "dayjs";
 export default {
   components: { OrgTree, DataRangePicker,DetailDialog },
   name: "Task",
@@ -207,6 +207,7 @@ export default {
   methods: {
     /** 查询列表 */
     getList() {
+      debugger
       this.loading = true;
       list(this.queryParams).then((response) => {
         this.dataList = response.rows;
@@ -282,18 +283,17 @@ export default {
     },
 
     /** 导出按钮操作 */
-     handleExport() {
-    //   console.log(this);
-    //   this.download(
-    //     "core/retrievalTask/export",
-    //     {
-    //       ...this.queryParams,
-    //     },
-    //     `${
-    //       this.selectedOrgName
-    //     }-${this.$tab.getCurrentTabName()}-${dayjs().format("YYYYMMDD")}.xlsx`
-    //   );
-     },
+    handleExport() {
+      this.download(
+        "iot/sensor/export",
+        {
+          ...this.queryParams,
+        },
+        `${
+          this.selectedOrgName
+        }-${this.$tab.getCurrentTabName()}-${dayjs().format("YYYYMMDD")}.xlsx`
+      );
+    },
   },
 };
 </script>