mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-04-12 18:43:15 +08:00
refactor: 移除 Modal 组件直接导入,统一使用 window.modal 调用
将项目中直接导入的 antdv-next Modal 组件替换为通过 window.modal 调用,提升代码一致性 删除不再使用的 table-switch.vue 组件
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
import { $t } from '@vben/locales';
|
import { $t } from '@vben/locales';
|
||||||
|
|
||||||
import { Modal } from 'antdv-next';
|
|
||||||
|
|
||||||
import { useAuthStore } from '#/store';
|
import { useAuthStore } from '#/store';
|
||||||
|
|
||||||
import { requestClient } from './request';
|
import { requestClient } from './request';
|
||||||
@@ -83,7 +81,7 @@ export function handleUnauthorizedLogout() {
|
|||||||
if (error instanceof ImpossibleReturn401Exception) {
|
if (error instanceof ImpossibleReturn401Exception) {
|
||||||
lockLogoutRequest = true;
|
lockLogoutRequest = true;
|
||||||
if (import.meta.env.DEV) {
|
if (import.meta.env.DEV) {
|
||||||
Modal.error({
|
window.modal.error({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
centered: true,
|
centered: true,
|
||||||
content:
|
content:
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import {
|
|||||||
RsaEncryption,
|
RsaEncryption,
|
||||||
} from '@vben/utils';
|
} from '@vben/utils';
|
||||||
|
|
||||||
import { Modal } from 'antdv-next';
|
|
||||||
import { isEmpty, isNull } from 'lodash-es';
|
import { isEmpty, isNull } from 'lodash-es';
|
||||||
|
|
||||||
import { useAuthStore } from '#/store';
|
import { useAuthStore } from '#/store';
|
||||||
@@ -253,7 +252,7 @@ function createRequestClient(baseURL: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (response.config.successMessageMode === 'modal') {
|
if (response.config.successMessageMode === 'modal') {
|
||||||
Modal.success({
|
window.modal.success({
|
||||||
content: successMsg,
|
content: successMsg,
|
||||||
title: $t('http.successTip'),
|
title: $t('http.successTip'),
|
||||||
});
|
});
|
||||||
@@ -288,7 +287,7 @@ function createRequestClient(baseURL: string) {
|
|||||||
// errorMessageMode='modal'的时候会显示modal错误弹窗,而不是消息提示,用于一些比较重要的错误
|
// errorMessageMode='modal'的时候会显示modal错误弹窗,而不是消息提示,用于一些比较重要的错误
|
||||||
// errorMessageMode='none' 一般是调用时明确表示不希望自动弹出错误提示
|
// errorMessageMode='none' 一般是调用时明确表示不希望自动弹出错误提示
|
||||||
if (response.config.errorMessageMode === 'modal') {
|
if (response.config.errorMessageMode === 'modal') {
|
||||||
Modal.error({
|
window.modal.error({
|
||||||
content: timeoutMsg,
|
content: timeoutMsg,
|
||||||
title: $t('http.errorTip'),
|
title: $t('http.errorTip'),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { computed, ref } from 'vue';
|
|||||||
|
|
||||||
import { $t } from '@vben/locales';
|
import { $t } from '@vben/locales';
|
||||||
|
|
||||||
import { Modal, Switch } from 'antdv-next';
|
import { Switch } from 'antdv-next';
|
||||||
import { isFunction } from 'lodash-es';
|
import { isFunction } from 'lodash-es';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -64,7 +64,7 @@ function confirmUpdate(checked: boolean, lastStatus: boolean) {
|
|||||||
? props.confirmText(checked)
|
? props.confirmText(checked)
|
||||||
: `确认要更新状态吗?`;
|
: `确认要更新状态吗?`;
|
||||||
|
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content,
|
content,
|
||||||
centered: true,
|
centered: true,
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
export { default as OptionsTag } from './src/options-tag.vue';
|
export { default as OptionsTag } from './src/options-tag.vue';
|
||||||
export { default as TableSwitch } from './src/table-switch.vue';
|
|
||||||
|
|||||||
@@ -1,134 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { computed, ref } from 'vue';
|
|
||||||
|
|
||||||
import { $t } from '@vben/locales';
|
|
||||||
|
|
||||||
import { Modal, Switch } from 'antdv-next';
|
|
||||||
import { isFunction } from 'lodash-es';
|
|
||||||
|
|
||||||
type CheckedType = boolean | number | string;
|
|
||||||
|
|
||||||
interface Props {
|
|
||||||
/**
|
|
||||||
* 选中的文本
|
|
||||||
* @default i18n 启用
|
|
||||||
*/
|
|
||||||
checkedText?: string;
|
|
||||||
/**
|
|
||||||
* 未选中的文本
|
|
||||||
* @default i18n 禁用
|
|
||||||
*/
|
|
||||||
unCheckedText?: string;
|
|
||||||
checkedValue?: CheckedType;
|
|
||||||
unCheckedValue?: CheckedType;
|
|
||||||
disabled?: boolean;
|
|
||||||
/**
|
|
||||||
* 需要自己在内部处理更新的逻辑 因为status已经双向绑定了 可以直接获取
|
|
||||||
*/
|
|
||||||
api: () => PromiseLike<void>;
|
|
||||||
/**
|
|
||||||
* 更新前是否弹窗确认
|
|
||||||
* @default false
|
|
||||||
*/
|
|
||||||
confirm?: boolean;
|
|
||||||
/**
|
|
||||||
* 对应的提示内容
|
|
||||||
* @param checked 选中的值(更新后的值)
|
|
||||||
* @default string '确认要更新状态吗?'
|
|
||||||
*/
|
|
||||||
confirmText?: (checked: CheckedType) => string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
|
||||||
checkedText: undefined,
|
|
||||||
unCheckedText: undefined,
|
|
||||||
checkedValue: '0',
|
|
||||||
unCheckedValue: '1',
|
|
||||||
confirm: false,
|
|
||||||
confirmText: undefined,
|
|
||||||
});
|
|
||||||
|
|
||||||
const emit = defineEmits<{ reload: [] }>();
|
|
||||||
|
|
||||||
// 修改为computed 支持语言切换
|
|
||||||
const checkedTextComputed = computed(() => {
|
|
||||||
return props.checkedText ?? $t('pages.common.enable');
|
|
||||||
});
|
|
||||||
|
|
||||||
const unCheckedTextComputed = computed(() => {
|
|
||||||
return props.unCheckedText ?? $t('pages.common.disable');
|
|
||||||
});
|
|
||||||
|
|
||||||
const currentChecked = defineModel<CheckedType>('value', {
|
|
||||||
default: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
const loading = ref(false);
|
|
||||||
|
|
||||||
function confirmUpdate(checked: CheckedType, lastStatus: CheckedType) {
|
|
||||||
const content = isFunction(props.confirmText)
|
|
||||||
? props.confirmText(checked)
|
|
||||||
: `确认要更新状态吗?`;
|
|
||||||
|
|
||||||
Modal.confirm({
|
|
||||||
title: '提示',
|
|
||||||
content,
|
|
||||||
centered: true,
|
|
||||||
onOk: async () => {
|
|
||||||
try {
|
|
||||||
loading.value = true;
|
|
||||||
const { api } = props;
|
|
||||||
isFunction(api) && (await api());
|
|
||||||
emit('reload');
|
|
||||||
} catch {
|
|
||||||
currentChecked.value = lastStatus;
|
|
||||||
} finally {
|
|
||||||
loading.value = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onCancel: () => {
|
|
||||||
currentChecked.value = lastStatus;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleChange(checked: CheckedType, e: Event) {
|
|
||||||
// 阻止事件冒泡 否则会跟行选中冲突
|
|
||||||
e.stopPropagation();
|
|
||||||
const { checkedValue, unCheckedValue } = props;
|
|
||||||
// 原本的状态
|
|
||||||
const lastStatus = checked === checkedValue ? unCheckedValue : checkedValue;
|
|
||||||
// 切换状态
|
|
||||||
currentChecked.value = checked;
|
|
||||||
const { api } = props;
|
|
||||||
try {
|
|
||||||
loading.value = true;
|
|
||||||
|
|
||||||
if (props.confirm) {
|
|
||||||
confirmUpdate(checked, lastStatus);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
isFunction(api) && (await api());
|
|
||||||
emit('reload');
|
|
||||||
} catch {
|
|
||||||
currentChecked.value = lastStatus;
|
|
||||||
} finally {
|
|
||||||
loading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Switch
|
|
||||||
v-bind="$attrs"
|
|
||||||
:loading="loading"
|
|
||||||
:disabled="disabled"
|
|
||||||
:checked="currentChecked"
|
|
||||||
:checked-children="checkedTextComputed"
|
|
||||||
:checked-value="checkedValue"
|
|
||||||
:un-checked-children="unCheckedTextComputed"
|
|
||||||
:un-checked-value="unCheckedValue"
|
|
||||||
@change="handleChange"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
@@ -22,7 +22,6 @@ import { computed, onUnmounted, ref, watch } from 'vue';
|
|||||||
|
|
||||||
import { $t } from '@vben/locales';
|
import { $t } from '@vben/locales';
|
||||||
|
|
||||||
import { Modal } from 'antdv-next';
|
|
||||||
import { isFunction, isString } from 'lodash-es';
|
import { isFunction, isString } from 'lodash-es';
|
||||||
|
|
||||||
import { ossInfo } from '#/api/system/oss';
|
import { ossInfo } from '#/api/system/oss';
|
||||||
@@ -245,7 +244,7 @@ export function useUpload(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new Promise<boolean>((resolve) => {
|
return new Promise<boolean>((resolve) => {
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: $t('pages.common.tip'),
|
title: $t('pages.common.tip'),
|
||||||
content: $t('component.upload.confirmDelete', [currentFile.name]),
|
content: $t('component.upload.confirmDelete', [currentFile.name]),
|
||||||
okButtonProps: { danger: true },
|
okButtonProps: { danger: true },
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { $t } from '@vben/locales';
|
|||||||
import { useUserStore } from '@vben/stores';
|
import { useUserStore } from '@vben/stores';
|
||||||
import { buildUUID } from '@vben/utils';
|
import { buildUUID } from '@vben/utils';
|
||||||
|
|
||||||
import { Modal, notification } from 'antdv-next';
|
import { notification } from 'antdv-next';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ export const useNotifyStore = defineStore(
|
|||||||
function setRead(item: NotificationItem) {
|
function setRead(item: NotificationItem) {
|
||||||
!item.isRead && (item.isRead = true);
|
!item.isRead && (item.isRead = true);
|
||||||
// 显示信息
|
// 显示信息
|
||||||
Modal.info({
|
window.modal.info({
|
||||||
title: item.title,
|
title: item.title,
|
||||||
content: item.message,
|
content: item.message,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import type { Rule } from 'antdv-next/es/form';
|
|||||||
|
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
|
|
||||||
import { Alert, Form, Input, Modal } from 'antdv-next';
|
import { Alert, Form, Input } from 'antdv-next';
|
||||||
import { isFunction } from 'lodash-es';
|
import { isFunction } from 'lodash-es';
|
||||||
|
|
||||||
export interface ConfirmModalProps extends Omit<ModalFuncProps, 'visible'> {
|
export interface ConfirmModalProps extends Omit<ModalFuncProps, 'visible'> {
|
||||||
@@ -37,7 +37,7 @@ export function confirmDeleteModal(props: ConfirmModalProps) {
|
|||||||
const useForm = Form.useForm;
|
const useForm = Form.useForm;
|
||||||
const { validate, validateInfos } = useForm(formValue, rulesRef);
|
const { validate, validateInfos } = useForm(formValue, rulesRef);
|
||||||
|
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
...props,
|
...props,
|
||||||
centered: true,
|
centered: true,
|
||||||
content: (
|
content: (
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { ref } from 'vue';
|
|||||||
|
|
||||||
import { $t } from '@vben/locales';
|
import { $t } from '@vben/locales';
|
||||||
|
|
||||||
import { Modal } from 'antdv-next';
|
|
||||||
import { isFunction } from 'lodash-es';
|
import { isFunction } from 'lodash-es';
|
||||||
|
|
||||||
interface BeforeCloseDiffProps {
|
interface BeforeCloseDiffProps {
|
||||||
@@ -86,7 +85,7 @@ export function useBeforeCloseDiff(props: BeforeCloseDiffProps) {
|
|||||||
|
|
||||||
// 数据有变化,显示确认对话框
|
// 数据有变化,显示确认对话框
|
||||||
return new Promise<boolean>((resolve) => {
|
return new Promise<boolean>((resolve) => {
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: $t('pages.common.tip'),
|
title: $t('pages.common.tip'),
|
||||||
content: $t('pages.common.beforeCloseTip'),
|
content: $t('pages.common.beforeCloseTip'),
|
||||||
centered: true,
|
centered: true,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { SocialInfo } from '#/api/system/social/model';
|
|||||||
|
|
||||||
import { onMounted, ref } from 'vue';
|
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 { authUnbinding } from '#/api';
|
||||||
import { socialList } from '#/api/system/social';
|
import { socialList } from '#/api/system/social';
|
||||||
@@ -50,7 +50,7 @@ function handleUnbind(record: BindItemWithInfo) {
|
|||||||
if (!record.info) {
|
if (!record.info) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
content: `确定解绑[${record.source}]平台的[${record.info.userName}]账号吗?`,
|
content: `确定解绑[${record.source}]平台的[${record.info.userName}]账号吗?`,
|
||||||
async onOk() {
|
async onOk() {
|
||||||
await authUnbinding(record.info!.id);
|
await authUnbinding(record.info!.id);
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { UpdatePasswordParam } from '#/api/system/profile/model';
|
import type { UpdatePasswordParam } from '#/api/system/profile/model';
|
||||||
|
|
||||||
import { Modal } from 'antdv-next';
|
|
||||||
import { omit } from 'lodash-es';
|
import { omit } from 'lodash-es';
|
||||||
|
|
||||||
import { useVbenForm, z } from '#/adapter/form';
|
import { useVbenForm, z } from '#/adapter/form';
|
||||||
@@ -79,7 +78,7 @@ function buttonLoading(loading: boolean) {
|
|||||||
|
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
function handleSubmit(values: any) {
|
function handleSubmit(values: any) {
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
content: '确认修改密码吗?',
|
content: '确认修改密码吗?',
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { ref } from 'vue';
|
|||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { getPopupContainer } from '@vben/utils';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import { commonDownloadExcel } from '#/utils/file/download';
|
import { commonDownloadExcel } from '#/utils/file/download';
|
||||||
@@ -84,7 +84,7 @@ async function handleDelete(row: Recordable<any>) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: any) => row.id);
|
const ids = rows.map((row: any) => row.id);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { ref } from 'vue';
|
|||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -111,7 +111,7 @@ async function handleDelete(row: LoginLog) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: LoginLog) => row.infoId);
|
const ids = rows.map((row: LoginLog) => row.infoId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import type { OperationLog } from '#/api/monitor/operlog/model';
|
|||||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
import { Page, useVbenDrawer } from '@vben/common-ui';
|
||||||
import { $t } from '@vben/locales';
|
import { $t } from '@vben/locales';
|
||||||
|
|
||||||
import { Modal, Space } from 'antdv-next';
|
import { Space } from 'antdv-next';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
addSortParams,
|
addSortParams,
|
||||||
@@ -124,7 +124,7 @@ function handleClear() {
|
|||||||
async function handleDelete() {
|
async function handleDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: OperationLog) => row.operId);
|
const ids = rows.map((row: OperationLog) => row.operId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条操作日志吗?`,
|
content: `确认删除选中的${ids.length}条操作日志吗?`,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { useAccess } from '@vben/access';
|
|||||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
import { Page, useVbenDrawer } from '@vben/common-ui';
|
||||||
import { DEFAULT_CLIENT_ID, EnableStatus } from '@vben/constants';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -93,7 +93,7 @@ async function handleDelete(row: Client) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: Client) => row.id);
|
const ids = rows.map((row: Client) => row.id);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type { SysConfig } from '#/api/system/config/model';
|
|||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -93,7 +93,7 @@ async function handleDelete(row: SysConfig) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: SysConfig) => row.configId);
|
const ids = rows.map((row: SysConfig) => row.configId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { ref } from 'vue';
|
|||||||
|
|
||||||
import { useVbenDrawer } from '@vben/common-ui';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -101,7 +101,7 @@ async function handleDelete(row: DictData) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: DictData) => row.dictCode);
|
const ids = rows.map((row: DictData) => row.dictCode);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -15,14 +15,7 @@ import {
|
|||||||
PlusOutlined,
|
PlusOutlined,
|
||||||
SyncOutlined,
|
SyncOutlined,
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import {
|
import { Alert, Input, Popconfirm, Space, Tooltip } from 'antdv-next';
|
||||||
Alert,
|
|
||||||
Input,
|
|
||||||
Modal,
|
|
||||||
Popconfirm,
|
|
||||||
Space,
|
|
||||||
Tooltip,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -121,7 +114,7 @@ function handleDownloadExcel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleRefreshCache() {
|
function handleRefreshCache() {
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确认刷新字典类型缓存吗?',
|
content: '确认刷新字典类型缓存吗?',
|
||||||
okButtonProps: {
|
okButtonProps: {
|
||||||
@@ -171,7 +164,7 @@ watch(searchValue, (value) => {
|
|||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
cn(
|
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',
|
'rounded-lg',
|
||||||
'dict-type-card',
|
'dict-type-card',
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { ref } from 'vue';
|
|||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -105,7 +105,7 @@ async function handleDelete(row: DictType) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: DictType) => row.dictId);
|
const ids = rows.map((row: DictType) => row.dictId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type { Notice } from '#/api/system/notice/model';
|
|||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import { noticeList, noticeRemove } from '#/api/system/notice';
|
import { noticeList, noticeRemove } from '#/api/system/notice';
|
||||||
@@ -82,7 +82,7 @@ async function handleDelete(row: Notice) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: Notice) => row.noticeId);
|
const ids = rows.map((row: Notice) => row.noticeId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { useAccess } from '@vben/access';
|
|||||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
import { Page, useVbenDrawer } from '@vben/common-ui';
|
||||||
import { EnableStatus } from '@vben/constants';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -89,7 +89,7 @@ async function handleDelete(row: OssConfig) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: OssConfig) => row.ossConfigId);
|
const ids = rows.map((row: OssConfig) => row.ossConfigId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -14,15 +14,7 @@ import { $t } from '@vben/locales';
|
|||||||
import { stringify } from '@vben/request';
|
import { stringify } from '@vben/request';
|
||||||
import { useAccessStore } from '@vben/stores';
|
import { useAccessStore } from '@vben/stores';
|
||||||
|
|
||||||
import {
|
import { Image, Popconfirm, Space, Spin, Switch, Tooltip } from 'antdv-next';
|
||||||
Image,
|
|
||||||
Modal,
|
|
||||||
Popconfirm,
|
|
||||||
Space,
|
|
||||||
Spin,
|
|
||||||
Switch,
|
|
||||||
Tooltip,
|
|
||||||
} from 'antdv-next';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
addSortParams,
|
addSortParams,
|
||||||
@@ -166,7 +158,7 @@ async function handleDelete(row: OssFile) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: OssFile) => row.ossId);
|
const ids = rows.map((row: OssFile) => row.ossId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { ref } from 'vue';
|
|||||||
|
|
||||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -107,7 +107,7 @@ async function handleDelete(row: Post) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: Post) => row.postId);
|
const ids = rows.map((row: Post) => row.postId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { useRoute } from 'vue-router';
|
|||||||
|
|
||||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -93,7 +93,7 @@ async function handleAuthCancel(record: User) {
|
|||||||
function handleMultipleAuthCancel() {
|
function handleMultipleAuthCancel() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: User) => row.userId);
|
const ids = rows.map((row: User) => row.userId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认取消选中的${ids.length}条授权记录吗?`,
|
content: `确认取消选中的${ids.length}条授权记录吗?`,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
SUPERADMIN_ROLE_KEY,
|
SUPERADMIN_ROLE_KEY,
|
||||||
} from '@vben/constants';
|
} from '@vben/constants';
|
||||||
|
|
||||||
import { Modal, Popconfirm, Space } from 'antdv-next';
|
import { Popconfirm, Space } from 'antdv-next';
|
||||||
|
|
||||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -108,7 +108,7 @@ async function handleDelete(row: Role) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: Role) => row.roleId);
|
const ids = rows.map((row: Role) => row.roleId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { computed } from 'vue';
|
|||||||
import { useAccess } from '@vben/access';
|
import { useAccess } from '@vben/access';
|
||||||
import { Fallback, Page, useVbenDrawer } from '@vben/common-ui';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -106,7 +106,7 @@ async function handleDelete(row: Tenant) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: Tenant) => row.id);
|
const ids = rows.map((row: Tenant) => row.id);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { computed } from 'vue';
|
|||||||
import { useAccess } from '@vben/access';
|
import { useAccess } from '@vben/access';
|
||||||
import { Fallback, Page, useVbenDrawer } from '@vben/common-ui';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -92,7 +92,7 @@ async function handleDelete(row: TenantPackage) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: TenantPackage) => row.packageId);
|
const ids = rows.map((row: TenantPackage) => row.packageId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { EnableStatus, SUPERADMIN_USER_ID } from '@vben/constants';
|
|||||||
import { $t } from '@vben/locales';
|
import { $t } from '@vben/locales';
|
||||||
import { preferences } from '@vben/preferences';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -145,7 +145,7 @@ async function handleDelete(row: User) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: User) => row.userId);
|
const ids = rows.map((row: User) => row.userId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { h, ref, unref } from 'vue';
|
|||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { ExcelIcon, InBoxIcon } from '@vben/icons';
|
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 { downloadImportTemplate, userImportData } from '#/api/system/user';
|
||||||
import { commonDownloadExcel } from '#/utils/file/download';
|
import { commonDownloadExcel } from '#/utils/file/download';
|
||||||
@@ -35,11 +35,11 @@ async function handleSubmit() {
|
|||||||
updateSupport: unref(checked),
|
updateSupport: unref(checked),
|
||||||
};
|
};
|
||||||
const { code, msg } = await userImportData(data);
|
const { code, msg } = await userImportData(data);
|
||||||
let modal = Modal.success;
|
let modal = window.modal.success;
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
emit('reload');
|
emit('reload');
|
||||||
} else {
|
} else {
|
||||||
modal = Modal.error;
|
modal = window.modal.error;
|
||||||
}
|
}
|
||||||
handleCancel();
|
handleCancel();
|
||||||
modal({
|
modal({
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { useRouter } from 'vue-router';
|
|||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
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 dayjs from 'dayjs';
|
||||||
|
|
||||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
@@ -170,7 +170,7 @@ async function handleDelete(record: Recordable<any>) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: any) => row.tableId);
|
const ids = rows.map((row: any) => row.tableId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import {
|
|||||||
UsergroupDeleteOutlined,
|
UsergroupDeleteOutlined,
|
||||||
UserOutlined,
|
UserOutlined,
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import { Dropdown, Menu, MenuItem, Modal, Space } from 'antdv-next';
|
import { Dropdown, Menu, MenuItem, Space } from 'antdv-next';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
cancelProcessApply,
|
cancelProcessApply,
|
||||||
@@ -68,7 +68,7 @@ const showButtonOther = computed(() => {
|
|||||||
// 进行中 可以撤销
|
// 进行中 可以撤销
|
||||||
const revocable = computed(() => props.task?.flowStatus === 'waiting');
|
const revocable = computed(() => props.task?.flowStatus === 'waiting');
|
||||||
async function handleCancel() {
|
async function handleCancel() {
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确定要撤销该申请吗?',
|
content: '确定要撤销该申请吗?',
|
||||||
centered: true,
|
centered: true,
|
||||||
@@ -102,7 +102,7 @@ function handleEdit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleRemove() {
|
function handleRemove() {
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确定删除该申请吗?',
|
content: '确定删除该申请吗?',
|
||||||
centered: true,
|
centered: true,
|
||||||
@@ -213,7 +213,7 @@ const [AddSignatureModal, addSignatureModalApi] = useVbenModal({
|
|||||||
function handleAddSignature(userList: User[]) {
|
function handleAddSignature(userList: User[]) {
|
||||||
if (userList.length === 0) return;
|
if (userList.length === 0) return;
|
||||||
const userIds = userList.map((user) => user.userId);
|
const userIds = userList.map((user) => user.userId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确认加签吗?',
|
content: '确认加签吗?',
|
||||||
centered: true,
|
centered: true,
|
||||||
@@ -230,7 +230,7 @@ const [ReductionSignatureModal, reductionSignatureModalApi] = useVbenModal({
|
|||||||
function handleReductionSignature(userList: User[]) {
|
function handleReductionSignature(userList: User[]) {
|
||||||
if (userList.length === 0) return;
|
if (userList.length === 0) return;
|
||||||
const userIds = userList.map((user) => user.userId);
|
const userIds = userList.map((user) => user.userId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确认减签吗?',
|
content: '确认减签吗?',
|
||||||
centered: true,
|
centered: true,
|
||||||
@@ -261,7 +261,7 @@ function handleUpdateAssignee(userList: User[]) {
|
|||||||
if (userList.length === 0) return;
|
if (userList.length === 0) return;
|
||||||
const current = userList[0];
|
const current = userList[0];
|
||||||
if (!current) return;
|
if (!current) return;
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '修改办理人',
|
title: '修改办理人',
|
||||||
content: `确定修改办理人为${current?.nickName}吗?`,
|
content: `确定修改办理人为${current?.nickName}吗?`,
|
||||||
centered: true,
|
centered: true,
|
||||||
@@ -292,7 +292,7 @@ const showMultiActions = computed(() => {
|
|||||||
cn(
|
cn(
|
||||||
'absolute bottom-0 left-0',
|
'absolute bottom-0 left-0',
|
||||||
'border-t-solid border-t-[1px]',
|
'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 { useVbenModal } from '@vben/common-ui';
|
||||||
|
|
||||||
import { Descriptions, Modal } from 'antdv-next';
|
import { Descriptions } from 'antdv-next';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getTaskByTaskId,
|
getTaskByTaskId,
|
||||||
@@ -57,7 +57,7 @@ const [TransferModal, transferModalApi] = useVbenModal({
|
|||||||
function handleTransfer(userList: User[]) {
|
function handleTransfer(userList: User[]) {
|
||||||
if (userList.length === 0 || !taskInfo.value) return;
|
if (userList.length === 0 || !taskInfo.value) return;
|
||||||
const current = userList[0];
|
const current = userList[0];
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '转办',
|
title: '转办',
|
||||||
content: `确定转办给${current?.nickName}吗?`,
|
content: `确定转办给${current?.nickName}吗?`,
|
||||||
centered: true,
|
centered: true,
|
||||||
@@ -78,7 +78,7 @@ function handleTermination() {
|
|||||||
if (!taskInfo.value) {
|
if (!taskInfo.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '审批终止',
|
title: '审批终止',
|
||||||
content: '确定终止当前审批流程吗?',
|
content: '确定终止当前审批流程吗?',
|
||||||
centered: true,
|
centered: true,
|
||||||
@@ -96,7 +96,7 @@ const [AddSignatureModal, addSignatureModalApi] = useVbenModal({
|
|||||||
function handleAddSignature(userList: User[]) {
|
function handleAddSignature(userList: User[]) {
|
||||||
if (userList.length === 0 || !taskInfo.value) return;
|
if (userList.length === 0 || !taskInfo.value) return;
|
||||||
const userIds = userList.map((user) => user.userId);
|
const userIds = userList.map((user) => user.userId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确认加签吗?',
|
content: '确认加签吗?',
|
||||||
centered: true,
|
centered: true,
|
||||||
@@ -116,7 +116,7 @@ const [ReductionSignatureModal, reductionSignatureModalApi] = useVbenModal({
|
|||||||
function handleReductionSignature(userList: User[]) {
|
function handleReductionSignature(userList: User[]) {
|
||||||
if (userList.length === 0 || !taskInfo.value) return;
|
if (userList.length === 0 || !taskInfo.value) return;
|
||||||
const userIds = userList.map((user) => user.userId);
|
const userIds = userList.map((user) => user.userId);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确认减签吗?',
|
content: '确认减签吗?',
|
||||||
centered: true,
|
centered: true,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { defineComponent, h, ref } from 'vue';
|
import { defineComponent, h, ref } from 'vue';
|
||||||
|
|
||||||
import { Modal } from 'antdv-next';
|
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import duration from 'dayjs/plugin/duration';
|
import duration from 'dayjs/plugin/duration';
|
||||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||||
@@ -20,7 +19,7 @@ export interface ApproveWithReasonModalProps {
|
|||||||
export function approveWithReasonModal(props: ApproveWithReasonModalProps) {
|
export function approveWithReasonModal(props: ApproveWithReasonModalProps) {
|
||||||
const { onOk, title, description } = props;
|
const { onOk, title, description } = props;
|
||||||
const content = ref('');
|
const content = ref('');
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title,
|
title,
|
||||||
content: h(
|
content: h(
|
||||||
defineComponent({
|
defineComponent({
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type { VxeGridProps } from '#/adapter/vxe-table';
|
|||||||
|
|
||||||
import { Page, useVbenDrawer, useVbenModal } from '@vben/common-ui';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import { cancelProcessApply } from '#/api/workflow/instance';
|
import { cancelProcessApply } from '#/api/workflow/instance';
|
||||||
@@ -124,7 +124,7 @@ async function handleRevoke(row: Required<LeaveForm>) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: Required<LeaveForm>) => row.id);
|
const ids = rows.map((row: Required<LeaveForm>) => row.id);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { useRouter } from 'vue-router';
|
|||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { $t } from '@vben/locales';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -127,7 +127,7 @@ async function handleDelete(row: Recordable<any>) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: any) => row.id);
|
const ids = rows.map((row: any) => row.id);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { ref } from 'vue';
|
|||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { $t } from '@vben/locales';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
@@ -135,7 +135,7 @@ async function handleDelete(row: Recordable<any>) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: any) => row.id);
|
const ids = rows.map((row: any) => row.id);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { ref } from 'vue';
|
|||||||
import { JsonPreview, useVbenModal } from '@vben/common-ui';
|
import { JsonPreview, useVbenModal } from '@vben/common-ui';
|
||||||
import { cn, getPopupContainer } from '@vben/utils';
|
import { cn, getPopupContainer } from '@vben/utils';
|
||||||
|
|
||||||
import { Modal, Tag } from 'antdv-next';
|
import { Tag } from 'antdv-next';
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
import { instanceVariable, updateFlowVariable } from '#/api/workflow/instance';
|
import { instanceVariable, updateFlowVariable } from '#/api/workflow/instance';
|
||||||
@@ -141,7 +141,7 @@ const [Form, formApi] = useVbenForm({
|
|||||||
},
|
},
|
||||||
handleSubmit: async (values) => {
|
handleSubmit: async (values) => {
|
||||||
console.log(values);
|
console.log(values);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '修改流程变量',
|
title: '修改流程变量',
|
||||||
content: '确认修改流程变量吗?',
|
content: '确认修改流程变量吗?',
|
||||||
centered: true,
|
centered: true,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type { Spel } from '#/api/workflow/spel/model';
|
|||||||
|
|
||||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
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 { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import { spelDelete, spelList } from '#/api/workflow/spel';
|
import { spelDelete, spelList } from '#/api/workflow/spel';
|
||||||
@@ -80,7 +80,7 @@ async function handleDelete(row: Spel) {
|
|||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
const rows = tableApi.grid.getCheckboxRecords();
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
const ids = rows.map((row: Spel) => row.id);
|
const ids = rows.map((row: Spel) => row.id);
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { h, ref } from 'vue';
|
|||||||
import { CodeMirror, Page, useVbenModal } from '@vben/common-ui';
|
import { CodeMirror, Page, useVbenModal } from '@vben/common-ui';
|
||||||
|
|
||||||
import { useClipboard } from '@vueuse/core';
|
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';
|
import { FileUpload, ImageUpload } from '#/components/upload';
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ const multipleImageId = ref<string[]>(['1905537674682916865']);
|
|||||||
const multipleFileId = ref<string[]>(['1905191167882518529']);
|
const multipleFileId = ref<string[]>(['1905191167882518529']);
|
||||||
|
|
||||||
function handlePreview(file: UploadFile) {
|
function handlePreview(file: UploadFile) {
|
||||||
Modal.info({
|
window.modal.info({
|
||||||
content: h('div', { class: 'break-all' }, JSON.stringify(file, null, 2)),
|
content: h('div', { class: 'break-all' }, JSON.stringify(file, null, 2)),
|
||||||
maskClosable: true,
|
maskClosable: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { h } from 'vue';
|
|||||||
|
|
||||||
import { JsonPreview, useVbenModal } from '@vben/common-ui';
|
import { JsonPreview, useVbenModal } from '@vben/common-ui';
|
||||||
|
|
||||||
import { Modal, Space } from 'antdv-next';
|
import { Space } from 'antdv-next';
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ async function getValues() {
|
|||||||
const v = await formApi.getValues();
|
const v = await formApi.getValues();
|
||||||
console.log(v);
|
console.log(v);
|
||||||
|
|
||||||
Modal.info({
|
window.modal.info({
|
||||||
content: () => h(JsonPreview, { data: v }),
|
content: () => h(JsonPreview, { data: v }),
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { nextTick, onMounted } from 'vue';
|
|||||||
|
|
||||||
import { JsonPreview } from '@vben/common-ui';
|
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';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
|
|
||||||
@@ -248,7 +248,7 @@ function getData() {
|
|||||||
const data = tableApi.grid.getTableData();
|
const data = tableApi.grid.getTableData();
|
||||||
const { fullData } = data;
|
const { fullData } = data;
|
||||||
console.log(fullData);
|
console.log(fullData);
|
||||||
Modal.info({
|
window.modal.info({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: (
|
content: (
|
||||||
<div class="max-h-[350px] overflow-y-auto">
|
<div class="max-h-[350px] overflow-y-auto">
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import type { SystemRoleApi } from '#/api';
|
|||||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
import { Page, useVbenDrawer } from '@vben/common-ui';
|
||||||
import { Plus } from '@vben/icons';
|
import { Plus } from '@vben/icons';
|
||||||
|
|
||||||
import { Button, message, Modal } from 'antdv-next';
|
import { Button, message } from 'antdv-next';
|
||||||
|
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { deleteRole, getRoleList, updateRole } from '#/api';
|
import { deleteRole, getRoleList, updateRole } from '#/api';
|
||||||
@@ -79,7 +79,7 @@ function onActionClick(e: OnActionClickParams<SystemRoleApi.SystemRole>) {
|
|||||||
*/
|
*/
|
||||||
function confirm(content: string, title: string) {
|
function confirm(content: string, title: string) {
|
||||||
return new Promise((reslove, reject) => {
|
return new Promise((reslove, reject) => {
|
||||||
Modal.confirm({
|
window.modal.confirm({
|
||||||
content,
|
content,
|
||||||
onCancel() {
|
onCancel() {
|
||||||
reject(new Error('已取消'));
|
reject(new Error('已取消'));
|
||||||
|
|||||||
Reference in New Issue
Block a user