no message

main
HUOJIN\92525 2025-10-31 18:03:10 +08:00
parent 692c969065
commit 0284e53b77
56 changed files with 494 additions and 502 deletions

View File

@ -162,12 +162,12 @@ export const passwordChange = (params) => defHttp.get({ url: Api.passwordChange,
* @description:
*/
export function thirdLogin(params, mode: ErrorMessageMode = 'modal') {
//==========begin 第三方登录/auth2登录需要传递租户id===========
//==========begin 第三方登录/auth2登录需要传递仓库id===========
let tenantId = "0";
if(!params.tenantId){
tenantId = params.tenantId;
}
//==========end 第三方登录/auth2登录需要传递租户id===========
//==========end 第三方登录/auth2登录需要传递仓库id===========
return defHttp.get<LoginResultModel>(
{
url: `${Api.thirdLogin}/${params.token}/${params.thirdType}/${tenantId}`,

View File

@ -60,6 +60,12 @@
text = text.substring(1, text.length - 1);
}
break;
case JInputTypeEnum.JINPUT_LEFT_LIKE:
text = text.substring(0, text.length - 1);
break;
case JInputTypeEnum.JINPUT_RIGHT_LIKE:
text = text.substring(0, text.length - 1);
break;
case JInputTypeEnum.JINPUT_QUERY_NE:
text = text.substring(1);
break;
@ -87,6 +93,12 @@
case JInputTypeEnum.JINPUT_QUERY_LIKE:
text = '*' + text + '*';
break;
case JInputTypeEnum.JINPUT_LEFT_LIKE:
text = '*' + text;
break;
case JInputTypeEnum.JINPUT_RIGHT_LIKE:
text = text + '*';
break;
case JInputTypeEnum.JINPUT_QUERY_NE:
text = '!' + text;
break;

View File

@ -1,65 +1,68 @@
<template>
<a-range-picker v-model:value="rangeValue" @change="handleChange" :show-time="datetime" :placeholder="placeholder" :valueFormat="valueFormat"/>
<a-range-picker v-model:value="rangeValue" @change="handleChange" :show-time="datetime" :placeholder="placeholder" :valueFormat="valueFormat" />
</template>
<script>
import { defineComponent, ref, watch, computed } from 'vue';
import { propTypes } from '/@/utils/propTypes';
import { Form } from 'ant-design-vue';
import { defineComponent, ref, watch, computed } from 'vue';
import { propTypes } from '/@/utils/propTypes';
import { Form } from 'ant-design-vue';
const placeholder = ['开始日期', '结束日期']
/**
* 用于范围查询
*/
export default defineComponent({
name: "JRangeDate",
props:{
value: propTypes.string.def(''),
datetime: propTypes.bool.def(false),
placeholder: propTypes.string.def(''),
const placeholder = ['开始日期', '结束日期'];
/**
* 用于范围查询
*/
export default defineComponent({
name: 'JRangeDate',
props: {
value: propTypes.string.def(''),
datetime: propTypes.bool.def(false),
placeholder: propTypes.string.def(''),
},
emits: ['change', 'update:value'],
setup(props, { emit }) {
const rangeValue = ref([]);
const formItemContext = Form.useInjectFormItemContext();
watch(
() => props.value,
(val) => {
if (val) {
rangeValue.value = val.split(',');
} else {
rangeValue.value = [];
}
},
emits:['change', 'update:value'],
setup(props, {emit}){
const rangeValue = ref([])
const formItemContext = Form.useInjectFormItemContext();
{ immediate: true }
);
watch(()=>props.value, (val)=>{
if(val){
rangeValue.value = val.split(',')
}else{
rangeValue.value = []
}
}, {immediate: true});
const valueFormat = computed(()=>{
if(props.datetime === true){
return 'YYYY-MM-DD HH:mm:ss'
}else{
return 'YYYY-MM-DD'
}
});
function handleChange(arr){
let str = ''
if(arr && arr.length>0){
// update-begin--author:liaozhiyang---date:20240710---for[issues/6368] rangeDateallowEmpty
str = arr.join(',')
// update-end--author:liaozhiyang---date:20240710---for[issues/6368] rangeDateallowEmpty
}
emit('change', str);
emit('update:value', str);
formItemContext.onFieldChange();
}
return {
rangeValue,
placeholder,
valueFormat,
handleChange
}
const valueFormat = computed(() => {
if (props.datetime === true) {
return 'YYYY-MM-DD HH:mm:ss';
} else {
return 'YYYY-MM-DD';
}
});
});
function handleChange(arr) {
let str = '';
if (arr && arr.length > 0) {
// update-begin--author:liaozhiyang---date:20240710---for[issues/6368] rangeDateallowEmpty
str = arr.join(',');
// update-end--author:liaozhiyang---date:20240710---for[issues/6368] rangeDateallowEmpty
}
emit('change', str);
emit('update:value', str);
formItemContext.onFieldChange();
}
return {
rangeValue,
placeholder,
valueFormat,
handleChange,
};
},
});
</script>
<style scoped>
</style>
<style scoped></style>

View File

@ -27,7 +27,7 @@ export const APP_LOCAL_CACHE_KEY = 'COMMON__LOCAL__KEY__';
// base global session key
export const APP_SESSION_CACHE_KEY = 'COMMON__SESSION__KEY__';
// 租户 key
// 仓库 key
export const TENANT_ID = 'TENANT_ID';
// login info key
export const LOGIN_INFO_KEY = 'LOGIN__INFO__';
@ -35,7 +35,7 @@ export const LOGIN_INFO_KEY = 'LOGIN__INFO__';
// 聊天UID key
export const CPTE_CHAT_UID = 'CPTE_CHAT_UID';
// 免登录租户id与系统分开避免重复
// 免登录仓库id与系统分开避免重复
export const OAUTH2_THIRD_LOGIN_TENANT_ID = 'THIRD_LOGIN_TENANT_ID';
// ai助手标识退出需要记录一下

View File

@ -4,6 +4,12 @@
export enum JInputTypeEnum {
//模糊
JINPUT_QUERY_LIKE = 'like',
//左模糊
JINPUT_LEFT_LIKE = 'left_like',
JINPUT_RIGHT_LIKE = 'right_like',
//非
JINPUT_QUERY_NE = 'ne',
//大于等于

View File

@ -41,7 +41,7 @@ export enum ConfigEnum {
TIMESTAMP = 'X-TIMESTAMP',
// Sign
Sign = 'X-Sign',
// 租户id
// 仓库id
TENANT_ID = 'X-Tenant-Id',
// 版本
VERSION = 'X-Version',

View File

@ -6,9 +6,9 @@
<template #label>
<a-tooltip placement="topLeft">
<template #title>
<span>您隶属于多租户请选择当前所属租户</span>
<span>您隶属于多仓库请选择当前所属仓库</span>
</template>
<a-avatar style="background-color: #87d068" :size="30"> 租户 </a-avatar>
<a-avatar style="background-color: #87d068" :size="30"> 仓库 </a-avatar>
</a-tooltip>
</template>
<!--部门下拉内容-->
@ -100,14 +100,14 @@
async function show() {
//
await loadDepartList();
//
//
await loadTenantList();
//
if (unref(isMultiTenant) && unref(isMultiDepart)) {
currTitle.value = '切换租户和部门';
currTitle.value = '切换仓库和部门';
} else if (unref(isMultiTenant)) {
currTitle.value =
unref(currentTenantName) && unref(currentTenantName).length > 0 ? `租户切换(当前租户 :${unref(currentTenantName)}` : props.title;
unref(currentTenantName) && unref(currentTenantName).length > 0 ? `仓库切换(当前仓库 :${unref(currentTenantName)}` : props.title;
} else if (unref(isMultiDepart)) {
currTitle.value =
unref(currentDepartName) && unref(currentDepartName).length > 0 ? `部门切换(当前部门 :${unref(currentDepartName)}` : props.title;
@ -132,7 +132,7 @@
isMultiDepart.value = true;
}
/**
*加载租户信息
*加载仓库信息
*/
async function loadTenantList() {
const result = await getUserTenants();
@ -165,8 +165,8 @@
userStore.setTenant(unref(tenantSelected));
}
createMessage.success('切换成功');
//
//
window.location.reload();
})
.catch((e) => {

View File

@ -166,18 +166,18 @@
});
/**
* 首页多租户部门弹窗逻辑
* 首页多仓库部门弹窗逻辑
*/
const loginSelectRef = ref();
function showLoginSelect() {
//update-begin---author:liusq Date:20220101 for----
//update-begin---author:liusq Date:20220101 for----
//
const loginInfo = toRaw(userStore.getLoginInfo) || {};
if (!!loginInfo.isLogin) {
loginSelectRef.value.show(loginInfo);
}
//update-end---author:liusq Date:20220101 for----
//update-end---author:liusq Date:20220101 for----
}
function loginSelectOk() {
@ -226,7 +226,7 @@
//update-begin---author:scott ---date:2022-09-30 for-----------
//
@prefix-cls: ~'@{namespace}-layout-header';
.ant-layout .@{prefix-cls} {
display: flex;
padding: 0 8px;
@ -234,14 +234,14 @@
height: @header-height;
// update-end--author:liaozhiyang---date:20240407---forQQYUN-8762
align-items: center;
.headerIntroductionClass {
margin-right: 4px;
margin-bottom: 2px;
border-bottom: 0px;
border-left: 0px;
}
&--light {
.headerIntroductionClass {
color: #000;

View File

@ -5,7 +5,7 @@ export default {
dropdownItemDoc: '官网',
dropdownItemLoginOut: '退出系统',
dropdownItemSwitchPassword: '密码修改',
dropdownItemSwitchDepart: '切换部门',
dropdownItemSwitchDepart: '切换仓库',
dropdownItemRefreshCache: '刷新缓存',
dropdownItemSwitchAccount: '账户设置',
dropdownItemSwitchDefaultHomePage: '切换首页',

View File

@ -75,12 +75,12 @@ export function createPermissionGuard(router: Router) {
} else if (to.path === LOGIN_PATH && isOAuth2AppEnv() && !token) {
//退出登录进入此逻辑
//如果进入的页面是login页面并且当前是OAuth2app环境并且token为空就进入OAuth2登录页面
//update-begin---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
//update-begin---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------
if(to.query.tenantId){
setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID,to.query.tenantId)
}
next({ path: OAUTH2_LOGIN_PAGE_PATH });
//update-end---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
//update-end---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------
return;
//update-end---author:wangshuai ---date:20220629 for[issues/I5BG1I]vue3不支持auth2登录------------
}

View File

@ -50,10 +50,10 @@ export const useUserStore = defineStore({
sessionTimeout: false,
// Last fetch time
lastUpdateTime: 0,
//租户id
//仓库id
tenantid: '',
// 分享租户ID
// 用于分享页面所属租户与当前用户登录租户不一致的情况
// 分享仓库ID
// 用于分享页面所属仓库与当前用户登录仓库不一致的情况
shareTenantId: null,
//登录返回信息
loginInfo: null,
@ -86,7 +86,7 @@ export const useUserStore = defineStore({
getTenant(): string | number {
return this.tenantid || getAuthCache<string | number>(TENANT_ID);
},
// 是否有分享租户id
// 是否有分享仓库id
hasShareTenantId(): boolean {
return this.shareTenantId != null && this.shareTenantId !== '';
},
@ -242,10 +242,10 @@ export const useUserStore = defineStore({
try {
const { goHome = true, mode, ...loginParams } = params;
const data = await phoneLoginApi(loginParams, mode);
//update-begin---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录在请求头中无法获取租户id---
//update-begin---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录在请求头中无法获取仓库id---
const { token , userInfo } = data;
this.setTenant(userInfo!.loginTenantId);
//update-end---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录在请求头中无法获取租户id---
//update-end---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录在请求头中无法获取仓库id---
// save token
this.setToken(token);
return this.afterLoginAction(goHome, data);
@ -321,7 +321,7 @@ export const useUserStore = defineStore({
if (openSso == 'true') {
await useSso().ssoLoginOut();
}
//update-begin---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
//update-begin---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------
//退出登录的时候需要用的应用id
if(isOAuth2AppEnv()){
let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
@ -339,7 +339,7 @@ export const useUserStore = defineStore({
// update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
}
//update-end---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
//update-end---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------
},
/**
*
@ -353,10 +353,10 @@ export const useUserStore = defineStore({
try {
const { goHome = true, mode, ...ThirdLoginParams } = params;
const data = await thirdLogin(ThirdLoginParams, mode);
//update-begin---author:wangshuai---date:2024-07-01---for:【issues/6652】开启租户数据隔离,接入钉钉后登录默认租户为0了---
//update-begin---author:wangshuai---date:2024-07-01---for:【issues/6652】开启仓库数据隔离,接入钉钉后登录默认仓库为0了---
const { token, userInfo } = data;
this.setTenant(userInfo?.loginTenantId);
//update-end---author:wangshuai---date:2024-07-01---for:【issues/6652】开启租户数据隔离,接入钉钉后登录默认租户为0了---
//update-end---author:wangshuai---date:2024-07-01---for:【issues/6652】开启仓库数据隔离,接入钉钉后登录默认仓库为0了---
// save token
this.setToken(token);
return this.afterLoginAction(goHome, data);

View File

@ -19,7 +19,7 @@ export function getLoginBackInfo() {
return getAuthCache(LOGIN_INFO_KEY);
}
/**
* id
* id
*/
export function getTenantId() {
return getAuthCache<string>(TENANT_ID);

View File

@ -101,10 +101,10 @@ export class Memory<T = any, V = any> {
const item = this.cache[key];
item.timeoutId && clearTimeout(item.timeoutId);
});
//update-begin---author:liusq Date:20220108 for不删除登录用户的租户id其他缓存信息都清除----
//update-begin---author:liusq Date:20220108 for不删除登录用户的仓库id其他缓存信息都清除----
this.cache = {
...omit(this.cache, [TOKEN_KEY, USER_INFO_KEY, ROLES_KEY, DB_DICT_DATA_KEY, TENANT_ID, LOGIN_INFO_KEY, PROJ_CFG_KEY]),
};
//update-end---author:liusq Date:20220108 for不删除登录用户的租户id其他缓存信息都清除----
//update-end---author:liusq Date:20220108 for不删除登录用户的仓库id其他缓存信息都清除----
}
}

View File

@ -485,22 +485,22 @@ export function replaceUserInfoByExpression(expression: string | any[]) {
}
/**
* 退
* 退
*
* @param tenantId
*/
export async function userExitChangeLoginTenantId(tenantId){
const userStore = useUserStoreWithOut();
//step 1 获取用户租户
//step 1 获取用户仓库
const url = '/sys/tenant/getCurrentUserTenant'
let currentTenantId = null;
const data = await defHttp.get({ url });
if(data && data.list){
let arr = data.list;
if(arr.length>0){
//step 2.判断当前id是否存在用户租户
//step 2.判断当前id是否存在用户仓库
let filterTenantId = arr.filter((item) => item.id == tenantId);
//存在说明不是退出的不是当前租户,还用用来的租户即可
//存在说明不是退出的不是当前仓库,还用用来的仓库即可
if(filterTenantId && filterTenantId.length>0){
currentTenantId = tenantId;
}else{
@ -512,16 +512,16 @@ export async function userExitChangeLoginTenantId(tenantId){
let loginTenantId = getTenantId();
userStore.setTenant(currentTenantId);
//update-begin---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退租户判断退出的租户ID与当前租户ID一致再刷新---
//租户为空,说明没有租户了,需要刷新页面。或者当前租户和退出的租户一致则需要刷新浏览器
//update-begin---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退仓库判断退出的仓库ID与当前仓库ID一致再刷新---
//仓库为空,说明没有仓库了,需要刷新页面。或者当前仓库和退出的仓库一致则需要刷新浏览器
if(!currentTenantId || tenantId == loginTenantId){
window.location.reload();
}
//update-end---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退租户判断退出的租户ID与当前租户ID一致再刷新---
//update-end---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退仓库判断退出的仓库ID与当前仓库ID一致再刷新---
}
/**
*
*
*
* @param title
*/
@ -530,7 +530,7 @@ export function tenantSaasMessage(title){
if(!tenantId){
Modal.confirm({
title:title,
content: '此菜单需要在多租户模式下使用,否则数据会出现混乱',
content: '此菜单需要在多仓库模式下使用,否则数据会出现混乱',
okText: '确认',
okType: 'danger',
// @ts-ignore

View File

@ -190,17 +190,17 @@ const transform: AxiosTransform = {
tenantId = 0;
}
// update-begin--author:sunjianlei---date:220230428---for【QQYUN-5279】修复分享的应用租户和当前登录租户不一致时提示404的问题
// update-begin--author:sunjianlei---date:220230428---for【QQYUN-5279】修复分享的应用仓库和当前登录仓库不一致时提示404的问题
const userStore = useUserStoreWithOut();
// 判断是否有临时租户id
// 判断是否有临时仓库id
if (userStore.hasShareTenantId && userStore.shareTenantId !== 0) {
// 临时租户id存在使用临时租户id
// 临时仓库id存在使用临时仓库id
tenantId = userStore.shareTenantId!;
}
// update-end--author:sunjianlei---date:220230428---for【QQYUN-5279】修复分享的应用租户和当前登录租户不一致时提示404的问题
// update-end--author:sunjianlei---date:220230428---for【QQYUN-5279】修复分享的应用仓库和当前登录仓库不一致时提示404的问题
config.headers[ConfigEnum.TENANT_ID] = tenantId;
//--update-end--author:liusq---date:20211105---for:将多租户id添加在请求接口 Header
//--update-end--author:liusq---date:20211105---for:将多仓库id添加在请求接口 Header
// ========================================================================================
// update-begin--author:sunjianlei---date:20220624--for: 添加低代码应用ID

View File

@ -1,8 +1,4 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
@ -21,16 +17,11 @@ export const columns: BasicColumn[] = [
dataIndex: 'description',
},
{
title: '创建日期',
title: '创建时间',
align: "center",
dataIndex: 'createTime'
dataIndex: 'createTime',
},
];
// 高级查询数据
export const superQuerySchema = {
areaCode: {title: '库区编码',order: 0,view: 'text', type: 'string',},
areaName: {title: '库区名称',order: 1,view: 'text', type: 'string',},
description: {title: '描述',order: 2,view: 'umeditor', type: 'string',},
createTime: {title: '创建日期',order: 4,view: 'datetime', type: 'string',},
};

View File

@ -4,26 +4,24 @@
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="areaCode">
<template #label><span title="库区编码">库区编码</span></template>
<JInput v-model:value="queryParam.areaCode"/>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="areaName">
<template #label><span title="库区名称">库区名称</span></template>
<JInput v-model:value="queryParam.areaName"/>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :lg="6">
<a-form-item name="createTime">
<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 />
</a-form-item>
</a-col>
</template>
<a-col :lg="6">
<a-form-item name="areaCode">
<template #label><span title="库区编码">库区编码</span></template>
<JInput v-model:value="queryParam.areaCode" :type="JInputTypeEnum.JINPUT_RIGHT_LIKE" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="areaName">
<template #label><span title="库区名称">库区名称</span></template>
<JInput v-model:value="queryParam.areaName" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="createTime">
<template #label><span title="创建日期">创建日期</span></template>
<JRangeDate v-model:value="queryParam.createTime" />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
@ -43,9 +41,11 @@
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<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: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>
<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>
<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">
<template #overlay>
<a-menu>
@ -55,19 +55,18 @@
</a-menu-item>
</a-menu>
</template>
<a-button v-auth="'base:base_area:deleteBatch'">
<a-button v-auth="'base:base_area:deleteBatch'"
>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
<!-- 高级查询 -->
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
<template v-if="column.dataIndex==='description'">
<template v-if="column.dataIndex === 'description'">
<!--富文本件字段回显插槽-->
<div v-html="text"></div>
</template>
@ -80,21 +79,19 @@
<script lang="ts" name="base-area" setup>
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 { columns, superQuerySchema } from './Area.data';
import { columns } from './Area.data';
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 { 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 { JInputTypeEnum } from '@/enums/cpteEnum';
const fieldPickers = reactive({
});
const fieldPickers = reactive({});
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
@ -107,56 +104,60 @@
title: '库区',
api: list,
columns,
canResize:true,
canResize: true,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: async (params) => {
for (let key in fieldPickers) {
if (queryParam[key] && fieldPickers[key]) {
queryParam[key] = getDateByPicker(queryParam[key], fieldPickers[key]);
//
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);
}
}
return Object.assign(params, queryParam);
for (let key in fieldPickers) {
if (newQueryParam[key] && fieldPickers[key]) {
newQueryParam[key] = getDateByPicker(newQueryParam[key], fieldPickers[key]);
}
}
return Object.assign(params, newQueryParam);
},
},
exportConfig: {
name: "库区",
name: '库区',
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
importConfig: {
url: getImportUrl,
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({
xs:24,
sm:4,
xl:6,
xxl:4
xs: 24,
sm: 4,
xl: 6,
xxl: 4,
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
//
const superQueryConfig = reactive(superQuerySchema);
/**
* 高级查询事件
*/
function handleSuperQuery(params) {
Object.keys(params).map((k) => {
queryParam[k] = params[k];
});
searchQuery();
}
/**
* 新增事件
*/
@ -164,7 +165,7 @@
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
@ -172,7 +173,7 @@
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
@ -180,28 +181,28 @@
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
@ -210,11 +211,11 @@
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'base:base_area:edit'
auth: 'base:base_area:edit',
},
];
}
/**
* 下拉操作栏
*/
@ -223,16 +224,17 @@
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
},
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
auth: 'base:base_area:delete'
}
]
auth: 'base:base_area:delete',
},
];
}
/**
@ -241,7 +243,7 @@
function searchQuery() {
reload();
}
/**
* 重置
*/
@ -251,35 +253,35 @@
//
reload();
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
.query-group-cust {
min-width: 100px !important;
}
.query-group-split-cust{
.query-group-split-cust {
width: 30px;
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;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}

View File

@ -2,28 +2,23 @@
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<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-col :span="12">
<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-form-item>
</a-col>
<a-col :span="12">
<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-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="描述" v-bind="validateInfos.description" id="AreaForm-description" name="description">
<j-editor v-model:value="formData.description" :autoFocus="false"/>
</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-col>
<a-col :span="24">
<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-form-item>
</a-col>
<a-col :span="24">
<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-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="描述" v-bind="validateInfos.description" id="PointForm-description" name="description">
<a-textarea v-model:value="formData.description" :rows="4" placeholder="请输入描述" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</template>
@ -32,29 +27,27 @@
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { ref, reactive, defineExpose, nextTick, defineProps, computed } from 'vue';
import { useMessage } from '/@/hooks/web/useMessage';
import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue';
import { getDateByPicker, getValueType } from '/@/utils';
import { saveOrUpdate } from '../Area.api';
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({})},
formBpm: { type: Boolean, default: true }
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true },
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
areaCode: '',
areaName: '',
description: '',
delFlag: '',
createTime: '',
areaCode: '',
areaName: '',
description: '',
delFlag: 0,
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
@ -62,29 +55,27 @@
const confirmLoading = ref<boolean>(false);
//
const validatorRules = reactive({
areaCode: [{ required: true, message: '请输入库区编码!'},],
areaName: [{ required: true, message: '请输入库区名称!'},],
delFlag: [{ required: true, message: '请输入删除状态!'},],
createTime: [{ required: true, message: '请输入创建日期!'},],
areaCode: [{ required: true, message: '请输入库区编码!' }],
areaName: [{ required: true, message: '请输入库区名称!' }],
delFlag: [{ required: true, message: '请输入删除状态!' }],
createTime: [{ required: true, message: '请输入创建日期!' }],
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const fieldPickers = reactive({
});
const fieldPickers = reactive({});
//
const disabled = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
const disabled = computed(() => {
if (props.formBpm === true) {
if (props.formData.disabled === false) {
return false;
}else{
} else {
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
@ -100,10 +91,10 @@
resetFields();
const tmpData = {};
Object.keys(formData).forEach((key) => {
if(record.hasOwnProperty(key)){
tmpData[key] = record[key]
if (record.hasOwnProperty(key)) {
tmpData[key] = record[key];
}
})
});
//
Object.assign(formData, tmpData);
});
@ -159,7 +150,6 @@
});
}
defineExpose({
add,
edit,

View File

@ -1,5 +1,5 @@
<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>
<template #footer>
<a-button @click="handleCancel"></a-button>
@ -25,25 +25,25 @@
* 新增
*/
function add() {
title.value = '新增';
title.value = '新增库区';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
title.value = disableSubmit.value ? '库区详情' : '编辑库区';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/

View File

@ -16,7 +16,7 @@ export const columns: BasicColumn[] = [
dataIndex: 'itemName'
},
{
title: '租户ID',
title: '仓库ID',
align: "center",
dataIndex: 'tenantId'
},
@ -26,5 +26,5 @@ export const columns: BasicColumn[] = [
export const superQuerySchema = {
itemCode: {title: '物料编码',order: 0,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',},
};

View File

@ -77,6 +77,7 @@
fixed: 'right',
},
beforeFetch: async (params) => {
console.log("params",params)
for (let key in fieldPickers) {
if (queryParam[key] && fieldPickers[key]) {
queryParam[key] = getDateByPicker(queryParam[key], fieldPickers[key]);
@ -127,7 +128,7 @@
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
@ -135,7 +136,7 @@
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
@ -143,28 +144,28 @@
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
@ -177,7 +178,7 @@
},
];
}
/**
* 下拉操作栏
*/
@ -204,7 +205,7 @@
function searchQuery() {
reload();
}
/**
* 重置
*/
@ -214,7 +215,7 @@
//
reload();
}

View File

@ -15,8 +15,8 @@
</a-form-item>
</a-col>
<a-col :span="24">
<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-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-form-item>
</a-col>
</a-row>
@ -44,8 +44,8 @@
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
itemCode: '',
itemName: '',
itemCode: '',
itemName: '',
tenantId: undefined,
});
const { createMessage } = useMessage();
@ -72,7 +72,7 @@
return props.formDisabled;
});
/**
* 新增
*/

View File

@ -751,7 +751,7 @@ export const schemas: FormSchema[] = [
label: '选中值',
colProps: { span: 12 },
},
{
field: 'userSelect2',
component: 'UserSelect',
@ -765,7 +765,7 @@ export const schemas: FormSchema[] = [
label: '选中值',
colProps: { span: 12 },
},
{
field: 'superQuery',
component: 'Input',
@ -843,7 +843,6 @@ export const schemas: FormSchema[] = [
label: '课程',
dynamicPropskey: 'options',
dynamicPropsVal: ({ model }) => {
let options;
if (model.sex == 1) {
return [
{ value: '0', label: 'java - 男' },
@ -906,7 +905,7 @@ export const schemas: FormSchema[] = [
value: '#{sys_multi_org_code}',
},
{
label: '登录用户租户',
label: '登录用户仓库',
value: '#{tenant_id}',
},
],
@ -952,5 +951,5 @@ export const schemas: FormSchema[] = [
label: '选中值',
colProps: { span: 12 },
},
];

View File

@ -1,25 +1,25 @@
<template>
<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-item v-if="isMultiTenant" name="tenantId" :validate-status="validate_status">
<!--label内容-->
<template #label>
<a-tooltip placement="topLeft">
<template #title>
<span>您隶属于多租户请选择登录租户</span>
<span>您隶属于多仓库请选择登录仓库</span>
</template>
<a-avatar style="background-color: #87d068" :size="30"> 租户 </a-avatar>
<a-avatar style="background-color: #87d068" :size="30"> 仓库 </a-avatar>
</a-tooltip>
</template>
<template #extra v-if="validate_status == 'error'">
<span style="color: #ed6f6f">请选择登录租户</span>
<span style="color: #ed6f6f">请选择登录仓库</span>
</template>
<!--租户下拉内容-->
<!--仓库下拉内容-->
<a-select
v-model:value="formState.tenantId"
@change="handleTenantChange"
placeholder="请选择登录租户"
placeholder="请选择登录仓库"
:class="{ 'valid-error': validate_status == 'error' }"
>
<template v-for="tenant in tenantList" :key="tenant.id">
@ -82,7 +82,7 @@
setup(props, { emit }) {
const userStore = useUserStore();
const { notification } = useMessage();
//
//
const isMultiTenant = ref(false);
const tenantList = ref([]);
const validate_status = ref('');
@ -96,7 +96,7 @@
const username = ref('');
//
const formRef = ref();
//
//
const formState: UnwrapRef<FormState> = reactive({
orgCode: undefined,
tenantId: null,
@ -116,16 +116,16 @@
//
const currTitle = computed(() => {
if (unref(isMultiDepart) && unref(isMultiTenant)) {
return '请选择租户和部门';
return '请选择仓库和部门';
} else if (unref(isMultiDepart) && !unref(isMultiTenant)) {
return '请选择部门';
} else if (!unref(isMultiDepart) && unref(isMultiTenant)) {
return '请选择租户';
return '请选择仓库';
}
});
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' }],
});
@ -137,12 +137,12 @@
* 处理部门情况
*/
function bizDepart(loginResult) {
//ID
//ID
if(loginResult.userInfo?.orgCode && loginResult.userInfo?.orgCode!==''){
isMultiDepart.value = false;
return;
}
let multi_depart = loginResult.multi_depart;
//0: 1: 2:
if (multi_depart == 0) {
@ -161,15 +161,15 @@
}
/**
* 处理租户情况
* 处理仓库情况
*/
function bizTenantList(loginResult) {
//ID
//ID
if(loginResult.userInfo?.loginTenantId && loginResult.userInfo?.loginTenantId!==0){
isMultiTenant.value = false;
return;
}
let tenantArr = loginResult.tenantList;
if (Array.isArray(tenantArr)) {
if (tenantArr.length === 0) {
@ -187,7 +187,7 @@
}
/**
* 确认选中的租户和部门信息
* 确认选中的仓库和部门信息
*/
function handleSubmit() {
if (unref(isMultiTenant) && !formState.tenantId) {

View File

@ -188,12 +188,12 @@ export function isOAuth2DingAppEnv() {
export function sysOAuth2Login(source) {
let url = `${window._CONFIG['domianURL']}/sys/thirdLogin/oauth2/${source}/login`;
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);
if(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;
}
//update-end---author:wangshuai ---date:20220629 for[issues/I5BG1I]vue3不支持auth2登录------------

View File

@ -53,7 +53,7 @@ export const thirdAppFormSchema: FormSchema[] = [
},
defaultValue: 1
},{
label: '租户id',
label: '仓库id',
field: 'tenantId',
component: 'Input',
show: false,

View File

@ -143,7 +143,7 @@
}
}
let text: string = '';
//
//
if (userList && userList.length > 0) {
for (const item of userList) {
params.push({ wechatUserId: item.wechatUserId, wechatDepartId: item.wechatDepartId, wechatRealName: item.wechatRealName });

View File

@ -49,7 +49,7 @@
const loginTenantName = ref<string>('');
/**
* 获取租户名称
* 获取仓库名称
*/
getTenantName();
@ -78,7 +78,7 @@
onMounted(() => {
//
tenantSaasMessage('租户部门');
tenantSaasMessage('仓库部门');
});
</script>

View File

@ -25,7 +25,7 @@
</template>
<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;"
>当前登录租户: <span class="tenant-name">{{ loginTenantName }}</span>
>当前登录仓库: <span class="tenant-name">{{ loginTenantName }}</span>
</div>
</div>
<a-alert type="info" show-icon class="alert" style="margin-bottom: 8px">
@ -121,9 +121,9 @@
const { createMessage } = useMessage();
const { handleImportXls, handleExportXls } = useMethods();
const props = defineProps({
//
//
isTenantDepart: { default: false, type: Boolean },
//
//
loginTenantName: { default: "", type: String },
})

View File

@ -439,7 +439,7 @@ export const dataRuleFormSchema: FormSchema[] = [
value: '#{sys_multi_org_code}',
},
{
label: '登录用户租户',
label: '登录用户仓库',
value: '#{tenant_id}',
},
],

View File

@ -41,7 +41,7 @@
//
const { onExportXls, onImportXls, tableContext } = useListPage({
tableProps: {
title: '租户职务列表',
title: '仓库职务列表',
api: getPositionList,
columns: columns,
formConfig: {
@ -60,7 +60,7 @@
},
},
exportConfig: {
name: '租户职务列表',
name: '仓库职务列表',
url: getExportUrl,
},
importConfig: {
@ -128,6 +128,6 @@
onMounted(() => {
//
tenantSaasMessage('租户职务');
tenantSaasMessage('仓库职务');
});
</script>

View File

@ -16,7 +16,7 @@
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</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 #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
@ -42,18 +42,18 @@
import { useListPage } from '/@/hooks/system/useListPage';
import { getLoginTenantName } from "/@/views/system/tenant/tenant.api";
import { tenantSaasMessage } from "@/utils/common/compUtils";
const showFooter = ref(true);
const [roleUserDrawer, { openDrawer: openRoleUserDrawer }] = useDrawer();
const [registerDrawer, { openDrawer }] = useDrawer();
const [registerModal, { openModal }] = useModal();
const [registerDesc, { openDrawer: openRoleDesc }] = useDrawer();
//
const { prefixCls, tableContext, onImportXls, onExportXls } = useListPage({
designScope: 'role-template',
tableProps: {
title: '租户角色列表',
title: '仓库角色列表',
api: listByTenant,
columns: columns,
formConfig: {
@ -163,15 +163,15 @@
}
const loginTenantName = ref<string>('');
getTenantName();
async function getTenantName(){
loginTenantName.value = await getLoginTenantName();
}
onMounted(()=>{
tenantSaasMessage('租户角色')
tenantSaasMessage('仓库角色')
})
</script>

View File

@ -45,7 +45,7 @@
const props = defineProps({
disableUserEdit: {type:Boolean,default:false}
})
const checkedKeys = ref<Array<string | number>>([]);
const roleId = ref('');
const [registerBaseDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
@ -62,9 +62,9 @@
api: userList,
columns: userColumns,
formConfig: {
//update-begin---author:wangshuai ---date:20230703 forQQYUN-56853,
//update-begin---author:wangshuai ---date:20230703 forQQYUN-56853,
labelWidth: 60,
//update-end---author:wangshuai ---date:20230703 forQQYUN-56853,
//update-end---author:wangshuai ---date:20230703 forQQYUN-56853,
schemas: searchUserFormSchema,
autoSubmitOnEnter: true,
},
@ -192,9 +192,9 @@
</script>
<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){
text-align: left;
}
/*update-end---author:wangshuai ---date:20230703 for【QQYUN-5685】3、租户角色下,查询居左显示*/
/*update-end---author:wangshuai ---date:20230703 for【QQYUN-5685】3、仓库角色下,查询居左显示*/
</style>

View File

@ -40,7 +40,7 @@ export const getImportUrl = Api.importExcel;
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
*
*
* @param params
*/
export const listByTenant = (params) => defHttp.get({ url: Api.listByTenant, params });

View File

@ -14,8 +14,8 @@
</a-button>
<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>
<div style="margin-left: 10px;margin-top: 5px"> 当前登录租户: <span class="tenant-name">{{loginTenantName}}</span> </div>
<a-tooltip title="租户用户更多操作说明">
<div style="margin-left: 10px;margin-top: 5px"> 当前登录仓库: <span class="tenant-name">{{loginTenantName}}</span> </div>
<a-tooltip title="仓库用户更多操作说明">
<a-icon type="question-circle" style="margin-left: 8px; cursor: pointer " @click="tipShow = true"/>
</a-tooltip>
</template>
@ -34,12 +34,12 @@
<TenantPackAllotModal @register="registerPackAllotModal"></TenantPackAllotModal>
<!-- 邀请人弹窗 -->
<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">
<li>移除将用户从当前租户中移除</li>
<li>移除将用户从当前仓库中移除</li>
<li>删除仅可删除当天创建的用户删除后可在系统用户回收站恢复</li>
<li>离职租户创建者可进行离职操作离职员工可在离职人员列表查看</li>
<li>交接租户创建者可进行租户交接交接后员工信息可在离职人员列表查看</li>
<li>离职仓库创建者可进行离职操作离职员工可在离职人员列表查看</li>
<li>交接仓库创建者可进行仓库交接交接后员工信息可在离职人员列表查看</li>
</ul>
<div style="height: 10px"></div>
</a-modal>
@ -91,7 +91,7 @@
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
designScope: 'user-list',
tableProps: {
title: '租户用户列表',
title: '仓库用户列表',
api: getUserTenantPageList,
columns: userTenantColumns,
size: 'small',
@ -226,7 +226,7 @@
}
/**
* 更新用户租户状态
* 更新用户仓库状态
* @param id
* @param status
*/
@ -242,8 +242,8 @@
});
}
//============================================ ============================================
//id
//============================================ ============================================
//id
const tenantId = ref<string>('');
//
const excludeUserIdList = ref<any>([]);
@ -252,7 +252,7 @@
//
const [registerSelUserModal, { openModal: userOpenModal }] = useModal();
const handOverUserName = ref<string>('');
/**
* 人员交接
*/
@ -288,10 +288,10 @@
})
}
}
//============================================ ============================================
//============================================ ============================================
//update-begin---author:wangshuai ---date:20230710 forQQYUN-57234------------
//update-begin---author:wangshuai ---date:20230710 forQQYUN-57234------------
const loginTenantName = ref<string>('');
getTenantName();
@ -299,12 +299,12 @@
async function getTenantName(){
loginTenantName.value = await getLoginTenantName();
}
//update-end---author:wangshuai ---date:20230710 forQQYUN-57234------------
//update-end---author:wangshuai ---date:20230710 forQQYUN-57234------------
/**
* 分配套餐
*
*
* @param record
*/
function handleAllotPack(record) {
@ -321,12 +321,12 @@
}
/**
* 邀请用户加入租户
* 邀请用户加入仓库
*/
function handleInvitation() {
userOpenModal(true, {});
}
/**
* 用户选择回调事件
* @param username
@ -352,10 +352,10 @@
async function handleLeave(id) {
await leaveTenant({ userIds: id, tenantId: getTenantId() }, reload)
}
onMounted(()=>{
tenantSaasMessage('租户用户')
tenantSaasMessage('仓库用户')
})
</script>

View File

@ -1,4 +1,4 @@
<!--邀请用户加入租户弹窗-->
<!--邀请用户加入仓库弹窗-->
<template>
<BasicModal @register="registerModal" :width="500" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm" />
@ -65,7 +65,7 @@ export default defineComponent({
});
/**
* 提交返回给租户list页面
* 提交返回给仓库list页面
*/
async function handleSubmit() {
let values = await validate();

View File

@ -38,7 +38,7 @@
}
});
//
const title = computed(() => (!unref(isUpdate) ? '新增租户' : '编辑租户'));
const title = computed(() => (!unref(isUpdate) ? '新增仓库' : '编辑仓库'));
//
async function handleSubmit(v) {
try {

View File

@ -41,7 +41,7 @@
emits: ['cancel'],
setup(props, { emit }) {
const [registerUserModal, { openModal: openUserModal, closeModal: closeUserModal }] = useModal();
//id
//id
const getTenantId = computed(() => {
return tenantPackData.tenantId;
});

View File

@ -17,22 +17,22 @@
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
<a-button
<!-- <a-button
preIcon="ant-design:user-add-outlined"
type="primary"
@click="handleInvitation"
style="margin-right: 5px"
:disabled="selectedRowKeys.length === 0"
>邀请用户加入</a-button
>
<a-button
>-->
<!-- <a-button
preIcon="ant-design:sliders-outlined"
type="primary"
@click="handlePack"
style="margin-right: 5px"
:disabled="selectedRowKeys.length === 0"
>套餐管理</a-button
>
>-->
<a-button type="primary" @click="recycleBinClick" preIcon="ant-design:hdd-outlined">回收站</a-button>
</template>
<template #action="{ record }">
@ -44,7 +44,7 @@
<TenantUserModal @register="registerTenUserModal" />
<!-- 产品包 -->
<TenantPackList @register="registerPackModal" />
<!-- 租户回收站 -->
<!-- 仓库回收站 -->
<TenantRecycleBinModal @register="registerRecycleBinModal" @success="reload" />
</div>
</template>
@ -73,7 +73,7 @@
const { prefixCls, tableContext } = useListPage({
designScope: 'tenant-template',
tableProps: {
title: '租户列表',
title: '仓库列表',
api: getTenantList,
columns: columns,
formConfig: {
@ -147,7 +147,7 @@
}
/**
* 邀请用户加入租户
* 邀请用户加入仓库
*/
function handleInvitation() {
userOpenModal(true, {});
@ -160,14 +160,14 @@
* @param userSelectId
*/
async function handleInviteUserOk(phone, username) {
//update-begin---author:wangshuai ---date:20230314 forQQYUN-4605------------
//update-begin---author:wangshuai ---date:20230314 forQQYUN-4605------------
if (phone) {
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), phone: phone });
}
if (username) {
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), username: username });
}
//update-end---author:wangshuai ---date:20230314 forQQYUN-4605------------
//update-end---author:wangshuai ---date:20230314 forQQYUN-4605------------
}
/**
@ -190,7 +190,7 @@
}
packModal(true, {
tenantId: unref(selectedRowKeys.value.join(',')),
//
//
showPackAddAndEdit: true
});
}

View File

@ -1,4 +1,4 @@
<!--我的租户详情-->
<!--我的仓库详情-->
<template>
<div class="message-set-container">
<div class="message-set-box">
@ -78,7 +78,7 @@
let tradeOptions: any[] = [];
/**
* 初始化租户信息
* 初始化仓库信息
*/
async function initTenant() {
let result = await getTenantById({ id: getTenantId() });
@ -156,7 +156,7 @@
onMounted(() => {
//
tenantSaasMessage('我的租户');
tenantSaasMessage('我的仓库');
initTenant();
});
</script>

View File

@ -56,7 +56,7 @@
const { prefixCls, tableContext } = useListPage({
designScope: 'tenant-template',
tableProps: {
title: '租户列表',
title: '仓库列表',
api: getTenantPageListByUserId,
columns: columns,
formConfig: {
@ -76,14 +76,14 @@
});
const [registerTable, { reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
//
//
function onFetchSuccess(data) {
let items = data.items;
console.log('items:', items);
// ID
// ID
let loginTenantId = getTenantId();
console.log('loginTenantId:', loginTenantId);
// ID
// ID
if (items && items.length > 0 && loginTenantId) {
for (let i = 0; i < items.length; i++) {
if (items[i].id == loginTenantId) {
@ -110,7 +110,7 @@
}
/**
* 邀请用户加入租户
* 邀请用户加入仓库
*/
function handleInvitation() {
userOpenModal(true, {});
@ -151,7 +151,7 @@
}
packModal(true, {
tenantId: unref(selectedRowKeys.value.join(',')),
//
//
showPackAddAndEdit: false
});
}
@ -165,6 +165,6 @@
onMounted(()=>{
//
tenantSaasMessage('我的租户')
tenantSaasMessage('我的仓库')
})
</script>

View File

@ -1,11 +1,11 @@
<!-- 当前租户下套餐 -->
<!-- 当前仓库下套餐 -->
<template>
<div style="display: flex; width: 100%">
<div :style="leftStyle">
<BasicTable @register="registerTable">
<template #tableTitle>
<div style="margin-left: 10px; margin-top: 5px"
>当前登录租户: <span class="tenant-name">{{ loginTenantName }}</span>
>当前登录仓库: <span class="tenant-name">{{ loginTenantName }}</span>
</div>
</template>
<!--操作栏-->
@ -81,12 +81,12 @@
},
});
const [registerTable, { reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
//
//
const loginTenantName = ref<string>('');
const { createMessage } = useMessage();
/**
* 获取租户名称
* 获取仓库名称
*/
getTenantName();

View File

@ -67,7 +67,7 @@
{
label: '删除',
popConfirm: {
title: '是否确认删除租户套餐包',
title: '是否确认删除仓库套餐包',
confirm: handleDelete.bind(null, record.id),
},
},
@ -76,7 +76,7 @@
/**
* 编辑套餐包
*/
*/
function handleAdd() {
packModal(true, {
isUpdate: false,
@ -84,11 +84,11 @@
showFooter: true
});
}
/**
* 删除默认套餐包
*/
*/
async function handleDelete(id) {
await deleteTenantPack({ ids: id }, handleSuccess);
}
@ -96,7 +96,7 @@
* 编辑
*/
function handleEdit(record) {
packModal(true, {
packModal(true, {
isUpdate: true,
record: record,
packType:'default',
@ -129,8 +129,8 @@
*/
async function handlePackBatch() {
Modal.confirm({
title: '删除租户套餐包',
content: '是否删除租户套餐包',
title: '删除仓库套餐包',
content: '是否删除仓库套餐包',
okText: '确认',
cancelText: '取消',
onOk: async () => {

View File

@ -80,7 +80,7 @@
success();
});
//
const title = '租户个性化套餐包';
const title = '仓库个性化套餐包';
//
async function handleSubmit(v) {
@ -125,7 +125,7 @@
//,()
const packCode = reactive<any>(['superAdmin','accountAdmin','appAdmin']);
const { createMessage } = useMessage();
/**
* 删除套餐包
* @param 删除
@ -166,8 +166,8 @@
}
}
Modal.confirm({
title: '删除租户套餐包',
content: '是否删除租户套餐包',
title: '删除仓库套餐包',
content: '是否删除仓库套餐包',
okText: '确认',
cancelText: '取消',
onOk: async () => {
@ -224,7 +224,7 @@
{
label: '删除',
popConfirm: {
title: '是否确认删除租户套餐包',
title: '是否确认删除仓库套餐包',
confirm: handleDelete.bind(null, record),
},
},

View File

@ -18,7 +18,7 @@
schemas: packMenuFormSchema,
showActionButtonGroup: false,
});
//
//
const tenantId = ref<number>();
//
const packType = ref<number>();
@ -43,11 +43,11 @@
//update-end---author:wangshuai ---date:20230705 forQQYUN-56852 ------------
});
//
const title = computed(() => (unref(isUpdate) ? '编辑 租户套餐' : '新增 租户套餐'));
const title = computed(() => (unref(isUpdate) ? '编辑 仓库套餐' : '新增 仓库套餐'));
//
async function handleSubmit(v) {
const values = await validate();
setModalProps({ confirmLoading: true });
values.packType = unref(packType);
if(values.packType === 'custom'){

View File

@ -38,11 +38,11 @@
name: 'TenantPackUserModal',
components: { BasicModal, BasicTable, TableAction, TenantUserSelectModal },
setup() {
//id
//id
const getTenantId = computed(()=>{
return tenantPackData.tenantId;
})
//
const tenantPackData = reactive<any>({});
//

View File

@ -25,18 +25,18 @@ enum Api {
queryTenantPackUserList = '/sys/tenant/queryTenantPackUserList',
deleteTenantPackUser = '/sys/tenant/deleteTenantPackUser',
addTenantPackUser = '/sys/tenant/addTenantPackUser',
//获取用户租户列表
//获取用户仓库列表
getTenantPageListByUserId = '/sys/tenant/getTenantPageListByUserId',
//新增、编辑用户租户
//新增、编辑用户仓库
saveUser = '/sys/user/addTenantUser',
editUser = '/sys/user/editTenantUser',
//根据租户id和用户获取用户的产品包列表和当前用户下的产品包id
//根据仓库id和用户获取用户的产品包列表和当前用户下的产品包id
listPackByTenantUserId = '/sys/tenant/listPackByTenantUserId',
}
/**
*
*
* @param params
*/
export const getTenantList = (params) => {
@ -44,7 +44,7 @@ export const getTenantList = (params) => {
};
/**
*
*
* @param params
*/
export const saveOrUpdateTenant = (params, isUpdate) => {
@ -53,7 +53,7 @@ export const saveOrUpdateTenant = (params, isUpdate) => {
};
/**
*
*
* @param params
*/
export const getTenantById = (params) => {
@ -61,7 +61,7 @@ export const getTenantById = (params) => {
};
/**
*
*
* @param params
*/
export const deleteTenant = (params, handleSuccess) => {
@ -71,7 +71,7 @@ export const deleteTenant = (params, handleSuccess) => {
};
/**
*
*
* @param params
*/
export const batchDeleteTenant = (params, handleSuccess) => {
@ -94,13 +94,13 @@ export const batchDeleteTenant = (params, handleSuccess) => {
export const getUserTenants = (params?) => defHttp.get({ url: Api.getCurrentUserTenants, params });
/**
*
*
* @param params
*/
export const invitationUserJoin = (params) => defHttp.put({ url: Api.invitationUserJoin, params }, { joinParamsToUrl: true });
/**
* id
* id
* @param params
*/
export const getTenantUserList = (params) => {
@ -108,13 +108,13 @@ export const getTenantUserList = (params) => {
};
/**
*
*
* @param params
*/
export const leaveTenant = (params, handleSuccess) => {
Modal.confirm({
title: '请离',
content: '是否将此用户请离当前租户',
content: '是否将此用户请离当前仓库',
okText: '确认',
cancelText: '取消',
onOk: () => {
@ -171,7 +171,7 @@ export const syncDefaultTenantPack = (params, handleSuccess) => {
};
/**
*
*
* @param params
*/
export const recycleBinPageList = (params) => {
@ -179,7 +179,7 @@ export const recycleBinPageList = (params) => {
};
/**
*
*
* @param params
*/
export const deleteLogicDeleted = (params,handleSuccess) => {
@ -191,7 +191,7 @@ export const deleteLogicDeleted = (params,handleSuccess) => {
};
/**
*
*
* @param params
*/
export const revertTenantLogic = (params,handleSuccess) => {
@ -201,7 +201,7 @@ export const revertTenantLogic = (params,handleSuccess) => {
};
/**
*
*
* @param params
*/
export const queryTenantPackUserList = (params) => {
@ -225,7 +225,7 @@ export const addTenantPackUser = (params)=>{
}
/**
*
*
* @param params
*/
export const getTenantPageListByUserId = (params) => {
@ -234,7 +234,7 @@ export const getTenantPageListByUserId = (params) => {
/**
*
*
*/
export async function getLoginTenantName() {
let tenantId = getTenantId();
@ -256,8 +256,8 @@ export const saveOrUpdateTenantUser = (params, isUpdate) => {
return defHttp.post({ url: url, params },{ joinParamsToUrl: true });
};
/**
* idid
*
* idid
*
* @param params
*/
export const listPackByTenantUserId = (params) => {

View File

@ -1,21 +1,21 @@
import { BasicColumn, FormSchema } from '/@/components/Table';
import { getAutoScrollContainer } from '/@/utils/common/compUtils';
import { render } from "/@/utils/common/renderUtils";
import { rules } from "/@/utils/helper/validator";
export const columns: BasicColumn[] = [
{
title: '租户名称',
title: '仓库名称',
dataIndex: 'name',
width: 200,
align: 'left',
},
{
title: '租户编号(ID)',
title: '仓库编号',
dataIndex: 'id',
width: 180,
},{
title: '组织LOGO',
},
{
title: '仓库LOGO',
dataIndex: 'companyLogo',
width: 100,
customRender: ({ text }) => {
@ -25,11 +25,6 @@ export const columns: BasicColumn[] = [
return render.renderImage({text});
},
},
{
dataIndex: 'trade_dictText',
title: '所属行业',
width: 150
},
{
dataIndex: 'companySize_dictText',
title: '公司规模',
@ -51,7 +46,7 @@ export const columns: BasicColumn[] = [
// width: 150
// },
{
dataIndex: 'createBy_dictText',
dataIndex: 'createBy',
title: '创建者(拥有)',
width: 150
},
@ -77,7 +72,7 @@ export const columns: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [
{
field: 'name',
label: '租户名称',
label: '仓库名称',
component: 'Input',
colProps: { span: 8 },
},
@ -109,13 +104,13 @@ export const searchFormSchema: FormSchema[] = [
export const formSchema: FormSchema[] = [
{
field: 'name',
label: '租户名称',
label: '仓库名称',
component: 'Input',
required: true,
},
{
field: 'id',
label: '租户编号(ID)',
label: '仓库编号(ID)',
component: 'InputNumber',
required: true,
ifShow: ({ values }) => {
@ -124,7 +119,7 @@ export const formSchema: FormSchema[] = [
},
{
field: 'companyLogo',
label: '组织LOGO',
label: '仓库LOGO',
component: 'JImageUpload',
componentProps:{
text:'logo'
@ -422,8 +417,8 @@ export const packMenuFormSchema: FormSchema[] = [
unCheckedChildren: '否',
},
defaultValue: "1",
helpMessage: "默认会自动分配给用户,个性高级套餐,需要租户管理员手工分配人员(拥有更灵活性权限控制)"
},
helpMessage: "默认会自动分配给用户,个性高级套餐,需要仓库管理员手工分配人员(拥有更灵活性权限控制)"
},
{
field: 'status',
label: '开启状态',
@ -447,7 +442,7 @@ export const packMenuFormSchema: FormSchema[] = [
label: '产品包编码',
component: 'Input',
show: false
},
},
{
field: 'packType',
label: '产品包类型',
@ -459,18 +454,18 @@ export const packMenuFormSchema: FormSchema[] = [
//回收站列表
export const recycleColumns : BasicColumn[] = [
{
title: '租户名称',
title: '仓库名称',
dataIndex: 'name',
width: 100,
align: 'left',
},
{
title: '租户编号(ID)',
title: '仓库编号(ID)',
dataIndex: 'id',
width: 100,
},
{
title: '组织LOGO',
title: '仓库LOGO',
dataIndex: 'companyLogo',
width: 100,
customRender: ({ text }) => {
@ -487,11 +482,11 @@ export const recycleColumns : BasicColumn[] = [
}
]
//租户回收站搜索表单
//仓库回收站搜索表单
export const searchRecycleFormSchema : FormSchema[] = [
{
field: 'name',
label: '租户名称',
label: '仓库名称',
component: 'Input',
},
{
@ -525,7 +520,7 @@ export const tenantPackUserColumns: BasicColumn[] = [
]
/**
*
*
*/
export const tenantUserSchema: FormSchema[] = [
{ field: 'id', label: 'id', component: 'Input', show: false },
@ -580,15 +575,15 @@ export const tenantUserSchema: FormSchema[] = [
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 },
];
// 分配用户套餐
export const packUserAllotSchemas: FormSchema[] = [
{
field: 'userId',
label: '用户id',
{
field: 'userId',
label: '用户id',
component: 'Input',
show: false
},
@ -606,4 +601,4 @@ export const packUserAllotSchemas: FormSchema[] = [
component: 'Select',
slot: 'packId'
}
];
];

View File

@ -43,11 +43,11 @@
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
rowId.value = data.record.id;
//
//
/* if (data.record.relTenantIds && !Array.isArray(data.record.relTenantIds)) {
data.record.relTenantIds = data.record.relTenantIds.split(',');
} else {
//issues/I56C5I
//issues/I56C5I
//data.record.relTenantIds = [];
}*/
@ -108,27 +108,27 @@
{
field: 'selectedroles',
show: !data?.departDisabled,
//update-begin---author:wangshuai ---date:20230424 forissues/4844------------
//
//update-begin---author:wangshuai ---date:20230424 forissues/4844------------
//
componentProps:{
api: data.tenantSaas?getAllRolesList:getAllRolesListNoByTenant
}
//update-end---author:wangshuai ---date:20230424 forissues/4844------------
//update-end---author:wangshuai ---date:20230424 forissues/4844------------
},
//update-begin---author:wangshuai ---date:20230522 forissues/4935------------
//update-begin---author:wangshuai ---date:20230522 forissues/4935------------
{
field: 'relTenantIds',
componentProps:{
disabled: !!data.tenantSaas,
},
},
//update-end---author:wangshuai ---date:20230522 forissues/4935------------
//update-end---author:wangshuai ---date:20230522 forissues/4935------------
]);
//update-begin---author:wangshuai ---date:20230522 forissues/4935------------
//update-begin---author:wangshuai ---date:20230522 forissues/4935------------
if(!unref(isUpdate) && data.tenantSaas){
await setFieldsValue({ relTenantIds: getTenantId().toString() })
}
//update-end---author:wangshuai ---date:20230522 forissues/4935------------
//update-end---author:wangshuai ---date:20230522 forissues/4935------------
//
if (typeof data.record === 'object') {
setFieldsValue({

View File

@ -39,13 +39,13 @@ export const getExportUrl = Api.exportXls;
*/
export const getImportUrl = Api.importExcel;
/**
* ()
* ()
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
* ()
* ()
* @param params
*/
export const listNoCareTenant = (params) => defHttp.get({ url: Api.listNoCareTenant, params });
@ -127,17 +127,17 @@ export const duplicateCheckDelay = (params) => {
});
};
/**
*
*
* @param params
*/
export const getAllRolesList = (params) => defHttp.get({ url: Api.allRolesList, params });
/**
*
*
* @param params
*/
export const getAllRolesListNoByTenant = (params) => defHttp.get({ url: Api.allRolesListNoByTenant, params });
/**
*
*
*/
export const getAllTenantList = (params) => defHttp.get({ url: Api.allTenantList, params });
/**
@ -221,7 +221,7 @@ export const getUserTenantPageList = (params) => {
};
/**
*
*
* @param params
*/
export const updateUserTenantStatus = (params) => {

View File

@ -288,7 +288,7 @@ export const formSchema: FormSchema[] = [
},
},
{
label: '租户',
label: '仓库',
field: 'relTenantIds',
component: 'JSearchSelect',
componentProps: {
@ -424,7 +424,7 @@ export const formPasswordSchema: FormSchema[] = [
//租户用户列表
//仓库用户列表
export const userTenantColumns: BasicColumn[] = [
{
title: '用户账号',
@ -468,7 +468,7 @@ export const userTenantColumns: BasicColumn[] = [
},
];
//用户租户搜索表单
//用户仓库搜索表单
export const userTenantFormSchema: FormSchema[] = [
{
label: '账号',

View File

@ -68,7 +68,7 @@
<div class="font-size-13 flex">
<span class="gray-75 item-label">签名</span>
<a-upload
accept="jpg,jpeg,png"
accept="jpg,jpeg,png"
:max-count="1"
:multiple="false"
name = "file"
@ -126,7 +126,7 @@ import { getToken } from "@/utils/auth";
import { uploadUrl } from "@/api/common/api";
import { UploadOutlined } from "@ant-design/icons-vue";
//TODO
//TODO
const sexOption = getDictItemsByCode("sex") || [{text:'男',value:'1'},{text:'女',value:'2'}];
const { createMessage } = useMessage();
const userStore = useUserStore();
@ -294,7 +294,7 @@ function getDiffDay(date) {
/**
* 上传图片之前进行验证
*
*
* @param file
*/
function beforeUpload({ file }) {

View File

@ -65,11 +65,11 @@
class="font-color333 flex-center margin-right40 font-size13 pointer"
>
<Icon icon="ant-design:edit-outlined" class="footer-icon" />
<span>查看租户名片</span>
<span>查看仓库名片</span>
</span>
<span v-else class="font-color9e flex-center margin-right40 font-size13">
<Icon icon="ant-design:edit-outlined" class="footer-icon" />
<span>查看租户名片</span>
<span>查看仓库名片</span>
</span>
<span
v-if="item.userTenantStatus !== '3'"
@ -77,11 +77,11 @@
class="font-color333 flex-center margin-right40 font-size13 pointer"
>
<Icon icon="ant-design:export-outlined" class="footer-icon" />
<span>退出租户</span>
<span>退出仓库</span>
</span>
<span v-else class="font-color9e flex-center margin-right40 font-size13">
<Icon icon="ant-design:export-outlined" class="footer-icon" />
<span>退出租户</span>
<span>退出仓库</span>
</span>
</div>
</div>
@ -108,19 +108,19 @@
</div>
</a-modal>
<!-- 退出租户 -->
<!-- 退出仓库 -->
<a-modal v-model:open="cancelVisible" width="800" destroy-on-close>
<template #title>
<div class="cancellation">
<Icon icon="ant-design:warning-outlined" style="font-size: 20px;color: red"/>
退出租户 {{myTenantInfo.name}}
退出仓库 {{myTenantInfo.name}}
</div>
</template>
<a-form :model="formCancelState" ref="cancelTenantRef">
<a-form-item name="tenantName">
<a-row :span="24" style="padding: 20px 20px 0;font-size: 13px">
<a-col :span="24">
请输入租户名称
请输入仓库名称
</a-col>
<a-col :span="24" style="margin-top: 10px">
<a-input v-model:value="formCancelState.tenantName" @change="tenantNameChange"/>
@ -162,7 +162,7 @@
</a-row>
</div>
</a-modal>
<!-- begin 我的受邀信息 -->
<a-modal title="我的受邀信息" v-model:open="invitedVisible" :footer="null">
<a-row :span="24" class="invited-row">
@ -211,7 +211,7 @@ const userStore = useUserStore();
const { createMessage } = useMessage();
//
const departOptions = ref<any>([]);
//
//
const tenantVisible = ref<boolean>(false);
//
const userData = ref<any>([]);
@ -223,11 +223,11 @@ const userDetail = ref({
postText: userStore.getUserInfo.postText,
});
/**
* 初始化租户数据
* 初始化仓库数据
*/
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],,-----------
getTenantListByUserId({ userTenantStatus: '1,3,5' }).then((res) => {
if (res.success) {
@ -256,12 +256,12 @@ const userDetail = ref({
//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() {
dataSource.value = [];
invitedList.value = [];
invitedCount.value = 0;
invitedCount.value = 0;
}
/**
@ -343,7 +343,7 @@ const userDetail = ref({
if (type === 'editTenant') {
tenantVisible.value = true;
}else if(type === 'exitTenant'){
//退
//退
formCancelState.value = {loginPassword:'', tenantName:''};
outBtnDisabled.value = true;
cancelVisible.value = true;
@ -351,13 +351,13 @@ const userDetail = ref({
}
}
//退
//退
const cancelVisible = ref<boolean>(false);
//退
//退
const formCancelState = ref<any>({});
//
//
const myTenantInfo = ref<any>({});
//
//
const outBtnDisabled = ref<boolean>(true);
//
const tenantOwen = ref<string>('');
@ -365,7 +365,7 @@ const userDetail = ref({
const owenVisible = ref<boolean>(false);
/**
* 租户名称值改变事件
* 仓库名称值改变事件
*/
function tenantNameChange() {
let name = unref(myTenantInfo).name;
@ -397,7 +397,7 @@ const userDetail = ref({
//
owenVisible.value = true;
cancelVisible.value = false;
//update-begin---author:wangshuai ---date:20230426 forQQYUN-5270退------------
//update-begin---author:wangshuai ---date:20230426 forQQYUN-5270退------------
}else if(res.message === 'cancelTenant'){
cancelVisible.value = false;
let fullPath = router.currentRoute.value.fullPath;
@ -414,7 +414,7 @@ const userDetail = ref({
router.push('/myapps/settings/organization/organMessage/'+unref(myTenantInfo).tenantUserId)
}
})
//update-end---author:wangshuai ---date:20230426 forQQYUN-5270退------------
//update-end---author:wangshuai ---date:20230426 forQQYUN-5270退------------
} else {
createMessage.warning(res.message);
}
@ -425,7 +425,7 @@ const userDetail = ref({
}
/**
* 退出租户取消事件
* 退出仓库取消事件
*/
function handleCancelOutClick() {
cancelVisible.value = false;
@ -444,15 +444,15 @@ const userDetail = ref({
if(res.success){
createMessage.success(res.message);
initDataSource();
//update-begin---author:wangshuai---date:2023-10-23---for:QQYUN-68227退---
//update-begin---author:wangshuai---date:2023-10-23---for:QQYUN-68227退---
userExitChangeLoginTenantId(unref(myTenantInfo).tenantUserId);
//update-end---author:wangshuai---date:2023-10-23---for:QQYUN-68227退---
//update-end---author:wangshuai---date:2023-10-23---for:QQYUN-68227退---
} else {
createMessage.warning(res.message);
}
})
}
//
const invitedCount = ref<number>(0);
//

View File

@ -71,7 +71,7 @@ export const updatePasswordNotBindPhone = (params) => {
}
/**
* id
* id
* @param params
*/
export const getTenantListByUserId = (params) => {
@ -87,7 +87,7 @@ export const cancelApplyTenant = (params) => {
};
/**
* 退
* 退
* @param params
*/
export const exitUserTenant = (params)=>{
@ -95,7 +95,7 @@ export const exitUserTenant = (params)=>{
}
/**
*
*
* @param params
*/
export const changeOwenUserTenant = (params)=>{
@ -127,7 +127,7 @@ export const deleteThirdAccount = (params) => {
};
/**
*
*
* @param params
*/
export const agreeOrRefuseJoinTenant = (params) => {

View File

@ -47,14 +47,7 @@ export const settingList = [
img1: anquan1,
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',
component: 'JDictSelectTag',
label: '租户',
label: '仓库',
colProps: { span: 24 },
componentProps:{
mode:'multiple',

View File

@ -78,19 +78,19 @@ export default defineComponent({
}
function goToMyTeantPage(){
//update-begin---author:wangshuai ---date:20230721 forQQYUN-5726------------
//
//update-begin---author:wangshuai ---date:20230721 forQQYUN-5726------------
//
let query = router.currentRoute.value.query;
if(query && query.page === 'tenantSetting'){
activeKey.value = "2";
}
//update-end---author:wangshuai ---date:20230721 forQQYUN-5726------------
//update-end---author:wangshuai ---date:20230721 forQQYUN-5726------------
}
onMounted(()=>{
goToMyTeantPage();
})
return {
prefixCls,
settingList,