From 8f7922e4dc87095572ee526b14ccfda03f17ee25 Mon Sep 17 00:00:00 2001
From: songguoqiang <765017469@qq.com>
Date: Tue, 5 Mar 2024 13:29:31 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=B0=E8=A1=A1=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1=E5=88=86=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/tjanalysis/index.ts | 30 +++++++++++++++++++
src/components/Pagination/index.vue | 5 ++++
.../tjanalysis/hrelongatordata/index.vue | 14 +++++++++
src/views/tjanalysis/hrpuncherdata/index.vue | 14 +++++++++
.../tjanalysis/hrsizingmilldata/index.vue | 14 +++++++++
src/views/tjanalysis/irealdata/index.vue | 3 +-
src/views/tjanalysis/natgasdatahr/index.vue | 14 ++++++++-
.../tjanalysis/natgasdatatotal/index.vue | 14 ++++++++-
src/views/tjanalysis/platscale/index.vue | 6 ++--
src/views/tjanalysis/waterday/index.vue | 14 +++++++++
10 files changed, 123 insertions(+), 5 deletions(-)
diff --git a/src/api/tjanalysis/index.ts b/src/api/tjanalysis/index.ts
index 6902e21..adfff23 100644
--- a/src/api/tjanalysis/index.ts
+++ b/src/api/tjanalysis/index.ts
@@ -45,6 +45,11 @@ export const queryNatgasdatatotal = async (params) => {
return await request.get({ url: `/tjanalysis/queryNatgasdatatotal`, params })
}
+// 导出天然气总流量日统计
+export const exportNatgasDataTotal = async (params) => {
+ return await request.download({ url: `/tjanalysis/exportNatgasDataTotal`, params })
+}
+
// 智能报表统计
export const queryElectricdataAllTj = async (params) => {
return await request.get({ url: `/tjanalysis/queryElectricdataAllTj`, params })
@@ -70,11 +75,21 @@ export const queryNatgasdataDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryNatgasdataDay`, params})
}
+// 导出热轧天然气数据日统计报表
+export const exportNatgasDataDay = async (params) => {
+ return await request.download({ url: `/tjanalysis/exportNatgasDataDay`, params})
+}
+
// 智能水表数据日统计表
export const queryWaterDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryWaterDay`, params})
}
+// 导出智能水表数据日统计表
+export const exportWaterDay = async (params) => {
+ return await request.download({ url: `/tjanalysis/exportWaterDay`, params})
+}
+
// 冷拔-拔机日统计报表
export const queryXcqtyDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryXcqtyDay`, params})
@@ -85,13 +100,28 @@ export const queryHrpuncherDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryHrpuncherDay`, params })
}
+// 导出热轧穿孔机日统计报表
+export const exportHrpuncherDay = async (params) => {
+ return await request.download({ url: `/tjanalysis/exportHrpuncherDay`, params })
+}
+
// 获取热轧延伸机日统计报表
export const queryRzcjinfoDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryRzcjinfoDay`, params })
}
+// 导出热轧延伸机日统计报表
+export const exportRzcjinfoDay = async (params) => {
+ return await request.download({ url: `/tjanalysis/exportRzcjinfoDay`, params })
+}
+
// 获取热轧定经机日统计报表
export const querySizingmillDay = async (params) => {
return await request.get({ url: `/tjanalysis/querySizingmillDay`, params })
+}
+
+// 导出热轧定经机日统计报表
+export const exportSizingmillDay = async (params) => {
+ return await request.download({ url: `/tjanalysis/exportSizingmillDay`, params })
}
\ No newline at end of file
diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue
index b88997b..b9f4998 100644
--- a/src/components/Pagination/index.vue
+++ b/src/components/Pagination/index.vue
@@ -53,6 +53,8 @@ const props = defineProps({
}
})
+console.log('2323',props.total);
+
const emit = defineEmits(['update:page', 'update:limit', 'pagination', 'pagination'])
const currentPage = computed({
get() {
@@ -73,8 +75,11 @@ const pageSize = computed({
}
})
const handleSizeChange = (val) => {
+ debugger
// 如果修改后超过最大页面,强制跳转到第 1 页
if (currentPage.value * val > props.total) {
+ console.log(currentPage.value)
+ console.log(props.total)
currentPage.value = 1
}
// 触发 pagination 事件,重新加载列表
diff --git a/src/views/tjanalysis/hrelongatordata/index.vue b/src/views/tjanalysis/hrelongatordata/index.vue
index c0c5d1f..662557f 100644
--- a/src/views/tjanalysis/hrelongatordata/index.vue
+++ b/src/views/tjanalysis/hrelongatordata/index.vue
@@ -23,6 +23,7 @@
搜索
重置
+ 导出
@@ -121,6 +122,19 @@ function tableCellClassName({row, column, rowIndex, columnIndex}) {
}
}
+const exportElecTotal = async () => {
+ const res = await TjanalysisApi.exportRzcjinfoDay(queryParams)
+ if (res != null) {
+ let url = window.URL.createObjectURL(new Blob([res]));
+ let link = document.createElement("a");
+ link.style.display = "none";
+ link.href = url;
+ link.setAttribute("download", "热轧延伸机日统计.xlsx");
+ document.body.appendChild(link);
+ link.click();
+ }
+}
+
/** 初始化 **/
onMounted(async () => {
const res =await DictApi.getStrDictOptions(DICT_TYPE.hrelongatordata);
diff --git a/src/views/tjanalysis/hrpuncherdata/index.vue b/src/views/tjanalysis/hrpuncherdata/index.vue
index fe988ba..9f6eb43 100644
--- a/src/views/tjanalysis/hrpuncherdata/index.vue
+++ b/src/views/tjanalysis/hrpuncherdata/index.vue
@@ -23,6 +23,7 @@
搜索
重置
+ 导出
@@ -120,6 +121,19 @@ function tableCellClassName({row, column, rowIndex, columnIndex}) {
}
}
+const exportElecTotal = async () => {
+ const res = await TjanalysisApi.exportHrpuncherDay(queryParams)
+ if (res != null) {
+ let url = window.URL.createObjectURL(new Blob([res]));
+ let link = document.createElement("a");
+ link.style.display = "none";
+ link.href = url;
+ link.setAttribute("download", "热轧穿孔机日统计.xlsx");
+ document.body.appendChild(link);
+ link.click();
+ }
+}
+
/** 初始化 **/
onMounted(async () => {
const res =await DictApi.getStrDictOptions(DICT_TYPE.hrpuncherdata);
diff --git a/src/views/tjanalysis/hrsizingmilldata/index.vue b/src/views/tjanalysis/hrsizingmilldata/index.vue
index edfa2c6..51522ee 100644
--- a/src/views/tjanalysis/hrsizingmilldata/index.vue
+++ b/src/views/tjanalysis/hrsizingmilldata/index.vue
@@ -24,6 +24,7 @@
搜索
重置
+ 导出
@@ -122,6 +123,19 @@ function tableCellClassName({row, column, rowIndex, columnIndex}) {
}
}
+const exportElecTotal = async () => {
+ const res = await TjanalysisApi.exportSizingmillDay(queryParams)
+ if (res != null) {
+ let url = window.URL.createObjectURL(new Blob([res]));
+ let link = document.createElement("a");
+ link.style.display = "none";
+ link.href = url;
+ link.setAttribute("download", "热轧定经机日统计.xlsx");
+ document.body.appendChild(link);
+ link.click();
+ }
+}
+
/** 初始化 **/
onMounted(async () => {
const res =await DictApi.getStrDictOptions(DICT_TYPE.hrsizingmilldata);
diff --git a/src/views/tjanalysis/irealdata/index.vue b/src/views/tjanalysis/irealdata/index.vue
index a45530d..c5d06d8 100644
--- a/src/views/tjanalysis/irealdata/index.vue
+++ b/src/views/tjanalysis/irealdata/index.vue
@@ -74,6 +74,7 @@ const resetQuery = async () => {
const getList = async () => {
const res = await TjanalysisApi.queryIrealdataTj(queryParams)
+ dataList.dList = []
if (res != null && res.trList != null) {
dataList.days = res.days
dataList.dList = []
@@ -115,7 +116,7 @@ function tableCellClassName({row, column, rowIndex, columnIndex}) {
return 'success-cols'
}
}
-
+//一次主表日统计报表
const exportElecTotal = async () => {
const res = await TjanalysisApi.exportIrealdataTj(queryParams)
if (res != null) {
diff --git a/src/views/tjanalysis/natgasdatahr/index.vue b/src/views/tjanalysis/natgasdatahr/index.vue
index f940983..1fc1b19 100644
--- a/src/views/tjanalysis/natgasdatahr/index.vue
+++ b/src/views/tjanalysis/natgasdatahr/index.vue
@@ -23,6 +23,7 @@
搜索
重置
+ 导出
@@ -98,7 +99,18 @@ const getList = async () => {
}
loading.value = false
}
-
+const exportElecTotal = async () => {
+ const res = await TjanalysisApi.exportNatgasDataDay(queryParams)
+ if (res != null) {
+ let url = window.URL.createObjectURL(new Blob([res]));
+ let link = document.createElement("a");
+ link.style.display = "none";
+ link.href = url;
+ link.setAttribute("download", "热轧天然气数据日统计.xlsx");
+ document.body.appendChild(link);
+ link.click();
+ }
+}
/** 初始化 **/
onMounted(async () => {
diff --git a/src/views/tjanalysis/natgasdatatotal/index.vue b/src/views/tjanalysis/natgasdatatotal/index.vue
index 49204a9..984bfe1 100644
--- a/src/views/tjanalysis/natgasdatatotal/index.vue
+++ b/src/views/tjanalysis/natgasdatatotal/index.vue
@@ -23,6 +23,7 @@
搜索
重置
+ 导出
@@ -101,7 +102,18 @@ const getList = async () => {
}
loading.value = false
}
-
+const exportElecTotal = async () => {
+ const res = await TjanalysisApi.exportNatgasDataTotal(queryParams)
+ if (res != null) {
+ let url = window.URL.createObjectURL(new Blob([res]));
+ let link = document.createElement("a");
+ link.style.display = "none";
+ link.href = url;
+ link.setAttribute("download", "天然气总量日统计.xlsx");
+ document.body.appendChild(link);
+ link.click();
+ }
+}
/** 初始化 **/
onMounted(async () => {
diff --git a/src/views/tjanalysis/platscale/index.vue b/src/views/tjanalysis/platscale/index.vue
index aded00e..9686447 100644
--- a/src/views/tjanalysis/platscale/index.vue
+++ b/src/views/tjanalysis/platscale/index.vue
@@ -30,13 +30,14 @@
-
+
+
{
dataList.dList = res.list
dataList.total = res.total
}
+ console.log('23',dataList.total);
loading.value = false
}
diff --git a/src/views/tjanalysis/waterday/index.vue b/src/views/tjanalysis/waterday/index.vue
index 65d8723..f6e062c 100644
--- a/src/views/tjanalysis/waterday/index.vue
+++ b/src/views/tjanalysis/waterday/index.vue
@@ -38,6 +38,7 @@
搜索
重置
+ 导出
@@ -132,6 +133,19 @@ const flagChange=async()=>{
}
}
+const exportElecTotal = async () => {
+ const res = await TjanalysisApi.exportWaterDay(queryParams)
+ if (res != null) {
+ let url = window.URL.createObjectURL(new Blob([res]));
+ let link = document.createElement("a");
+ link.style.display = "none";
+ link.href = url;
+ link.setAttribute("download", "智能水表日统计.xlsx");
+ document.body.appendChild(link);
+ link.click();
+ }
+}
+
/** 初始化 **/
onMounted(async () => {
flagList.value = DictApi.getStrDictOptions(DICT_TYPE.Water_Module);