From 28df70b5ec05560be482efa594303b9ce81faf0f Mon Sep 17 00:00:00 2001 From: hyingbo <1363390067@qq.com> Date: 星期五, 05 九月 2025 11:21:24 +0800 Subject: [PATCH] 设备台账统计-去除分页 --- src/views/eam/equipment/modules/EquipmentCategoryStatisticsList.vue | 196 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 196 insertions(+), 0 deletions(-) diff --git a/src/views/eam/equipment/modules/EquipmentCategoryStatisticsList.vue b/src/views/eam/equipment/modules/EquipmentCategoryStatisticsList.vue new file mode 100644 index 0000000..fe9b317 --- /dev/null +++ b/src/views/eam/equipment/modules/EquipmentCategoryStatisticsList.vue @@ -0,0 +1,196 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + :confirmLoading="confirmLoading" + switchFullscreen + cancelText="鍏抽棴" + @cancel="handleCancel" + > + <!-- 鏌ヨ鍖哄煙 --> + + <!-- 鏌ヨ鍖哄煙-END --> + <div class="table-operator"> + <a-button + type="primary" + icon="download" + @click="handleExportXls('鍙拌处缁熻')" + >瀵煎嚭</a-button> + </div> + <!-- table鍖哄煙-begin --> + <div> + <a-table + ref="table" + size="middle" + bordered + class="j-table-force-nowrap" + :scroll="{x:true}" + @change="handleTableChange" + :columns="columns" + :dataSource="dataSource" + :loading="loading" + :pagination="false" + > + + </a-table> + </div> + <div slot="footer"> + <a-button @click="handleCancel">鍏抽棴</a-button> + </div> + </j-modal> +</template> + +<script> + +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { downFile, getAction } from '@/api/manage' +import '@/assets/less/TableExpand.less' + +export default { + name: "EquipmentCategoryStatisticsList", + mixins:[JeecgListMixin], + components: {}, + data() { + return { + title: '鍙拌处缁熻', + width: 1200, + visible: false, + confirmLoading: false, + // 琛ㄥご + columns: [ + { + title: '璁惧绉嶇被', + align: "center", + dataIndex: 'equipmentType', + }, + { + title: '璁惧鎬绘暟', + align: "left", + dataIndex: 'equipmentCount' + }, + { + title: '鎬诲師鍊�', + align: "center", + dataIndex: 'originalValue', + // 鏍煎紡鍖栨暟鍊兼樉绀� + render: (text) => { + return text.toFixed(2) + } + }, + { + title: '楂樼簿搴︽�绘暟', + align: "center", + dataIndex: 'highPrecisionCount' + }, + { + title: '楂樼簿搴﹀師鍊�', + align: "center", + dataIndex: 'highPrecisionOriginalValue', + render: (text) => { + return text.toFixed(2) + } + }, + { + title: '鍥戒骇鎬绘暟', + align: "left", + dataIndex: 'domesticCount' + }, + { + title: '鍥戒骇鍘熷��', + align: "left", + dataIndex: 'domesticOriginalValue', + render: (text) => { + return text.toFixed(2) + } + }, + { + title: '杩涘彛鎬绘暟', + align: "left", + dataIndex: 'importCount' + }, + { + title: '杩涘彛鍘熷��', + align: "left", + dataIndex: 'importOriginalValue', + render: (text) => { + return text.toFixed(2) + } + }, + { + title: '瀹屽ソ鎬绘暟', + align: "left", + dataIndex: 'intactCount' + }, + { + title: '瀹屽ソ鍘熷��', + align: "left", + dataIndex: 'intactOriginalValue', + render: (text) => { + return text.toFixed(2) + } + } + ], + url: { + list: "/eam/equipment/queryLedgerStatistics", + exportXlsUrl: "/eam/equipment/exportLedgerStatisticsXls" + }, + } + }, + created() { + }, + computed: {}, + methods: { + handleExportXls(fileName) { + if (!fileName || typeof fileName != "string") { + fileName = "瀵煎嚭鏂囦欢" + } + downFile(this.url.exportXlsUrl).then((data) => { + if (!data) { + this.$message.warning("鏂囦欢涓嬭浇澶辫触") + return + } + if (typeof window.navigator.msSaveBlob !== 'undefined') { + window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls') + } else { + let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' })) + let link = document.createElement('a') + link.style.display = 'none' + link.href = url + link.setAttribute('download', fileName + '.xls') + document.body.appendChild(link) + link.click() + document.body.removeChild(link); //涓嬭浇瀹屾垚绉婚櫎鍏冪礌 + window.URL.revokeObjectURL(url); //閲婃斁鎺塨lob瀵硅薄 + } + }) + }, + loadData() { + if (!this.url.list) { + this.$message.error("璇疯缃畊rl.list灞炴��!") + return + } + this.onClearSelected() + this.loading = true; + getAction(this.url.list).then((res) => { + if (res.success) { + // 淇鏁版嵁璁块棶璺緞锛岀洿鎺ヤ娇鐢╮es.result鑰岄潪res.result.records + this.dataSource = res.result; + } + if (res.code === 510) { + this.$message.warning(res.message) + } + this.loading = false; + }) + }, + + handleCancel() { + this.$emit('close'); + this.visible = false; + }, + } +} +</script> +<style scoped> +@import '~@assets/less/common.less'; +</style> -- Gitblit v1.9.3