From aff1a5772218dea4df312cae68d1805660ae9701 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Mon, 26 Jan 2026 19:51:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=B7=BB=E5=8A=A0=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=BD=93=E5=89=8D=E9=A1=B5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 10 ++-- src/views/EquipmentLedger/index.vue | 54 +++++++++++++++++-- .../toolsManage/codeToolsLedger/index.vue | 48 +++++++++++++++-- src/views/toolsManage/toolsLedger/index.vue | 49 +++++++++++++++-- 4 files changed, 144 insertions(+), 17 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 827fd731..a37d73ac 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -339,8 +339,8 @@
确定
-
职能菜单
-
+
收藏菜单
+
{{ item.name }}
取消
@@ -353,7 +353,7 @@
-
+
@@ -464,7 +464,7 @@ export default { isHover:-1, isHover2:-1, zhinengList:[],//{name:"入库申请",url:'/all/stockManagement/entryApply'},{name:"出库申请",url:'/all/business/outbound/addApply'} - xiangmuList:[], + // xiangmuList:[], } }, computed: { diff --git a/src/views/EquipmentLedger/index.vue b/src/views/EquipmentLedger/index.vue index bef4e982..fceab3cf 100644 --- a/src/views/EquipmentLedger/index.vue +++ b/src/views/EquipmentLedger/index.vue @@ -363,7 +363,16 @@ @queryTable="getDeviceList" :columns="columns2" style="margin-left: 20px;margin-right: 20px;" > - + + + 导出 + + + 导出当前页 + 导出全部 + + + @@ -1041,7 +1050,8 @@ export default { { dictLabel: '检测证书', type: '3' }, { dictLabel: '采购发票', type: '4' }, { dictLabel: '装备二维码', type: '5' } - ] + ], + isDropdownOpen: false, } }, computed: { @@ -1249,10 +1259,41 @@ export default { this.$router.push('/equipment/equStore') }, + // 导出按钮下拉菜单触发 + handleCommand(command) { + switch (command) { + case 'handleDownloadAll': + this.exportData() + break + case 'handleDownloadPage': + this.exportDataPage() + break + default: + break + } + }, + handleVisibleChange(visible) { + this.isDropdownOpen = visible; + }, /** * 导出数据 */ exportData() { + this.$message.info('正在导出数据,请稍候...') + // 导出逻辑实现 + try { + let fileName = `装备台账_${new Date().getTime()}.xLsx` + let url = '/material-mall/device/export' + const params = { ...this.queryParams } + params.pageNum=null + params.pageSize=null + console.log('🚀 ~ 导出 ~ params:', params) + this.download(url, params, fileName) + } catch (error) { + console.log('导出数据失败', error) + } + }, + exportDataPage() { this.$message.info('正在导出数据,请稍候...') // 导出逻辑实现 try { @@ -2303,5 +2344,10 @@ export default { vertical-align: top; color: rgba(0,0,0,.65); } - +.el-icon-arrow-up { + transition: transform 0.3s ease; +} +.el-icon-arrow-up.rotate { + transform: rotate(180deg); +} diff --git a/src/views/toolsManage/codeToolsLedger/index.vue b/src/views/toolsManage/codeToolsLedger/index.vue index b548b7c9..dd68a327 100644 --- a/src/views/toolsManage/codeToolsLedger/index.vue +++ b/src/views/toolsManage/codeToolsLedger/index.vue @@ -98,9 +98,19 @@
编码工具台账列表
- + + + + 导出 + + + 导出当前页 + 导出全部 + + + @@ -513,6 +523,7 @@ export default { fileType: ['doc', 'docx', 'xls', 'xlsx', 'pdf', 'jpg', 'jpeg', 'png'], // 允许上传的文件类型 showTip: true, // 是否显示上传提示 number: 0, // 上传文件计数 + isDropdownOpen: false, } }, async created() { @@ -648,10 +659,26 @@ export default { this.getSelectList() }, + // 导出按钮下拉菜单触发 + handleCommand(command) { + switch (command) { + case 'handleDownloadAll': + this.handleExport() + break + case 'handleDownloadPage': + this.handleExportPage() + break + default: + break + } + }, + handleVisibleChange(visible) { + this.isDropdownOpen = visible; + }, /** * 导出数据 */ - handleExport() { + handleExportPage() { this.download( '/material-mall/toolLedger/export', { @@ -660,6 +687,15 @@ export default { `编码工具台账_${new Date().getTime()}.xlsx`, ) }, + handleExport() { + const params = { ...this.queryParams } + params.pageNum=null + params.pageSize=null + this.download( + '/material-mall/toolLedger/export',params, + `编码工具台账_${new Date().getTime()}.xlsx`, + ) + }, // 获取厂家 async getManufacturerSelect() { @@ -1036,4 +1072,10 @@ export default { display: none; } } +.el-icon-arrow-up { + transition: transform 0.3s ease; +} +.el-icon-arrow-up.rotate { + transform: rotate(180deg); +} diff --git a/src/views/toolsManage/toolsLedger/index.vue b/src/views/toolsManage/toolsLedger/index.vue index 813113d9..9e1e4a64 100644 --- a/src/views/toolsManage/toolsLedger/index.vue +++ b/src/views/toolsManage/toolsLedger/index.vue @@ -110,9 +110,18 @@
数量工具台账列表
- + + + + 导出 + + + 导出当前页 + 导出全部 + + @@ -391,7 +400,8 @@ export default { }, { label: '所在工程', prop: 'proName' } ], - dialogList: [] + dialogList: [], + isDropdownOpen: false, } }, async created() { @@ -577,11 +587,35 @@ export default { // console.log('导出数据失败', error) // } // }, - + // 导出按钮下拉菜单触发 + handleCommand(command) { + switch (command) { + case 'handleDownloadAll': + this.handleExport() + break + case 'handleDownloadPage': + this.handleExportPage() + break + default: + break + } + }, + handleVisibleChange(visible) { + this.isDropdownOpen = visible; + }, /** * 导出数据 */ handleExport() { + const params = { ...this.queryParams } + params.pageNum=null + params.pageSize=null + this.download( + '/material-mall/toolLedger/exportAll',params, + `工具台账_${new Date().getTime()}.xlsx` + ) + }, + handleExportPage() { this.download( '/material-mall/toolLedger/exportAll', { @@ -684,5 +718,10 @@ export default { display: none; } } - +.el-icon-arrow-up { + transition: transform 0.3s ease; +} +.el-icon-arrow-up.rotate { + transform: rotate(180deg); +}