From dc91db9bb3473c3ed058f86f74359e15c035a8a5 Mon Sep 17 00:00:00 2001
From: zhengpz <1838927346@qq.com>
Date: Mon, 23 Aug 2021 22:13:10 +0800
Subject: [PATCH] 表查询完善
---
src/views/statisticalQueryManagement/companyDetails.vue | 55 ++++++++++++++++++++-----------------------------------
1 files changed, 20 insertions(+), 35 deletions(-)
diff --git a/src/views/statisticalQueryManagement/companyDetails.vue b/src/views/statisticalQueryManagement/companyDetails.vue
index 3387f09..d23026d 100644
--- a/src/views/statisticalQueryManagement/companyDetails.vue
+++ b/src/views/statisticalQueryManagement/companyDetails.vue
@@ -12,7 +12,6 @@
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
- @on-load="onLoad"
>
</avue-crud>
</basic-container>
@@ -326,9 +325,11 @@
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
+ this.onLoad(this.page, this.query);
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
+ this.onLoad(this.page, this.query);
},
refreshChange() {
this.onLoad(this.page, this.query);
@@ -341,49 +342,33 @@
let param = {};
param["deptid"] = params["deptid"] || "";
param["name"] = params["real_name"] || "";
- param["hold"] = params["hold"] || "";
- param["photo"] = params["photo"] || "";
- param["examinationtype"] = params["examination_type"] || "";
- param["dispatch"] = params["dispatch"] || "";
- param["soil"] = params["soil"] || "";
+ param["hold"] =
+ params["hold"] || params["hold"] == "0" ? Number(params["hold"]) : "";
+ param["photo"] =
+ params["photo"] || params["photo"] == "0"
+ ? Number(params["photo"])
+ : "";
+ param["examinationtype"] =
+ params["examination_type"] || params["examination_type"] == "0"
+ ? Number(params["examination_type"])
+ : "";
+ param["dispatch"] =
+ params["dispatch"] || params["dispatch"] == "0"
+ ? Number(params["dispatch"])
+ : "";
+ param["soil"] =
+ params["soil"] || params["soil"] == "0" ? Number(params["soil"]) : "";
param["current"] = page.currentPage;
param["size"] = page.pageSize;
selectUIn(param).then(res => {
const data = res.data.data;
this.page.total = data.total;
- this.tableData = res.data.data;
+ this.tableData = data.records;
// this.data = data.records;
this.loading = false;
- // this.selectionClear();
});
},
- // getTableData() {
- // selectUIn(param).then(res => {
- // if (res.data.code === 200) {
- // this.tableData = res.data.data;
- // this.loading = false;
- // }
- // });
- // }
- // downExcel() {
- // let et = XLSX.utils.table_to_book(document.getElementById("table"));
- // let etout = XLSX.write(et, {
- // bookType: "xlsx",
- // bookSST: true,
- // type: "array"
- // });
- // try {
- // FileSaver.saveAs(
- // new Blob([etout], {
- // type: "application/octet-stream"
- // }),
- // `表.xlsx`
- // ); //导出的文件名
- // } catch (e) {
- // console.log(e, etout);
- // }
- // return etout;
- // }
+
getLocationParams() {
let url = window.location.href;
let urlArr = url.split("?")[1].split("&");
--
Gitblit v1.9.3