diff --git a/.env.local b/.env.local index 1b44b48..3406c71 100644 --- a/.env.local +++ b/.env.local @@ -5,9 +5,9 @@ VITE_DEV=true # 请求路径 # VITE_BASE_URL='http://172.16.214.222:48080' -# VITE_BASE_URL='http://192.168.1.144:48080' +VITE_BASE_URL='http://192.168.1.144:48080' # VITE_BASE_URL='http://47.79.98.113:48080' -VITE_BASE_URL='https://backstageapi.yolozs.com' +# VITE_BASE_URL='https://backstageapi.yolozs.com' # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务 VITE_UPLOAD_TYPE=server diff --git a/src/views/system/tenant/TenantForm.vue b/src/views/system/tenant/TenantForm.vue index 74b1264..e0589aa 100644 --- a/src/views/system/tenant/TenantForm.vue +++ b/src/views/system/tenant/TenantForm.vue @@ -48,31 +48,40 @@ + - + + + 开启 关闭 + + - + 开启 关闭 + + - + 开启 关闭 + + - + 开启 关闭 @@ -91,6 +100,7 @@ import { getUserByTenant, updateRoleUser } from '@/api/system/user' import { CommonStatusEnum } from '@/utils/constants' import * as TenantPackageApi from '@/api/system/tenantPackage' import * as userApi from '@/api/system/user' +import { watch } from 'vue' // ⭐ 确保引入 watch defineOptions({ name: 'SystemTenantForm' }) @@ -212,12 +222,13 @@ const resetForm = () => { status: CommonStatusEnum.ENABLE, username: undefined, password: undefined, - + remark: undefined, + aiExpireTime: undefined, // ⭐ 加上 + brotherExpireTime: undefined, // ⭐ 加上 } - userData.value = {} + userData.value = {} as userApi.UserVO formRef.value?.resetFields() } - function changeUser(val) { userList.value.forEach(item => { if (item.id === val) { @@ -228,4 +239,25 @@ function changeUser(val) { }) } + +// AI 过期时间变化:没有时间时,禁止并关闭 ai 功能 +watch( + () => formData.value.aiExpireTime, + (val) => { + if (!val && userData.value) { + userData.value.aiChat = 0 + userData.value.aiReplay = 0 + } + } +) + +// 爬大哥 过期时间变化:没有时间时,禁止并关闭 bigBrother +watch( + () => formData.value.brotherExpireTime, + (val) => { + if (!val && userData.value) { + userData.value.bigBrother = 0 + } + } +)