|
|
@ -18,7 +18,7 @@ |
|
|
|
import { useAsyncState } from '@vueuse/core' |
|
|
|
import { useAsyncState } from '@vueuse/core' |
|
|
|
import { queryTenantListPaging, deleteTenantById } from '@/service/modules/tenants' |
|
|
|
import { queryTenantListPaging, deleteTenantById } from '@/service/modules/tenants' |
|
|
|
import { reactive, h, ref } from 'vue' |
|
|
|
import { reactive, h, ref } from 'vue' |
|
|
|
import { NButton, NPopconfirm } from 'naive-ui' |
|
|
|
import { NButton, NPopconfirm, NSpace, NTooltip } from 'naive-ui' |
|
|
|
import { useI18n } from 'vue-i18n' |
|
|
|
import { useI18n } from 'vue-i18n' |
|
|
|
import { DeleteOutlined, EditOutlined } from '@vicons/antd' |
|
|
|
import { DeleteOutlined, EditOutlined } from '@vicons/antd' |
|
|
|
|
|
|
|
|
|
|
@ -35,7 +35,7 @@ export function useTable() { |
|
|
|
deleteTenantById(row.id).then(() => { |
|
|
|
deleteTenantById(row.id).then(() => { |
|
|
|
getTableData({ |
|
|
|
getTableData({ |
|
|
|
pageSize: variables.pageSize, |
|
|
|
pageSize: variables.pageSize, |
|
|
|
pageNo: variables.page, |
|
|
|
pageNo: (variables.tableData.length === 1 && variables.page > 1) ? variables.page - 1 : variables.page, |
|
|
|
searchVal: variables.searchVal |
|
|
|
searchVal: variables.searchVal |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
@ -48,7 +48,7 @@ export function useTable() { |
|
|
|
key: 'num', |
|
|
|
key: 'num', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: t('security.tenant.tenantCode'), |
|
|
|
title: t('security.tenant.tenant_code'), |
|
|
|
key: 'tenantCode', |
|
|
|
key: 'tenantCode', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
@ -56,24 +56,26 @@ export function useTable() { |
|
|
|
key: 'description', |
|
|
|
key: 'description', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: t('security.tenant.queueName'), |
|
|
|
title: t('security.tenant.queue_name'), |
|
|
|
key: 'queueName', |
|
|
|
key: 'queueName', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: t('security.tenant.createTime'), |
|
|
|
title: t('security.tenant.create_time'), |
|
|
|
key: 'createTime', |
|
|
|
key: 'createTime', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: t('security.tenant.updateTime'), |
|
|
|
title: t('security.tenant.update_time'), |
|
|
|
key: 'updateTime', |
|
|
|
key: 'updateTime', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: t('security.tenant.actions'), |
|
|
|
title: t('security.tenant.actions'), |
|
|
|
key: 'actions', |
|
|
|
key: 'actions', |
|
|
|
render(row: any) { |
|
|
|
render(row: any) { |
|
|
|
return h('div', null, [ |
|
|
|
return h(NSpace, null, { |
|
|
|
|
|
|
|
default: () => [ |
|
|
|
h( |
|
|
|
h( |
|
|
|
NButton, |
|
|
|
NTooltip, {}, { |
|
|
|
|
|
|
|
trigger: () => h(NButton, |
|
|
|
{ |
|
|
|
{ |
|
|
|
circle: true, |
|
|
|
circle: true, |
|
|
|
type: 'info', |
|
|
|
type: 'info', |
|
|
@ -86,6 +88,9 @@ export function useTable() { |
|
|
|
icon: () => h(EditOutlined) |
|
|
|
icon: () => h(EditOutlined) |
|
|
|
} |
|
|
|
} |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
default: () => t('security.tenant.edit') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
), |
|
|
|
h( |
|
|
|
h( |
|
|
|
NPopconfirm, |
|
|
|
NPopconfirm, |
|
|
|
{ |
|
|
|
{ |
|
|
@ -93,21 +98,25 @@ export function useTable() { |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
trigger: () => h( |
|
|
|
trigger: () => h( |
|
|
|
NButton, |
|
|
|
NTooltip, {}, { |
|
|
|
|
|
|
|
trigger: () => h(NButton, |
|
|
|
{ |
|
|
|
{ |
|
|
|
circle: true, |
|
|
|
circle: true, |
|
|
|
type: 'error', |
|
|
|
type: 'error', |
|
|
|
size: 'small', |
|
|
|
size: 'small', |
|
|
|
style: {'margin-left': '5px'}, |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
icon: () => h(DeleteOutlined), |
|
|
|
icon: () => h(DeleteOutlined) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
default: () => t('security.tenant.delete') |
|
|
|
} |
|
|
|
} |
|
|
|
), |
|
|
|
), |
|
|
|
default: () => {return t('security.tenant.delete_confirm')} |
|
|
|
default: () => t('security.tenant.delete_confirm') |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
]) |
|
|
|
] |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|