diff --git a/src/api/sys/user.ts b/src/api/sys/user.ts index 34b8208..2a3e5dc 100644 --- a/src/api/sys/user.ts +++ b/src/api/sys/user.ts @@ -162,12 +162,12 @@ export const passwordChange = (params) => defHttp.get({ url: Api.passwordChange, * @description: 第三方登录 */ export function thirdLogin(params, mode: ErrorMessageMode = 'modal') { - //==========begin 第三方登录/auth2登录需要传递租户id=========== + //==========begin 第三方登录/auth2登录需要传递仓库id=========== let tenantId = "0"; if(!params.tenantId){ tenantId = params.tenantId; } - //==========end 第三方登录/auth2登录需要传递租户id=========== + //==========end 第三方登录/auth2登录需要传递仓库id=========== return defHttp.get( { url: `${Api.thirdLogin}/${params.token}/${params.thirdType}/${tenantId}`, diff --git a/src/components/Form/src/jeecg/components/JInput.vue b/src/components/Form/src/jeecg/components/JInput.vue index 40abae9..ba2ef41 100644 --- a/src/components/Form/src/jeecg/components/JInput.vue +++ b/src/components/Form/src/jeecg/components/JInput.vue @@ -60,6 +60,12 @@ text = text.substring(1, text.length - 1); } break; + case JInputTypeEnum.JINPUT_LEFT_LIKE: + text = text.substring(0, text.length - 1); + break; + case JInputTypeEnum.JINPUT_RIGHT_LIKE: + text = text.substring(0, text.length - 1); + break; case JInputTypeEnum.JINPUT_QUERY_NE: text = text.substring(1); break; @@ -87,6 +93,12 @@ case JInputTypeEnum.JINPUT_QUERY_LIKE: text = '*' + text + '*'; break; + case JInputTypeEnum.JINPUT_LEFT_LIKE: + text = '*' + text; + break; + case JInputTypeEnum.JINPUT_RIGHT_LIKE: + text = text + '*'; + break; case JInputTypeEnum.JINPUT_QUERY_NE: text = '!' + text; break; diff --git a/src/components/Form/src/jeecg/components/JRangeDate.vue b/src/components/Form/src/jeecg/components/JRangeDate.vue index 8aa9953..67a129d 100644 --- a/src/components/Form/src/jeecg/components/JRangeDate.vue +++ b/src/components/Form/src/jeecg/components/JRangeDate.vue @@ -1,65 +1,68 @@ - + diff --git a/src/enums/cacheEnum.ts b/src/enums/cacheEnum.ts index 5baa68e..dd55026 100644 --- a/src/enums/cacheEnum.ts +++ b/src/enums/cacheEnum.ts @@ -27,7 +27,7 @@ export const APP_LOCAL_CACHE_KEY = 'COMMON__LOCAL__KEY__'; // base global session key export const APP_SESSION_CACHE_KEY = 'COMMON__SESSION__KEY__'; -// 租户 key +// 仓库 key export const TENANT_ID = 'TENANT_ID'; // login info key export const LOGIN_INFO_KEY = 'LOGIN__INFO__'; @@ -35,7 +35,7 @@ export const LOGIN_INFO_KEY = 'LOGIN__INFO__'; // 聊天UID key export const CPTE_CHAT_UID = 'CPTE_CHAT_UID'; -// 免登录租户id,与系统分开,避免重复 +// 免登录仓库id,与系统分开,避免重复 export const OAUTH2_THIRD_LOGIN_TENANT_ID = 'THIRD_LOGIN_TENANT_ID'; // ai助手标识(退出需要记录一下) diff --git a/src/enums/cpteEnum.ts b/src/enums/cpteEnum.ts index 600e01f..304f6b7 100644 --- a/src/enums/cpteEnum.ts +++ b/src/enums/cpteEnum.ts @@ -4,6 +4,12 @@ export enum JInputTypeEnum { //模糊 JINPUT_QUERY_LIKE = 'like', + + //左模糊 + JINPUT_LEFT_LIKE = 'left_like', + + JINPUT_RIGHT_LIKE = 'right_like', + //非 JINPUT_QUERY_NE = 'ne', //大于等于 diff --git a/src/enums/httpEnum.ts b/src/enums/httpEnum.ts index 7ce5819..c95503e 100644 --- a/src/enums/httpEnum.ts +++ b/src/enums/httpEnum.ts @@ -41,7 +41,7 @@ export enum ConfigEnum { TIMESTAMP = 'X-TIMESTAMP', // Sign Sign = 'X-Sign', - // 租户id + // 仓库id TENANT_ID = 'X-Tenant-Id', // 版本 VERSION = 'X-Version', diff --git a/src/layouts/default/header/components/user-dropdown/DepartSelect.vue b/src/layouts/default/header/components/user-dropdown/DepartSelect.vue index d26e0d4..391994c 100644 --- a/src/layouts/default/header/components/user-dropdown/DepartSelect.vue +++ b/src/layouts/default/header/components/user-dropdown/DepartSelect.vue @@ -6,9 +6,9 @@ @@ -100,14 +100,14 @@ async function show() { //加载部门 await loadDepartList(); - //加载租户 + //加载仓库 await loadTenantList(); //标题配置 if (unref(isMultiTenant) && unref(isMultiDepart)) { - currTitle.value = '切换租户和部门'; + currTitle.value = '切换仓库和部门'; } else if (unref(isMultiTenant)) { currTitle.value = - unref(currentTenantName) && unref(currentTenantName).length > 0 ? `租户切换(当前租户 :${unref(currentTenantName)})` : props.title; + unref(currentTenantName) && unref(currentTenantName).length > 0 ? `仓库切换(当前仓库 :${unref(currentTenantName)})` : props.title; } else if (unref(isMultiDepart)) { currTitle.value = unref(currentDepartName) && unref(currentDepartName).length > 0 ? `部门切换(当前部门 :${unref(currentDepartName)})` : props.title; @@ -132,7 +132,7 @@ isMultiDepart.value = true; } /** - *加载租户信息 + *加载仓库信息 */ async function loadTenantList() { const result = await getUserTenants(); @@ -165,8 +165,8 @@ userStore.setTenant(unref(tenantSelected)); } createMessage.success('切换成功'); - - //切换租户后要刷新首页 + + //切换仓库后要刷新首页 window.location.reload(); }) .catch((e) => { diff --git a/src/layouts/default/header/index.vue b/src/layouts/default/header/index.vue index 15fe17d..e9f3699 100644 --- a/src/layouts/default/header/index.vue +++ b/src/layouts/default/header/index.vue @@ -166,18 +166,18 @@ }); /** - * 首页多租户部门弹窗逻辑 + * 首页多仓库部门弹窗逻辑 */ const loginSelectRef = ref(); function showLoginSelect() { - //update-begin---author:liusq Date:20220101 for:判断登录进来是否需要弹窗选择租户---- + //update-begin---author:liusq Date:20220101 for:判断登录进来是否需要弹窗选择仓库---- //判断是否是登陆进来 const loginInfo = toRaw(userStore.getLoginInfo) || {}; if (!!loginInfo.isLogin) { loginSelectRef.value.show(loginInfo); } - //update-end---author:liusq Date:20220101 for:判断登录进来是否需要弹窗选择租户---- + //update-end---author:liusq Date:20220101 for:判断登录进来是否需要弹窗选择仓库---- } function loginSelectOk() { @@ -226,7 +226,7 @@ //update-begin---author:scott ---date:2022-09-30 for:默认隐藏顶部菜单面包屑----------- //顶部欢迎语展示样式 @prefix-cls: ~'@{namespace}-layout-header'; - + .ant-layout .@{prefix-cls} { display: flex; padding: 0 8px; @@ -234,14 +234,14 @@ height: @header-height; // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】顶栏高度 align-items: center; - + .headerIntroductionClass { margin-right: 4px; margin-bottom: 2px; border-bottom: 0px; border-left: 0px; } - + &--light { .headerIntroductionClass { color: #000; diff --git a/src/locales/lang/zh-CN/layout.ts b/src/locales/lang/zh-CN/layout.ts index 19310a6..e76a7bf 100644 --- a/src/locales/lang/zh-CN/layout.ts +++ b/src/locales/lang/zh-CN/layout.ts @@ -5,7 +5,7 @@ export default { dropdownItemDoc: '官网', dropdownItemLoginOut: '退出系统', dropdownItemSwitchPassword: '密码修改', - dropdownItemSwitchDepart: '切换部门', + dropdownItemSwitchDepart: '切换仓库', dropdownItemRefreshCache: '刷新缓存', dropdownItemSwitchAccount: '账户设置', dropdownItemSwitchDefaultHomePage: '切换首页', diff --git a/src/router/guard/permissionGuard.ts b/src/router/guard/permissionGuard.ts index 89a297f..218133a 100644 --- a/src/router/guard/permissionGuard.ts +++ b/src/router/guard/permissionGuard.ts @@ -75,12 +75,12 @@ export function createPermissionGuard(router: Router) { } else if (to.path === LOGIN_PATH && isOAuth2AppEnv() && !token) { //退出登录进入此逻辑 //如果进入的页面是login页面并且当前是OAuth2app环境,并且token为空,就进入OAuth2登录页面 - //update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ + //update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------ if(to.query.tenantId){ setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID,to.query.tenantId) } next({ path: OAUTH2_LOGIN_PAGE_PATH }); - //update-end---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ + //update-end---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------ return; //update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------ } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 24fbd0e..7b0f918 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -50,10 +50,10 @@ export const useUserStore = defineStore({ sessionTimeout: false, // Last fetch time lastUpdateTime: 0, - //租户id + //仓库id tenantid: '', - // 分享租户ID - // 用于分享页面所属租户与当前用户登录租户不一致的情况 + // 分享仓库ID + // 用于分享页面所属仓库与当前用户登录仓库不一致的情况 shareTenantId: null, //登录返回信息 loginInfo: null, @@ -86,7 +86,7 @@ export const useUserStore = defineStore({ getTenant(): string | number { return this.tenantid || getAuthCache(TENANT_ID); }, - // 是否有分享租户id + // 是否有分享仓库id hasShareTenantId(): boolean { return this.shareTenantId != null && this.shareTenantId !== ''; }, @@ -242,10 +242,10 @@ export const useUserStore = defineStore({ try { const { goHome = true, mode, ...loginParams } = params; const data = await phoneLoginApi(loginParams, mode); - //update-begin---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录,在请求头中无法获取租户id--- + //update-begin---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录,在请求头中无法获取仓库id--- const { token , userInfo } = data; this.setTenant(userInfo!.loginTenantId); - //update-end---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录,在请求头中无法获取租户id--- + //update-end---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录,在请求头中无法获取仓库id--- // save token this.setToken(token); return this.afterLoginAction(goHome, data); @@ -321,7 +321,7 @@ export const useUserStore = defineStore({ if (openSso == 'true') { await useSso().ssoLoginOut(); } - //update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ + //update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------ //退出登录的时候需要用的应用id if(isOAuth2AppEnv()){ let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID); @@ -339,7 +339,7 @@ export const useUserStore = defineStore({ // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 } - //update-end---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ + //update-end---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------ }, /** * 登录事件 @@ -353,10 +353,10 @@ export const useUserStore = defineStore({ try { const { goHome = true, mode, ...ThirdLoginParams } = params; const data = await thirdLogin(ThirdLoginParams, mode); - //update-begin---author:wangshuai---date:2024-07-01---for:【issues/6652】开启租户数据隔离,接入钉钉后登录默认租户为0了--- + //update-begin---author:wangshuai---date:2024-07-01---for:【issues/6652】开启仓库数据隔离,接入钉钉后登录默认仓库为0了--- const { token, userInfo } = data; this.setTenant(userInfo?.loginTenantId); - //update-end---author:wangshuai---date:2024-07-01---for:【issues/6652】开启租户数据隔离,接入钉钉后登录默认租户为0了--- + //update-end---author:wangshuai---date:2024-07-01---for:【issues/6652】开启仓库数据隔离,接入钉钉后登录默认仓库为0了--- // save token this.setToken(token); return this.afterLoginAction(goHome, data); diff --git a/src/utils/auth/index.ts b/src/utils/auth/index.ts index 95d79b7..49b9b75 100644 --- a/src/utils/auth/index.ts +++ b/src/utils/auth/index.ts @@ -19,7 +19,7 @@ export function getLoginBackInfo() { return getAuthCache(LOGIN_INFO_KEY); } /** - * 获取租户id + * 获取仓库id */ export function getTenantId() { return getAuthCache(TENANT_ID); diff --git a/src/utils/cache/memory.ts b/src/utils/cache/memory.ts index 20622d5..ade7a82 100644 --- a/src/utils/cache/memory.ts +++ b/src/utils/cache/memory.ts @@ -101,10 +101,10 @@ export class Memory { const item = this.cache[key]; item.timeoutId && clearTimeout(item.timeoutId); }); - //update-begin---author:liusq Date:20220108 for:不删除登录用户的租户id,其他缓存信息都清除---- + //update-begin---author:liusq Date:20220108 for:不删除登录用户的仓库id,其他缓存信息都清除---- this.cache = { ...omit(this.cache, [TOKEN_KEY, USER_INFO_KEY, ROLES_KEY, DB_DICT_DATA_KEY, TENANT_ID, LOGIN_INFO_KEY, PROJ_CFG_KEY]), }; - //update-end---author:liusq Date:20220108 for:不删除登录用户的租户id,其他缓存信息都清除---- + //update-end---author:liusq Date:20220108 for:不删除登录用户的仓库id,其他缓存信息都清除---- } } diff --git a/src/utils/common/compUtils.ts b/src/utils/common/compUtils.ts index 23eac0c..f30eb28 100644 --- a/src/utils/common/compUtils.ts +++ b/src/utils/common/compUtils.ts @@ -485,22 +485,22 @@ export function replaceUserInfoByExpression(expression: string | any[]) { } /** - * 设置租户缓存,当租户退出的时候 + * 设置仓库缓存,当仓库退出的时候 * * @param tenantId */ export async function userExitChangeLoginTenantId(tenantId){ const userStore = useUserStoreWithOut(); - //step 1 获取用户租户 + //step 1 获取用户仓库 const url = '/sys/tenant/getCurrentUserTenant' let currentTenantId = null; const data = await defHttp.get({ url }); if(data && data.list){ let arr = data.list; if(arr.length>0){ - //step 2.判断当前id是否存在用户租户中 + //step 2.判断当前id是否存在用户仓库中 let filterTenantId = arr.filter((item) => item.id == tenantId); - //存在说明不是退出的不是当前租户,还用用来的租户即可 + //存在说明不是退出的不是当前仓库,还用用来的仓库即可 if(filterTenantId && filterTenantId.length>0){ currentTenantId = tenantId; }else{ @@ -512,16 +512,16 @@ export async function userExitChangeLoginTenantId(tenantId){ let loginTenantId = getTenantId(); userStore.setTenant(currentTenantId); - //update-begin---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退租户,判断退出的租户ID与当前租户ID一致,再刷新--- - //租户为空,说明没有租户了,需要刷新页面。或者当前租户和退出的租户一致则需要刷新浏览器 + //update-begin---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退仓库,判断退出的仓库ID与当前仓库ID一致,再刷新--- + //仓库为空,说明没有仓库了,需要刷新页面。或者当前仓库和退出的仓库一致则需要刷新浏览器 if(!currentTenantId || tenantId == loginTenantId){ window.location.reload(); } - //update-end---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退租户,判断退出的租户ID与当前租户ID一致,再刷新--- + //update-end---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退仓库,判断退出的仓库ID与当前仓库ID一致,再刷新--- } /** - * 我的租户模块需要开启多租户提示 + * 我的仓库模块需要开启多仓库提示 * * @param title 标题 */ @@ -530,7 +530,7 @@ export function tenantSaasMessage(title){ if(!tenantId){ Modal.confirm({ title:title, - content: '此菜单需要在多租户模式下使用,否则数据会出现混乱', + content: '此菜单需要在多仓库模式下使用,否则数据会出现混乱', okText: '确认', okType: 'danger', // @ts-ignore diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index 6f9c7b5..afc410d 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -190,17 +190,17 @@ const transform: AxiosTransform = { tenantId = 0; } - // update-begin--author:sunjianlei---date:220230428---for:【QQYUN-5279】修复分享的应用租户和当前登录租户不一致时,提示404的问题 + // update-begin--author:sunjianlei---date:220230428---for:【QQYUN-5279】修复分享的应用仓库和当前登录仓库不一致时,提示404的问题 const userStore = useUserStoreWithOut(); - // 判断是否有临时租户id + // 判断是否有临时仓库id if (userStore.hasShareTenantId && userStore.shareTenantId !== 0) { - // 临时租户id存在,使用临时租户id + // 临时仓库id存在,使用临时仓库id tenantId = userStore.shareTenantId!; } - // update-end--author:sunjianlei---date:220230428---for:【QQYUN-5279】修复分享的应用租户和当前登录租户不一致时,提示404的问题 + // update-end--author:sunjianlei---date:220230428---for:【QQYUN-5279】修复分享的应用仓库和当前登录仓库不一致时,提示404的问题 config.headers[ConfigEnum.TENANT_ID] = tenantId; - //--update-end--author:liusq---date:20211105---for:将多租户id,添加在请求接口 Header + //--update-end--author:liusq---date:20211105---for:将多仓库id,添加在请求接口 Header // ======================================================================================== // update-begin--author:sunjianlei---date:20220624--for: 添加低代码应用ID diff --git a/src/views/base/area/Area.data.ts b/src/views/base/area/Area.data.ts index da7b9a9..c7a0e3e 100644 --- a/src/views/base/area/Area.data.ts +++ b/src/views/base/area/Area.data.ts @@ -1,8 +1,4 @@ import {BasicColumn} from '/@/components/Table'; -import {FormSchema} from '/@/components/Table'; -import { rules} from '/@/utils/helper/validator'; -import { render } from '/@/utils/common/renderUtils'; -import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 export const columns: BasicColumn[] = [ { @@ -21,16 +17,11 @@ export const columns: BasicColumn[] = [ dataIndex: 'description', }, { - title: '创建日期', + title: '创建时间', align: "center", - dataIndex: 'createTime' + dataIndex: 'createTime', }, + ]; -// 高级查询数据 -export const superQuerySchema = { - areaCode: {title: '库区编码',order: 0,view: 'text', type: 'string',}, - areaName: {title: '库区名称',order: 1,view: 'text', type: 'string',}, - description: {title: '描述',order: 2,view: 'umeditor', type: 'string',}, - createTime: {title: '创建日期',order: 4,view: 'datetime', type: 'string',}, -}; + diff --git a/src/views/base/area/AreaList.vue b/src/views/base/area/AreaList.vue index fee6955..8f3d1d0 100644 --- a/src/views/base/area/AreaList.vue +++ b/src/views/base/area/AreaList.vue @@ -4,26 +4,24 @@
- - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -43,9 +41,11 @@