feat: add permission
parent
d0dbb951cf
commit
fc1d741b22
|
@ -15,7 +15,7 @@ const emit = defineEmits(['success', 'register'])
|
|||
const title = ref('修改密码')
|
||||
|
||||
const [registerForm, { resetFields, validate }] = useForm({
|
||||
labelWidth: 100,
|
||||
labelWidth: 120,
|
||||
baseColProps: { span: 24 },
|
||||
schemas: passwordSchema,
|
||||
showActionButtonGroup: false,
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="warning" @click="handleExport"> {{ t('action.export') }} </a-button>
|
||||
<a-button type="warning" v-auth="['infra:api-access-log:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
||||
{{ t('action.export') }}
|
||||
</a-button>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
|
@ -11,6 +13,7 @@
|
|||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { useMessage } from '@/hooks/web/useMessage'
|
||||
import { BasicTable, useTable } from '@/components/Table'
|
||||
import { IconEnum } from '@/enums/appEnum'
|
||||
import { getApiAccessLogPage, exportApiAccessLog, ApiAccessLogExportReqVO } from '@/api/infra/apiAccessLog'
|
||||
import { columns, searchFormSchema } from './apiAccessLog.data'
|
||||
|
||||
|
@ -20,10 +23,7 @@ const [registerTable, { getForm }] = useTable({
|
|||
title: '访问日志列表',
|
||||
api: getApiAccessLogPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="warning" @click="handleExport"> {{ t('action.export') }} </a-button>
|
||||
<a-button type="warning" v-auth="['infra:api-error-log:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
||||
{{ t('action.export') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
|
@ -11,12 +13,14 @@
|
|||
{
|
||||
icon: IconEnum.EDIT,
|
||||
label: '已处理',
|
||||
auth: 'infra:api-error-log:update-status',
|
||||
ifShow: () => record.processStatus === InfraApiErrorLogProcessStatusEnum.INIT,
|
||||
onClick: handleProcessClick.bind(null, record, InfraApiErrorLogProcessStatusEnum.DONE, '已处理')
|
||||
},
|
||||
{
|
||||
icon: IconEnum.EDIT,
|
||||
label: '已忽略',
|
||||
auth: 'infra:api-error-log:update-status',
|
||||
ifShow: () => record.processStatus === InfraApiErrorLogProcessStatusEnum.INIT,
|
||||
onClick: handleProcessClick.bind(null, record, InfraApiErrorLogProcessStatusEnum.IGNORE, '已忽略')
|
||||
}
|
||||
|
@ -42,10 +46,7 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
title: '异常日志列表',
|
||||
api: getApiErrorLogPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
|
|
@ -2,18 +2,21 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.IMPORT" @click="openImportTableModal(true)"> {{ t('action.import') }} </a-button>
|
||||
<a-button type="primary" v-auth="['infra:codegen:create']" :preIcon="IconEnum.IMPORT" @click="openImportTableModal(true)">
|
||||
{{ t('action.import') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: '预览', onClick: handlePreview.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEditTable.bind(null, record) },
|
||||
{ icon: IconEnum.DOWNLOAD, label: '生成', onClick: handleGenTable.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: '预览', auth: 'infra:codegen:preview', onClick: handlePreview.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'infra:codegen:update', onClick: handleEditTable.bind(null, record) },
|
||||
{ icon: IconEnum.DOWNLOAD, label: '生成', auth: 'infra:codegen:download', onClick: handleGenTable.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.RESET,
|
||||
label: '同步',
|
||||
auth: 'infra:codegen:update',
|
||||
popConfirm: {
|
||||
title: '确认要强制同步' + record.tableName + '表结构吗?',
|
||||
placement: 'left',
|
||||
|
@ -24,6 +27,7 @@
|
|||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'infra:codegen:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -61,10 +65,7 @@ const [registerTable, { reload }] = useTable({
|
|||
title: '代码生成列表',
|
||||
api: getCodegenTablePage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
|
|
@ -2,18 +2,23 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="warning" :preIcon="IconEnum.EXPORT" @click="handleExport"> {{ t('action.export') }} </a-button>
|
||||
<a-button type="primary" v-auth="['infra:config:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
<a-button type="warning" v-auth="['infra:config:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
||||
{{ t('action.export') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'infra:config:update', onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'infra:config:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -46,10 +51,7 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
title: '配置中心列表',
|
||||
api: getConfigPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
@ -62,16 +64,11 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleExport() {
|
||||
|
|
|
@ -2,18 +2,27 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="primary" v-auth="['infra:data-source-config:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), ifShow: record.id !== 0, onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.EDIT,
|
||||
label: t('action.edit'),
|
||||
ifShow: record.id !== 0,
|
||||
auth: 'infra:data-source-config:update',
|
||||
onClick: handleEdit.bind(null, record)
|
||||
},
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
ifShow: record.id !== 0,
|
||||
auth: 'infra:data-source-config:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -59,16 +68,11 @@ const [registerTable, { reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleDelete(record: Recordable) {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'infra:file:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -40,10 +41,7 @@ const [registerTable, { reload }] = useTable({
|
|||
title: '文件列表',
|
||||
api: getFilePage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
|
|
@ -14,7 +14,7 @@ const emit = defineEmits(['success', 'register'])
|
|||
const isUpdate = ref(true)
|
||||
|
||||
const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
|
||||
labelWidth: 100,
|
||||
labelWidth: 120,
|
||||
baseColProps: { span: 24 },
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false,
|
||||
|
|
|
@ -2,19 +2,22 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="primary" v-auth="['infra:file-config:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
|
||||
{ icon: IconEnum.TEST, label: t('action.test'), onClick: handleTest.bind(null, record) },
|
||||
{ icon: IconEnum.AUTH, label: '主配置', onClick: handleMaster.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'infra:file-config:update', onClick: handleEdit.bind(null, record) },
|
||||
{ icon: IconEnum.TEST, label: t('action.test'), auth: 'infra:file-config:update', onClick: handleTest.bind(null, record) },
|
||||
{ icon: IconEnum.AUTH, label: '主配置', auth: 'infra:file-config:update', onClick: handleMaster.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'infra:file-config:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -47,10 +50,7 @@ const [registerTable, { reload }] = useTable({
|
|||
title: '文件配置列表',
|
||||
api: getFileConfigPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
@ -63,16 +63,11 @@ const [registerTable, { reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleTest(record: Recordable) {
|
||||
|
|
|
@ -14,7 +14,7 @@ const emit = defineEmits(['success', 'register'])
|
|||
const isUpdate = ref(true)
|
||||
|
||||
const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
|
||||
labelWidth: 100,
|
||||
labelWidth: 120,
|
||||
baseColProps: { span: 24 },
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false,
|
||||
|
|
|
@ -2,23 +2,28 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="warning" :preIcon="IconEnum.EXPORT" @click="handleExport"> {{ t('action.export') }} </a-button>
|
||||
<a-button type="primary" v-auth="['infra:job:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
<a-button type="warning" v-auth="['infra:job:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
||||
{{ t('action.export') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) }]"
|
||||
:dropDownActions="[
|
||||
{ icon: IconEnum.EDIT, label: '开启', onClick: handleChangeStatus.bind(null, record, true) },
|
||||
{ icon: IconEnum.EDIT, label: '暂停', onClick: handleChangeStatus.bind(null, record, false) },
|
||||
{ icon: IconEnum.EDIT, label: '执行一次', onClick: handleRun.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: '任务详细', onClick: handleView.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: '调度日志', onClick: handleJobLog.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: '开启', auth: 'infra:job:update', onClick: handleChangeStatus.bind(null, record, true) },
|
||||
{ icon: IconEnum.EDIT, label: '暂停', auth: 'infra:job:update', onClick: handleChangeStatus.bind(null, record, false) },
|
||||
{ icon: IconEnum.EDIT, label: '执行一次', auth: 'infra:job:trigger', onClick: handleRun.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: '任务详细', auth: 'infra:job:query', onClick: handleView.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: '调度日志', auth: 'infra:job:query', onClick: handleJobLog.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'infra:job:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -52,10 +57,7 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
title: '定时任务列表',
|
||||
api: getJobPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
@ -68,16 +70,11 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
function handleChangeStatus(record: Recordable, open: boolean) {
|
||||
|
|
|
@ -31,7 +31,7 @@ const ListItemMeta = List.Item.Meta
|
|||
const listData = ref<any[]>([])
|
||||
|
||||
const [registerForm, { setFieldsValue, resetFields }] = useForm({
|
||||
labelWidth: 100,
|
||||
labelWidth: 120,
|
||||
baseColProps: { span: 24 },
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false,
|
||||
|
|
|
@ -10,7 +10,7 @@ import { formSchema } from './area.data'
|
|||
import { getAreaByIp } from '@/api/system/area'
|
||||
|
||||
const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
|
||||
labelWidth: 100,
|
||||
labelWidth: 120,
|
||||
baseColProps: { span: 24 },
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false,
|
||||
|
|
|
@ -57,10 +57,7 @@ const [register, { expandAll, collapseAll, getForm, reload }] = useTable({
|
|||
api: getList,
|
||||
columns,
|
||||
rowKey: 'id',
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
isTreeTable: true,
|
||||
pagination: false,
|
||||
useSearchForm: true,
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:error-code:edit', onClick: handleEdit.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:error-code:update', onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
|
@ -50,10 +50,7 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
title: '错误码列表',
|
||||
api: getErrorCodePage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
|
|
@ -20,10 +20,7 @@ const [registerTable, { getForm }] = useTable({
|
|||
title: '登录日志列表',
|
||||
api: getLoginLogPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false
|
||||
|
|
|
@ -47,10 +47,7 @@ const [registerTable, { reload }] = useTable({
|
|||
title: '邮件列表',
|
||||
api: getMailAccountPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
|
|
@ -12,10 +12,7 @@ const [registerTable] = useTable({
|
|||
title: '邮件日志列表',
|
||||
api: getMailAccountPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false
|
||||
|
|
|
@ -2,17 +2,31 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="primary" v-auth="['system:mail-template:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.EDIT,
|
||||
label: t('action.test'),
|
||||
auth: 'system:mail-template:send-mail',
|
||||
onClick: handleSend.bind(null, record)
|
||||
},
|
||||
{
|
||||
icon: IconEnum.EDIT,
|
||||
label: t('action.edit'),
|
||||
auth: 'system:mail-template:update',
|
||||
onClick: handleEdit.bind(null, record)
|
||||
},
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'system:mail-template:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -34,7 +48,7 @@ import { useModal } from '@/components/Modal'
|
|||
import TemplateModal from './TemplateModal.vue'
|
||||
import { IconEnum } from '@/enums/appEnum'
|
||||
import { BasicTable, useTable, TableAction } from '@/components/Table'
|
||||
import { deleteMailTemplate, getMailTemplatePage } from '@/api/system/mail/template'
|
||||
import { deleteMailTemplate, getMailTemplatePage, sendMail } from '@/api/system/mail/template'
|
||||
import { columns, searchFormSchema } from './template.data'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
@ -44,10 +58,7 @@ const [registerTable, { reload }] = useTable({
|
|||
title: '邮件模板列表',
|
||||
api: getMailTemplatePage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
@ -60,16 +71,17 @@ const [registerTable, { reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleSend(record: Recordable) {
|
||||
console.info(record)
|
||||
// TODO
|
||||
sendMail(null)
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleDelete(record: Recordable) {
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
<div>
|
||||
<BasicTable @register="register">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="primary" v-auth="['system:menu:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
<a-button type="info" @click="expandAll">{{ t('component.tree.expandAll') }}</a-button>
|
||||
<a-button type="info" @click="collapseAll">{{ t('component.tree.unExpandAll') }}</a-button>
|
||||
</template>
|
||||
|
@ -10,11 +12,12 @@
|
|||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:menu:update', onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'system:menu:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -49,10 +52,7 @@ const [register, { expandAll, collapseAll, getForm, reload }] = useTable({
|
|||
api: getList,
|
||||
columns,
|
||||
rowKey: 'id',
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
isTreeTable: true,
|
||||
pagination: false,
|
||||
striped: false,
|
||||
|
@ -74,16 +74,11 @@ async function getList() {
|
|||
}
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleDelete(record: Recordable) {
|
||||
|
|
|
@ -2,17 +2,20 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="primary" v-auth="['system:notice:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:notice:update', onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'system:notice:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -44,10 +47,7 @@ const [registerTable, { reload }] = useTable({
|
|||
title: '公告列表',
|
||||
api: getNoticePage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
@ -60,16 +60,11 @@ const [registerTable, { reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleDelete(record: Recordable) {
|
||||
|
|
|
@ -12,10 +12,7 @@ const [registerTable] = useTable({
|
|||
title: '站内信记录列表',
|
||||
api: getNotifyMessagePage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false
|
||||
|
|
|
@ -28,10 +28,7 @@ const [registerTable, { getSelectRowKeys, reload }] = useTable({
|
|||
title: '我的站内信列表',
|
||||
api: getMyNotifyMessagePage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
rowSelection: { type: 'checkbox' },
|
||||
rowKey: 'id',
|
||||
useSearchForm: true,
|
||||
|
|
|
@ -2,17 +2,25 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="primary" v-auth="['system:notify-template:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.EDIT,
|
||||
label: t('action.edit'),
|
||||
auth: 'system:notify-template:update',
|
||||
onClick: handleEdit.bind(null, record)
|
||||
},
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'system:notify-template:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -45,10 +53,7 @@ const [registerTable, { reload }] = useTable({
|
|||
title: '站内信模板列表',
|
||||
api: getNotifyTemplatePage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
@ -61,16 +66,11 @@ const [registerTable, { reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleDelete(record: Recordable) {
|
||||
|
|
|
@ -2,17 +2,20 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="primary" v-auth="['system:oauth2-client:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:oauth2-client:update', onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'system:oauth2-client:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -44,10 +47,7 @@ const [registerTable, { reload }] = useTable({
|
|||
title: '应用列表',
|
||||
api: getOAuth2ClientPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
@ -60,16 +60,11 @@ const [registerTable, { reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleDelete(record: Recordable) {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: '强退',
|
||||
auth: 'system:oauth2-token:delete',
|
||||
popConfirm: {
|
||||
title: '是否确认强退',
|
||||
placement: 'left',
|
||||
|
@ -36,10 +37,7 @@ const [registerTable, { reload }] = useTable({
|
|||
title: 'Token列表',
|
||||
api: getAccessTokenPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
|
|
@ -21,10 +21,7 @@ const [registerTable, { getForm }] = useTable({
|
|||
title: '操作日志列表',
|
||||
api: getOperateLogPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false
|
||||
|
|
|
@ -51,10 +51,7 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
title: '岗位列表',
|
||||
api: getPostPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
actionColumn: {
|
||||
|
|
|
@ -14,7 +14,7 @@ const emit = defineEmits(['success', 'register'])
|
|||
const isUpdate = ref(true)
|
||||
|
||||
const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
|
||||
labelWidth: 100,
|
||||
labelWidth: 120,
|
||||
baseColProps: { span: 24 },
|
||||
schemas: dataScopeFormSchema,
|
||||
showActionButtonGroup: false,
|
||||
|
|
|
@ -2,20 +2,37 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="warning" :preIcon="IconEnum.EXPORT" @click="handleExport"> {{ t('action.export') }} </a-button>
|
||||
<a-button type="primary" v-auth="['system:role:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
<a-button type="warning" v-auth="['system:role:create']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
||||
{{ t('action.export') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) }]"
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:role:update', onClick: handleEdit.bind(null, record) }
|
||||
]"
|
||||
:dropDownActions="[
|
||||
{ icon: IconEnum.EDIT, label: '菜单权限', onClick: handleEdit.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: '数据权限', onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.EDIT,
|
||||
label: '菜单权限',
|
||||
auth: 'system:permission:assign-role-menu',
|
||||
onClick: handleEdit.bind(null, record)
|
||||
},
|
||||
{
|
||||
icon: IconEnum.EDIT,
|
||||
label: '数据权限',
|
||||
auth: 'system:permission:assign-role-data-scope',
|
||||
onClick: handleEdit.bind(null, record)
|
||||
},
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'system:role:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -47,10 +64,7 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
title: '角色列表',
|
||||
api: getRolePage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
@ -63,16 +77,11 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleExport() {
|
||||
|
|
|
@ -14,7 +14,7 @@ const emit = defineEmits(['success', 'register'])
|
|||
const isUpdate = ref(true)
|
||||
|
||||
const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
|
||||
labelWidth: 100,
|
||||
labelWidth: 120,
|
||||
baseColProps: { span: 24 },
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false,
|
||||
|
|
|
@ -2,18 +2,28 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="warning" :preIcon="IconEnum.EXPORT" @click="handleExport"> {{ t('action.export') }} </a-button>
|
||||
<a-button type="primary" v-auth="['system:sensitive-word:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
<a-button type="warning" v-auth="['system:sensitive-word:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
||||
{{ t('action.export') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.EDIT,
|
||||
label: t('action.edit'),
|
||||
auth: 'system:sensitive-word:delete',
|
||||
onClick: handleEdit.bind(null, record)
|
||||
},
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'system:sensitive-word:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -45,10 +55,7 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
title: '敏感词列表',
|
||||
api: getSensitiveWordPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
@ -61,16 +68,11 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleExport() {
|
||||
|
|
|
@ -14,7 +14,7 @@ const emit = defineEmits(['success', 'register'])
|
|||
const isUpdate = ref(true)
|
||||
|
||||
const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
|
||||
labelWidth: 100,
|
||||
labelWidth: 120,
|
||||
baseColProps: { span: 24 },
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false,
|
||||
|
|
|
@ -2,17 +2,20 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="primary" v-auth="['system:sms-channel:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:sms-channel:update', onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'system:sms-channel:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -45,10 +48,7 @@ const [registerTable, { reload }] = useTable({
|
|||
title: '短信渠道列表',
|
||||
api: getSmsChannelPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
@ -61,16 +61,11 @@ const [registerTable, { reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleDelete(record: Recordable) {
|
||||
|
|
|
@ -2,13 +2,16 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="warning" @click="handleExport"> {{ t('action.export') }} </a-button>
|
||||
<a-button type="warning" v-auth="['system:sms-log:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
||||
{{ t('action.export') }}
|
||||
</a-button>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup name="SmsLog">
|
||||
import { BasicTable, useTable } from '@/components/Table'
|
||||
import { IconEnum } from '@/enums/appEnum'
|
||||
import { SmsLogExportReqVO, exportSmsLog, getSmsLogPage } from '@/api/system/sms/smsLog'
|
||||
import { columns, searchFormSchema } from './smsLog.data'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
|
@ -20,10 +23,7 @@ const [registerTable, { getForm }] = useTable({
|
|||
title: '短信日志列表',
|
||||
api: getSmsLogPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false
|
||||
|
|
|
@ -2,19 +2,29 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="warning" :preIcon="IconEnum.EXPORT" @click="handleExport"> {{ t('action.export') }} </a-button>
|
||||
<a-button type="primary" v-auth="['system:sms-template:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
<a-button type="warning" v-auth="['system:sms-template:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
||||
{{ t('action.export') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.TEST, label: t('action.test'), onClick: handleSendSms.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.TEST,
|
||||
label: t('action.test'),
|
||||
auth: 'system:sms-template:send-sms',
|
||||
onClick: handleSendSms.bind(null, record)
|
||||
},
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:sms-template:update', onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'system:sms-template:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -46,10 +56,7 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
title: '短信模版列表',
|
||||
api: getSmsTemplatePage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
@ -62,9 +69,7 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleSendSms(record: Recordable) {
|
||||
|
@ -72,10 +77,7 @@ function handleSendSms(record: Recordable) {
|
|||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleExport() {
|
||||
|
|
|
@ -2,18 +2,23 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="warning" :preIcon="IconEnum.EXPORT" @click="handleExport"> {{ t('action.export') }} </a-button>
|
||||
<a-button type="primary" v-auth="['system:tenant:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
<a-button type="warning" v-auth="['system:tenant:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
||||
{{ t('action.export') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:tenant:update', onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'system:tenant:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -45,10 +50,7 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
title: '租户列表',
|
||||
api: getTenantPage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
@ -61,16 +63,11 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleExport() {
|
||||
|
|
|
@ -2,17 +2,25 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="primary" v-auth="['system:tenant-package:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.EDIT,
|
||||
label: t('action.edit'),
|
||||
auth: 'system:tenant-package:update',
|
||||
onClick: handleEdit.bind(null, record)
|
||||
},
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'system:tenant-package:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -44,10 +52,7 @@ const [registerTable, { reload }] = useTable({
|
|||
title: '租户套餐列表',
|
||||
api: getTenantPackagePage,
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema
|
||||
},
|
||||
formConfig: { labelWidth: 120, schemas: searchFormSchema },
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
showIndexColumn: false,
|
||||
|
@ -60,16 +65,11 @@ const [registerTable, { reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleDelete(record: Recordable) {
|
||||
|
|
|
@ -3,18 +3,23 @@
|
|||
<DeptTree class="w-1/4 xl:w-1/5" @select="handleSelect" />
|
||||
<BasicTable @register="registerTable" class="w-3/4 xl:w-4/5" :searchInfo="searchInfo">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" :preIcon="IconEnum.ADD" @click="handleCreate"> {{ t('action.create') }} </a-button>
|
||||
<a-button type="warning" :preIcon="IconEnum.EXPORT" @click="handleExport"> {{ t('action.export') }} </a-button>
|
||||
<a-button type="primary" v-auth="['system:user:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
|
||||
{{ t('action.create') }}
|
||||
</a-button>
|
||||
<a-button type="warning" v-auth="['system:user:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
|
||||
{{ t('action.export') }}
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleEdit.bind(null, record) },
|
||||
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'system:user:update', onClick: handleEdit.bind(null, record) },
|
||||
{
|
||||
icon: IconEnum.DELETE,
|
||||
color: 'error',
|
||||
label: t('action.delete'),
|
||||
auth: 'system:user:delete',
|
||||
popConfirm: {
|
||||
title: t('common.delMessage'),
|
||||
placement: 'left',
|
||||
|
@ -67,9 +72,7 @@ const [registerTable, { getForm, reload }] = useTable({
|
|||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
isUpdate: false
|
||||
})
|
||||
openModal(true, { isUpdate: false })
|
||||
}
|
||||
|
||||
async function handleExport() {
|
||||
|
@ -85,10 +88,7 @@ async function handleExport() {
|
|||
}
|
||||
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true
|
||||
})
|
||||
openModal(true, { record, isUpdate: true })
|
||||
}
|
||||
|
||||
async function handleDelete(record: Recordable) {
|
||||
|
|
Loading…
Reference in New Issue