|
|
@ -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,7 +117,10 @@ |
|
|
|
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 { // 其他按钮 |
|
|
@ -121,9 +128,15 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
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) |
|
|
|
} |
|
|
|
} |
|
|
|