|
|
@ -107,6 +107,7 @@ import * as DeviceMaintainOrderMainApi from '@/api/eam/device/deviceMaintainOrde |
|
|
|
import * as DeviceMaintainOrderDetailApi from '@/api/eam/device/deviceMaintainOrderDetail' |
|
|
|
import * as DeviceMaintenanceMainApi from '@/api/eam/device/deviceMaintenanceMain' |
|
|
|
import * as deviceMaintenanceDetailApi from '@/api/eam/device/deviceMaintenanceDetail' |
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
|
|
|
|
import { |
|
|
|
DeviceMaintainOrderMain, |
|
|
@ -162,8 +163,9 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn(null), // 新增 |
|
|
|
defaultButtons.defaultImportBtn(null), // 导入 |
|
|
|
defaultButtons.defaultExportBtn(null), // 导出 |
|
|
|
defaultButtons.selectQrCodeBatchBtn(null), //批量生成二维码 |
|
|
|
// defaultButtons.defaultImportBtn(null), // 导入 |
|
|
|
// defaultButtons.defaultExportBtn(null), // 导出 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
|
@ -185,6 +187,9 @@ const buttonBaseClick = (val, item) => { |
|
|
|
} else if (val == 'import') { |
|
|
|
// 导入 |
|
|
|
handleImport() |
|
|
|
} else if (val == 'qrCodeBatch') { |
|
|
|
// 批量生成二维码 |
|
|
|
qrCodeBatch(val, item) |
|
|
|
} else if (val == 'export') { |
|
|
|
// 导出 |
|
|
|
handleExport() |
|
|
@ -207,6 +212,10 @@ const butttondata = [ |
|
|
|
defaultButtons.selectItemBtn(null) //备件 |
|
|
|
] |
|
|
|
|
|
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
|
const src = ref(BASE_URL + '/jmreport/view/924818618605031424?token=' + getAccessToken()) |
|
|
|
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'edit') { |
|
|
@ -217,9 +226,17 @@ const buttonTableClick = async (val, row) => { |
|
|
|
openQrCode(row.number) |
|
|
|
} else if (val == 'selectItem') { |
|
|
|
openItem(row.number) |
|
|
|
} else if (val == 'qrCode') { |
|
|
|
window.open(src.value + "&number='" + row.number + "'") |
|
|
|
} else { |
|
|
|
// 其他按钮 |
|
|
|
console.log('其他按钮', val, row) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
|
const basicFormRef = ref() |
|
|
|
const openForm = (type: string, row?: any) => { |
|
|
@ -475,4 +492,9 @@ const getDeviceItemBindData = async (params) => { |
|
|
|
return response?.data; |
|
|
|
} |
|
|
|
|
|
|
|
const qrCodeBatch = async (val,item) => { |
|
|
|
const qrCodeList = tableObject.tableList.map(item => `'${item?.number}'`).join(', ') |
|
|
|
window.open(src.value + "&number=" + qrCodeList) |
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|