|
|
@ -34,6 +34,9 @@ |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="Item.allSchemas" /> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm ref="importFormRef" url="/eam/item/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
@ -59,6 +62,7 @@ |
|
|
|
routeName.value = route.name |
|
|
|
const itemNumber = ref(); |
|
|
|
const tableColumns = ref(Item.allSchemas.tableColumns) |
|
|
|
const importFormRef = ref() |
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
@ -83,8 +87,9 @@ |
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn({hasPermi:'basic:item:create'}), // 新增 |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'basic:item:export'}), // 导出 |
|
|
|
defaultButtons.defaultAddBtn({ hasPermi: 'basic:item:create' }), // 新增 |
|
|
|
defaultButtons.defaultImportBtn(null), // 导入 |
|
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'basic:item:export' }), // 导出 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
@ -94,6 +99,8 @@ |
|
|
|
const buttonBaseClick = (val, item) => { |
|
|
|
if (val == 'add') { // 新增 |
|
|
|
openForm('create') |
|
|
|
}else if (val == 'import') { // 导入 |
|
|
|
handleImport() |
|
|
|
} else if (val == 'export') { // 导出 |
|
|
|
handleExport() |
|
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
@ -106,9 +113,8 @@ |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = [ |
|
|
|
defaultButtons.mainListEditBtn({hasPermi:'basic:item:update'}), // 编辑 |
|
|
|
defaultButtons.chooseDeviceBtn({hasPermi:'basic:item:choose'}),//备件 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'basic:item:delete'}), // 删除 |
|
|
|
defaultButtons.mainListEditBtn({ hasPermi: 'basic:item:update' }), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({ hasPermi: 'basic:item:delete' }), // 删除 |
|
|
|
] |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
@ -233,7 +239,26 @@ |
|
|
|
exportLoading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onMounted(async () => { |
|
|
|
importTemplateData.templateUrl = await ItemApi.importTemplate() |
|
|
|
}) |
|
|
|
|
|
|
|
const handleImport = () => { |
|
|
|
importFormRef.value.open() |
|
|
|
} |
|
|
|
|
|
|
|
// 导入附件弹窗所需的参数 |
|
|
|
const importTemplateData = reactive({ |
|
|
|
templateUrl: '', |
|
|
|
templateTitle: '物料导入模版.xlsx' |
|
|
|
}) |
|
|
|
|
|
|
|
// 导入成功之后 |
|
|
|
const importSuccess = () => { |
|
|
|
getList() |
|
|
|
} |
|
|
|
|
|
|
|
// 筛选提交 |
|
|
|
const searchFormClick = (searchData) => { |
|
|
|
tableObject.params = { |
|
|
|