Browse Source

修改地衡数据统计分页

master
songguoqiang 11 months ago
parent
commit
8f7922e4dc
  1. 30
      src/api/tjanalysis/index.ts
  2. 5
      src/components/Pagination/index.vue
  3. 14
      src/views/tjanalysis/hrelongatordata/index.vue
  4. 14
      src/views/tjanalysis/hrpuncherdata/index.vue
  5. 14
      src/views/tjanalysis/hrsizingmilldata/index.vue
  6. 3
      src/views/tjanalysis/irealdata/index.vue
  7. 14
      src/views/tjanalysis/natgasdatahr/index.vue
  8. 14
      src/views/tjanalysis/natgasdatatotal/index.vue
  9. 6
      src/views/tjanalysis/platscale/index.vue
  10. 14
      src/views/tjanalysis/waterday/index.vue

30
src/api/tjanalysis/index.ts

@ -45,6 +45,11 @@ export const queryNatgasdatatotal = async (params) => {
return await request.get({ url: `/tjanalysis/queryNatgasdatatotal`, 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) => { export const queryElectricdataAllTj = async (params) => {
return await request.get({ url: `/tjanalysis/queryElectricdataAllTj`, 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}) 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) => { export const queryWaterDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryWaterDay`, 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) => { export const queryXcqtyDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryXcqtyDay`, 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 }) 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) => { export const queryRzcjinfoDay = async (params) => {
return await request.get({ url: `/tjanalysis/queryRzcjinfoDay`, 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) => { export const querySizingmillDay = async (params) => {
return await request.get({ url: `/tjanalysis/querySizingmillDay`, params }) return await request.get({ url: `/tjanalysis/querySizingmillDay`, params })
}
// 导出热轧定经机日统计报表
export const exportSizingmillDay = async (params) => {
return await request.download({ url: `/tjanalysis/exportSizingmillDay`, params })
} }

5
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 emit = defineEmits(['update:page', 'update:limit', 'pagination', 'pagination'])
const currentPage = computed({ const currentPage = computed({
get() { get() {
@ -73,8 +75,11 @@ const pageSize = computed({
} }
}) })
const handleSizeChange = (val) => { const handleSizeChange = (val) => {
debugger
// 1 // 1
if (currentPage.value * val > props.total) { if (currentPage.value * val > props.total) {
console.log(currentPage.value)
console.log(props.total)
currentPage.value = 1 currentPage.value = 1
} }
// pagination // pagination

14
src/views/tjanalysis/hrelongatordata/index.vue

@ -23,6 +23,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" size="mini" @click="handleQuery">搜索</el-button>
<el-button size="mini" @click="resetQuery">重置</el-button> <el-button size="mini" @click="resetQuery">重置</el-button>
<el-button type="success" @click="exportElecTotal" size="mini">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</ContentWrap> </ContentWrap>
@ -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 () => { onMounted(async () => {
const res =await DictApi.getStrDictOptions(DICT_TYPE.hrelongatordata); const res =await DictApi.getStrDictOptions(DICT_TYPE.hrelongatordata);

14
src/views/tjanalysis/hrpuncherdata/index.vue

@ -23,6 +23,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" size="mini" @click="handleQuery">搜索</el-button>
<el-button size="mini" @click="resetQuery">重置</el-button> <el-button size="mini" @click="resetQuery">重置</el-button>
<el-button type="success" @click="exportElecTotal" size="mini">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</ContentWrap> </ContentWrap>
@ -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 () => { onMounted(async () => {
const res =await DictApi.getStrDictOptions(DICT_TYPE.hrpuncherdata); const res =await DictApi.getStrDictOptions(DICT_TYPE.hrpuncherdata);

14
src/views/tjanalysis/hrsizingmilldata/index.vue

@ -24,6 +24,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" size="mini" @click="handleQuery">搜索</el-button>
<el-button size="mini" @click="resetQuery">重置</el-button> <el-button size="mini" @click="resetQuery">重置</el-button>
<el-button type="success" @click="exportElecTotal" size="mini">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</ContentWrap> </ContentWrap>
@ -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 () => { onMounted(async () => {
const res =await DictApi.getStrDictOptions(DICT_TYPE.hrsizingmilldata); const res =await DictApi.getStrDictOptions(DICT_TYPE.hrsizingmilldata);

3
src/views/tjanalysis/irealdata/index.vue

@ -74,6 +74,7 @@ const resetQuery = async () => {
const getList = async () => { const getList = async () => {
const res = await TjanalysisApi.queryIrealdataTj(queryParams) const res = await TjanalysisApi.queryIrealdataTj(queryParams)
dataList.dList = []
if (res != null && res.trList != null) { if (res != null && res.trList != null) {
dataList.days = res.days dataList.days = res.days
dataList.dList = [] dataList.dList = []
@ -115,7 +116,7 @@ function tableCellClassName({row, column, rowIndex, columnIndex}) {
return 'success-cols' return 'success-cols'
} }
} }
//
const exportElecTotal = async () => { const exportElecTotal = async () => {
const res = await TjanalysisApi.exportIrealdataTj(queryParams) const res = await TjanalysisApi.exportIrealdataTj(queryParams)
if (res != null) { if (res != null) {

14
src/views/tjanalysis/natgasdatahr/index.vue

@ -23,6 +23,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" size="mini" @click="handleQuery">搜索</el-button>
<el-button size="mini" @click="resetQuery">重置</el-button> <el-button size="mini" @click="resetQuery">重置</el-button>
<el-button type="success" @click="exportElecTotal" size="mini">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</ContentWrap> </ContentWrap>
@ -98,7 +99,18 @@ const getList = async () => {
} }
loading.value = false 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 () => { onMounted(async () => {

14
src/views/tjanalysis/natgasdatatotal/index.vue

@ -23,6 +23,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" size="mini" @click="handleQuery">搜索</el-button>
<el-button size="mini" @click="resetQuery">重置</el-button> <el-button size="mini" @click="resetQuery">重置</el-button>
<el-button type="success" @click="exportElecTotal" size="mini">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</ContentWrap> </ContentWrap>
@ -101,7 +102,18 @@ const getList = async () => {
} }
loading.value = false 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 () => { onMounted(async () => {

6
src/views/tjanalysis/platscale/index.vue

@ -30,13 +30,14 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="dataList.dList" border="true" highlight-current-row="true"> <el-table v-loading="loading" :data="dataList.dList" border="true" highlight-current-row="true">
<el-table-column label="序号" type="index" width="80" align="center" /> <el-table-column label="序号1" type="index" width="80" align="center" />
<el-table-column label="供货单位(使用单位)" prop="ghdw" align="center" :show-overflow-tooltip="true" /> <el-table-column label="供货单位(使用单位)" prop="ghdw" align="center" :show-overflow-tooltip="true" />
<el-table-column label="运输单位" prop="ysdw" align="center" :show-overflow-tooltip="true" />
<el-table-column label="品种" prop="pz" align="center" :show-overflow-tooltip="true" /> <el-table-column label="品种" prop="pz" align="center" :show-overflow-tooltip="true" />
<el-table-column label="总净重(t)" prop="jz" align="center" :show-overflow-tooltip="true" /> <el-table-column label="总净重(t)" prop="jz" align="center" :show-overflow-tooltip="true" />
</el-table> </el-table>
<pagination <pagination
v-show="dataList.total>0" v-if="dataList.total>0"
:total="dataList.total" :total="dataList.total"
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
@ -84,6 +85,7 @@ const getList = async () => {
dataList.dList = res.list dataList.dList = res.list
dataList.total = res.total dataList.total = res.total
} }
console.log('23',dataList.total);
loading.value = false loading.value = false
} }

14
src/views/tjanalysis/waterday/index.vue

@ -38,6 +38,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" size="mini" @click="handleQuery">搜索</el-button>
<el-button size="mini" @click="resetQuery">重置</el-button> <el-button size="mini" @click="resetQuery">重置</el-button>
<el-button type="success" @click="exportElecTotal" size="mini">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</ContentWrap> </ContentWrap>
@ -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 () => { onMounted(async () => {
flagList.value = DictApi.getStrDictOptions(DICT_TYPE.Water_Module); flagList.value = DictApi.getStrDictOptions(DICT_TYPE.Water_Module);

Loading…
Cancel
Save