306132416@qq.com hace 4 años
padre
commit
b87ece62c0
Se han modificado 1 ficheros con 43 adiciones y 15 borrados
  1. 43 15
      src/views/data/UploadLinks.vue

+ 43 - 15
src/views/data/UploadLinks.vue

@@ -53,7 +53,8 @@
 import TablePage from "../../components/TablePage";
 import Count from "../../components/Count";
 import Table from "./components/UploadLinksTable";
-import { env_url } from "../../config/env"
+import { env_url , php_url} from "../../config/env"
+import axiosTest from 'axios';
 export default {
   components: {
     TablePage,
@@ -71,7 +72,8 @@ export default {
       areaValue: "",
       startTime: "",
       endTime: "",
-      onlineUrl: env_url, //'http://8.140.188.129:8080'线上 //http://8.136.230.133:8080 //测试
+      onlineUrl: env_url, //'http://8.140.188.129:8080'线上 //http://8.136.230.133:8080 //测试,
+      otherUrl:php_url,
     };
   },
   computed: {
@@ -91,10 +93,11 @@ export default {
         localArea: this.areaValue,
         startTime: this.startTime,
         endTime: this.endTime,
-        page: this.currentPage,
-        rows: this.pageSize,
+        Page: this.currentPage,
+        Rows: this.pageSize,
       };
-      this.firmsLinkUpload(data);
+    //  this.firmsLinkUpload(data);
+      this.getPageTableDate(data);
     },
     changePage: function (page) {
       this.currentPage = page;
@@ -103,10 +106,11 @@ export default {
         localArea: this.areaValue,
         startTime: this.startTime,
         endTime: this.endTime,
-        page: this.currentPage,
-        rows: this.pageSize,
+        Page: this.currentPage,
+        Rows: this.pageSize,
       };
-      this.firmsLinkUpload(req);
+     // this.firmsLinkUpload(req);
+      this.getPageTableDate(req)
     },
     // 点击上一页,下一页,首页,尾页
     jumpPage: function (item) {
@@ -129,10 +133,11 @@ export default {
         localArea: this.areaValue,
         startTime: this.startTime,
         endTime: this.endTime,
-        page: this.currentPage,
-        rows: this.pageSize,
+        Page: this.currentPage,
+        Rows: this.pageSize,
       };
-      this.firmsLinkUpload(req);
+     // this.firmsLinkUpload(req);
+      this.getPageTableDate(req)
     },
     ulrJump: function (url) {
       window.open(url);
@@ -156,6 +161,23 @@ export default {
           console.log(err);
         });
     },
+    //php获取表格数据
+    // 获取表格数据
+    getPageTableDate: function (data = {}) {
+      axiosTest({
+        method: "post",
+        url: this.otherUrl + '/lexus_php/api/report_list.php',
+        data: data,
+      })
+              .then((res) => {
+                console.log(res.data, 111111);
+                this.tableData = res.data.data;
+                this.sum = res.data.count;
+              })
+              .catch((err) => {
+                console.log(err);
+              });
+    },
     // 获取 所有区域  接口
     getAreaList: function () {
       this.$http({
@@ -175,16 +197,22 @@ export default {
     },
     // 导出   接口
     exportTem: function () {
-      let url = this.onlineUrl + "/exportFactory";
+      // queryParams: this.inputValue,
+      //         localArea: this.areaValue,
+      //         startTime: this.startTime,
+      //         endTime: this.endTime,
+     // let url = this.onlineUrl + "/exportFactory";
+      let url = this.otherUrl + '/lexus_php/web/report_export.php?queryParams='+ this.inputValue + '&localArea=' + this.areaValue + '&startTime=' + this.startTime + '&endTime=' + this.endTime;
       window.open(url);
     },
   },
   created() {
     let req = {
-      page: this.currentPage,
-      rows: this.pageSize,
+      Page: this.currentPage,
+      Rows: this.pageSize,
     };
-    this.firmsLinkUpload(req);
+    //this.firmsLinkUpload(req);
+    this.getPageTableDate(req);
     this.getAreaList();
   }
 };