no message
parent
692c969065
commit
0284e53b77
|
|
@ -162,12 +162,12 @@ export const passwordChange = (params) => defHttp.get({ url: Api.passwordChange,
|
||||||
* @description: 第三方登录
|
* @description: 第三方登录
|
||||||
*/
|
*/
|
||||||
export function thirdLogin(params, mode: ErrorMessageMode = 'modal') {
|
export function thirdLogin(params, mode: ErrorMessageMode = 'modal') {
|
||||||
//==========begin 第三方登录/auth2登录需要传递租户id===========
|
//==========begin 第三方登录/auth2登录需要传递仓库id===========
|
||||||
let tenantId = "0";
|
let tenantId = "0";
|
||||||
if(!params.tenantId){
|
if(!params.tenantId){
|
||||||
tenantId = params.tenantId;
|
tenantId = params.tenantId;
|
||||||
}
|
}
|
||||||
//==========end 第三方登录/auth2登录需要传递租户id===========
|
//==========end 第三方登录/auth2登录需要传递仓库id===========
|
||||||
return defHttp.get<LoginResultModel>(
|
return defHttp.get<LoginResultModel>(
|
||||||
{
|
{
|
||||||
url: `${Api.thirdLogin}/${params.token}/${params.thirdType}/${tenantId}`,
|
url: `${Api.thirdLogin}/${params.token}/${params.thirdType}/${tenantId}`,
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,12 @@
|
||||||
text = text.substring(1, text.length - 1);
|
text = text.substring(1, text.length - 1);
|
||||||
}
|
}
|
||||||
break;
|
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:
|
case JInputTypeEnum.JINPUT_QUERY_NE:
|
||||||
text = text.substring(1);
|
text = text.substring(1);
|
||||||
break;
|
break;
|
||||||
|
|
@ -87,6 +93,12 @@
|
||||||
case JInputTypeEnum.JINPUT_QUERY_LIKE:
|
case JInputTypeEnum.JINPUT_QUERY_LIKE:
|
||||||
text = '*' + text + '*';
|
text = '*' + text + '*';
|
||||||
break;
|
break;
|
||||||
|
case JInputTypeEnum.JINPUT_LEFT_LIKE:
|
||||||
|
text = '*' + text;
|
||||||
|
break;
|
||||||
|
case JInputTypeEnum.JINPUT_RIGHT_LIKE:
|
||||||
|
text = text + '*';
|
||||||
|
break;
|
||||||
case JInputTypeEnum.JINPUT_QUERY_NE:
|
case JInputTypeEnum.JINPUT_QUERY_NE:
|
||||||
text = '!' + text;
|
text = '!' + text;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@
|
||||||
import { propTypes } from '/@/utils/propTypes';
|
import { propTypes } from '/@/utils/propTypes';
|
||||||
import { Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
|
|
||||||
const placeholder = ['开始日期', '结束日期']
|
const placeholder = ['开始日期', '结束日期'];
|
||||||
/**
|
/**
|
||||||
* 用于范围查询
|
* 用于范围查询
|
||||||
*/
|
*/
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "JRangeDate",
|
name: 'JRangeDate',
|
||||||
props: {
|
props: {
|
||||||
value: propTypes.string.def(''),
|
value: propTypes.string.def(''),
|
||||||
datetime: propTypes.bool.def(false),
|
datetime: propTypes.bool.def(false),
|
||||||
|
|
@ -20,46 +20,49 @@
|
||||||
},
|
},
|
||||||
emits: ['change', 'update:value'],
|
emits: ['change', 'update:value'],
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const rangeValue = ref([])
|
const rangeValue = ref([]);
|
||||||
const formItemContext = Form.useInjectFormItemContext();
|
const formItemContext = Form.useInjectFormItemContext();
|
||||||
|
|
||||||
watch(()=>props.value, (val)=>{
|
watch(
|
||||||
|
() => props.value,
|
||||||
|
(val) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
rangeValue.value = val.split(',')
|
rangeValue.value = val.split(',');
|
||||||
} else {
|
} else {
|
||||||
rangeValue.value = []
|
rangeValue.value = [];
|
||||||
}
|
}
|
||||||
}, {immediate: true});
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
);
|
||||||
|
|
||||||
const valueFormat = computed(() => {
|
const valueFormat = computed(() => {
|
||||||
if (props.datetime === true) {
|
if (props.datetime === true) {
|
||||||
return 'YYYY-MM-DD HH:mm:ss'
|
return 'YYYY-MM-DD HH:mm:ss';
|
||||||
} else {
|
} else {
|
||||||
return 'YYYY-MM-DD'
|
return 'YYYY-MM-DD';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleChange(arr) {
|
function handleChange(arr) {
|
||||||
let str = ''
|
let str = '';
|
||||||
if (arr && arr.length > 0) {
|
if (arr && arr.length > 0) {
|
||||||
// update-begin--author:liaozhiyang---date:20240710---for:[issues/6368] rangeDate去掉判断允许起始项或结束项为空兼容allowEmpty
|
// update-begin--author:liaozhiyang---date:20240710---for:[issues/6368] rangeDate去掉判断允许起始项或结束项为空兼容allowEmpty
|
||||||
str = arr.join(',')
|
str = arr.join(',');
|
||||||
// update-end--author:liaozhiyang---date:20240710---for:[issues/6368] rangeDate去掉判断允许起始项或结束项为空兼容allowEmpty
|
// update-end--author:liaozhiyang---date:20240710---for:[issues/6368] rangeDate去掉判断允许起始项或结束项为空兼容allowEmpty
|
||||||
}
|
}
|
||||||
emit('change', str);
|
emit('change', str);
|
||||||
emit('update:value', str);
|
emit('update:value', str);
|
||||||
formItemContext.onFieldChange();
|
formItemContext.onFieldChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
rangeValue,
|
rangeValue,
|
||||||
placeholder,
|
placeholder,
|
||||||
valueFormat,
|
valueFormat,
|
||||||
handleChange
|
handleChange,
|
||||||
}
|
};
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ export const APP_LOCAL_CACHE_KEY = 'COMMON__LOCAL__KEY__';
|
||||||
|
|
||||||
// base global session key
|
// base global session key
|
||||||
export const APP_SESSION_CACHE_KEY = 'COMMON__SESSION__KEY__';
|
export const APP_SESSION_CACHE_KEY = 'COMMON__SESSION__KEY__';
|
||||||
// 租户 key
|
// 仓库 key
|
||||||
export const TENANT_ID = 'TENANT_ID';
|
export const TENANT_ID = 'TENANT_ID';
|
||||||
// login info key
|
// login info key
|
||||||
export const LOGIN_INFO_KEY = 'LOGIN__INFO__';
|
export const LOGIN_INFO_KEY = 'LOGIN__INFO__';
|
||||||
|
|
@ -35,7 +35,7 @@ export const LOGIN_INFO_KEY = 'LOGIN__INFO__';
|
||||||
// 聊天UID key
|
// 聊天UID key
|
||||||
export const CPTE_CHAT_UID = 'CPTE_CHAT_UID';
|
export const CPTE_CHAT_UID = 'CPTE_CHAT_UID';
|
||||||
|
|
||||||
// 免登录租户id,与系统分开,避免重复
|
// 免登录仓库id,与系统分开,避免重复
|
||||||
export const OAUTH2_THIRD_LOGIN_TENANT_ID = 'THIRD_LOGIN_TENANT_ID';
|
export const OAUTH2_THIRD_LOGIN_TENANT_ID = 'THIRD_LOGIN_TENANT_ID';
|
||||||
|
|
||||||
// ai助手标识(退出需要记录一下)
|
// ai助手标识(退出需要记录一下)
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,12 @@
|
||||||
export enum JInputTypeEnum {
|
export enum JInputTypeEnum {
|
||||||
//模糊
|
//模糊
|
||||||
JINPUT_QUERY_LIKE = 'like',
|
JINPUT_QUERY_LIKE = 'like',
|
||||||
|
|
||||||
|
//左模糊
|
||||||
|
JINPUT_LEFT_LIKE = 'left_like',
|
||||||
|
|
||||||
|
JINPUT_RIGHT_LIKE = 'right_like',
|
||||||
|
|
||||||
//非
|
//非
|
||||||
JINPUT_QUERY_NE = 'ne',
|
JINPUT_QUERY_NE = 'ne',
|
||||||
//大于等于
|
//大于等于
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ export enum ConfigEnum {
|
||||||
TIMESTAMP = 'X-TIMESTAMP',
|
TIMESTAMP = 'X-TIMESTAMP',
|
||||||
// Sign
|
// Sign
|
||||||
Sign = 'X-Sign',
|
Sign = 'X-Sign',
|
||||||
// 租户id
|
// 仓库id
|
||||||
TENANT_ID = 'X-Tenant-Id',
|
TENANT_ID = 'X-Tenant-Id',
|
||||||
// 版本
|
// 版本
|
||||||
VERSION = 'X-Version',
|
VERSION = 'X-Version',
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@
|
||||||
<template #label>
|
<template #label>
|
||||||
<a-tooltip placement="topLeft">
|
<a-tooltip placement="topLeft">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>您隶属于多租户,请选择当前所属租户</span>
|
<span>您隶属于多仓库,请选择当前所属仓库</span>
|
||||||
</template>
|
</template>
|
||||||
<a-avatar style="background-color: #87d068" :size="30"> 租户 </a-avatar>
|
<a-avatar style="background-color: #87d068" :size="30"> 仓库 </a-avatar>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
<!--部门下拉内容-->
|
<!--部门下拉内容-->
|
||||||
|
|
@ -100,14 +100,14 @@
|
||||||
async function show() {
|
async function show() {
|
||||||
//加载部门
|
//加载部门
|
||||||
await loadDepartList();
|
await loadDepartList();
|
||||||
//加载租户
|
//加载仓库
|
||||||
await loadTenantList();
|
await loadTenantList();
|
||||||
//标题配置
|
//标题配置
|
||||||
if (unref(isMultiTenant) && unref(isMultiDepart)) {
|
if (unref(isMultiTenant) && unref(isMultiDepart)) {
|
||||||
currTitle.value = '切换租户和部门';
|
currTitle.value = '切换仓库和部门';
|
||||||
} else if (unref(isMultiTenant)) {
|
} else if (unref(isMultiTenant)) {
|
||||||
currTitle.value =
|
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)) {
|
} else if (unref(isMultiDepart)) {
|
||||||
currTitle.value =
|
currTitle.value =
|
||||||
unref(currentDepartName) && unref(currentDepartName).length > 0 ? `部门切换(当前部门 :${unref(currentDepartName)})` : props.title;
|
unref(currentDepartName) && unref(currentDepartName).length > 0 ? `部门切换(当前部门 :${unref(currentDepartName)})` : props.title;
|
||||||
|
|
@ -132,7 +132,7 @@
|
||||||
isMultiDepart.value = true;
|
isMultiDepart.value = true;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*加载租户信息
|
*加载仓库信息
|
||||||
*/
|
*/
|
||||||
async function loadTenantList() {
|
async function loadTenantList() {
|
||||||
const result = await getUserTenants();
|
const result = await getUserTenants();
|
||||||
|
|
@ -166,7 +166,7 @@
|
||||||
}
|
}
|
||||||
createMessage.success('切换成功');
|
createMessage.success('切换成功');
|
||||||
|
|
||||||
//切换租户后要刷新首页
|
//切换仓库后要刷新首页
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
|
||||||
|
|
@ -166,18 +166,18 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页多租户部门弹窗逻辑
|
* 首页多仓库部门弹窗逻辑
|
||||||
*/
|
*/
|
||||||
const loginSelectRef = ref();
|
const loginSelectRef = ref();
|
||||||
|
|
||||||
function showLoginSelect() {
|
function showLoginSelect() {
|
||||||
//update-begin---author:liusq Date:20220101 for:判断登录进来是否需要弹窗选择租户----
|
//update-begin---author:liusq Date:20220101 for:判断登录进来是否需要弹窗选择仓库----
|
||||||
//判断是否是登陆进来
|
//判断是否是登陆进来
|
||||||
const loginInfo = toRaw(userStore.getLoginInfo) || {};
|
const loginInfo = toRaw(userStore.getLoginInfo) || {};
|
||||||
if (!!loginInfo.isLogin) {
|
if (!!loginInfo.isLogin) {
|
||||||
loginSelectRef.value.show(loginInfo);
|
loginSelectRef.value.show(loginInfo);
|
||||||
}
|
}
|
||||||
//update-end---author:liusq Date:20220101 for:判断登录进来是否需要弹窗选择租户----
|
//update-end---author:liusq Date:20220101 for:判断登录进来是否需要弹窗选择仓库----
|
||||||
}
|
}
|
||||||
|
|
||||||
function loginSelectOk() {
|
function loginSelectOk() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ export default {
|
||||||
dropdownItemDoc: '官网',
|
dropdownItemDoc: '官网',
|
||||||
dropdownItemLoginOut: '退出系统',
|
dropdownItemLoginOut: '退出系统',
|
||||||
dropdownItemSwitchPassword: '密码修改',
|
dropdownItemSwitchPassword: '密码修改',
|
||||||
dropdownItemSwitchDepart: '切换部门',
|
dropdownItemSwitchDepart: '切换仓库',
|
||||||
dropdownItemRefreshCache: '刷新缓存',
|
dropdownItemRefreshCache: '刷新缓存',
|
||||||
dropdownItemSwitchAccount: '账户设置',
|
dropdownItemSwitchAccount: '账户设置',
|
||||||
dropdownItemSwitchDefaultHomePage: '切换首页',
|
dropdownItemSwitchDefaultHomePage: '切换首页',
|
||||||
|
|
|
||||||
|
|
@ -75,12 +75,12 @@ export function createPermissionGuard(router: Router) {
|
||||||
} else if (to.path === LOGIN_PATH && isOAuth2AppEnv() && !token) {
|
} else if (to.path === LOGIN_PATH && isOAuth2AppEnv() && !token) {
|
||||||
//退出登录进入此逻辑
|
//退出登录进入此逻辑
|
||||||
//如果进入的页面是login页面并且当前是OAuth2app环境,并且token为空,就进入OAuth2登录页面
|
//如果进入的页面是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){
|
if(to.query.tenantId){
|
||||||
setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID,to.query.tenantId)
|
setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID,to.query.tenantId)
|
||||||
}
|
}
|
||||||
next({ path: OAUTH2_LOGIN_PAGE_PATH });
|
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;
|
return;
|
||||||
//update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------
|
//update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,10 @@ export const useUserStore = defineStore({
|
||||||
sessionTimeout: false,
|
sessionTimeout: false,
|
||||||
// Last fetch time
|
// Last fetch time
|
||||||
lastUpdateTime: 0,
|
lastUpdateTime: 0,
|
||||||
//租户id
|
//仓库id
|
||||||
tenantid: '',
|
tenantid: '',
|
||||||
// 分享租户ID
|
// 分享仓库ID
|
||||||
// 用于分享页面所属租户与当前用户登录租户不一致的情况
|
// 用于分享页面所属仓库与当前用户登录仓库不一致的情况
|
||||||
shareTenantId: null,
|
shareTenantId: null,
|
||||||
//登录返回信息
|
//登录返回信息
|
||||||
loginInfo: null,
|
loginInfo: null,
|
||||||
|
|
@ -86,7 +86,7 @@ export const useUserStore = defineStore({
|
||||||
getTenant(): string | number {
|
getTenant(): string | number {
|
||||||
return this.tenantid || getAuthCache<string | number>(TENANT_ID);
|
return this.tenantid || getAuthCache<string | number>(TENANT_ID);
|
||||||
},
|
},
|
||||||
// 是否有分享租户id
|
// 是否有分享仓库id
|
||||||
hasShareTenantId(): boolean {
|
hasShareTenantId(): boolean {
|
||||||
return this.shareTenantId != null && this.shareTenantId !== '';
|
return this.shareTenantId != null && this.shareTenantId !== '';
|
||||||
},
|
},
|
||||||
|
|
@ -242,10 +242,10 @@ export const useUserStore = defineStore({
|
||||||
try {
|
try {
|
||||||
const { goHome = true, mode, ...loginParams } = params;
|
const { goHome = true, mode, ...loginParams } = params;
|
||||||
const data = await phoneLoginApi(loginParams, mode);
|
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;
|
const { token , userInfo } = data;
|
||||||
this.setTenant(userInfo!.loginTenantId);
|
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
|
// save token
|
||||||
this.setToken(token);
|
this.setToken(token);
|
||||||
return this.afterLoginAction(goHome, data);
|
return this.afterLoginAction(goHome, data);
|
||||||
|
|
@ -321,7 +321,7 @@ export const useUserStore = defineStore({
|
||||||
if (openSso == 'true') {
|
if (openSso == 'true') {
|
||||||
await useSso().ssoLoginOut();
|
await useSso().ssoLoginOut();
|
||||||
}
|
}
|
||||||
//update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
|
//update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------
|
||||||
//退出登录的时候需要用的应用id
|
//退出登录的时候需要用的应用id
|
||||||
if(isOAuth2AppEnv()){
|
if(isOAuth2AppEnv()){
|
||||||
let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
|
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: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 {
|
try {
|
||||||
const { goHome = true, mode, ...ThirdLoginParams } = params;
|
const { goHome = true, mode, ...ThirdLoginParams } = params;
|
||||||
const data = await thirdLogin(ThirdLoginParams, mode);
|
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;
|
const { token, userInfo } = data;
|
||||||
this.setTenant(userInfo?.loginTenantId);
|
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
|
// save token
|
||||||
this.setToken(token);
|
this.setToken(token);
|
||||||
return this.afterLoginAction(goHome, data);
|
return this.afterLoginAction(goHome, data);
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export function getLoginBackInfo() {
|
||||||
return getAuthCache(LOGIN_INFO_KEY);
|
return getAuthCache(LOGIN_INFO_KEY);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取租户id
|
* 获取仓库id
|
||||||
*/
|
*/
|
||||||
export function getTenantId() {
|
export function getTenantId() {
|
||||||
return getAuthCache<string>(TENANT_ID);
|
return getAuthCache<string>(TENANT_ID);
|
||||||
|
|
|
||||||
|
|
@ -101,10 +101,10 @@ export class Memory<T = any, V = any> {
|
||||||
const item = this.cache[key];
|
const item = this.cache[key];
|
||||||
item.timeoutId && clearTimeout(item.timeoutId);
|
item.timeoutId && clearTimeout(item.timeoutId);
|
||||||
});
|
});
|
||||||
//update-begin---author:liusq Date:20220108 for:不删除登录用户的租户id,其他缓存信息都清除----
|
//update-begin---author:liusq Date:20220108 for:不删除登录用户的仓库id,其他缓存信息都清除----
|
||||||
this.cache = {
|
this.cache = {
|
||||||
...omit(this.cache, [TOKEN_KEY, USER_INFO_KEY, ROLES_KEY, DB_DICT_DATA_KEY, TENANT_ID, LOGIN_INFO_KEY, PROJ_CFG_KEY]),
|
...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,其他缓存信息都清除----
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -485,22 +485,22 @@ export function replaceUserInfoByExpression(expression: string | any[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置租户缓存,当租户退出的时候
|
* 设置仓库缓存,当仓库退出的时候
|
||||||
*
|
*
|
||||||
* @param tenantId
|
* @param tenantId
|
||||||
*/
|
*/
|
||||||
export async function userExitChangeLoginTenantId(tenantId){
|
export async function userExitChangeLoginTenantId(tenantId){
|
||||||
const userStore = useUserStoreWithOut();
|
const userStore = useUserStoreWithOut();
|
||||||
//step 1 获取用户租户
|
//step 1 获取用户仓库
|
||||||
const url = '/sys/tenant/getCurrentUserTenant'
|
const url = '/sys/tenant/getCurrentUserTenant'
|
||||||
let currentTenantId = null;
|
let currentTenantId = null;
|
||||||
const data = await defHttp.get({ url });
|
const data = await defHttp.get({ url });
|
||||||
if(data && data.list){
|
if(data && data.list){
|
||||||
let arr = data.list;
|
let arr = data.list;
|
||||||
if(arr.length>0){
|
if(arr.length>0){
|
||||||
//step 2.判断当前id是否存在用户租户中
|
//step 2.判断当前id是否存在用户仓库中
|
||||||
let filterTenantId = arr.filter((item) => item.id == tenantId);
|
let filterTenantId = arr.filter((item) => item.id == tenantId);
|
||||||
//存在说明不是退出的不是当前租户,还用用来的租户即可
|
//存在说明不是退出的不是当前仓库,还用用来的仓库即可
|
||||||
if(filterTenantId && filterTenantId.length>0){
|
if(filterTenantId && filterTenantId.length>0){
|
||||||
currentTenantId = tenantId;
|
currentTenantId = tenantId;
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -512,16 +512,16 @@ export async function userExitChangeLoginTenantId(tenantId){
|
||||||
let loginTenantId = getTenantId();
|
let loginTenantId = getTenantId();
|
||||||
userStore.setTenant(currentTenantId);
|
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){
|
if(!currentTenantId || tenantId == loginTenantId){
|
||||||
window.location.reload();
|
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 标题
|
* @param title 标题
|
||||||
*/
|
*/
|
||||||
|
|
@ -530,7 +530,7 @@ export function tenantSaasMessage(title){
|
||||||
if(!tenantId){
|
if(!tenantId){
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title:title,
|
title:title,
|
||||||
content: '此菜单需要在多租户模式下使用,否则数据会出现混乱',
|
content: '此菜单需要在多仓库模式下使用,否则数据会出现混乱',
|
||||||
okText: '确认',
|
okText: '确认',
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
|
||||||
|
|
@ -190,17 +190,17 @@ const transform: AxiosTransform = {
|
||||||
tenantId = 0;
|
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();
|
const userStore = useUserStoreWithOut();
|
||||||
// 判断是否有临时租户id
|
// 判断是否有临时仓库id
|
||||||
if (userStore.hasShareTenantId && userStore.shareTenantId !== 0) {
|
if (userStore.hasShareTenantId && userStore.shareTenantId !== 0) {
|
||||||
// 临时租户id存在,使用临时租户id
|
// 临时仓库id存在,使用临时仓库id
|
||||||
tenantId = userStore.shareTenantId!;
|
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;
|
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
|
// update-begin--author:sunjianlei---date:20220624--for: 添加低代码应用ID
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
import {BasicColumn} from '/@/components/Table';
|
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[] = [
|
export const columns: BasicColumn[] = [
|
||||||
{
|
{
|
||||||
|
|
@ -21,16 +17,11 @@ export const columns: BasicColumn[] = [
|
||||||
dataIndex: 'description',
|
dataIndex: 'description',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建日期',
|
title: '创建时间',
|
||||||
align: "center",
|
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',},
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-form-item name="areaCode">
|
<a-form-item name="areaCode">
|
||||||
<template #label><span title="库区编码">库区编码</span></template>
|
<template #label><span title="库区编码">库区编码</span></template>
|
||||||
<JInput v-model:value="queryParam.areaCode"/>
|
<JInput v-model:value="queryParam.areaCode" :type="JInputTypeEnum.JINPUT_RIGHT_LIKE" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
|
|
@ -16,14 +16,12 @@
|
||||||
<JInput v-model:value="queryParam.areaName" />
|
<JInput v-model:value="queryParam.areaName" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<template v-if="toggleSearchStatus">
|
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-form-item name="createTime">
|
<a-form-item name="createTime">
|
||||||
<template #label><span title="创建日期">创建日期</span></template>
|
<template #label><span title="创建日期">创建日期</span></template>
|
||||||
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择创建日期" v-model:value="queryParam.createTime" allow-clear />
|
<JRangeDate v-model:value="queryParam.createTime" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</template>
|
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
|
|
@ -45,7 +43,9 @@
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<a-button type="primary" v-auth="'base:base_area:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增 </a-button>
|
<a-button type="primary" v-auth="'base:base_area:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增 </a-button>
|
||||||
<a-button type="primary" v-auth="'base:base_area:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出 </a-button>
|
<a-button type="primary" v-auth="'base:base_area:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出 </a-button>
|
||||||
<j-upload-button type="primary" v-auth="'base:base_area:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
<j-upload-button type="primary" v-auth="'base:base_area:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls"
|
||||||
|
>导入
|
||||||
|
</j-upload-button>
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
<a-menu>
|
<a-menu>
|
||||||
|
|
@ -55,12 +55,11 @@
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
</template>
|
</template>
|
||||||
<a-button v-auth="'base:base_area:deleteBatch'">批量操作
|
<a-button v-auth="'base:base_area:deleteBatch'"
|
||||||
|
>批量操作
|
||||||
<Icon icon="mdi:chevron-down"></Icon>
|
<Icon icon="mdi:chevron-down"></Icon>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
<!-- 高级查询 -->
|
|
||||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
|
||||||
</template>
|
</template>
|
||||||
<!--操作栏-->
|
<!--操作栏-->
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
|
|
@ -80,21 +79,19 @@
|
||||||
|
|
||||||
<script lang="ts" name="base-area" setup>
|
<script lang="ts" name="base-area" setup>
|
||||||
import { ref, reactive } from 'vue';
|
import { ref, reactive } from 'vue';
|
||||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
import { BasicTable, TableAction } from '/@/components/Table';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
import { columns, superQuerySchema } from './Area.data';
|
import { columns } from './Area.data';
|
||||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Area.api';
|
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Area.api';
|
||||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
import AreaModal from './components/AreaModal.vue';
|
||||||
import AreaModal from './components/AreaModal.vue'
|
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import {useModal} from '/@/components/Modal';
|
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
|
||||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
import JRangeDate from '@/components/Form/src/jeecg/components/JRangeDate.vue';
|
||||||
import { getDateByPicker } from '/@/utils';
|
import { getDateByPicker } from '/@/utils';
|
||||||
|
import { JInputTypeEnum } from '@/enums/cpteEnum';
|
||||||
|
|
||||||
const fieldPickers = reactive({
|
const fieldPickers = reactive({});
|
||||||
});
|
|
||||||
|
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const queryParam = reactive<any>({});
|
const queryParam = reactive<any>({});
|
||||||
const toggleSearchStatus = ref<boolean>(false);
|
const toggleSearchStatus = ref<boolean>(false);
|
||||||
|
|
@ -114,49 +111,53 @@
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
},
|
},
|
||||||
beforeFetch: async (params) => {
|
beforeFetch: async (params) => {
|
||||||
|
// 创建新的查询参数对象,避免修改原始对象
|
||||||
|
const newQueryParam = { ...queryParam };
|
||||||
|
|
||||||
|
// 处理日期范围
|
||||||
|
if (newQueryParam.createTime) {
|
||||||
|
try {
|
||||||
|
const [begin, end] = newQueryParam.createTime.split(',');
|
||||||
|
if (begin !== undefined) newQueryParam.createTime_begin = begin;
|
||||||
|
if (end !== undefined) newQueryParam.createTime_end = end;
|
||||||
|
delete newQueryParam.createTime;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('日期范围处理错误:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (let key in fieldPickers) {
|
for (let key in fieldPickers) {
|
||||||
if (queryParam[key] && fieldPickers[key]) {
|
if (newQueryParam[key] && fieldPickers[key]) {
|
||||||
queryParam[key] = getDateByPicker(queryParam[key], fieldPickers[key]);
|
newQueryParam[key] = getDateByPicker(newQueryParam[key], fieldPickers[key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Object.assign(params, queryParam);
|
|
||||||
|
return Object.assign(params, newQueryParam);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
exportConfig: {
|
exportConfig: {
|
||||||
name: "库区",
|
name: '库区',
|
||||||
url: getExportUrl,
|
url: getExportUrl,
|
||||||
params: queryParam,
|
params: queryParam,
|
||||||
},
|
},
|
||||||
importConfig: {
|
importConfig: {
|
||||||
url: getImportUrl,
|
url: getImportUrl,
|
||||||
success: handleSuccess
|
success: handleSuccess,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
|
||||||
|
tableContext;
|
||||||
const labelCol = reactive({
|
const labelCol = reactive({
|
||||||
xs: 24,
|
xs: 24,
|
||||||
sm: 4,
|
sm: 4,
|
||||||
xl: 6,
|
xl: 6,
|
||||||
xxl:4
|
xxl: 4,
|
||||||
});
|
});
|
||||||
const wrapperCol = reactive({
|
const wrapperCol = reactive({
|
||||||
xs: 24,
|
xs: 24,
|
||||||
sm: 20,
|
sm: 20,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 高级查询配置
|
|
||||||
const superQueryConfig = reactive(superQuerySchema);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 高级查询事件
|
|
||||||
*/
|
|
||||||
function handleSuperQuery(params) {
|
|
||||||
Object.keys(params).map((k) => {
|
|
||||||
queryParam[k] = params[k];
|
|
||||||
});
|
|
||||||
searchQuery();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增事件
|
* 新增事件
|
||||||
*/
|
*/
|
||||||
|
|
@ -210,7 +211,7 @@
|
||||||
{
|
{
|
||||||
label: '编辑',
|
label: '编辑',
|
||||||
onClick: handleEdit.bind(null, record),
|
onClick: handleEdit.bind(null, record),
|
||||||
auth: 'base:base_area:edit'
|
auth: 'base:base_area:edit',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -223,16 +224,17 @@
|
||||||
{
|
{
|
||||||
label: '详情',
|
label: '详情',
|
||||||
onClick: handleDetail.bind(null, record),
|
onClick: handleDetail.bind(null, record),
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
label: '删除',
|
label: '删除',
|
||||||
popConfirm: {
|
popConfirm: {
|
||||||
title: '是否确认删除',
|
title: '是否确认删除',
|
||||||
confirm: handleDelete.bind(null, record),
|
confirm: handleDelete.bind(null, record),
|
||||||
placement: 'topLeft',
|
placement: 'topLeft',
|
||||||
},
|
},
|
||||||
auth: 'base:base_area:delete'
|
auth: 'base:base_area:delete',
|
||||||
}
|
},
|
||||||
]
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -251,35 +253,35 @@
|
||||||
//刷新数据
|
//刷新数据
|
||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.jeecg-basic-table-form-container {
|
.jeecg-basic-table-form-container {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
.table-page-search-submitButtons {
|
.table-page-search-submitButtons {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.query-group-cust {
|
.query-group-cust {
|
||||||
min-width: 100px !important;
|
min-width: 100px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.query-group-split-cust {
|
.query-group-split-cust {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-form-item:not(.ant-form-item-with-help) {
|
.ant-form-item:not(.ant-form-item-with-help) {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
:deep(.ant-picker),:deep(.ant-input-number){
|
|
||||||
|
:deep(.ant-picker),
|
||||||
|
:deep(.ant-input-number) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,19 @@
|
||||||
<template #detail>
|
<template #detail>
|
||||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="AreaForm">
|
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="AreaForm">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="12">
|
<a-col :span="24">
|
||||||
<a-form-item label="库区编码" v-bind="validateInfos.areaCode" id="AreaForm-areaCode" name="areaCode">
|
<a-form-item label="库区编码" v-bind="validateInfos.areaCode" id="AreaForm-areaCode" name="areaCode">
|
||||||
<a-input v-model:value="formData.areaCode" placeholder="请输入库区编码" allow-clear></a-input>
|
<a-input v-model:value="formData.areaCode" placeholder="请输入库区编码" allow-clear></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="24">
|
||||||
<a-form-item label="库区名称" v-bind="validateInfos.areaName" id="AreaForm-areaName" name="areaName">
|
<a-form-item label="库区名称" v-bind="validateInfos.areaName" id="AreaForm-areaName" name="areaName">
|
||||||
<a-input v-model:value="formData.areaName" placeholder="请输入库区名称" allow-clear></a-input>
|
<a-input v-model:value="formData.areaName" placeholder="请输入库区名称" allow-clear></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="24">
|
||||||
<a-form-item label="描述" v-bind="validateInfos.description" id="AreaForm-description" name="description">
|
<a-form-item label="描述" v-bind="validateInfos.description" id="PointForm-description" name="description">
|
||||||
<j-editor v-model:value="formData.description" :autoFocus="false"/>
|
<a-textarea v-model:value="formData.description" :rows="4" placeholder="请输入描述" />
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12">
|
|
||||||
<a-form-item label="创建日期" v-bind="validateInfos.createTime" id="AreaForm-createTime" name="createTime">
|
|
||||||
<a-date-picker placeholder="请选择创建日期" v-model:value="formData.createTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
@ -32,18 +27,17 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
import { ref, reactive, defineExpose, nextTick, defineProps, computed } from 'vue';
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue';
|
|
||||||
import { getDateByPicker, getValueType } from '/@/utils';
|
import { getDateByPicker, getValueType } from '/@/utils';
|
||||||
import { saveOrUpdate } from '../Area.api';
|
import { saveOrUpdate } from '../Area.api';
|
||||||
import { Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formDisabled: { type: Boolean, default: false },
|
formDisabled: { type: Boolean, default: false },
|
||||||
formData: { type: Object, default: () => ({}) },
|
formData: { type: Object, default: () => ({}) },
|
||||||
formBpm: { type: Boolean, default: true }
|
formBpm: { type: Boolean, default: true },
|
||||||
});
|
});
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const useForm = Form.useForm;
|
const useForm = Form.useForm;
|
||||||
|
|
@ -53,8 +47,7 @@
|
||||||
areaCode: '',
|
areaCode: '',
|
||||||
areaName: '',
|
areaName: '',
|
||||||
description: '',
|
description: '',
|
||||||
delFlag: '',
|
delFlag: 0,
|
||||||
createTime: '',
|
|
||||||
});
|
});
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||||
|
|
@ -62,15 +55,14 @@
|
||||||
const confirmLoading = ref<boolean>(false);
|
const confirmLoading = ref<boolean>(false);
|
||||||
//表单验证
|
//表单验证
|
||||||
const validatorRules = reactive({
|
const validatorRules = reactive({
|
||||||
areaCode: [{ required: true, message: '请输入库区编码!'},],
|
areaCode: [{ required: true, message: '请输入库区编码!' }],
|
||||||
areaName: [{ required: true, message: '请输入库区名称!'},],
|
areaName: [{ required: true, message: '请输入库区名称!' }],
|
||||||
delFlag: [{ required: true, message: '请输入删除状态!'},],
|
delFlag: [{ required: true, message: '请输入删除状态!' }],
|
||||||
createTime: [{ required: true, message: '请输入创建日期!'},],
|
createTime: [{ required: true, message: '请输入创建日期!' }],
|
||||||
});
|
});
|
||||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||||
//日期个性化选择
|
//日期个性化选择
|
||||||
const fieldPickers = reactive({
|
const fieldPickers = reactive({});
|
||||||
});
|
|
||||||
|
|
||||||
// 表单禁用
|
// 表单禁用
|
||||||
const disabled = computed(() => {
|
const disabled = computed(() => {
|
||||||
|
|
@ -84,7 +76,6 @@
|
||||||
return props.formDisabled;
|
return props.formDisabled;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
|
|
@ -101,9 +92,9 @@
|
||||||
const tmpData = {};
|
const tmpData = {};
|
||||||
Object.keys(formData).forEach((key) => {
|
Object.keys(formData).forEach((key) => {
|
||||||
if (record.hasOwnProperty(key)) {
|
if (record.hasOwnProperty(key)) {
|
||||||
tmpData[key] = record[key]
|
tmpData[key] = record[key];
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
//赋值
|
//赋值
|
||||||
Object.assign(formData, tmpData);
|
Object.assign(formData, tmpData);
|
||||||
});
|
});
|
||||||
|
|
@ -159,7 +150,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
add,
|
add,
|
||||||
edit,
|
edit,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<j-modal :title="title" maxHeight="500px" :width="896" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
<j-modal :title="title" maxHeight="250px" :width="600" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||||
<AreaForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></AreaForm>
|
<AreaForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></AreaForm>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<a-button @click="handleCancel">取消</a-button>
|
<a-button @click="handleCancel">取消</a-button>
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
function add() {
|
function add() {
|
||||||
title.value = '新增';
|
title.value = '新增库区';
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
registerForm.value.add();
|
registerForm.value.add();
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
* @param record
|
* @param record
|
||||||
*/
|
*/
|
||||||
function edit(record) {
|
function edit(record) {
|
||||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
title.value = disableSubmit.value ? '库区详情' : '编辑库区';
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
registerForm.value.edit(record);
|
registerForm.value.edit(record);
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ export const columns: BasicColumn[] = [
|
||||||
dataIndex: 'itemName'
|
dataIndex: 'itemName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '租户ID',
|
title: '仓库ID',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'tenantId'
|
dataIndex: 'tenantId'
|
||||||
},
|
},
|
||||||
|
|
@ -26,5 +26,5 @@ export const columns: BasicColumn[] = [
|
||||||
export const superQuerySchema = {
|
export const superQuerySchema = {
|
||||||
itemCode: {title: '物料编码',order: 0,view: 'text', type: 'string',},
|
itemCode: {title: '物料编码',order: 0,view: 'text', type: 'string',},
|
||||||
itemName: {title: '物料名称',order: 1,view: 'text', type: 'string',},
|
itemName: {title: '物料名称',order: 1,view: 'text', type: 'string',},
|
||||||
tenantId: {title: '租户ID',order: 2,view: 'number', type: 'number',},
|
tenantId: {title: '仓库ID',order: 2,view: 'number', type: 'number',},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
},
|
},
|
||||||
beforeFetch: async (params) => {
|
beforeFetch: async (params) => {
|
||||||
|
console.log("params",params)
|
||||||
for (let key in fieldPickers) {
|
for (let key in fieldPickers) {
|
||||||
if (queryParam[key] && fieldPickers[key]) {
|
if (queryParam[key] && fieldPickers[key]) {
|
||||||
queryParam[key] = getDateByPicker(queryParam[key], fieldPickers[key]);
|
queryParam[key] = getDateByPicker(queryParam[key], fieldPickers[key]);
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="租户ID" v-bind="validateInfos.tenantId" id="ItemForm-tenantId" name="tenantId">
|
<a-form-item label="仓库ID" v-bind="validateInfos.tenantId" id="ItemForm-tenantId" name="tenantId">
|
||||||
<a-input-number v-model:value="formData.tenantId" placeholder="请输入租户ID" style="width: 100%" />
|
<a-input-number v-model:value="formData.tenantId" placeholder="请输入仓库ID" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
|
||||||
|
|
@ -843,7 +843,6 @@ export const schemas: FormSchema[] = [
|
||||||
label: '课程',
|
label: '课程',
|
||||||
dynamicPropskey: 'options',
|
dynamicPropskey: 'options',
|
||||||
dynamicPropsVal: ({ model }) => {
|
dynamicPropsVal: ({ model }) => {
|
||||||
let options;
|
|
||||||
if (model.sex == 1) {
|
if (model.sex == 1) {
|
||||||
return [
|
return [
|
||||||
{ value: '0', label: 'java - 男' },
|
{ value: '0', label: 'java - 男' },
|
||||||
|
|
@ -906,7 +905,7 @@ export const schemas: FormSchema[] = [
|
||||||
value: '#{sys_multi_org_code}',
|
value: '#{sys_multi_org_code}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '登录用户租户',
|
label: '登录用户仓库',
|
||||||
value: '#{tenant_id}',
|
value: '#{tenant_id}',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,25 @@
|
||||||
<template>
|
<template>
|
||||||
<BasicModal v-bind="config" @register="registerModal" :title="currTitle" wrapClassName="loginSelectModal" v-model:visible="visible">
|
<BasicModal v-bind="config" @register="registerModal" :title="currTitle" wrapClassName="loginSelectModal" v-model:visible="visible">
|
||||||
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout" :colon="false" class="loginSelectForm">
|
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout" :colon="false" class="loginSelectForm">
|
||||||
<!--多租户选择-->
|
<!--多仓库选择-->
|
||||||
<a-form-item v-if="isMultiTenant" name="tenantId" :validate-status="validate_status">
|
<a-form-item v-if="isMultiTenant" name="tenantId" :validate-status="validate_status">
|
||||||
<!--label内容-->
|
<!--label内容-->
|
||||||
<template #label>
|
<template #label>
|
||||||
<a-tooltip placement="topLeft">
|
<a-tooltip placement="topLeft">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>您隶属于多租户,请选择登录租户</span>
|
<span>您隶属于多仓库,请选择登录仓库</span>
|
||||||
</template>
|
</template>
|
||||||
<a-avatar style="background-color: #87d068" :size="30"> 租户 </a-avatar>
|
<a-avatar style="background-color: #87d068" :size="30"> 仓库 </a-avatar>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
<template #extra v-if="validate_status == 'error'">
|
<template #extra v-if="validate_status == 'error'">
|
||||||
<span style="color: #ed6f6f">请选择登录租户</span>
|
<span style="color: #ed6f6f">请选择登录仓库</span>
|
||||||
</template>
|
</template>
|
||||||
<!--租户下拉内容-->
|
<!--仓库下拉内容-->
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="formState.tenantId"
|
v-model:value="formState.tenantId"
|
||||||
@change="handleTenantChange"
|
@change="handleTenantChange"
|
||||||
placeholder="请选择登录租户"
|
placeholder="请选择登录仓库"
|
||||||
:class="{ 'valid-error': validate_status == 'error' }"
|
:class="{ 'valid-error': validate_status == 'error' }"
|
||||||
>
|
>
|
||||||
<template v-for="tenant in tenantList" :key="tenant.id">
|
<template v-for="tenant in tenantList" :key="tenant.id">
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const { notification } = useMessage();
|
const { notification } = useMessage();
|
||||||
//租户配置
|
//仓库配置
|
||||||
const isMultiTenant = ref(false);
|
const isMultiTenant = ref(false);
|
||||||
const tenantList = ref([]);
|
const tenantList = ref([]);
|
||||||
const validate_status = ref('');
|
const validate_status = ref('');
|
||||||
|
|
@ -96,7 +96,7 @@
|
||||||
const username = ref('');
|
const username = ref('');
|
||||||
//表单
|
//表单
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
//选择的租户部门信息
|
//选择的仓库部门信息
|
||||||
const formState: UnwrapRef<FormState> = reactive({
|
const formState: UnwrapRef<FormState> = reactive({
|
||||||
orgCode: undefined,
|
orgCode: undefined,
|
||||||
tenantId: null,
|
tenantId: null,
|
||||||
|
|
@ -116,16 +116,16 @@
|
||||||
//当前标题
|
//当前标题
|
||||||
const currTitle = computed(() => {
|
const currTitle = computed(() => {
|
||||||
if (unref(isMultiDepart) && unref(isMultiTenant)) {
|
if (unref(isMultiDepart) && unref(isMultiTenant)) {
|
||||||
return '请选择租户和部门';
|
return '请选择仓库和部门';
|
||||||
} else if (unref(isMultiDepart) && !unref(isMultiTenant)) {
|
} else if (unref(isMultiDepart) && !unref(isMultiTenant)) {
|
||||||
return '请选择部门';
|
return '请选择部门';
|
||||||
} else if (!unref(isMultiDepart) && unref(isMultiTenant)) {
|
} else if (!unref(isMultiDepart) && unref(isMultiTenant)) {
|
||||||
return '请选择租户';
|
return '请选择仓库';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
tenantId: [{ required: unref(isMultiTenant), type: 'number', message: '请选择租户', trigger: 'change' }],
|
tenantId: [{ required: unref(isMultiTenant), type: 'number', message: '请选择仓库', trigger: 'change' }],
|
||||||
orgCode: [{ required: unref(isMultiDepart), message: '请选择部门', trigger: 'change' }],
|
orgCode: [{ required: unref(isMultiDepart), message: '请选择部门', trigger: 'change' }],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -137,7 +137,7 @@
|
||||||
* 处理部门情况
|
* 处理部门情况
|
||||||
*/
|
*/
|
||||||
function bizDepart(loginResult) {
|
function bizDepart(loginResult) {
|
||||||
//如果登录接口返回了用户上次登录租户ID,则不需要重新选择
|
//如果登录接口返回了用户上次登录仓库ID,则不需要重新选择
|
||||||
if(loginResult.userInfo?.orgCode && loginResult.userInfo?.orgCode!==''){
|
if(loginResult.userInfo?.orgCode && loginResult.userInfo?.orgCode!==''){
|
||||||
isMultiDepart.value = false;
|
isMultiDepart.value = false;
|
||||||
return;
|
return;
|
||||||
|
|
@ -161,10 +161,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理租户情况
|
* 处理仓库情况
|
||||||
*/
|
*/
|
||||||
function bizTenantList(loginResult) {
|
function bizTenantList(loginResult) {
|
||||||
//如果登录接口返回了用户上次登录租户ID,则不需要重新选择
|
//如果登录接口返回了用户上次登录仓库ID,则不需要重新选择
|
||||||
if(loginResult.userInfo?.loginTenantId && loginResult.userInfo?.loginTenantId!==0){
|
if(loginResult.userInfo?.loginTenantId && loginResult.userInfo?.loginTenantId!==0){
|
||||||
isMultiTenant.value = false;
|
isMultiTenant.value = false;
|
||||||
return;
|
return;
|
||||||
|
|
@ -187,7 +187,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确认选中的租户和部门信息
|
* 确认选中的仓库和部门信息
|
||||||
*/
|
*/
|
||||||
function handleSubmit() {
|
function handleSubmit() {
|
||||||
if (unref(isMultiTenant) && !formState.tenantId) {
|
if (unref(isMultiTenant) && !formState.tenantId) {
|
||||||
|
|
|
||||||
|
|
@ -188,12 +188,12 @@ export function isOAuth2DingAppEnv() {
|
||||||
export function sysOAuth2Login(source) {
|
export function sysOAuth2Login(source) {
|
||||||
let url = `${window._CONFIG['domianURL']}/sys/thirdLogin/oauth2/${source}/login`;
|
let url = `${window._CONFIG['domianURL']}/sys/thirdLogin/oauth2/${source}/login`;
|
||||||
url += `?state=${encodeURIComponent(window.location.origin)}`;
|
url += `?state=${encodeURIComponent(window.location.origin)}`;
|
||||||
//update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
|
//update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------
|
||||||
let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
|
let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
|
||||||
if(tenantId){
|
if(tenantId){
|
||||||
url += `&tenantId=${tenantId}`;
|
url += `&tenantId=${tenantId}`;
|
||||||
}
|
}
|
||||||
//update-end---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
|
//update-end---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------
|
||||||
window.location.href = url;
|
window.location.href = url;
|
||||||
}
|
}
|
||||||
//update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------
|
//update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ export const thirdAppFormSchema: FormSchema[] = [
|
||||||
},
|
},
|
||||||
defaultValue: 1
|
defaultValue: 1
|
||||||
},{
|
},{
|
||||||
label: '租户id',
|
label: '仓库id',
|
||||||
field: 'tenantId',
|
field: 'tenantId',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
show: false,
|
show: false,
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let text: string = '';
|
let text: string = '';
|
||||||
//查询未被绑定的租户
|
//查询未被绑定的仓库
|
||||||
if (userList && userList.length > 0) {
|
if (userList && userList.length > 0) {
|
||||||
for (const item of userList) {
|
for (const item of userList) {
|
||||||
params.push({ wechatUserId: item.wechatUserId, wechatDepartId: item.wechatDepartId, wechatRealName: item.wechatRealName });
|
params.push({ wechatUserId: item.wechatUserId, wechatDepartId: item.wechatDepartId, wechatRealName: item.wechatRealName });
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
const loginTenantName = ref<string>('');
|
const loginTenantName = ref<string>('');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取租户名称
|
* 获取仓库名称
|
||||||
*/
|
*/
|
||||||
getTenantName();
|
getTenantName();
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
//提示信息
|
//提示信息
|
||||||
tenantSaasMessage('租户部门');
|
tenantSaasMessage('仓库部门');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
</template>
|
</template>
|
||||||
<Icon icon="ant-design:question-circle-outlined" style="margin-left: 10px;cursor: pointer" @click="tipShow = true"></Icon>
|
<Icon icon="ant-design:question-circle-outlined" style="margin-left: 10px;cursor: pointer" @click="tipShow = true"></Icon>
|
||||||
<div v-if="loginTenantName" style="margin-left: 10px;"
|
<div v-if="loginTenantName" style="margin-left: 10px;"
|
||||||
>当前登录租户: <span class="tenant-name">{{ loginTenantName }}</span>
|
>当前登录仓库: <span class="tenant-name">{{ loginTenantName }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a-alert type="info" show-icon class="alert" style="margin-bottom: 8px">
|
<a-alert type="info" show-icon class="alert" style="margin-bottom: 8px">
|
||||||
|
|
@ -121,9 +121,9 @@
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
const { handleImportXls, handleExportXls } = useMethods();
|
const { handleImportXls, handleExportXls } = useMethods();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
//是否为租户部门
|
//是否为仓库部门
|
||||||
isTenantDepart: { default: false, type: Boolean },
|
isTenantDepart: { default: false, type: Boolean },
|
||||||
//当前登录租户
|
//当前登录仓库
|
||||||
loginTenantName: { default: "", type: String },
|
loginTenantName: { default: "", type: String },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -439,7 +439,7 @@ export const dataRuleFormSchema: FormSchema[] = [
|
||||||
value: '#{sys_multi_org_code}',
|
value: '#{sys_multi_org_code}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '登录用户租户',
|
label: '登录用户仓库',
|
||||||
value: '#{tenant_id}',
|
value: '#{tenant_id}',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
// 列表页面公共参数、方法
|
// 列表页面公共参数、方法
|
||||||
const { onExportXls, onImportXls, tableContext } = useListPage({
|
const { onExportXls, onImportXls, tableContext } = useListPage({
|
||||||
tableProps: {
|
tableProps: {
|
||||||
title: '租户职务列表',
|
title: '仓库职务列表',
|
||||||
api: getPositionList,
|
api: getPositionList,
|
||||||
columns: columns,
|
columns: columns,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
exportConfig: {
|
exportConfig: {
|
||||||
name: '租户职务列表',
|
name: '仓库职务列表',
|
||||||
url: getExportUrl,
|
url: getExportUrl,
|
||||||
},
|
},
|
||||||
importConfig: {
|
importConfig: {
|
||||||
|
|
@ -128,6 +128,6 @@
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
//提示信息
|
//提示信息
|
||||||
tenantSaasMessage('租户职务');
|
tenantSaasMessage('仓库职务');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
<Icon icon="mdi:chevron-down"></Icon>
|
<Icon icon="mdi:chevron-down"></Icon>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
<div style="margin-left: 10px;margin-top: 5px">当前登录租户: <span class="tenant-name">{{loginTenantName}}</span> </div>
|
<div style="margin-left: 10px;margin-top: 5px">当前登录仓库: <span class="tenant-name">{{loginTenantName}}</span> </div>
|
||||||
</template>
|
</template>
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
const { prefixCls, tableContext, onImportXls, onExportXls } = useListPage({
|
const { prefixCls, tableContext, onImportXls, onExportXls } = useListPage({
|
||||||
designScope: 'role-template',
|
designScope: 'role-template',
|
||||||
tableProps: {
|
tableProps: {
|
||||||
title: '租户角色列表',
|
title: '仓库角色列表',
|
||||||
api: listByTenant,
|
api: listByTenant,
|
||||||
columns: columns,
|
columns: columns,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
|
|
@ -171,7 +171,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
tenantSaasMessage('租户角色')
|
tenantSaasMessage('仓库角色')
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,9 +62,9 @@
|
||||||
api: userList,
|
api: userList,
|
||||||
columns: userColumns,
|
columns: userColumns,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
//update-begin---author:wangshuai ---date:20230703 for:【QQYUN-5685】3、租户角色下,查询居左显示
|
//update-begin---author:wangshuai ---date:20230703 for:【QQYUN-5685】3、仓库角色下,查询居左显示
|
||||||
labelWidth: 60,
|
labelWidth: 60,
|
||||||
//update-end---author:wangshuai ---date:20230703 for:【QQYUN-5685】3、租户角色下,查询居左显示
|
//update-end---author:wangshuai ---date:20230703 for:【QQYUN-5685】3、仓库角色下,查询居左显示
|
||||||
schemas: searchUserFormSchema,
|
schemas: searchUserFormSchema,
|
||||||
autoSubmitOnEnter: true,
|
autoSubmitOnEnter: true,
|
||||||
},
|
},
|
||||||
|
|
@ -192,9 +192,9 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/*update-begin---author:wangshuai ---date:20230703 for:【QQYUN-5685】3、租户角色下,查询居左显示*/
|
/*update-begin---author:wangshuai ---date:20230703 for:【QQYUN-5685】3、仓库角色下,查询居左显示*/
|
||||||
:deep(.ant-form-item-control-input-content){
|
:deep(.ant-form-item-control-input-content){
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
/*update-end---author:wangshuai ---date:20230703 for:【QQYUN-5685】3、租户角色下,查询居左显示*/
|
/*update-end---author:wangshuai ---date:20230703 for:【QQYUN-5685】3、仓库角色下,查询居左显示*/
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ export const getImportUrl = Api.importExcel;
|
||||||
*/
|
*/
|
||||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||||
/**
|
/**
|
||||||
* 租户角色列表
|
* 仓库角色列表
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const listByTenant = (params) => defHttp.get({ url: Api.listByTenant, params });
|
export const listByTenant = (params) => defHttp.get({ url: Api.listByTenant, params });
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@
|
||||||
</a-button>
|
</a-button>
|
||||||
<JThirdAppButton biz-type="user" :selected-row-keys="selectedRowKeys" syncToApp syncToLocal @sync-finally="onSyncFinally" />
|
<JThirdAppButton biz-type="user" :selected-row-keys="selectedRowKeys" syncToApp syncToLocal @sync-finally="onSyncFinally" />
|
||||||
<a-button type="primary" @click="openQuitModal(true, {})" preIcon="ant-design:user-delete-outlined">离职人员</a-button>
|
<a-button type="primary" @click="openQuitModal(true, {})" preIcon="ant-design:user-delete-outlined">离职人员</a-button>
|
||||||
<div style="margin-left: 10px;margin-top: 5px"> 当前登录租户: <span class="tenant-name">{{loginTenantName}}</span> </div>
|
<div style="margin-left: 10px;margin-top: 5px"> 当前登录仓库: <span class="tenant-name">{{loginTenantName}}</span> </div>
|
||||||
<a-tooltip title="租户用户更多操作说明">
|
<a-tooltip title="仓库用户更多操作说明">
|
||||||
<a-icon type="question-circle" style="margin-left: 8px; cursor: pointer " @click="tipShow = true"/>
|
<a-icon type="question-circle" style="margin-left: 8px; cursor: pointer " @click="tipShow = true"/>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -34,12 +34,12 @@
|
||||||
<TenantPackAllotModal @register="registerPackAllotModal"></TenantPackAllotModal>
|
<TenantPackAllotModal @register="registerPackAllotModal"></TenantPackAllotModal>
|
||||||
<!-- 邀请人弹窗 -->
|
<!-- 邀请人弹窗 -->
|
||||||
<TenantInviteUserModal @register="registerSelUserModal" @inviteOk="handleInviteUserOk" />
|
<TenantInviteUserModal @register="registerSelUserModal" @inviteOk="handleInviteUserOk" />
|
||||||
<a-modal v-model:open="tipShow" :footer="null" title="租户用户更多操作说明" :width="800">
|
<a-modal v-model:open="tipShow" :footer="null" title="仓库用户更多操作说明" :width="800">
|
||||||
<ul class="user-tenant-tip">
|
<ul class="user-tenant-tip">
|
||||||
<li>移除:将用户从当前租户中移除</li>
|
<li>移除:将用户从当前仓库中移除</li>
|
||||||
<li>删除:仅可删除当天创建的用户,删除后可在系统用户回收站恢复</li>
|
<li>删除:仅可删除当天创建的用户,删除后可在系统用户回收站恢复</li>
|
||||||
<li>离职:非租户创建者可进行离职操作,离职员工可在离职人员列表查看</li>
|
<li>离职:非仓库创建者可进行离职操作,离职员工可在离职人员列表查看</li>
|
||||||
<li>交接:租户创建者可进行租户交接,交接后员工信息可在离职人员列表查看</li>
|
<li>交接:仓库创建者可进行仓库交接,交接后员工信息可在离职人员列表查看</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div style="height: 10px"></div>
|
<div style="height: 10px"></div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
|
@ -91,7 +91,7 @@
|
||||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
designScope: 'user-list',
|
designScope: 'user-list',
|
||||||
tableProps: {
|
tableProps: {
|
||||||
title: '租户用户列表',
|
title: '仓库用户列表',
|
||||||
api: getUserTenantPageList,
|
api: getUserTenantPageList,
|
||||||
columns: userTenantColumns,
|
columns: userTenantColumns,
|
||||||
size: 'small',
|
size: 'small',
|
||||||
|
|
@ -226,7 +226,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新用户租户状态
|
* 更新用户仓库状态
|
||||||
* @param id
|
* @param id
|
||||||
* @param status
|
* @param status
|
||||||
*/
|
*/
|
||||||
|
|
@ -242,8 +242,8 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================ 租户离职交接 ============================================
|
//============================================ 仓库离职交接 ============================================
|
||||||
//租户id
|
//仓库id
|
||||||
const tenantId = ref<string>('');
|
const tenantId = ref<string>('');
|
||||||
//排除自己的编号集合
|
//排除自己的编号集合
|
||||||
const excludeUserIdList = ref<any>([]);
|
const excludeUserIdList = ref<any>([]);
|
||||||
|
|
@ -288,10 +288,10 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//============================================ 租户离职交接 ============================================
|
//============================================ 仓库离职交接 ============================================
|
||||||
|
|
||||||
|
|
||||||
//update-begin---author:wangshuai ---date:20230710 for:【QQYUN-5723】4、显示当前登录租户------------
|
//update-begin---author:wangshuai ---date:20230710 for:【QQYUN-5723】4、显示当前登录仓库------------
|
||||||
const loginTenantName = ref<string>('');
|
const loginTenantName = ref<string>('');
|
||||||
|
|
||||||
getTenantName();
|
getTenantName();
|
||||||
|
|
@ -299,7 +299,7 @@
|
||||||
async function getTenantName(){
|
async function getTenantName(){
|
||||||
loginTenantName.value = await getLoginTenantName();
|
loginTenantName.value = await getLoginTenantName();
|
||||||
}
|
}
|
||||||
//update-end---author:wangshuai ---date:20230710 for:【QQYUN-5723】4、显示当前登录租户------------
|
//update-end---author:wangshuai ---date:20230710 for:【QQYUN-5723】4、显示当前登录仓库------------
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -321,7 +321,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邀请用户加入租户
|
* 邀请用户加入仓库
|
||||||
*/
|
*/
|
||||||
function handleInvitation() {
|
function handleInvitation() {
|
||||||
userOpenModal(true, {});
|
userOpenModal(true, {});
|
||||||
|
|
@ -355,7 +355,7 @@
|
||||||
|
|
||||||
|
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
tenantSaasMessage('租户用户')
|
tenantSaasMessage('仓库用户')
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<!--邀请用户加入租户弹窗-->
|
<!--邀请用户加入仓库弹窗-->
|
||||||
<template>
|
<template>
|
||||||
<BasicModal @register="registerModal" :width="500" :title="title" @ok="handleSubmit">
|
<BasicModal @register="registerModal" :width="500" :title="title" @ok="handleSubmit">
|
||||||
<BasicForm @register="registerForm" />
|
<BasicForm @register="registerForm" />
|
||||||
|
|
@ -65,7 +65,7 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交,返回给租户list页面
|
* 提交,返回给仓库list页面
|
||||||
*/
|
*/
|
||||||
async function handleSubmit() {
|
async function handleSubmit() {
|
||||||
let values = await validate();
|
let values = await validate();
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//设置标题
|
//设置标题
|
||||||
const title = computed(() => (!unref(isUpdate) ? '新增租户' : '编辑租户'));
|
const title = computed(() => (!unref(isUpdate) ? '新增仓库' : '编辑仓库'));
|
||||||
//表单提交事件
|
//表单提交事件
|
||||||
async function handleSubmit(v) {
|
async function handleSubmit(v) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
emits: ['cancel'],
|
emits: ['cancel'],
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const [registerUserModal, { openModal: openUserModal, closeModal: closeUserModal }] = useModal();
|
const [registerUserModal, { openModal: openUserModal, closeModal: closeUserModal }] = useModal();
|
||||||
//获取租户id
|
//获取仓库id
|
||||||
const getTenantId = computed(() => {
|
const getTenantId = computed(() => {
|
||||||
return tenantPackData.tenantId;
|
return tenantPackData.tenantId;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -17,22 +17,22 @@
|
||||||
<Icon icon="mdi:chevron-down"></Icon>
|
<Icon icon="mdi:chevron-down"></Icon>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
<a-button
|
<!-- <a-button
|
||||||
preIcon="ant-design:user-add-outlined"
|
preIcon="ant-design:user-add-outlined"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleInvitation"
|
@click="handleInvitation"
|
||||||
style="margin-right: 5px"
|
style="margin-right: 5px"
|
||||||
:disabled="selectedRowKeys.length === 0"
|
:disabled="selectedRowKeys.length === 0"
|
||||||
>邀请用户加入</a-button
|
>邀请用户加入</a-button
|
||||||
>
|
>-->
|
||||||
<a-button
|
<!-- <a-button
|
||||||
preIcon="ant-design:sliders-outlined"
|
preIcon="ant-design:sliders-outlined"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handlePack"
|
@click="handlePack"
|
||||||
style="margin-right: 5px"
|
style="margin-right: 5px"
|
||||||
:disabled="selectedRowKeys.length === 0"
|
:disabled="selectedRowKeys.length === 0"
|
||||||
>套餐管理</a-button
|
>套餐管理</a-button
|
||||||
>
|
>-->
|
||||||
<a-button type="primary" @click="recycleBinClick" preIcon="ant-design:hdd-outlined">回收站</a-button>
|
<a-button type="primary" @click="recycleBinClick" preIcon="ant-design:hdd-outlined">回收站</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
<TenantUserModal @register="registerTenUserModal" />
|
<TenantUserModal @register="registerTenUserModal" />
|
||||||
<!-- 产品包 -->
|
<!-- 产品包 -->
|
||||||
<TenantPackList @register="registerPackModal" />
|
<TenantPackList @register="registerPackModal" />
|
||||||
<!-- 租户回收站 -->
|
<!-- 仓库回收站 -->
|
||||||
<TenantRecycleBinModal @register="registerRecycleBinModal" @success="reload" />
|
<TenantRecycleBinModal @register="registerRecycleBinModal" @success="reload" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -73,7 +73,7 @@
|
||||||
const { prefixCls, tableContext } = useListPage({
|
const { prefixCls, tableContext } = useListPage({
|
||||||
designScope: 'tenant-template',
|
designScope: 'tenant-template',
|
||||||
tableProps: {
|
tableProps: {
|
||||||
title: '租户列表',
|
title: '仓库列表',
|
||||||
api: getTenantList,
|
api: getTenantList,
|
||||||
columns: columns,
|
columns: columns,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
|
|
@ -147,7 +147,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邀请用户加入租户
|
* 邀请用户加入仓库
|
||||||
*/
|
*/
|
||||||
function handleInvitation() {
|
function handleInvitation() {
|
||||||
userOpenModal(true, {});
|
userOpenModal(true, {});
|
||||||
|
|
@ -160,14 +160,14 @@
|
||||||
* @param userSelectId
|
* @param userSelectId
|
||||||
*/
|
*/
|
||||||
async function handleInviteUserOk(phone, username) {
|
async function handleInviteUserOk(phone, username) {
|
||||||
//update-begin---author:wangshuai ---date:20230314 for:【QQYUN-4605】后台的邀请谁加入租户,没办法选不是租户下的用户------------
|
//update-begin---author:wangshuai ---date:20230314 for:【QQYUN-4605】后台的邀请谁加入仓库,没办法选不是仓库下的用户------------
|
||||||
if (phone) {
|
if (phone) {
|
||||||
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), phone: phone });
|
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), phone: phone });
|
||||||
}
|
}
|
||||||
if (username) {
|
if (username) {
|
||||||
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), username: username });
|
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), username: username });
|
||||||
}
|
}
|
||||||
//update-end---author:wangshuai ---date:20230314 for:【QQYUN-4605】后台的邀请谁加入租户,没办法选不是租户下的用户------------
|
//update-end---author:wangshuai ---date:20230314 for:【QQYUN-4605】后台的邀请谁加入仓库,没办法选不是仓库下的用户------------
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -190,7 +190,7 @@
|
||||||
}
|
}
|
||||||
packModal(true, {
|
packModal(true, {
|
||||||
tenantId: unref(selectedRowKeys.value.join(',')),
|
tenantId: unref(selectedRowKeys.value.join(',')),
|
||||||
//我的租户显示新增和编辑产品包
|
//我的仓库显示新增和编辑产品包
|
||||||
showPackAddAndEdit: true
|
showPackAddAndEdit: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<!--我的租户详情-->
|
<!--我的仓库详情-->
|
||||||
<template>
|
<template>
|
||||||
<div class="message-set-container">
|
<div class="message-set-container">
|
||||||
<div class="message-set-box">
|
<div class="message-set-box">
|
||||||
|
|
@ -78,7 +78,7 @@
|
||||||
let tradeOptions: any[] = [];
|
let tradeOptions: any[] = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化租户信息
|
* 初始化仓库信息
|
||||||
*/
|
*/
|
||||||
async function initTenant() {
|
async function initTenant() {
|
||||||
let result = await getTenantById({ id: getTenantId() });
|
let result = await getTenantById({ id: getTenantId() });
|
||||||
|
|
@ -156,7 +156,7 @@
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
//提示信息
|
//提示信息
|
||||||
tenantSaasMessage('我的租户');
|
tenantSaasMessage('我的仓库');
|
||||||
initTenant();
|
initTenant();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
const { prefixCls, tableContext } = useListPage({
|
const { prefixCls, tableContext } = useListPage({
|
||||||
designScope: 'tenant-template',
|
designScope: 'tenant-template',
|
||||||
tableProps: {
|
tableProps: {
|
||||||
title: '租户列表',
|
title: '仓库列表',
|
||||||
api: getTenantPageListByUserId,
|
api: getTenantPageListByUserId,
|
||||||
columns: columns,
|
columns: columns,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
|
|
@ -76,14 +76,14 @@
|
||||||
});
|
});
|
||||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
|
const [registerTable, { reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
|
||||||
|
|
||||||
// 默认选中当前租户
|
// 默认选中当前仓库
|
||||||
function onFetchSuccess(data) {
|
function onFetchSuccess(data) {
|
||||||
let items = data.items;
|
let items = data.items;
|
||||||
console.log('items:', items);
|
console.log('items:', items);
|
||||||
// 当前登录租户ID
|
// 当前登录仓库ID
|
||||||
let loginTenantId = getTenantId();
|
let loginTenantId = getTenantId();
|
||||||
console.log('loginTenantId:', loginTenantId);
|
console.log('loginTenantId:', loginTenantId);
|
||||||
// 如果当前登录租户ID在列表中,则默认选中
|
// 如果当前登录仓库ID在列表中,则默认选中
|
||||||
if (items && items.length > 0 && loginTenantId) {
|
if (items && items.length > 0 && loginTenantId) {
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
if (items[i].id == loginTenantId) {
|
if (items[i].id == loginTenantId) {
|
||||||
|
|
@ -110,7 +110,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邀请用户加入租户
|
* 邀请用户加入仓库
|
||||||
*/
|
*/
|
||||||
function handleInvitation() {
|
function handleInvitation() {
|
||||||
userOpenModal(true, {});
|
userOpenModal(true, {});
|
||||||
|
|
@ -151,7 +151,7 @@
|
||||||
}
|
}
|
||||||
packModal(true, {
|
packModal(true, {
|
||||||
tenantId: unref(selectedRowKeys.value.join(',')),
|
tenantId: unref(selectedRowKeys.value.join(',')),
|
||||||
//我的租户不显示新增和编辑产品包
|
//我的仓库不显示新增和编辑产品包
|
||||||
showPackAddAndEdit: false
|
showPackAddAndEdit: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -165,6 +165,6 @@
|
||||||
|
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
//提示信息
|
//提示信息
|
||||||
tenantSaasMessage('我的租户')
|
tenantSaasMessage('我的仓库')
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<!-- 当前租户下套餐 -->
|
<!-- 当前仓库下套餐 -->
|
||||||
<template>
|
<template>
|
||||||
<div style="display: flex; width: 100%">
|
<div style="display: flex; width: 100%">
|
||||||
<div :style="leftStyle">
|
<div :style="leftStyle">
|
||||||
<BasicTable @register="registerTable">
|
<BasicTable @register="registerTable">
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<div style="margin-left: 10px; margin-top: 5px"
|
<div style="margin-left: 10px; margin-top: 5px"
|
||||||
>当前登录租户: <span class="tenant-name">{{ loginTenantName }}</span>
|
>当前登录仓库: <span class="tenant-name">{{ loginTenantName }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<!--操作栏-->
|
<!--操作栏-->
|
||||||
|
|
@ -81,12 +81,12 @@
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
|
const [registerTable, { reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
|
||||||
//当前登录的租户名称
|
//当前登录的仓库名称
|
||||||
const loginTenantName = ref<string>('');
|
const loginTenantName = ref<string>('');
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取租户名称
|
* 获取仓库名称
|
||||||
*/
|
*/
|
||||||
getTenantName();
|
getTenantName();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
{
|
{
|
||||||
label: '删除',
|
label: '删除',
|
||||||
popConfirm: {
|
popConfirm: {
|
||||||
title: '是否确认删除租户套餐包',
|
title: '是否确认删除仓库套餐包',
|
||||||
confirm: handleDelete.bind(null, record.id),
|
confirm: handleDelete.bind(null, record.id),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -129,8 +129,8 @@
|
||||||
*/
|
*/
|
||||||
async function handlePackBatch() {
|
async function handlePackBatch() {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: '删除租户套餐包',
|
title: '删除仓库套餐包',
|
||||||
content: '是否删除租户套餐包',
|
content: '是否删除仓库套餐包',
|
||||||
okText: '确认',
|
okText: '确认',
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
success();
|
success();
|
||||||
});
|
});
|
||||||
//设置标题
|
//设置标题
|
||||||
const title = '租户个性化套餐包';
|
const title = '仓库个性化套餐包';
|
||||||
|
|
||||||
//表单提交事件
|
//表单提交事件
|
||||||
async function handleSubmit(v) {
|
async function handleSubmit(v) {
|
||||||
|
|
@ -166,8 +166,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: '删除租户套餐包',
|
title: '删除仓库套餐包',
|
||||||
content: '是否删除租户套餐包',
|
content: '是否删除仓库套餐包',
|
||||||
okText: '确认',
|
okText: '确认',
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
|
|
@ -224,7 +224,7 @@
|
||||||
{
|
{
|
||||||
label: '删除',
|
label: '删除',
|
||||||
popConfirm: {
|
popConfirm: {
|
||||||
title: '是否确认删除租户套餐包',
|
title: '是否确认删除仓库套餐包',
|
||||||
confirm: handleDelete.bind(null, record),
|
confirm: handleDelete.bind(null, record),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
schemas: packMenuFormSchema,
|
schemas: packMenuFormSchema,
|
||||||
showActionButtonGroup: false,
|
showActionButtonGroup: false,
|
||||||
});
|
});
|
||||||
//租户
|
//仓库
|
||||||
const tenantId = ref<number>();
|
const tenantId = ref<number>();
|
||||||
//套餐包类型
|
//套餐包类型
|
||||||
const packType = ref<number>();
|
const packType = ref<number>();
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
//update-end---author:wangshuai ---date:20230705 for:【QQYUN-5685】2 套餐包增加一个查看:添加底部有没有按钮及表单禁用------------
|
//update-end---author:wangshuai ---date:20230705 for:【QQYUN-5685】2 套餐包增加一个查看:添加底部有没有按钮及表单禁用------------
|
||||||
});
|
});
|
||||||
//设置标题
|
//设置标题
|
||||||
const title = computed(() => (unref(isUpdate) ? '编辑 租户套餐' : '新增 租户套餐'));
|
const title = computed(() => (unref(isUpdate) ? '编辑 仓库套餐' : '新增 仓库套餐'));
|
||||||
//表单提交事件
|
//表单提交事件
|
||||||
async function handleSubmit(v) {
|
async function handleSubmit(v) {
|
||||||
const values = await validate();
|
const values = await validate();
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
name: 'TenantPackUserModal',
|
name: 'TenantPackUserModal',
|
||||||
components: { BasicModal, BasicTable, TableAction, TenantUserSelectModal },
|
components: { BasicModal, BasicTable, TableAction, TenantUserSelectModal },
|
||||||
setup() {
|
setup() {
|
||||||
//获取租户id
|
//获取仓库id
|
||||||
const getTenantId = computed(()=>{
|
const getTenantId = computed(()=>{
|
||||||
return tenantPackData.tenantId;
|
return tenantPackData.tenantId;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -25,18 +25,18 @@ enum Api {
|
||||||
queryTenantPackUserList = '/sys/tenant/queryTenantPackUserList',
|
queryTenantPackUserList = '/sys/tenant/queryTenantPackUserList',
|
||||||
deleteTenantPackUser = '/sys/tenant/deleteTenantPackUser',
|
deleteTenantPackUser = '/sys/tenant/deleteTenantPackUser',
|
||||||
addTenantPackUser = '/sys/tenant/addTenantPackUser',
|
addTenantPackUser = '/sys/tenant/addTenantPackUser',
|
||||||
//获取用户租户列表
|
//获取用户仓库列表
|
||||||
getTenantPageListByUserId = '/sys/tenant/getTenantPageListByUserId',
|
getTenantPageListByUserId = '/sys/tenant/getTenantPageListByUserId',
|
||||||
|
|
||||||
//新增、编辑用户租户
|
//新增、编辑用户仓库
|
||||||
saveUser = '/sys/user/addTenantUser',
|
saveUser = '/sys/user/addTenantUser',
|
||||||
editUser = '/sys/user/editTenantUser',
|
editUser = '/sys/user/editTenantUser',
|
||||||
//根据租户id和用户获取用户的产品包列表和当前用户下的产品包id
|
//根据仓库id和用户获取用户的产品包列表和当前用户下的产品包id
|
||||||
listPackByTenantUserId = '/sys/tenant/listPackByTenantUserId',
|
listPackByTenantUserId = '/sys/tenant/listPackByTenantUserId',
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询租户列表
|
* 查询仓库列表
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const getTenantList = (params) => {
|
export const getTenantList = (params) => {
|
||||||
|
|
@ -44,7 +44,7 @@ export const getTenantList = (params) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存或者更新租户
|
* 保存或者更新仓库
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const saveOrUpdateTenant = (params, isUpdate) => {
|
export const saveOrUpdateTenant = (params, isUpdate) => {
|
||||||
|
|
@ -53,7 +53,7 @@ export const saveOrUpdateTenant = (params, isUpdate) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询租户详情
|
* 查询仓库详情
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const getTenantById = (params) => {
|
export const getTenantById = (params) => {
|
||||||
|
|
@ -61,7 +61,7 @@ export const getTenantById = (params) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除租户
|
* 删除仓库
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const deleteTenant = (params, handleSuccess) => {
|
export const deleteTenant = (params, handleSuccess) => {
|
||||||
|
|
@ -71,7 +71,7 @@ export const deleteTenant = (params, handleSuccess) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除租户
|
* 批量删除仓库
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const batchDeleteTenant = (params, handleSuccess) => {
|
export const batchDeleteTenant = (params, handleSuccess) => {
|
||||||
|
|
@ -94,13 +94,13 @@ export const batchDeleteTenant = (params, handleSuccess) => {
|
||||||
export const getUserTenants = (params?) => defHttp.get({ url: Api.getCurrentUserTenants, params });
|
export const getUserTenants = (params?) => defHttp.get({ url: Api.getCurrentUserTenants, params });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邀请用户加入租户
|
* 邀请用户加入仓库
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const invitationUserJoin = (params) => defHttp.put({ url: Api.invitationUserJoin, params }, { joinParamsToUrl: true });
|
export const invitationUserJoin = (params) => defHttp.put({ url: Api.invitationUserJoin, params }, { joinParamsToUrl: true });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过租户id获取数据
|
* 通过仓库id获取数据
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const getTenantUserList = (params) => {
|
export const getTenantUserList = (params) => {
|
||||||
|
|
@ -108,13 +108,13 @@ export const getTenantUserList = (params) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户离开租户
|
* 用户离开仓库
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const leaveTenant = (params, handleSuccess) => {
|
export const leaveTenant = (params, handleSuccess) => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: '请离',
|
title: '请离',
|
||||||
content: '是否将此用户请离当前租户',
|
content: '是否将此用户请离当前仓库',
|
||||||
okText: '确认',
|
okText: '确认',
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
|
|
@ -171,7 +171,7 @@ export const syncDefaultTenantPack = (params, handleSuccess) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取租户回收站的列表
|
* 获取仓库回收站的列表
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const recycleBinPageList = (params) => {
|
export const recycleBinPageList = (params) => {
|
||||||
|
|
@ -179,7 +179,7 @@ export const recycleBinPageList = (params) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户彻底删除
|
* 仓库彻底删除
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const deleteLogicDeleted = (params,handleSuccess) => {
|
export const deleteLogicDeleted = (params,handleSuccess) => {
|
||||||
|
|
@ -191,7 +191,7 @@ export const deleteLogicDeleted = (params,handleSuccess) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户还原
|
* 仓库还原
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const revertTenantLogic = (params,handleSuccess) => {
|
export const revertTenantLogic = (params,handleSuccess) => {
|
||||||
|
|
@ -201,7 +201,7 @@ export const revertTenantLogic = (params,handleSuccess) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取租户产品包下面的用户
|
* 获取仓库产品包下面的用户
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const queryTenantPackUserList = (params) => {
|
export const queryTenantPackUserList = (params) => {
|
||||||
|
|
@ -225,7 +225,7 @@ export const addTenantPackUser = (params)=>{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户租户列表
|
* 查询用户仓库列表
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const getTenantPageListByUserId = (params) => {
|
export const getTenantPageListByUserId = (params) => {
|
||||||
|
|
@ -234,7 +234,7 @@ export const getTenantPageListByUserId = (params) => {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前登录租户名称
|
* 获取当前登录仓库名称
|
||||||
*/
|
*/
|
||||||
export async function getLoginTenantName() {
|
export async function getLoginTenantName() {
|
||||||
let tenantId = getTenantId();
|
let tenantId = getTenantId();
|
||||||
|
|
@ -256,7 +256,7 @@ export const saveOrUpdateTenantUser = (params, isUpdate) => {
|
||||||
return defHttp.post({ url: url, params },{ joinParamsToUrl: true });
|
return defHttp.post({ url: url, params },{ joinParamsToUrl: true });
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* 根据租户id和用户获取用户的产品包列表和当前用户下的产品包id
|
* 根据仓库id和用户获取用户的产品包列表和当前用户下的产品包id
|
||||||
*
|
*
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
import { BasicColumn, FormSchema } from '/@/components/Table';
|
||||||
import { getAutoScrollContainer } from '/@/utils/common/compUtils';
|
|
||||||
import { render } from "/@/utils/common/renderUtils";
|
import { render } from "/@/utils/common/renderUtils";
|
||||||
import { rules } from "/@/utils/helper/validator";
|
import { rules } from "/@/utils/helper/validator";
|
||||||
|
|
||||||
export const columns: BasicColumn[] = [
|
export const columns: BasicColumn[] = [
|
||||||
{
|
{
|
||||||
title: '租户名称',
|
title: '仓库名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
width: 200,
|
width: 200,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '租户编号(ID)',
|
title: '仓库编号',
|
||||||
dataIndex: 'id',
|
dataIndex: 'id',
|
||||||
width: 180,
|
width: 180,
|
||||||
},{
|
},
|
||||||
title: '组织LOGO',
|
{
|
||||||
|
title: '仓库LOGO',
|
||||||
dataIndex: 'companyLogo',
|
dataIndex: 'companyLogo',
|
||||||
width: 100,
|
width: 100,
|
||||||
customRender: ({ text }) => {
|
customRender: ({ text }) => {
|
||||||
|
|
@ -25,11 +25,6 @@ export const columns: BasicColumn[] = [
|
||||||
return render.renderImage({text});
|
return render.renderImage({text});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
dataIndex: 'trade_dictText',
|
|
||||||
title: '所属行业',
|
|
||||||
width: 150
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
dataIndex: 'companySize_dictText',
|
dataIndex: 'companySize_dictText',
|
||||||
title: '公司规模',
|
title: '公司规模',
|
||||||
|
|
@ -51,7 +46,7 @@ export const columns: BasicColumn[] = [
|
||||||
// width: 150
|
// width: 150
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
dataIndex: 'createBy_dictText',
|
dataIndex: 'createBy',
|
||||||
title: '创建者(拥有)',
|
title: '创建者(拥有)',
|
||||||
width: 150
|
width: 150
|
||||||
},
|
},
|
||||||
|
|
@ -77,7 +72,7 @@ export const columns: BasicColumn[] = [
|
||||||
export const searchFormSchema: FormSchema[] = [
|
export const searchFormSchema: FormSchema[] = [
|
||||||
{
|
{
|
||||||
field: 'name',
|
field: 'name',
|
||||||
label: '租户名称',
|
label: '仓库名称',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
},
|
},
|
||||||
|
|
@ -109,13 +104,13 @@ export const searchFormSchema: FormSchema[] = [
|
||||||
export const formSchema: FormSchema[] = [
|
export const formSchema: FormSchema[] = [
|
||||||
{
|
{
|
||||||
field: 'name',
|
field: 'name',
|
||||||
label: '租户名称',
|
label: '仓库名称',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'id',
|
field: 'id',
|
||||||
label: '租户编号(ID)',
|
label: '仓库编号(ID)',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
required: true,
|
required: true,
|
||||||
ifShow: ({ values }) => {
|
ifShow: ({ values }) => {
|
||||||
|
|
@ -124,7 +119,7 @@ export const formSchema: FormSchema[] = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'companyLogo',
|
field: 'companyLogo',
|
||||||
label: '组织LOGO',
|
label: '仓库LOGO',
|
||||||
component: 'JImageUpload',
|
component: 'JImageUpload',
|
||||||
componentProps:{
|
componentProps:{
|
||||||
text:'logo'
|
text:'logo'
|
||||||
|
|
@ -422,7 +417,7 @@ export const packMenuFormSchema: FormSchema[] = [
|
||||||
unCheckedChildren: '否',
|
unCheckedChildren: '否',
|
||||||
},
|
},
|
||||||
defaultValue: "1",
|
defaultValue: "1",
|
||||||
helpMessage: "默认会自动分配给用户,个性高级套餐,需要租户管理员手工分配人员(拥有更灵活性权限控制)"
|
helpMessage: "默认会自动分配给用户,个性高级套餐,需要仓库管理员手工分配人员(拥有更灵活性权限控制)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
|
|
@ -459,18 +454,18 @@ export const packMenuFormSchema: FormSchema[] = [
|
||||||
//回收站列表
|
//回收站列表
|
||||||
export const recycleColumns : BasicColumn[] = [
|
export const recycleColumns : BasicColumn[] = [
|
||||||
{
|
{
|
||||||
title: '租户名称',
|
title: '仓库名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
width: 100,
|
width: 100,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '租户编号(ID)',
|
title: '仓库编号(ID)',
|
||||||
dataIndex: 'id',
|
dataIndex: 'id',
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '组织LOGO',
|
title: '仓库LOGO',
|
||||||
dataIndex: 'companyLogo',
|
dataIndex: 'companyLogo',
|
||||||
width: 100,
|
width: 100,
|
||||||
customRender: ({ text }) => {
|
customRender: ({ text }) => {
|
||||||
|
|
@ -487,11 +482,11 @@ export const recycleColumns : BasicColumn[] = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
//租户回收站搜索表单
|
//仓库回收站搜索表单
|
||||||
export const searchRecycleFormSchema : FormSchema[] = [
|
export const searchRecycleFormSchema : FormSchema[] = [
|
||||||
{
|
{
|
||||||
field: 'name',
|
field: 'name',
|
||||||
label: '租户名称',
|
label: '仓库名称',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -525,7 +520,7 @@ export const tenantPackUserColumns: BasicColumn[] = [
|
||||||
]
|
]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户租户新增编辑表单
|
* 用户仓库新增编辑表单
|
||||||
*/
|
*/
|
||||||
export const tenantUserSchema: FormSchema[] = [
|
export const tenantUserSchema: FormSchema[] = [
|
||||||
{ field: 'id', label: 'id', component: 'Input', show: false },
|
{ field: 'id', label: 'id', component: 'Input', show: false },
|
||||||
|
|
@ -580,7 +575,7 @@ export const tenantUserSchema: FormSchema[] = [
|
||||||
return [{ required: false, message: '请输入工号' }, { ...rules.duplicateCheckRule('sys_user', 'work_no', model, schema, false)[0] }];
|
return [{ required: false, message: '请输入工号' }, { ...rules.duplicateCheckRule('sys_user', 'work_no', model, schema, false)[0] }];
|
||||||
},
|
},
|
||||||
},*/
|
},*/
|
||||||
{ field: 'relTenantIds', label: '租户', component: 'Input',show:false },
|
{ field: 'relTenantIds', label: '仓库', component: 'Input',show:false },
|
||||||
{ field: 'selectedroles', label: '角色', component: 'Input',show:false },
|
{ field: 'selectedroles', label: '角色', component: 'Input',show:false },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,11 +43,11 @@
|
||||||
isUpdate.value = !!data?.isUpdate;
|
isUpdate.value = !!data?.isUpdate;
|
||||||
if (unref(isUpdate)) {
|
if (unref(isUpdate)) {
|
||||||
rowId.value = data.record.id;
|
rowId.value = data.record.id;
|
||||||
//租户信息定义成数组
|
//仓库信息定义成数组
|
||||||
/* if (data.record.relTenantIds && !Array.isArray(data.record.relTenantIds)) {
|
/* if (data.record.relTenantIds && !Array.isArray(data.record.relTenantIds)) {
|
||||||
data.record.relTenantIds = data.record.relTenantIds.split(',');
|
data.record.relTenantIds = data.record.relTenantIds.split(',');
|
||||||
} else {
|
} else {
|
||||||
//【issues/I56C5I】用户管理中连续点两次编辑租户配置就丢失了
|
//【issues/I56C5I】用户管理中连续点两次编辑仓库配置就丢失了
|
||||||
//data.record.relTenantIds = [];
|
//data.record.relTenantIds = [];
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
@ -108,27 +108,27 @@
|
||||||
{
|
{
|
||||||
field: 'selectedroles',
|
field: 'selectedroles',
|
||||||
show: !data?.departDisabled,
|
show: !data?.departDisabled,
|
||||||
//update-begin---author:wangshuai ---date:20230424 for:【issues/4844】多租户模式下,新增或编辑用户,选择角色一栏,角色选项没有做租户隔离------------
|
//update-begin---author:wangshuai ---date:20230424 for:【issues/4844】多仓库模式下,新增或编辑用户,选择角色一栏,角色选项没有做仓库隔离------------
|
||||||
//判断是否为多租户模式
|
//判断是否为多仓库模式
|
||||||
componentProps:{
|
componentProps:{
|
||||||
api: data.tenantSaas?getAllRolesList:getAllRolesListNoByTenant
|
api: data.tenantSaas?getAllRolesList:getAllRolesListNoByTenant
|
||||||
}
|
}
|
||||||
//update-end---author:wangshuai ---date:20230424 for:【issues/4844】多租户模式下,新增或编辑用户,选择角色一栏,角色选项没有做租户隔离------------
|
//update-end---author:wangshuai ---date:20230424 for:【issues/4844】多仓库模式下,新增或编辑用户,选择角色一栏,角色选项没有做仓库隔离------------
|
||||||
},
|
},
|
||||||
//update-begin---author:wangshuai ---date:20230522 for:【issues/4935】租户用户编辑界面中租户下拉框未过滤,显示当前系统所有的租户------------
|
//update-begin---author:wangshuai ---date:20230522 for:【issues/4935】仓库用户编辑界面中仓库下拉框未过滤,显示当前系统所有的仓库------------
|
||||||
{
|
{
|
||||||
field: 'relTenantIds',
|
field: 'relTenantIds',
|
||||||
componentProps:{
|
componentProps:{
|
||||||
disabled: !!data.tenantSaas,
|
disabled: !!data.tenantSaas,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
//update-end---author:wangshuai ---date:20230522 for:【issues/4935】租户用户编辑界面中租户下拉框未过滤,显示当前系统所有的租户------------
|
//update-end---author:wangshuai ---date:20230522 for:【issues/4935】仓库用户编辑界面中仓库下拉框未过滤,显示当前系统所有的仓库------------
|
||||||
]);
|
]);
|
||||||
//update-begin---author:wangshuai ---date:20230522 for:【issues/4935】租户用户编辑界面中租户下拉框未过滤,显示当前系统所有的租户------------
|
//update-begin---author:wangshuai ---date:20230522 for:【issues/4935】仓库用户编辑界面中仓库下拉框未过滤,显示当前系统所有的仓库------------
|
||||||
if(!unref(isUpdate) && data.tenantSaas){
|
if(!unref(isUpdate) && data.tenantSaas){
|
||||||
await setFieldsValue({ relTenantIds: getTenantId().toString() })
|
await setFieldsValue({ relTenantIds: getTenantId().toString() })
|
||||||
}
|
}
|
||||||
//update-end---author:wangshuai ---date:20230522 for:【issues/4935】租户用户编辑界面中租户下拉框未过滤,显示当前系统所有的租户------------
|
//update-end---author:wangshuai ---date:20230522 for:【issues/4935】仓库用户编辑界面中仓库下拉框未过滤,显示当前系统所有的仓库------------
|
||||||
// 无论新增还是编辑,都可以设置表单值
|
// 无论新增还是编辑,都可以设置表单值
|
||||||
if (typeof data.record === 'object') {
|
if (typeof data.record === 'object') {
|
||||||
setFieldsValue({
|
setFieldsValue({
|
||||||
|
|
|
||||||
|
|
@ -39,13 +39,13 @@ export const getExportUrl = Api.exportXls;
|
||||||
*/
|
*/
|
||||||
export const getImportUrl = Api.importExcel;
|
export const getImportUrl = Api.importExcel;
|
||||||
/**
|
/**
|
||||||
* 列表接口(查询用户,通过租户隔离)
|
* 列表接口(查询用户,通过仓库隔离)
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表接口(查询全部用户,不通过租户隔离)
|
* 列表接口(查询全部用户,不通过仓库隔离)
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const listNoCareTenant = (params) => defHttp.get({ url: Api.listNoCareTenant, params });
|
export const listNoCareTenant = (params) => defHttp.get({ url: Api.listNoCareTenant, params });
|
||||||
|
|
@ -127,17 +127,17 @@ export const duplicateCheckDelay = (params) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* 获取全部角色(租户隔离)
|
* 获取全部角色(仓库隔离)
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const getAllRolesList = (params) => defHttp.get({ url: Api.allRolesList, params });
|
export const getAllRolesList = (params) => defHttp.get({ url: Api.allRolesList, params });
|
||||||
/**
|
/**
|
||||||
* 获取全部角色(不租户隔离)
|
* 获取全部角色(不仓库隔离)
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const getAllRolesListNoByTenant = (params) => defHttp.get({ url: Api.allRolesListNoByTenant, params });
|
export const getAllRolesListNoByTenant = (params) => defHttp.get({ url: Api.allRolesListNoByTenant, params });
|
||||||
/**
|
/**
|
||||||
* 获取全部租户
|
* 获取全部仓库
|
||||||
*/
|
*/
|
||||||
export const getAllTenantList = (params) => defHttp.get({ url: Api.allTenantList, params });
|
export const getAllTenantList = (params) => defHttp.get({ url: Api.allTenantList, params });
|
||||||
/**
|
/**
|
||||||
|
|
@ -221,7 +221,7 @@ export const getUserTenantPageList = (params) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新租户状态
|
* 更新仓库状态
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const updateUserTenantStatus = (params) => {
|
export const updateUserTenantStatus = (params) => {
|
||||||
|
|
|
||||||
|
|
@ -288,7 +288,7 @@ export const formSchema: FormSchema[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '租户',
|
label: '仓库',
|
||||||
field: 'relTenantIds',
|
field: 'relTenantIds',
|
||||||
component: 'JSearchSelect',
|
component: 'JSearchSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
|
@ -424,7 +424,7 @@ export const formPasswordSchema: FormSchema[] = [
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//租户用户列表
|
//仓库用户列表
|
||||||
export const userTenantColumns: BasicColumn[] = [
|
export const userTenantColumns: BasicColumn[] = [
|
||||||
{
|
{
|
||||||
title: '用户账号',
|
title: '用户账号',
|
||||||
|
|
@ -468,7 +468,7 @@ export const userTenantColumns: BasicColumn[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
//用户租户搜索表单
|
//用户仓库搜索表单
|
||||||
export const userTenantFormSchema: FormSchema[] = [
|
export const userTenantFormSchema: FormSchema[] = [
|
||||||
{
|
{
|
||||||
label: '账号',
|
label: '账号',
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ import { getToken } from "@/utils/auth";
|
||||||
import { uploadUrl } from "@/api/common/api";
|
import { uploadUrl } from "@/api/common/api";
|
||||||
import { UploadOutlined } from "@ant-design/icons-vue";
|
import { UploadOutlined } from "@ant-design/icons-vue";
|
||||||
|
|
||||||
//TODO 当字典租户隔离时,数据会查不到,默认一个
|
//TODO 当字典仓库隔离时,数据会查不到,默认一个
|
||||||
const sexOption = getDictItemsByCode("sex") || [{text:'男',value:'1'},{text:'女',value:'2'}];
|
const sexOption = getDictItemsByCode("sex") || [{text:'男',value:'1'},{text:'女',value:'2'}];
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
|
|
||||||
|
|
@ -65,11 +65,11 @@
|
||||||
class="font-color333 flex-center margin-right40 font-size13 pointer"
|
class="font-color333 flex-center margin-right40 font-size13 pointer"
|
||||||
>
|
>
|
||||||
<Icon icon="ant-design:edit-outlined" class="footer-icon" />
|
<Icon icon="ant-design:edit-outlined" class="footer-icon" />
|
||||||
<span>查看租户名片</span>
|
<span>查看仓库名片</span>
|
||||||
</span>
|
</span>
|
||||||
<span v-else class="font-color9e flex-center margin-right40 font-size13">
|
<span v-else class="font-color9e flex-center margin-right40 font-size13">
|
||||||
<Icon icon="ant-design:edit-outlined" class="footer-icon" />
|
<Icon icon="ant-design:edit-outlined" class="footer-icon" />
|
||||||
<span>查看租户名片</span>
|
<span>查看仓库名片</span>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-if="item.userTenantStatus !== '3'"
|
v-if="item.userTenantStatus !== '3'"
|
||||||
|
|
@ -77,11 +77,11 @@
|
||||||
class="font-color333 flex-center margin-right40 font-size13 pointer"
|
class="font-color333 flex-center margin-right40 font-size13 pointer"
|
||||||
>
|
>
|
||||||
<Icon icon="ant-design:export-outlined" class="footer-icon" />
|
<Icon icon="ant-design:export-outlined" class="footer-icon" />
|
||||||
<span>退出租户</span>
|
<span>退出仓库</span>
|
||||||
</span>
|
</span>
|
||||||
<span v-else class="font-color9e flex-center margin-right40 font-size13">
|
<span v-else class="font-color9e flex-center margin-right40 font-size13">
|
||||||
<Icon icon="ant-design:export-outlined" class="footer-icon" />
|
<Icon icon="ant-design:export-outlined" class="footer-icon" />
|
||||||
<span>退出租户</span>
|
<span>退出仓库</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -108,19 +108,19 @@
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
|
||||||
<!-- 退出租户 -->
|
<!-- 退出仓库 -->
|
||||||
<a-modal v-model:open="cancelVisible" width="800" destroy-on-close>
|
<a-modal v-model:open="cancelVisible" width="800" destroy-on-close>
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="cancellation">
|
<div class="cancellation">
|
||||||
<Icon icon="ant-design:warning-outlined" style="font-size: 20px;color: red"/>
|
<Icon icon="ant-design:warning-outlined" style="font-size: 20px;color: red"/>
|
||||||
退出租户 {{myTenantInfo.name}}
|
退出仓库 {{myTenantInfo.name}}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<a-form :model="formCancelState" ref="cancelTenantRef">
|
<a-form :model="formCancelState" ref="cancelTenantRef">
|
||||||
<a-form-item name="tenantName">
|
<a-form-item name="tenantName">
|
||||||
<a-row :span="24" style="padding: 20px 20px 0;font-size: 13px">
|
<a-row :span="24" style="padding: 20px 20px 0;font-size: 13px">
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
请输入租户名称
|
请输入仓库名称
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" style="margin-top: 10px">
|
<a-col :span="24" style="margin-top: 10px">
|
||||||
<a-input v-model:value="formCancelState.tenantName" @change="tenantNameChange"/>
|
<a-input v-model:value="formCancelState.tenantName" @change="tenantNameChange"/>
|
||||||
|
|
@ -211,7 +211,7 @@ const userStore = useUserStore();
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
//部门字典
|
//部门字典
|
||||||
const departOptions = ref<any>([]);
|
const departOptions = ref<any>([]);
|
||||||
//租户编辑是或否隐藏
|
//仓库编辑是或否隐藏
|
||||||
const tenantVisible = ref<boolean>(false);
|
const tenantVisible = ref<boolean>(false);
|
||||||
//用户数据
|
//用户数据
|
||||||
const userData = ref<any>([]);
|
const userData = ref<any>([]);
|
||||||
|
|
@ -223,11 +223,11 @@ const userDetail = ref({
|
||||||
postText: userStore.getUserInfo.postText,
|
postText: userStore.getUserInfo.postText,
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* 初始化租户数据
|
* 初始化仓库数据
|
||||||
*/
|
*/
|
||||||
async function initDataSource() {
|
async function initDataSource() {
|
||||||
//获取用户数据
|
//获取用户数据
|
||||||
//update-begin---author:wangshuai ---date:20230109 for: [QQYUN-3645]个人设置我的租户查询审核中和正常的------------
|
//update-begin---author:wangshuai ---date:20230109 for: [QQYUN-3645]个人设置我的仓库查询审核中和正常的------------
|
||||||
//update-begin---author:wangshuai ---date:202307049 for:[QQYUN-5608]用户导入后,邀请后,被导入人同意即可,新增被邀信息-----------
|
//update-begin---author:wangshuai ---date:202307049 for:[QQYUN-5608]用户导入后,邀请后,被导入人同意即可,新增被邀信息-----------
|
||||||
getTenantListByUserId({ userTenantStatus: '1,3,5' }).then((res) => {
|
getTenantListByUserId({ userTenantStatus: '1,3,5' }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|
@ -256,7 +256,7 @@ const userDetail = ref({
|
||||||
//update-end---author:wangshuai ---date:202307049 for:[QQYUN-5608]用户导入后,邀请后,被导入人同意即可,新增被邀信息------------
|
//update-end---author:wangshuai ---date:202307049 for:[QQYUN-5608]用户导入后,邀请后,被导入人同意即可,新增被邀信息------------
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//update-end---author:wangshuai ---date:20230109 for:[QQYUN-3645]个人设置我的租户查询审核中和正常的------------
|
//update-end---author:wangshuai ---date:20230109 for:[QQYUN-3645]个人设置我的仓库查询审核中和正常的------------
|
||||||
}
|
}
|
||||||
function setInitedValue() {
|
function setInitedValue() {
|
||||||
dataSource.value = [];
|
dataSource.value = [];
|
||||||
|
|
@ -343,7 +343,7 @@ const userDetail = ref({
|
||||||
if (type === 'editTenant') {
|
if (type === 'editTenant') {
|
||||||
tenantVisible.value = true;
|
tenantVisible.value = true;
|
||||||
}else if(type === 'exitTenant'){
|
}else if(type === 'exitTenant'){
|
||||||
//退出租户
|
//退出仓库
|
||||||
formCancelState.value = {loginPassword:'', tenantName:''};
|
formCancelState.value = {loginPassword:'', tenantName:''};
|
||||||
outBtnDisabled.value = true;
|
outBtnDisabled.value = true;
|
||||||
cancelVisible.value = true;
|
cancelVisible.value = true;
|
||||||
|
|
@ -351,13 +351,13 @@ const userDetail = ref({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//退出租户弹窗
|
//退出仓库弹窗
|
||||||
const cancelVisible = ref<boolean>(false);
|
const cancelVisible = ref<boolean>(false);
|
||||||
//退出租户数据
|
//退出仓库数据
|
||||||
const formCancelState = ref<any>({});
|
const formCancelState = ref<any>({});
|
||||||
//租户数据
|
//仓库数据
|
||||||
const myTenantInfo = ref<any>({});
|
const myTenantInfo = ref<any>({});
|
||||||
//注销租户弹窗确定按钮是否可以点击
|
//注销仓库弹窗确定按钮是否可以点击
|
||||||
const outBtnDisabled = ref<boolean>(true);
|
const outBtnDisabled = ref<boolean>(true);
|
||||||
//拥有者
|
//拥有者
|
||||||
const tenantOwen = ref<string>('');
|
const tenantOwen = ref<string>('');
|
||||||
|
|
@ -365,7 +365,7 @@ const userDetail = ref({
|
||||||
const owenVisible = ref<boolean>(false);
|
const owenVisible = ref<boolean>(false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户名称值改变事件
|
* 仓库名称值改变事件
|
||||||
*/
|
*/
|
||||||
function tenantNameChange() {
|
function tenantNameChange() {
|
||||||
let name = unref(myTenantInfo).name;
|
let name = unref(myTenantInfo).name;
|
||||||
|
|
@ -397,7 +397,7 @@ const userDetail = ref({
|
||||||
//需要指定变更者
|
//需要指定变更者
|
||||||
owenVisible.value = true;
|
owenVisible.value = true;
|
||||||
cancelVisible.value = false;
|
cancelVisible.value = false;
|
||||||
//update-begin---author:wangshuai ---date:20230426 for:【QQYUN-5270】名下租户全部退出后,再次登录,提示租户全部冻结。拥有者提示前往注销------------
|
//update-begin---author:wangshuai ---date:20230426 for:【QQYUN-5270】名下仓库全部退出后,再次登录,提示仓库全部冻结。拥有者提示前往注销------------
|
||||||
}else if(res.message === 'cancelTenant'){
|
}else if(res.message === 'cancelTenant'){
|
||||||
cancelVisible.value = false;
|
cancelVisible.value = false;
|
||||||
let fullPath = router.currentRoute.value.fullPath;
|
let fullPath = router.currentRoute.value.fullPath;
|
||||||
|
|
@ -414,7 +414,7 @@ const userDetail = ref({
|
||||||
router.push('/myapps/settings/organization/organMessage/'+unref(myTenantInfo).tenantUserId)
|
router.push('/myapps/settings/organization/organMessage/'+unref(myTenantInfo).tenantUserId)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
//update-end---author:wangshuai ---date:20230426 for:【QQYUN-5270】名下租户全部退出后,再次登录,提示租户全部冻结。拥有者提示前往注销------------
|
//update-end---author:wangshuai ---date:20230426 for:【QQYUN-5270】名下仓库全部退出后,再次登录,提示仓库全部冻结。拥有者提示前往注销------------
|
||||||
} else {
|
} else {
|
||||||
createMessage.warning(res.message);
|
createMessage.warning(res.message);
|
||||||
}
|
}
|
||||||
|
|
@ -425,7 +425,7 @@ const userDetail = ref({
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退出租户取消事件
|
* 退出仓库取消事件
|
||||||
*/
|
*/
|
||||||
function handleCancelOutClick() {
|
function handleCancelOutClick() {
|
||||||
cancelVisible.value = false;
|
cancelVisible.value = false;
|
||||||
|
|
@ -444,9 +444,9 @@ const userDetail = ref({
|
||||||
if(res.success){
|
if(res.success){
|
||||||
createMessage.success(res.message);
|
createMessage.success(res.message);
|
||||||
initDataSource();
|
initDataSource();
|
||||||
//update-begin---author:wangshuai---date:2023-10-23---for:【QQYUN-6822】7、登录拥有多个租户身份的用户,退出租户,只剩下一个租户后显示为空---
|
//update-begin---author:wangshuai---date:2023-10-23---for:【QQYUN-6822】7、登录拥有多个仓库身份的用户,退出仓库,只剩下一个仓库后显示为空---
|
||||||
userExitChangeLoginTenantId(unref(myTenantInfo).tenantUserId);
|
userExitChangeLoginTenantId(unref(myTenantInfo).tenantUserId);
|
||||||
//update-end---author:wangshuai---date:2023-10-23---for:【QQYUN-6822】7、登录拥有多个租户身份的用户,退出租户,只剩下一个租户后显示为空---
|
//update-end---author:wangshuai---date:2023-10-23---for:【QQYUN-6822】7、登录拥有多个仓库身份的用户,退出仓库,只剩下一个仓库后显示为空---
|
||||||
} else {
|
} else {
|
||||||
createMessage.warning(res.message);
|
createMessage.warning(res.message);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ export const updatePasswordNotBindPhone = (params) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户id获取租户列表
|
* 通过用户id获取仓库列表
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const getTenantListByUserId = (params) => {
|
export const getTenantListByUserId = (params) => {
|
||||||
|
|
@ -87,7 +87,7 @@ export const cancelApplyTenant = (params) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户退出租户
|
* 用户退出仓库
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const exitUserTenant = (params)=>{
|
export const exitUserTenant = (params)=>{
|
||||||
|
|
@ -95,7 +95,7 @@ export const exitUserTenant = (params)=>{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 变更租户拥有者
|
* 变更仓库拥有者
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const changeOwenUserTenant = (params)=>{
|
export const changeOwenUserTenant = (params)=>{
|
||||||
|
|
@ -127,7 +127,7 @@ export const deleteThirdAccount = (params) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同意和拒绝加入租户
|
* 同意和拒绝加入仓库
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const agreeOrRefuseJoinTenant = (params) => {
|
export const agreeOrRefuseJoinTenant = (params) => {
|
||||||
|
|
|
||||||
|
|
@ -47,14 +47,7 @@ export const settingList = [
|
||||||
img1: anquan1,
|
img1: anquan1,
|
||||||
img2: anquan2,
|
img2: anquan2,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: '4',
|
|
||||||
name: '第三方APP',
|
|
||||||
component: 'WeChatDingSetting',
|
|
||||||
icon: 'ant-design:contacts-outlined',
|
|
||||||
img1: app1,
|
|
||||||
img2: app2,
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -101,7 +94,7 @@ export const formSchema: FormSchema[] = [
|
||||||
{
|
{
|
||||||
field: 'relTenantIds',
|
field: 'relTenantIds',
|
||||||
component: 'JDictSelectTag',
|
component: 'JDictSelectTag',
|
||||||
label: '租户',
|
label: '仓库',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
componentProps:{
|
componentProps:{
|
||||||
mode:'multiple',
|
mode:'multiple',
|
||||||
|
|
|
||||||
|
|
@ -78,13 +78,13 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
function goToMyTeantPage(){
|
function goToMyTeantPage(){
|
||||||
//update-begin---author:wangshuai ---date:20230721 for:【QQYUN-5726】邀请加入租户加个按钮直接跳转过去------------
|
//update-begin---author:wangshuai ---date:20230721 for:【QQYUN-5726】邀请加入仓库加个按钮直接跳转过去------------
|
||||||
//如果请求参数包含我的租户,直接跳转过去
|
//如果请求参数包含我的仓库,直接跳转过去
|
||||||
let query = router.currentRoute.value.query;
|
let query = router.currentRoute.value.query;
|
||||||
if(query && query.page === 'tenantSetting'){
|
if(query && query.page === 'tenantSetting'){
|
||||||
activeKey.value = "2";
|
activeKey.value = "2";
|
||||||
}
|
}
|
||||||
//update-end---author:wangshuai ---date:20230721 for:【QQYUN-5726】邀请加入租户加个按钮直接跳转过去------------
|
//update-end---author:wangshuai ---date:20230721 for:【QQYUN-5726】邀请加入仓库加个按钮直接跳转过去------------
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue