mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-21 13:28:59 +08:00
refactor: 移除 Modal 组件直接导入,统一使用 window.modal 调用
将项目中直接导入的 antdv-next Modal 组件替换为通过 window.modal 调用,提升代码一致性 删除不再使用的 table-switch.vue 组件
This commit is contained in:
@@ -5,7 +5,7 @@ import type { SocialInfo } from '#/api/system/social/model';
|
||||
|
||||
import { onMounted, ref } from 'vue';
|
||||
|
||||
import { Alert, Avatar, Card, Empty, Modal, Tooltip } from 'antdv-next';
|
||||
import { Alert, Avatar, Card, Empty, Tooltip } from 'antdv-next';
|
||||
|
||||
import { authUnbinding } from '#/api';
|
||||
import { socialList } from '#/api/system/social';
|
||||
@@ -50,7 +50,7 @@ function handleUnbind(record: BindItemWithInfo) {
|
||||
if (!record.info) {
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
content: `确定解绑[${record.source}]平台的[${record.info.userName}]账号吗?`,
|
||||
async onOk() {
|
||||
await authUnbinding(record.info!.id);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { UpdatePasswordParam } from '#/api/system/profile/model';
|
||||
|
||||
import { Modal } from 'antdv-next';
|
||||
import { omit } from 'lodash-es';
|
||||
|
||||
import { useVbenForm, z } from '#/adapter/form';
|
||||
@@ -79,7 +78,7 @@ function buttonLoading(loading: boolean) {
|
||||
|
||||
const authStore = useAuthStore();
|
||||
function handleSubmit(values: any) {
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
content: '确认修改密码吗?',
|
||||
onOk: async () => {
|
||||
try {
|
||||
|
||||
@@ -9,7 +9,7 @@ import { ref } from 'vue';
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { getPopupContainer } from '@vben/utils';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import { commonDownloadExcel } from '#/utils/file/download';
|
||||
@@ -84,7 +84,7 @@ async function handleDelete(row: Recordable<any>) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: any) => row.id);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -8,7 +8,7 @@ import { ref } from 'vue';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -111,7 +111,7 @@ async function handleDelete(row: LoginLog) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: LoginLog) => row.infoId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -8,7 +8,7 @@ import type { OperationLog } from '#/api/monitor/operlog/model';
|
||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import { Modal, Space } from 'antdv-next';
|
||||
import { Space } from 'antdv-next';
|
||||
|
||||
import {
|
||||
addSortParams,
|
||||
@@ -124,7 +124,7 @@ function handleClear() {
|
||||
async function handleDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: OperationLog) => row.operId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条操作日志吗?`,
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useAccess } from '@vben/access';
|
||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
||||
import { DEFAULT_CLIENT_ID, EnableStatus } from '@vben/constants';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -93,7 +93,7 @@ async function handleDelete(row: Client) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: Client) => row.id);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { SysConfig } from '#/api/system/config/model';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -93,7 +93,7 @@ async function handleDelete(row: SysConfig) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: SysConfig) => row.configId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -9,7 +9,7 @@ import { ref } from 'vue';
|
||||
|
||||
import { useVbenDrawer } from '@vben/common-ui';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -101,7 +101,7 @@ async function handleDelete(row: DictData) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: DictData) => row.dictCode);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -15,14 +15,7 @@ import {
|
||||
PlusOutlined,
|
||||
SyncOutlined,
|
||||
} from '@ant-design/icons-vue';
|
||||
import {
|
||||
Alert,
|
||||
Input,
|
||||
Modal,
|
||||
Popconfirm,
|
||||
Space,
|
||||
Tooltip,
|
||||
} from 'antdv-next';
|
||||
import { Alert, Input, Popconfirm, Space, Tooltip } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -121,7 +114,7 @@ function handleDownloadExcel() {
|
||||
}
|
||||
|
||||
function handleRefreshCache() {
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
content: '确认刷新字典类型缓存吗?',
|
||||
okButtonProps: {
|
||||
@@ -171,7 +164,7 @@ watch(searchValue, (value) => {
|
||||
<div
|
||||
:class="
|
||||
cn(
|
||||
'bg-background flex max-h-[100vh] w-[360px] flex-col overflow-y-hidden',
|
||||
'flex max-h-[100vh] w-[360px] flex-col overflow-y-hidden bg-background',
|
||||
'rounded-lg',
|
||||
'dict-type-card',
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ import { ref } from 'vue';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -105,7 +105,7 @@ async function handleDelete(row: DictType) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: DictType) => row.dictId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { Notice } from '#/api/system/notice/model';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import { noticeList, noticeRemove } from '#/api/system/notice';
|
||||
@@ -82,7 +82,7 @@ async function handleDelete(row: Notice) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: Notice) => row.noticeId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useAccess } from '@vben/access';
|
||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
||||
import { EnableStatus } from '@vben/constants';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -89,7 +89,7 @@ async function handleDelete(row: OssConfig) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: OssConfig) => row.ossConfigId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -14,15 +14,7 @@ import { $t } from '@vben/locales';
|
||||
import { stringify } from '@vben/request';
|
||||
import { useAccessStore } from '@vben/stores';
|
||||
|
||||
import {
|
||||
Image,
|
||||
Modal,
|
||||
Popconfirm,
|
||||
Space,
|
||||
Spin,
|
||||
Switch,
|
||||
Tooltip,
|
||||
} from 'antdv-next';
|
||||
import { Image, Popconfirm, Space, Spin, Switch, Tooltip } from 'antdv-next';
|
||||
|
||||
import {
|
||||
addSortParams,
|
||||
@@ -166,7 +158,7 @@ async function handleDelete(row: OssFile) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: OssFile) => row.ossId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -8,7 +8,7 @@ import { ref } from 'vue';
|
||||
|
||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -107,7 +107,7 @@ async function handleDelete(row: Post) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: Post) => row.postId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useRoute } from 'vue-router';
|
||||
|
||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -93,7 +93,7 @@ async function handleAuthCancel(record: User) {
|
||||
function handleMultipleAuthCancel() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: User) => row.userId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认取消选中的${ids.length}条授权记录吗?`,
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
SUPERADMIN_ROLE_KEY,
|
||||
} from '@vben/constants';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -108,7 +108,7 @@ async function handleDelete(row: Role) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: Role) => row.roleId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -9,7 +9,7 @@ import { computed } from 'vue';
|
||||
import { useAccess } from '@vben/access';
|
||||
import { Fallback, Page, useVbenDrawer } from '@vben/common-ui';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -106,7 +106,7 @@ async function handleDelete(row: Tenant) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: Tenant) => row.id);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -9,7 +9,7 @@ import { computed } from 'vue';
|
||||
import { useAccess } from '@vben/access';
|
||||
import { Fallback, Page, useVbenDrawer } from '@vben/common-ui';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -92,7 +92,7 @@ async function handleDelete(row: TenantPackage) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: TenantPackage) => row.packageId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -14,7 +14,7 @@ import { EnableStatus, SUPERADMIN_USER_ID } from '@vben/constants';
|
||||
import { $t } from '@vben/locales';
|
||||
import { preferences } from '@vben/preferences';
|
||||
|
||||
import { Avatar, Dropdown, Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Avatar, Dropdown, Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -145,7 +145,7 @@ async function handleDelete(row: User) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: User) => row.userId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -6,7 +6,7 @@ import { h, ref, unref } from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { ExcelIcon, InBoxIcon } from '@vben/icons';
|
||||
|
||||
import { Modal, Switch, Upload } from 'antdv-next';
|
||||
import { Switch, Upload } from 'antdv-next';
|
||||
|
||||
import { downloadImportTemplate, userImportData } from '#/api/system/user';
|
||||
import { commonDownloadExcel } from '#/utils/file/download';
|
||||
@@ -35,11 +35,11 @@ async function handleSubmit() {
|
||||
updateSupport: unref(checked),
|
||||
};
|
||||
const { code, msg } = await userImportData(data);
|
||||
let modal = Modal.success;
|
||||
let modal = window.modal.success;
|
||||
if (code === 200) {
|
||||
emit('reload');
|
||||
} else {
|
||||
modal = Modal.error;
|
||||
modal = window.modal.error;
|
||||
}
|
||||
handleCancel();
|
||||
modal({
|
||||
|
||||
@@ -9,7 +9,7 @@ import { useRouter } from 'vue-router';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
@@ -170,7 +170,7 @@ async function handleDelete(record: Recordable<any>) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: any) => row.tableId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
UsergroupDeleteOutlined,
|
||||
UserOutlined,
|
||||
} from '@ant-design/icons-vue';
|
||||
import { Dropdown, Menu, MenuItem, Modal, Space } from 'antdv-next';
|
||||
import { Dropdown, Menu, MenuItem, Space } from 'antdv-next';
|
||||
|
||||
import {
|
||||
cancelProcessApply,
|
||||
@@ -68,7 +68,7 @@ const showButtonOther = computed(() => {
|
||||
// 进行中 可以撤销
|
||||
const revocable = computed(() => props.task?.flowStatus === 'waiting');
|
||||
async function handleCancel() {
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
content: '确定要撤销该申请吗?',
|
||||
centered: true,
|
||||
@@ -102,7 +102,7 @@ function handleEdit() {
|
||||
}
|
||||
|
||||
function handleRemove() {
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
content: '确定删除该申请吗?',
|
||||
centered: true,
|
||||
@@ -213,7 +213,7 @@ const [AddSignatureModal, addSignatureModalApi] = useVbenModal({
|
||||
function handleAddSignature(userList: User[]) {
|
||||
if (userList.length === 0) return;
|
||||
const userIds = userList.map((user) => user.userId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
content: '确认加签吗?',
|
||||
centered: true,
|
||||
@@ -230,7 +230,7 @@ const [ReductionSignatureModal, reductionSignatureModalApi] = useVbenModal({
|
||||
function handleReductionSignature(userList: User[]) {
|
||||
if (userList.length === 0) return;
|
||||
const userIds = userList.map((user) => user.userId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
content: '确认减签吗?',
|
||||
centered: true,
|
||||
@@ -261,7 +261,7 @@ function handleUpdateAssignee(userList: User[]) {
|
||||
if (userList.length === 0) return;
|
||||
const current = userList[0];
|
||||
if (!current) return;
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '修改办理人',
|
||||
content: `确定修改办理人为${current?.nickName}吗?`,
|
||||
centered: true,
|
||||
@@ -292,7 +292,7 @@ const showMultiActions = computed(() => {
|
||||
cn(
|
||||
'absolute bottom-0 left-0',
|
||||
'border-t-solid border-t-[1px]',
|
||||
'bg-background w-full p-3',
|
||||
'w-full bg-background p-3',
|
||||
)
|
||||
"
|
||||
>
|
||||
|
||||
@@ -8,7 +8,7 @@ import { computed, ref } from 'vue';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { Descriptions, Modal } from 'antdv-next';
|
||||
import { Descriptions } from 'antdv-next';
|
||||
|
||||
import {
|
||||
getTaskByTaskId,
|
||||
@@ -57,7 +57,7 @@ const [TransferModal, transferModalApi] = useVbenModal({
|
||||
function handleTransfer(userList: User[]) {
|
||||
if (userList.length === 0 || !taskInfo.value) return;
|
||||
const current = userList[0];
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '转办',
|
||||
content: `确定转办给${current?.nickName}吗?`,
|
||||
centered: true,
|
||||
@@ -78,7 +78,7 @@ function handleTermination() {
|
||||
if (!taskInfo.value) {
|
||||
return;
|
||||
}
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '审批终止',
|
||||
content: '确定终止当前审批流程吗?',
|
||||
centered: true,
|
||||
@@ -96,7 +96,7 @@ const [AddSignatureModal, addSignatureModalApi] = useVbenModal({
|
||||
function handleAddSignature(userList: User[]) {
|
||||
if (userList.length === 0 || !taskInfo.value) return;
|
||||
const userIds = userList.map((user) => user.userId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
content: '确认加签吗?',
|
||||
centered: true,
|
||||
@@ -116,7 +116,7 @@ const [ReductionSignatureModal, reductionSignatureModalApi] = useVbenModal({
|
||||
function handleReductionSignature(userList: User[]) {
|
||||
if (userList.length === 0 || !taskInfo.value) return;
|
||||
const userIds = userList.map((user) => user.userId);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
content: '确认减签吗?',
|
||||
centered: true,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { defineComponent, h, ref } from 'vue';
|
||||
|
||||
import { Modal } from 'antdv-next';
|
||||
import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
@@ -20,7 +19,7 @@ export interface ApproveWithReasonModalProps {
|
||||
export function approveWithReasonModal(props: ApproveWithReasonModalProps) {
|
||||
const { onOk, title, description } = props;
|
||||
const content = ref('');
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title,
|
||||
content: h(
|
||||
defineComponent({
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
|
||||
import { Page, useVbenDrawer, useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import { cancelProcessApply } from '#/api/workflow/instance';
|
||||
@@ -124,7 +124,7 @@ async function handleRevoke(row: Required<LeaveForm>) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: Required<LeaveForm>) => row.id);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -13,7 +13,7 @@ import { useRouter } from 'vue-router';
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import { Modal, Popconfirm, RadioGroup, Space, Switch } from 'antdv-next';
|
||||
import { Popconfirm, RadioGroup, Space, Switch } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -127,7 +127,7 @@ async function handleDelete(row: Recordable<any>) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: any) => row.id);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ref } from 'vue';
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import { Modal, Popconfirm, RadioGroup, Space } from 'antdv-next';
|
||||
import { Popconfirm, RadioGroup, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -135,7 +135,7 @@ async function handleDelete(row: Recordable<any>) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: any) => row.id);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ref } from 'vue';
|
||||
import { JsonPreview, useVbenModal } from '@vben/common-ui';
|
||||
import { cn, getPopupContainer } from '@vben/utils';
|
||||
|
||||
import { Modal, Tag } from 'antdv-next';
|
||||
import { Tag } from 'antdv-next';
|
||||
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { instanceVariable, updateFlowVariable } from '#/api/workflow/instance';
|
||||
@@ -141,7 +141,7 @@ const [Form, formApi] = useVbenForm({
|
||||
},
|
||||
handleSubmit: async (values) => {
|
||||
console.log(values);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '修改流程变量',
|
||||
content: '确认修改流程变量吗?',
|
||||
centered: true,
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { Spel } from '#/api/workflow/spel/model';
|
||||
|
||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
||||
|
||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import { spelDelete, spelList } from '#/api/workflow/spel';
|
||||
@@ -80,7 +80,7 @@ async function handleDelete(row: Spel) {
|
||||
function handleMultiDelete() {
|
||||
const rows = tableApi.grid.getCheckboxRecords();
|
||||
const ids = rows.map((row: Spel) => row.id);
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
|
||||
@@ -8,7 +8,7 @@ import { h, ref } from 'vue';
|
||||
import { CodeMirror, Page, useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { useClipboard } from '@vueuse/core';
|
||||
import { Alert, Card, Modal, RadioGroup, Switch } from 'antdv-next';
|
||||
import { Alert, Card, RadioGroup, Switch } from 'antdv-next';
|
||||
|
||||
import { FileUpload, ImageUpload } from '#/components/upload';
|
||||
|
||||
@@ -22,7 +22,7 @@ const multipleImageId = ref<string[]>(['1905537674682916865']);
|
||||
const multipleFileId = ref<string[]>(['1905191167882518529']);
|
||||
|
||||
function handlePreview(file: UploadFile) {
|
||||
Modal.info({
|
||||
window.modal.info({
|
||||
content: h('div', { class: 'break-all' }, JSON.stringify(file, null, 2)),
|
||||
maskClosable: true,
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import { h } from 'vue';
|
||||
|
||||
import { JsonPreview, useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { Modal, Space } from 'antdv-next';
|
||||
import { Space } from 'antdv-next';
|
||||
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
|
||||
@@ -35,7 +35,7 @@ async function getValues() {
|
||||
const v = await formApi.getValues();
|
||||
console.log(v);
|
||||
|
||||
Modal.info({
|
||||
window.modal.info({
|
||||
content: () => h(JsonPreview, { data: v }),
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { nextTick, onMounted } from 'vue';
|
||||
|
||||
import { JsonPreview } from '@vben/common-ui';
|
||||
|
||||
import { Button, Input, InputNumber, Modal, Select, Space } from 'antdv-next';
|
||||
import { Button, Input, InputNumber, Select, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
|
||||
@@ -248,7 +248,7 @@ function getData() {
|
||||
const data = tableApi.grid.getTableData();
|
||||
const { fullData } = data;
|
||||
console.log(fullData);
|
||||
Modal.info({
|
||||
window.modal.info({
|
||||
title: '提示',
|
||||
content: (
|
||||
<div class="max-h-[350px] overflow-y-auto">
|
||||
|
||||
Reference in New Issue
Block a user