|
|
|
@ -11,9 +11,9 @@ |
|
|
|
|
<BasicTable @register="registerTable" :rowSelection="rowSelection"> |
|
|
|
|
<!--插槽:table标题--> |
|
|
|
|
<template #tableTitle> |
|
|
|
|
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> |
|
|
|
|
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>--> |
|
|
|
|
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> |
|
|
|
|
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> |
|
|
|
|
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>--> |
|
|
|
|
<a-dropdown v-if="selectedRowKeys.length > 0"> |
|
|
|
|
<template #overlay> |
|
|
|
|
<a-menu> |
|
|
|
@ -113,7 +113,7 @@ |
|
|
|
|
registerModal.value.disableSubmit = false; |
|
|
|
|
registerModal.value.add(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 编辑事件 |
|
|
|
|
*/ |
|
|
|
@ -122,7 +122,7 @@ |
|
|
|
|
registerModal1.value.disableSubmit = false; |
|
|
|
|
registerModal1.value.edit(record); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 详情 |
|
|
|
|
*/ |
|
|
|
@ -130,28 +130,28 @@ |
|
|
|
|
registerModal.value.disableSubmit = true; |
|
|
|
|
registerModal.value.edit(record); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 删除事件 |
|
|
|
|
*/ |
|
|
|
|
async function handleDelete(record) { |
|
|
|
|
await deleteOne({ id: record.id }, handleSuccess); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 批量删除事件 |
|
|
|
|
*/ |
|
|
|
|
async function batchHandleDelete() { |
|
|
|
|
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 成功回调 |
|
|
|
|
*/ |
|
|
|
|
function handleSuccess() { |
|
|
|
|
(selectedRowKeys.value = []) && reload(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 操作栏 |
|
|
|
|
*/ |
|
|
|
@ -171,7 +171,7 @@ |
|
|
|
|
function searchQuery() { |
|
|
|
|
reload(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 重置 |
|
|
|
|
*/ |
|
|
|
@ -181,7 +181,7 @@ |
|
|
|
|
//刷新数据 |
|
|
|
|
reload(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|