From d959933ea3e284d3088b5d33be7cf792901b19e6 Mon Sep 17 00:00:00 2001 From: schry <2433098676@qq.com> Date: Tue, 16 May 2023 10:26:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=BE=80=E6=9D=A5=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=AF=BC=E5=87=BA=E6=A8=A1=E5=9D=97=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E2=80=9C=E7=BB=93=E6=9E=9C=E5=85=A8=E9=83=A8=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E2=80=9D=E5=90=8E=E6=95=B0=E6=8D=AE=E9=87=8F=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basic/corpMaintain/corpSelect.vue | 79 +++++++++++++++------ 1 file changed, 57 insertions(+), 22 deletions(-) diff --git a/src/views/basic/corpMaintain/corpSelect.vue b/src/views/basic/corpMaintain/corpSelect.vue index 869890d5..b832f509 100644 --- a/src/views/basic/corpMaintain/corpSelect.vue +++ b/src/views/basic/corpMaintain/corpSelect.vue @@ -215,7 +215,9 @@ import { this.loading = false; this.getSystemParamConfig(); this.list = response.data.list || []; + console.log(this.list) this.total = response.data.total || 0; + console.log(this.total) }) .catch(() => { this.loading = false; @@ -353,38 +355,70 @@ import { }, selectExport() { - /* var selectData = this.multipleSelection; + var selectData = this.multipleSelection; selectData.forEach((obj) => { this.query.ids.push(obj.id); - });*/ - this.allExport(); + }); + exportExcel(this.query) + .then((response) => { + if (response.code == 20000) { + this.$message({ + type: "success", + message: "导出成功,后台正在生成Json文件,请稍后刷新查看!", + }); + } else { + this.$message({ + type: "error", + message: response.message, + }); + } + this.$emit("cancelDialog", true); + }) + .catch(() => { + this.$message({ + type: "error", + message: "上传失败", + }); + }); }, allExport() { - var selectData = this.multipleSelection; - selectData.forEach((obj) => { - this.query.ids.push(obj.id); - }); - exportExcel(this.query) - .then((response) => { + this.query.limit = this.total; + getBasicUnitMaintains(this.query) + .then((response) => { + this.list = response.data.list || []; + console.log(this.list) + this.total = response.data.total || 0; + var selectData = this.list; + selectData.forEach((obj) => { + this.query.ids.push(obj.id); + }); + exportExcel(this.query) + .then((response) => { if (response.code == 20000) { - this.$message({ - type: "success", - message: "导出成功,后台正在生成Json文件,请稍后刷新查看!", - }); + this.$message({ + type: "success", + message: "导出成功,后台正在生成Json文件,请稍后刷新查看!", + }); } else { - this.$message({ - type: "error", - message: response.message, - }); + this.$message({ + type: "error", + message: response.message, + }); } this.$emit("cancelDialog", true); - }) - .catch(() => { + }) + .catch(() => { this.$message({ - type: "error", - message: "上传失败", + type: "error", + message: "上传失败", }); - }); + }); + }) + .catch(() => { + this.loading = false; + this.list = []; + this.total = 0; + }); }, uploadSMP() { @@ -493,6 +527,7 @@ import { created() { this.getList(); this.getBasicThirdSys(); + } , }