|
|
@@ -2,7 +2,7 @@ |
|
|
|
<div> |
|
|
|
<crud-template v-if="itemStart" class="as-weight" :ref="(el) => crudRef = el" :home-data="field" |
|
|
|
@btnSearch="btnSearch" @refreshLeft="refreshLeft" :initData="initItem" :tableData="tableData" |
|
|
|
@handleEdit="handleEdit" @cancel="cancel" @CurrentChange="handleCurrentChange"> |
|
|
|
@handleEdit="handleEdit" @cancel="cancel" @importData="importData" @CurrentChange="handleCurrentChange"> |
|
|
|
<template #search> |
|
|
|
<el-form |
|
|
|
:model="searchForm" |
|
|
@@ -495,6 +495,23 @@ |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
function importData(url) { |
|
|
|
BaseService.postN('/managew/api/bls/obu/obuImport', { excelUrl: url }).then((res: any) => { |
|
|
|
if (res && res.code === 0) { |
|
|
|
console.log(res) |
|
|
|
const errUrl = res.data?.path ?? '' |
|
|
|
if (errUrl) { |
|
|
|
ElMessage.error("导入失败,请查看下载到本地文件的具体错误信息"); |
|
|
|
BaseService.getDownload( |
|
|
|
import.meta.env.VITE_APP_UPLOAD_URL + errUrl, |
|
|
|
'错误信息文件' |
|
|
|
) |
|
|
|
} else { |
|
|
|
ElMessage.success("导入成功"); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
// 新增下黑 |
|
|
|
function addBlack() { |
|
|
|
addForm.value.status = 1; //下黑 |