!179 fix: 删除china2相关的地图json

Merge pull request !179 from 痴货/master
This commit is contained in:
芋道源码
2025-07-23 05:08:38 +00:00
committed by Gitee
97 changed files with 4922 additions and 1138 deletions

View File

@@ -4,7 +4,7 @@ import type { MemberGroupApi } from '#/api/member/group';
import { Page, useVbenModal } from '@vben/common-ui';
import { ElLoading, ElMessage } from 'element-plus';
import { ElMessage, ElMessageBox } from 'element-plus';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { deleteGroup, getGroupPage } from '#/api/member/group';
@@ -35,17 +35,14 @@ function handleEdit(row: MemberGroupApi.Group) {
/** 删除分组 */
async function handleDelete(row: MemberGroupApi.Group) {
const loadingInstance = ElLoading.service({
text: $t('ui.actionMessage.deleting', [row.name]),
fullscreen: true,
await ElMessageBox.confirm('确定要删除该分组吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
try {
await deleteGroup(row.id as number);
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
} finally {
loadingInstance.close();
}
await deleteGroup(row.id as number);
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
}
const [Grid, gridApi] = useVbenVxeGrid({

View File

@@ -4,7 +4,7 @@ import type { MemberLevelApi } from '#/api/member/level';
import { Page, useVbenModal } from '@vben/common-ui';
import { ElLoading, ElMessage } from 'element-plus';
import { ElMessage, ElMessageBox } from 'element-plus';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { deleteLevel, getLevelList } from '#/api/member/level';
@@ -35,17 +35,14 @@ function handleEdit(row: MemberLevelApi.Level) {
/** 删除等级 */
async function handleDelete(row: MemberLevelApi.Level) {
const loadingInstance = ElLoading.service({
text: $t('ui.actionMessage.deleting', [row.name]),
fullscreen: true,
await ElMessageBox.confirm('确定要删除该等级吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
try {
await deleteLevel(row.id as number);
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
} finally {
loadingInstance.close();
}
await deleteLevel(row.id as number);
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
}
const [Grid, gridApi] = useVbenVxeGrid({

View File

@@ -4,7 +4,7 @@ import type { MemberTagApi } from '#/api/member/tag';
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
import { ElLoading, ElMessage } from 'element-plus';
import { ElMessage, ElMessageBox } from 'element-plus';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { deleteMemberTag, getMemberTagPage } from '#/api/member/tag';
@@ -35,17 +35,14 @@ function handleEdit(row: MemberTagApi.Tag) {
/** 删除会员标签 */
async function handleDelete(row: MemberTagApi.Tag) {
const loadingInstance = ElLoading.service({
text: $t('ui.actionMessage.deleting', [row.name]),
fullscreen: true,
await ElMessageBox.confirm('确定要删除该会员标签吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
try {
await deleteMemberTag(row.id as number);
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
} finally {
loadingInstance.close();
}
await deleteMemberTag(row.id as number);
ElMessage.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
}
const [Grid, gridApi] = useVbenVxeGrid({

View File

@@ -86,7 +86,9 @@ export function useFormSchema(): VbenFormSchema[] {
label: '所在地',
componentProps: {
api: () => getAreaTree(),
fieldNames: { label: 'name', value: 'id', children: 'children' },
labelField: 'name',
valueField: 'id',
childrenField: 'children',
},
},
{
@@ -95,7 +97,8 @@ export function useFormSchema(): VbenFormSchema[] {
label: '用户标签',
componentProps: {
api: () => getSimpleTagList(),
fieldNames: { label: 'name', value: 'id' },
labelField: 'name',
valueField: 'id',
mode: 'multiple',
},
},
@@ -105,7 +108,8 @@ export function useFormSchema(): VbenFormSchema[] {
label: '用户分组',
componentProps: {
api: () => getSimpleGroupList(),
fieldNames: { label: 'name', value: 'id' },
labelField: 'name',
valueField: 'id',
},
},
{
@@ -151,7 +155,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'ApiSelect',
componentProps: {
api: () => getSimpleTagList(),
fieldNames: { label: 'name', value: 'id' },
labelField: 'name',
valueField: 'id',
mode: 'multiple',
},
},
@@ -161,7 +166,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'ApiSelect',
componentProps: {
api: () => getSimpleLevelList(),
fieldNames: { label: 'name', value: 'id' },
labelField: 'name',
valueField: 'id',
},
},
{
@@ -170,7 +176,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'ApiSelect',
componentProps: {
api: () => getSimpleGroupList(),
fieldNames: { label: 'name', value: 'id' },
labelField: 'name',
valueField: 'id',
},
},
];
@@ -290,7 +297,8 @@ export function useLeavelFormSchema(): VbenFormSchema[] {
component: 'ApiSelect',
componentProps: {
api: () => getSimpleLevelList(),
fieldNames: { label: 'name', value: 'id' },
labelField: 'name',
valueField: 'id',
},
},
{