mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-04-10 18:03:15 +08:00
fix(tenant): 修复租户管理中日期类型转换问题
将DatePicker绑定值从string改为Dayjs类型,并在提交时转换为string格式 使用window.modal代替Modal直接调用,移除冗余的iconType配置
This commit is contained in:
@@ -134,9 +134,8 @@ const isSuperAdmin = computed(() => {
|
||||
});
|
||||
|
||||
function handleSyncTenantDict() {
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
iconType: 'warning',
|
||||
content: '确认同步租户字典?',
|
||||
onOk: async () => {
|
||||
await dictSyncTenant();
|
||||
@@ -146,9 +145,8 @@ function handleSyncTenantDict() {
|
||||
}
|
||||
|
||||
function handleSyncTenantConfig() {
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: '提示',
|
||||
iconType: 'warning',
|
||||
content: '确认同步租户参数配置?',
|
||||
onOk: async () => {
|
||||
await syncTenantConfig();
|
||||
|
||||
@@ -7,6 +7,7 @@ import { $t } from '@vben/locales';
|
||||
import { cloneDeep } from '@vben/utils';
|
||||
|
||||
import { Button, Skeleton } from 'antdv-next';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { tenantAdd, tenantInfo, tenantUpdate } from '#/api/system/tenant';
|
||||
@@ -136,6 +137,10 @@ async function handleConfirm() {
|
||||
return;
|
||||
}
|
||||
const data = cloneDeep(await formApi.getValues());
|
||||
// dayjs转string
|
||||
if (data.expireTime) {
|
||||
data.expireTime = dayjs(data.expireTime).format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
await (isUpdate.value ? tenantUpdate(data) : tenantAdd(data));
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
|
||||
Reference in New Issue
Block a user