Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # apps/web-antd/src/views/infra/demo/demo01/index.vue
This commit is contained in:
commit
361cfca312
|
|
@ -0,0 +1,53 @@
|
||||||
|
import type { PageParam, PageResult } from '@vben/request';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
export namespace BpmUserGroupApi {
|
||||||
|
/** BPM 用户组 VO */
|
||||||
|
export interface UserGroupVO {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
description: string;
|
||||||
|
userIds: number[];
|
||||||
|
status: number;
|
||||||
|
remark: string;
|
||||||
|
createTime: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询用户组分页 */
|
||||||
|
export async function getUserGroupPage(params: PageParam) {
|
||||||
|
return requestClient.get<PageResult<BpmUserGroupApi.UserGroupVO>>(
|
||||||
|
'/bpm/user-group/page',
|
||||||
|
{ params },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询用户组详情 */
|
||||||
|
export async function getUserGroup(id: number) {
|
||||||
|
return requestClient.get<BpmUserGroupApi.UserGroupVO>(
|
||||||
|
`/bpm/user-group/get?id=${id}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增用户组 */
|
||||||
|
export async function createUserGroup(data: BpmUserGroupApi.UserGroupVO) {
|
||||||
|
return requestClient.post<number>('/bpm/user-group/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改用户组 */
|
||||||
|
export async function updateUserGroup(data: BpmUserGroupApi.UserGroupVO) {
|
||||||
|
return requestClient.put<boolean>('/bpm/user-group/update', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除用户组 */
|
||||||
|
export async function deleteUserGroup(id: number) {
|
||||||
|
return requestClient.delete<boolean>(`/bpm/user-group/delete?id=${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询用户组列表 */
|
||||||
|
export async function getUserGroupSimpleList() {
|
||||||
|
return requestClient.get<BpmUserGroupApi.UserGroupVO[]>(
|
||||||
|
`/bpm/user-group/simple-list`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { isDocAlertEnable } from '@vben/hooks';
|
import { isDocAlertEnable } from '@vben/hooks';
|
||||||
|
import { openWindow } from '@vben/utils';
|
||||||
|
|
||||||
import { Alert, Typography } from 'ant-design-vue';
|
import { Alert, Typography } from 'ant-design-vue';
|
||||||
|
|
||||||
|
|
@ -18,7 +19,7 @@ const props = defineProps<DocAlertProps>();
|
||||||
|
|
||||||
/** 跳转 URL 链接 */
|
/** 跳转 URL 链接 */
|
||||||
const goToUrl = () => {
|
const goToUrl = () => {
|
||||||
window.open(props.url);
|
openWindow(props.url);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useVbenModal, VbenButton, VbenButtonGroup } from '@vben/common-ui';
|
import { useVbenModal, VbenButton, VbenButtonGroup } from '@vben/common-ui';
|
||||||
|
import { openWindow } from '@vben/utils';
|
||||||
|
|
||||||
import { Image, Tag } from 'ant-design-vue';
|
import { Image, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
|
|
@ -13,10 +14,6 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
modalApi.close();
|
modalApi.close();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function openWindow(url: string) {
|
|
||||||
window.open(url, '_blank');
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<Modal class="w-[40%]" :title="$t('ui.widgets.qa')">
|
<Modal class="w-[40%]" :title="$t('ui.widgets.qa')">
|
||||||
|
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
// 迁移至 packages/@core/base/shared/src/utils/time.ts
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
|
|
||||||
/** 时间段选择器拓展 */
|
|
||||||
export const rangePickerExtend = () => {
|
|
||||||
return {
|
|
||||||
showTime: {
|
|
||||||
format: 'HH:mm:ss',
|
|
||||||
defaultValue: [
|
|
||||||
dayjs('00:00:00', 'HH:mm:ss'),
|
|
||||||
dayjs('23:59:59', 'HH:mm:ss'),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
// 如果需要10位时间戳(秒级)可以使用 valueFormat: 'X'
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
format: 'YYYY-MM-DD HH:mm:ss', // 显示格式
|
|
||||||
placeholder: ['开始时间', '结束时间'],
|
|
||||||
ranges: {
|
|
||||||
今天: [dayjs().startOf('day'), dayjs().endOf('day')],
|
|
||||||
|
|
||||||
昨天: [
|
|
||||||
dayjs().subtract(1, 'day').startOf('day'),
|
|
||||||
dayjs().subtract(1, 'day').endOf('day'),
|
|
||||||
],
|
|
||||||
|
|
||||||
本周: [dayjs().startOf('week'), dayjs().endOf('day')],
|
|
||||||
|
|
||||||
本月: [dayjs().startOf('month'), dayjs().endOf('day')],
|
|
||||||
|
|
||||||
最近7天: [
|
|
||||||
dayjs().subtract(7, 'day').startOf('day'),
|
|
||||||
dayjs().endOf('day'),
|
|
||||||
],
|
|
||||||
|
|
||||||
最近30天: [
|
|
||||||
dayjs().subtract(30, 'day').startOf('day'),
|
|
||||||
dayjs().endOf('day'),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
transformDateFunc: (dates: any) => {
|
|
||||||
if (dates && dates.length === 2) {
|
|
||||||
return [dates.createTime[0], dates.createTime[1]].join(','); // 格式化为后台支持的时间格式
|
|
||||||
}
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
import dayjs from 'dayjs';
|
|
||||||
|
|
||||||
// TODO @芋艿:后续整理下 迁移至 packages/core/base/shared/src/utils/date.ts,后续删除 使用 @vben/utils 的 getRangePickerDefaultProps
|
|
||||||
|
|
||||||
/** 时间段选择器拓展 */
|
|
||||||
export function getRangePickerDefaultProps(): any {
|
|
||||||
return {
|
|
||||||
showTime: {
|
|
||||||
format: 'HH:mm:ss',
|
|
||||||
defaultValue: [
|
|
||||||
dayjs('00:00:00', 'HH:mm:ss'),
|
|
||||||
dayjs('23:59:59', 'HH:mm:ss'),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
placeholder: ['开始时间', '结束时间'],
|
|
||||||
ranges: {
|
|
||||||
今天: [dayjs().startOf('day'), dayjs().endOf('day')],
|
|
||||||
昨天: [
|
|
||||||
dayjs().subtract(1, 'day').startOf('day'),
|
|
||||||
dayjs().subtract(1, 'day').endOf('day'),
|
|
||||||
],
|
|
||||||
本周: [dayjs().startOf('week'), dayjs().endOf('day')],
|
|
||||||
本月: [dayjs().startOf('month'), dayjs().endOf('day')],
|
|
||||||
'最近 7 天': [
|
|
||||||
dayjs().subtract(7, 'day').startOf('day'),
|
|
||||||
dayjs().endOf('day'),
|
|
||||||
],
|
|
||||||
'最近 30 天': [
|
|
||||||
dayjs().subtract(30, 'day').startOf('day'),
|
|
||||||
dayjs().endOf('day'),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
transformDateFunc: (dates: any) => {
|
|
||||||
if (dates && dates.length === 2) {
|
|
||||||
return [dates.createTime[0], dates.createTime[1]].join(','); // 格式化为后台支持的时间格式
|
|
||||||
}
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,127 +0,0 @@
|
||||||
// TODO @芋艿:需要优化下每个方法
|
|
||||||
// TODO @芋艿:是不是可以共用么?
|
|
||||||
// 后续使用 packages/core/base/shared/src/utils/download.ts 下的方法
|
|
||||||
import { dataURLtoBlob, urlToBase64 } from './base64Conver';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Download online pictures
|
|
||||||
* @param url
|
|
||||||
* @param filename
|
|
||||||
* @param mime
|
|
||||||
* @param bom
|
|
||||||
*/
|
|
||||||
export function downloadByOnlineUrl(
|
|
||||||
url: string,
|
|
||||||
filename: string,
|
|
||||||
mime?: string,
|
|
||||||
bom?: BlobPart,
|
|
||||||
) {
|
|
||||||
urlToBase64(url).then((base64) => {
|
|
||||||
downloadByBase64(base64, filename, mime, bom);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Download pictures based on base64
|
|
||||||
* @param buf
|
|
||||||
* @param filename
|
|
||||||
* @param mime
|
|
||||||
* @param bom
|
|
||||||
*/
|
|
||||||
export function downloadByBase64(
|
|
||||||
buf: string,
|
|
||||||
filename: string,
|
|
||||||
mime?: string,
|
|
||||||
bom?: BlobPart,
|
|
||||||
) {
|
|
||||||
const base64Buf = dataURLtoBlob(buf);
|
|
||||||
downloadByData(base64Buf, filename, mime, bom);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Download according to the background interface file stream
|
|
||||||
* @param {*} data
|
|
||||||
* @param {*} filename
|
|
||||||
* @param {*} mime
|
|
||||||
* @param {*} bom
|
|
||||||
*/
|
|
||||||
export function downloadByData(
|
|
||||||
data: BlobPart,
|
|
||||||
filename: string,
|
|
||||||
mime?: string,
|
|
||||||
bom?: BlobPart,
|
|
||||||
) {
|
|
||||||
const blobData = bom === undefined ? [data] : [bom, data];
|
|
||||||
const blob = new Blob(blobData, { type: mime || 'application/octet-stream' });
|
|
||||||
|
|
||||||
const blobURL = window.URL.createObjectURL(blob);
|
|
||||||
const tempLink = document.createElement('a');
|
|
||||||
tempLink.style.display = 'none';
|
|
||||||
tempLink.href = blobURL;
|
|
||||||
tempLink.setAttribute('download', filename);
|
|
||||||
if (tempLink.download === undefined)
|
|
||||||
tempLink.setAttribute('target', '_blank');
|
|
||||||
|
|
||||||
document.body.append(tempLink);
|
|
||||||
tempLink.click();
|
|
||||||
tempLink.remove();
|
|
||||||
window.URL.revokeObjectURL(blobURL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Download file according to file address
|
|
||||||
* @param {*} sUrl
|
|
||||||
*/
|
|
||||||
export function downloadByUrl({
|
|
||||||
url,
|
|
||||||
target = '_blank',
|
|
||||||
fileName,
|
|
||||||
}: {
|
|
||||||
fileName?: string;
|
|
||||||
target?: '_blank' | '_self';
|
|
||||||
url: string;
|
|
||||||
}): boolean {
|
|
||||||
const isChrome = window.navigator.userAgent.toLowerCase().includes('chrome');
|
|
||||||
const isSafari = window.navigator.userAgent.toLowerCase().includes('safari');
|
|
||||||
|
|
||||||
if (/iP/.test(window.navigator.userAgent)) {
|
|
||||||
console.error('Your browser does not support download!');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (isChrome || isSafari) {
|
|
||||||
const link = document.createElement('a');
|
|
||||||
link.href = url;
|
|
||||||
link.target = target;
|
|
||||||
|
|
||||||
if (link.download !== undefined)
|
|
||||||
link.download = fileName || url.slice(url.lastIndexOf('/') + 1);
|
|
||||||
|
|
||||||
if (document.createEvent) {
|
|
||||||
const e = document.createEvent('MouseEvents');
|
|
||||||
e.initEvent('click', true, true);
|
|
||||||
link.dispatchEvent(e);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!url.includes('?')) url += '?download';
|
|
||||||
|
|
||||||
openWindow(url, { target });
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function openWindow(
|
|
||||||
url: string,
|
|
||||||
opt?: {
|
|
||||||
noopener?: boolean;
|
|
||||||
noreferrer?: boolean;
|
|
||||||
target?: '_blank' | '_self' | string;
|
|
||||||
},
|
|
||||||
) {
|
|
||||||
const { noopener = true, noreferrer = true, target = '__blank' } = opt || {};
|
|
||||||
const feature: string[] = [];
|
|
||||||
|
|
||||||
noopener && feature.push('noopener=yes');
|
|
||||||
noreferrer && feature.push('noreferrer=yes');
|
|
||||||
|
|
||||||
window.open(url, target, feature.join(','));
|
|
||||||
}
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
||||||
// todo @芋艿:公用逻辑
|
|
||||||
// 已迁移,后续使用 packages/core/base/shared/src/utils/tree.ts 下的方法
|
|
||||||
interface TreeNode {
|
|
||||||
[key: string]: any;
|
|
||||||
children?: TreeNode[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 构造树型结构数据
|
|
||||||
*
|
|
||||||
* @param {*} data 数据源
|
|
||||||
* @param {*} id id字段 默认 'id'
|
|
||||||
* @param {*} parentId 父节点字段 默认 'parentId'
|
|
||||||
* @param {*} children 孩子节点字段 默认 'children'
|
|
||||||
*/
|
|
||||||
export const handleTree = (
|
|
||||||
data: TreeNode[],
|
|
||||||
id: string = 'id',
|
|
||||||
parentId: string = 'parentId',
|
|
||||||
children: string = 'children',
|
|
||||||
): TreeNode[] => {
|
|
||||||
if (!Array.isArray(data)) {
|
|
||||||
console.warn('data must be an array');
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
const config = {
|
|
||||||
id,
|
|
||||||
parentId,
|
|
||||||
childrenList: children,
|
|
||||||
};
|
|
||||||
const childrenListMap: Record<number | string, TreeNode[]> = {};
|
|
||||||
const nodeIds: Record<number | string, TreeNode> = {};
|
|
||||||
const tree: TreeNode[] = [];
|
|
||||||
|
|
||||||
// 1. 数据预处理
|
|
||||||
// 1.1 第一次遍历,生成 childrenListMap 和 nodeIds 映射
|
|
||||||
for (const d of data) {
|
|
||||||
const pId = d[config.parentId];
|
|
||||||
if (childrenListMap[pId] === undefined) {
|
|
||||||
childrenListMap[pId] = [];
|
|
||||||
}
|
|
||||||
nodeIds[d[config.id]] = d;
|
|
||||||
childrenListMap[pId].push(d);
|
|
||||||
}
|
|
||||||
// 1.2 第二次遍历,找出根节点
|
|
||||||
for (const d of data) {
|
|
||||||
const pId = d[config.parentId];
|
|
||||||
if (nodeIds[pId] === undefined) {
|
|
||||||
tree.push(d);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. 构建树结:递归构建子节点
|
|
||||||
const adaptToChildrenList = (node: TreeNode): void => {
|
|
||||||
const nodeId = node[config.id];
|
|
||||||
if (childrenListMap[nodeId]) {
|
|
||||||
node[config.childrenList] = childrenListMap[nodeId];
|
|
||||||
// 递归处理子节点
|
|
||||||
for (const child of node[config.childrenList]) {
|
|
||||||
adaptToChildrenList(child);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 3. 从根节点开始构建完整树
|
|
||||||
for (const rootNode of tree) {
|
|
||||||
adaptToChildrenList(rootNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
return tree;
|
|
||||||
};
|
|
||||||
|
|
@ -80,10 +80,7 @@ async function handleSubmit(values: Recordable<any>) {
|
||||||
await updateUserProfile(values as SystemUserProfileApi.UpdateProfileReqVO);
|
await updateUserProfile(values as SystemUserProfileApi.UpdateProfileReqVO);
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
|
|
@ -78,10 +78,7 @@ async function handleSubmit(values: Recordable<any>) {
|
||||||
oldPassword: values.oldPassword,
|
oldPassword: values.oldPassword,
|
||||||
newPassword: values.newPassword,
|
newPassword: values.newPassword,
|
||||||
});
|
});
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,9 @@ import type { SystemSocialUserApi } from '#/api/system/social/user';
|
||||||
import { computed, onMounted, ref } from 'vue';
|
import { computed, onMounted, ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import { Button, Card, Image, message, Modal } from 'ant-design-vue';
|
import { confirm } from '@vben/common-ui';
|
||||||
|
|
||||||
|
import { Button, Card, Image, message } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { socialAuthRedirect } from '#/api/core/auth';
|
import { socialAuthRedirect } from '#/api/core/auth';
|
||||||
|
|
@ -102,19 +104,13 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
|
|
||||||
/** 解绑账号 */
|
/** 解绑账号 */
|
||||||
function onUnbind(row: SystemSocialUserApi.SocialUser) {
|
function onUnbind(row: SystemSocialUserApi.SocialUser) {
|
||||||
Modal.confirm({
|
confirm({
|
||||||
type: 'warning',
|
|
||||||
title: '提示',
|
|
||||||
content: `确定解绑[${getDictLabel(DICT_TYPE.SYSTEM_SOCIAL_TYPE, row.type)}]平台的[${row.openid}]账号吗?`,
|
content: `确定解绑[${getDictLabel(DICT_TYPE.SYSTEM_SOCIAL_TYPE, row.type)}]平台的[${row.openid}]账号吗?`,
|
||||||
async onOk() {
|
}).then(async () => {
|
||||||
await socialUnbind({ type: row.type, openid: row.openid });
|
await socialUnbind({ type: row.type, openid: row.openid });
|
||||||
// 提示成功
|
// 提示成功
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
await gridApi.reload();
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await gridApi.reload();
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,10 +90,7 @@ async function onDelete(row: BpmCategoryApi.CategoryVO) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteCategory(row.id as number);
|
await deleteCategory(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.code]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.code]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,171 @@
|
||||||
|
import type { VbenFormSchema } from '#/adapter/form';
|
||||||
|
import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
|
import type { BpmCategoryApi } from '#/api/bpm/category';
|
||||||
|
|
||||||
|
import { useAccess } from '@vben/access';
|
||||||
|
|
||||||
|
import { z } from '#/adapter/form';
|
||||||
|
import { getSimpleUserList } from '#/api/system/user';
|
||||||
|
import { CommonStatusEnum } from '#/utils/constants';
|
||||||
|
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||||
|
|
||||||
|
const { hasAccessByCodes } = useAccess();
|
||||||
|
/** 新增/修改的表单 */
|
||||||
|
export function useFormSchema(): VbenFormSchema[] {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
fieldName: 'id',
|
||||||
|
component: 'Input',
|
||||||
|
dependencies: {
|
||||||
|
triggerFields: [''],
|
||||||
|
show: () => false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'name',
|
||||||
|
label: '组名',
|
||||||
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请输入组名',
|
||||||
|
},
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'description',
|
||||||
|
label: '描述',
|
||||||
|
component: 'Textarea',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请输入描述',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'userIds',
|
||||||
|
label: '成员',
|
||||||
|
component: 'ApiSelect',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请选择成员',
|
||||||
|
api: getSimpleUserList,
|
||||||
|
labelField: 'nickname',
|
||||||
|
valueField: 'id',
|
||||||
|
mode: 'tags',
|
||||||
|
},
|
||||||
|
rules: z.array(z.number()).min(1, '请选择成员').default([]),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'status',
|
||||||
|
label: '状态',
|
||||||
|
component: 'RadioGroup',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
|
||||||
|
buttonStyle: 'solid',
|
||||||
|
optionType: 'button',
|
||||||
|
},
|
||||||
|
rules: z.number().default(CommonStatusEnum.ENABLE),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 列表的搜索表单 */
|
||||||
|
export function useGridFormSchema(): VbenFormSchema[] {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
fieldName: 'name',
|
||||||
|
label: '组名',
|
||||||
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请输入组名',
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'status',
|
||||||
|
label: '状态',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请选择状态',
|
||||||
|
options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'createTime',
|
||||||
|
label: '创建时间',
|
||||||
|
component: 'RangePicker',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: ['开始时间', '结束时间'],
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 列表的字段 */
|
||||||
|
export function useGridColumns<T = BpmCategoryApi.CategoryVO>(
|
||||||
|
onActionClick: OnActionClickFn<T>,
|
||||||
|
): VxeTableGridOptions['columns'] {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '编号',
|
||||||
|
minWidth: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'name',
|
||||||
|
title: '组名',
|
||||||
|
minWidth: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'description',
|
||||||
|
title: '描述',
|
||||||
|
minWidth: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'userIds',
|
||||||
|
title: '成员',
|
||||||
|
minWidth: 200,
|
||||||
|
slots: {
|
||||||
|
default: 'userIds-cell',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: '状态',
|
||||||
|
minWidth: 100,
|
||||||
|
cellRender: {
|
||||||
|
name: 'CellDict',
|
||||||
|
props: { type: DICT_TYPE.COMMON_STATUS },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'createTime',
|
||||||
|
title: '创建时间',
|
||||||
|
minWidth: 180,
|
||||||
|
formatter: 'formatDateTime',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'operation',
|
||||||
|
title: '操作',
|
||||||
|
minWidth: 180,
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
cellRender: {
|
||||||
|
attrs: {
|
||||||
|
nameField: 'name',
|
||||||
|
nameTitle: '用户分组',
|
||||||
|
onClick: onActionClick,
|
||||||
|
},
|
||||||
|
name: 'CellOperation',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
code: 'edit',
|
||||||
|
show: hasAccessByCodes(['bpm:user-group:update']),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: 'delete',
|
||||||
|
show: hasAccessByCodes(['bpm:user-group:delete']),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,31 +1,141 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Page } from '@vben/common-ui';
|
import type {
|
||||||
|
OnActionClickParams,
|
||||||
|
VxeTableGridOptions,
|
||||||
|
} from '#/adapter/vxe-table';
|
||||||
|
import type { BpmUserGroupApi } from '#/api/bpm/userGroup';
|
||||||
|
import type { SystemUserApi } from '#/api/system/user';
|
||||||
|
|
||||||
import { Button } from 'ant-design-vue';
|
import { onMounted, ref } from 'vue';
|
||||||
|
|
||||||
import { DocAlert } from '#/components/doc-alert';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
|
import { Plus } from '@vben/icons';
|
||||||
|
|
||||||
|
import { Button, message } from 'ant-design-vue';
|
||||||
|
|
||||||
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
|
import { deleteUserGroup, getUserGroupPage } from '#/api/bpm/userGroup';
|
||||||
|
import { getSimpleUserList } from '#/api/system/user';
|
||||||
|
import { $t } from '#/locales';
|
||||||
|
|
||||||
|
import { useGridColumns, useGridFormSchema } from './data';
|
||||||
|
import Form from './modules/form.vue';
|
||||||
|
|
||||||
|
const [FormModal, formModalApi] = useVbenModal({
|
||||||
|
connectedComponent: Form,
|
||||||
|
destroyOnClose: true,
|
||||||
|
});
|
||||||
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
|
formOptions: {
|
||||||
|
schema: useGridFormSchema(),
|
||||||
|
},
|
||||||
|
gridOptions: {
|
||||||
|
columns: useGridColumns(onActionClick),
|
||||||
|
height: 'auto',
|
||||||
|
keepSource: true,
|
||||||
|
proxyConfig: {
|
||||||
|
ajax: {
|
||||||
|
query: async ({ page }, formValues) => {
|
||||||
|
return await getUserGroupPage({
|
||||||
|
pageNo: page.currentPage,
|
||||||
|
pageSize: page.pageSize,
|
||||||
|
...formValues,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rowConfig: {
|
||||||
|
keyField: 'id',
|
||||||
|
},
|
||||||
|
toolbarConfig: {
|
||||||
|
refresh: { code: 'query' },
|
||||||
|
search: true,
|
||||||
|
},
|
||||||
|
} as VxeTableGridOptions<BpmUserGroupApi.UserGroupVO>,
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 表格操作按钮的回调函数 */
|
||||||
|
function onActionClick({
|
||||||
|
code,
|
||||||
|
row,
|
||||||
|
}: OnActionClickParams<BpmUserGroupApi.UserGroupVO>) {
|
||||||
|
switch (code) {
|
||||||
|
case 'delete': {
|
||||||
|
onDelete(row);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'edit': {
|
||||||
|
onEdit(row);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 刷新表格 */
|
||||||
|
function onRefresh() {
|
||||||
|
gridApi.query();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 创建用户分组 */
|
||||||
|
function onCreate() {
|
||||||
|
formModalApi.setData(null).open();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 编辑用户分组 */
|
||||||
|
function onEdit(row: BpmUserGroupApi.UserGroupVO) {
|
||||||
|
formModalApi.setData(row).open();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除用户分组 */
|
||||||
|
async function onDelete(row: BpmUserGroupApi.UserGroupVO) {
|
||||||
|
const hideLoading = message.loading({
|
||||||
|
content: $t('ui.actionMessage.deleting', [row.name]),
|
||||||
|
duration: 0,
|
||||||
|
key: 'action_process_msg',
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
await deleteUserGroup(row.id as number);
|
||||||
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
|
onRefresh();
|
||||||
|
} catch {
|
||||||
|
hideLoading();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const userList = ref<SystemUserApi.User[]>([]);
|
||||||
|
/** 初始化 */
|
||||||
|
onMounted(async () => {
|
||||||
|
// 加载用户列表
|
||||||
|
userList.value = await getSimpleUserList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Page>
|
<Page auto-content-height>
|
||||||
<DocAlert title="工作流手册" url="https://doc.iocoder.cn/bpm/" />
|
<FormModal @success="onRefresh" />
|
||||||
<Button
|
<Grid table-title="用户分组">
|
||||||
danger
|
<template #toolbar-tools>
|
||||||
type="link"
|
<Button
|
||||||
target="_blank"
|
type="primary"
|
||||||
href="https://github.com/yudaocode/yudao-ui-admin-vue3"
|
@click="onCreate"
|
||||||
>
|
v-access:code="['bpm:category:create']"
|
||||||
该功能支持 Vue3 + element-plus 版本!
|
>
|
||||||
</Button>
|
<Plus class="size-5" />
|
||||||
<br />
|
{{ $t('ui.actionTitle.create', ['用户分组']) }}
|
||||||
<Button
|
</Button>
|
||||||
type="link"
|
</template>
|
||||||
target="_blank"
|
|
||||||
href="https://github.com/yudaocode/yudao-ui-admin-vue3/blob/master/src/views/bpm/group/index"
|
<template #userIds-cell="{ row }">
|
||||||
>
|
<span
|
||||||
可参考
|
v-for="(userId, index) in row.userIds"
|
||||||
https://github.com/yudaocode/yudao-ui-admin-vue3/blob/master/src/views/bpm/group/index
|
:key="userId"
|
||||||
代码,pull request 贡献给我们!
|
class="pr-5px"
|
||||||
</Button>
|
>
|
||||||
|
{{ userList.find((user) => user.id === userId)?.nickname }}
|
||||||
|
<span v-if="index < row.userIds.length - 1">、</span>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,91 @@
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import type { BpmUserGroupApi } from '#/api/bpm/userGroup';
|
||||||
|
|
||||||
|
import { computed, ref } from 'vue';
|
||||||
|
|
||||||
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
|
|
||||||
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
|
import { useVbenForm } from '#/adapter/form';
|
||||||
|
import {
|
||||||
|
createUserGroup,
|
||||||
|
getUserGroup,
|
||||||
|
updateUserGroup,
|
||||||
|
} from '#/api/bpm/userGroup';
|
||||||
|
import { $t } from '#/locales';
|
||||||
|
|
||||||
|
import { useFormSchema } from '../data';
|
||||||
|
|
||||||
|
const emit = defineEmits(['success']);
|
||||||
|
const formData = ref<BpmUserGroupApi.UserGroupVO>();
|
||||||
|
const getTitle = computed(() => {
|
||||||
|
return formData.value?.id
|
||||||
|
? $t('ui.actionTitle.edit', ['用户分组'])
|
||||||
|
: $t('ui.actionTitle.create', ['用户分组']);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [Form, formApi] = useVbenForm({
|
||||||
|
commonConfig: {
|
||||||
|
componentProps: {
|
||||||
|
class: 'w-full',
|
||||||
|
},
|
||||||
|
formItemClass: 'col-span-2',
|
||||||
|
labelWidth: 100,
|
||||||
|
},
|
||||||
|
layout: 'horizontal',
|
||||||
|
schema: useFormSchema(),
|
||||||
|
showDefaultActions: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
const [Modal, modalApi] = useVbenModal({
|
||||||
|
async onConfirm() {
|
||||||
|
const { valid } = await formApi.validate();
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
modalApi.lock();
|
||||||
|
// 提交表单
|
||||||
|
const data = (await formApi.getValues()) as BpmUserGroupApi.UserGroupVO;
|
||||||
|
try {
|
||||||
|
await (formData.value?.id
|
||||||
|
? updateUserGroup(data)
|
||||||
|
: createUserGroup(data));
|
||||||
|
// 关闭并提示
|
||||||
|
await modalApi.close();
|
||||||
|
emit('success');
|
||||||
|
message.success({
|
||||||
|
content: $t('ui.actionMessage.operationSuccess'),
|
||||||
|
key: 'action_process_msg',
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
modalApi.unlock();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async onOpenChange(isOpen: boolean) {
|
||||||
|
if (!isOpen) {
|
||||||
|
formData.value = undefined;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 加载数据
|
||||||
|
const data = modalApi.getData<BpmUserGroupApi.UserGroupVO>();
|
||||||
|
if (!data || !data.id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
modalApi.lock();
|
||||||
|
try {
|
||||||
|
formData.value = await getUserGroup(data.id as number);
|
||||||
|
// 设置到 values
|
||||||
|
await formApi.setValues(formData.value);
|
||||||
|
} finally {
|
||||||
|
modalApi.unlock();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Modal :title="getTitle">
|
||||||
|
<Form class="mx-4" />
|
||||||
|
</Modal>
|
||||||
|
</template>
|
||||||
|
|
@ -45,10 +45,7 @@ async function onDelete(row: CrmBusinessStatusApi.BusinessStatus) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteBusinessStatus(row.id as number);
|
await deleteBusinessStatus(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@ import type {
|
||||||
} from '#/adapter/vxe-table';
|
} from '#/adapter/vxe-table';
|
||||||
import type { InfraApiErrorLogApi } from '#/api/infra/api-error-log';
|
import type { InfraApiErrorLogApi } from '#/api/infra/api-error-log';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { confirm, Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download } from '@vben/icons';
|
import { Download } from '@vben/icons';
|
||||||
import { downloadFileFromBlobPart } from '@vben/utils';
|
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||||
|
|
||||||
import { Button, message, Modal } from 'ant-design-vue';
|
import { Button, message } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
|
|
@ -47,18 +47,13 @@ function onDetail(row: InfraApiErrorLogApi.ApiErrorLog) {
|
||||||
|
|
||||||
/** 处理已处理 / 已忽略的操作 */
|
/** 处理已处理 / 已忽略的操作 */
|
||||||
async function onProcess(id: number, processStatus: number) {
|
async function onProcess(id: number, processStatus: number) {
|
||||||
Modal.confirm({
|
confirm({
|
||||||
title: '确认操作',
|
|
||||||
content: `确认标记为${InfraApiErrorLogProcessStatusEnum.DONE ? '已处理' : '已忽略'}?`,
|
content: `确认标记为${InfraApiErrorLogProcessStatusEnum.DONE ? '已处理' : '已忽略'}?`,
|
||||||
onOk: async () => {
|
}).then(async () => {
|
||||||
await updateApiErrorLogStatus(id, processStatus);
|
await updateApiErrorLogStatus(id, processStatus);
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
onRefresh();
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,10 +74,7 @@ const submitForm = async () => {
|
||||||
columns,
|
columns,
|
||||||
});
|
});
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
close();
|
close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('保存失败', error);
|
console.error('保存失败', error);
|
||||||
|
|
|
||||||
|
|
@ -80,10 +80,7 @@ async function onDelete(row: InfraCodegenApi.CodegenTable) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteCodegenTable(row.id);
|
await deleteCodegenTable(row.id);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.tableName]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.tableName]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
@ -99,10 +96,7 @@ async function onSync(row: InfraCodegenApi.CodegenTable) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await syncCodegenFromDB(row.id);
|
await syncCodegenFromDB(row.id);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.updateSuccess', [row.tableName]));
|
||||||
content: $t('ui.actionMessage.updateSuccess', [row.tableName]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
@ -125,10 +119,7 @@ async function onGenerate(row: InfraCodegenApi.CodegenTable) {
|
||||||
link.download = `codegen-${row.className}.zip`;
|
link.download = `codegen-${row.className}.zip`;
|
||||||
link.click();
|
link.click();
|
||||||
window.URL.revokeObjectURL(url);
|
window.URL.revokeObjectURL(url);
|
||||||
message.success({
|
message.success('代码生成成功');
|
||||||
content: '代码生成成功',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -104,10 +104,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,7 @@ async function onDelete(row: InfraConfigApi.Config) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteConfig(row.id as number);
|
await deleteConfig(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,7 @@ async function onDelete(row: InfraDataSourceConfigApi.DataSourceConfig) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDataSourceConfig(row.id as number);
|
await deleteDataSourceConfig(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await handleLoadData();
|
await handleLoadData();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,86 +1,39 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { VxeTableInstance } from 'vxe-table';
|
import type {
|
||||||
|
OnActionClickParams,
|
||||||
|
VxeTableGridOptions,
|
||||||
|
} from '#/adapter/vxe-table';
|
||||||
import type { Demo01ContactApi } from '#/api/infra/demo/demo01';
|
import type { Demo01ContactApi } from '#/api/infra/demo/demo01';
|
||||||
|
|
||||||
import { h, nextTick, onMounted, reactive, ref } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download, Plus } from '@vben/icons';
|
import { Download, Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import { Button, message } from 'ant-design-vue';
|
||||||
Button,
|
|
||||||
Form,
|
|
||||||
Input,
|
|
||||||
message,
|
|
||||||
Pagination,
|
|
||||||
RangePicker,
|
|
||||||
Select,
|
|
||||||
} from 'ant-design-vue';
|
|
||||||
import { VxeColumn, VxeTable } from 'vxe-table';
|
|
||||||
|
|
||||||
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
deleteDemo01Contact,
|
deleteDemo01Contact,
|
||||||
exportDemo01Contact,
|
exportDemo01Contact,
|
||||||
getDemo01ContactPage,
|
getDemo01ContactPage,
|
||||||
} from '#/api/infra/demo/demo01';
|
} from '#/api/infra/demo/demo01';
|
||||||
import { ContentWrap } from '#/components/content-wrap';
|
|
||||||
import { DictTag } from '#/components/dict-tag';
|
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
|
||||||
import { downloadByData } from '#/utils/download';
|
|
||||||
|
|
||||||
import Demo01ContactForm from './modules/form.vue';
|
import { useGridColumns, useGridFormSchema } from './data';
|
||||||
|
import Form from './modules/form.vue';
|
||||||
const loading = ref(true); // 列表的加载中
|
|
||||||
const list = ref<Demo01ContactApi.Demo01Contact[]>([]); // 列表的数据
|
|
||||||
const total = ref(0); // 列表的总页数
|
|
||||||
const queryParams = reactive({
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
name: undefined,
|
|
||||||
sex: undefined,
|
|
||||||
createTime: undefined,
|
|
||||||
});
|
|
||||||
const queryFormRef = ref(); // 搜索的表单
|
|
||||||
const exportLoading = ref(false); // 导出的加载中
|
|
||||||
|
|
||||||
/** 查询列表 */
|
|
||||||
const getList = async () => {
|
|
||||||
loading.value = true;
|
|
||||||
try {
|
|
||||||
const params = cloneDeep(queryParams) as any;
|
|
||||||
if (params.createTime && Array.isArray(params.createTime)) {
|
|
||||||
params.createTime = (params.createTime as string[]).join(',');
|
|
||||||
}
|
|
||||||
const data = await getDemo01ContactPage(params);
|
|
||||||
list.value = data.list;
|
|
||||||
total.value = data.total;
|
|
||||||
} finally {
|
|
||||||
loading.value = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
const handleQuery = () => {
|
|
||||||
queryParams.pageNo = 1;
|
|
||||||
getList();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
const resetQuery = () => {
|
|
||||||
queryFormRef.value.resetFields();
|
|
||||||
handleQuery();
|
|
||||||
};
|
|
||||||
|
|
||||||
const [FormModal, formModalApi] = useVbenModal({
|
const [FormModal, formModalApi] = useVbenModal({
|
||||||
connectedComponent: Demo01ContactForm,
|
connectedComponent: Form,
|
||||||
destroyOnClose: true,
|
destroyOnClose: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** 刷新表格 */
|
||||||
|
function onRefresh() {
|
||||||
|
gridApi.query();
|
||||||
|
}
|
||||||
|
|
||||||
/** 创建示例联系人 */
|
/** 创建示例联系人 */
|
||||||
function onCreate() {
|
function onCreate() {
|
||||||
formModalApi.setData({}).open();
|
formModalApi.setData({}).open();
|
||||||
|
|
@ -100,11 +53,8 @@ async function onDelete(row: Demo01ContactApi.Demo01Contact) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo01Contact(row.id as number);
|
await deleteDemo01Contact(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
onRefresh();
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await getList();
|
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
}
|
}
|
||||||
|
|
@ -112,166 +62,84 @@ async function onDelete(row: Demo01ContactApi.Demo01Contact) {
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
async function onExport() {
|
async function onExport() {
|
||||||
try {
|
const data = await exportDemo01Contact(await gridApi.formApi.getValues());
|
||||||
exportLoading.value = true;
|
downloadFileFromBlobPart({ fileName: '示例联系人.xls', source: data });
|
||||||
const data = await exportDemo01Contact(queryParams);
|
}
|
||||||
downloadByData(data, '示例联系人.xls');
|
|
||||||
} finally {
|
/** 表格操作按钮的回调函数 */
|
||||||
exportLoading.value = false;
|
function onActionClick({
|
||||||
|
code,
|
||||||
|
row,
|
||||||
|
}: OnActionClickParams<Demo01ContactApi.Demo01Contact>) {
|
||||||
|
switch (code) {
|
||||||
|
case 'delete': {
|
||||||
|
onDelete(row);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'edit': {
|
||||||
|
onEdit(row);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 隐藏搜索栏 */
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
const hiddenSearchBar = ref(false);
|
formOptions: {
|
||||||
const tableToolbarRef = ref<InstanceType<typeof TableToolbar>>();
|
schema: useGridFormSchema(),
|
||||||
const tableRef = ref<VxeTableInstance>();
|
},
|
||||||
/** 初始化 */
|
gridOptions: {
|
||||||
onMounted(async () => {
|
columns: useGridColumns(onActionClick),
|
||||||
await getList();
|
height: 'auto',
|
||||||
await nextTick();
|
pagerConfig: {
|
||||||
// 挂载 toolbar 工具栏
|
enabled: true,
|
||||||
const table = tableRef.value;
|
},
|
||||||
const tableToolbar = tableToolbarRef.value;
|
proxyConfig: {
|
||||||
if (table && tableToolbar) {
|
ajax: {
|
||||||
await table.connect(tableToolbar.getToolbarRef()!);
|
query: async ({ page }, formValues) => {
|
||||||
}
|
return await getDemo01ContactPage({
|
||||||
|
pageNo: page.currentPage,
|
||||||
|
pageSize: page.pageSize,
|
||||||
|
...formValues,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rowConfig: {
|
||||||
|
keyField: 'id',
|
||||||
|
isHover: true,
|
||||||
|
},
|
||||||
|
toolbarConfig: {
|
||||||
|
refresh: { code: 'query' },
|
||||||
|
search: true,
|
||||||
|
},
|
||||||
|
} as VxeTableGridOptions<Demo01ContactApi.Demo01Contact>,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Page auto-content-height>
|
<Page auto-content-height>
|
||||||
<FormModal @success="getList" />
|
<FormModal @success="onRefresh" />
|
||||||
|
|
||||||
<ContentWrap v-if="!hiddenSearchBar">
|
<Grid table-title="示例联系人列表">
|
||||||
<!-- 搜索工作栏 -->
|
<template #toolbar-tools>
|
||||||
<Form :model="queryParams" ref="queryFormRef" layout="inline">
|
<Button
|
||||||
<Form.Item label="名字" name="name">
|
:icon="h(Plus)"
|
||||||
<Input
|
type="primary"
|
||||||
v-model:value="queryParams.name"
|
@click="onCreate"
|
||||||
placeholder="请输入名字"
|
v-access:code="['infra:demo01-contact:create']"
|
||||||
allow-clear
|
|
||||||
@press-enter="handleQuery"
|
|
||||||
class="w-full"
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
|
||||||
<!-- TODO @puhui999:貌似性别的宽度不对;并且选择后,会变哈; -->
|
|
||||||
<Form.Item label="性别" name="sex">
|
|
||||||
<Select
|
|
||||||
v-model:value="queryParams.sex"
|
|
||||||
placeholder="请选择性别"
|
|
||||||
allow-clear
|
|
||||||
class="w-full"
|
|
||||||
>
|
|
||||||
<!-- TODO @puhui999:要不咱还是把 getIntDictOptions 还是搞出来?总归方便点~ -->
|
|
||||||
<Select.Option
|
|
||||||
v-for="dict in getDictOptions(
|
|
||||||
DICT_TYPE.SYSTEM_USER_SEX,
|
|
||||||
'number',
|
|
||||||
)"
|
|
||||||
:key="dict.value"
|
|
||||||
:value="dict.value"
|
|
||||||
>
|
|
||||||
{{ dict.label }}
|
|
||||||
</Select.Option>
|
|
||||||
</Select>
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item label="创建时间" name="createTime">
|
|
||||||
<RangePicker
|
|
||||||
v-model:value="queryParams.createTime"
|
|
||||||
v-bind="getRangePickerDefaultProps()"
|
|
||||||
class="w-full"
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item>
|
|
||||||
<Button class="ml-2" @click="resetQuery"> 重置 </Button>
|
|
||||||
<Button class="ml-2" @click="handleQuery" type="primary">
|
|
||||||
搜索
|
|
||||||
</Button>
|
|
||||||
</Form.Item>
|
|
||||||
</Form>
|
|
||||||
</ContentWrap>
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
|
||||||
<ContentWrap title="示例联系人">
|
|
||||||
<!-- TODO @puhui999:暗黑模式下,会有个黑底 -->
|
|
||||||
<template #extra>
|
|
||||||
<TableToolbar
|
|
||||||
ref="tableToolbarRef"
|
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
|
||||||
>
|
>
|
||||||
<Button
|
{{ $t('ui.actionTitle.create', ['示例联系人']) }}
|
||||||
class="ml-2"
|
</Button>
|
||||||
:icon="h(Plus)"
|
<Button
|
||||||
type="primary"
|
:icon="h(Download)"
|
||||||
@click="onCreate"
|
type="primary"
|
||||||
v-access:code="['infra:demo01-contact:create']"
|
class="ml-2"
|
||||||
>
|
@click="onExport"
|
||||||
{{ $t('ui.actionTitle.create', ['示例联系人']) }}
|
v-access:code="['infra:demo01-contact:export']"
|
||||||
</Button>
|
>
|
||||||
<Button
|
{{ $t('ui.actionTitle.export') }}
|
||||||
:icon="h(Download)"
|
</Button>
|
||||||
type="primary"
|
|
||||||
class="ml-2"
|
|
||||||
:loading="exportLoading"
|
|
||||||
@click="onExport"
|
|
||||||
v-access:code="['infra:demo01-contact:export']"
|
|
||||||
>
|
|
||||||
{{ $t('ui.actionTitle.export') }}
|
|
||||||
</Button>
|
|
||||||
</TableToolbar>
|
|
||||||
</template>
|
</template>
|
||||||
<VxeTable ref="tableRef" :data="list" show-overflow :loading="loading">
|
</Grid>
|
||||||
<VxeColumn field="id" title="编号" align="center" />
|
|
||||||
<VxeColumn field="name" title="名字" align="center" />
|
|
||||||
<VxeColumn field="sex" title="性别" align="center">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<DictTag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="row.sex" />
|
|
||||||
</template>
|
|
||||||
</VxeColumn>
|
|
||||||
<VxeColumn field="birthday" title="出生年" align="center">
|
|
||||||
<template #default="{ row }">
|
|
||||||
{{ formatDateTime(row.birthday) }}
|
|
||||||
</template>
|
|
||||||
</VxeColumn>
|
|
||||||
<VxeColumn field="description" title="简介" align="center" />
|
|
||||||
<VxeColumn field="avatar" title="头像" align="center" />
|
|
||||||
<VxeColumn field="createTime" title="创建时间" align="center">
|
|
||||||
<template #default="{ row }">
|
|
||||||
{{ formatDateTime(row.createTime) }}
|
|
||||||
</template>
|
|
||||||
</VxeColumn>
|
|
||||||
<VxeColumn field="operation" title="操作" align="center">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<Button
|
|
||||||
size="small"
|
|
||||||
type="link"
|
|
||||||
@click="onEdit(row as any)"
|
|
||||||
v-access:code="['infra:demo01-contact:update']"
|
|
||||||
>
|
|
||||||
{{ $t('ui.actionTitle.edit') }}
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
size="small"
|
|
||||||
type="link"
|
|
||||||
class="ml-2"
|
|
||||||
@click="onDelete(row as any)"
|
|
||||||
v-access:code="['infra:demo01-contact:delete']"
|
|
||||||
>
|
|
||||||
{{ $t('ui.actionTitle.delete') }}
|
|
||||||
</Button>
|
|
||||||
</template>
|
|
||||||
</VxeColumn>
|
|
||||||
</VxeTable>
|
|
||||||
<!-- 分页 -->
|
|
||||||
<div class="mt-2 flex justify-end">
|
|
||||||
<Pagination
|
|
||||||
:total="total"
|
|
||||||
v-model:current="queryParams.pageNo"
|
|
||||||
v-model:page-size="queryParams.pageSize"
|
|
||||||
show-size-changer
|
|
||||||
@change="getList"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</ContentWrap>
|
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -75,10 +75,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,7 @@ async function onDelete(row: Demo02CategoryApi.Demo02Category) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo02Category(row.id as number);
|
await deleteDemo02Category(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -60,10 +60,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,10 +59,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Student) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Student(row.id as number);
|
await deleteDemo03Student(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -56,10 +56,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,10 +57,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Course) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Course(row.id as number);
|
await deleteDemo03Course(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -56,10 +56,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,10 +57,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Grade) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Grade(row.id as number);
|
await deleteDemo03Grade(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,10 +58,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Student) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Student(row.id as number);
|
await deleteDemo03Student(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -70,10 +70,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Student) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Student(row.id as number);
|
await deleteDemo03Student(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -70,10 +70,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,12 @@ import { h, nextTick, onMounted, reactive, ref } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download, Plus } from '@vben/icons';
|
import { Download, Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
downloadFileFromBlobPart,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
|
@ -29,9 +34,7 @@ import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||||
import { downloadByData } from '#/utils/download';
|
|
||||||
|
|
||||||
import Demo01ContactForm from './modules/form.vue';
|
import Demo01ContactForm from './modules/form.vue';
|
||||||
|
|
||||||
|
|
@ -100,10 +103,7 @@ async function onDelete(row: Demo01ContactApi.Demo01Contact) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo01Contact(row.id as number);
|
await deleteDemo01Contact(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await getList();
|
await getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
@ -115,7 +115,7 @@ async function onExport() {
|
||||||
try {
|
try {
|
||||||
exportLoading.value = true;
|
exportLoading.value = true;
|
||||||
const data = await exportDemo01Contact(queryParams);
|
const data = await exportDemo01Contact(queryParams);
|
||||||
downloadByData(data, '示例联系人.xls');
|
downloadFileFromBlobPart({ fileName: '示例联系人.xls', source: data });
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false;
|
exportLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,10 +75,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,13 @@ import { h, nextTick, onMounted, reactive, ref } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download, Plus } from '@vben/icons';
|
import { Download, Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime, isEmpty } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
downloadFileFromBlobPart,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
isEmpty,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import { Button, Form, Input, message, RangePicker } from 'ant-design-vue';
|
import { Button, Form, Input, message, RangePicker } from 'ant-design-vue';
|
||||||
import { VxeColumn, VxeTable } from 'vxe-table';
|
import { VxeColumn, VxeTable } from 'vxe-table';
|
||||||
|
|
@ -20,8 +26,6 @@ import {
|
||||||
import { ContentWrap } from '#/components/content-wrap';
|
import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
import { downloadByData } from '#/utils/download';
|
|
||||||
|
|
||||||
import Demo02CategoryForm from './modules/form.vue';
|
import Demo02CategoryForm from './modules/form.vue';
|
||||||
|
|
||||||
|
|
@ -90,10 +94,7 @@ async function onDelete(row: Demo02CategoryApi.Demo02Category) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo02Category(row.id as number);
|
await deleteDemo02Category(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await getList();
|
await getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
@ -105,7 +106,7 @@ async function onExport() {
|
||||||
try {
|
try {
|
||||||
exportLoading.value = true;
|
exportLoading.value = true;
|
||||||
const data = await exportDemo02Category(queryParams);
|
const data = await exportDemo02Category(queryParams);
|
||||||
downloadByData(data, '示例分类.xls');
|
downloadFileFromBlobPart({ fileName: '示例分类.xls', source: data });
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false;
|
exportLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,12 @@ import { h, nextTick, onMounted, reactive, ref } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download, Plus } from '@vben/icons';
|
import { Download, Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
downloadFileFromBlobPart,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
|
@ -31,9 +36,7 @@ import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||||
import { downloadByData } from '#/utils/download';
|
|
||||||
|
|
||||||
import Demo03CourseList from './modules/demo03-course-list.vue';
|
import Demo03CourseList from './modules/demo03-course-list.vue';
|
||||||
import Demo03GradeList from './modules/demo03-grade-list.vue';
|
import Demo03GradeList from './modules/demo03-grade-list.vue';
|
||||||
|
|
@ -117,10 +120,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Student) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Student(row.id as number);
|
await deleteDemo03Student(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await getList();
|
await getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
@ -132,7 +132,7 @@ async function onExport() {
|
||||||
try {
|
try {
|
||||||
exportLoading.value = true;
|
exportLoading.value = true;
|
||||||
const data = await exportDemo03Student(queryParams);
|
const data = await exportDemo03Student(queryParams);
|
||||||
downloadByData(data, '学生.xls');
|
downloadFileFromBlobPart({ fileName: '学生.xls', source: data });
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false;
|
exportLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,11 @@ import { h, nextTick, onMounted, reactive, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { Plus } from '@vben/icons';
|
import { Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
|
@ -26,7 +30,6 @@ import {
|
||||||
import { ContentWrap } from '#/components/content-wrap';
|
import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
|
|
||||||
import Demo03CourseForm from './demo03-course-form.vue';
|
import Demo03CourseForm from './demo03-course-form.vue';
|
||||||
|
|
||||||
|
|
@ -62,10 +65,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Course) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Course(row.id as number);
|
await deleteDemo03Course(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
getList();
|
getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,11 @@ import { h, nextTick, onMounted, reactive, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { Plus } from '@vben/icons';
|
import { Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
|
@ -26,7 +30,6 @@ import {
|
||||||
import { ContentWrap } from '#/components/content-wrap';
|
import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
|
|
||||||
import Demo03GradeForm from './demo03-grade-form.vue';
|
import Demo03GradeForm from './demo03-grade-form.vue';
|
||||||
|
|
||||||
|
|
@ -62,10 +65,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Grade) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Grade(row.id as number);
|
await deleteDemo03Grade(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
getList();
|
getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -72,10 +72,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,12 @@ import { h, nextTick, onMounted, reactive, ref } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download, Plus } from '@vben/icons';
|
import { Download, Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
downloadFileFromBlobPart,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
|
@ -31,9 +36,7 @@ import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||||
import { downloadByData } from '#/utils/download';
|
|
||||||
|
|
||||||
import Demo03CourseList from './modules/demo03-course-list.vue';
|
import Demo03CourseList from './modules/demo03-course-list.vue';
|
||||||
import Demo03GradeList from './modules/demo03-grade-list.vue';
|
import Demo03GradeList from './modules/demo03-grade-list.vue';
|
||||||
|
|
@ -113,10 +116,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Student) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Student(row.id as number);
|
await deleteDemo03Student(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await getList();
|
await getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
@ -128,7 +128,7 @@ async function onExport() {
|
||||||
try {
|
try {
|
||||||
exportLoading.value = true;
|
exportLoading.value = true;
|
||||||
const data = await exportDemo03Student(queryParams);
|
const data = await exportDemo03Student(queryParams);
|
||||||
downloadByData(data, '学生.xls');
|
downloadFileFromBlobPart({ fileName: '学生.xls', source: data });
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false;
|
exportLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,9 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 提交表单
|
// 提交表单
|
||||||
const data = formData.value as Demo03StudentApi.Demo03Student;
|
const data = formData.value as Demo03StudentApi.Demo03Student;
|
||||||
// 拼接子表的数据
|
// 拼接子表的数据
|
||||||
data.demo03Courses = demo03CourseFormRef.value?.getData();
|
data.demo03courses = demo03CourseFormRef.value?.getData();
|
||||||
data.demo03Grade = demo03GradeFormRef.value?.getValues();
|
data.demo03grade =
|
||||||
|
demo03GradeFormRef.value?.getValues() as Demo03StudentApi.Demo03Grade;
|
||||||
try {
|
try {
|
||||||
await (formData.value?.id
|
await (formData.value?.id
|
||||||
? updateDemo03Student(data)
|
? updateDemo03Student(data)
|
||||||
|
|
@ -91,10 +92,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,12 @@ import { h, nextTick, onMounted, reactive, ref } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download, Plus } from '@vben/icons';
|
import { Download, Plus } from '@vben/icons';
|
||||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
import {
|
||||||
|
cloneDeep,
|
||||||
|
downloadFileFromBlobPart,
|
||||||
|
formatDateTime,
|
||||||
|
getRangePickerDefaultProps,
|
||||||
|
} from '@vben/utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
|
@ -30,9 +35,7 @@ import { ContentWrap } from '#/components/content-wrap';
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { TableToolbar } from '#/components/table-toolbar';
|
import { TableToolbar } from '#/components/table-toolbar';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { getRangePickerDefaultProps } from '#/utils/date';
|
|
||||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||||
import { downloadByData } from '#/utils/download';
|
|
||||||
|
|
||||||
import Demo03StudentForm from './modules/form.vue';
|
import Demo03StudentForm from './modules/form.vue';
|
||||||
|
|
||||||
|
|
@ -107,10 +110,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Student) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDemo03Student(row.id as number);
|
await deleteDemo03Student(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await getList();
|
await getList();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
@ -122,7 +122,7 @@ async function onExport() {
|
||||||
try {
|
try {
|
||||||
exportLoading.value = true;
|
exportLoading.value = true;
|
||||||
const data = await exportDemo03Student(queryParams);
|
const data = await exportDemo03Student(queryParams);
|
||||||
downloadByData(data, '学生.xls');
|
downloadFileFromBlobPart({ fileName: '学生.xls', source: data });
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false;
|
exportLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,10 +91,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import type { InfraFileApi } from '#/api/infra/file';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Upload } from '@vben/icons';
|
import { Upload } from '@vben/icons';
|
||||||
|
import { openWindow } from '@vben/utils';
|
||||||
|
|
||||||
import { useClipboard } from '@vueuse/core';
|
import { useClipboard } from '@vueuse/core';
|
||||||
import { Button, Image, message } from 'ant-design-vue';
|
import { Button, Image, message } from 'ant-design-vue';
|
||||||
|
|
@ -52,7 +53,7 @@ async function onCopyUrl(row: InfraFileApi.File) {
|
||||||
/** 打开 URL */
|
/** 打开 URL */
|
||||||
function openUrl(url?: string) {
|
function openUrl(url?: string) {
|
||||||
if (url) {
|
if (url) {
|
||||||
window.open(url, '_blank');
|
openWindow(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -65,10 +66,9 @@ async function onDelete(row: InfraFileApi.File) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteFile(row.id as number);
|
await deleteFile(row.id as number);
|
||||||
message.success({
|
message.success(
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name || row.path]),
|
$t('ui.actionMessage.deleteSuccess', [row.name || row.path]),
|
||||||
key: 'action_process_msg',
|
);
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,11 @@ import type {
|
||||||
} from '#/adapter/vxe-table';
|
} from '#/adapter/vxe-table';
|
||||||
import type { InfraFileConfigApi } from '#/api/infra/file-config';
|
import type { InfraFileConfigApi } from '#/api/infra/file-config';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { confirm, Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Plus } from '@vben/icons';
|
import { Plus } from '@vben/icons';
|
||||||
|
import { openWindow } from '@vben/utils';
|
||||||
|
|
||||||
import { Button, message, Modal } from 'ant-design-vue';
|
import { Button, message } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
|
|
@ -51,10 +52,7 @@ async function onMaster(row: InfraFileConfigApi.FileConfig) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await updateFileConfigMaster(row.id as number);
|
await updateFileConfigMaster(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
@ -72,14 +70,13 @@ async function onTest(row: InfraFileConfigApi.FileConfig) {
|
||||||
const response = await testFileConfig(row.id as number);
|
const response = await testFileConfig(row.id as number);
|
||||||
hideLoading();
|
hideLoading();
|
||||||
// 确认是否访问该文件
|
// 确认是否访问该文件
|
||||||
Modal.confirm({
|
confirm({
|
||||||
title: '测试上传成功',
|
title: '测试上传成功',
|
||||||
content: '是否要访问该文件?',
|
content: '是否要访问该文件?',
|
||||||
okText: '访问',
|
confirmText: '访问',
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
onOk: () => {
|
}).then(() => {
|
||||||
window.open(response, '_blank');
|
openWindow(response);
|
||||||
},
|
|
||||||
});
|
});
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
@ -95,10 +92,7 @@ async function onDelete(row: InfraFileConfigApi.FileConfig) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteFileConfig(row.id as number);
|
await deleteFileConfig(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,11 @@ import type { InfraJobApi } from '#/api/infra/job';
|
||||||
|
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { confirm, Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download, History, Plus } from '@vben/icons';
|
import { Download, History, Plus } from '@vben/icons';
|
||||||
import { downloadFileFromBlobPart } from '@vben/utils';
|
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||||
|
|
||||||
import { Button, message, Modal } from 'ant-design-vue';
|
import { Button, message } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
|
|
@ -74,32 +74,24 @@ async function onUpdateStatus(row: InfraJobApi.Job) {
|
||||||
? InfraJobStatusEnum.NORMAL
|
? InfraJobStatusEnum.NORMAL
|
||||||
: InfraJobStatusEnum.STOP;
|
: InfraJobStatusEnum.STOP;
|
||||||
const statusText = status === InfraJobStatusEnum.NORMAL ? '启用' : '停用';
|
const statusText = status === InfraJobStatusEnum.NORMAL ? '启用' : '停用';
|
||||||
Modal.confirm({
|
|
||||||
title: '确认操作',
|
confirm({
|
||||||
content: `确定${statusText} ${row.name} 吗?`,
|
content: `确定${statusText} ${row.name} 吗?`,
|
||||||
onOk: async () => {
|
}).then(async () => {
|
||||||
await updateJobStatus(row.id as number, status);
|
await updateJobStatus(row.id as number, status);
|
||||||
message.success({
|
// 提示成功
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
key: 'action_process_msg',
|
onRefresh();
|
||||||
});
|
|
||||||
onRefresh();
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 执行一次任务 */
|
/** 执行一次任务 */
|
||||||
async function onTrigger(row: InfraJobApi.Job) {
|
async function onTrigger(row: InfraJobApi.Job) {
|
||||||
Modal.confirm({
|
confirm({
|
||||||
title: '确认操作',
|
|
||||||
content: `确定执行一次 ${row.name} 吗?`,
|
content: `确定执行一次 ${row.name} 吗?`,
|
||||||
onOk: async () => {
|
}).then(async () => {
|
||||||
await runJob(row.id as number);
|
await runJob(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -120,10 +112,7 @@ async function onDelete(row: InfraJobApi.Job) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteJob(row.id as number);
|
await deleteJob(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
const result = await getAreaByIp(data.ip);
|
const result = await getAreaByIp(data.ip);
|
||||||
// 设置结果
|
// 设置结果
|
||||||
await setFieldValue('result', result);
|
await setFieldValue('result', result);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,7 @@ async function onDelete(row: SystemDeptApi.Dept) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteDept(row.id as number);
|
await deleteDept(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,10 +52,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,7 @@ async function onDelete(row: SystemMailAccountApi.MailAccount) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteMailAccount(row.id as number);
|
await deleteMailAccount(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.mail]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.mail]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,10 +72,7 @@ async function onDelete(row: SystemMailTemplateApi.MailTemplate) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteMailTemplate(row.id as number);
|
await deleteMailTemplate(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success('邮件发送成功');
|
||||||
content: '邮件发送成功',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('发送邮件失败', error);
|
console.error('发送邮件失败', error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,7 @@ async function onDelete(row: SystemMenuApi.Menu) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteMenu(row.id as number);
|
await deleteMenu(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,7 @@ async function onDelete(row: SystemNoticeApi.Notice) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteNotice(row.id as number);
|
await deleteNotice(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.title]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.title]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
@ -65,10 +62,7 @@ async function onPush(row: SystemNoticeApi.Notice) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await pushNotice(row.id as number);
|
await pushNotice(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,7 @@ async function onRead(row: SystemNotifyMessageApi.NotifyMessage) {
|
||||||
// 执行标记已读操作
|
// 执行标记已读操作
|
||||||
await updateNotifyMessageRead([row.id]);
|
await updateNotifyMessageRead([row.id]);
|
||||||
// 提示成功
|
// 提示成功
|
||||||
message.success({
|
message.success('标记已读成功');
|
||||||
content: '标记已读成功',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
|
|
||||||
// 打开详情
|
// 打开详情
|
||||||
|
|
@ -60,10 +57,7 @@ async function onRead(row: SystemNotifyMessageApi.NotifyMessage) {
|
||||||
async function onMarkRead() {
|
async function onMarkRead() {
|
||||||
const rows = gridApi.grid.getCheckboxRecords();
|
const rows = gridApi.grid.getCheckboxRecords();
|
||||||
if (!rows || rows.length === 0) {
|
if (!rows || rows.length === 0) {
|
||||||
message.warning({
|
message.warning('请选择需要标记的站内信');
|
||||||
content: '请选择需要标记的站内信',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,10 +70,7 @@ async function onMarkRead() {
|
||||||
// 执行标记已读操作
|
// 执行标记已读操作
|
||||||
await updateNotifyMessageRead(ids);
|
await updateNotifyMessageRead(ids);
|
||||||
// 提示成功
|
// 提示成功
|
||||||
message.success({
|
message.success('标记已读成功');
|
||||||
content: '标记已读成功',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await gridApi.grid.setAllCheckboxRow(false);
|
await gridApi.grid.setAllCheckboxRow(false);
|
||||||
onRefresh();
|
onRefresh();
|
||||||
}
|
}
|
||||||
|
|
@ -94,10 +85,7 @@ async function onMarkAllRead() {
|
||||||
// 执行标记已读操作
|
// 执行标记已读操作
|
||||||
await updateAllNotifyMessageRead();
|
await updateAllNotifyMessageRead();
|
||||||
// 提示成功
|
// 提示成功
|
||||||
message.success({
|
message.success('全部标记已读成功');
|
||||||
content: '全部标记已读成功',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
await gridApi.grid.setAllCheckboxRow(false);
|
await gridApi.grid.setAllCheckboxRow(false);
|
||||||
onRefresh();
|
onRefresh();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,7 @@ async function onDelete(row: SystemNotifyTemplateApi.NotifyTemplate) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteNotifyTemplate(row.id as number);
|
await deleteNotifyTemplate(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,10 +56,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('发送站内信失败', error);
|
console.error('发送站内信失败', error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,7 @@ async function onDelete(row: SystemOAuth2ClientApi.OAuth2Client) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteOAuth2Client(row.id as number);
|
await deleteOAuth2Client(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,7 @@ async function onDelete(row: SystemOAuth2TokenApi.OAuth2Token) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteOAuth2Token(row.accessToken);
|
await deleteOAuth2Token(row.accessToken);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,7 @@ async function onDelete(row: SystemPostApi.Post) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deletePost(row.id as number);
|
await deletePost(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,10 +67,7 @@ async function onDelete(row: SystemRoleApi.Role) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteRole(row.id as number);
|
await deleteRole(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -59,10 +59,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
});
|
});
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,10 +58,7 @@ async function onDelete(row: SystemSmsChannelApi.SmsChannel) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteSmsChannel(row.id as number);
|
await deleteSmsChannel(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.signature]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.signature]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,7 @@ async function onDelete(row: SystemSmsTemplateApi.SmsTemplate) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteSmsTemplate(row.id as number);
|
await deleteSmsTemplate(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success('短信发送成功');
|
||||||
content: '短信发送成功',
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('发送短信失败', error);
|
console.error('发送短信失败', error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,7 @@ async function onDelete(row: SystemSocialClientApi.SocialClient) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteSocialClient(row.id as number);
|
await deleteSocialClient(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,10 +68,7 @@ async function onDelete(row: SystemTenantApi.Tenant) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteTenant(row.id as number);
|
await deleteTenant(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,7 @@ async function onDelete(row: SystemTenantPackageApi.TenantPackage) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteTenantPackage(row.id as number);
|
await deleteTenantPackage(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -63,10 +63,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@ import type { SystemUserApi } from '#/api/system/user';
|
||||||
|
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { confirm, Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { Download, Plus, Upload } from '@vben/icons';
|
import { Download, Plus, Upload } from '@vben/icons';
|
||||||
import { downloadFileFromBlobPart } from '@vben/utils';
|
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||||
|
|
||||||
import { Button, message, Modal } from 'ant-design-vue';
|
import { Button, message } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
|
|
@ -94,10 +94,7 @@ async function onDelete(row: SystemUserApi.User) {
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteUser(row.id as number);
|
await deleteUser(row.id as number);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.username]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.username]),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
|
@ -114,35 +111,29 @@ function onAssignRole(row: SystemUserApi.User) {
|
||||||
assignRoleModalApi.setData(row).open();
|
assignRoleModalApi.setData(row).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO @芋艿:后续怎么简化一下 confirm 的实现。
|
|
||||||
/** 更新用户状态 */
|
/** 更新用户状态 */
|
||||||
async function onStatusChange(
|
async function onStatusChange(
|
||||||
newStatus: number,
|
newStatus: number,
|
||||||
row: SystemUserApi.User,
|
row: SystemUserApi.User,
|
||||||
): Promise<boolean | undefined> {
|
): Promise<boolean | undefined> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
Modal.confirm({
|
confirm({
|
||||||
title: '切换状态',
|
|
||||||
content: `你要将${row.username}的状态切换为【${getDictLabel(DICT_TYPE.COMMON_STATUS, newStatus)}】吗?`,
|
content: `你要将${row.username}的状态切换为【${getDictLabel(DICT_TYPE.COMMON_STATUS, newStatus)}】吗?`,
|
||||||
onCancel() {
|
})
|
||||||
reject(new Error('已取消'));
|
.then(async () => {
|
||||||
},
|
|
||||||
onOk() {
|
|
||||||
// 更新用户状态
|
// 更新用户状态
|
||||||
updateUserStatus(row.id as number, newStatus)
|
const res = await updateUserStatus(row.id as number, newStatus);
|
||||||
.then(() => {
|
if (res) {
|
||||||
// 提示并返回成功
|
// 提示并返回成功
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
resolve(true);
|
||||||
key: 'action_process_msg',
|
} else {
|
||||||
});
|
reject(new Error('更新失败'));
|
||||||
resolve(true);
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch(() => {
|
||||||
reject(error);
|
reject(new Error('取消操作'));
|
||||||
});
|
});
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success({
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
content: $t('ui.actionMessage.operationSuccess'),
|
|
||||||
key: 'action_process_msg',
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue