From 58b315b7fb6d02d859cdb9880366aeb7edba101c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Fri, 10 May 2024 13:37:06 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/eam/basic/location/index.vue | 19 +++++++++++++++++-- src/views/eam/report/itemWarning/index.vue | 12 ++++++------ .../{item.data.ts => itemWarning.data.ts} | 0 3 files changed, 23 insertions(+), 8 deletions(-) rename src/views/eam/report/itemWarning/{item.data.ts => itemWarning.data.ts} (100%) diff --git a/src/views/eam/basic/location/index.vue b/src/views/eam/basic/location/index.vue index 13ab787..56a7cb6 100644 --- a/src/views/eam/basic/location/index.vue +++ b/src/views/eam/basic/location/index.vue @@ -46,6 +46,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' + import { getAccessToken } from '@/utils/auth' defineOptions({ name: 'Location' }) @@ -57,6 +58,8 @@ routeName.value = route.name const tableColumns = ref(Location.allSchemas.tableColumns) const importFormRef = ref() + const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL + const src = ref(BASE_URL + '/jmreport/view/948743576290918400?token=' + getAccessToken()) // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { @@ -92,6 +95,7 @@ defaultButtons.defaultAddBtn({hasPermi:'basic:location:create'}), // 新增 defaultButtons.defaultImportBtn(null), // 导入 defaultButtons.defaultExportBtn({hasPermi:'basic:location:update'}), // 导出 + defaultButtons.selectQrCodeBatchBtn(null), //批量生成二维码 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -113,17 +117,26 @@ handleImport() } else if (val == 'export') { // 导出 handleExport() - } else if (val == 'refresh') { // 刷新 + }else if (val == 'qrCodeBatch') { + // 批量生成二维码 + qrCodeBatch(val, item) + }else if (val == 'refresh') { // 刷新 getList() } else if (val == 'filtrate') { // 筛选 } else { // 其他按钮 console.log('其他按钮', item) } } + + const qrCodeBatch = async (val,item) => { + const qrCodeList = tableObject.tableList.map(item => `'${item?.number}'`).join(', ') + window.open(src.value + "&number=" + qrCodeList) + } // 列表-操作按钮 const butttondata = [ defaultButtons.mainListEditBtn({hasPermi:'basic:location:update'}), // 编辑 + defaultButtons.selectQrCodeBtn(null), //二维码 defaultButtons.mainListDeleteBtn({hasPermi:'basic:location:delete'}), // 删除 ] @@ -131,7 +144,9 @@ const buttonTableClick = async (val, row) => { if (val == 'edit') { // 编辑 openForm('update', row) - } else if (val == 'delete') { // 删除 + } else if (val == 'qrCode') { + window.open(src.value + "&number='" + row.number + "'") + } else if (val == 'delete') { // 删除 handleDelete(row.id) } } diff --git a/src/views/eam/report/itemWarning/index.vue b/src/views/eam/report/itemWarning/index.vue index cf6726e..4d76b8c 100644 --- a/src/views/eam/report/itemWarning/index.vue +++ b/src/views/eam/report/itemWarning/index.vue @@ -42,7 +42,7 @@