mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-23 23:39:47 +08:00
Merge branch 'dev' of https://gitee.com/xlsea/ruoyi-plus-soybean into flow
This commit is contained in:
@ -45,7 +45,7 @@ const tenantId = ref<CommonType.IdType>(authStore.userInfo?.user?.tenantId || '0
|
||||
</div>
|
||||
<div class="h-full flex-y-center justify-end">
|
||||
<TenantSelect v-if="!appStore.isMobile" v-model:value="tenantId" class="mr-12px w-150px" />
|
||||
<GlobalSearch v-if="themeStore.header.globalSearch.visible" />
|
||||
<GlobalSearch v-if="themeStore.header.globalSearch.visible && !appStore.isMobile" />
|
||||
<MessageButton />
|
||||
<FullScreen v-if="!appStore.isMobile" :full="isFullscreen" @click="toggle" />
|
||||
<LangSwitch
|
||||
@ -59,7 +59,7 @@ const tenantId = ref<CommonType.IdType>(authStore.userInfo?.user?.tenantId || '0
|
||||
:is-dark="themeStore.darkMode"
|
||||
@switch="themeStore.toggleThemeScheme"
|
||||
/>
|
||||
<ThemeButton />
|
||||
<ThemeButton v-if="!appStore.isMobile" />
|
||||
<UserAvatar />
|
||||
</div>
|
||||
</DarkModeContainer>
|
||||
|
@ -16,7 +16,7 @@ export function fetchCreateTenant(data: Api.System.TenantOperateParams) {
|
||||
method: 'post',
|
||||
headers: {
|
||||
isEncrypt: true,
|
||||
repeatSubmit: true
|
||||
repeatSubmit: false
|
||||
},
|
||||
data
|
||||
});
|
||||
|
@ -81,7 +81,8 @@ export function fetchResetUserPassword(userId: CommonType.IdType, password: stri
|
||||
url: '/system/user/resetPwd',
|
||||
method: 'put',
|
||||
headers: {
|
||||
isEncrypt: true
|
||||
isEncrypt: true,
|
||||
repeatSubmit: false
|
||||
},
|
||||
data: { userId, password }
|
||||
});
|
||||
@ -118,6 +119,9 @@ export function fetchUpdateUserPassword(data: Api.System.UserPasswordOperatePara
|
||||
return request<boolean>({
|
||||
url: '/system/user/profile/updatePwd',
|
||||
method: 'put',
|
||||
headers: {
|
||||
isEncrypt: true
|
||||
},
|
||||
data
|
||||
});
|
||||
}
|
||||
|
@ -252,6 +252,9 @@ export function getNaiveTheme(colors: App.Theme.ThemeColor, recommended = false)
|
||||
},
|
||||
Tag: {
|
||||
borderRadius: '6px'
|
||||
},
|
||||
Button: {
|
||||
textColorPrimary: '#ffffff'
|
||||
}
|
||||
};
|
||||
|
||||
|
7
src/typings/api/system.api.d.ts
vendored
7
src/typings/api/system.api.d.ts
vendored
@ -152,9 +152,10 @@ declare namespace Api {
|
||||
type UserProfileOperateParams = CommonType.RecordNullable<Pick<User, 'nickName' | 'email' | 'phonenumber' | 'sex'>>;
|
||||
|
||||
/** user password operate params */
|
||||
type UserPasswordOperateParams = CommonType.RecordNullable<
|
||||
Pick<User, 'userId' | 'password'> & { newPassword: string }
|
||||
>;
|
||||
type UserPasswordOperateParams = CommonType.RecordNullable<{
|
||||
oldPassword: string;
|
||||
newPassword: string;
|
||||
}>;
|
||||
|
||||
/** user info */
|
||||
type UserInfo = {
|
||||
|
@ -39,8 +39,8 @@ const activeModule = computed(() => moduleMap[props.module || 'pwd-login']);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="relative size-full flex flex-wrap overflow-hidden">
|
||||
<div class="hidden h-full w-50% bg-primary-100 lg:block dark:bg-primary-800">
|
||||
<div class="relative min-h-screen w-full flex flex-wrap">
|
||||
<div class="hidden h-screen w-50% bg-primary-100 lg:block dark:bg-primary-800">
|
||||
<div class="size-full flex-center">
|
||||
<img class="w-60% sm:w-80%" :src="loginBackground" />
|
||||
</div>
|
||||
@ -49,8 +49,8 @@ const activeModule = computed(() => moduleMap[props.module || 'pwd-login']);
|
||||
<div class="mx-auto max-w-464px w-full">
|
||||
<header class="flex-y-center justify-between">
|
||||
<div class="flex-y-center gap-16px">
|
||||
<SystemLogo class="text-42px text-primary" />
|
||||
<h3 class="text-32px text-primary font-500">{{ $t('system.title') }}</h3>
|
||||
<SystemLogo class="text-30px text-primary sm:text-42px" />
|
||||
<h3 class="text-24px text-primary font-500 sm:text-32px">{{ $t('system.title') }}</h3>
|
||||
</div>
|
||||
<div class="flex-y-center">
|
||||
<ThemeSchemaSwitch
|
||||
@ -64,6 +64,7 @@ const activeModule = computed(() => moduleMap[props.module || 'pwd-login']);
|
||||
:lang="appStore.locale"
|
||||
:lang-options="appStore.localeOptions"
|
||||
:show-tooltip="false"
|
||||
class="text-20px lt-sm:text-18px"
|
||||
@change-lang="appStore.changeLocale"
|
||||
/>
|
||||
</div>
|
||||
|
@ -122,7 +122,7 @@ async function handleSocialLogin(type: Api.System.SocialSource) {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div class="mb-12px text-30px text-black font-500 dark:text-white">登录到您的账户</div>
|
||||
<div class="mb-12px text-24px text-black font-500 sm:text-30px dark:text-white">登录到您的账户</div>
|
||||
<div class="pb-24px text-18px text-#858585">欢迎回来!请输入您的账户信息</div>
|
||||
<NForm
|
||||
ref="formRef"
|
||||
|
@ -104,7 +104,7 @@ handleFetchCaptchaCode();
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div class="mb-12px text-30px text-black font-500 dark:text-white">注册新账户</div>
|
||||
<div class="mb-12px text-24px text-black font-500 sm:text-30px dark:text-white">注册新账户</div>
|
||||
<div class="pb-24px text-18px text-#858585">欢迎注册!请输入您的账户信息</div>
|
||||
<NForm
|
||||
ref="formRef"
|
||||
|
@ -46,7 +46,9 @@ async function handleSubmit() {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div class="mb-12px text-30px text-black font-500 dark:text-white">{{ $t('page.login.resetPwd.title') }}</div>
|
||||
<div class="mb-12px text-24px text-black font-500 sm:text-30px dark:text-white">
|
||||
{{ $t('page.login.resetPwd.title') }}
|
||||
</div>
|
||||
<div class="pb-24px text-18px text-#858585">请输入您的手机号,我们将发送验证码到您的手机</div>
|
||||
<NForm ref="formRef" :model="model" :rules="rules" size="large" :show-label="false" @keyup.enter="handleSubmit">
|
||||
<NFormItem path="phone">
|
||||
|
@ -116,7 +116,7 @@ const primaryColor = `--primary-color: ${r} ${g} ${b}`;
|
||||
<!-- From Uiverse.io by SchawnnahJ -->
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
<h2 class="text-30px text-primary-400 font-500">{{ $t('system.title') }}</h2>
|
||||
<h2 class="text-30px text-primary-400 font-500">{{ msg }}</h2>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -46,14 +46,14 @@ function createDefaultProfileModel(): ProfileModel {
|
||||
|
||||
function createDefaultPasswordModel(): PasswordModel {
|
||||
return {
|
||||
password: '',
|
||||
oldPassword: '',
|
||||
confirmPassword: '',
|
||||
newPassword: ''
|
||||
};
|
||||
}
|
||||
|
||||
type ProfileRuleKey = Extract<keyof ProfileModel, 'nickName' | 'email' | 'phonenumber' | 'sex'>;
|
||||
type PasswordRuleKey = Extract<keyof PasswordModel, 'password' | 'confirmPassword' | 'newPassword'>;
|
||||
type PasswordRuleKey = Extract<keyof PasswordModel, 'oldPassword' | 'newPassword' | 'confirmPassword'>;
|
||||
|
||||
const profileRules: Record<ProfileRuleKey, App.Global.FormRule> = {
|
||||
nickName: createRequiredRule('昵称不能为空'),
|
||||
@ -63,7 +63,7 @@ const profileRules: Record<ProfileRuleKey, App.Global.FormRule> = {
|
||||
};
|
||||
|
||||
const passwordRules: Record<PasswordRuleKey, App.Global.FormRule> = {
|
||||
password: createRequiredRule('密码不能为空'),
|
||||
oldPassword: createRequiredRule('旧密码不能为空'),
|
||||
confirmPassword: createRequiredRule('确认密码不能为空'),
|
||||
newPassword: createRequiredRule('新密码不能为空')
|
||||
};
|
||||
@ -90,7 +90,8 @@ async function updatePassword() {
|
||||
return;
|
||||
}
|
||||
startBtnLoading();
|
||||
const { error } = await fetchUpdateUserPassword(passwordModel);
|
||||
const { oldPassword, newPassword } = passwordModel;
|
||||
const { error } = await fetchUpdateUserPassword({ oldPassword, newPassword });
|
||||
if (!error) {
|
||||
window.$message?.success('密码修改成功');
|
||||
// 清空表单
|
||||
@ -183,9 +184,9 @@ async function updatePassword() {
|
||||
label-width="100px"
|
||||
class="mt-16px max-w-520px"
|
||||
>
|
||||
<NFormItem label="旧密码" path="password">
|
||||
<NFormItem label="旧密码" path="oldPassword">
|
||||
<NInput
|
||||
v-model:value="passwordModel.password"
|
||||
v-model:value="passwordModel.oldPassword"
|
||||
type="password"
|
||||
placeholder="请输入旧密码"
|
||||
show-password-on="click"
|
||||
|
@ -344,22 +344,58 @@ const columns: NaiveUI.TableColumn<Api.Tool.GenTableColumn>[] = [
|
||||
placeholder="请选择生成模板"
|
||||
/>
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24 s:12" label="生成包路径" path="packageName">
|
||||
<NFormItemGi span="24 s:12" path="packageName">
|
||||
<template #label>
|
||||
<div class="flex-center">
|
||||
<FormTip content="生成在哪个java包下,例如 com.ruoyi.system" />
|
||||
<span class="pl-3px">生成包路径</span>
|
||||
</div>
|
||||
</template>
|
||||
<NInput v-model:value="genTableInfo.info.packageName" />
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24 s:12" label="生成模块名" path="moduleName">
|
||||
<NFormItemGi span="24 s:12" path="moduleName">
|
||||
<template #label>
|
||||
<div class="flex-center">
|
||||
<FormTip content="可理解为子系统名,例如 system" />
|
||||
<span class="pl-3px">生成模块名</span>
|
||||
</div>
|
||||
</template>
|
||||
<NInput v-model:value="genTableInfo.info.moduleName" />
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24 s:12" label="生成业务名" path="businessName">
|
||||
<template #label>
|
||||
<div class="flex-center">
|
||||
<FormTip content="可理解为功能英文名,例如 user" />
|
||||
<span class="pl-3px">生成业务名</span>
|
||||
</div>
|
||||
</template>
|
||||
<NInput v-model:value="genTableInfo.info.businessName" />
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24 s:12" label="生成功能名" path="functionName">
|
||||
<template #label>
|
||||
<div class="flex-center">
|
||||
<FormTip content="用作类描述,例如 用户" />
|
||||
<span class="pl-3px">生成功能名</span>
|
||||
</div>
|
||||
</template>
|
||||
<NInput v-model:value="genTableInfo.info.functionName" />
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24 s:12" label="上级菜单" path="parentMenuId">
|
||||
<template #label>
|
||||
<div class="flex-center">
|
||||
<FormTip content="分配到指定菜单下,例如 系统管理" />
|
||||
<span class="pl-3px">上级菜单</span>
|
||||
</div>
|
||||
</template>
|
||||
<MenuTreeSelect v-model:value="genTableInfo.info.parentMenuId" :data-name="rowData?.dataName" />
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24 s:12" label="生成代码方式" path="genType">
|
||||
<template #label>
|
||||
<div class="flex-center">
|
||||
<FormTip content="默认为zip压缩包下载,也可以自定义生成路径" />
|
||||
<span class="pl-3px">生成代码方式</span>
|
||||
</div>
|
||||
</template>
|
||||
<NRadioGroup v-model:value="genTableInfo.info.genType">
|
||||
<NSpace :span="16">
|
||||
<NRadio
|
||||
|
Reference in New Issue
Block a user