reactor:element-plus 移除 loading 的 fullscreen = true(默认就是 true)
parent
8d93c843ad
commit
e81a759e0d
|
@ -107,18 +107,22 @@ export function useTypeGridColumns(): VxeTableGridOptions['columns'] {
|
|||
{
|
||||
field: 'id',
|
||||
title: '字典编号',
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
field: 'name',
|
||||
title: '字典名称',
|
||||
minWidth: 200,
|
||||
},
|
||||
{
|
||||
field: 'type',
|
||||
title: '字典类型',
|
||||
minWidth: 220,
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
minWidth: 120,
|
||||
cellRender: {
|
||||
name: 'CellDict',
|
||||
props: { type: DICT_TYPE.COMMON_STATUS },
|
||||
|
@ -127,15 +131,17 @@ export function useTypeGridColumns(): VxeTableGridOptions['columns'] {
|
|||
{
|
||||
field: 'remark',
|
||||
title: '备注',
|
||||
minWidth: 180,
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
minWidth: 180,
|
||||
formatter: 'formatDateTime',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: 160,
|
||||
minWidth: 120,
|
||||
fixed: 'right',
|
||||
slots: { default: 'actions' },
|
||||
},
|
||||
|
@ -295,22 +301,27 @@ export function useDataGridColumns(): VxeTableGridOptions['columns'] {
|
|||
{
|
||||
field: 'id',
|
||||
title: '字典编码',
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
field: 'label',
|
||||
title: '字典标签',
|
||||
minWidth: 180,
|
||||
},
|
||||
{
|
||||
field: 'value',
|
||||
title: '字典键值',
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
field: 'sort',
|
||||
title: '字典排序',
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
minWidth: 100,
|
||||
cellRender: {
|
||||
name: 'CellDict',
|
||||
props: { type: DICT_TYPE.COMMON_STATUS },
|
||||
|
@ -319,21 +330,24 @@ export function useDataGridColumns(): VxeTableGridOptions['columns'] {
|
|||
{
|
||||
field: 'colorType',
|
||||
title: '颜色类型',
|
||||
minWidth: 120,
|
||||
slots: { default: 'colorType' },
|
||||
},
|
||||
{
|
||||
field: 'cssClass',
|
||||
title: 'CSS Class',
|
||||
minWidth: 120,
|
||||
slots: { default: 'cssClass' },
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
minWidth: 180,
|
||||
formatter: 'formatDateTime',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: 160,
|
||||
minWidth: 120,
|
||||
fixed: 'right',
|
||||
slots: { default: 'actions' },
|
||||
},
|
||||
|
|
|
@ -61,7 +61,6 @@ const submitForm = async () => {
|
|||
// 提交表单
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.updating'),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
// 拼接相关信息
|
||||
|
|
|
@ -75,7 +75,6 @@ function onEdit(row: InfraCodegenApi.CodegenTable) {
|
|||
async function onDelete(row: InfraCodegenApi.CodegenTable) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.tableName]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteCodegenTable(row.id);
|
||||
|
@ -107,7 +106,6 @@ async function onSync(row: InfraCodegenApi.CodegenTable) {
|
|||
async function onGenerate(row: InfraCodegenApi.CodegenTable) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '正在生成代码...',
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
const res = await downloadCodegen(row.id);
|
||||
|
|
|
@ -96,7 +96,6 @@ const [Modal, modalApi] = useVbenModal({
|
|||
// 2. 提交请求
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '导入中...',
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await createCodegenList(formData);
|
||||
|
|
|
@ -54,7 +54,6 @@ function onEdit(row: InfraConfigApi.Config) {
|
|||
async function onDelete(row: InfraConfigApi.Config) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteConfig(row.id as number);
|
||||
|
|
|
@ -42,7 +42,6 @@ function onEdit(row: InfraDataSourceConfigApi.DataSourceConfig) {
|
|||
async function onDelete(row: InfraDataSourceConfigApi.DataSourceConfig) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteDataSourceConfig(row.id as number);
|
||||
|
|
|
@ -62,7 +62,6 @@ function openUrl(url?: string) {
|
|||
async function onDelete(row: InfraFileApi.File) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name || row.path]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteFile(row.id as number);
|
||||
|
|
|
@ -49,7 +49,6 @@ function onEdit(row: InfraFileConfigApi.FileConfig) {
|
|||
async function onMaster(row: InfraFileConfigApi.FileConfig) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.updating', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await updateFileConfigMaster(row.id as number);
|
||||
|
@ -64,7 +63,6 @@ async function onMaster(row: InfraFileConfigApi.FileConfig) {
|
|||
async function onTest(row: InfraFileConfigApi.FileConfig) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '测试上传中...',
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
const response = await testFileConfig(row.id as number);
|
||||
|
@ -87,7 +85,6 @@ async function onTest(row: InfraFileConfigApi.FileConfig) {
|
|||
async function onDelete(row: InfraFileConfigApi.FileConfig) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteFileConfig(row.id as number);
|
||||
|
|
|
@ -107,7 +107,6 @@ function onLog(row?: InfraJobApi.Job) {
|
|||
async function onDelete(row: InfraJobApi.Job) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteJob(row.id as number);
|
||||
|
|
|
@ -37,7 +37,6 @@ function handleEdit(row: MallBrandApi.Brand) {
|
|||
async function handleDelete(row: MallBrandApi.Brand) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteBrand(row.id as number);
|
||||
|
|
|
@ -54,7 +54,6 @@ const handleViewSpu = (id: number) => {
|
|||
async function handleDelete(row: MallCategoryApi.Category) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteCategory(row.id as number);
|
||||
|
|
|
@ -42,7 +42,6 @@ function handleEdit(row: any) {
|
|||
async function handleDelete(row: MallPropertyApi.Property) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteProperty(row.id as number);
|
||||
|
|
|
@ -49,7 +49,6 @@ function handleEdit(row: MallPropertyApi.PropertyValue) {
|
|||
async function handleDelete(row: MallPropertyApi.PropertyValue) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deletePropertyValue(row.id as number);
|
||||
|
|
|
@ -100,7 +100,6 @@ function handleEdit(row: MallSpuApi.Spu) {
|
|||
async function handleDelete(row: MallSpuApi.Spu) {
|
||||
const hideLoading = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteSpu(row.id as number);
|
||||
|
|
|
@ -40,7 +40,6 @@ function handleEdit(row: MallArticleCategoryApi.ArticleCategory) {
|
|||
async function handleDelete(row: MallArticleCategoryApi.ArticleCategory) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteArticleCategory(row.id as number);
|
||||
|
|
|
@ -37,7 +37,6 @@ function handleEdit(row: MallArticleApi.Article) {
|
|||
async function handleDelete(row: MallArticleApi.Article) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.title]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteArticle(row.id as number);
|
||||
|
|
|
@ -37,7 +37,6 @@ function handleEdit(row: MallBannerApi.Banner) {
|
|||
async function handleDelete(row: MallBannerApi.Banner) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.title]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteBanner(row.id as number);
|
||||
|
|
|
@ -51,7 +51,6 @@ async function handleClose(row: MallBargainActivityApi.BargainActivity) {
|
|||
async function handleDelete(row: MallBargainActivityApi.BargainActivity) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteBargainActivity(row.id as number);
|
||||
|
|
|
@ -55,7 +55,6 @@ async function handleDelete(
|
|||
) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteCombinationActivity(row.id as number);
|
||||
|
|
|
@ -26,7 +26,6 @@ const statusTabs = ref(getStatusTabs());
|
|||
async function handleDelete(row: MallCouponApi.Coupon) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteCoupon(row.id as number);
|
||||
|
|
|
@ -46,7 +46,6 @@ function handleCreate() {
|
|||
async function handleDelete(row: MallCouponTemplateApi.CouponTemplate) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteCouponTemplate(row.id as number);
|
||||
|
@ -71,7 +70,6 @@ async function handleStatusChange(row: MallCouponTemplateApi.CouponTemplate) {
|
|||
const text = row.status === CommonStatusEnum.ENABLE ? '启用' : '停用';
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: `正在${text}优惠券模板...`,
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await updateCouponTemplateStatus(row.id as number, row.status as 0 | 1);
|
||||
|
|
|
@ -51,7 +51,6 @@ async function handleClose(row: MallDiscountActivityApi.DiscountActivity) {
|
|||
async function handleDelete(row: MallDiscountActivityApi.DiscountActivity) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteDiscountActivity(row.id as number);
|
||||
|
|
|
@ -49,7 +49,6 @@ function handleDecorate(row: MallDiyPageApi.DiyPage) {
|
|||
async function handleDelete(row: MallDiyPageApi.DiyPage) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteDiyPage(row.id as number);
|
||||
|
|
|
@ -62,7 +62,6 @@ async function handleUse(row: MallDiyTemplateApi.DiyTemplate) {
|
|||
async function handleDelete(row: MallDiyTemplateApi.DiyTemplate) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteDiyTemplate(row.id as number);
|
||||
|
|
|
@ -59,7 +59,6 @@ async function handleClose(row: MallPointActivityApi.PointActivity) {
|
|||
async function handleDelete(row: MallPointActivityApi.PointActivity) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.spuName]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deletePointActivity(row.id);
|
||||
|
|
|
@ -51,7 +51,6 @@ async function handleClose(row: MallRewardActivityApi.RewardActivity) {
|
|||
async function handleDelete(row: MallRewardActivityApi.RewardActivity) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteRewardActivity(row.id as number);
|
||||
|
|
|
@ -55,7 +55,6 @@ async function handleClose(row: MallSeckillActivityApi.SeckillActivity) {
|
|||
async function handleDelete(row: MallSeckillActivityApi.SeckillActivity) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteSeckillActivity(row.id as number);
|
||||
|
|
|
@ -41,7 +41,6 @@ function handleEdit(row: MallSeckillConfigApi.SeckillConfig) {
|
|||
async function handleDelete(row: MallSeckillConfigApi.SeckillConfig) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteSeckillConfig(row.id as number);
|
||||
|
|
|
@ -81,7 +81,6 @@ async function handleBrokerageEnabledChange(
|
|||
const text = row.brokerageEnabled ? '开通' : '关闭';
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: `正在${text}"${row.nickname}"的推广资格...`,
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await updateBrokerageEnabled({
|
||||
|
|
|
@ -48,7 +48,6 @@ function handleEdit(row: MallDeliveryExpressApi.DeliveryExpress) {
|
|||
async function handleDelete(row: MallDeliveryExpressApi.DeliveryExpress) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteDeliveryExpress(row.id as number);
|
||||
|
|
|
@ -42,7 +42,6 @@ async function handleDelete(
|
|||
) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteDeliveryExpressTemplate(row.id as number);
|
||||
|
|
|
@ -51,7 +51,6 @@ function handleBind(row: MallDeliveryPickUpStoreApi.PickUpStore) {
|
|||
async function handleDelete(row: MallDeliveryPickUpStoreApi.PickUpStore) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteDeliveryPickUpStore(row.id as number);
|
||||
|
|
|
@ -37,7 +37,6 @@ function handleEdit(row: MemberGroupApi.Group) {
|
|||
async function handleDelete(row: MemberGroupApi.Group) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteGroup(row.id as number);
|
||||
|
|
|
@ -37,7 +37,6 @@ function handleEdit(row: MemberLevelApi.Level) {
|
|||
async function handleDelete(row: MemberLevelApi.Level) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteLevel(row.id as number);
|
||||
|
|
|
@ -40,7 +40,6 @@ function handleEdit(row: MemberSignInConfigApi.SignInConfig) {
|
|||
async function handleDelete(row: MemberSignInConfigApi.SignInConfig) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting'),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteSignInConfig(row.id as number);
|
||||
|
|
|
@ -37,7 +37,6 @@ function handleEdit(row: MemberTagApi.Tag) {
|
|||
async function handleDelete(row: MemberTagApi.Tag) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteMemberTag(row.id as number);
|
||||
|
|
|
@ -27,7 +27,6 @@ const activeStatus = ref<number | string>('all');
|
|||
const handleDelete = async (row: MallCouponApi.Coupon) => {
|
||||
const hideLoading = ElLoading.service({
|
||||
text: '回收将会收回会员领取的待使用的优惠券,已使用的将无法回收,确定要回收所选优惠券吗?',
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteCoupon(row.id as number);
|
||||
|
|
|
@ -41,7 +41,6 @@ function handleEdit(row: PayAppApi.App) {
|
|||
async function handleDelete(row: PayAppApi.App) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteApp(row.id as number);
|
||||
|
|
|
@ -48,7 +48,6 @@ function handlePay(row: DemoOrderApi.Order) {
|
|||
async function handleRefund(row: DemoOrderApi.Order) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '退款中,请稍后...',
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await refundDemoOrder(row.id as number);
|
||||
|
|
|
@ -36,7 +36,6 @@ function handleCreate() {
|
|||
async function handleTransfer(row: DemoWithdrawApi.Withdraw) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '转账中,请稍后...',
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
const payTransferId = await transferDemoWithdraw(row.id as number);
|
||||
|
|
|
@ -39,7 +39,6 @@ function handleEdit(row: any) {
|
|||
async function handleDelete(row: any) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deletePackage(row.id as number);
|
||||
|
|
|
@ -1,17 +1,12 @@
|
|||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { SystemDictDataApi } from '#/api/system/dict/data';
|
||||
import type { SystemDictTypeApi } from '#/api/system/dict/type';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
|
||||
import { useAccess } from '@vben/access';
|
||||
import { CommonStatusEnum, DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
|
||||
import { z } from '#/adapter/form';
|
||||
import { getSimpleDictTypeList } from '#/api/system/dict/type';
|
||||
|
||||
const { hasAccessByCodes } = useAccess();
|
||||
|
||||
// ============================== 字典类型 ==============================
|
||||
|
||||
/** 类型新增/修改的表单 */
|
||||
|
@ -83,6 +78,15 @@ export function useTypeGridFormSchema(): VbenFormSchema[] {
|
|||
clearable: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'type',
|
||||
label: '字典类型',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入字典类型',
|
||||
clearable: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'status',
|
||||
label: '状态',
|
||||
|
@ -97,9 +101,7 @@ export function useTypeGridFormSchema(): VbenFormSchema[] {
|
|||
}
|
||||
|
||||
/** 类型列表的字段 */
|
||||
export function useTypeGridColumns<T = SystemDictTypeApi.DictType>(
|
||||
onActionClick: OnActionClickFn<T>,
|
||||
): VxeTableGridOptions['columns'] {
|
||||
export function useTypeGridColumns(): VxeTableGridOptions['columns'] {
|
||||
return [
|
||||
{ type: 'checkbox', width: 40 },
|
||||
{
|
||||
|
@ -138,29 +140,10 @@ export function useTypeGridColumns<T = SystemDictTypeApi.DictType>(
|
|||
formatter: 'formatDateTime',
|
||||
},
|
||||
{
|
||||
minWidth: 120,
|
||||
title: '操作',
|
||||
field: 'operation',
|
||||
minWidth: 120,
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
cellRender: {
|
||||
attrs: {
|
||||
nameField: 'type',
|
||||
nameTitle: '字典类型',
|
||||
onClick: onActionClick,
|
||||
},
|
||||
name: 'CellOperation',
|
||||
options: [
|
||||
{
|
||||
code: 'edit',
|
||||
show: hasAccessByCodes(['system:dict:update']),
|
||||
},
|
||||
{
|
||||
code: 'delete',
|
||||
show: hasAccessByCodes(['system:dict:delete']),
|
||||
},
|
||||
],
|
||||
},
|
||||
slots: { default: 'actions' },
|
||||
},
|
||||
];
|
||||
}
|
||||
|
@ -312,9 +295,7 @@ export function useDataGridFormSchema(): VbenFormSchema[] {
|
|||
/**
|
||||
* 字典数据表格列
|
||||
*/
|
||||
export function useDataGridColumns<T = SystemDictDataApi.DictData>(
|
||||
onActionClick: OnActionClickFn<T>,
|
||||
): VxeTableGridOptions['columns'] {
|
||||
export function useDataGridColumns(): VxeTableGridOptions['columns'] {
|
||||
return [
|
||||
{ type: 'checkbox', width: 40 },
|
||||
{
|
||||
|
@ -363,29 +344,10 @@ export function useDataGridColumns<T = SystemDictDataApi.DictData>(
|
|||
formatter: 'formatDateTime',
|
||||
},
|
||||
{
|
||||
minWidth: 120,
|
||||
title: '操作',
|
||||
field: 'operation',
|
||||
minWidth: 120,
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
cellRender: {
|
||||
attrs: {
|
||||
nameField: 'label',
|
||||
nameTitle: '字典数据',
|
||||
onClick: onActionClick,
|
||||
},
|
||||
name: 'CellOperation',
|
||||
options: [
|
||||
{
|
||||
code: 'edit',
|
||||
show: hasAccessByCodes(['system:dict:update']),
|
||||
},
|
||||
{
|
||||
code: 'delete',
|
||||
show: hasAccessByCodes(['system:dict:delete']),
|
||||
},
|
||||
],
|
||||
},
|
||||
slots: { default: 'actions' },
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import TypeGrid from './modules/type-grid.vue';
|
|||
|
||||
const searchDictType = ref<string>(); // 搜索的字典类型
|
||||
|
||||
function onDictTypeSelect(dictType: string) {
|
||||
function handleDictTypeSelect(dictType: string) {
|
||||
searchDictType.value = dictType;
|
||||
}
|
||||
</script>
|
||||
|
@ -22,7 +22,7 @@ function onDictTypeSelect(dictType: string) {
|
|||
<div class="flex h-full">
|
||||
<!-- 左侧字典类型列表 -->
|
||||
<div class="w-1/2 pr-3">
|
||||
<TypeGrid @select="onDictTypeSelect" />
|
||||
<TypeGrid @select="handleDictTypeSelect" />
|
||||
</div>
|
||||
<!-- 右侧字典数据列表 -->
|
||||
<div class="w-1/2">
|
||||
|
|
|
@ -61,7 +61,6 @@ function onEdit(row: any) {
|
|||
async function onDelete(row: any) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteDictData(row.id);
|
||||
|
|
|
@ -56,7 +56,6 @@ function onEdit(row: any) {
|
|||
async function onDelete(row: SystemDictTypeApi.DictType) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteDictType(row.id as number);
|
||||
|
|
|
@ -47,7 +47,6 @@ function onEdit(row: SystemMailAccountApi.MailAccount) {
|
|||
async function onDelete(row: SystemMailAccountApi.MailAccount) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.mail]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteMailAccount(row.id as number);
|
||||
|
|
|
@ -67,7 +67,6 @@ function onSend(row: SystemMailTemplateApi.MailTemplate) {
|
|||
async function onDelete(row: SystemMailTemplateApi.MailTemplate) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteMailTemplate(row.id as number);
|
||||
|
|
|
@ -49,7 +49,6 @@ function onEdit(row: SystemMenuApi.Menu) {
|
|||
async function onDelete(row: SystemMenuApi.Menu) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteMenu(row.id as number);
|
||||
|
|
|
@ -47,7 +47,6 @@ function onEdit(row: SystemOAuth2ClientApi.OAuth2Client) {
|
|||
async function onDelete(row: SystemOAuth2ClientApi.OAuth2Client) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteOAuth2Client(row.id as number);
|
||||
|
|
|
@ -27,7 +27,6 @@ function onRefresh() {
|
|||
async function onDelete(row: SystemOAuth2TokenApi.OAuth2Token) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.accessToken]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteOAuth2Token(row.accessToken);
|
||||
|
|
|
@ -54,7 +54,6 @@ function onEdit(row: SystemPostApi.Post) {
|
|||
async function onDelete(row: SystemPostApi.Post) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deletePost(row.id as number);
|
||||
|
|
|
@ -68,7 +68,6 @@ function onCreate() {
|
|||
async function onDelete(row: SystemRoleApi.Role) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteRole(row.id as number);
|
||||
|
|
|
@ -54,7 +54,6 @@ function onEdit(row: SystemSmsChannelApi.SmsChannel) {
|
|||
async function onDelete(row: SystemSmsChannelApi.SmsChannel) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.signature]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteSmsChannel(row.id as number);
|
||||
|
|
|
@ -65,7 +65,6 @@ function onSend(row: SystemSmsTemplateApi.SmsTemplate) {
|
|||
async function onDelete(row: SystemSmsTemplateApi.SmsTemplate) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteSmsTemplate(row.id as number);
|
||||
|
|
|
@ -47,7 +47,6 @@ function onEdit(row: SystemSocialClientApi.SocialClient) {
|
|||
async function onDelete(row: SystemSocialClientApi.SocialClient) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteSocialClient(row.id as number);
|
||||
|
|
|
@ -66,7 +66,6 @@ function onEdit(row: SystemTenantApi.Tenant) {
|
|||
async function onDelete(row: SystemTenantApi.Tenant) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteTenant(row.id as number);
|
||||
|
|
|
@ -47,7 +47,6 @@ function onEdit(row: SystemTenantPackageApi.TenantPackage) {
|
|||
async function onDelete(row: SystemTenantPackageApi.TenantPackage) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.name]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteTenantPackage(row.id as number);
|
||||
|
|
|
@ -86,7 +86,6 @@ function onEdit(row: SystemUserApi.User) {
|
|||
async function onDelete(row: SystemUserApi.User) {
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: $t('ui.actionMessage.deleting', [row.username]),
|
||||
fullscreen: true,
|
||||
});
|
||||
try {
|
||||
await deleteUser(row.id as number);
|
||||
|
|
Loading…
Reference in New Issue