|
@ -46,6 +46,7 @@ |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
|
|
|
|
|
defineOptions({ name: 'Location' }) |
|
|
defineOptions({ name: 'Location' }) |
|
|
|
|
|
|
|
@ -57,6 +58,8 @@ |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
const tableColumns = ref(Location.allSchemas.tableColumns) |
|
|
const tableColumns = ref(Location.allSchemas.tableColumns) |
|
|
const importFormRef = ref() |
|
|
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) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
@ -92,6 +95,7 @@ |
|
|
defaultButtons.defaultAddBtn({hasPermi:'basic:location:create'}), // 新增 |
|
|
defaultButtons.defaultAddBtn({hasPermi:'basic:location:create'}), // 新增 |
|
|
defaultButtons.defaultImportBtn(null), // 导入 |
|
|
defaultButtons.defaultImportBtn(null), // 导入 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'basic:location:update'}), // 导出 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'basic:location:update'}), // 导出 |
|
|
|
|
|
defaultButtons.selectQrCodeBatchBtn(null), //批量生成二维码 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
@ -113,17 +117,26 @@ |
|
|
handleImport() |
|
|
handleImport() |
|
|
} else if (val == 'export') { // 导出 |
|
|
} else if (val == 'export') { // 导出 |
|
|
handleExport() |
|
|
handleExport() |
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
}else if (val == 'qrCodeBatch') { |
|
|
|
|
|
// 批量生成二维码 |
|
|
|
|
|
qrCodeBatch(val, item) |
|
|
|
|
|
}else if (val == 'refresh') { // 刷新 |
|
|
getList() |
|
|
getList() |
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
} else { // 其他按钮 |
|
|
} else { // 其他按钮 |
|
|
console.log('其他按钮', item) |
|
|
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 = [ |
|
|
const butttondata = [ |
|
|
defaultButtons.mainListEditBtn({hasPermi:'basic:location:update'}), // 编辑 |
|
|
defaultButtons.mainListEditBtn({hasPermi:'basic:location:update'}), // 编辑 |
|
|
|
|
|
defaultButtons.selectQrCodeBtn(null), //二维码 |
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'basic:location:delete'}), // 删除 |
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'basic:location:delete'}), // 删除 |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
@ -131,7 +144,9 @@ |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'edit') { // 编辑 |
|
|
if (val == 'edit') { // 编辑 |
|
|
openForm('update', row) |
|
|
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) |
|
|
handleDelete(row.id) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|