baichengfei 5 年之前
父節點
當前提交
7f4a455a58
共有 1 個文件被更改,包括 30 次插入31 次删除
  1. 30 31
      src/dashoo.cn/frontend_web/src/components/usednameselect/index.vue

+ 30 - 31
src/dashoo.cn/frontend_web/src/components/usednameselect/index.vue

@@ -18,23 +18,22 @@
 
 
 <script>
-  import api from "@/api/oilsupplier/usednameselect";
-  import FileSaver from "file-saver";
-  import XLSX from "xlsx";
+  import api from '@/api/oilsupplier/usednameselect'
+  import FileSaver from 'file-saver'
+  import XLSX from 'xlsx'
   export default {
-
-    name:'usednameselectIndex',
-     props: {
+    name: 'usednameselectIndex',
+    props: {
       formData: {
         type: Object,
         default: {}
-      },
+      }
 
-     },
-    created() {
+    },
+    created () {
       // console.log(123,this.formData.SupplierName)
       // 执行初始化方法
-     this.initDatas()
+      this.initDatas()
       // this.initDatas()
     },
     data () {
@@ -52,8 +51,8 @@
         },
         // 列表排序
         Column: {
-          Order: "",
-          Prop: ""
+          Order: '',
+          Prop: ''
         }
       }
     },
@@ -75,14 +74,14 @@
 
         // if (event != null) {
         //   console.log(666666666,event)
-          this.currentPage = 1
+        this.currentPage = 1
         // }
         let params = {
           _size: this.size,
           _currentPage: this.currentPage,
           Order: this.Column.Order,
           Prop: this.Column.Prop,
-          SupplierName:this.formData.SupplierName,
+          SupplierName: this.formData.SupplierName
 
         }
         // 查询条件
@@ -101,25 +100,25 @@
       exportExcel () {
         /* generate workbook object from table */
         let wb = XLSX.utils.table_to_book(
-          document.querySelector("#rebateSetTable")
-        );
+          document.querySelector('#rebateSetTable')
+        )
         /* get binary string as output */
         let wbout = XLSX.write(wb, {
-          bookType: "xlsx",
+          bookType: 'xlsx',
           bookSST: true,
-          type: "array"
-        });
+          type: 'array'
+        })
         try {
           FileSaver.saveAs(
             new Blob([wbout], {
-              type: "application/octet-stream"
+              type: 'application/octet-stream'
             }),
-            "SupplierUsedName.xlsx"
-          );
+            'SupplierUsedName.xlsx'
+          )
         } catch (e) {
-          if (typeof console !== "undefined") console.log(e, wbout);
+          if (typeof console !== 'undefined') console.log(e, wbout)
         }
-        return wbout;
+        return wbout
       },
 
       formatDateTime (date) {
@@ -134,14 +133,14 @@
         return y + '-' + m + '-' + d + ' ' + h + ':' + minute
       },
       // 列表排序功能
-      orderby(column) {
-        if (column.order == "ascending") {
-          this.Column.Order = "asc";
-        } else if (column.order == "descending") {
-          this.Column.Order = "desc";
+      orderby (column) {
+        if (column.order == 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order == 'descending') {
+          this.Column.Order = 'desc'
         }
-        this.Column.Prop = column.prop;
-        this.initDatas();
+        this.Column.Prop = column.prop
+        this.initDatas()
       },
 
       // 分页方法