Squashed commit of the following:

commit b7519d7199
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 19 15:18:52 2025 +0800

    中文乱码

commit 81ba07c853
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 19 15:09:21 2025 +0800

    增加代码生成用法文档

commit 92ed296e63
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 19 14:04:22 2025 +0800

    【issues/8709】LayoutContent样式多出1px

commit c2aff84914
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 19 14:04:09 2025 +0800

    【issues/8683】DatePicker组件的componentProps使用函数形式时初始值获取不对

commit e002cd3bf3
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 19 14:03:51 2025 +0800

    【issues/8680】editComponentProps 可接受一个函数传入record

commit 1de07ff3ff
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 19 14:03:32 2025 +0800

    -- author:liaozhiyang---date:20250813--for:【issues/8690】BasicTable的rowSelection新增onSelect方法 ---

commit 35852d41f1
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 19 14:03:04 2025 +0800

    jvxeTable表格切换disabled属性时,相邻的两个枚举下拉,如果值是一样的,但是label不一样,会把第二个下拉的显示值渲染到第一个下拉中 #8593

commit a2cb1d9f25
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 19 14:00:01 2025 +0800

    【issues/8529】setColumns将原本隐藏的列展示后,列配置里却没有勾选该列

commit 2002af54d0
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 19 13:59:42 2025 +0800

    JVxeTypes.image组件action字段只能定义第1张图片的上传接口,后面图片的接口还是使用公共上传接口 #8628

commit 89747403a2
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 19 13:59:28 2025 +0800

    JVxeTable组件全选翻页后会被取消选中 #8630

commit 3db0995c3f
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 19 11:23:19 2025 +0800

    [代码生成]前端代码支持直接生成到前端项目、菜单sql会自动生成到start项目的flyway目录

commit 950621dd88
Author: JEECG <445654970@qq.com>
Date:   Mon Aug 18 23:04:59 2025 +0800

    升级代码生成器,一键生成代码,vue3代码会生成到前端项目、菜单升级sql自动迁移到flyway目录重启自动执行(不需要手工迁移前端代码和手工执行升级sql)

commit 033cf51d69
Author: JEECG <445654970@qq.com>
Date:   Mon Aug 18 23:04:52 2025 +0800

    升级代码生成器,一键生成代码,vue3代码会生成到前端项目、菜单升级sql自动迁移到flyway目录重启自动执行(不需要手工迁移前端代码和手工执行升级sql)

commit fb9f367517
Author: JEECG <445654970@qq.com>
Date:   Mon Aug 18 23:02:53 2025 +0800

    代码生成,online自定义按钮无排序报错

commit b2da45d803
Author: JEECG <445654970@qq.com>
Date:   Mon Aug 18 16:23:22 2025 +0800

    演示地址

commit 2840f0d325
Author: JEECG <445654970@qq.com>
Date:   Mon Aug 18 15:37:10 2025 +0800

    默认账号密码

commit 6ace7eae8a
Author: JEECG <445654970@qq.com>
Date:   Sun Aug 17 15:11:45 2025 +0800

    开发环境关闭日志生成,项目启动快;生产环境请按需打开注释

commit 3d88147c59
Author: JEECG <445654970@qq.com>
Date:   Thu Aug 14 23:03:46 2025 +0800

    调整微服务启动文档

commit ba0052d452
Author: JEECG <445654970@qq.com>
Date:   Wed Aug 13 13:55:13 2025 +0800

    支持lazy-initialization启动,项目大了后启动会更快

commit 69fca254f0
Author: JEECG <445654970@qq.com>
Date:   Wed Aug 13 11:47:27 2025 +0800

    补充注释

commit b3de596199
Author: JEECG <445654970@qq.com>
Date:   Wed Aug 13 11:47:16 2025 +0800

    彻底关闭 prettier 校验规则

commit f46273d15e
Author: JEECG <445654970@qq.com>
Date:   Wed Aug 13 10:26:23 2025 +0800

    设置ESLint 的 vue/html-self-closing 自闭合标签警告配置

commit 0fe258dbc2
Author: JEECG <445654970@qq.com>
Date:   Wed Aug 13 09:26:16 2025 +0800

    修复 onExportXls defSort 不生效问题 #7570

commit de7f23c555
Merge: d97e56b2 444c7140
Author: JEECG <zhangdaiscott@163.com>
Date:   Wed Aug 13 09:20:31 2025 +0800

    Merge pull request #8496 from lileiAimee/developer

    解决TableAction中自定义图标颜色不起作用的问题

commit d97e56b2f0
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 12 19:08:43 2025 +0800

    多租户模式下系统系统会给租户默认增加上测试的角色菜单,但是后台获取菜单时异常,无法打开相关页面 #8667

commit c868496b78
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 12 19:02:49 2025 +0800

    映射警告

commit c5150baa69
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 12 18:18:34 2025 +0800

    支持通过用户账号邀请加入租户

commit 3d9f59c69b
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 12 18:17:55 2025 +0800

    邀请用户加入租户,支持通过用户账号

commit 420d6db3fb
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 12 18:06:20 2025 +0800

    登录用户没有部门,不提示警告

commit 473a626039
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 12 14:10:02 2025 +0800

    增加JPopup组件带参数示例

commit 0308b0597c
Author: JEECG <445654970@qq.com>
Date:   Tue Aug 12 14:08:18 2025 +0800

    【issues/8426】解决JPopup组件传参不能接收

commit 2191f5d48c
Author: JEECG <445654970@qq.com>
Date:   Mon Aug 11 22:43:07 2025 +0800

    调整位置

commit 1158b0b6e7
Author: JEECG <445654970@qq.com>
Date:   Mon Aug 11 22:30:39 2025 +0800

    升级seata到1.7.0;升级dynamic-datasource-spring-boot-starter到3.5.2

commit ead2cef1f4
Author: JEECG <445654970@qq.com>
Date:   Mon Aug 11 18:47:48 2025 +0800

    支持多字段默认排序defSort数组、解决多列排序无效 #8659

commit 83bb0a0a6a
Author: JEECG <445654970@qq.com>
Date:   Mon Aug 11 18:47:43 2025 +0800

    支持多字段默认排序defSort数组

commit b474e9e5a5
Author: JEECG <445654970@qq.com>
Date:   Sun Aug 10 17:06:01 2025 +0800

    开发环境安装

commit 422373e300
Author: JEECG <445654970@qq.com>
Date:   Sun Aug 10 16:30:13 2025 +0800

    提供JeecgBoot 运行环境python检查脚本

commit 1cf11a4c2a
Author: JEECG <445654970@qq.com>
Date:   Sat Aug 9 09:41:57 2025 +0800

    提供jeecgboot-oracle11g.dmp

commit 925f163784
Author: JEECG <445654970@qq.com>
Date:   Fri Aug 8 22:07:24 2025 +0800

    引入jeecg-boot-starter-job依赖启动报错 #8694

commit d01c1d7d47
Author: JEECG <445654970@qq.com>
Date:   Thu Aug 7 15:41:21 2025 +0800

    支持lazy-initialization

commit 3576b54945
Author: JEECG <445654970@qq.com>
Date:   Thu Aug 7 15:36:51 2025 +0800

    升级积木报表和积木BI到最新版v2.1.2

commit 444c7140f6
Author: lileiAimee <345697385@qq.com>
Date:   Wed Jun 25 09:55:07 2025 +0800

    解决TableAction中自定义图标颜色不起作用的问题

# Conflicts:
#	README-EN.md
#	README.md
#	jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-seata/pom.xml
#	jeecg-boot/pom.xml
This commit is contained in:
JEECG
2025-08-19 22:58:12 +08:00
parent 08f245bdf9
commit db1ff0268b
53 changed files with 374 additions and 156 deletions

View File

@ -25,6 +25,7 @@ module.exports = defineConfig({
'plugin:jest/recommended',
],
rules: {
'prettier/prettier': 'off', // 彻底关闭 prettier 校验规则
'vue/script-setup-uses-vars': 'error',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
@ -67,8 +68,8 @@ module.exports = defineConfig({
{
html: {
void: 'always',
normal: 'never',
component: 'always',
normal: 'any',
component: 'any',
},
svg: 'always',
math: 'always',

View File

@ -15,6 +15,6 @@ module.exports = {
requirePragma: false,
proseWrap: 'never',
htmlWhitespaceSensitivity: 'strict',
endOfLine: 'auto',
endOfLine: 'auto', // 自动处理换行符LF/CRLF
rangeStart: 0,
};

View File

@ -61,6 +61,7 @@
import { useDesign } from '/@/hooks/web/useDesign';
import dayjs from 'dayjs';
import { useDebounceFn } from '@vueuse/core';
import { isFunction, isObject } from '/@/utils/is';
export default defineComponent({
name: 'BasicForm',
@ -145,9 +146,17 @@
if (defaultValue && dateItemType.includes(component)) {
//update-begin---author:wangshuai ---date:20230410 for【issues/435】代码生成的日期控件赋默认值报错------------
let valueFormat:string = "";
if(componentProps){
// update-begin--author:liaozhiyang---date:20250818---for【issues/8683】DatePicker组件的componentProps使用函数形式时初始值获取不对
if(isObject(componentProps)) {
valueFormat = componentProps?.valueFormat;
} else if (isFunction(componentProps)) {
try {
// @ts-ignore
valueFormat = componentProps({schema, tableAction: props.tableAction, formModel})?.valueFormat;
} catch (error) {
}
}
// update-end--author:liaozhiyang---date:20250818---for【issues/8683】DatePicker组件的componentProps使用函数形式时初始值获取不对
if(!valueFormat){
console.warn("未配置valueFormat,可能导致格式化错误!");
}

View File

@ -57,6 +57,7 @@ export function useFileCell(props, fileType: UploadTypeEnum, options?) {
...originColumn.value.props,
maxCount: maxCount.value,
fileType: fileType,
action: originColumn.value.action ?? void 0,
});
}

View File

@ -7,12 +7,12 @@
<template v-else>
<Tooltip v-if="action.tooltip" v-bind="getTooltip(action.tooltip)">
<PopConfirmButton v-bind="action">
<Icon :icon="action.icon" :class="{ 'mr-1': !!action.label }" v-if="action.icon" />
<Icon :icon="action.icon" :class="{ 'mr-1': !!action.label }" v-if="action.icon" :color="action.iconColor"/>
<template v-if="action.label">{{ action.label }}</template>
</PopConfirmButton>
</Tooltip>
<PopConfirmButton v-else v-bind="action">
<Icon :icon="action.icon" :class="{ 'mr-1': !!action.label }" v-if="action.icon" />
<Icon :icon="action.icon" :class="{ 'mr-1': !!action.label }" v-if="action.icon" :color="action.iconColor"/>
<template v-if="action.label">{{ action.label }}</template>
</PopConfirmButton>
</template>

View File

@ -100,7 +100,14 @@
});
const getComponentProps = computed(() => {
const compProps = props.column?.editComponentProps ?? {};
let compProps;
// update-begin--author:liaozhiyang---date:20250818---for【issues/8680】editComponentProps可接受一个函数传入record
if (isFunction(props.column?.editComponentProps)) {
compProps = props.column?.editComponentProps(props.record);
} else {
compProps = props.column?.editComponentProps ?? {};
}
// update-end--author:liaozhiyang---date:20250818---for【issues/8680】editComponentProps可接受一个函数传入record
const component = unref(getComponent);
const apiSelectProps: Recordable = {};
if (component === 'ApiSelect') {

View File

@ -222,14 +222,18 @@
checkSelect.value = !!values.rowSelection;
});
// update-begin--author:liaozhiyang---date:20240724---for【issues/6908】多语言无刷新切换时BasicColumn和FormSchema里面的值不能正常切换
watch([localeStore, getColumnsRef], () => {
watch([localeStore], () => {
const columns = getColumns();
plainOptions.value = columns;
plainSortOptions.value = columns;
cachePlainOptions.value = columns;
});
// update-end--author:liaozhiyang---date:20240724---for【issues/6908】多语言无刷新切换时BasicColumn和FormSchema里面的值不能正常切换
// update-begin--author:liaozhiyang---date:20250813---for【issues/8529】setColumns将原本隐藏的列展示后列配置里却没有勾选该列
watch([getColumnsRef], () => {
init();
});
// update-end--author:liaozhiyang---date:20250813---for【issues/8529】setColumns将原本隐藏的列展示后列配置里却没有勾选该列
function getColumns() {
const ret: Options[] = [];
// update-begin--author:liaozhiyang---date:20250403---for【issues/7996】表格列组件取消所有或者只勾选中间显示非预期

View File

@ -348,6 +348,9 @@ export function useCustomSelection(
onSelectChild(record, checked);
updateSelected(record, checked);
onSelectParent(record, checked);
// update-begin--author:liaozhiyang---date:20250813---for【issues/8690】BasicTable的rowSelection新增onSelect方法
propsRef.value.rowSelection?.onSelect?.(toRaw(record), checked, toRaw(selectedRows.value));
// update-end--author:liaozhiyang---date:20250813---for【issues/8690】BasicTable的rowSelection新增onSelect方法
emitChange();
}

View File

@ -25,7 +25,7 @@ export interface TableRowSelection<T = any> extends ITableRowSelection {
* Callback executed when select/deselect one row
* @type Function
*/
onSelect?: (record: T, selected: boolean, selectedRows: Object[], nativeEvent: Event) => any;
onSelect?: (record: T, selected: boolean, selectedRows: Object[]) => any;
/**
* Callback executed when select/deselect all rows
@ -459,7 +459,9 @@ export interface BasicColumn extends ColumnProps<Recordable> {
editRow?: boolean;
editable?: boolean;
editComponent?: ComponentType;
editComponentProps?: Recordable;
// update-begin--author:liaozhiyang---date:20250818---for【issues/8680】editComponentProps可接受一个函数传入record
editComponentProps?: Recordable | ((record: Recordable) => Recordable);
// update-end--author:liaozhiyang---date:20250818---for【issues/8680】editComponentProps可接受一个函数传入record
editRule?: boolean | ((text: string, record: Recordable) => Promise<string>);
editValueMap?: (value: any) => string;
onEditRow?: () => void;

View File

@ -54,8 +54,16 @@ export function useData(props: JVxeTableProps): JVxeDataProps {
// 暂时关闭左右虚拟滚动
enabled: false,
},
radioConfig: { highlight: true },
checkboxConfig: { highlight: true },
radioConfig: {
// 保留勾选状态
reserve: true,
highlight: true,
},
checkboxConfig: {
// 保留勾选状态
reserve: true,
highlight: true,
},
mouseConfig: { selected: false },
keyboardConfig: {
// 删除键功能

View File

@ -1,4 +1,4 @@
import { unref, computed } from 'vue';
import { unref, computed, ref, watch, nextTick } from 'vue';
import { merge } from 'lodash-es';
import { isArray } from '/@/utils/is';
import { useAttrs } from '/@/hooks/core/useAttrs';
@ -40,6 +40,16 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
});
return events;
});
// update-begin--author:sunjianlei---date:20250804---for:【issues/8593】修复列改变后内容不刷新
const vxeColumnsRef = ref([])
watch(data.vxeColumns, async () => {
vxeColumnsRef.value = []
await nextTick()
vxeColumnsRef.value = data.vxeColumns.value
}, {immediate: true})
// update-end----author:sunjianlei---date:20250804---for:【issues/8593】修复列改变后内容不刷新
// vxe 最终 props
const vxeProps = computed(() => {
// update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制拖动其他列到id列上面同步数据库时报错
@ -77,7 +87,8 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
size: props.size,
loading: false,
disabled: props.disabled,
columns: unref(data.vxeColumns),
// columns: unref(data.vxeColumns),
columns: vxeColumnsRef.value,
editRules: unref(vxeEditRules),
height: props.height === 'auto' ? null : props.height,
maxHeight: props.maxHeight,

View File

@ -765,7 +765,8 @@ export function usePopBiz(ob, tableRef?) {
if (props.param) {
Object.keys(props.param).map((key) => {
let str = props.param[key];
if (key in queryParam) {
//【issues/8426】解决JPopup组件传参不能接收
if (key in queryParam.value) {
if (str && str.startsWith("'") && str.endsWith("'")) {
str = str.substring(1, str.length - 1);
}

View File

@ -16,7 +16,10 @@ interface ListPageOptions {
// 样式作用域范围
designScope?: string;
// 【必填】表格参数配置
tableProps: TableProps;
tableProps: TableProps & {
// 添加 defSort 类型定义
defSort?: DefSort;
};
// 是否分页
pagination?: boolean;
// 导出配置
@ -46,6 +49,11 @@ interface IDoRequestOptions {
clearSelection?: boolean;
}
interface DefSort {
column: string;
order: 'asc' | 'desc';
}
/**
* listPage页面公共方法
*
@ -85,8 +93,17 @@ export function useListPage(options: ListPageOptions) {
//update-end-author:taoyan date:20220507 for: erp代码生成 子表 导出报错,原因未知-
//update-begin-author:liusq date:20230410 for:[/issues/409]导出功能没有按排序结果导出,设置导出默认排序,创建时间倒序
if(!paramsForm?.column){
Object.assign(paramsForm,{column:'createTime',order:'desc'});
// 获取表格的默认排序
const { defSort } = options?.tableProps ?? {};
if (defSort && !paramsForm?.column) {
// 使用类型断言确保 defSort 类型正确
Object.assign(paramsForm, {
column: (defSort as DefSort).column,
order: (defSort as DefSort).order,
});
} else if (!paramsForm?.column) {
// 如果没有默认排序,则使用创建时间倒序
Object.assign(paramsForm, { column: 'createTime', order: 'desc' });
}
//update-begin-author:liusq date:20230410 for: [/issues/409]导出功能没有按排序结果导出,设置导出默认排序,创建时间倒序

View File

@ -141,10 +141,11 @@
.@{prefix-cls} {
transition: width 0.2s;
flex: 0 0 auto;
&--dark {
margin-left: -1px;
}
// update-begin--author:liaozhiyang---date:20250818---for【issues/8709】LayoutContent样式多出1px
// &--dark {
// margin-left: -1px;
// }
// update-end--author:liaozhiyang---date:20250818---for【issues/8709】LayoutContent样式多出1px
&--fixed {
position: fixed;

View File

@ -7,7 +7,9 @@
display: flex;
height: @header-height;
padding: 0;
margin-left: -1px;
// update-begin--author:liaozhiyang---date:20250818---for【issues/8709】LayoutContent样式多出1px
// margin-left: -1px;
// update-end--author:liaozhiyang---date:20250818---for【issues/8709】LayoutContent样式多出1px
line-height: @header-height;
color: @white;
background-color: @white;
@ -170,7 +172,9 @@
&--dark {
background-color: @header-dark-bg-color !important;
// border-bottom: 1px solid @border-color-base;
border-left: 1px solid @border-color-base;
// update-begin--author:liaozhiyang---date:20250818---for【issues/8709】LayoutContent样式多出1px
// border-left: 1px solid @border-color-base;
// update-end--author:liaozhiyang---date:20250818---for【issues/8709】LayoutContent样式多出1px
.@{header-prefix-cls}-logo {
&:hover {

View File

@ -86,7 +86,9 @@
&-main {
width: 100%;
margin-left: 1px;
// update-begin--author:liaozhiyang---date:20250818---for【issues/8709】LayoutContent样式多出1px
// margin-left: 1px;
// update-end--author:liaozhiyang---date:20250818---for【issues/8709】LayoutContent样式多出1px
}
}
</style>

View File

@ -21,6 +21,24 @@
<template #JPopup="{ model, field }">
<JPopup v-model:value="model[field]" :formElRef="formElRef" code="report_user" :fieldConfig="[{ source: 'username', target: 'pop1' }]" />
</template>
<template #JPopup2="{ model, field }">
<JPopup
v-model:value="model[field]"
:formElRef="formElRef"
code="withparamreport"
:param="{ sex: '1' }"
:fieldConfig="[{ source: 'name', target: 'pop2' }]"
/>
</template>
<template #JPopup3="{ model, field }">
<JPopup
v-model:value="model[field]"
:formElRef="formElRef"
code="tj_user_report"
:param="{ sex: '1' }"
:fieldConfig="[{ source: 'realname', target: 'pop3' }]"
/>
</template>
<template #JAreaSelect="{ model, field }">
<JAreaSelect v-model:value="model[field]" />
</template>

View File

@ -626,6 +626,42 @@ export const schemas: FormSchema[] = [
span: 12,
},
},
{
field: 'pop2',
component: 'Input',
label: 'JPopup带参数示例',
helpMessage: ['插槽模式'],
slot: 'JPopup2',
colProps: {
span: 12,
},
},
{
field: 'pop2',
component: 'JEllipsis',
label: '选中值',
colProps: {
span: 12,
},
},
{
field: 'pop3',
component: 'Input',
label: 'JPopup带查询条件参数示例',
helpMessage: ['插槽模式'],
slot: 'JPopup3',
colProps: {
span: 12,
},
},
{
field: 'pop3',
component: 'JEllipsis',
label: '选中值',
colProps: {
span: 12,
},
},
{
field: 'JInputPop',
component: 'JInputPop',

View File

@ -146,11 +146,11 @@
let multi_depart = loginResult.multi_depart;
//0:无部门 1:一个部门 2:多个部门
if (multi_depart == 0) {
notification.warn({
message: '提示',
description: `您尚未归属部门,请确认账号信息`,
duration: 3,
});
// notification.warn({
// message: '提示',
// description: `您尚未归属部门,请确认账号信息`,
// duration: 3,
// });
isMultiDepart.value = false;
} else if (multi_depart == 2) {
isMultiDepart.value = true;

View File

@ -19,21 +19,43 @@ export default defineComponent({
const title = ref<string>('邀请成员');
const [registerForm, { resetFields, validate }] = useForm({
schemas: [
{
label: '邀请方式',
field: 'invitedMode',
component: 'RadioButtonGroup',
defaultValue: 1,
componentProps: {
options: [
{ label: '手机号', value: 1 },
{ label: '用户账号', value: 2 },
],
},
},
{
label: '手机号',
field: 'phone',
component: 'Input',
dynamicRules: () => {
return [
{ required: true, message: '请填写手机号' },
{ pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' },
];
ifShow: ({ values }) => values.invitedMode === 1,
dynamicRules: ({ values }) => {
return values.invitedMode === 1
? [
{ required: true, message: '请填写手机号' },
{ pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' },
]
: [{ pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' }];
},
},
{
field: 'user',
component: 'Input',
label: '用户账号',
ifShow: ({ values }) => values.invitedMode === 2,
dynamicRules: ({ values }) => {
return values.invitedMode === 2 ? [{ required: true, message: '请输入用户账号' }] : [];
},
},
],
showActionButtonGroup: false,
labelCol: { span: 24 },
wrapperCol: { span: 24 },
});
//表单赋值
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
@ -47,7 +69,7 @@ export default defineComponent({
*/
async function handleSubmit() {
let values = await validate();
emit('inviteOk',values.phone);
emit('inviteOk', values.phone, values.user);
closeModal();
}

View File

@ -156,12 +156,16 @@
/**
* 用户选择回调事件
* @param options
* @param value
* @param phone
* @param userSelectId
*/
async function handleInviteUserOk(value) {
async function handleInviteUserOk(phone, username) {
//update-begin---author:wangshuai ---date:20230314 for【QQYUN-4605】后台的邀请谁加入租户没办法选不是租户下的用户------------
if (value) {
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), phone: value });
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 for【QQYUN-4605】后台的邀请谁加入租户没办法选不是租户下的用户------------
}

View File

@ -1,6 +1,6 @@
<template>
<div>
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<BasicTable @register="registerTable" :rowSelection="rowSelection" @fetch-success="onFetchSuccess">
<template #tableTitle>
<a-button
preIcon="ant-design:user-add-outlined"
@ -67,7 +67,7 @@
fixed: 'right',
},
rowSelection:{
type: "radio"
type: "radio",
},
beforeFetch: (params) => {
return Object.assign(params, { userTenantStatus: '1,3,4' });
@ -76,6 +76,26 @@
});
const [registerTable, { reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
// 默认选中当前租户
function onFetchSuccess(data) {
let items = data.items;
console.log('items:', items);
// 当前登录租户ID
let loginTenantId = getTenantId();
console.log('loginTenantId:', loginTenantId);
// 如果当前登录租户ID在列表中则默认选中
if (items && items.length > 0 && loginTenantId) {
for (let i = 0; i < items.length; i++) {
if (items[i].id == loginTenantId) {
console.log('items[i].id:', items[i].id);
selectedRowKeys.value = [items[i].id];
selectedRows.value = [items[i]];
return;
}
}
}
}
/**
* 操作列定义
* @param record
@ -99,11 +119,15 @@
/**
* 用户选择回调事件
* @param options
* @param value
* @param phone
* @param userSelectId
*/
async function handleInviteUserOk(value) {
if (value) {
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), phone: value });
async function handleInviteUserOk(phone, username) {
if (phone) {
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), phone: phone });
}
if (username) {
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), username: username });
}
}

View File

@ -40,19 +40,19 @@ export const columns: BasicColumn[] = [
title: '门牌号',
width: 100,
},
{
dataIndex: 'position_dictText',
title: '职级',
width: 150
},
{
dataIndex: 'department_dictText',
title: '部门',
width: 150
},
// {
// dataIndex: 'position_dictText',
// title: '职级',
// width: 150
// },
// {
// dataIndex: 'department_dictText',
// title: '部门',
// width: 150
// },
{
dataIndex: 'createBy_dictText',
title: '创建者(拥有)',
title: '创建者(拥有)',
width: 150
},
/* {