|
|
@ -2,18 +2,23 @@ |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<BasicTable @register="registerTable"> |
|
|
|
<BasicTable @register="registerTable"> |
|
|
|
<template #toolbar> |
|
|
|
<template #toolbar> |
|
|
|
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button> |
|
|
|
<a-button type="primary" v-auth="['system:post:create']" :preIcon="IconEnum.ADD" @click="handleCreate"> |
|
|
|
<a-button type="warning" :preIcon="IconEnum.EXPORT" @click="handleExport"> {{ t('action.export') }} </a-button> |
|
|
|
{{ t('action.create') }} |
|
|
|
|
|
|
|
</a-button> |
|
|
|
|
|
|
|
<a-button type="warning" v-auth="['system:post:export']" :preIcon="IconEnum.EXPORT" @click="handleExport"> |
|
|
|
|
|
|
|
{{ t('action.export') }} |
|
|
|
|
|
|
|
</a-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #bodyCell="{ column, record }"> |
|
|
|
<template #bodyCell="{ column, record }"> |
|
|
|
<template v-if="column.key === 'action'"> |
|
|
|
<template v-if="column.key === 'action'"> |
|
|
|
<TableAction |
|
|
|
<TableAction |
|
|
|
:actions="[ |
|
|
|
:actions="[ |
|
|
|
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) }, |
|
|
|
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:post:update', onClick: handleEdit.bind(null, record) }, |
|
|
|
{ |
|
|
|
{ |
|
|
|
icon: IconEnum.DELETE, |
|
|
|
icon: IconEnum.DELETE, |
|
|
|
color: 'error', |
|
|
|
color: 'error', |
|
|
|
label: t('action.delete'), |
|
|
|
label: t('action.delete'), |
|
|
|
|
|
|
|
auth: 'system:post:delete', |
|
|
|
popConfirm: { |
|
|
|
popConfirm: { |
|
|
|
title: t('common.delMessage'), |
|
|
|
title: t('common.delMessage'), |
|
|
|
placement: 'left', |
|
|
|
placement: 'left', |
|
|
|