-
-
{{ typeof getValues === 'string' && getValues.length === 0 ? ' ' : getValues ?? ' ' }}
-
-
@@ -50,10 +46,23 @@
import { propTypes } from '/@/utils/propTypes';
import { isArray, isBoolean, isFunction, isNumber, isString } from '/@/utils/is';
import { createPlaceholderMessage } from './helper';
- import { omit, pick, set } from 'lodash-es';
+ import { omit, set } from 'lodash-es';
import { treeToList } from '/@/utils/helper/treeHelper';
import { Spin } from 'ant-design-vue';
+ // 这些字段是表格内部使用的,不应该传递给 beforeEditSubmit
+ const INTERNAL_RECORD_FIELDS = [
+ 'editable',
+ 'submitCbs',
+ 'validCbs',
+ 'cancelCbs',
+ 'onEdit',
+ 'onValid',
+ 'onCancelEdit',
+ 'onSubmitEdit',
+ 'editValueRefs',
+ ];
+
export default defineComponent({
name: 'EditableCell',
components: { FormOutlined, CloseOutlined, CheckOutlined, CellComponent, ASpin: Spin },
@@ -101,13 +110,12 @@
const getComponentProps = computed(() => {
let compProps;
- // update-begin--author:liaozhiyang---date:20250818---for:【issues/8680】editComponentProps可接受一个函数传入record
+ // 代码逻辑说明: 【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') {
@@ -120,17 +128,14 @@
const val = unref(currentValueRef);
const value = isCheckValue ? (isNumber(val) && isBoolean(val) ? val : !!val) : val;
- //update-begin---author:wangshuai---date:2024-09-19---for:【issues/7136】单元格上的tooltip提示,如果表格有滚动条,会不跟着单元格滚动---
+ // 代码逻辑说明: 【issues/7136】单元格上的tooltip提示,如果表格有滚动条,会不跟着单元格滚动---
let tooltipPosition:any = unref(table?.wrapRef.value)?.parentElement?.querySelector('.ant-table-body');
if(tooltipPosition){
tooltipPosition.style.position = 'relative';
}
- //update-end---author:wangshuai---date:2024-09-19---for:【issues/7136】单元格上的tooltip提示,如果表格有滚动条,会不跟着单元格滚动---
return {
size: 'small',
- //update-begin---author:wangshuai---date:2024-09-19---for:【issues/7136】单元格上的tooltip提示,如果表格有滚动条,会不跟着单元格滚动---
getPopupContainer: () => tooltipPosition ?? document.body,
- //update-end---author:wangshuai---date:2024-09-19---for:【issues/7136】单元格上的tooltip提示,如果表格有滚动条,会不跟着单元格滚动---
getCalendarContainer: () => unref(table?.wrapRef.value) ?? document.body,
placeholder: createPlaceholderMessage(unref(getComponent)),
...apiSelectProps,
@@ -155,7 +160,7 @@
const options: LabelValueOptions = editComponentProps?.options ?? (unref(optionsRef) || []);
const option = options.find((item) => `${item.value}` === `${value}`);
- // update-begin---author:liaozhiyang---date:2025-07-28---for:【QQYUN-13251】表格可编辑单元格apiSelect多选不翻译 ---
+ // 代码逻辑说明: 【QQYUN-13251】表格可编辑单元格apiSelect多选不翻译 ---
if (['tags', 'multiple'].includes(editComponentProps?.mode)) {
const result = options
.filter((item) => {
@@ -175,7 +180,6 @@
}
return value;
}
- // update-end---author:liaozhiyang---date:2025-07-28---for:【QQYUN-13251】表格可编辑单元格apiSelect多选不翻译 ---
return option?.label ?? value;
});
@@ -287,15 +291,16 @@
if (!record.editable) {
const { getBindValues } = table;
- const { beforeEditSubmit, columns } = unref(getBindValues);
+ const { beforeEditSubmit } = unref(getBindValues);
if (beforeEditSubmit && isFunction(beforeEditSubmit)) {
spinning.value = true;
- const keys: string[] = columns.map((_column) => _column.dataIndex).filter((field) => !!field) as string[];
let result: any = true;
try {
+ // 过滤掉内部字段,只保留业务数据字段,确保 id 等关键字段不丢失
+ const cleanRecord = omit(record, INTERNAL_RECORD_FIELDS);
result = await beforeEditSubmit({
- record: pick(record, keys),
+ record: cleanRecord,
index,
key,
value,
@@ -374,7 +379,7 @@
function initCbs(cbs: 'submitCbs' | 'validCbs' | 'cancelCbs', handle: Fn) {
if (props.record) {
/* eslint-disable */
- // update-begin--author:liaozhiyang---date:20240424---for:【issues/1165】解决canResize为true时第一行校验不过
+ // 代码逻辑说明: 【issues/1165】解决canResize为true时第一行校验不过
const { dataIndex, key } = props.column;
const field: any = dataIndex || key;
if (isArray(props.record[cbs])) {
@@ -387,7 +392,6 @@
} else {
props.record[cbs] = [{ [field]: handle }];
}
- // update-end--author:liaozhiyang---date:20240424---for:【issues/1165】解决canResize为true时第一行校验不过
}
}
@@ -402,25 +406,23 @@
}
/* eslint-disable */
props.record.onCancelEdit = () => {
- // update-begin--author:liaozhiyang---date:20240424---for:【issues/1165】解决canResize为true时第一行校验不过
+ // 代码逻辑说明: 【issues/1165】解决canResize为true时第一行校验不过
isArray(props.record?.cancelCbs) &&
props.record?.cancelCbs.forEach((item) => {
const [fn] = Object.values(item);
fn();
});
- // update-end--author:liaozhiyang---date:20240424---for:【issues/1165】解决canResize为true时第一行校验不过
};
/* eslint-disable */
props.record.onSubmitEdit = async () => {
if (isArray(props.record?.submitCbs)) {
if (!props.record?.onValid?.()) return;
const submitFns = props.record?.submitCbs || [];
- // update-begin--author:liaozhiyang---date:20240424---for:【issues/1165】解决canResize为true时第一行校验不过
+ // 代码逻辑说明: 【issues/1165】解决canResize为true时第一行校验不过
submitFns.forEach((item) => {
const [fn] = Object.values(item);
fn(false, false);
});
- // update-end--author:liaozhiyang---date:20240424---for:【issues/1165】解决canResize为true时第一行校验不过
table.emit?.('edit-row-end');
return true;
}
diff --git a/jeecgboot-vue3/src/components/Table/src/components/editable/index.ts b/jeecgboot-vue3/src/components/Table/src/components/editable/index.ts
index 41914737b..de9220d5f 100644
--- a/jeecgboot-vue3/src/components/Table/src/components/editable/index.ts
+++ b/jeecgboot-vue3/src/components/Table/src/components/editable/index.ts
@@ -15,13 +15,12 @@ export function renderEditCell(column: BasicColumn) {
return ({ text: value, record, index }: Params) => {
toRaw(record).onValid = async () => {
if (isArray(record?.validCbs)) {
- // update-begin--author:liaozhiyang---date:20240424---for:【issues/1165】解决canResize为true时第一行校验不过
+ // 代码逻辑说明: 【issues/1165】解决canResize为true时第一行校验不过
const validFns = (record?.validCbs || []).map((item) => {
const [fn] = Object.values(item);
// @ts-ignore
return fn();
});
- // update-end--author:liaozhiyang---date:20240424---for:【issues/1165】解决canResize为true时第一行校验不过
const res = await Promise.all(validFns);
return res.every((item) => !!item);
} else {
diff --git a/jeecgboot-vue3/src/components/Table/src/components/settings/ColumnSetting.vue b/jeecgboot-vue3/src/components/Table/src/components/settings/ColumnSetting.vue
index 6448ea348..555d4dccf 100644
--- a/jeecgboot-vue3/src/components/Table/src/components/settings/ColumnSetting.vue
+++ b/jeecgboot-vue3/src/components/Table/src/components/settings/ColumnSetting.vue
@@ -143,17 +143,13 @@
setup(props, { emit, attrs }) {
const { t } = useI18n();
const table = useTableContext();
- // update-begin--author:liaozhiyang---date:20250526---for:【issues/8301】树形表格序号列禁用
+ // 代码逻辑说明: 【issues/8301】树形表格序号列禁用
const isTreeTable = computed(() => table.getBindValues.value.isTreeTable);
- // update-end--author:liaozhiyang---date:20250526---for:【issues/8301】树形表格序号列禁用
const popoverVisible = ref(false);
- // update-begin--author:sunjianlei---date:20221101---for: 修复第一次进入时列表配置不能拖拽
// nextTick(() => popoverVisible.value = false);
- // update-end--author:sunjianlei---date:20221101---for: 修复第一次进入时列表配置不能拖拽
const defaultRowSelection = omit(table.getRowSelection(), 'selectedRowKeys');
- // update-begin--author:liaozhiyang---date:20250722---for:【issues/8529】setColumns后列配置没联动更新
+ // 代码逻辑说明: 【issues/8529】setColumns后列配置没联动更新
const getColumnsRef = table.getColumnsRef();
- // update-end--author:liaozhiyang---date:20250722---for:【issues/8529】setColumns后列配置没联动更新
let inited = false;
const cachePlainOptions = ref
([]);
@@ -221,27 +217,24 @@
checkIndex.value = !!values.showIndexColumn;
checkSelect.value = !!values.rowSelection;
});
- // update-begin--author:liaozhiyang---date:20240724---for:【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换
+ // 代码逻辑说明: 【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换
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将原本隐藏的列展示后,列配置里却没有勾选该列
+ // 代码逻辑说明: 【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】表格列组件取消所有或者只勾选中间,显示非预期
+ // 代码逻辑说明: 【issues/7996】表格列组件取消所有或者只勾选中间,显示非预期
let t = table.getColumns({ ignoreIndex: true, ignoreAction: true, ignoreAuth: true, ignoreIfShow: true });
if (!t.length) {
t = table.getCacheColumns();
}
- // update-end--author:liaozhiyang---date:20250403---for:【issues/7996】表格列组件取消所有或者只勾选中间,显示非预期
t.forEach((item) => {
ret.push({
label: (item.title as string) || (item.customTitle as string),
@@ -264,19 +257,16 @@
return item.dataIndex || item.title;
})
.filter(Boolean) as string[];
- // update-begin--author:liaozhiyang---date:20250403---for:【issues/7996】表格列组件取消所有或者只勾选中间,显示非预期
+ // 代码逻辑说明: 【issues/7996】表格列组件取消所有或者只勾选中间,显示非预期
const { sortedList = [] } = getCache() || {};
await nextTick();
- // update-end--author:liaozhiyang---date:20250403---for:【issues/7996】表格列组件取消所有或者只勾选中间,显示非预期
if (!plainOptions.value.length) {
- // update-begin--author:liaozhiyang---date:20250403---for:【issues/7996】表格列组件取消所有或者只勾选中间,显示非预期
let tmp = columns;
if (sortedList?.length) {
tmp = columns.sort((prev, next) => {
return sortedList.indexOf(prev.value) - sortedList.indexOf(next.value);
});
}
- // update-end--author:liaozhiyang---date:20250403---for:【issues/7996】表格列组件取消所有或者只勾选中间,显示非预期
plainOptions.value = tmp;
plainSortOptions.value = tmp;
cachePlainOptions.value = tmp;
@@ -292,19 +282,17 @@
item.fixed = findItem.fixed;
}
});
- // update-begin--author:liaozhiyang---date:20250403---for:【issues/7996】表格列组件取消所有或者只勾选中间,显示非预期
+ // 代码逻辑说明: 【issues/7996】表格列组件取消所有或者只勾选中间,显示非预期
if (sortedList?.length) {
plainOptions.value.sort((prev, next) => {
return sortedList.indexOf(prev.value) - sortedList.indexOf(next.value);
});
}
- // update-end--author:liaozhiyang---date:20250403---for:【issues/7996】表格列组件取消所有或者只勾选中间,显示非预期
}
state.isInit = true;
state.checkedList = checkList;
- // update-begin--author:liaozhiyang---date:20240612---for:【TV360X-105】列展示设置问题[列展示如果存在未勾选的列,保存并刷新后,列展示复选框样式会错乱]
+ // 代码逻辑说明: 【TV360X-105】列展示设置问题[列展示如果存在未勾选的列,保存并刷新后,列展示复选框样式会错乱]
state.checkAll = columns.length === checkList.length;
- // update-end--author:liaozhiyang---date:20240612---for:【TV360X-105】列展示设置问题[列展示如果存在未勾选的列,保存并刷新后,列展示复选框样式会错乱]
}
// checkAll change
@@ -322,9 +310,7 @@
const indeterminate = computed(() => {
const len = plainOptions.value.length;
let checkedLen = state.checkedList.length;
- // update-begin--author:liaozhiyang---date:20240612---for:【TV360X-105】列展示设置问题[列展示复选框不应该判断序号列复选框的状态]
// unref(checkIndex) && checkedLen--;
- // update-end--author:liaozhiyang---date:20240612---for:【TV360X-105】列展示设置问题[列展示复选框不应该判断序号列复选框的状态]
return checkedLen > 0 && checkedLen < len;
});
@@ -341,19 +327,18 @@
// reset columns
function reset() {
- // update-begin--author:liaozhiyang---date:20240612---for:【TV360X-105】列展示设置问题[需要重置两次才回到初始状态]
+ // 代码逻辑说明: 【TV360X-105】列展示设置问题[需要重置两次才回到初始状态]
setColumns(table.getCacheColumns());
setTimeout(() => {
const columns = getColumns();
// state.checkedList = [...state.defaultCheckList];
- // update-begin--author:liaozhiyang---date:20231103---for:【issues/825】tabel的列设置隐藏列保存后切换路由问题[重置没勾选]
+ // 代码逻辑说明: 【issues/825】tabel的列设置隐藏列保存后切换路由问题[重置没勾选]
state.checkedList = table
.getColumns({ ignoreAction: true, ignoreAuth: true, ignoreIfShow: true })
.map((item) => {
return item.dataIndex || item.title;
})
.filter(Boolean) as string[];
- // update-end--author:liaozhiyang---date:20231103---for:【issues/825】tabel的列设置隐藏列保存后切换路由问题[重置没勾选]
state.checkAll = true;
plainOptions.value = unref(cachePlainOptions);
plainSortOptions.value = unref(cachePlainOptions);
@@ -363,15 +348,13 @@
}
resetSetting();
}, 100);
- // update-end--author:liaozhiyang---date:20240612---for:【TV360X-105】列展示设置问题[需要重置两次才回到初始状态]
}
// Open the pop-up window for drag and drop initialization
function handleVisibleChange() {
if (inited) return;
- // update-begin--author:liaozhiyang---date:20240529---for:【TV360X-254】列设置闪现及苹果浏览器弹窗过长
+ // 代码逻辑说明: 【TV360X-254】列设置闪现及苹果浏览器弹窗过长
setTimeout(() => {
- // update-begin--author:liaozhiyang---date:20240529---for:【TV360X-254】列设置闪现及苹果浏览器弹窗过长
const columnListEl = unref(columnListRef);
if (!columnListEl) return;
const el = columnListEl.$el as any;
@@ -399,18 +382,14 @@
}
plainSortOptions.value = columns;
- // update-begin--author:liaozhiyang---date:20230904---for:【QQYUN-6424】table字段列表设置不显示后,再拖拽字段顺序,原本不显示的,又显示了
- // update-begin--author:liaozhiyang---date:20240522---for:【TV360X-108】刷新后勾选之前未勾选的字段拖拽之后该字段对应的表格列消失了
+ // 代码逻辑说明: 【TV360X-108】刷新后勾选之前未勾选的字段拖拽之后该字段对应的表格列消失了
const cols = columns.map((item) => item.value);
const arr = cols.filter((cItem) => state.checkedList.find((lItem) => lItem === cItem));
setColumns(arr);
// 最开始的代码
// setColumns(columns);
- // update-end--author:liaozhiyang---date:20240522---for:【TV360X-108】刷新后勾选之前未勾选的字段拖拽之后该字段对应的表格列消失了
- // update-end--author:liaozhiyang---date:20230904---for:【QQYUN-6424】table字段列表设置不显示后,再拖拽字段顺序,原本不显示的,又显示了
- // update-begin--author:liaozhiyang---date:20240611---for:【TV360X-105】列展示设置问题[重置之后保存的顺序还是上次的]
+ // 代码逻辑说明: 【TV360X-105】列展示设置问题[重置之后保存的顺序还是上次的]
restAfterOptions.value = null;
- // update-end--author:liaozhiyang---date:20240611---for:【TV360X-105】列展示设置问题[重置之后保存的顺序还是上次的]
},
});
// 记录原始 order 序列
@@ -572,15 +551,13 @@
}
.ant-checkbox-group {
- // update-begin--author:liaozhiyang---date:20240118---for:【QQYUN-7887】表格列设置宽度过长
// width: 100%;
min-width: 260px;
max-width: min-content;
- // update-end--author:liaozhiyang---date:20240118---for:【QQYUN-7887】表格列设置宽度过长
// flex-wrap: wrap;
}
- // update-begin--author:liaozhiyang---date:20240529---for:【TV360X-254】列设置闪现及苹果浏览器弹窗过长
+ // 代码逻辑说明: 【TV360X-254】列设置闪现及苹果浏览器弹窗过长
&.ant-popover,
.ant-popover-content,
.ant-popover-inner,
@@ -589,7 +566,6 @@
.scrollbar__wrap {
max-width: min-content;
}
- // update-end--author:liaozhiyang---date:20240529---for:【TV360X-254】列设置闪现及苹果浏览器弹窗过长
.scrollbar {
height: 220px;
}
diff --git a/jeecgboot-vue3/src/components/Table/src/components/settings/SizeSetting.vue b/jeecgboot-vue3/src/components/Table/src/components/settings/SizeSetting.vue
index 355816c38..27ba04cb5 100644
--- a/jeecgboot-vue3/src/components/Table/src/components/settings/SizeSetting.vue
+++ b/jeecgboot-vue3/src/components/Table/src/components/settings/SizeSetting.vue
@@ -64,11 +64,9 @@
table.setProps({
size: key,
});
- // update-begin--author:liaozhiyang---date:20240604---for:【TV360X-100】缓存表格密度
+ // 代码逻辑说明: 【TV360X-100】缓存表格密度
$ls.set(cacheKey.value, key);
- // update-end--author:liaozhiyang---date:20240604---for:【TV360X-100】缓存表格密度
}
- // update-begin--author:liaozhiyang---date:20240604---for:【TV360X-100】缓存表格密度
const cacheKey = computed(() => {
const path = route.path;
let key = path.replace(/[\/\\]/g, '_');
@@ -85,7 +83,6 @@
size: local,
});
}
- // update-end--author:liaozhiyang---date:20240604---for:【TV360X-100】缓存表格密度
return {
getBindProps,
diff --git a/jeecgboot-vue3/src/components/Table/src/hooks/useColumns.ts b/jeecgboot-vue3/src/components/Table/src/hooks/useColumns.ts
index 329f40eb2..8efd46aad 100644
--- a/jeecgboot-vue3/src/components/Table/src/hooks/useColumns.ts
+++ b/jeecgboot-vue3/src/components/Table/src/hooks/useColumns.ts
@@ -56,23 +56,21 @@ function handleIndexColumn(propsRef: ComputedRef, getPagination
columns.splice(indIndex, 1);
}
});
- // update-begin--author:liaozhiyang---date:20240611---for:【TV360X-105】列展示设置问题[列展示复选框不应该判断序号列复选框的状态]
+ // 代码逻辑说明: 【TV360X-105】列展示设置问题[列展示复选框不应该判断序号列复选框的状态]
if (columns.length === 0 && showIndexColumn) {
const indIndex = columns.findIndex((column) => column.flag === INDEX_COLUMN_FLAG);
if (indIndex === -1) {
pushIndexColumns = true;
}
}
- // update-end--author:liaozhiyang---date:20240611---for:【TV360X-105】列展示设置问题[列展示复选框不应该判断序号列复选框的状态]
if (!pushIndexColumns) return;
const isFixedLeft = columns.some((item) => item.fixed === 'left');
columns.unshift({
flag: INDEX_COLUMN_FLAG,
- // update-begin--author:liaozhiyang---date:20240724---for:【TV360X-1634】密度是宽松模式时,序号列表头换行了
+ // 代码逻辑说明: 【TV360X-1634】密度是宽松模式时,序号列表头换行了
width: propsRef.value.size === 'large' ? 65 : 50,
- // update-end--author:liaozhiyang---date:20240724---for:【TV360X-1634】密度是宽松模式时,序号列表头换行了
title: t('component.table.index'),
align: 'center',
customRender: ({ index }) => {
@@ -116,18 +114,16 @@ export function useColumns(
const getColumnsRef = computed(() => {
const columns = cloneDeep(unref(columnsRef));
- // update-begin--author:liaozhiyang---date:20240724---for:【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换
+ // 代码逻辑说明: 【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换
if (isArray(columns)) {
columns.forEach((item) => {
item.title = isFunction(item.title) ? item.title() : item.title;
});
}
- // update-end--author:liaozhiyang---date:20240724---for:【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换
handleIndexColumn(propsRef, getPaginationRef, columns);
handleActionColumn(propsRef, columns);
- // update-begin--author:sunjianlei---date:220230630---for:【QQYUN-5571】自封装选择列,解决数据行选择卡顿问题
+ // 代码逻辑说明: 【QQYUN-5571】自封装选择列,解决数据行选择卡顿问题
handleCustomSelectColumn(columns);
- // update-end--author:sunjianlei---date:220230630---for:【QQYUN-5571】自封装选择列,解决数据行选择卡顿问题
if (!columns) {
return [];
@@ -163,13 +159,12 @@ export function useColumns(
const columns = cloneDeep(viewColumns);
const formatEditColumn = (columns) => {
return columns.map((column) => {
- // update-begin--author:liaozhiyang---date:20230718---for: 【issues-179】antd3 一些警告以及报错(针对表格)
+ // 代码逻辑说明: 【issues-179】antd3 一些警告以及报错(针对表格)
if(column.slots?.customRender) {
// slots的备份,兼容老的写法,转成新写法避免控制台警告
column.slotsBak = column.slots;
delete column.slots;
}
- // update-end--author:liaozhiyang---date:20230718---for: 【issues-179】antd3 一些警告以及报错(针对表格)
const { slots, customRender, format, edit, editRow, flag, title: metaTitle } = column;
@@ -178,11 +173,10 @@ export function useColumns(
column.customTitle = column.title as string;
Reflect.deleteProperty(column, 'title');
}
- //update-begin-author:taoyan date:20211203 for:【online报表】分组标题显示错误,都显示成了联系信息 LOWCOD-2343
+ // 代码逻辑说明: 【online报表】分组标题显示错误,都显示成了联系信息 LOWCOD-2343
if (column.children) {
column.title = metaTitle;
}
- //update-end-author:taoyan date:20211203 for:【online报表】分组标题显示错误,都显示成了联系信息 LOWCOD-2343
const isDefaultAction = [INDEX_COLUMN_FLAG, ACTION_COLUMN_FLAG].includes(flag!);
if (!customRender && format && !edit && !isDefaultAction) {
@@ -195,18 +189,16 @@ export function useColumns(
if ((edit || editRow) && !isDefaultAction) {
column.customRender = renderEditCell(column);
}
- // update-begin--author:liaozhiyang---date:20241021---for:【pull/7333】修复分组表头可编辑表格失效问题
+ // 代码逻辑说明: 【pull/7333】修复分组表头可编辑表格失效问题
if (column.children?.length) {
formatEditColumn(column.children.filter((item) => hasPermission(column.auth) && isIfShow(column)));
}
- // update-end--author:liaozhiyang---date:20241021---for:【pull/7333】修复分组表头可编辑表格失效问题
return reactive(column);
});
};
- // update-begin--author:liaozhiyang---date:20241021---for:【pull/7333】修复分组表头可编辑表格失效问题
+ // 代码逻辑说明: 【pull/7333】修复分组表头可编辑表格失效问题
const result = formatEditColumn(columns.filter((item) => hasPermission(item.auth) && isIfShow(item)));
- // update-end--author:liaozhiyang---date:20241021---for:【pull/7333】修复分组表头可编辑表格失效问题
- // update-begin--author:liaozhiyang---date:20230919---for:【QQYUN-6387】展开写法(去掉报错)
+ // 代码逻辑说明: 【QQYUN-6387】展开写法(去掉报错)
if (propsRef.value.expandedRowKeys && !propsRef.value.isTreeTable) {
let index = 0;
const findIndex = result.findIndex((item) => item.key === CUS_SEL_COLUMN_KEY);
@@ -221,7 +213,6 @@ export function useColumns(
result.splice(index, 0, expand);
}
return result;
- // update-end--author:liaozhiyang---date:20230919---for:【QQYUN-6387】展开写法(去掉报错)
});
watch(
@@ -244,7 +235,6 @@ export function useColumns(
});
}
- // update-begin--author:sunjianlei---date:20220523---for: 【VUEN-1089】合并vben最新版代码,解决表格字段排序问题
/**
* set columns
* @param columnList key|column
@@ -282,7 +272,6 @@ export function useColumns(
columnsRef.value = newColumns;
}
}
- // update-end--author:sunjianlei---date:20220523---for: 【VUEN-1089】合并vben最新版代码,解决表格字段排序问题
function getColumns(opt?: GetColumnsParams) {
const { ignoreIndex, ignoreAction, ignoreAuth, ignoreIfShow, sort } = opt || {};
@@ -293,11 +282,9 @@ export function useColumns(
if (ignoreAction) {
columns = columns.filter((item) => item.flag !== ACTION_COLUMN_FLAG);
}
- // update-begin--author:sunjianlei---date:220230630---for:【QQYUN-5571】自封装选择列,解决数据行选择卡顿问题
// 过滤自定义选择列
columns = columns.filter((item) => item.key !== CUS_SEL_COLUMN_KEY);
- // update-enb--author:sunjianlei---date:220230630---for:【QQYUN-5571】自封装选择列,解决数据行选择卡顿问题
- // update-begin--author:liaozhiyang---date:20250729---for:【issues/8502】解决权限列在列表中不显示,列配置中还显示
+ // 代码逻辑说明: 【issues/8502】解决权限列在列表中不显示,列配置中还显示
if (ignoreAuth) {
columns = columns.filter((item) => {
if (item.auth) {
@@ -317,7 +304,6 @@ export function useColumns(
return true;
});
}
- // update-end--author:liaozhiyang---date:20250729---for:【issues/8502】解决权限列在列表中不显示,列配置中还显示
if (sort) {
columns = sortFixedColumn(columns);
}
diff --git a/jeecgboot-vue3/src/components/Table/src/hooks/useColumnsCache.ts b/jeecgboot-vue3/src/components/Table/src/hooks/useColumnsCache.ts
index 2d5f8e8e5..0572c8101 100644
--- a/jeecgboot-vue3/src/components/Table/src/hooks/useColumnsCache.ts
+++ b/jeecgboot-vue3/src/components/Table/src/hooks/useColumnsCache.ts
@@ -16,10 +16,9 @@ export function useColumnsCache(opt, setColumns, handleColumnFixed) {
const route = useRoute();
// 列表配置缓存key
const cacheKey = computed(() => {
- // update-begin--author:liaozhiyang---date:20240226---for:【QQYUN-8367】online报表配置列展示保存,影响到其他页面的table字段的显示隐藏(开发环境热更新会有此问题,生产环境无问题)
+ // 代码逻辑说明: 【QQYUN-8367】online报表配置列展示保存,影响到其他页面的table字段的显示隐藏(开发环境热更新会有此问题,生产环境无问题)
const path = route.path;
let key = path.replace(/[\/\\]/g, '_');
- // update-end--author:liaozhiyang---date:20240226---for:【QQYUN-8367】online报表配置列展示保存,影响到其他页面的table字段的显示隐藏(开发环境热更新会有此问题,生产环境无问题)
let cacheKey = table.getBindValues.value.tableSetting?.cacheKey;
if (cacheKey) {
key += ':' + cacheKey;
@@ -97,14 +96,13 @@ export function useColumnsCache(opt, setColumns, handleColumnFixed) {
/** 保存列配置 */
function saveSetting() {
const { checkedList } = opt.state;
- // update-begin--author:liaozhiyang---date:20240611---for:【TV360X-105】列展示设置问题[重置之后保存的顺序还是上次的]
+ // 代码逻辑说明: 【TV360X-105】列展示设置问题[重置之后保存的顺序还是上次的]
let sortedList = [];
if (opt.restAfterOptions.value) {
sortedList = opt.restAfterOptions.value.map((item) => item.value);
} else {
sortedList = unref(opt.plainSortOptions).map((item) => item.value);
}
- // update-end--author:liaozhiyang---date:20240611---for:【TV360X-105】列展示设置问题[重置之后保存的顺序还是上次的]
$ls.set(cacheKey.value, {
// 保存的列
checkedList,
diff --git a/jeecgboot-vue3/src/components/Table/src/hooks/useCustomRow.ts b/jeecgboot-vue3/src/components/Table/src/hooks/useCustomRow.ts
index 6d322ffec..3b87cd7fd 100644
--- a/jeecgboot-vue3/src/components/Table/src/hooks/useCustomRow.ts
+++ b/jeecgboot-vue3/src/components/Table/src/hooks/useCustomRow.ts
@@ -60,7 +60,7 @@ export function useCustomRow(
const isRadio = rowSelection.type === 'radio';
if (isRadio) {
- // update-begin--author:liaozhiyang---date:20231016---for:【QQYUN-6794】table列表增加radio禁用功能
+ // 代码逻辑说明: 【QQYUN-6794】table列表增加radio禁用功能
const rowSelection = propsRef.value.rowSelection;
if (rowSelection.getCheckboxProps) {
const result = rowSelection.getCheckboxProps(record);
@@ -68,7 +68,6 @@ export function useCustomRow(
return;
}
}
- // update-end--author:liaozhiyang---date:20231016---for:【QQYUN-6794】table列表增加radio禁用功能
if (!keys.includes(key)) {
if (keys.length) {
clearSelectedRowKeys();
@@ -76,10 +75,8 @@ export function useCustomRow(
setSelectedRowKeys([key]);
return;
} else {
- // update-begin--author:liaozhiyang---date:20240527---for:【TV360X-359】erp主表点击已选中的选到了最后一个
// 点击已经选中的,直接return不在做操作
return;
- // update-end--author:liaozhiyang---date:20240527---for:【TV360X-359】erp主表点击已选中的选到了最后一个
}
clearSelectedRowKeys();
}
diff --git a/jeecgboot-vue3/src/components/Table/src/hooks/useCustomSelection.tsx b/jeecgboot-vue3/src/components/Table/src/hooks/useCustomSelection.tsx
index 2f9a76d08..1af2ae552 100644
--- a/jeecgboot-vue3/src/components/Table/src/hooks/useCustomSelection.tsx
+++ b/jeecgboot-vue3/src/components/Table/src/hooks/useCustomSelection.tsx
@@ -47,7 +47,7 @@ export function useCustomSelection(
// 扁平化数据,children数据也会放到一起
const flattedData = computed(() => {
- // update-begin--author:liaozhiyang---date:20231016---for:【QQYUN-6774】解决checkbox禁用后全选仍能勾选问题
+ // 代码逻辑说明: 【QQYUN-6774】解决checkbox禁用后全选仍能勾选问题
const data = flattenData(tableData.value, childrenColumnName.value);
const rowSelection = propsRef.value.rowSelection;
if (rowSelection?.type === 'checkbox' && rowSelection.getCheckboxProps) {
@@ -62,7 +62,6 @@ export function useCustomSelection(
}
}
return data;
- // update-end--author:liaozhiyang---date:20231016---for:【QQYUN-6774】解决checkbox禁用后全选仍能勾选问题
});
const getRowSelectionRef = computed((): TableRowSelection | null => {
@@ -122,10 +121,8 @@ export function useCustomSelection(
onSelectAll,
isRadio: isRadio.value,
selectedLength: flattedData.value.filter((data) => selectedKeys.value.includes(getRecordKey(data))).length,
- // update-begin--author:liaozhiyang---date:20240511---for:【QQYUN-9289】解决表格条数不足pageSize数量时行数全部勾选但是全选框不勾选
// 【TV360X-53】为空时会报错,加强判断
pageSize: flattedData.value?.length ?? 0,
- // update-end--author:liaozhiyang---date:20240511---for:【QQYUN-9289】解决表格条数不足pageSize数量时行数全部勾选但是全选框不勾选
// 【QQYUN-6774】解决checkbox禁用后全选仍能勾选问题
disabled: flattedData.value.length == 0,
hideSelectAll: unref(propsRef)?.rowSelection?.hideSelectAll,
@@ -133,19 +130,17 @@ export function useCustomSelection(
});
// 监听传入的selectedRowKeys
- // update-begin--author:liaozhiyang---date:20240306---for:【QQYUN-8390】部门人员组件点击重置未清空(selectedRowKeys.value=[],watch没监听到加deep)
+ // 代码逻辑说明: 【QQYUN-8390】部门人员组件点击重置未清空(selectedRowKeys.value=[],watch没监听到加deep)
watch(
() => unref(propsRef)?.rowSelection?.selectedRowKeys,
(val: string[]) => {
// 解决selectedRowKeys在页面调用处使用ref失效
const value = unref(val);
if (Array.isArray(value) && !sameArray(value, selectedKeys.value)) {
- // update-begin--author:liaozhiyang---date:20250429---for:【issues/8163】关联记录夸页数据丢失
// 延迟是为了等watch selectedRows
setTimeout(() => {
setSelectedRowKeys(value);
}, 0);
- // update-end--author:liaozhiyang---date:20250429---for:【issues/8163】关联记录夸页数据丢失
}
},
{
@@ -153,8 +148,6 @@ export function useCustomSelection(
deep: true
}
);
- // update-end--author:liaozhiyang---date:20240306---for:【QQYUN-8390】部门人员组件点击重置未清空(selectedRowKeys.value=[],watch没监听到加deep)
- // update-begin--author:liaozhiyang---date:20250429---for:【issues/8163】关联记录夸页数据丢失
// 编辑时selectedRows可能会回填
watch(
() => unref(propsRef)?.rowSelection?.selectedRows,
@@ -169,7 +162,6 @@ export function useCustomSelection(
deep: true,
}
);
- // update-end--author:liaozhiyang---date:20250429---for:【issues/8163】关联记录夸页数据丢失
/**
* 2024-03-06
* liaozhiyang
@@ -183,11 +175,10 @@ export function useCustomSelection(
return false;
}
} else {
- // update-begin--author:liaozhiyang---date:20240425---for:【QQYUN-9123】popupdict打开弹窗打开程序运行
+ // 代码逻辑说明: 【QQYUN-9123】popupdict打开弹窗打开程序运行
if (isEqual(a, b)) {
return true;
}
- // update-end--author:liaozhiyang---date:20240425---for:【QQYUN-9123】popupdict打开弹窗打开程序运行
return false;
}
}
@@ -205,10 +196,8 @@ export function useCustomSelection(
let bodyResizeObserver: Nullable = null;
// 获取首行行高
watchEffect(() => {
- // update-begin--author:liaozhiyang---date:20241111---for:【issues/7442】basicTable从默认切换到宽松紧凑时多选框显示异常
// 这种写法是为了监听到 size 的变化
propsRef.value.size && void 0;
- // update-end--author:liaozhiyang---date:20241111---for:【issues/7442】basicTable从默认切换到宽松紧凑时多选框显示异常
if (bodyEl.value) {
// 监听div高度变化
bodyResizeObserver = new ResizeObserver((entries) => {
@@ -242,24 +231,21 @@ export function useCustomSelection(
function updateRowHeight() {
const el = bodyEl.value?.querySelector('tbody.ant-table-tbody tr.ant-table-row') as HTMLDivElement;
if (el) {
- // update-begin--author:liaozhiyang---date:20241111---for:【issues/7442】basicTable从默认切换到宽松紧凑时多选框显示异常
+ // 代码逻辑说明: 【issues/7442】basicTable从默认切换到宽松紧凑时多选框显示异常
nextTick(() => rowHeight.value = el.offsetHeight);
- // update-end--author:liaozhiyang---date:20241111---for:【issues/7442】basicTable从默认切换到宽松紧凑时多选框显示异常
}
}
// 选择全部
function onSelectAll(checked: boolean, flag = 'currentPage') {
- // update-begin--author:liaozhiyang---date:20231122---for:【issues/5577】BasicTable组件全选和取消全选时不触发onSelectAll事件
+ // 代码逻辑说明: 【issues/5577】BasicTable组件全选和取消全选时不触发onSelectAll事件
if (unref(propsRef)?.rowSelection?.onSelectAll) {
allSelected = checked;
changeRows = getInvertRows(selectedRows.value, checked, flag);
}
- // update-end--author:liaozhiyang---date:20231122---for:【issues/5577】BasicTable组件全选和取消全选时不触发onSelectAll事件
// 取消全选
if (!checked) {
- // update-begin--author:liaozhiyang---date:20240510---for:【issues/1173】取消全选只是当前页面取消
- // update-begin--author:liaozhiyang---date:20240808---for:【issues/6958】取消没触发onSelectAll事件,跨页选中后 changeRows 为空
+ // 代码逻辑说明: 【issues/6958】取消没触发onSelectAll事件,跨页选中后 changeRows 为空
if (flag === 'allPage') {
selectedKeys.value = [];
selectedRows.value = [];
@@ -269,8 +255,6 @@ export function useCustomSelection(
});
}
emitChange('all');
- // update-end--author:liaozhiyang---date:20240808---for:【issues/6958】取消没触发onSelectAll事件,跨页选中后 changeRows 为空
- // update-end--author:liaozhiyang---date:20240510---for:【issues/1173】取消全选只是当前页面取消
return;
}
let modal: Nullable> = null;
@@ -333,9 +317,8 @@ export function useCustomSelection(
} else {
setTimeout(() => {
emitChange('all');
- // update-begin--author:liaozhiyang---date:20230811---for:【QQYUN-5687】批量选择,提示成功后,又来一个提示
+ // 代码逻辑说明: 【QQYUN-5687】批量选择,提示成功后,又来一个提示
setTimeout(() =>resolve(), 0);
- // update-end--author:liaozhiyang---date:20230811---for:【QQYUN-5687】批量选择,提示成功后,又来一个提示
}, 500);
}
}, 300);
@@ -348,9 +331,8 @@ export function useCustomSelection(
onSelectChild(record, checked);
updateSelected(record, checked);
onSelectParent(record, checked);
- // update-begin--author:liaozhiyang---date:20250813---for:【issues/8690】BasicTable的rowSelection新增onSelect方法
+ // 代码逻辑说明: 【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();
}
@@ -373,12 +355,11 @@ export function useCustomSelection(
selectedRows.value.splice(index, 1);
}
}
- // update-begin--author:liaozhiyang---date:20240919---for:【issues/7200】basicTable选中后没有选中样式
+ // 代码逻辑说明: 【issues/7200】basicTable选中后没有选中样式
clearTimeout(timer);
timer = setTimeout(() => {
selectedKeys.value = [...selectedKeys.value];
}, 0);
- // update-end--author:liaozhiyang---date:20240919---for:【issues/7200】basicTable选中后没有选中样式
}
// 调用用户自定义的onChange事件
@@ -396,16 +377,14 @@ export function useCustomSelection(
keys: getSelectRowKeys(),
rows: getSelectRows(),
});
- // update-begin--author:liaozhiyang---date:20231122---for:【issues/5577】BasicTable组件全选和取消全选时不触发onSelectAll事件
+ // 代码逻辑说明: 【issues/5577】BasicTable组件全选和取消全选时不触发onSelectAll事件
if (mode == 'all') {
const rowSelection = unref(propsRef)?.rowSelection;
if (rowSelection?.onSelectAll) {
rowSelection.onSelectAll(allSelected, toRaw(getSelectRows()), toRaw(changeRows));
}
}
- // update-end--author:liaozhiyang---date:20231122---for:【issues/5577】BasicTable组件全选和取消全选时不触发
}
- // update-begin--author:liusq---date:20240819---for:树形表格设置层级关联不生效
/**
* 层级关联时,选中下级数据
* @param record
@@ -423,7 +402,6 @@ export function useCustomSelection(
}
}
}
- // update-end--author:liusq---date:20240819---for:树形表格设置层级关联不生效
/**
* 2024-09-24
* liaozhiyang
@@ -505,7 +483,7 @@ export function useCustomSelection(
// 自定义渲染Body
function bodyCustomRender(params) {
const { index } = params;
- // update-begin--author:liaozhiyang---date:20231009--for:【issues/776】显示100条/页,复选框只能显示3个的问题
+ // 代码逻辑说明: 【issues/776】显示100条/页,复选框只能显示3个的问题
if (propsRef.value.canResize && !recordIsShow(index)) {
return '';
}
@@ -514,7 +492,6 @@ export function useCustomSelection(
} else {
return renderCheckboxComponent(params);
}
- // update-end--author:liaozhiyang---date:20231009---for:【issues/776】显示100条/页,复选框只能显示3个的问题
}
/**
@@ -539,9 +516,8 @@ export function useCustomSelection(
key={'j-select__' + recordKey}
checked={selectedKeys.value.includes(recordKey)}
onUpdate:checked={(checked) => onSelect(record, checked)}
- // update-begin--author:liaozhiyang---date:20230326---for:【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次
+ // 代码逻辑说明: 【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次
onClick={(e) => e.stopPropagation()}
- // update-end--author:liaozhiyang---date:20230326---for:【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次
/>
);
}
@@ -551,7 +527,6 @@ export function useCustomSelection(
*/
function renderRadioComponent({ record }) {
const recordKey = getRecordKey(record);
- // update-begin--author:liaozhiyang---date:20231016---for:【QQYUN-6794】table列表增加radio禁用功能
// 获取用户自定义radioProps
const checkboxProps = (() => {
const rowSelection = propsRef.value.rowSelection;
@@ -560,29 +535,27 @@ export function useCustomSelection(
}
return {};
})();
- // update-end--author:liaozhiyang---date:20231016---for:【QQYUN-6794】table列表增加radio禁用功能
return (
onSelect(record, checked)}
- // update-begin--author:liaozhiyang---date:20230326---for:【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次
+ // 代码逻辑说明: 【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次
onClick={(e) => e.stopPropagation()}
- // update-end--author:liaozhiyang---date:20230326---for:【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次
/>
);
}
// 创建选择列
function handleCustomSelectColumn(columns: BasicColumn[]) {
- // update-begin--author:liaozhiyang---date:20230919---for:【issues/757】JPopup表格的选择列固定配置不生效
+ // 代码逻辑说明: 【issues/757】JPopup表格的选择列固定配置不生效
const rowSelection = propsRef.value.rowSelection;
if (!rowSelection) {
return;
}
const isFixedLeft = rowSelection.fixed || columns.some((item) => item.fixed === 'left');
- // update-begin--author:liaozhiyang---date:20230919---for:【issues/757】JPopup表格的选择列固定配置不生效
+ // 代码逻辑说明: 【issues/757】JPopup表格的选择列固定配置不生效
columns.unshift({
title: '选择列',
flag: 'CHECKBOX',
@@ -604,12 +577,10 @@ export function useCustomSelection(
// 通过 selectedKeys 同步 selectedRows
function syncSelectedRows() {
if (selectedKeys.value.length !== selectedRows.value.length) {
- // update-begin--author:liaozhiyang---date:20250429---for:【issues/8163】关联记录夸页数据丢失
// 延迟是为了等watch selectedRows
setTimeout(() => {
setSelectedRowKeys(selectedKeys.value);
}, 0);
- // update-end--author:liaozhiyang---date:20250429---for:【issues/8163】关联记录夸页数据丢失
}
}
@@ -629,12 +600,11 @@ export function useCustomSelection(
const found = allSelectedRows.find((item) => getRecordKey(item) === key);
found && trueSelectedRows.push(found);
});
- // update-begin--author:liaozhiyang---date:20231103---for:【issues/828】解决卡死问题
+ // 代码逻辑说明: 【issues/828】解决卡死问题
if (!(isSomeRowKeys && equal(selectedRows.value, trueSelectedRows))) {
selectedRows.value = trueSelectedRows;
emitChange();
}
- // update-end--author:liaozhiyang---date:20231103---for:【issues/828】解决卡死问题
}
/**
*2023-11-03
diff --git a/jeecgboot-vue3/src/components/Table/src/hooks/useDataSource.ts b/jeecgboot-vue3/src/components/Table/src/hooks/useDataSource.ts
index e019d279a..1520d7b5e 100644
--- a/jeecgboot-vue3/src/components/Table/src/hooks/useDataSource.ts
+++ b/jeecgboot-vue3/src/components/Table/src/hooks/useDataSource.ts
@@ -11,9 +11,8 @@ interface ActionType {
getPaginationInfo: ComputedRef;
setPagination: (info: Partial) => void;
setLoading: (loading: boolean) => void;
- // update-begin--author:sunjianlei---date:220220419---for:由于 getFieldsValue 返回的不是逗号分割的数据,所以改用 validate
+ // 代码逻辑说明: 由于 getFieldsValue 返回的不是逗号分割的数据,所以改用 validate
validate: () => Recordable;
- // update-end--author:sunjianlei---date:220220419---for:由于 getFieldsValue 返回的不是逗号分割的数据,所以改用 validate
clearSelectedRowKeys: () => void;
tableData: Ref;
}
@@ -133,11 +132,10 @@ export function useDataSource(
if (row) {
for (const field in row) {
if (Reflect.has(record, field)) row[field] = record[field];
- //update-begin---author:wangshuai---date:2024-06-11---for:【TV360X-437】树表 部分组件编辑完后,列表未刷新---
+ // 代码逻辑说明: 【TV360X-437】树表 部分组件编辑完后,列表未刷新---
if (Reflect.has(record, field + '_dictText')) {
row[field + '_dictText'] = record[field + '_dictText'];
}
- //update-end---author:wangshuai---date:2024-06-11---for:【TV360X-437】树表 部分组件编辑完后,列表未刷新---
}
return row;
}
@@ -261,14 +259,13 @@ export function useDataSource(
if (beforeFetch && isFunction(beforeFetch)) {
params = (await beforeFetch(params)) || params;
}
- // update-begin--author:liaozhiyang---date:20240227---for:【QQYUN-8316】table查询条件,请求剔除空字符串字段
+ // 代码逻辑说明: 【QQYUN-8316】table查询条件,请求剔除空字符串字段
for (let item of Object.entries(params)) {
const [key, val] = item;
if (val === '') {
delete params[key];
};
};
- // update-end--author:liaozhiyang---date:20240227---for:【QQYUN-8316】table查询条件,请求剔除空字符串字段
const res = await api(params);
rawDataSourceRef.value = res;
diff --git a/jeecgboot-vue3/src/components/Table/src/hooks/useRowSelection.ts b/jeecgboot-vue3/src/components/Table/src/hooks/useRowSelection.ts
index c9ee5e29e..538c69d55 100644
--- a/jeecgboot-vue3/src/components/Table/src/hooks/useRowSelection.ts
+++ b/jeecgboot-vue3/src/components/Table/src/hooks/useRowSelection.ts
@@ -44,7 +44,6 @@ export function useRowSelection(propsRef: ComputedRef, tableDat
const { onChange } = rowSelection;
if (onChange && isFunction(onChange)) onChange(getSelectRowKeys(), getSelectRows());
}
- //update-begin---author:scott ---date:2023-06-19 for:【issues/503】table行选择时卡顿明显 #503---
//table行选择时卡顿明显 #503
if (unref(tableData).length > 0) {
emit('selection-change', {
@@ -52,7 +51,6 @@ export function useRowSelection(propsRef: ComputedRef, tableDat
rows: getSelectRows(),
});
}
- //update-end---author:scott ---date::2023-06-19 for:【issues/503】table行选择时卡顿明显 #503---
});
},
{ deep: true }
diff --git a/jeecgboot-vue3/src/components/Table/src/hooks/useTableContext.ts b/jeecgboot-vue3/src/components/Table/src/hooks/useTableContext.ts
index b657bb27e..7ea141ccd 100644
--- a/jeecgboot-vue3/src/components/Table/src/hooks/useTableContext.ts
+++ b/jeecgboot-vue3/src/components/Table/src/hooks/useTableContext.ts
@@ -2,7 +2,9 @@ import type { Ref } from 'vue';
import type { BasicTableProps, TableActionType } from '../types/table';
import { provide, inject, ComputedRef } from 'vue';
-const key = Symbol('basic-table');
+// 为每个表格实例创建唯一的 Symbol key,避免父子组件或同级组件间的 context 冲突
+// Vue 的 provide/inject 是按组件树传递的,使用唯一 Symbol 可以确保每个 BasicTable 实例独立
+let tableIdCounter = 0;
type Instance = TableActionType & {
wrapRef: Ref>;
@@ -14,9 +16,18 @@ type RetInstance = Omit & {
};
export function createTableContext(instance: Instance) {
+ // 每次创建 context 时都生成新的唯一 Symbol
+ const key = Symbol(`basic-table-${++tableIdCounter}`);
provide(key, instance);
+ // 同时提供一个内部标记,让子组件能获取到这个 key
+ provide('__BASIC_TABLE_CONTEXT_KEY__', key);
}
export function useTableContext(): RetInstance {
+ // 从最近的父组件获取 context key
+ const key = inject('__BASIC_TABLE_CONTEXT_KEY__');
+ if (!key) {
+ throw new Error('useTableContext must be used after createTableContext');
+ }
return inject(key) as RetInstance;
}
diff --git a/jeecgboot-vue3/src/components/Table/src/hooks/useTableFooter.ts b/jeecgboot-vue3/src/components/Table/src/hooks/useTableFooter.ts
index bc19cd2de..bb8284767 100644
--- a/jeecgboot-vue3/src/components/Table/src/hooks/useTableFooter.ts
+++ b/jeecgboot-vue3/src/components/Table/src/hooks/useTableFooter.ts
@@ -44,7 +44,7 @@ export function useTableFooter(
const tableEl = unref(tableElRef);
if (!tableEl) return;
let bodyDom;
- // update-begin--author:liaozhiyang---date:20241111---for:【issues/7422】BasicTable列表canResize属性为true时合计行不能横向滚动
+ // 代码逻辑说明: 【issues/7422】BasicTable列表canResize属性为true时合计行不能横向滚动
if (canResize) {
setTimeout(() => {
bodyDom = tableEl.$el.querySelector('.ant-table-body');
@@ -65,7 +65,6 @@ export function useTableFooter(
options: true,
});
}, 0);
- // update-end--author:liaozhiyang---date:20241111---for:【issues/7422】BasicTable列表canResize属性为true时合计行不能横向滚动
});
}
return { getFooterProps };
diff --git a/jeecgboot-vue3/src/components/Table/src/hooks/useTableForm.ts b/jeecgboot-vue3/src/components/Table/src/hooks/useTableForm.ts
index 2add5e16b..1ad738d64 100644
--- a/jeecgboot-vue3/src/components/Table/src/hooks/useTableForm.ts
+++ b/jeecgboot-vue3/src/components/Table/src/hooks/useTableForm.ts
@@ -18,9 +18,8 @@ export function useTableForm(
...formConfig,
submitButtonOptions: { loading: unref(getLoading), ...submitButtonOptions },
compact: true,
- //update-begin-author:liusq---date:20230605--for: [issues/568]设置 autoSubmitOnEnter: false 不生效 ---
+ // 代码逻辑说明: [issues/568]设置 autoSubmitOnEnter: false 不生效 ---
autoSubmitOnEnter: autoSubmitOnEnter,
- //update-end-author:liusq---date:20230605--for: [issues/568]设置 autoSubmitOnEnter: false 不生效 ---
};
});
diff --git a/jeecgboot-vue3/src/components/Table/src/hooks/useTableScroll.ts b/jeecgboot-vue3/src/components/Table/src/hooks/useTableScroll.ts
index f25918c27..395e664ca 100644
--- a/jeecgboot-vue3/src/components/Table/src/hooks/useTableScroll.ts
+++ b/jeecgboot-vue3/src/components/Table/src/hooks/useTableScroll.ts
@@ -68,9 +68,8 @@ export function useTableScroll(
if (!tableEl) return;
if (!bodyEl) {
- //update-begin-author:taoyan date:2023-2-11 for: issues/355 前端-jeecgboot-vue3 3.4.4版本,BasicTable高度自适应功能失效,设置BasicTable组件maxHeight失效; 原因已找到,请看详情
+ // 代码逻辑说明: issues/355 前端-jeecgboot-vue3 3.4.4版本,BasicTable高度自适应功能失效,设置BasicTable组件maxHeight失效; 原因已找到,请看详情
bodyEl = tableEl.querySelector('.ant-table-tbody');
- //update-end-author:taoyan date:2023-2-11 for: issues/355 前端-jeecgboot-vue3 3.4.4版本,BasicTable高度自适应功能失效,设置BasicTable组件maxHeight失效; 原因已找到,请看详情
if (!bodyEl) return;
}
@@ -121,13 +120,12 @@ export function useTableScroll(
}
let footerHeight = 0;
- // update-begin--author:liaozhiyang---date:20240424---for:【issues/1137】BasicTable自适应高度计算没有减去尾部高度
+ // 代码逻辑说明: 【issues/1137】BasicTable自适应高度计算没有减去尾部高度
footerEl = tableEl.querySelector('.ant-table-footer');
if (footerEl) {
const offsetHeight = footerEl.offsetHeight;
footerHeight = offsetHeight || 0;
}
- // update-end--author:liaozhiyang---date:20240424---for:【issues/1137】BasicTable自适应高度计算没有减去尾部高度
let headerHeight = 0;
if (headEl) {
@@ -138,8 +136,15 @@ export function useTableScroll(
// update-begin--author:liaozhiyang---date:20240603---for【TV360X-861】列表查询区域不可往上滚动
// 10+6(外层边距padding:10 + 内层padding-bottom:6)
height -= 16;
- // update-end--author:liaozhiyang---date:20240603---for:【TV360X-861】列表查询区域不可往上滚动
-
+ // 代码逻辑说明: 【issues/8880】BasicTable组件在modal中适应高度
+ try {
+ // 当BasicTable在BasicModal容器中时,扣减容器底部高度
+ const modalFooter = tableEl.closest('.ant-modal-root')?.querySelector('.ant-modal-footer');
+ if (modalFooter) {
+ const { bottomIncludeBody: modalFooterHeight } = getViewportOffset(modalFooter);
+ height = height - modalFooterHeight;
+ }
+ } catch (e) {}
height = (height < minHeight! ? (minHeight as number) : height) ?? height;
height = (height > maxHeight! ? (maxHeight as number) : height) ?? height;
setHeight(height);
@@ -158,13 +163,11 @@ export function useTableScroll(
const trHeight = lastrEl.offsetHeight;
const dataHeight = trHeight * pageSize;
if (tableBody && lastrEl) {
- // update-begin--author:liaozhiyang---date:20250702---for:【issues/8532】online权限管理中的按钮权限第一页数据看不到
// table是否隐藏(隐藏的table不能吸底)
const isTableBodyHide = tableBody.offsetHeight == 0 && tableBody.offsetWidth == 0;
if (isTableBodyHide) {
return;
}
- // update-end--author:liaozhiyang---date:20250702---for:【issues/8532】online权限管理中的按钮权限第一页数据看不到
if (current === 1 && pageSize > unref(getDataSourceRef).length && total <= pageSize) {
tableBody.style.height = `${height}px`;
} else {
@@ -186,16 +189,13 @@ export function useTableScroll(
const getScrollX = computed(() => {
let width = 0;
- // update-begin--author:liaozhiyang---date:20230922---for:【QQYUN-6391】在线表单列表字段过多时,列头和数据对不齐
// if (unref(rowSelectionRef)) {
// width += 60;
// }
- // update-end--author:liaozhiyang---date:20230922---for:【QQYUN-6391】在线表单列表字段过多时,列头和数据对不齐
- // update-begin--author:liaozhiyang---date:20230925---for:【issues/5411】BasicTable 配置maxColumnWidth 未生效
+ // 代码逻辑说明: 【issues/5411】BasicTable 配置maxColumnWidth 未生效
const { maxColumnWidth } = unref(propsRef);
// TODO props ?? 0;
const NORMAL_WIDTH = maxColumnWidth ?? 150;
- // update-end--author:liaozhiyang---date:20230925---for:【issues/5411】BasicTable 配置maxColumnWidth 未生效
// date-begin--author:liaozhiyang---date:20250716---for:【QQYUN-13122】有数十个字段时只展示2个字段,其余字段为ifShow:false会有滚动条
const columns = unref(columnsRef).filter((item) => !(item.defaultHidden == true || item.ifShow == false))
// date-end--author:liaozhiyang---date:20250716---for:【QQYUN-13122】有数十个字段时只展示2个字段,其余字段为ifShow:false会有滚动条
@@ -208,11 +208,10 @@ export function useTableScroll(
if (len !== 0) {
width += len * NORMAL_WIDTH;
}
- // update-begin--author:liaozhiyang---date:202401009---for:【TV360X-116】内嵌风格字段较多时表格错位
+ // 代码逻辑说明: 【TV360X-116】内嵌风格字段较多时表格错位
if (slots.expandedRowRender) {
width += propsRef.value.expandColumnWidth;
}
- // update-end--author:liaozhiyang---date:202401009---for:【TV360X-116】内嵌风格字段较多时表格错位
const table = unref(tableElRef);
const tableWidth = table?.$el?.offsetWidth ?? 0;
return tableWidth > width ? '100%' : width;
@@ -225,9 +224,8 @@ export function useTableScroll(
return {
x: unref(getScrollX),
y: canResize ? tableHeight : null,
- // update-begin--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义
+ // 代码逻辑说明: 【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义
scrollToFirstRowOnChange: table.scrollToFirstRowOnChange,
- // update-end--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义
...scroll,
};
});
diff --git a/jeecgboot-vue3/src/components/Table/src/hooks/useTableStyle.ts b/jeecgboot-vue3/src/components/Table/src/hooks/useTableStyle.ts
index f15aa7c09..4a0a7527e 100644
--- a/jeecgboot-vue3/src/components/Table/src/hooks/useTableStyle.ts
+++ b/jeecgboot-vue3/src/components/Table/src/hooks/useTableStyle.ts
@@ -45,11 +45,10 @@ export function useTableStyle(propsRef: ComputedRef, prefixCls:
if (rowClassName && isFunction(rowClassName)) {
classNames.push(rowClassName(record, index));
}
- // update-begin--author:liaozhiyang---date:20240919---for:【issues/7200】basicTable选中后没有选中样式
+ // 代码逻辑说明: 【issues/7200】basicTable选中后没有选中样式
if (isChecked(propsRef, record)) {
classNames.push('ant-table-row-selected');
}
- // update-end--author:liaozhiyang---date:20240919---for:【issues/7200】basicTable选中后没有选中样式
return classNames.filter((cls) => !!cls).join(' ');
}
diff --git a/jeecgboot-vue3/src/components/Table/src/props.ts b/jeecgboot-vue3/src/components/Table/src/props.ts
index e46882ef9..337859f40 100644
--- a/jeecgboot-vue3/src/components/Table/src/props.ts
+++ b/jeecgboot-vue3/src/components/Table/src/props.ts
@@ -108,9 +108,8 @@ export const basicProps = {
},
minHeight: propTypes.number,
maxHeight: propTypes.number,
- // update-begin--author:liaozhiyang---date:202401009---for:【TV360X-116】内嵌风格字段较多时表格错位
+ // 代码逻辑说明: 【TV360X-116】内嵌风格字段较多时表格错位
expandColumnWidth: propTypes.number.def(48),
- // update-end--author:liaozhiyang---date:202401009---for:【TV360X-116】内嵌风格字段较多时表格错位
// 统一设置列最大宽度
maxColumnWidth: propTypes.number,
dataSource: {
@@ -131,9 +130,8 @@ export const basicProps = {
type: Function as PropType<(record: TableCustomRecord, index: number) => string>,
},
scroll: {
- // update-begin--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义
+ // 代码逻辑说明: 【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义
type: Object as PropType<{ x?: number | true; y?: number; scrollToFirstRowOnChange?: boolean }>,
- // update-end--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义
default: null,
},
beforeEditSubmit: {
diff --git a/jeecgboot-vue3/src/components/Table/src/types/column.ts b/jeecgboot-vue3/src/components/Table/src/types/column.ts
index 5637c197e..67a7194e6 100644
--- a/jeecgboot-vue3/src/components/Table/src/types/column.ts
+++ b/jeecgboot-vue3/src/components/Table/src/types/column.ts
@@ -173,9 +173,8 @@ export interface ColumnProps {
* @type object
*/
customHeaderCell?: (column: ColumnProps) => object;
- // update-begin--author:liaozhiyang---date:20240425---for:【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计)
+ // 代码逻辑说明: 【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计)
customSummaryRender?: CustomRenderFunction | VNodeChild | JSX.Element;
- // update-end--author:liaozhiyang---date:20240425---for:【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计)
/**
* Callback executed when the confirm filter button is clicked, Use as a filter event when using template or jsx
diff --git a/jeecgboot-vue3/src/components/Table/src/types/pagination.ts b/jeecgboot-vue3/src/components/Table/src/types/pagination.ts
index 6bc559959..fbaae05bb 100644
--- a/jeecgboot-vue3/src/components/Table/src/types/pagination.ts
+++ b/jeecgboot-vue3/src/components/Table/src/types/pagination.ts
@@ -98,11 +98,9 @@ export interface PaginationProps {
* @type Function
*/
itemRender?: (props: PaginationRenderProps) => VNodeChild | JSX.Element;
- // update-begin--author:liaozhiyang---date:20250423---for:【pull/8013】修复 BasicTable position 属性类型配置
/**
* specify the position of Pagination
* @type Position[]
*/
position?: Position[];
- // update-end--author:liaozhiyang---date:20250423---for:【pull/8013】修复 BasicTable position 属性类型配置
}
diff --git a/jeecgboot-vue3/src/components/Table/src/types/table.ts b/jeecgboot-vue3/src/components/Table/src/types/table.ts
index aef5ca99b..10de405ad 100644
--- a/jeecgboot-vue3/src/components/Table/src/types/table.ts
+++ b/jeecgboot-vue3/src/components/Table/src/types/table.ts
@@ -80,10 +80,9 @@ export interface FetchParams {
export interface GetColumnsParams {
ignoreIndex?: boolean;
ignoreAction?: boolean;
- // update-begin--author:liaozhiyang---date:20250729---for:【issues/8502】解决权限列在列表中不显示,列配置中还显示
+ // 代码逻辑说明: 【issues/8502】解决权限列在列表中不显示,列配置中还显示
ignoreAuth?: boolean;
ignoreIfShow?: boolean | ((column: BasicColumn) => boolean);
- // update-end--author:liaozhiyang---date:20250729---for:【issues/8502】解决权限列在列表中不显示,列配置中还显示
sort?: boolean;
}
@@ -228,10 +227,8 @@ export interface BasicTableProps {
maxHeight?: number;
// 是否显示边框
bordered?: boolean;
- // update-begin--author:liaozhiyang---date:202401009---for:【TV360X-116】内嵌风格字段较多时表格错位
// 展开列宽度
expandColumnWidth: number;
- // update-end--author:liaozhiyang---date:202401009---for:【TV360X-116】内嵌风格字段较多时表格错位
// 分页配置
pagination?: PaginationProps | boolean;
// loading加载
@@ -331,9 +328,8 @@ export interface BasicTableProps {
* you need to add style .ant-table td { white-space: nowrap; }.
* @type object
*/
- // update-begin--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义
+ // 代码逻辑说明: 【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义
scroll?: { x?: number | true | 'max-content'; y?: number; scrollToFirstRowOnChange?: boolean };
- // update-end--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义
/**
* Whether to show table header
@@ -438,9 +434,8 @@ export interface BasicColumn extends ColumnProps {
//
flag?: 'INDEX' | 'DEFAULT' | 'CHECKBOX' | 'RADIO' | 'ACTION';
- // update-begin--author:liaozhiyang---date:20240724---for:【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换
+ // 代码逻辑说明: 【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换
title: string | Fn;
- // update-end--author:liaozhiyang---date:20240724---for:【issues/6908】多语言无刷新切换时,BasicColumn和FormSchema里面的值不能正常切换
customTitle?: VueNode;
slots?: Recordable;
@@ -460,9 +455,8 @@ export interface BasicColumn extends ColumnProps {
editRow?: boolean;
editable?: boolean;
editComponent?: ComponentType;
- // update-begin--author:liaozhiyang---date:20250818---for:【issues/8680】editComponentProps可接受一个函数传入record
+ // 代码逻辑说明: 【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);
editValueMap?: (value: any) => string;
onEditRow?: () => void;
@@ -472,7 +466,7 @@ export interface BasicColumn extends ColumnProps {
ifShow?: boolean | ((column: BasicColumn) => boolean);
//compType-用于记录类型
compType?: string;
- // update-begin--author:liaozhiyang---date:20240425---for:【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计)
+ // 代码逻辑说明: 【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计)
customSummaryRender?: (opt: {
value: any;
text: any;
@@ -481,7 +475,6 @@ export interface BasicColumn extends ColumnProps {
renderIndex?: number;
column: BasicColumn;
}) => any | VNodeChild | JSX.Element;
- // update-end--author:liaozhiyang---date:20240425---for:【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计)
// 额外的属性
extraProps?: Recordable;
}
diff --git a/jeecgboot-vue3/src/components/Tinymce/src/Editor.vue b/jeecgboot-vue3/src/components/Tinymce/src/Editor.vue
index d66713e5e..7f9a805bd 100644
--- a/jeecgboot-vue3/src/components/Tinymce/src/Editor.vue
+++ b/jeecgboot-vue3/src/components/Tinymce/src/Editor.vue
@@ -1,6 +1,5 @@
-
-
@@ -47,6 +45,7 @@
import { uploadFile } from '/@/api/common/api';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { ThemeEnum } from '/@/enums/appEnum';
+ import { defHttp } from "@/utils/http/axios";
const tinymceProps = {
options: {
type: Object as PropType
>,
@@ -140,11 +139,10 @@
const initOptions = computed(() => {
const { height, options, toolbar, plugins, menubar } = props;
let publicPath = import.meta.env.VITE_PUBLIC_PATH || '/';
- // update-begin--author:liaozhiyang---date:20240320---for:【QQYUN-8571】发布路径不以/结尾资源会加载失败
+ // 代码逻辑说明: 【QQYUN-8571】发布路径不以/结尾资源会加载失败
if (!publicPath.endsWith('/')) {
publicPath += '/';
}
- // update-end--author:liaozhiyang---date:20240320---for:【QQYUN-8571】发布路径不以/结尾资源会加载失败
return {
selector: `#${unref(tinymceId)}`,
height,
@@ -180,9 +178,8 @@
link_title: false,
object_resizing: true,
toolbar_mode: 'sliding',
- //update-begin---author:wangshuai---date:2024-08-01---for:【TV360X-416】单表代码生成,表单打开时,会先聚焦富文本组件,并滚动到富文本组件所在的位置---
+ // 代码逻辑说明: 【TV360X-416】单表代码生成,表单打开时,会先聚焦富文本组件,并滚动到富文本组件所在的位置---
auto_focus: props.autoFocus,
- //update-end---author:wangshuai---date:2024-08-01---for:【TV360X-416】单表代码生成,表单打开时,会先聚焦富文本组件,并滚动到富文本组件所在的位置---
// toolbar_groups: true,
skin: skinName.value,
skin_url: publicPath + 'resource/tinymce/skins/ui/' + skinName.value,
@@ -213,6 +210,81 @@
setup: (editor: any) => {
editorRef.value = editor;
editor.on('init', (e) => initSetup(e));
+ //update-begin-author:liusq---date:2025-11-19--for: JHHB-1070 从word复制的表格不能对齐
+ // 表格对齐功能
+ initTableAlignment(editor);
+ //update-end-author:liusq---date:2025-11-19--for: JHHB-1070 从word复制的表格不能对齐
+ // 在编辑器内部处理粘贴事件,确保能正确替换选中内容
+ editor.on('paste', async (e: any) => {
+ try {
+ e.preventDefault();
+ e.stopPropagation();
+ const clipboardData = e.clipboardData as DataTransfer | undefined;
+ if (!clipboardData) return false;
+
+ // 先处理剪贴板中的图片(截图/粘贴图片)
+ const items = clipboardData.items as DataTransferItemList | undefined;
+ if (items && items.length > 0) {
+ const imageFiles: File[] = [];
+ for (let i = 0; i < items.length; i++) {
+ const it = items[i];
+ if (it && it.type && it.type.indexOf('image') !== -1) {
+ const file = it.getAsFile();
+ if (file) imageFiles.push(file);
+ }
+ }
+ // 若存在图片,逐一上传后替换
+ if (imageFiles.length > 0) {
+ for (const file of imageFiles) {
+ await new Promise((resolve) => {
+ const params = {
+ file,
+ filename: file.name || 'pasted-image.png',
+ data: { biz: 'jeditor', jeditor: '1' },
+ };
+ const uploadSuccess = (res: any) => {
+ try {
+ if (res && res.success) {
+ if (res.message === 'local') {
+ const reader = new FileReader();
+ reader.onload = () => {
+ const base64 = reader.result as string;
+ editor.selection.setContent(`
`);
+ resolve();
+ };
+ reader.readAsDataURL(file);
+ } else {
+ const imgUrl = getFileAccessHttpUrl(res.message);
+ editor.selection.setContent(`
`);
+ resolve();
+ }
+ } else {
+ resolve();
+ }
+ } catch (_) {
+ resolve();
+ }
+ };
+ uploadFile(params, uploadSuccess);
+ });
+ }
+ return false;
+ }
+ }
+
+ // 处理 HTML/纯文本
+ const pasteContent = clipboardData.getData('text/html') || clipboardData.getData('text');
+ if (!pasteContent) return false;
+
+ if (pasteContent.includes('
props.showImageUpload,
@@ -404,8 +475,7 @@
executeCount++;
}, 100);
};
- // update-end--author:liaozhiyang---date:20240517---for:【TV360X-35】富文本,图片上传遮挡其他按钮
- // update-begin--author:liaozhiyang---date:20240327---for:【QQYUN-8639】暗黑主题适配
+ // 代码逻辑说明: 【QQYUN-8639】暗黑主题适配
function changeColor() {
setTimeout(() => {
const iframe = editorRootRef.value?.querySelector('iframe');
@@ -425,7 +495,207 @@
changeColor();
}
);
- // update-end--author:liaozhiyang---date:20240327---for:【QQYUN-8639】暗黑主题适配
+
+ /**
+ * 处理图片链接地址
+ *
+ * @param pasteContent
+ */
+ async function preprocess(pasteContent) {
+ // 正则提取所有img标签(包含src和其他属性,避免丢失样式/alt等)
+ const imgTagRegex = /
]+)src="([^">]+)"([^>]*)/g;
+
+ // 收集所有需要替换的图片信息(索引、原始src、完整标签)
+ const imgReplaceList:any = [];
+ let match;
+ while ((match = imgTagRegex.exec(pasteContent)) !== null) {
+ imgReplaceList.push({
+ // 完整的img标签(如
)
+ fullTag: match[0],
+ // 原始图片URL
+ src: match[2],
+ // src前的属性(如class="xxx" )
+ prefix: match[1],
+ // src后的属性(如 alt="xxx")
+ suffix: match[3]
+ });
+ }
+
+ // 替换所有图片URL为服务器地址
+ let processedContent = pasteContent;
+ // 获取当前域名(协议+域名+端口)
+ const currentOrigin = window.location.hostname;
+ console.log("当前域名:"+ currentOrigin)
+ // 处理图片
+ for (const imgInfo of imgReplaceList) {
+ try {
+ if(imgInfo.src.startsWith('http')){
+ // 判断是否为当前域名下的图片
+ let isOwnServer = false;
+ try {
+ const imgHost = new URL(imgInfo.src, window.location.href).hostname;
+ isOwnServer = imgHost === currentOrigin;
+ console.log("图片中的域名:" + imgHost)
+ } catch (e) {
+ // 如果URL解析失败,使用简单的hostname检查作为后备
+ isOwnServer = imgInfo.src.includes(window.location.hostname);
+ console.log("图片中的域名:" + window.location.hostname)
+ }
+ if(!isOwnServer){
+ // 非当前域名的网络图片,需要上传
+ const filename = getFilenameFromUrl(imgInfo.src) || 'pasted-image.jpg';
+ let newUrl = await uploadImage(imgInfo.src, filename);
+ if(newUrl){
+ const newImgTag = `
');
+
+ // 表格居中对齐 - 带表格图标的居中对齐
+ editor.ui.registry.addIcon('table-align-center', '');
+
+ // 表格右对齐 - 带表格图标的右对齐
+ editor.ui.registry.addIcon('table-align-right', '');
+
+ // 添加表格专用对齐按钮
+ editor.ui.registry.addButton('tablealignleft', {
+ tooltip: '表格左对齐',
+ icon: 'table-align-left',
+ onAction: () => {
+ const table = getSelectedTable(editor);
+ if (table) alignTable(editor, table, 'JustifyLeft');
+ }
+ });
+ editor.ui.registry.addButton('tablealigncenter', {
+ tooltip: '表格居中',
+ icon: 'table-align-center',
+ onAction: () => {
+ const table = getSelectedTable(editor);
+ if (table) alignTable(editor, table, 'JustifyCenter');
+ }
+ });
+
+ editor.ui.registry.addButton('tablealignright', {
+ tooltip: '表格右对齐',
+ icon: 'table-align-right',
+ onAction: () => {
+ const table = getSelectedTable(editor);
+ if (table) alignTable(editor, table, 'JustifyRight');
+ }
+ });
+ }
+
+ // 获取当前选中的表格
+ function getSelectedTable(editor) {
+ const selectedNode = editor.selection.getNode();
+ return selectedNode.closest('table');
+ }
+
+ // 使用包装器的表格对齐函数
+ function alignTable(editor, table, command) {
+ // 检查表格是否已经被包装
+ let wrapper = table.parentNode;
+ const isWrapped = wrapper && wrapper.classList && wrapper.classList.contains('table-wrapper');
+
+ switch (command) {
+ case 'JustifyLeft':
+ case 'JustifyRight':
+ // 对于左右对齐,移除包装器(如果有)
+ if (isWrapped) {
+ editor.dom.remove(wrapper, true); // 移除包装器但保留表格
+ }
+ // 直接设置表格的浮动
+ editor.dom.setStyle(table, 'float', command === 'JustifyLeft' ? 'left' : 'right');
+ editor.dom.setStyle(table, 'margin', '0');
+ break;
+
+ case 'JustifyCenter':
+ // 对于居中对齐,使用包装器
+ if (!isWrapped) {
+ // 创建包装器
+ wrapper = editor.dom.create('div', {
+ 'class': 'table-wrapper',
+ style: 'text-align: center; margin: 0 auto;'
+ });
+
+ // 包装表格
+ table.parentNode.insertBefore(wrapper, table);
+ wrapper.appendChild(table);
+ }
+
+ // 设置包装器样式
+ editor.dom.setStyles(wrapper, {
+ 'text-align': 'center',
+ 'margin': '0 auto',
+ 'display': 'block'
+ });
+ // 移除表格的浮动和边距
+ editor.dom.setStyles(table, {
+ 'float': '',
+ 'margin': '0',
+ 'display': 'inline-table' // 保持表格显示特性
+ });
+ break;
+
+ case 'JustifyFull':
+ // 移除包装器(如果有)
+ if (isWrapped) {
+ editor.dom.remove(wrapper, true);
+ }
+ editor.dom.setStyle(table, 'width', '100%');
+ editor.dom.setStyle(table, 'float', '');
+ break;
+ }
+
+ // 触发变更事件
+ editor.fire('change');
+ editor.undoManager.add();
+ }
+ //update-end-author:liusq---date:2025-11-19--for: JHHB-1070 从word复制的表格不能对齐
+
return {
prefixCls,
containerWidth,
@@ -443,13 +713,35 @@
targetElem,
handleLoading,
- processMaskRef
+ processMaskRef,
};
},
});
-
+
diff --git a/jeecgboot-vue3/src/components/Tree/src/BasicTree.vue b/jeecgboot-vue3/src/components/Tree/src/BasicTree.vue
index 0a2852fa9..318c2cc90 100644
--- a/jeecgboot-vue3/src/components/Tree/src/BasicTree.vue
+++ b/jeecgboot-vue3/src/components/Tree/src/BasicTree.vue
@@ -104,13 +104,12 @@
const handleCheck = (v: CheckKeys, e?) => {
let currentValue = toRaw(state.checkedKeys) as KeyType[];
if (isArray(currentValue) && searchState.startSearch && e) {
- // update-begin-author:liusq---date:20230404--for: [issue/429]树搜索点击事件失效---
+ // 代码逻辑说明: [issue/429]树搜索点击事件失效---
const value = e.node.eventKey;
currentValue = difference(currentValue, getChildrenKeys(value));
if (e.checked) {
currentValue.push(value);
}
- // update-begin-author:liusq---date:20230404--for: [issue/429]树搜索点击事件失效---
state.checkedKeys = currentValue;
} else {
state.checkedKeys = v;
@@ -311,9 +310,7 @@
watch(
() => props.value,
() => {
- // update-end--author:liaozhiyang---date:20231122---for:【issues/863】关闭选择部门弹窗,再打开之前勾选的消失了
state.checkedKeys = toRaw(props.value || props.checkedKeys || []);
- // update-end--author:liaozhiyang---date:20231122---for:【issues/863】关闭选择部门弹窗,再打开之前勾选的消失了
},
{ immediate: true },
);
@@ -326,7 +323,7 @@
emit('change', v);
},
);
- // update-begin--author:liaozhiyang---date:20240426---for:【issues/1151】层级独立时勾选了父级,然后点击层级关联子级视觉上勾选了,但是保存子级没存上
+ // 代码逻辑说明: 【issues/1151】层级独立时勾选了父级,然后点击层级关联子级视觉上勾选了,但是保存子级没存上
watch(
() => props.checkStrictly,
() => {
@@ -337,7 +334,6 @@
});
}
);
- // update-end--author:liaozhiyang---date:20240426---for:【issues/1151】层级独立时勾选了父级,然后点击层级关联子级视觉上勾选了,但是保存子级没存上
const instance: TreeActionType = {
setExpandedKeys,
@@ -476,7 +472,7 @@
});
diff --git a/jeecgboot-vue3/src/components/Upload/src/helper.ts b/jeecgboot-vue3/src/components/Upload/src/helper.ts
index f3664948e..7b1f16d16 100644
--- a/jeecgboot-vue3/src/components/Upload/src/helper.ts
+++ b/jeecgboot-vue3/src/components/Upload/src/helper.ts
@@ -1,5 +1,5 @@
export function checkFileType(file: File, accepts: string[]) {
- // update-begin--author:liaozhiyang---date:20250318---for:【issues/7954】BasicUpload组件上传文件,限制上传格式校验出错
+ // 代码逻辑说明: 【issues/7954】BasicUpload组件上传文件,限制上传格式校验出错
const mimePatterns: string[] = [];
const suffixList: string[] = [];
// 分类处理 accepts
@@ -37,7 +37,6 @@ export function checkFileType(file: File, accepts: string[]) {
} else if (suffixList.length) {
return suffixMatch;
}
- // update-end--author:liaozhiyang---date:20250318---for:【issues/7954】BasicUpload组件上传文件,限制上传格式校验出错
}
export function checkImgType(file: File) {
diff --git a/jeecgboot-vue3/src/components/chart/Bar.vue b/jeecgboot-vue3/src/components/chart/Bar.vue
index 43e4d70ab..f3955d074 100644
--- a/jeecgboot-vue3/src/components/chart/Bar.vue
+++ b/jeecgboot-vue3/src/components/chart/Bar.vue
@@ -24,12 +24,11 @@
type: String as PropType,
default: 'calc(100vh - 78px)',
},
- // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
+ // 代码逻辑说明: 【QQYUN-8762】首页默认及echars颜色调整
seriesColor: {
type: String,
default: '#1890ff',
},
- // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
},
setup(props) {
const chartRef = ref(null);
@@ -77,9 +76,8 @@
return item.name;
});
option.series[0].data = seriesData;
- // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
+ // 代码逻辑说明: 【QQYUN-8762】首页默认及echars颜色调整
option.series[0].color = props.seriesColor;
- // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
option.xAxis.data = xAxisData;
setOptions(option);
}
diff --git a/jeecgboot-vue3/src/components/chart/BarMulti.vue b/jeecgboot-vue3/src/components/chart/BarMulti.vue
index 24b1cb2fb..9dd3bfb99 100644
--- a/jeecgboot-vue3/src/components/chart/BarMulti.vue
+++ b/jeecgboot-vue3/src/components/chart/BarMulti.vue
@@ -29,12 +29,11 @@
type: String as PropType,
default: 'calc(100vh - 78px)',
},
- // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
+ // 代码逻辑说明: 【QQYUN-8762】首页默认及echars颜色调整
seriesColor: {
type: Array,
default: () => [],
},
- // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
},
emits: ['click'],
setup(props, { emit }) {
@@ -82,7 +81,7 @@
let seriesData = [];
typeArr.forEach((type) => {
let obj: any = { name: type, type: props.type };
- // update-begin-author:liusq date:2023-7-12 for: [issues/613] LineMulti 在数据不对齐时,横坐标计算错误
+ // 代码逻辑说明: [issues/613] LineMulti 在数据不对齐时,横坐标计算错误
let data = [];
xAxisData.forEach((x) => {
let dataArr = props.chartData.filter((item) => type === item.type && item.name == x);
@@ -92,17 +91,15 @@
data.push(null);
}
});
- // update-end-author:liusq date:2023-7-12 for: [issues/613] LineMulti 在数据不对齐时,横坐标计算错误
//data数据
obj['data'] = data;
- // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
+ // 代码逻辑说明: 【QQYUN-8762】首页默认及echars颜色调整
if (props.seriesColor?.length) {
const findItem = props.seriesColor.find((item: any) => item.type === type);
if (findItem?.color) {
obj['color'] = findItem.color;
}
}
- // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
seriesData.push(obj);
});
option.series = seriesData;
diff --git a/jeecgboot-vue3/src/components/chart/Gauge.vue b/jeecgboot-vue3/src/components/chart/Gauge.vue
index 86dc473ea..384541fb0 100644
--- a/jeecgboot-vue3/src/components/chart/Gauge.vue
+++ b/jeecgboot-vue3/src/components/chart/Gauge.vue
@@ -25,12 +25,11 @@
type: String as PropType,
default: 'calc(100vh - 78px)',
},
- // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
+ // 代码逻辑说明: 【QQYUN-8762】首页默认及echars颜色调整
seriesColor: {
type: String,
default: '#1890ff',
},
- // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
},
setup(props) {
const chartRef = ref(null);
@@ -99,9 +98,8 @@
}
option.series[0].data[0].name = props.chartData.name;
option.series[0].data[0].value = props.chartData.value;
- // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
+ // 代码逻辑说明: 【QQYUN-8762】首页默认及echars颜色调整
option.series[0].color = props.seriesColor;
- // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
setOptions(option);
}
return { chartRef };
diff --git a/jeecgboot-vue3/src/components/chart/HeadInfo.vue b/jeecgboot-vue3/src/components/chart/HeadInfo.vue
index 0ae52701a..2d46ae475 100644
--- a/jeecgboot-vue3/src/components/chart/HeadInfo.vue
+++ b/jeecgboot-vue3/src/components/chart/HeadInfo.vue
@@ -32,12 +32,11 @@
type: String,
default: false,
},
- // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
+ // 代码逻辑说明: 【QQYUN-8762】首页默认及echars颜色调整
iconColor: {
type: String,
default: '#2b99ff',
},
- // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
},
});
diff --git a/jeecgboot-vue3/src/components/chart/LineMulti.vue b/jeecgboot-vue3/src/components/chart/LineMulti.vue
index 324d271cf..daf1e1d80 100644
--- a/jeecgboot-vue3/src/components/chart/LineMulti.vue
+++ b/jeecgboot-vue3/src/components/chart/LineMulti.vue
@@ -77,13 +77,12 @@
let seriesData = [];
typeArr.forEach((type) => {
let obj: any = { name: type, type: props.type };
- // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
+ // 代码逻辑说明: 【QQYUN-8762】首页默认及echars颜色调整
const findItem: any = props.chartData.find((item: any) => item.type == type);
if (findItem && findItem.color) {
obj.color = findItem.color;
}
- // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
- // update-begin-author:liusq date:2023-7-12 for: [issues/613] LineMulti 在数据不对齐时,横坐标计算错误
+ // 代码逻辑说明: [issues/613] LineMulti 在数据不对齐时,横坐标计算错误
let data = [];
xAxisData.forEach((x) => {
let dataArr = props.chartData.filter((item) => type === item.type && item.name == x);
@@ -93,7 +92,6 @@
data.push(null);
}
});
- // update-end-author:liusq date:2023-7-12 for: [issues/613] LineMulti 在数据不对齐时,横坐标计算错误
//data数据
obj['data'] = data;
seriesData.push(obj);
diff --git a/jeecgboot-vue3/src/components/chart/SingleLine.vue b/jeecgboot-vue3/src/components/chart/SingleLine.vue
index de338985d..c3cdfe40d 100644
--- a/jeecgboot-vue3/src/components/chart/SingleLine.vue
+++ b/jeecgboot-vue3/src/components/chart/SingleLine.vue
@@ -24,12 +24,11 @@
type: String as PropType,
default: 'calc(100vh - 78px)',
},
- // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
+ // 代码逻辑说明: 【QQYUN-8762】首页默认及echars颜色调整
seriesColor: {
type: String,
default: '#1890ff',
},
- // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
},
setup(props) {
const chartRef = ref(null);
@@ -79,9 +78,8 @@
return item.name;
});
option.series[0].data = seriesData;
- // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
+ // 代码逻辑说明: 【QQYUN-8762】首页默认及echars颜色调整
option.series[0].color = props.seriesColor;
- // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】首页默认及echars颜色调整
option.xAxis.data = xAxisData;
setOptions(option);
}
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/JVxeTable.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/JVxeTable.ts
index c77713cf0..c1b7d3bdc 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/JVxeTable.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/JVxeTable.ts
@@ -26,10 +26,9 @@ export default defineComponent({
useColumns(props, data, methods, slots);
useDataSource(props, data, methods, refs);
useDragSort(props, methods);
- // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-8566】JVXETable无法记住列设置
+ // 代码逻辑说明: 【QQYUN-8566】JVXETable无法记住列设置
const { initSetting } = useColumnsCache({ cacheColumnsKey: props.cacheColumnsKey });
initSetting(props);
- // update-end--author:liaozhiyang---date:20240321---for:【QQYUN-8566】JVXETable无法记住列设置
// 最终传入到 template 里的 props
const finallyProps = useFinallyProps(props, data, methods);
// 渲染子组件
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/componentMap.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/componentMap.ts
index 87d992f8e..65bde456a 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/componentMap.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/componentMap.ts
@@ -19,12 +19,11 @@ import JVxeTextareaCell from './components/cells/JVxeTextareaCell.vue';
// import JVxeUserSelectCell from './components/cells/JVxeUserSelectCell.vue'
let componentMap = new Map();
-// update-begin--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
+// 代码逻辑说明: 【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
const JVxeComponents = 'JVxeComponents__';
if (import.meta.env.DEV && componentMap.size === 0 && window[JVxeComponents] && window[JVxeComponents].size > 0) {
componentMap = window[JVxeComponents];
}
-// update-end--author:liaozhiyang---date:20231027---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
/** span 组件结尾 */
export const spanEnds: string = ':span';
@@ -55,17 +54,15 @@ export function addComponent(type: JVxeTypes, component: JVxeVueComponent, spanC
if (spanComponent) {
componentMap.set(type + spanEnds, spanComponent);
}
- // update-begin--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
+ // 代码逻辑说明: 【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
import.meta.env.DEV && (window[JVxeComponents] = componentMap);
- // update-end--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
}
export function deleteComponent(type: JVxeTypes) {
componentMap.delete(type);
componentMap.delete(type + spanEnds);
- // update-begin--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
+ // 代码逻辑说明: 【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
import.meta.env.DEV && (window[JVxeComponents] = componentMap);
- // update-end--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
}
/** 定义内置自定义组件 */
@@ -100,9 +97,8 @@ export function definedComponent() {
export function clearComponent() {
componentMap.clear();
- // update-begin--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
+ // 代码逻辑说明: 【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
import.meta.env.DEV && (window[JVxeComponents] = componentMap);
- // update-end--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
}
export { componentMap };
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/JVxeReloadEffect.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/JVxeReloadEffect.ts
index 6c74134ef..f32a44895 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/JVxeReloadEffect.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/JVxeReloadEffect.ts
@@ -69,9 +69,8 @@ export default defineComponent({
key: layer + effectIdx.value + randomString(6),
class: ['j-vxe-reload-effect-span', `layer-${layer}`],
style: {},
- // update-begin--author:liaozhiyang---date:20240424---for:【issues/1175】解决vxetable鼠标hover之后title显示不对的问题
+ // 代码逻辑说明: 【issues/1175】解决vxetable鼠标hover之后title显示不对的问题
title: vNode,
- // update-end--author:liaozhiyang---date:20240424---for:【issues/1175】解决vxetable鼠标hover之后title显示不对的问题
};
if (layer === 'top') {
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/JVxeToolbar.vue b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/JVxeToolbar.vue
index 043d3bfde..9c3241ba4 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/JVxeToolbar.vue
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/JVxeToolbar.vue
@@ -78,9 +78,8 @@
return btns.filter((btn) => {
// 系统默认的批量删除编码配置为 batch_delete 此处需要兼容一下
if (btn === 'remove') {
- //update-begin-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制
+ // 代码逻辑说明: VUEN-1162 子表按钮没控制
return hasBtnAuth(btn) && hasBtnAuth('batch_delete');
- //update-end-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制
}
return hasBtnAuth(btn);
});
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeDateCell.vue b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeDateCell.vue
index 59adf152a..61eedfe03 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeDateCell.vue
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeDateCell.vue
@@ -34,12 +34,11 @@
return format ? format : isDatetime.value ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD';
});
const openPicker = ref(true);
- // update-begin--author:liaozhiyang---date:20240509---for:【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周
+ // 代码逻辑说明: 【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周
const picker = computed(() => {
const picker = originColumn.value.picker;
return picker ? picker : null;
});
- // update-end--author:liaozhiyang---date:20240509---for:【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周
watch(
innerValue,
(val) => {
@@ -53,13 +52,12 @@
);
function handleChange(_mom, dateStr) {
- // update-begin--author:liaozhiyang---date:20240509---for:【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周
+ // 代码逻辑说明: 【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周
if (picker.value) {
handleChangeCommon(_mom);
} else {
handleChangeCommon(dateStr);
}
- // update-begin--author:liaozhiyang---date:20240509---for:【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周
}
return {
@@ -76,7 +74,7 @@
enhanced: {
aopEvents: {
},
- // update-begin--author:liaozhiyang---date:20240509---for:【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周
+ // 代码逻辑说明: 【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周
translate: {
enabled: true,
handler(value, ctx) {
@@ -88,7 +86,6 @@
return value;
},
},
- // update-end--author:liaozhiyang---date:20240509---for:【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周
} as JVxeComponent.EnhancedPartial,
});
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeDragSortCell.vue b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeDragSortCell.vue
index 3a91185d5..971b61267 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeDragSortCell.vue
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeDragSortCell.vue
@@ -32,7 +32,7 @@
props: useJVxeCompProps(),
setup(props: JVxeComponent.Props) {
const { rowIndex, originColumn, fullDataLength, trigger } = useJVxeComponent(props);
- // update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
+ // 代码逻辑说明: 【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
const isAllowDrag = computed(() => {
const notAllowDrag = originColumn.value.notAllowDrag;
if (notAllowDrag.length) {
@@ -46,7 +46,6 @@
return true;
}
});
- // update-end--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
const disabledMoveUp = computed(() => rowIndex.value === 0);
const disabledMoveDown = computed(() => rowIndex.value === fullDataLength.value - 1);
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeInputCell.vue b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeInputCell.vue
index ca474f861..cb9869495 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeInputCell.vue
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeInputCell.vue
@@ -31,7 +31,6 @@
target.selectionEnd = selectionStart - 1;
}
} else {
- // update-begin--author:liaozhiyang---date:20240227---for:【QQYUN-8347】小数点后大于两位且最后一位是0,输入框不可输入了
// 例如:41.1 -> 41.10, 100.1 -> 100.10 不执行handleChangeCommon 函数。
if (value.indexOf('.') != -1) {
const result = value.split('.').pop();
@@ -40,7 +39,6 @@
innerValue.value = value;
}
}
- // update-end--author:liaozhiyang---date:20240227---for:【QQYUN-8347】小数点后大于两位且最后一位是0,输入框不可输入了
}
}
// 触发事件,存储输入的值
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeSelectCell.vue b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeSelectCell.vue
index ab8614e36..251acd677 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeSelectCell.vue
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/components/cells/JVxeSelectCell.vue
@@ -89,9 +89,8 @@
let props = originColumn.value.props || {};
props['mode'] = 'multiple';
props['maxTagCount'] = 1;
- //update-begin-author:taoyan date:2022-12-5 for: issues/271 Online表单主子表单下拉多选无法搜索
+ // 代码逻辑说明: issues/271 Online表单主子表单下拉多选无法搜索
originColumn.value.allowSearch = true;
- //update-end-author:taoyan date:2022-12-5 for: issues/271 Online表单主子表单下拉多选无法搜索
originColumn.value.props = props;
} else if (searchTypes.includes(props.type)) {
// 处理搜索
@@ -136,12 +135,10 @@
let { allowSearch, allowInput } = originColumn.value;
if (allowSearch === true || allowInput === true) {
- // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-5806】js增强改变下拉搜索options (防止option.title为null报错)
+ // 代码逻辑说明: 【QQYUN-5806】js增强改变下拉搜索options (防止option.title为null报错)
if (option.title == null) return false;
- // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-5806】js增强改变下拉搜索options (防止option.title为null报错)
- // update-begin--author:liaozhiyang---date:20230904---for:【issues/5305】JVxeTypes.select 无法按照预期进行搜索
+ // 代码逻辑说明: 【issues/5305】JVxeTypes.select 无法按照预期进行搜索
return option.title.toLowerCase().indexOf(input.toLowerCase()) >= 0;
- // update-begin--author:liaozhiyang---date:20230904---for:【issues/5305】JVxeTypes.select 无法按照预期进行搜索
}
return true;
}
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useColumns.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useColumns.ts
index 75af95a81..9194b572c 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useColumns.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useColumns.ts
@@ -25,13 +25,11 @@ export interface HandleArgs {
export function useColumns(props: JVxeTableProps, data: JVxeDataProps, methods: JVxeTableMethods, slots) {
data.vxeColumns = computed(() => {
- // update-begin--author:liaozhiyang---date:20250403---for:【issues/7812】linkageConfig改变了,vxetable没更新
// linkageConfig变化时也需要执行
const linkageConfig = toRaw(props.linkageConfig);
if (linkageConfig) {
// console.log(linkageConfig);
}
- // update-end--author:liaozhiyang---date:20250403---for:【issues/7812】linkageConfig改变了,vxetable没更新
let columns: JVxeColumn[] = [];
if (isArray(props.columns)) {
// handle 方法参数
@@ -114,7 +112,6 @@ export function useColumns(props: JVxeTableProps, data: JVxeDataProps, methods:
handleInnerColumn(args, dragSortColumn, handleDragSortColumn, true);
// update-begin--author:liaozhiyang---date:2024-05-30---for【TV360X-371】不可编辑组件必填缺少*号
customComponentAddStar(columns);
- // update-end--author:liaozhiyang---date:2024-05-30---for:【TV360X-371】不可编辑组件必填缺少*号
}
return columns;
});
@@ -186,11 +183,10 @@ function handleSeqColumn({ props, col, columns }: HandleArgs) {
fixed: props.rowNumberFixed,
align: 'center',
};
- // update-begin--author:liaozhiyang---date:20240306---for:【QQYUN-8405】vxetable支持序号是否固定(移动端需要)
+ // 代码逻辑说明: 【QQYUN-8405】vxetable支持序号是否固定(移动端需要)
if (props.rowNumberFixed === 'none') {
delete column.fixed;
}
- // update-end--author:liaozhiyang---date:20240306---for:QQYUN-8405】vxetable支持序号是否固定(移动端需要)
if (col) {
Object.assign(col, column);
} else {
@@ -217,11 +213,10 @@ function handleSelectionColumn({ props, data, col, columns }: HandleArgs) {
fixed: 'left',
align: 'center',
};
- // update-begin--author:liaozhiyang---date:20240509---for:【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序
+ // 代码逻辑说明: 【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序
if (props.rowSelectionFixed === 'none') {
delete column.fixed;
}
- // update-end--author:liaozhiyang---date:20240509---for:【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序
if (col) {
Object.assign(col, column);
} else {
@@ -269,19 +264,17 @@ function handleDragSortColumn({ props, data, col, columns, renderOptions }: Hand
width: width,
fixed: 'left',
align: 'center',
- // update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
+ // 代码逻辑说明: 【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
params: {
insertRow: props.insertRow,
notAllowDrag: props.notAllowDrag,
...col?.params,
},
- // update-end--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
};
- // update-begin--author:liaozhiyang---date:20240506---for:【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序
+ // 代码逻辑说明: 【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序
if (props.dragSortFixed === 'none') {
delete column.fixed;
}
- // update-end--author:liaozhiyang---date:20240506---for:【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序
let cellRender = {
name: JVxeTypePrefix + JVxeTypes.rowDragSort,
sortKey: props.sortKey,
@@ -316,9 +309,8 @@ function handlerCol(args: HandleArgs) {
// $renderOptions.type = (enhanced.switches.visible || props.alwaysEdit) ? 'visible' : 'default'
}
col[renderName] = $renderOptions;
- // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-5806】js增强改变下拉搜索options(添加customOptions为true不读字典,走自己的options)
+ // 代码逻辑说明: 【QQYUN-5806】js增强改变下拉搜索options(添加customOptions为true不读字典,走自己的options)
!col.params.customOptions && handleDict(args);
- // update-end--author:liaozhiyang---date:20240321---for:【QQYUN-5806】js增强改变下拉搜索options(添加customOptions为true不读字典,走自己的options)
handleRules(args);
handleStatistics(args);
handleSlots(args);
@@ -345,13 +337,12 @@ async function handleDict({ col, methods }: HandleArgs) {
// 查询字典
if (!isPromise(col.params.optionsPromise)) {
col.params.optionsPromise = new Promise(async (resolve) => {
- //update-begin-author:taoyan date:2022-6-1 for: VUEN-1180 【代码生成】子表不支持带条件?
+ // 代码逻辑说明: VUEN-1180 【代码生成】子表不支持带条件?
let dictCodeString = col.params.dictCode;
if (dictCodeString) {
dictCodeString = encodeURI(dictCodeString);
}
const dictOptions: any = await initDictOptions(dictCodeString);
- //update-end-author:taoyan date:2022-6-1 for: VUEN-1180 【代码生成】子表不支持带条件?
let options = col.params.options ?? [];
dictOptions.forEach((dict) => {
// 过滤重复数据
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useData.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useData.ts
index 985258da6..474a13ae4 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useData.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useData.ts
@@ -14,14 +14,12 @@ export function useData(props: JVxeTableProps): JVxeDataProps {
scroll: reactive({ top: 0, left: 0 }),
scrolling: ref(false),
defaultVxeProps: reactive({
- // update-begin--author:liaozhiyang---date:20240607---for:【TV360X-327】vxetable警告
// rowId: props.rowKey,
rowConfig: {
keyField: props.rowKey,
// 高亮hover的行
isHover: true,
},
- // update-end--author:liaozhiyang---date:20240607---for:【TV360X-327】vxetable警告
// --- 【issues/209】自带的tooltip会错位,所以替换成原生的title ---
// 溢出隐藏并显示tooltip
@@ -35,10 +33,8 @@ export function useData(props: JVxeTableProps): JVxeDataProps {
editConfig: {
trigger: 'click',
mode: 'cell',
- // update-begin--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级
//activeMethod: () => !props.disabled,
beforeEditMethod: () => !props.disabled,
- // update-end--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级
},
expandConfig: {
iconClose: 'vxe-icon-arrow-right',
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useDragSort.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useDragSort.ts
index 59af3a29b..9afb8f9af 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useDragSort.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useDragSort.ts
@@ -32,10 +32,9 @@ export function useDragSort(props: JVxeTableProps, methods: JVxeTableMethods) {
let startChildren = [];
sortable2 = Sortable.create(dom as HTMLElement, {
handle: '.drag-btn',
- // update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
+ // 代码逻辑说明: 【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
filter: '.not-allow-drag',
draggable: ".allow-drag",
- // update-end--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
direction: 'vertical',
animation: 300,
onStart(e) {
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.ts
index 40c2c8ca5..90351ef3e 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.ts
@@ -22,9 +22,8 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
onRadioChange: methods.handleVxeRadioChange,
onCheckboxAll: methods.handleVxeCheckboxAll,
onCheckboxChange: methods.handleVxeCheckboxChange,
- // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-8566】JVXETable无法记住列设置
+ // 代码逻辑说明: 【QQYUN-8566】JVXETable无法记住列设置
onCustom: methods.handleCustom,
- // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-8566】JVXETable无法记住列设置
};
// 用户传递的事件,进行合并操作
Object.keys(listeners).forEach((key) => {
@@ -43,7 +42,7 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
// vxe 最终 props
const vxePropsMerge = computed(() => {
- // update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
+ // 代码逻辑说明: 【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
let rowClass = {};
if (props.dragSort) {
rowClass = {
@@ -65,7 +64,6 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
},
};
}
- // update-end--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
return merge(
{},
data.defaultVxeProps,
@@ -82,10 +80,9 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
editRules: unref(vxeEditRules),
height: props.height === 'auto' ? null : props.height,
maxHeight: props.maxHeight,
- // update-begin--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级
+ // 代码逻辑说明: 【QQYUN-5133】JVxeTable 行编辑升级
scrollY: props.scrollY,
scrollX: props.scrollX,
- // update-end--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级
border: props.bordered,
footerMethod: methods.handleFooterMethod,
// 展开行配置
@@ -94,10 +91,8 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
},
// 可编辑配置
editConfig: {
- // update-begin--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级
//activeMethod: methods.handleActiveMethod,
beforeEditMethod: methods.handleActiveMethod,
- // update-end--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级
},
radioConfig: {
checkMethod: methods.handleCheckMethod,
@@ -116,7 +111,7 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
);
});
- // update-begin--author:sunjianlei---date:20250804---for:【issues/8593】修复列改变后内容不刷新
+ // 代码逻辑说明: 【issues/8593】修复列改变后内容不刷新
const vxeColumnsRef = ref(data.vxeColumns!.value || [])
const watchColumnsDebounce = debounce(async () => {
vxeColumnsRef.value = []
@@ -124,7 +119,6 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
vxeColumnsRef.value = data.vxeColumns!.value
}, 50)
watch(data.vxeColumns!, watchColumnsDebounce)
- // update-end----author:sunjianlei---date:20250804---for:【issues/8593】修复列改变后内容不刷新
const vxeProps = computed(() => {
return {
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useJVxeComponent.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useJVxeComponent.ts
index dbeacab03..94f4e3d66 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useJVxeComponent.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useJVxeComponent.ts
@@ -24,14 +24,13 @@ export function useJVxeCompProps() {
export function useJVxeComponent(props: JVxeComponent.Props) {
const value = computed(() => {
- // update-begin--author:liaozhiyang---date:20240430---for:【QQYUN-9125】oracle数据库日期类型字段会默认带上时分秒
+ // 代码逻辑说明: 【QQYUN-9125】oracle数据库日期类型字段会默认带上时分秒
const val = props.params.row[props.params.column.property];
if (props.type === 'date' && typeof val === 'string') {
return val.split(' ').shift();
} else {
return val;
}
- // update-end--author:liaozhiyang---date:20240430---for:【QQYUN-9125】oracle数据库日期类型字段会默认带上时分秒
});
const innerValue = ref(value.value);
const row = computed(() => props.params.row);
@@ -78,33 +77,29 @@ export function useJVxeComponent(props: JVxeComponent.Props) {
if (renderOptions.isDisabledRow(row.value, rowIndex.value)) {
cellProps['disabled'] = true;
}
- // update-begin--author:liaozhiyang---date:20240528---for:【TV360X-291】没勾选同步数据库禁用排序功能
+ // 代码逻辑说明: 【TV360X-291】没勾选同步数据库禁用排序功能
if (col.props && col.props.isDisabledCell) {
if (col.props.isDisabledCell({ row: row.value, rowIndex: rowIndex.value, column: col, columnIndex: columnIndex.value })) {
cellProps['disabled'] = true;
}
}
- // update-end--author:liaozhiyang---date:20240528---for:【TV360X-291】没勾选同步数据库禁用排序功能
// 判断是否禁用所有组件
if (renderOptions.disabled === true) {
cellProps['disabled'] = true;
- // update-begin--author:liaozhiyang---date:20240607---for:【TV360X-1068】行编辑整体禁用时上传按钮不显示
+ // 代码逻辑说明: 【TV360X-1068】行编辑整体禁用时上传按钮不显示
cellProps['disabledTable'] = true;
- // update-end--author:liaozhiyang---date:20240607---for:【TV360X-1068】行编辑整体禁用时上传按钮不显示
}
- //update-begin-author:taoyan date:2022-5-25 for: VUEN-1111 一对多子表 部门选择 不应该级联
+ // 代码逻辑说明: VUEN-1111 一对多子表 部门选择 不应该级联
if (col.checkStrictly === true) {
cellProps['checkStrictly'] = true;
}
- //update-end-author:taoyan date:2022-5-25 for: VUEN-1111 一对多子表 部门选择 不应该级联
- //update-begin-author:taoyan date:2022-5-27 for: 用户组件 控制单选多选新的参数配置
+ // 代码逻辑说明: 用户组件 控制单选多选新的参数配置
if (col.isRadioSelection === true) {
cellProps['isRadioSelection'] = true;
} else if (col.isRadioSelection === false) {
cellProps['isRadioSelection'] = false;
}
- //update-end-author:taoyan date:2022-5-27 for: 用户组件 控制单选多选新的参数配置
return cellProps;
});
@@ -157,21 +152,19 @@ export function useJVxeComponent(props: JVxeComponent.Props) {
vModel(newValue, row, column);
}
innerValue.value = enhanced.setValue(newValue, ctx);
- // update-begin--author:liaozhiyang---date:20240509---for:【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周
+ // 代码逻辑说明: 【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周
if (props.type === 'date' && props.renderType === JVxeRenderType.spaner && enhanced.translate.enabled === true) {
if (isFunction(enhanced.translate.handler)) {
innerValue.value = enhanced.translate.handler(newValue, ctx);
}
return;
}
- // update-end--author:liaozhiyang---date:20240509---for:【QQYUN-9205】一对多(jVxetable组件date)支持年,年月,年度度,年周
- //update-begin---author:wangshuai---date:2024-09-18---for:【issues/7203】自动生成一对多表单代码中,省市区回显问题---
+ // 代码逻辑说明: 【issues/7203】自动生成一对多表单代码中,省市区回显问题---
if (props.type === 'pca' && props.renderType === JVxeRenderType.spaner) {
innerValue.value = getAreaTextByCode(newValue);
return;
}
- //update-end---author:wangshuai---date:2024-09-18---for:【issues/7203】自动生成一对多表单代码中,省市区回显问题---
// 判断是否启用翻译
if (props.renderType === JVxeRenderType.spaner && enhanced.translate.enabled === true) {
@@ -193,7 +186,7 @@ export function useJVxeComponent(props: JVxeComponent.Props) {
function handleChangeCommon($value, force = false) {
const newValue = enhanced.getValue($value, ctx);
const oldValue = value.value;
- // update-begin--author:liaozhiyang---date:20230718---for:【issues-5025】JVueTable的事件 @valueChange重复触发问题
+ // 代码逻辑说明: 【issues-5025】JVueTable的事件 @valueChange重复触发问题
const execute = force ? true : newValue !== oldValue;
if (execute) {
trigger('change', { value: newValue });
@@ -207,12 +200,11 @@ export function useJVxeComponent(props: JVxeComponent.Props) {
columnIndex: columnIndex.value,
});
}
- // update-end--author:liaozhiyang---date:20230718---for:【issues-5025】JVueTable的事件 @valueChange重复触发问题
}
/** 通用处理 blur 事件 */
function handleBlurCommon($value) {
- // update-begin--author:liaozhiyang---date:20230817---for:【issues/636】JVxeTable加上blur事件
+ // 代码逻辑说明: 【issues/636】JVxeTable加上blur事件
const newValue = enhanced.getValue($value, ctx);
const oldValue = value.value;
//trigger('blur', { value });
@@ -225,7 +217,6 @@ export function useJVxeComponent(props: JVxeComponent.Props) {
rowIndex: rowIndex.value,
columnIndex: columnIndex.value,
});
- // update-end--author:liaozhiyang---date:20230817---for:【issues/636】JVxeTable加上blur事件
}
/**
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useMethods.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useMethods.ts
index e046f6e90..b728ccd94 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useMethods.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useMethods.ts
@@ -150,13 +150,18 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
if (className.includes('vxe-radio--icon') || className.includes('vxe-cell--radio')) {
return;
}
- if (props.rowSelectionType === 'radio') {
- $table.setRadioRow(row);
- handleVxeRadioChange(event);
- } else {
- $table.toggleCheckboxRow(row);
- handleVxeCheckboxChange(event);
+
+ // 代码逻辑说明: 【issues/9038】JVxeTable表格点击行选择BUG---
+ if(!data.disabledRowIds.includes(row.id)){
+ if (props.rowSelectionType === 'radio') {
+ $table.setRadioRow(row);
+ handleVxeRadioChange(event);
+ } else {
+ $table.toggleCheckboxRow(row);
+ handleVxeCheckboxChange(event);
+ }
}
+
}
}
@@ -399,19 +404,17 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
* @return
*/
async function addRows(rows: Recordable | Recordable[] = {}, options?: IAddRowsOptions) {
- //update-begin-author:taoyan date:2022-8-12 for: VUEN-1892【online子表弹框】有主从关联js时,子表弹框修改了数据,主表字段未修改
+ // 代码逻辑说明: VUEN-1892【online子表弹框】有主从关联js时,子表弹框修改了数据,主表字段未修改
let result = await addOrInsert(rows, -1, 'added', options);
if(options && options!.emitChange==true){
trigger('valueChange', {column: 'all', row: result.row})
}
- // update-begin--author:liaozhiyang---date:20240607---for:【TV360X-279】行编辑添加新字段滚动对应位置
+ // 代码逻辑说明: 【TV360X-279】行编辑添加新字段滚动对应位置
let xTable = getXTable();
setTimeout(() => {
xTable.scrollToRow(result.row);
}, 0);
- // update-end--author:liaozhiyang---date:20240607---for:【TV360X-279】行编辑添加新字段滚动对应位置
return result;
- //update-end-author:taoyan date:2022-8-12 for: VUEN-1892【online子表弹框】有主从关联js时,子表弹框修改了数据,主表字段未修改
}
/**
@@ -456,9 +459,8 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
/** 获取表格表单里的值 */
function getValues(callback, rowIds) {
let tableData = getTableData({ rowIds: rowIds });
- // update-begin--author:liaozhiyang---date:20241227---for:【issues/7631】JVxeTable组件的getValues回调函数参数修正
+ // 代码逻辑说明: 【issues/7631】JVxeTable组件的getValues回调函数参数修正
callback(tableData, tableData);
- // update-end--author:liaozhiyang---date:20241227---for:【issues/7631】JVxeTable组件的getValues回调函数参数修正
}
type getTableDataOptions = {
@@ -674,7 +676,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
/** 删除一行或多行数据 */
async function removeRows(rows, asyncRemove = false) {
- // update-begin--author:liaozhiyang---date:20231123---for:vxe-table removeRows方法加上异步删除
+ // 代码逻辑说明: vxe-table removeRows方法加上异步删除
const xTable = getXTable();
const removeEvent: any = { deleteRows: rows, $table: xTable };
if (asyncRemove) {
@@ -711,7 +713,6 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
await recalcSortNumber();
return res;
}
- // update-end--author:liaozhiyang---date:20231123---for:vxe-table removeRows方法加上异步删除
}
/** 根据id删除一行或多行 */
@@ -760,12 +761,10 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
let sortKey = props.sortKey ?? 'orderNum';
let sortBegin = props.sortBegin ?? 0;
xTable.internalData.tableFullData.forEach((data) => (data[sortKey] = sortBegin++));
- // update-begin--author:liaozhiyang---date:20231011---for:【QQYUN-5133】JVxeTable 行编辑升级
// 4.1.0
//await xTable.updateCache();
// 4.1.1
await xTable.cacheRowMap(true)
- // update-end--author:liaozhiyang---date:20231011---for:【QQYUN-5133】JVxeTable 行编辑升级
return await xTable.updateData();
}
}
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/usePagination.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/usePagination.ts
index 2b22fde87..87a831ca1 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/usePagination.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/usePagination.ts
@@ -52,9 +52,8 @@ export function usePagination(props: JVxeTableProps, methods: JVxeTableMethods)
[
h(Pagination, {
...bindProps.value,
- // update-begin--author:liaozhiyang---date:20250423---for:【issues/8137】vxetable表格禁用后分页隐藏了
+ // 代码逻辑说明: 【issues/8137】vxetable表格禁用后分页隐藏了
disabled: false,
- // update-end--author:liaozhiyang---date:20250423---for:【issues/8137】vxetable表格禁用后分页隐藏了
onChange: handleChange,
onShowSizeChange: handleShowSizeChange,
}),
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useToolbar.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useToolbar.ts
index 9053004af..8195db910 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useToolbar.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useToolbar.ts
@@ -20,17 +20,15 @@ export function useToolbar(props: JVxeTableProps, data: JVxeDataProps, methods:
removeBtnCfg: props.removeBtnCfg,
// 新增事件
onAdd: () => {
- // update-begin--author:liaozhiyang---date:20240521---for:【TV360X-212】online新增字段就出校验提示
+ // 代码逻辑说明: 【TV360X-212】online新增字段就出校验提示
setTimeout(() => {
methods.addRows();
}, 0);
- // update-end--author:liaozhiyang---date:20240521---for:【TV360X-212】online新增字段就出校验提示
},
// 保存事件
onSave: () => methods.trigger('save'),
onRemove() {
const $table = methods.getXTable();
- // update-begin--author:liaozhiyang---date:20231018---for:【QQYUN-6805】修复asyncRemove字段不生效
// 触发删除事件
if (data.selectedRows.value.length > 0) {
const deleteOldRows = methods.filterNewRows(data.selectedRows.value);
@@ -56,7 +54,6 @@ export function useToolbar(props: JVxeTableProps, data: JVxeDataProps, methods:
} else {
methods.removeSelection();
}
- // update-end--author:liaozhiyang---date:20231018---for:【QQYUN-6805】修复asyncRemove字段不生效
},
// 清除选择事件
onClearSelection: () => methods.clearSelection(),
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useValidateRules.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useValidateRules.ts
index 88f9c833e..296cf9dbe 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useValidateRules.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useValidateRules.ts
@@ -43,9 +43,8 @@ export function useValidateRules(args: HandleArgs) {
function uniqueValidator({ methods }: HandleArgs) {
return function (event) {
const { cellValue, column, rule } = event;
- // update-begin--author:liaozhiyang---date:20240522---for:【TV360X-299】JVxetable组件中唯一校验过滤掉空字符串
+ // 代码逻辑说明: 【TV360X-299】JVxetable组件中唯一校验过滤掉空字符串
if (cellValue == '') return Promise.resolve();
- // update-end--author:liaozhiyang---date:20240522---for:【TV360X-299】JVxetable组件中唯一校验过滤掉空字符串
let tableData = methods.getTableData();
let findCount = 0;
for (let rowData of tableData) {
@@ -85,16 +84,14 @@ const fooPatterns = [
{ title: '6到16位数字', value: 'n6-16', pattern: /^\d{6,16}$/ },
{ title: '6到16位任意字符', value: '*6-16', pattern: /^.{6,16}$/ },
{ title: '6到18位字母', value: 's6-18', pattern: /^[a-z|A-Z]{6,18}$/ },
- //update-begin-author:taoyan date:2022-6-1 for: VUEN-1160 对多子表,网址校验不正确
+ // 代码逻辑说明: VUEN-1160 对多子表,网址校验不正确
{
title: '网址',
value: 'url',
pattern: /^((ht|f)tps?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/,
},
- //update-end-author:taoyan date:2022-6-1 for: VUEN-1160 对多子表,网址校验不正确
- // update-begin--author:liaozhiyang---date:20240527---for:【TV360X-466】邮箱跟一对第一校验规则一致
+ // 代码逻辑说明: 【TV360X-466】邮箱跟一对第一校验规则一致
{ title: '电子邮件', value: 'e', pattern: /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/ },
- // update-end--author:liaozhiyang---date:20240527---for:【TV360X-466】邮箱跟一对第一校验规则一致
{ title: '手机号码', value: 'm', pattern: /^1[3456789]\d{9}$/ },
{ title: '邮政编码', value: 'p', pattern: /^\d{6}$/ },
{ title: '字母', value: 's', pattern: /^[A-Z|a-z]+$/ },
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useWebSocket.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useWebSocket.ts
index ba0d355c6..50c6d51fb 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useWebSocket.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useWebSocket.ts
@@ -56,10 +56,9 @@ const vs = {
const domainURL = useGlobSetting().uploadUrl!;
const domain = domainURL.replace('https://', 'wss://').replace('http://', 'ws://');
const url = `${domain}/vxeSocket/${userId}/${this.pageId}`;
- //update-begin-author:taoyan date:2022-4-24 for: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278
+ // 代码逻辑说明: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278
let token = (getToken() || '') as string;
this.ws = new WebSocket(url, [token]);
- //update-end-author:taoyan date:2022-4-24 for: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278
this.ws.onopen = this.on.open.bind(this);
this.ws.onerror = this.on.error.bind(this);
this.ws.onmessage = this.on.message.bind(this);
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/install.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/install.ts
index 38e3e8e5f..411ac4aa7 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/install.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/install.ts
@@ -42,12 +42,11 @@ export function registerJVxeTable(app: App) {
function preventClosingPopUp(this: any, params) {
// 获取组件增强
let col = params.column.params;
- // update-begin--author:liaozhiyang---date:20250429---for:【issues/8178】使用原生vxe-table组件编辑模式下失去焦点报错
+ // 代码逻辑说明: 【issues/8178】使用原生vxe-table组件编辑模式下失去焦点报错
if (col === undefined) {
// 说明使用的是纯原生的vxe-table
return;
}
- // update-end--author:liaozhiyang---date:20250429---for:【issues/8178】使用原生vxe-table组件编辑模式下失去焦点报错
let { $event } = params;
const interceptor = getEnhanced(col.type).interceptor;
// 执行增强
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/utils/authUtils.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/utils/authUtils.ts
index c57b81068..689e381bc 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/utils/authUtils.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/utils/authUtils.ts
@@ -26,14 +26,13 @@ export function getJVxeAuths(prefix) {
getAuth.isAuth = true;
}
}
- //update-begin-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制
+ // 代码逻辑说明: VUEN-1162 子表按钮没控制
let onlineButtonAuths = permissionStore.getOnlineSubTableAuth(prefix);
if (onlineButtonAuths && onlineButtonAuths.length > 0) {
for (let auth of onlineButtonAuths) {
authsMap.set(prefix + 'btn:' + auth, { action: auth, type: 1, status: 1, isAuth: false });
}
}
- //update-end-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制
return authsMap;
}
diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/vxe.data.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/vxe.data.ts
index e558ed85f..e603dbd1a 100644
--- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/vxe.data.ts
+++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/vxe.data.ts
@@ -30,10 +30,9 @@ export const vxeProps = () => ({
rowNumber: propTypes.bool.def(false),
// 固定行号位置或者不固定 【QQYUN-8405】
rowNumberFixed: propTypes.oneOf(['left', 'none']).def('left'),
- // update-begin--author:liaozhiyang---date:20240509---for:【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序
+ // 代码逻辑说明: 【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序
dragSortFixed: propTypes.oneOf(['left', 'none']).def('left'),
rowSelectionFixed: propTypes.oneOf(['left', 'none']).def('left'),
- // update-end--author:liaozhiyang---date:20240509---for:【issues/1162】JVxeTable列过长(出现横向滚动条)时无法拖拽排序
// 是否可选择行
rowSelection: propTypes.bool.def(false),
// 选择行类型
@@ -98,23 +97,20 @@ export const vxeProps = () => ({
addSetActive: propTypes.bool.def(true),
// 是否开启键盘编辑
keyboardEdit: propTypes.bool.def(false),
- // update-begin--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级
// 横向虚拟滚动配置(不支持展开行)
// 【QQYUN-7676】x滚动条滚动时字典变成了id
scrollX: propTypes.object.def(() => ({ enabled: false })),
// 纵向虚拟滚动配置(不支持展开行)
scrollY: propTypes.object.def(() => ({ enabled: true })),
- // update-end--author:liaozhiyang---date:20231013---for:【QQYUN-5133】JVxeTable 行编辑升级
//【QQYUN-8566】缓存列设置的key(路由页面内唯一)
cacheColumnsKey: propTypes.string.def(''),
- // update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
+ // 代码逻辑说明: 【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
rowClassName: {
type: [String, Function],
default: null,
},
// 不允许拖拽的行 [{'key':field,'value':value}]
notAllowDrag: propTypes.array.def(() => []),
- // update-end--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
// 新增按钮配置
addBtnCfg: propTypes.object,
diff --git a/jeecgboot-vue3/src/components/jeecg/OnLine/hooks/usePopBiz.ts b/jeecgboot-vue3/src/components/jeecg/OnLine/hooks/usePopBiz.ts
index 41c774686..a02592cf9 100644
--- a/jeecgboot-vue3/src/components/jeecg/OnLine/hooks/usePopBiz.ts
+++ b/jeecgboot-vue3/src/components/jeecg/OnLine/hooks/usePopBiz.ts
@@ -13,7 +13,7 @@ import {replaceUserInfoByExpression} from "@/utils/common/compUtils";
import { isString } from '/@/utils/is';
export function usePopBiz(ob, tableRef?) {
- // update-begin--author:liaozhiyang---date:20230811---for:【issues/675】子表字段Popup弹框数据不更新
+ // 代码逻辑说明: 【issues/675】子表字段Popup弹框数据不更新
let props: any;
if (isRef(ob)) {
props = ob.value;
@@ -24,7 +24,6 @@ export function usePopBiz(ob, tableRef?) {
} else {
props = ob;
}
- // update-end--author:liaozhiyang---date:20230811---for:【issues/675】子表字段Popup弹框数据不更新
const { createMessage } = useMessage();
//弹窗可视状态
const visible = ref(false);
@@ -115,16 +114,13 @@ export function usePopBiz(ob, tableRef?) {
* @param selectRow
*/
function onSelectChange(selectedRowKeys: (string | number)[]) {
- // update-begin--author:liaozhiyang---date:20240105---for:【QQYUN-7514】popup单选显示radio
+ // 代码逻辑说明: 【QQYUN-7514】popup单选显示radio
if (!props.multi) {
selectRows.value = [];
checkedKeys.value = [];
- // update-begin--author:liaozhiyang---date:20240717---for:【issues/6883】单选模式第二次打开已勾选
// selectedRowKeys = [selectedRowKeys[selectedRowKeys.length - 1]];
- // update-end--author:liaozhiyang---date:20240717---for:【issues/6883】单选模式第二次打开已勾选
}
- // update-end--author:liaozhiyang---date:20240105---for:【QQYUN-7514】popup单选显示radio
- // update-begin--author:liaozhiyang---date:20230919---for:【QQYUN-4263】跨页选择导出问题
+ // 代码逻辑说明: 【QQYUN-4263】跨页选择导出问题
if (!selectedRowKeys || selectedRowKeys.length == 0) {
selectRows.value = [];
checkedKeys.value = [];
@@ -152,7 +148,6 @@ export function usePopBiz(ob, tableRef?) {
}
checkedKeys.value = [...selectedRowKeys];
}
- // update-end--author:liaozhiyang---date:20230919---for:【QQYUN-4263】跨页选择导出问题
}
/**
* 过滤没用选项
@@ -180,9 +175,8 @@ export function usePopBiz(ob, tableRef?) {
function combineRowKey(record) {
let res = record?.id || '';
if (props?.rowkey) {
- // update-begin--author:liaozhiyang---date:20250415--for:【issues/3656】popupdict回显
+ // 代码逻辑说明: 【issues/3656】popupdict回显
res = record[props.rowkey];
- // update-end--author:liaozhiyang---date:20250415--for:【issues/3656】popupdict回显
} else {
Object.keys(record).forEach((key) => {
res = key == 'rowIndex' ? record[key] + res : res + record[key];
@@ -218,7 +212,7 @@ export function usePopBiz(ob, tableRef?) {
currColumns[a].sortOrder = unref(iSorter).order === 'asc' ? 'ascend' : 'descend';
}
}
- // update-begin--author:liaozhiyang---date:20250114---for:【issues/946】popup列宽和在线报表列宽读取配置
+ // 代码逻辑说明: 【issues/946】popup列宽和在线报表列宽读取配置
currColumns.forEach((item) => {
if (item.fieldWidth != null) {
if (isString(item.fieldWidth) && item.fieldWidth.trim().length == 0) return;
@@ -226,7 +220,6 @@ export function usePopBiz(ob, tableRef?) {
delete item.fieldWidth;
}
});
- // update-end--author:liaozhiyang---date:20250114---for:【issues/946】popup列宽和在线报表列宽读取配置
if (currColumns[0].key !== 'rowIndex') {
currColumns.unshift({
title: '序号',
@@ -235,13 +228,12 @@ export function usePopBiz(ob, tableRef?) {
width: 60,
align: 'center',
customRender: function ({ text }) {
- // update-begin--author:liaozhiyang---date:20231226---for:【QQYUN-7584】popup有合计时序号列会出现NaN
+ // 代码逻辑说明: 【QQYUN-7584】popup有合计时序号列会出现NaN
if (text == undefined) {
return '';
} else {
return parseInt(text) + 1;
}
- // update-end--author:liaozhiyang---date:20231226---for:【QQYUN-7584】popup有合计时序号列会出现NaN
},
});
}
@@ -275,7 +267,7 @@ export function usePopBiz(ob, tableRef?) {
const fieldHrefSlotKeysMap = {};
fieldHrefSlots.forEach((item) => (fieldHrefSlotKeysMap[item.slotName] = item));
let currColumns: any = handleColumnHrefAndDict(metaColumnList, fieldHrefSlotKeysMap);
- // update-begin--author:liaozhiyang---date:20250114---for:【issues/946】popup列宽和在线报表列宽读取配置
+ // 代码逻辑说明: 【issues/946】popup列宽和在线报表列宽读取配置
currColumns.forEach((item) => {
if (isString(item.fieldWidth) && item.fieldWidth.trim().length == 0) return;
if (item.fieldWidth != null) {
@@ -283,7 +275,6 @@ export function usePopBiz(ob, tableRef?) {
delete item.fieldWidth;
}
});
- // update-end--author:liaozhiyang---date:20250114---for:【issues/946】popup列宽和在线报表列宽读取配置
// popup需要序号, 普通列表不需要
if (clickThenCheckFlag === true) {
@@ -306,9 +297,8 @@ export function usePopBiz(ob, tableRef?) {
columns.value = [...currColumns];
initQueryInfo(res.result.data);
} else {
- //update-begin-author:taoyan date:20220401 for: VUEN-583【vue3】JeecgBootException: sql黑名单校验不通过,请联系管理员!,前台无提示
+ // 代码逻辑说明: VUEN-583【vue3】JeecgBootException: sql黑名单校验不通过,请联系管理员!,前台无提示
createMessage.warning(res.message);
- //update-end-author:taoyan date:20220401 for: VUEN-583【vue3】JeecgBootException: sql黑名单校验不通过,请联系管理员!,前台无提示
}
});
}
@@ -537,9 +527,8 @@ export function usePopBiz(ob, tableRef?) {
return getToken()
}
- // update-begin--author:liaozhiyang---date:20230904---for:【QQYUN-6390】eval替换成new Function,解决build警告
+ // 代码逻辑说明: 【QQYUN-6390】eval替换成new Function,解决build警告
return _eval(s0);
- // update-end--author:liaozhiyang---date:20230904---for:【QQYUN-6390】eval替换成new Function,解决build警告
} catch (e) {
console.error(e);
return text;
@@ -659,9 +648,8 @@ export function usePopBiz(ob, tableRef?) {
params['onlRepUrlParamStr'] = getUrlParamString();
console.log('params', params);
loading.value = true;
- // update-begin--author:liaozhiyang---date:20240603---for:【TV360X-578】online报表SQL翻译,第二页不翻页数据
+ // 代码逻辑说明: 【TV360X-578】online报表SQL翻译,第二页不翻页数据
let url = `${configUrl.getColumnsAndData}${unref(cgRpConfigId)}`;
- // update-end--author:liaozhiyang---date:20240603---for:【TV360X-578】online报表SQL翻译,第二页不翻页数据
const {query} = handleCodeParams()
if (query) {
url = url + query
@@ -669,13 +657,11 @@ export function usePopBiz(ob, tableRef?) {
//缓存key
let groupIdKey = props.groupId ? `${props.groupId}${url}${JSON.stringify(params)}` : '';
httpGroupRequest(() => defHttp.get({ url, params }, { isTransformResponse: false, successMessageMode: 'none' }), groupIdKey).then((res) => {
- // update-begin--author:liaozhiyang---date:20240603---for:【TV360X-578】online报表SQL翻译,第二页不翻页数据
+ // 代码逻辑说明: 【TV360X-578】online报表SQL翻译,第二页不翻页数据
res.result.dictOptions && initDictOptionData(res.result.dictOptions);
- // update-end--author:liaozhiyang---date:20240603---for:【TV360X-578】online报表SQL翻译,第二页不翻页数据
loading.value = false;
- // update-begin--author:liaozhiyang---date:20240603---for:【TV360X-578】online报表SQL翻译,第二页不翻页数据
+ // 代码逻辑说明: 【TV360X-578】online报表SQL翻译,第二页不翻页数据
let data = res.result.data;
- // update-end--author:liaozhiyang---date:20240603---for:【TV360X-578】online报表SQL翻译,第二页不翻页数据
console.log('表格信息:', data);
setDataSource(data);
});
@@ -708,13 +694,10 @@ export function usePopBiz(ob, tableRef?) {
}
}
dataSource.value = data.records;
- //update-begin-author:taoyan date:2023-2-11 for:issues/356 在线报表分页有问题
- //update-begin-author:liusq date:2023-4-04 for:issues/426 修复356时候引入的回归错误 JPopupOnlReportModal.vue 中未修改
+ // 代码逻辑说明: issues/426 修复356时候引入的回归错误 JPopupOnlReportModal.vue 中未修改
tableRef?.value && tableRef?.value?.setPagination({
total: Number(data.total)
})
- //update-end-author:liusq date:2023-4-04 for:issues/426 修复356时候引入的回归错误 JPopupOnlReportModal.vue 中未修改
- //update-end-author:taoyan date:2023-2-11 for:issues/356 在线报表分页有问题
} else {
pagination.total = 0;
dataSource.value = [];
@@ -811,12 +794,11 @@ export function usePopBiz(ob, tableRef?) {
*/
function clickThenCheck(record) {
if (clickThenCheckFlag === true) {
- // update-begin--author:liaozhiyang---date:20240104---for:【QQYUN-7514】popup单选显示radio
+ // 代码逻辑说明: 【QQYUN-7514】popup单选显示radio
if (!props.multi) {
selectRows.value = [];
checkedKeys.value = [];
}
- // update-end--author:liaozhiyang---date:20240104---for:【QQYUN-7514】popup单选显示radio
let rowKey = combineRowKey(record);
if (!unref(checkedKeys) || unref(checkedKeys).length == 0) {
let arr1: any[] = [],
@@ -837,9 +819,8 @@ export function usePopBiz(ob, tableRef?) {
//selectRows.value.splice(rowKey_index, 1);
}
}
- // update-begin--author:liaozhiyang---date:20230914---for:【issues/5357】点击行选中
+ // 代码逻辑说明: 【issues/5357】点击行选中
tableRef.value.setSelectedRowKeys([...checkedKeys.value]);
- // update-end--author:liaozhiyang---date:20230914---for:【issues/5357】点击行选中
}
}
@@ -931,7 +912,6 @@ export function usePopBiz(ob, tableRef?) {
hrefComponent.value.is = markRaw(defineAsyncComponent(() => importViewsFile(path)));
}
- //update-begin-author:taoyan date:2022-5-31 for: VUEN-1155 popup 选择数据时,会选择多条重复数据
/**
* emit事件 获取选中的行数据
*/
@@ -957,7 +937,6 @@ export function usePopBiz(ob, tableRef?) {
}
return rows;
}
- //update-end-author:taoyan date:2022-5-31 for: VUEN-1155 popup 选择数据时,会选择多条重复数据
return [
{
diff --git a/jeecgboot-vue3/src/components/jeecg/captcha/CaptchaModal.vue b/jeecgboot-vue3/src/components/jeecg/captcha/CaptchaModal.vue
index c20c8c606..07d4ae8f6 100644
--- a/jeecgboot-vue3/src/components/jeecg/captcha/CaptchaModal.vue
+++ b/jeecgboot-vue3/src/components/jeecg/captcha/CaptchaModal.vue
@@ -76,9 +76,8 @@
*/
async function getCaptchaCode() {
await resetFields();
- //update-begin---author:chenrui ---date:2025/1/7 for:[QQYUN-10775]验证码可以复用 #7674------------
+ // 代码逻辑说明: [QQYUN-10775]验证码可以复用 #7674------------
randCodeData.checkKey = new Date().getTime() + Math.random().toString(36).slice(-4); // 1629428467008;
- //update-end---author:chenrui ---date:2025/1/7 for:[QQYUN-10775]验证码可以复用 #7674------------
getCodeInfo(randCodeData.checkKey).then((res) => {
randCodeData.randCodeImage = res;
randCodeData.requestCodeSuccess = true;
diff --git a/jeecgboot-vue3/src/components/jeecg/comment/CommentFiles.vue b/jeecgboot-vue3/src/components/jeecg/comment/CommentFiles.vue
index 393001ec6..a34fbbee3 100644
--- a/jeecgboot-vue3/src/components/jeecg/comment/CommentFiles.vue
+++ b/jeecgboot-vue3/src/components/jeecg/comment/CommentFiles.vue
@@ -146,9 +146,8 @@
}
function onSelectFileOk(temp) {
- // update-begin--author:liaozhiyang---date:20240603---for:【TV360X-935】从知识库选择文件判断下是否没选
+ // 代码逻辑说明: 【TV360X-935】从知识库选择文件判断下是否没选
if (temp.length === 0) return;
- // update-end--author:liaozhiyang---date:20240603---for:【TV360X-935】从知识库选择文件判断下是否没选
let arr = selectFileList.value;
// -update-begin--author:liaozhiyang---date:20240614---for:【TV360X-938】知识库文件选择支持多选
temp.forEach((item) => {
diff --git a/jeecgboot-vue3/src/components/jeecg/comment/CommentList.vue b/jeecgboot-vue3/src/components/jeecg/comment/CommentList.vue
index 0a2278b90..fa0c053f0 100644
--- a/jeecgboot-vue3/src/components/jeecg/comment/CommentList.vue
+++ b/jeecgboot-vue3/src/components/jeecg/comment/CommentList.vue
@@ -189,12 +189,10 @@
let array = data.records;
console.log(123, array);
dataList.value = array;
- // update-begin--author:liaozhiyang---date:20240521---for:【TV360X-18】评论之后滚动条自动触底
// Number.MAX_SAFE_INTEGER 火狐不兼容改成 10e4
nextTick(() => {
listRef.value && listRef.value.$el && (listRef.value.$el.scrollTop = 10e5);
});
- // update-end--author:liaozhiyang---date:20240521---for:【TV360X-18】评论之后滚动条自动触底
}
}
@@ -282,11 +280,10 @@
}
}
}
- // update-begin--author:liaozhiyang---date:20240618---for:【TV360X-932】评论加上换行
+ // 代码逻辑说明: 【TV360X-932】评论加上换行
const lineFeed = (content) => {
return content.replace(/\n/g, '
');
};
- // update-end--author:liaozhiyang---date:20240618---for:【TV360X-932】评论加上换行
return {
dataList,
@@ -349,7 +346,7 @@
.tx{
margin-top: 4px;
}
- // update-begin--author:liaozhiyang---date:20240327---for:【QQYUN-8639】暗黑主题适配
+ // 代码逻辑说明: 【QQYUN-8639】暗黑主题适配
.comment-area {
position: absolute;
bottom: 0;
@@ -367,5 +364,4 @@
color:rgba(255, 255, 255, 0.85);
}
}
- // update-end--author:liaozhiyang---date:20240327---for:【QQYUN-8639】暗黑主题适配
diff --git a/jeecgboot-vue3/src/components/jeecg/comment/CommentPanel.vue b/jeecgboot-vue3/src/components/jeecg/comment/CommentPanel.vue
index ce85a030e..c9dc21f90 100644
--- a/jeecgboot-vue3/src/components/jeecg/comment/CommentPanel.vue
+++ b/jeecgboot-vue3/src/components/jeecg/comment/CommentPanel.vue
@@ -74,13 +74,11 @@
datetime1.value = temp;
datetime2.value = temp;
datetime3.value = temp;
- // update-begin--author:liaozhiyang---date:20240527---for:【TV360X-486】再次打开重置组件内的状态
// 再次打开重置组件内的状态
show.value = false;
nextTick(() => {
show.value = true;
});
- // update-end--author:liaozhiyang---date:20240527---for:【TV360X-486】再次打开重置组件内的状态
}
return {
diff --git a/jeecgboot-vue3/src/components/jeecg/comment/MyComment.vue b/jeecgboot-vue3/src/components/jeecg/comment/MyComment.vue
index 8ba4d0de0..7e3d912dd 100644
--- a/jeecgboot-vue3/src/components/jeecg/comment/MyComment.vue
+++ b/jeecgboot-vue3/src/components/jeecg/comment/MyComment.vue
@@ -96,12 +96,11 @@
const buttonLoading = ref(false);
const myComment = ref('');
function sendComment(e) {
- // update-begin--author:liaozhiyang---date:20240618---for:【TV360X-932】评论加上换行
+ // 代码逻辑说明: 【TV360X-932】评论加上换行
const keyCode = e.keyCode || e.which;
if (keyCode == 13 && e.shiftKey) {
return;
}
- // update-end--author:liaozhiyang---date:20240618---for:【TV360X-932】评论加上换行
let content = myComment.value;
if (!content && content !== '0') {
disabledButton.value = true;
@@ -159,7 +158,7 @@
if (realname && username) {
let str = `${realname}[${username}]`;
let temp = myComment.value;
- // update-begin--author:liaozhiyang---date:20240726---for:【TV360X-929】选择@用户,应该插入到光标位置
+ // 代码逻辑说明: 【TV360X-929】选择@用户,应该插入到光标位置
if (!temp) {
myComment.value = '@' + str + ' ';
} else {
@@ -180,18 +179,16 @@
myComment.value = startStr + _symbol + str + ' ' + endStr;
}
}
- // update-begin--author:liaozhiyang---date:20240726---for:【TV360X-929】选择@用户,应该插入到光标位置
- //update-begin---author:wangshuai---date:2024-01-22---for:【QQYUN-8002】选完人,鼠标应该放到后面并在前面加上空格---
+ // 代码逻辑说明: 【QQYUN-8002】选完人,鼠标应该放到后面并在前面加上空格---
showHtml.value = false;
commentRef.value.focus();
commentActive.value = true;
- //update-end---author:wangshuai---date:2024-01-22---for:【QQYUN-8002】选完人,鼠标应该放到后面并在前面加上空格---
}
}
closeModal();
}
- // update-begin--author:liaozhiyang---date:20240724---for:【TV360X-927】@只有在输入时弹出用户弹窗,删除时不应该弹出
+ // 代码逻辑说明: 【TV360X-927】@只有在输入时弹出用户弹窗,删除时不应该弹出
function handleCommentChange(e) {
if (e.data === '@') {
e.target.blur();
@@ -206,7 +203,6 @@
// }
// }
// );
- // update-end--author:liaozhiyang---date:20240724---for:【TV360X-927】@只有在输入时弹出用户弹窗,删除时不应该弹出
const emojiButton = ref();
function onSelectEmoji(emoji) {
@@ -223,13 +219,12 @@
if (str.indexOf('::') > 0) {
str = str.substring(0, str.indexOf(':') + 1);
}
- // update-begin--author:liaozhiyang---date:20240603---for:【TV360X-931】评论表情插入光标位置
+ // 代码逻辑说明: 【TV360X-931】评论表情插入光标位置
const index = commentRef.value?.selectionStart ?? temp.length;
// myComment.value = temp + str;
const startStr = temp.substring(0, index);
const endStr = temp.substring(index);
myComment.value = startStr + str + endStr;
- // update-end--author:liaozhiyang---date:20240603---for:【TV360X-931】评论表情插入光标位置
visibleEmoji.value = false;
handleBlur();
}
@@ -279,11 +274,10 @@
}
function handleBlur() {
showHtml.value = true;
- // update-begin--author:liaozhiyang---date:20240724---for:解决多行获取焦点和失去焦点时滚动位置不一致
+ // 代码逻辑说明: 解决多行获取焦点和失去焦点时滚动位置不一致
setTimeout(() => {
commentContentRef.value!.scrollTop = commentRef.value.scrollTop;
}, 0);
- // update-end--author:liaozhiyang---date:20240724---for:解决多行获取焦点和失去焦点时滚动位置不一致
}
const commentActive = ref(false);
@@ -343,13 +337,12 @@
diff --git a/jeecgboot-vue3/src/components/jeecg/comment/UploadChunk.vue b/jeecgboot-vue3/src/components/jeecg/comment/UploadChunk.vue
index 1de433a70..2ec08abee 100644
--- a/jeecgboot-vue3/src/components/jeecg/comment/UploadChunk.vue
+++ b/jeecgboot-vue3/src/components/jeecg/comment/UploadChunk.vue
@@ -107,10 +107,13 @@
function onSelectFileOk(temp) {
let arr = selectFileList.value;
- arr.push({
- ...temp,
- exist: true
- })
+ // 代码逻辑说明: 【JHHB-524】我的日程留言功能,从文件库中无法选附件
+ temp.forEach((item) => {
+ arr.push({
+ ...item,
+ exist: true
+ })
+ });
selectFileList.value = arr;
}
diff --git a/jeecgboot-vue3/src/components/jeecg/comment/useComment.ts b/jeecgboot-vue3/src/components/jeecg/comment/useComment.ts
index 4520a5b5e..8db8f66fc 100644
--- a/jeecgboot-vue3/src/components/jeecg/comment/useComment.ts
+++ b/jeecgboot-vue3/src/components/jeecg/comment/useComment.ts
@@ -378,10 +378,9 @@ export function useFileList() {
await initViewDomain();
//本地测试需要将文件地址的localhost/127.0.0.1替换成IP, 或是直接修改全局domain
//url = url.replace('localhost', '192.168.1.100')
- //update-begin---author:scott ---date:2024-06-03 for:【TV360X-952】升级到kkfileview4.1.0---
+ // 代码逻辑说明: 【TV360X-952】升级到kkfileview4.1.0---
let previewUrl = encodeURIComponent(encryptByBase64(url));
window.open(onlinePreviewDomain+'?url='+previewUrl);
- //update-end---author:scott ---date::2024-06-03 for:【TV360X-952】升级到kkfileview4.1.0----
}
}
}
diff --git a/jeecgboot-vue3/src/components/onlinePreview/WpsFileView.vue b/jeecgboot-vue3/src/components/onlinePreview/WpsFileView.vue
new file mode 100644
index 000000000..a8321d9f0
--- /dev/null
+++ b/jeecgboot-vue3/src/components/onlinePreview/WpsFileView.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
+
diff --git a/jeecgboot-vue3/src/components/onlinePreview/open-jssdk.es.js b/jeecgboot-vue3/src/components/onlinePreview/open-jssdk.es.js
new file mode 100644
index 000000000..93ef4e9d6
--- /dev/null
+++ b/jeecgboot-vue3/src/components/onlinePreview/open-jssdk.es.js
@@ -0,0 +1 @@
+var e={658:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(){i=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new L(r||[]);return o(a,"_invoke",{value:_(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=d;var p={};function v(){}function h(){}function E(){}var T={};l(T,s,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(D([])));m&&m!==t&&n.call(m,s)&&(T=m);var b=E.prototype=v.prototype=Object.create(T);function w(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){function i(o,a,s,c){var u=f(e[o],e,a);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==r(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,s,c)}),(function(e){i("throw",e,s,c)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return i("throw",e,s,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function _(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=I(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=f(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function I(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,I(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=f(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function D(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:D(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function o(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,c,"next",e)}function c(e){o(a,r,i,s,c,"throw",e)}s(void 0)}))}}function s(e,t){for(var n=0;n0&&void 0!==r[0]?r[0]:{},t.printTimer||t.printResolve){e.next=5;break}return e.abrupt("return",new Promise((function(e,r){t.postMessage("print.request",n),clearTimeout(t.printTimer),t.printTimer=setTimeout((function(){delete t.printResolve,delete t.printTimer,r("ERROR:导出接口超时")}),6e5),t.printResolve=e})));case 5:console.error("WARN:已存在未完成的导出任务,请稍后重试");case 6:case"end":return e.stop()}}),e)}))))})));window.litePreviewSDK={config:l.init};var d={config:l.init}},123:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.r(t),n.d(t,{config:function(){return be}});var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0&&e.HANDLE_LIST.splice(n,1),window.removeEventListener("message",t,!1)},e.empty=function(){for(;e.HANDLE_LIST.length;)window.removeEventListener("message",e.HANDLE_LIST.shift(),!1)},e.parse=function(e){try{if(e&&"string"==typeof e){var t=e.indexOf('"__objName":')>=0,n=JSON.parse(e);return t&&(n.hasInnerObj=!0),n}return e}catch(e){console.log("Message.parse Error:",e)}},e.HANDLE_LIST=[],e}();function c(e){if(!e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function u(e){return"[object Function]"==={}.toString.call(e)}var l,d,f,p,v,h={origin:""};function E(e,t){h[e]=t}function T(e){return h[e]}function g(e){var t=T("whiteList")||[],n=T("origin");return!!function(e,t,n){return!n.includes(t)&&e!==t&&(e.replace(/www\./i,"").toLowerCase()!==t.replace(/www\./i,"").toLowerCase()||(e.match("www.")?void 0:(E("origin",t),!1)))}(n,e.origin,t)&&(console.warn("postMessage 域名检查不通过",{safeOrigin:n,eventOrigin:e.origin}),!0)}(v=l||(l={})).unknown="unknown",v.spreadsheet="s",v.writer="w",v.presentation="p",v.pdf="f",function(e){e.wps="w",e.et="s",e.presentation="p",e.pdf="f"}(d||(d={})),function(e){e.nomal="nomal",e.simple="simple"}(f||(f={})),function(e){e[e.requestFullscreen=1]="requestFullscreen",e[e.exitFullscreen=0]="exitFullscreen"}(p||(p={}));var m,b,w,y=(m=0,function(){return m+=1}),_=function(e,t,n){void 0===n&&(n=!0);var r=t;if(!b){var i=function e(t){var n=t.clientHeight,r=t.clientWidth;0!==n||0!==r||w?0===n&&0===r||!w||(w.disconnect(),w=null):window.ResizeObserver&&(w=new ResizeObserver((function(n){e(t)}))).observe(t),b.style.cssText+="height: "+n+"px; width: "+r+"px"}.bind(null,r);(b=document.createElement("iframe")).classList.add("web-office-iframe");var o={id:"office-iframe",src:e,scrolling:"no",frameborder:"0",allowfullscreen:"allowfullscreen",webkitallowfullscreen:"true",mozallowfullscreen:"true",allow:"clipboard-read; clipboard-write"};for(var a in r?(o.style="width: "+r.clientWidth+"px; height: "+r.clientHeight+"px;",n&&window.addEventListener("resize",i)):((r=document.createElement("div")).classList.add("web-office-default-container"),function(e){var t=document.createElement("style");document.head.appendChild(t);var n=t.sheet;n.insertRule(".web-office-default-container {position: absolute; padding: 0; margin: 0; width: 100%; height: 100%; left: 0; top: 0;}",n.cssRules.length)}(),document.body.appendChild(r),o.style="position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%;"),H&&window.visualViewport&&window.visualViewport.addEventListener("resize",I),o)b.setAttribute(a,o[a]);r.appendChild(b),b.destroy=function(){b.parentNode.removeChild(b),b=null,window.removeEventListener("resize",i),w&&(w.disconnect(),w=null)}}return b};function I(){var e=window.visualViewport,t=e.width,n=e.height,r=document.body.clientHeight-b.clientHeight;N({eventName:"visualViewportResize",data:{width:t,height:n-r}})}var N=function(e){_().contentWindow&&_().contentWindow.postMessage(JSON.stringify(e),T("realOrigin"))};function S(e,t,n){return new Promise((function(r){var i=y();s.add((function e(t){if(!g(t)){var o=s.parse(t.data);o.eventName===n&&o.msgId===i&&(r(o.data),s.remove(e))}})),N({data:e,msgId:i,eventName:t})}))}var L=function(e){return S(e,"wps.jssdk.api","wps.api.reply")},D=function(e){return S(e,"api.basic","api.basic.reply")},A={idMap:{}},O={};function k(e,t){return o(this,void 0,void 0,(function(){var n,r,i,o;return a(this,(function(a){switch(a.label){case 0:return"api.callback"===e.eventName&&e.callbackId&&O[e.callbackId]?(n=e.data.args,e.hasInnerObj?[4,W(n,t)]:[3,2]):[3,5];case 1:return i=a.sent(),[3,3];case 2:i=n,a.label=3;case 3:return r=i,[4,O[e.callbackId].apply(O,r)];case 4:o=a.sent(),N({result:o,eventName:"api.callback.reply",callbackId:e.callbackId}),a.label=5;case 5:return[2]}}))}))}function W(e,t){return o(this,void 0,void 0,(function(){var n,i,o,s,u,l,d,f,p,v;return a(this,(function(a){switch(a.label){case 0:if(!Array.isArray(e))return[3,5];s=[],n=0,a.label=1;case 1:return n=0?"&":"?")+w.join("&")),d&&(d.isParentFullscreen||d.isBrowserViewFullscreen)&&(document.addEventListener("fullscreenchange",F),document.addEventListener("webkitfullscreenchange",F),document.addEventListener("mozfullscreenchange",F)),n.wordOptions&&(n.wpsOptions=n.wordOptions),n.excelOptions&&(n.etOptions=n.excelOptions),n.pptOptions&&(n.wppOptions=n.pptOptions),"object"==r(c.print)){var y="wpsconfig_print";"function"==typeof c.print.subscribe&&(c[y]=c.print.subscribe,n.print={callback:y},void 0!==c.print.custom&&(n.print.custom=c.print.custom)),delete c.print}return"function"==typeof c.exportPdf&&(c[y="wpsconfig_export_pdf"]=c.exportPdf,n.exportPdf={callback:y},delete c.exportPdf),n.commandBars&&j(n.commandBars,!1),i(i({},n),{subscriptions:c})},U=function(e){void 0===e&&(e="");var t="";if(!t&&e){var n=e.toLowerCase();-1!==n.indexOf("/office/s/")&&(t=l.spreadsheet),-1!==n.indexOf("/office/w/")&&(t=l.writer),-1!==n.indexOf("/office/p/")&&(t=l.presentation),-1!==n.indexOf("/office/f/")&&(t=l.pdf)}if(!t){var r=e.match(/[\?&]type=([a-z]+)/)||[];t=d[r[1]]||""}return t};function j(e,t){void 0===t&&(t=!0);var n=e.map((function(e){var t=e.attributes;if(!Array.isArray(t)){var n=[];for(var r in t)if(t.hasOwnProperty(r)){var i={name:r,value:t[r]};n.push(i)}e.attributes=n}return e}));return t&&N({data:n,eventName:"setCommandBars"}),n}var R=window.navigator.userAgent.toLowerCase(),B=/Android|webOS|iPhone|iPod|BlackBerry|iPad/i.test(R),H=/iPhone|iPod|iPad/i.test(R),Y=function(){try{return-1!==window._parent.location.search.indexOf("from=wxminiprogram")}catch(e){return!1}}();function F(){var e={status:p.requestFullscreen},t=document,n=t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement;e.status=n?p.requestFullscreen:p.exitFullscreen,N({data:e,eventName:"fullscreenchange"})}var X=function(){A.idMap={}};function V(){console.group("JSSDK 事件机制调整说明"),console.warn("jssdk.on、jssdk.off 和 jssdk.Application.Sub 将在后续版本中被弃用,建议使用改进后的 ApiEvent"),console.warn("具体请参考:https://wwo.wps.cn/docs/front-end/basic-usage/events/intro/"),console.groupEnd()}var z=0,J=new Set;function K(e){return z+=1,!e&&function(e){J.forEach((function(t){return t(e)}))}(z),z}function q(){var e=new Error("");return(e.stack||e.message||"").split("\n").slice(2).join("\n")}var $={};function Z(e,t){for(var n=$.otherProps,r=$.names,i=Object.keys(r),o=-1,a=0;a=0){var c={objId:e},u=n[o];return u&&ne(c,u,n),c}}function Q(e,t){var n=this,r=t.Events,i=t.Enum,c=t.Props,u=c[0],d=c[1],f=c[2];Object.assign($,{appProps:u,otherProps:d,names:f});var p,v={objId:z};switch(ne(v,u,d),v.Events=r,v.Enum=i,e.Enum=v.Enum,e.Events=v.Events,e.Props=c,U(e.url)){case l.writer:e.WordApplication=e.WpsApplication=function(){return v};break;case l.spreadsheet:e.ExcelApplication=e.EtApplication=function(){return v};break;case l.presentation:e.PPTApplication=e.WppApplication=function(){return v};break;case l.pdf:e.PDFApplication=function(){return v}}e.Application=v,e.Free=function(e){return M("api.free",{objId:e},"")},e.Stack=v.Stack=(p=function(t){e&&e.Free(t)},function(){var e=[],t=function(t){e.push(t)};return J.add(t),{End:function(){p(e),J.delete(t)}}});var h={};s.add((function(e){return o(n,void 0,void 0,(function(){var t,n,r,i,o;return a(this,(function(a){switch(a.label){case 0:return g(e)?[2]:"api.event"===(t=s.parse(e.data)).eventName&&t.data?(n=t.data,r=n.eventName,i=n.data,(o=h[r])?[4,o(i)]:[3,2]):[3,2];case 1:a.sent(),a.label=2;case 2:return[4,k(t,(function(e,t){return Z(e,t)}))];case 3:return a.sent(),[2]}}))}))})),v.Sub={};var E=function(e){var t=r[e];Object.defineProperty(v.Sub,t,{set:function(e){V(),h[t]=e,N({eventName:"api.event.register",data:{eventName:t,register:!!e,objId:z+=1}})}})};for(var T in r)E(T)}var ee=window.FinalizationRegistry&&new FinalizationRegistry((function(e){M("api.free",{objId:e},"")})),te=["ExportAsFixedFormat","GetOperatorsInfo","ImportDataIntoFields","ReplaceText","ReplaceBookmark","GetBookmarkText","GetComments"];function ne(e,t,n){var r=t.slice(0),o=e.objId;r.includes("Destroy")||(e.Destroy=function(){return M("api.free",{objId:o},"")}),ee&&ee.register(e,o);for(var a=function(){var t=r.shift();!t.alias&&~te.indexOf(t.prop)&&r.push(i(i({},t),{alias:t.prop+"Async"}));var o=t.alias||t.prop;Object.defineProperty(e,o,{get:function(){var r=this,i=1===t.cache,o=i&&this["__"+t.prop+"CacheValue"];if(!o){var a=q(),s=K(i),c=function r(){for(var i,o=[],s=0;s=0?(t.done=null,t.then=null,e(t)):e(i.result),a.label=4;case 4:return[3,6];case 5:return s=a.sent(),n(s),[3,6];case 6:return[2]}}))}))},t.catch=function(e){return u.catch(e)}}var ie={},oe=null,ae="fileOpen",se="fileSaved",ce="fileStatus",ue="fullscreenChange",le="error",de="stage",fe="api.getToken",pe="event.toast",ve="event.hyperLinkOpen",he="api.getClipboardData";function Ee(e,t,n,r,c,u,l){var d=this;void 0===n&&(n={}),s.add((function(f){return o(d,void 0,void 0,(function(){var o,d,p,v,h,E,T,m,b,w,y,_,I,S,L,D,A,O,k;return a(this,(function(a){switch(a.label){case 0:return g(f)?[2]:(o=s.parse(f.data),d=o.eventName,p=void 0===d?"":d,v=o.data,h=void 0===v?null:v,E=o.url,T=void 0===E?null:E,-1!==["wps.jssdk.api"].indexOf(p)?[2]:"ready"!==p?[3,1]:(c.apiReadySended&&function(e){var t=[];Object.keys(ie).forEach((function(n){ie[n].forEach((function(r){var i=n;e.off(i,r),t.push({handle:r,eventName:i})})),delete ie[n]})),t.forEach((function(e){var t=e.eventName,n=e.handle;null==oe||oe.ApiEvent.AddApiEventListener(t,n)}))}(t),N({eventName:"setConfig",data:i(i({},n),{version:e.version})}),e.tokenData&&e.setToken(i(i({},e.tokenData),{hasRefreshTokenConfig:!!n.refreshToken})),e.iframeReady=!0,[3,15]));case 1:return"error"!==p?[3,2]:(t.emit(le,h),[3,15]);case 2:return"open.result"!==p?[3,3]:(void 0!==(null===(A=null==h?void 0:h.fileInfo)||void 0===A?void 0:A.officeVersion)&&(e.mainVersion=h.fileInfo.officeVersion,console.log("WebOfficeSDK Main Version: V"+e.mainVersion)),t.emit(ae,h),[3,15]);case 3:return"api.scroll"!==p?[3,4]:(window.scrollTo(h.x,h.y),[3,15]);case 4:if(p!==fe)return[3,9];m={token:!1},a.label=5;case 5:return a.trys.push([5,7,,8]),[4,c.refreshToken()];case 6:return m=a.sent(),[3,8];case 7:return b=a.sent(),console.error("refreshToken: "+(b||"fail to get")),[3,8];case 8:return N({eventName:fe+".reply",data:m}),[3,15];case 9:if(p!==he)return[3,14];w={text:"",html:""},a.label=10;case 10:return a.trys.push([10,12,,13]),[4,c.getClipboardData()];case 11:return w=a.sent(),[3,13];case 12:return y=a.sent(),console.error("getClipboardData: "+(y||"fail to get")),[3,13];case 13:return N({eventName:he+".reply",data:w}),[3,15];case 14:p===pe?c.onToast(h):p===ve?c.onHyperLinkOpen(h):"stage"===p?t.emit(de,h):"event.callback"===p?(_=h.eventName,I=h.data,S=_,_===ue&&(S="fullscreenchange"),"file.saved"===_&&(S=ce),((null===(O=n.commonOptions)||void 0===O?void 0:O.isBrowserViewFullscreen)||(null===(k=n.commonOptions)||void 0===k?void 0:k.isParentFullscreen))&&"fullscreenchange"===S&&(L=I.status,D=I.isDispatchEvent,n.commonOptions.isBrowserViewFullscreen?function(e,t,n,r){0===e?t.style="position: static; width: "+n.width+"; height: "+n.height:1===e&&(t.style="position: absolute; width: 100%; height: 100%"),r&&function(e){["fullscreen","fullscreenElement"].forEach((function(t){Object.defineProperty(document,t,{get:function(){return!!e.status},configurable:!0})}));var t=new CustomEvent("fullscreenchange");document.dispatchEvent(t)}({status:e})}(L,u,l,D):n.commonOptions.isParentFullscreen&&function(e,t,n){var r=document.querySelector(n),i=r&&1===r.nodeType?r:t;if(0===e){var o=document;(o.exitFullscreen||o.mozCancelFullScreen||o.msExitFullscreen||o.webkitCancelFullScreen||o.webkitExitFullscreen).call(document)}else if(1===e){(i.requestFullscreen||i.mozRequestFullScreen||i.msRequestFullscreen||i.webkitRequestFullscreen).call(i)}}(L,u,n.commonOptions.isParentFullscreen)),t.emit(S,I)):"api.ready"===p&&Q(e,h),a.label=15;case 15:return"function"==typeof r[p]&&r[p](e,T||h),[2]}}))}))}))}function Te(e){return new Promise((function(t){s.add((function n(r){E("realOrigin",r.origin),g(r)||s.parse(r.data).eventName===e&&(t(null),s.remove(n))}))}))}function ge(e){var t,n=this;void 0===e&&(e={}),oe&&oe.destroy();try{var r=C(e),i=r.subscriptions,c=void 0===i?{}:i,l=r.mount,d=void 0===l?null:l,f=r.url,p=r.refreshToken,v=r.onToast,h=r.onHyperLinkOpen,T=r.getClipboardData;E("whiteList",r.originWhiteList),E("origin",(f.match(/https*:\/\/[^\/]+/g)||[])[0]);var g=_(f,d),m=Te("open.result"),b=Te("api.ready"),w=d?{width:d.clientWidth+"px",height:d.clientHeight+"px"}:{width:"100vw",height:"100vh"};delete r.mount,f&&delete r.url,delete r.subscriptions;var y=(t=t||Object.create(null),{on:function(e,n){(t[e]||(t[e]=[])).push(n)},off:function(e,n){t[e]&&t[e].splice(t[e].indexOf(n)>>>0,1)},emit:function(e,n){(t[e]||[]).slice().map((function(e){e(n)})),(t["*"]||[]).slice().map((function(t){t(e,n)}))}}),I={apiReadySended:!1,apiReadySendedOnce:!1},S=function(e,t,r){return o(n,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return function(e,t,n){if(ie[e]){var r=!!ie[e].find((function(e){return e===t}));return r&&"off"===n?(y.off(e,t),ie[e]=ie[e].filter((function(e){return e!==t})),!!ie[e].length||(ie[e]=void 0,!1)):(r||"on"!==n||(ie[e].push(t),y.on(e,t)),!0)}return"on"===n?(ie[e]=[],ie[e].push(t),!1):"off"===n||void 0}(e,t,r)?[3,2]:[4,A];case 1:n.sent(),function(e,t){var n=e.eventName,r=e.type,i=e.handle;"on"===t?y.on(n,i):y.off(n,i),"base.event"===r&&N({eventName:"basic.event",data:{eventName:n,action:t}}),V()}(function(e,t){var n=e,r="base.event";switch(n){case se:console.warn("fileSaved事件监听即将弃用, 推荐使用fileStatus进行文件状态的监听"),n="fileStatus";break;case ue:n="fullscreenchange";break;case"error":case"fileOpen":r="callback.event"}return{eventName:n,type:r,handle:t}}(e,t),r),n.label=2;case 2:return[2]}}))}))};oe={url:f,iframe:g,version:"1.1.20",iframeReady:!1,tokenData:null,commandBars:null,tabs:{getTabs:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,A];case 1:return e.sent(),[2,D({api:"tab.getTabs"})]}}))}))},switchTab:function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,A];case 1:return t.sent(),[2,D({api:"tab.switchTab",args:{tabKey:e}})]}}))}))}},setCooperUserColor:function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,A];case 1:return t.sent(),[2,D({api:"setCooperUserColor",args:e})]}}))}))},setToken:function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,A];case 1:return t.sent(),oe.tokenData=e,N({eventName:"setToken",data:e}),[2]}}))}))},ready:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return I.apiReadySendedOnce?[3,2]:(I.apiReadySendedOnce=!0,[4,m]);case 1:e.sent(),I.apiReadySended=!0,N({eventName:"api.ready"}),e.label=2;case 2:return[4,b];case 3:return e.sent(),[2,new Promise((function(e){return setTimeout((function(){return e(null==oe?void 0:oe.Application)}),0)}))]}}))}))},destroy:function(){ie={},g.destroy(),s.empty(),oe=null,J=new Set,z=0,document.removeEventListener("fullscreenchange",F),X()},save:function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,A];case 1:return e.sent(),[2,L({api:"save"})]}}))}))},setCommandBars:function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,A];case 1:return t.sent(),j(e),[2]}}))}))},updateConfig:function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,A];case 1:return t.sent(),e.commandBars?(console.warn("Deprecated: `updateConfig()` 方法即将废弃,请使用`setCommandBars()`代替`updateConfig()`更新`commandBars`配置。"),[4,j(e.commandBars)]):[3,3];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},executeCommandBar:function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,A];case 1:return t.sent(),j([{cmbId:e,attributes:[{name:"click",value:!0}]}]),[2]}}))}))},on:function(e,t){return o(this,void 0,void 0,(function(){return a(this,(function(n){return[2,this.ApiEvent.AddApiEventListener(e,t)]}))}))},off:function(e,t){return o(this,void 0,void 0,(function(){return a(this,(function(n){return[2,this.ApiEvent.RemoveApiEventListener(e,t)]}))}))},ApiEvent:{AddApiEventListener:function(e,t){return o(this,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return[4,S(e,t,"on")];case 1:return[2,n.sent()]}}))}))},RemoveApiEventListener:function(e,t){return o(this,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return[4,S(e,t,"off")];case 1:return[2,n.sent()]}}))}))}}},function(e,t,n,r,i,o){t&&u(t)&&(i.refreshToken=t,e.refreshToken={eventName:fe}),o&&u(o)&&(i.getClipboardData=o,e.getClipboardData={eventName:he}),n&&u(n)&&(i.onToast=n,e.onToast={eventName:pe}),r&&u(r)&&(i.onHyperLinkOpen=r,e.onHyperLinkOpen={eventName:ve})}(r,p,v,h,I,T),Ee(oe,y,r,c,I,g,w);var A=Te("ready");return oe}catch(e){console.error(e)}}console.log("WebOfficeSDK JS-SDK V1.1.20");var me=Object.freeze({__proto__:null,listener:Ee,config:ge});window.WPS=me;var be=ge;t.default={config:ge}},606:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(328),i=function(){function e(){this.events={},this.eventsArr=Object.values(r.AddApiListenerType),this.events={},this.handler=this.handler.bind(this),window.addEventListener("message",this.handler)}return e.prototype.handler=function(e){this.eventsArr.includes(e.data.eventName)&&this.trigger({eventName:e.data.eventName,params:e.data.data})},e.prototype.add=function(e,t){this.events[e]||(this.events[e]=[]),console.log("添加【".concat(e,"】事件成功")),this.events[e].push(t)},e.prototype.remove=function(e,t){this.events[e]&&(this.events[e]=this.events[e].filter((function(e){return e!==t})),console.log("移除【".concat(e,"】事件成功")))},e.prototype.trigger=function(e){var t=e.eventName,n=e.params;this.events[t]&&this.events[t].forEach((function(e){console.log("触发【".concat(t,"】事件,参数为:"),n),e(n)}))},e}();t.default=i},620:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1e3*e},e.prototype.renderOpendoc=function(){var e,t=document.createElement("iframe");t.allow="clipboard-read;clipboard-write",t.allowFullscreen=!0,t.src=this.config.url,t.allowFullscreen=!0,t.frameBorder="none",t.style.width="100%",t.style.height="100%",t.id="third-iframe",null===(e=this.config.mount)||void 0===e||e.appendChild(t),s=t,this.events=new v.default,this.instance={setToken:this.setToken.bind(this),print:this.openDocPrint.bind(this),download:this.openDocDownload.bind(this),ApiEvent:{AddApiEventListener:this.addApiEventListener.bind(this),RemoveApiEventListener:this.removeApiEventListener.bind(this)},ready:this.ready.bind(this),tabs:{getTabs:this.getTabs.bind(this),switchTab:this.switchTab.bind(this)},save:this.save.bind(this),destroy:this.destroy.bind(this),iframe:t}},e.prototype.setToken=function(e){console.log("this.config",this.config),this.config.setToken=e,(0,f.setToken)(this.config,s)},e.prototype.openDocPrint=function(){if(s.src.split("/").includes("micsweb"))(0,p.openDocFunc)(p.EVENT_TYPE.PRINT,s);else{this.invoke(p.EVENT_TYPE.PRINT);var e=function(t){var n,r,i;t.data.eventName===p.EVENT_TYPE.PRINT&&(console.log(null===(i=null===(r=null===(n=t.data)||void 0===n?void 0:n.data)||void 0===r?void 0:r.result)||void 0===i?void 0:i.message),window.removeEventListener("message",e))};window.addEventListener("message",e)}},e.prototype.openDocDownload=function(e){e&&e.type?(console.log("openDocDownload: ".concat(p.EVENT_TYPE.DOWNLOAD,"-type:").concat(e.type)),this.invoke(p.EVENT_TYPE.DOWNLOAD,e.type)):(0,p.openDocFunc)(p.EVENT_TYPE.DOWNLOAD,s)},e.prototype.ready=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,new Promise((function(e,t){s.onload=function(){e(!0)}}))]}))}))},e.prototype.save=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.invoke(p.EVENT_TYPE.SAVE),[2,new Promise((function(e,t){var n=function(t){t.data.eventName===p.EVENT_TYPE.SAVE&&(e(t.data.data),window.removeEventListener("message",n))};window.addEventListener("message",n)}))]}))}))},e.prototype.getTabs=function(){return console.log("触发getTabs方法"),this.invoke(p.EVENT_TYPE.GET_TABS),new Promise((function(e,t){var n=function(t){t.data.eventName===p.EVENT_TYPE.GET_TABS&&(e(t.data.data),window.removeEventListener("message",n))};window.addEventListener("message",n)}))},e.prototype.switchTab=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){return t=e.tabKey,[2,new Promise((function(e,n){(0,p.openDocFunc)("action-".concat(p.EVENT_TYPE.SWITCH_TAB),s,{tabKey:t}),e("已切换到".concat(t))}))]}))}))},e.prototype.addApiEventListener=function(e,t){this.events.add(e,t)},e.prototype.removeApiEventListener=function(e,t){this.events.remove(e,t)},e.prototype.destroy=function(){var e=document.getElementById("third-iframe");e.parentNode.removeChild(e),this.instance=null},e.prototype.invoke=function(e,t){(0,p.openDocFunc)("action-".concat(e),s,t)},e.prototype.printExecute=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.instance.print()];case 1:return e=n.sent(),(t=document.createElement("iframe")).setAttribute("style","display:none"),fetch(e).then((function(e){return e.blob()})).then((function(e){var n=URL.createObjectURL(e);t.src=n,document.body.appendChild(t),t.onload=function(){t.contentWindow.print()}})),[2]}}))}))},e}();t.CTX=h},328:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.openDocFunc=t.AddApiListenerType=t.EVENT_TYPE=void 0,function(e){e.PRINT="print",e.DOWNLOAD="download",e.GET_TABS="getTabs",e.SWITCH_TAB="switchTab",e.SAVE="save"}(t.EVENT_TYPE||(t.EVENT_TYPE={})),function(e){e.FILE_OPEN="fileOpen",e.FILE_STATUS="fileStatus",e.ON_USER_LIST_INIT="OnUserListInit",e.ON_USER_JOIN="OnUserJoin",e.ON_USER_QUIT="OnUserQuit"}(t.AddApiListenerType||(t.AddApiListenerType={}));var n=null;t.openDocFunc=function(e,t,r){n=t,function(e){console.log("发送事件:",e);var t=n.contentWindow;t&&t.postMessage(e,"*")}({eventName:e,data:r})}},853:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPromiseLike=t.setToken=t.setCookie=t.getWappId=void 0;var n,r=null,i=null,o=!0,a=null;function s(e){var t,n;t={eventName:o?"setToken":"setTokenRefresh",data:e},(n=a.contentWindow)&&n.postMessage(t,"*"),o=!1,r=e,i=(new Date).getTime()}function c(e){return e instanceof Promise||"function"==typeof(null==e?void 0:e.then)}t.getWappId=function(e){if(!e.includes("/weboffice/office/d"))return null;var t=e.match(/_w_appid=([^&]+)/);return t?t[1]:null},t.setCookie=function(e){var t=e.name,n=e.value,r=e.expires,i=new Date;i.setTime(i.getTime()+r||6e5),document.cookie="".concat(t,"=").concat(n,";expires=").concat(i.toUTCString(),";path=/")},t.setToken=function(e,t){if(!e.setToken||!e.setToken.token)return console.error("请按照文档规范设置token格式");n=e,window.addEventListener("message",(function(u){"wpsPreviewDidMount"===u.data&&(r=null,i=null,o=!0,a=t,s(e.setToken),"function"==typeof e.refreshToken&&function(e){window.document.addEventListener("visibilitychange",(function(){if("hidden"!==document.visibilityState){var e=(new Date).getTime();if(r&&e-i>r.timeout){var t=n.refreshToken();c(t)?t.then((function(e){s(e)})):s(t)}}}));var t=function(e){s(e),e.timeout&&o(e.timeout)},o=function(e){var r,i=e-3e5;setTimeout((function(){var o=(new Date).getTime(),a=n.refreshToken();if(c(a))a.then((function(n){r=n;var a=(new Date).getTime();setTimeout((function(){t(r)}),i>0?3e5-(a-o):e-(a-o))}));else{r=a;var s=(new Date).getTime();setTimeout((function(){t(r)}),i>0?3e5-(s-o):e-(s-o))}}),i)};o(e)}(e.setToken.timeout))}))},t.isPromiseLike=c},737:function(e,t){function n(e){return new RegExp(/\/weboffice\/office\//).test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.decryptTag=t.encryptTag=t.querystring=t.isLitePreviewUrl=t.isWebofficeUrl=t.isOpenDocUrl=t.parseWebpath=t.parseUrl=t.isJSON=void 0,t.isJSON=function(e){if("string"!=typeof e)return!1;try{var t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(t){return console.log("error:"+e+"!!!"+t),!1}},t.parseUrl=function(e){var t=document.createElement("a");t.href=e;var n=t.hostname,r="80"===t.port||"443"===t.port?"":t.port,i=n+(r?":".concat(r):"");return{href:e,protocol:t.protocol||"",host:i,hostname:n,port:r,search:t.search.replace(t.hash,"")||"",hash:t.hash||"",pathname:0===(t.pathname||"").indexOf("/")?t.pathname||"":"/"+(t.pathname||""),relative:(e.match(/tps?:\/\/[^\/]+(.+)/)||[,""])[1]||"",segments:t.pathname.replace(/^\//,"").split("/")||[],origin:t.protocol+"//"+i||""}},t.parseWebpath=function(e){var t=e||window.location.pathname||"";return t.substring(0,t.lastIndexOf("/docs/viewweb/"))||""},t.isOpenDocUrl=function(e){return new RegExp(/\/micsweb\/viewweb\/reader\//).test(e)},t.isWebofficeUrl=n,t.isLitePreviewUrl=function(e){return n(e)&&e.includes("wpsCachePreview")},t.querystring=function(e){var t=(e||window.location.search).replace(/^(\S*)\?/,"").split("&"),n={};return t.forEach((function(e){var t=e.split("=");n[t[0]]=t[1]})),n};t.encryptTag=function(e,t){if(!e)return"";try{var n=encodeURIComponent(e),r=encodeURIComponent(t),i=btoa(n);return btoa(r)+"_"+i}catch(e){return""}};t.decryptTag=function(e,t){if(!e)return"";var n=e.split("_");if(n.length<2)return"";try{var r=decodeURIComponent(atob(n[1]));return decodeURIComponent(atob(n[0]))!==t?"":r}catch(e){return""}}},882:function(e,t,n){var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PLACEHOLDER_TEXT=void 0;var i=n(153);t.DEFAULT_PLACEHOLDER_TEXT=((r={})[i.BASE_WIDGET_TYPE.SINGLE_LINE_TEXT]="请输入文本",r[i.BASE_WIDGET_TYPE.MULTILINE_TEXT]="请输入文本",r[i.BASE_WIDGET_TYPE.HTML]="请输入HTML",r[i.BASE_WIDGET_TYPE.IMAGE]="",r)},210:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},c=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i0)throw new Error("控件".concat(null==t?void 0:t.id,"不支持修改下列属性:").concat(null===(a=e.get(null==t?void 0:t.id))||void 0===a?void 0:a.join(),",设置失败"));n()}catch(e){n()}},t?[3,2]:[4,this.getWidgetList()]):[2];case 1:if(c=o.sent(),u=null==c?void 0:c.filter((function(e){return(null==e?void 0:e.tag)===n})),!((null==u?void 0:u.length)>0))throw new Error('未检索到和tag = "'.concat(n,'"匹配的控件'));l=function(e){i(e,(function(){var t=r(r({},e),s);m.setWidgetInfo(null==e?void 0:e.id,t)}))};try{for(f=a(u),p=f.next();!p.done;p=f.next())v=p.value,l(v)}catch(e){T={error:e}}finally{try{p&&!p.done&&(g=f.return)&&g.call(f)}finally{if(T)throw T.error}}return[3,5];case 2:return[4,this.getWpsWidgetItem(t)];case 3:return v=o.sent(),[4,this.getWidgetInfo(v)];case 4:if(h=o.sent(),E=r(r({},h),s),n&&(null==h?void 0:h.tag)!==n)throw new Error("未检索到id:".concat(t,'和tag:"').concat(n,'"匹配的控件'));i(E,(function(){m.setWidgetInfo(t,E)})),o.label=5;case 5:return[2]}}))}))},e.prototype.setLocate=function(e){return i(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getWpsWidgetItem(e)];case 1:return[4,t.sent().Locate()];case 2:return t.sent(),[2]}}))}))},e.prototype.hasBasePropertyExist=function(e){var t=[];return["tag","widgetId","widgetName"].forEach((function(n){t.push(!!e[n])})),t.some((function(e){return e}))},e.prototype.deleteWidgetItem=function(e){return i(this,void 0,void 0,(function(){var t,n;return o(this,(function(r){switch(r.label){case 0:return[4,this.getWpsWidgetItem(e)];case 1:return t=r.sent(),[4,this.getWidgetInfo(t)];case 2:return n=r.sent(),[4,t.Delete()];case 3:return r.sent(),[2,n]}}))}))},e.prototype.getWidgetItem=function(e,t){return i(this,void 0,void 0,(function(){var n,r;return o(this,(function(i){switch(i.label){case 0:return t?[4,this.getWpsWidgetItemByIndex(e)]:[3,2];case 1:return r=i.sent(),[3,4];case 2:return[4,this.getWpsWidgetItem(e)];case 3:r=i.sent(),i.label=4;case 4:return n=r,[4,this.getWidgetInfo(n)];case 5:return[2,i.sent()]}}))}))},e.prototype.getWpsWidgetItem=function(e){var t;return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.wpsInstance.ready()];case 1:return n.sent(),[4,null===(t=this.wpsInstance.Application)||void 0===t?void 0:t.ActiveDocument.ContentControls({ID:e})];case 2:return[2,n.sent()]}}))}))},e.prototype.getWpsWidgetItemByIndex=function(e){var t;return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.wpsInstance.ready()];case 1:return n.sent(),[2,null===(t=this.wpsInstance)||void 0===t?void 0:t.Application.ActiveDocument.ContentControls.Item(e)]}}))}))},e.prototype.typeIsWidgetType=function(e){var t=[];for(var n in d.WIDGET_TYPE_ENUM)isNaN(Number(n))||t.push(Number(n));return t.includes(e)},e.prototype.initWidgetInfo=function(e){var t,n=e.baseWidgetType,r=e.widgetItem,a=e.range;return i(this,void 0,void 0,(function(){var e,f,p,v,h=this;return o(this,(function(E){switch(E.label){case 0:if(!n)throw new Error("请输入要插入的基础控件类型!");if(isNaN(d.BASE_WIDGET_CONTROL_MAP[n]))throw new Error("基础控件类型不存在!");if(a&&(null==a?void 0:a.end)<=(null==a?void 0:a.start))throw new Error("控件插入的结束位置需要大于起始位置: ".concat(null==a?void 0:a.start,"-").concat(null==a?void 0:a.end));if(n===d.BASE_WIDGET_TYPE.HTML&&!/<(\w+)[^>]*>(.*?<\/\1>)?/i.test(null==r?void 0:r.html))throw new Error("输入HTML内容不合法");f=null!==(t=d.BASE_WIDGET_CONTROL_MAP[n])&&void 0!==t?t:0,E.label=1;case 1:return E.trys.push([1,3,,4]),[4,this.wpsInstance.Application.ActiveDocument.ContentControls.Add(f,{Start:null==a?void 0:a.start,End:null==a?void 0:a.end})];case 2:return e=E.sent(),[3,4];case 3:return[2,E.sent()];case 4:switch(p=function(t){return i(h,void 0,void 0,(function(){var a,s,c=this;return o(this,(function(f){return(s={})[d.WIDGET_SETTING_ENUM.NAME]=function(){return i(c,void 0,void 0,(function(){return o(this,(function(t){return[2,e.Title=(null==r?void 0:r.widgetName)||""]}))}))},s[d.WIDGET_SETTING_ENUM.TAG]=function(){return i(c,void 0,void 0,(function(){var t,i,a,s,c,l,f;return o(this,(function(o){try{t=new URL(null===(f=this.wpsInstance)||void 0===f?void 0:f.url),i=null==t?void 0:t.searchParams,a=null==i?void 0:i.get("_w_appid"),s={tag:(null==r?void 0:r.tag)||"",appId:a,widgetId:d.BASE_WIDGET_IDS[n],dataImportWay:{dataImportType:"hand_write"},baseWidgetType:n||"",widgetType:"base_widget",originType:"base_widget"},c="".concat(JSON.stringify(s)),l=(0,u.encryptTag)(c,a),e.Tag=l}catch(e){throw new Error(e)}return[2]}))}))},s[d.WIDGET_SETTING_ENUM.PLACEHOLDER]=function(){return i(c,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,e.SetPlaceholderText({Text:(null==r?void 0:r.placeholderText)||l.DEFAULT_PLACEHOLDER_TEXT[n]})];case 1:return t.sent(),[2]}}))}))},s[d.WIDGET_SETTING_ENUM.CONTENT]=function(){return i(c,void 0,void 0,(function(){return o(this,(function(t){if(!(null==r?void 0:r.content))return[2];switch(n){case d.BASE_WIDGET_TYPE.SINGLE_LINE_TEXT:case d.BASE_WIDGET_TYPE.MULTILINE_TEXT:e.Content=null==r?void 0:r.content}return[2]}))}))},s[d.WIDGET_SETTING_ENUM.ALLOW_MULTILINE]=function(){return i(c,void 0,void 0,(function(){var t;return o(this,(function(r){return t=n===d.BASE_WIDGET_TYPE.MULTILINE_TEXT,e.MultiLine=t,[2]}))}))},s[d.WIDGET_SETTING_ENUM.IMAGE_SOURCE]=function(){return i(c,void 0,void 0,(function(){var t,i,a,s,c,u,l,f,p,v,h;return o(this,(function(o){switch(o.label){case 0:if(n!==d.BASE_WIDGET_TYPE.IMAGE||!(null==r?void 0:r.imageSource))return[3,2];if(!(null===(i=null==r?void 0:r.imageSource)||void 0===i?void 0:i.imageUrl)&&!(null===(a=null==r?void 0:r.imageSource)||void 0===a?void 0:a.imageData))throw new Error("图片控件数据源缺失!");return[4,e.Shape.Reset()];case 1:if(o.sent(),t=/^(https?:\/\/).*\.(png|jpg|jpeg|gif|webp|svg)$/i,/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i.test(null===(s=null==r?void 0:r.imageSource)||void 0===s?void 0:s.imageData))e.Shape.Data=null===(c=null==r?void 0:r.imageSource)||void 0===c?void 0:c.imageData;else{if(!t.test(null===(u=null==r?void 0:r.imageSource)||void 0===u?void 0:u.imageUrl))throw new Error("图片数据源格式非法!");e.Shape.Url=null===(l=null==r?void 0:r.imageSource)||void 0===l?void 0:l.imageUrl}(null===(f=null==r?void 0:r.imageSource)||void 0===f?void 0:f.width)&&(e.Shape.Width=null===(p=null==r?void 0:r.imageSource)||void 0===p?void 0:p.width),(null===(v=null==r?void 0:r.imageSource)||void 0===v?void 0:v.height)&&(e.Shape.Height=null===(h=null==r?void 0:r.imageSource)||void 0===h?void 0:h.height),o.label=2;case 2:return[2]}}))}))},s[d.WIDGET_SETTING_ENUM.EXTENSION_DATA]=function(){return i(c,void 0,void 0,(function(){var t;return o(this,(function(i){switch(i.label){case 0:return!0,!0==(n===d.BASE_WIDGET_TYPE.HTML)?[3,1]:[3,4];case 1:return t=null==r?void 0:r.html,t?[4,e.AddOrEditExtensionData([{key:d.EXTENSION_DATA.WIDGET_HTML_FIGMENT,value:t}])]:[3,3];case 2:i.sent(),i.label=3;case 3:case 4:return[3,5];case 5:return[2]}}))}))},s[d.WIDGET_SETTING_ENUM.HTML_PASTE]=function(){return i(c,void 0,void 0,(function(){var t,n,i,a;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,7,,8]),[4,this.wpsInstance.ready()];case 1:return o.sent(),[4,e.LockContents];case 2:return o.sent()&&(e.LockContents=!1),[4,e.Range];case 3:return[4,(t=o.sent()).Start];case 4:return n=o.sent(),[4,t.End];case 5:return i=o.sent(),[4,this.wpsInstance.Application.ActiveDocument.Range(n,i).PasteHtml({HTML:null==r?void 0:r.html}).then((function(){e.LockContents=!0}))];case 6:return o.sent(),[3,8];case 7:throw a=o.sent(),new Error(a);case 8:return[2]}}))}))},s[d.WIDGET_SETTING_ENUM.LOCK_EDIT]=function(){return i(c,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.wpsInstance.ready()];case 1:if(t.sent(),n===d.BASE_WIDGET_TYPE.HTML)e.SetPlaceholderText({Text:(null==r?void 0:r.placeholderText)||l.DEFAULT_PLACEHOLDER_TEXT[n]}),e.LockContents=!0;return[2]}}))}))},a=s,t.forEach((function(e){var t;null===(t=a[e])||void 0===t||t.call(a)})),[2]}))}))},v=[d.WIDGET_SETTING_ENUM.NAME,d.WIDGET_SETTING_ENUM.TAG],n){case d.BASE_WIDGET_TYPE.SINGLE_LINE_TEXT:p(c(c([],s(v),!1),[d.WIDGET_SETTING_ENUM.ALLOW_MULTILINE,d.WIDGET_SETTING_ENUM.CONTENT,d.WIDGET_SETTING_ENUM.PLACEHOLDER],!1));case d.BASE_WIDGET_TYPE.MULTILINE_TEXT:p(c(c([],s(v),!1),[d.WIDGET_SETTING_ENUM.CONTENT,d.WIDGET_SETTING_ENUM.ALLOW_MULTILINE,d.WIDGET_SETTING_ENUM.PLACEHOLDER],!1));break;case d.BASE_WIDGET_TYPE.IMAGE:p(c(c([],s(v),!1),[d.WIDGET_SETTING_ENUM.IMAGE_SOURCE],!1));break;case d.BASE_WIDGET_TYPE.HTML:p(c(c([],s(v),!1),[d.WIDGET_SETTING_ENUM.EXTENSION_DATA,d.WIDGET_SETTING_ENUM.LOCK_EDIT,d.WIDGET_SETTING_ENUM.HTML_PASTE,d.WIDGET_SETTING_ENUM.PLACEHOLDER],!1))}return[2,e]}}))}))},e.prototype.getWidgetInfo=function(e){var t,n,a,s,c,l,p;return i(this,void 0,void 0,(function(){var i,v,h,E,T,g,m,b,w,y,_,I,N,S,L,D,A,O,k,W,G,P;return o(this,(function(o){switch(o.label){case 0:return[4,e.Title];case 1:return i=o.sent()||"",[4,e.Tag];case 2:v=o.sent(),h=new URL(null===(t=this.wpsInstance)||void 0===t?void 0:t.url),E=null==h?void 0:h.searchParams,T=null==E?void 0:E.get("_w_appid"),g=(0,u.decryptTag)(v,T),m="","",b="",w={},y={},_="";try{w=JSON.parse(g),m=(null==w?void 0:w.widgetId)||"",(null==w?void 0:w.widgetName)||""}catch(e){}return[4,e.ID];case 3:return I=o.sent(),[4,e.Type];case 4:return N=o.sent(),[4,e.PlaceholderText];case 5:return S=o.sent(),L=null==w?void 0:w.baseWidgetType,[d.WIDGET_TYPE_ENUM.TEXT,d.WIDGET_TYPE_ENUM.RTF_CONTENT].includes(N)&&[d.BASE_WIDGET_TYPE.SINGLE_LINE_TEXT,d.BASE_WIDGET_TYPE.MULTILINE_TEXT,d.BASE_WIDGET_TYPE.HTML].includes(L)?[4,e.Content]:[3,7];case 6:b=o.sent()||"",o.label=7;case 7:if(N!==d.WIDGET_TYPE_ENUM.IMAGE||L!==d.BASE_WIDGET_TYPE.IMAGE)return[3,16];o.label=8;case 8:return o.trys.push([8,15,,16]),D=y,[4,null===(n=null==e?void 0:e.Shape)||void 0===n?void 0:n.Width];case 9:return D.width=o.sent(),A=y,[4,null===(a=null==e?void 0:e.Shape)||void 0===a?void 0:a.Height];case 10:return A.height=o.sent(),(null===(s=null==e?void 0:e.Shape)||void 0===s?void 0:s.Url)?(O=y,[4,null===(c=null==e?void 0:e.Shape)||void 0===c?void 0:c.Url]):[3,12];case 11:O.imageUrl=o.sent(),o.label=12;case 12:return(null===(l=null==e?void 0:e.Shape)||void 0===l?void 0:l.Data)?(k=y,[4,null===(p=null==e?void 0:e.Shape)||void 0===p?void 0:p.Data]):[3,14];case 13:k.imageData=o.sent(),o.label=14;case 14:return[3,16];case 15:return W=o.sent(),console.error("Error","该控件没有对应的属性",W),[3,16];case 16:return N!==d.WIDGET_TYPE_ENUM.RTF_CONTENT||L!==d.BASE_WIDGET_TYPE.HTML?[3,18]:[4,(0,f.getExtensionData)(this.wpsInstance,I,d.EXTENSION_DATA.WIDGET_HTML_FIGMENT)];case 17:(G=o.sent())&&(_=G.value),o.label=18;case 18:switch(P={widgetId:m,widgetName:i||"",tag:(null==w?void 0:w.tag)||"",id:I,widgetType:null==w?void 0:w.widgetType,baseWidgetType:null==w?void 0:w.baseWidgetType},L){case d.BASE_WIDGET_TYPE.SINGLE_LINE_TEXT:case d.BASE_WIDGET_TYPE.MULTILINE_TEXT:return[2,r(r({},P),{content:b,placeholderText:S})];case d.BASE_WIDGET_TYPE.IMAGE:return[2,r(r({},P),{imageSource:y})];case d.BASE_WIDGET_TYPE.HTML:return[2,r(r({},P),{content:b,placeholderText:S,html:_})]}return[2]}}))}))},e.prototype.setWidgetInfo=function(e,t){return i(this,void 0,void 0,(function(){var n,a,s,c,l,f=this;return o(this,(function(p){switch(p.label){case 0:return[4,this.getWpsWidgetItem(e)];case 1:return[4,(n=p.sent()).LockContents];case 2:return p.sent()&&(n.LockContents=!1),[4,null==n?void 0:n.Tag];case 3:return a=p.sent(),[4,this.getWidgetInfo(n)];case 4:return s=p.sent(),c=null==s?void 0:s.baseWidgetType,[4,null==n?void 0:n.Type];case 5:switch(p.sent(),l=function(e){return i(f,void 0,void 0,(function(){var l,f,p=this;return o(this,(function(v){return(f={})[d.WIDGET_SETTING_ENUM.NAME]=function(){return i(p,void 0,void 0,(function(){return o(this,(function(e){return t.widgetName&&(n.Title=t.widgetName),[2]}))}))},f[d.WIDGET_SETTING_ENUM.TAG]=function(){return i(p,void 0,void 0,(function(){var e,i,s,c,l,d,f;return o(this,(function(o){try{e=new URL(null===(f=this.wpsInstance)||void 0===f?void 0:f.url),i=null==e?void 0:e.searchParams,s=null==i?void 0:i.get("_w_appid"),c=JSON.parse((0,u.decryptTag)(a,s)),l=JSON.stringify(r(r({},c),{tag:null==t?void 0:t.tag})),d=(0,u.encryptTag)(l,s),n.Tag=d}catch(e){console.error("Error",e)}return[2]}))}))},f[d.WIDGET_SETTING_ENUM.PLACEHOLDER]=function(){return i(p,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return(null==t?void 0:t.placeholderText)?(!0,!0==(c===d.BASE_WIDGET_TYPE.HTML)?[3,1]:[3,3]):[3,5];case 1:case 3:return[4,n.SetPlaceholderText({Text:t.placeholderText})];case 2:case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},f[d.WIDGET_SETTING_ENUM.CONTENT]=function(){return i(p,void 0,void 0,(function(){return o(this,(function(e){return(null==t?void 0:t.content)&&c!==d.BASE_WIDGET_TYPE.HTML&&(n.Content=t.content),[2]}))}))},f[d.WIDGET_SETTING_ENUM.ALLOW_MULTILINE]=function(){return i(p,void 0,void 0,(function(){var e;return o(this,(function(r){return e=(null==t?void 0:t.baseWidgetType)===d.BASE_WIDGET_TYPE.MULTILINE_TEXT,(null==s?void 0:s.baseWidgetType)!==d.BASE_WIDGET_TYPE.IMAGE&&(n.MultiLine=e),[2]}))}))},f[d.WIDGET_SETTING_ENUM.IMAGE_SOURCE]=function(){return i(p,void 0,void 0,(function(){var e,r,i,a,s,c,u,l,d,f,p;return o(this,(function(o){switch(o.label){case 0:if(!(null===(r=null==t?void 0:t.imageSource)||void 0===r?void 0:r.imageUrl)&&!(null===(i=null==t?void 0:t.imageSource)||void 0===i?void 0:i.imageData))throw new Error("图片控件数据源缺失!");return[4,n.Shape.Reset()];case 1:if(o.sent(),e=/^(https?:\/\/).*\.(png|jpg|jpeg|gif|webp|svg)$/i,/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i.test(null===(a=null==t?void 0:t.imageSource)||void 0===a?void 0:a.imageData))n.Shape.Data=null===(s=null==t?void 0:t.imageSource)||void 0===s?void 0:s.imageData;else{if(!e.test(null===(c=null==t?void 0:t.imageSource)||void 0===c?void 0:c.imageUrl))throw new Error("图片数据源格式非法!");n.Shape.Url=null===(u=null==t?void 0:t.imageSource)||void 0===u?void 0:u.imageUrl}return(null===(l=null==t?void 0:t.imageSource)||void 0===l?void 0:l.width)&&(n.Shape.Width=null===(d=null==t?void 0:t.imageSource)||void 0===d?void 0:d.width),(null===(f=null==t?void 0:t.imageSource)||void 0===f?void 0:f.height)&&(n.Shape.Height=null===(p=null==t?void 0:t.imageSource)||void 0===p?void 0:p.height),[2]}}))}))},f[d.WIDGET_SETTING_ENUM.EXTENSION_DATA]=function(){return i(p,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return[4,n.LockContents];case 1:return r.sent(),!0,!0==(c===d.BASE_WIDGET_TYPE.HTML)?[3,2]:[3,5];case 2:return e=null==t?void 0:t.html,e?[4,n.AddOrEditExtensionData([{key:d.EXTENSION_DATA.WIDGET_HTML_FIGMENT,value:e}])]:[3,4];case 3:r.sent(),r.label=4;case 4:case 5:return[3,6];case 6:return[2]}}))}))},f[d.WIDGET_SETTING_ENUM.HTML_PASTE]=function(){return i(p,void 0,void 0,(function(){var e,r,i,a;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,7,,8]),(null==t?void 0:t.html)?[4,this.wpsInstance.ready()]:[3,6];case 1:return o.sent(),[4,n.Range];case 2:return[4,(e=o.sent()).Start];case 3:return r=o.sent(),[4,e.End];case 4:return i=o.sent(),[4,this.wpsInstance.Application.ActiveDocument.Range(r,i).PasteHtml({HTML:null==t?void 0:t.html}).then((function(){n.LockContents=!0}))];case 5:o.sent(),o.label=6;case 6:return[3,8];case 7:return a=o.sent(),n.LockContents=!0,console.error(a),[3,8];case 8:return[2]}}))}))},f[d.WIDGET_SETTING_ENUM.LOCK_EDIT]=function(){return i(p,void 0,void 0,(function(){return o(this,(function(e){return[2]}))}))},l=f,e.forEach((function(e){var t;null===(t=l[e])||void 0===t||t.call(l)})),[2]}))}))},c){case d.BASE_WIDGET_TYPE.SINGLE_LINE_TEXT:case d.BASE_WIDGET_TYPE.MULTILINE_TEXT:l([d.WIDGET_SETTING_ENUM.NAME,d.WIDGET_SETTING_ENUM.TAG,d.WIDGET_SETTING_ENUM.PLACEHOLDER,d.WIDGET_SETTING_ENUM.CONTENT,d.WIDGET_SETTING_ENUM.ALLOW_MULTILINE]);break;case d.BASE_WIDGET_TYPE.IMAGE:l([d.WIDGET_SETTING_ENUM.NAME,d.WIDGET_SETTING_ENUM.TAG,d.WIDGET_SETTING_ENUM.IMAGE_SOURCE]);break;case d.BASE_WIDGET_TYPE.HTML:l([d.WIDGET_SETTING_ENUM.NAME,d.WIDGET_SETTING_ENUM.TAG,d.WIDGET_SETTING_ENUM.PLACEHOLDER,d.WIDGET_SETTING_ENUM.EXTENSION_DATA,d.WIDGET_SETTING_ENUM.HTML_PASTE])}return[2]}}))}))},e}();t.Widget=p},153:function(e,t){var n,r,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_DATA=t.BASE_WIDGET_IDS=t.BASE_WIDGET_CONTROL_MAP=t.WIDGET_SETTING_ENUM=t.CONTROL_ELEMENT_ENUM=t.BASE_WIDGET_TYPE=t.WIDGET_TYPE=t.WIDGET_TYPE_ENUM=void 0,function(e){e[e.RTF_CONTENT=0]="RTF_CONTENT",e[e.TEXT=1]="TEXT",e[e.IMAGE=2]="IMAGE",e[e.COMBINATION=3]="COMBINATION",e[e.DROP_DOWN=4]="DROP_DOWN",e[e.DATE=6]="DATE",e[e.CHECKBOX=8]="CHECKBOX",e[e.REPEAT=9]="REPEAT"}(i=t.WIDGET_TYPE_ENUM||(t.WIDGET_TYPE_ENUM={})),function(e){e.BASE_WIDGET="base_widget",e.BUSINESS_WIDGET="business_widget"}(t.WIDGET_TYPE||(t.WIDGET_TYPE={})),function(e){e.SINGLE_LINE_TEXT="single_line_text",e.MULTILINE_TEXT="multiline_text",e.IMAGE="image",e.HTML="html"}(o=t.BASE_WIDGET_TYPE||(t.BASE_WIDGET_TYPE={})),function(e){e.BASE_WIDGET="base_widget",e.BUSINESS_WIDGET="business_widget",e.BUSINESS_COMPONENTS="business_components",e.GROUP="group",e.REPEAT_GROUP="repeat_group"}(t.CONTROL_ELEMENT_ENUM||(t.CONTROL_ELEMENT_ENUM={})),function(e){e.NAME="标题",e.TAG="标识符",e.PLACEHOLDER="占位符",e.CONTENT="内容",e.EXTENSION_DATA="拓展属性",e.ALLOW_MULTILINE="设置是否允许换行",e.HTML_PASTE="HTML内容",e.LOCK_EDIT="限制编辑",e.IMAGE_SOURCE="图片数据源"}(t.WIDGET_SETTING_ENUM||(t.WIDGET_SETTING_ENUM={})),t.BASE_WIDGET_CONTROL_MAP=((n={})[o.SINGLE_LINE_TEXT]=i.TEXT,n[o.MULTILINE_TEXT]=i.TEXT,n[o.IMAGE]=i.IMAGE,n[o.HTML]=i.RTF_CONTENT,n),t.BASE_WIDGET_IDS=((r={})[o.SINGLE_LINE_TEXT]="baseSingleLineTextWidgetId",r[o.MULTILINE_TEXT]="baseMultiLineTextWidgetId",r[o.IMAGE]="baseImageWidgetId",r[o.HTML]="baseHTMLWidgetId",r),function(e){e.WIDGET_HTML_FIGMENT="widget_html_figment"}(t.EXTENSION_DATA||(t.EXTENSION_DATA={}))},532:function(e,t){var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i import('./Tinymce/src/Editor.vue'), {
// loading: true,
// })
// );
- // update-end--author:liaozhiyang---date:20240308---for:【QQYUN-8241】Tinymce异步加载
app.use(Select)
.use(Alert)
.use(Button)
diff --git a/jeecgboot-vue3/src/design/index.less b/jeecgboot-vue3/src/design/index.less
index ac165b3d8..e69c6be2e 100644
--- a/jeecgboot-vue3/src/design/index.less
+++ b/jeecgboot-vue3/src/design/index.less
@@ -176,6 +176,10 @@ html[data-theme='light'] {
border-color: #eee !important;
background-color: transparent !important;
}
+ //【QQYUN-13754】switch在禁用的方式下效果有问题:字体为黑色
+ .ant-switch-disabled .ant-switch-inner-checked,.ant-switch-inner-unchecked{
+ color: #fff !important;
+ }
}
}
html[data-theme='dark'] {
diff --git a/jeecgboot-vue3/src/electron/index.ts b/jeecgboot-vue3/src/electron/index.ts
index 0d944dd89..856e9ef1f 100644
--- a/jeecgboot-vue3/src/electron/index.ts
+++ b/jeecgboot-vue3/src/electron/index.ts
@@ -38,9 +38,8 @@ export function setupElectron(_: App) {
return;
}
hookWindowOpen();
- // update-begin--author:liaozhiyang---date:20250725---for:【JHHB-13】桌面应用消息通知
+ // 代码逻辑说明: 【JHHB-13】桌面应用消息通知
hookNavigate();
- // update-end--author:liaozhiyang---date:20250725---for:【JHHB-13】桌面应用消息通知
}
function hookNavigate() {
// @ts-ignore
diff --git a/jeecgboot-vue3/src/enums/cacheEnum.ts b/jeecgboot-vue3/src/enums/cacheEnum.ts
index 0c88c0d4b..929d31283 100644
--- a/jeecgboot-vue3/src/enums/cacheEnum.ts
+++ b/jeecgboot-vue3/src/enums/cacheEnum.ts
@@ -54,6 +54,9 @@ export const DEPART_ROLE_AUTH_CONFIG_KEY = 'DEPART__ROLE__AUTH__CONFIG__KEY__';
// 部门管理权限
export const DEPART_MANGE_AUTH_CONFIG_KEY = 'DEPART__MANGE__AUTH__CONFIG__KEY__';
+//产品包管理权限
+export const PACK_AUTH_CONFIG_KEY = 'PACK__AUTH__CONFIG__KEY__';
+
export enum CacheTypeEnum {
SESSION,
LOCAL,
diff --git a/jeecgboot-vue3/src/hooks/setting/index.ts b/jeecgboot-vue3/src/hooks/setting/index.ts
index ea3b5a5df..e849e1c5c 100644
--- a/jeecgboot-vue3/src/hooks/setting/index.ts
+++ b/jeecgboot-vue3/src/hooks/setting/index.ts
@@ -41,6 +41,8 @@ export const useGlobSetting = (): Readonly => {
urlPrefix: VITE_GLOB_API_URL_PREFIX,
uploadUrl: VITE_GLOB_DOMAIN_URL,
viewUrl: VITE_GLOB_ONLINE_VIEW_URL,
+ // true: 新任务办理页面弹窗, false:旧的任务办理页面弹窗
+ useNewTaskModal: true,
// 当前是否运行在 electron 平台
isElectronPlatform: VITE_GLOB_RUN_PLATFORM === 'electron',
@@ -55,7 +57,7 @@ export const useGlobSetting = (): Readonly => {
window['_CONFIG'] = {}
}
- // update-begin--author:sunjianlei---date:220250115---for:【QQYUN-10956】配置了自定义前缀,外部连接打不开,需要兼容处理
+ // 代码逻辑说明: 【QQYUN-10956】配置了自定义前缀,外部连接打不开,需要兼容处理
let domainURL = VITE_GLOB_DOMAIN_URL;
// 如果不是以http(s)开头的,也不是以域名开头的,那么就是拼接当前域名
@@ -65,7 +67,6 @@ export const useGlobSetting = (): Readonly => {
}
domainURL = window.location.origin + domainURL;
}
- // update-end--author:sunjianlei---date:220250115---for:【QQYUN-10956】配置了自定义前缀,外部连接打不开,需要兼容处理
// @ts-ignore
window._CONFIG['domianURL'] = domainURL;
diff --git a/jeecgboot-vue3/src/hooks/setting/useMenuSetting.ts b/jeecgboot-vue3/src/hooks/setting/useMenuSetting.ts
index 47e93cfa1..495df5ac7 100644
--- a/jeecgboot-vue3/src/hooks/setting/useMenuSetting.ts
+++ b/jeecgboot-vue3/src/hooks/setting/useMenuSetting.ts
@@ -84,9 +84,8 @@ export function useMenuSetting() {
const getRealWidth = computed(() => {
if (unref(getIsMixSidebar)) {
- // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8774】侧边混合导航菜单宽度调整
+ // 代码逻辑说明: 【QQYUN-8774】侧边混合导航菜单宽度调整
return unref(getCollapsed) && !unref(getMixSideFixed) ? unref(getMiniWidthNumber) : unref(getMenuWidth) - 60;
- // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8774】侧边混合导航菜单宽度调整
}
return unref(getCollapsed) ? unref(getMiniWidthNumber) : unref(getMenuWidth);
});
diff --git a/jeecgboot-vue3/src/hooks/setting/useRootSetting.ts b/jeecgboot-vue3/src/hooks/setting/useRootSetting.ts
index 0c3821dd3..508fae7da 100644
--- a/jeecgboot-vue3/src/hooks/setting/useRootSetting.ts
+++ b/jeecgboot-vue3/src/hooks/setting/useRootSetting.ts
@@ -43,9 +43,8 @@ export function useRootSetting() {
const getColorWeak = computed(() => appStore.getProjectConfig.colorWeak);
const getGrayMode = computed(() => appStore.getProjectConfig.grayMode);
- // update-begin--author:liaozhiyang---date:20250407---for:【QQYUN-10952】AI助手支持通过设置来配置是否显示
+ // 代码逻辑说明: 【QQYUN-10952】AI助手支持通过设置来配置是否显示
const getAiIconShow = computed(() => appStore.getProjectConfig.aiIconShow);
- // update-end--author:liaozhiyang---date:20250407---for:【QQYUN-10952】AI助手支持通过设置来配置是否显示
const getLockTime = computed(() => appStore.getProjectConfig.lockTime);
const getShowDarkModeToggle = computed(() => appStore.getProjectConfig.showDarkModeToggle);
diff --git a/jeecgboot-vue3/src/hooks/system/useJvxeMethods.ts b/jeecgboot-vue3/src/hooks/system/useJvxeMethods.ts
index 9e857e674..25989dcd3 100644
--- a/jeecgboot-vue3/src/hooks/system/useJvxeMethods.ts
+++ b/jeecgboot-vue3/src/hooks/system/useJvxeMethods.ts
@@ -61,16 +61,14 @@ export function useJvxeMethod(requestAddOrEdit, classifyIntoFormData, tableRefs,
.catch((e) => {
if (e.error === VALIDATE_FAILED) {
// 如果有未通过表单验证的子表,就自动跳转到它所在的tab
- //update-begin-author:taoyan date:2022-11-22 for: VUEN-2866【代码生成】Tab风格 一对多子表校验不通过时,点击提交表单空白了,流程附加页面也有此问题
+ // 代码逻辑说明: VUEN-2866【代码生成】Tab风格 一对多子表校验不通过时,点击提交表单空白了,流程附加页面也有此问题
if(e.paneKey){
activeKey.value = e.paneKey
}else{
- //update-begin-author:liusq date:2024-06-12 for: TV360X-478 一对多tab,校验未通过时,tab没有跳转
+ // 代码逻辑说明: TV360X-478 一对多tab,校验未通过时,tab没有跳转
activeKey.value = e.subIndex == null ? (e.index == null ? unref(activeKey) : refKeys.value[e.index]) : Object.keys(tableRefs)[e.subIndex];
- //update-end-author:liusq date:2024-06-12 for: TV360X-478 一对多tab,校验未通过时,tab没有跳转
}
- //update-end-author:taoyan date:2022-11-22 for: VUEN-2866【代码生成】Tab风格 一对多子表校验不通过时,点击提交表单空白了,流程附加页面也有此问题
- //update-begin---author:wangshuai---date:2024-06-17---for:【TV360X-1064】非原生提交表单滚动校验没通过的项---
+ // 代码逻辑说明: 【TV360X-1064】非原生提交表单滚动校验没通过的项---
if (e?.errorFields) {
const firstField = e.errorFields[0];
if (firstField) {
@@ -78,7 +76,6 @@ export function useJvxeMethod(requestAddOrEdit, classifyIntoFormData, tableRefs,
}
}
return Promise.reject(e?.errorFields);
- //update-end---author:wangshuai---date:2024-06-17---for:【TV360X-1064】非原生提交表单滚动校验没通过的项---
} else {
console.error(e);
}
@@ -104,7 +101,6 @@ export function useJvxeMethod(requestAddOrEdit, classifyIntoFormData, tableRefs,
return [handleChangeTabs, handleSubmit, requestSubTableData, formRef];
}
-//update-begin-author:taoyan date:2022-6-16 for: 代码生成-原生表单用
/**
* 校验多个表单和子表table,用于原生的antd-vue的表单
* @param activeKey 子表表单/vxe-table 所在tabs的 activeKey
@@ -194,4 +190,3 @@ export function useValidateAntFormAndTable(activeKey, refMap) {
transformData,
};
}
-//update-end-author:taoyan date:2022-6-16 for: 代码生成-原生表单用
diff --git a/jeecgboot-vue3/src/hooks/system/useListPage.ts b/jeecgboot-vue3/src/hooks/system/useListPage.ts
index b2d8036fa..80db2c02b 100644
--- a/jeecgboot-vue3/src/hooks/system/useListPage.ts
+++ b/jeecgboot-vue3/src/hooks/system/useListPage.ts
@@ -29,9 +29,8 @@ interface ListPageOptions {
};
// 导入配置
importConfig?: {
- //update-begin-author:taoyan date:20220507 for: erp代码生成 子表 导入地址是动态的
+ // 代码逻辑说明: erp代码生成 子表 导入地址是动态的
url: string | (() => string);
- //update-end-author:taoyan date:20220507 for: erp代码生成 子表 导入地址是动态的
// 导出成功后的回调
success?: (fileInfo?: any) => void;
};
@@ -60,42 +59,37 @@ export function useListPage(options: ListPageOptions) {
const tableContext = useListTable(options.tableProps);
- const [, { getForm, reload, setLoading }, { selectedRowKeys }] = tableContext;
+ const [, { getForm, reload, setLoading, getColumns }, { selectedRowKeys }] = tableContext;
// 导出 excel
async function onExportXls() {
- //update-begin---author:wangshuai ---date:20220411 for:导出新增自定义参数------------
+ // 代码逻辑说明: 导出新增自定义参数------------
let { url, name, params } = options?.exportConfig ?? {};
let realUrl = typeof url === 'function' ? url() : url;
if (realUrl) {
let title = typeof name === 'function' ? name() : name;
- //update-begin-author:taoyan date:20220507 for: erp代码生成 子表 导出报错,原因未知-
+ // 代码逻辑说明: erp代码生成 子表 导出报错,原因未知-
let paramsForm:any = {};
try {
- //update-begin-author:liusq---date:2025-03-20--for: [QQYUN-11627]代码生成原生表单,数据导出,前端报错,并且范围参数没有转换 #7962
//当useSearchFor不等于false的时候,才去触发validate
if (options?.tableProps?.useSearchForm !== false) {
paramsForm = await getForm().validate();
console.log('paramsForm', paramsForm);
}
- //update-end-author:liusq---date:2025-03-20--for:[QQYUN-11627]代码生成原生表单,数据导出,前端报错,并且范围参数没有转换 #7962
} catch (e) {
console.warn(e);
}
- //update-end-author:taoyan date:20220507 for: erp代码生成 子表 导出报错,原因未知-
- //update-begin-author:liusq date:20230410 for:[/issues/409]导出功能没有按排序结果导出,设置导出默认排序,创建时间倒序
+ // 代码逻辑说明: [/issues/409]导出功能没有按排序结果导出,设置导出默认排序,创建时间倒序
if(!paramsForm?.column){
Object.assign(paramsForm,{column:'createTime',order:'desc'});
}
- //update-begin-author:liusq date:20230410 for: [/issues/409]导出功能没有按排序结果导出,设置导出默认排序,创建时间倒序
//如果参数不为空,则整合到一起
- //update-begin-author:taoyan date:20220507 for: erp代码生成 子表 导出动态设置mainId
+ // 代码逻辑说明: erp代码生成 子表 导出动态设置mainId
if (params) {
- //update-begin-author:liusq---date:2025-03-20--for: [QQYUN-11627]代码生成原生表单,数据导出,前端报错,并且范围参数没有转换 #7962
+ // 代码逻辑说明: [QQYUN-11627]代码生成原生表单,数据导出,前端报错,并且范围参数没有转换 #7962
const realParams = isFunction(params) ? await params() : { ...(params || {}) };
- //update-end-author:liusq---date:2025-03-20--for:[QQYUN-11627]代码生成原生表单,数据导出,前端报错,并且范围参数没有转换 #7962
Object.keys(realParams).map((k) => {
let temp = (realParams as object)[k];
if (temp) {
@@ -103,27 +97,62 @@ export function useListPage(options: ListPageOptions) {
}
});
}
- //update-end-author:taoyan date:20220507 for: erp代码生成 子表 导出动态设置mainId
if (selectedRowKeys.value && selectedRowKeys.value.length > 0) {
paramsForm['selections'] = selectedRowKeys.value.join(',');
}
- console.log()
+
+ //是否显示表格设置
+ if(options?.tableProps?.showTableSetting !== false){
+ //是否显示配置字段
+ if(options?.tableProps?.tableSetting?.setting !== false){
+ await exportColumns(paramsForm)
+ }
+ }
+
return handleExportXls(title as string, realUrl, filterObj(paramsForm));
- //update-end---author:wangshuai ---date:20220411 for:导出新增自定义参数--------------
} else {
$message.createMessage.warn('没有传递 exportConfig.url 参数');
return Promise.reject();
}
}
+ /**
+ * 设置导出的列
+ *
+ * @param paramsForm
+ */
+ async function exportColumns(paramsForm: any) {
+ //获取表格的列
+ let columns = getColumns();
+ if(columns && columns.length >0){
+ //需要导出的字段
+ let exportFields:any = [];
+ //是否有隐藏列
+ let hiddenColumns = false;
+ for (const column of columns) {
+ if(!column.defaultHidden){
+ let dataIndex = column?.dataIndex;
+ if(column?.dataIndex!.toString().indexOf('_dictText')){
+ dataIndex = column?.dataIndex!.toString().replace('_dictText','')
+ }
+ exportFields.push(dataIndex);
+ } else {
+ hiddenColumns = true;
+ }
+ }
+ if(hiddenColumns){
+ paramsForm['exportFields'] = exportFields.join(",");
+ }
+ }
+ }
+
// 导入 excel
function onImportXls(file) {
let { url, success } = options?.importConfig ?? {};
- //update-begin-author:taoyan date:20220507 for: erp代码生成 子表 导入地址是动态的
+ // 代码逻辑说明: erp代码生成 子表 导入地址是动态的
let realUrl = typeof url === 'function' ? url() : url;
if (realUrl) {
return handleImportXls(file, realUrl, success || reload);
- //update-end-author:taoyan date:20220507 for: erp代码生成 子表 导入地址是动态的
} else {
$message.createMessage.warn('没有传递 importConfig.url 参数');
return Promise.reject();
@@ -286,11 +315,10 @@ export function useListTable(tableProps: TableProps): [
};
// 合并用户个性化配置
if (tableProps) {
- //update-begin---author:wangshuai---date:2024-04-28---for:【issues/6180】前端代码配置表变查询条件显示列不生效---
+ // 代码逻辑说明: 【issues/6180】前端代码配置表变查询条件显示列不生效---
if(tableProps.formConfig){
setTableProps(tableProps.formConfig);
}
- //update-end---author:wangshuai---date:2024-04-28---for:【issues/6180】前端代码配置表变查询条件显示列不生效---
// merge 方法可深度合并对象
merge(defaultTableProps, tableProps);
}
diff --git a/jeecgboot-vue3/src/hooks/system/useMethods.ts b/jeecgboot-vue3/src/hooks/system/useMethods.ts
index f52c22840..dff3741db 100644
--- a/jeecgboot-vue3/src/hooks/system/useMethods.ts
+++ b/jeecgboot-vue3/src/hooks/system/useMethods.ts
@@ -19,15 +19,24 @@ export function useMethods() {
* 导出xls
* @param name
* @param url
+ * @param params
+ * @param isXlsx
+ * @param timeout 超时时间(毫秒),默认 60000
*/
- async function exportXls(name, url, params, isXlsx = false) {
- //update-begin---author:wangshuai---date:2024-01-25---for:【QQYUN-8118】导出超时时间设置长点---
+ async function exportXls(name, url, params, isXlsx = false, timeout = 60000) {
+ // 代码逻辑说明: 【JHHB-794】用户管理,跨页全选后,点击用户导出没反应---
+ if(params?.selections){
+ let split = params.selections.split(",");
+ if(split && split.length > 100){
+ createMessage.warning('最多可选择 100 项进行导出!');
+ return;
+ }
+ }
// 修改为返回原生 response,便于获取 headers
const response = await defHttp.get(
- { url: url, params: params, responseType: 'blob', timeout: 60000 },
+ { url: url, params: params, responseType: 'blob', timeout: timeout },
{ isTransformResponse: false, isReturnNativeResponse: true }
);
- //update-end---author:wangshuai---date:2024-01-25---for:【QQYUN-8118】导出超时时间设置长点---
if (!response || !response.data) {
createMessage.warning('文件下载失败');
return;
@@ -39,13 +48,13 @@ export function useMethods() {
isXlsxByHeader = true;
}
const data = response.data;
- //update-begin---author:wangshuai---date:2024-04-18---for: 导出excel失败提示,不进行导出---
+ // 代码逻辑说明: 导出excel失败提示,不进行导出---
let reader = new FileReader()
reader.readAsText(data, 'utf-8')
reader.onload = async () => {
if(reader.result){
if(reader.result.toString().indexOf("success") !=-1){
- // update-begin---author:liaozhiyang---date:2025-02-11---for:【issues/7738】文件中带"success"导出报错 ---
+ // 代码逻辑说明: 【issues/7738】文件中带"success"导出报错 ---
try {
const { success, message } = JSON.parse(reader.result.toString());
if (!success) {
@@ -57,11 +66,9 @@ export function useMethods() {
} catch (error) {
exportExcel(name, isXlsxByHeader, data);
}
- // update-end---author:liaozhiyang---date:2025-02-11---for:【issues/7738】文件中带"success"导出报错 ---
}
}
exportExcel(name, isXlsxByHeader, data);
- //update-end---author:wangshuai---date:2024-04-18---for: 导出excel失败提示,不进行导出---
}
}
@@ -88,10 +95,9 @@ export function useMethods() {
具体详情请 点击下载
`,
});
- //update-begin---author:wangshuai ---date:20221121 for:[VUEN-2827]导入无权限,提示图标错误------------
+ // 代码逻辑说明: [VUEN-2827]导入无权限,提示图标错误------------
} else if (fileInfo.code === 500 || fileInfo.code === 510) {
createMessage.error(fileInfo.message || `${data.file.name} 导入失败`);
- //update-end---author:wangshuai ---date:20221121 for:[VUEN-2827]导入无权限,提示图标错误------------
} else {
createMessage.success(fileInfo.message || `${data.file.name} 文件上传成功`);
}
@@ -105,9 +111,9 @@ export function useMethods() {
}
return {
- handleExportXls: (name: string, url: string, params?: object) => exportXls(name, url, params),
+ handleExportXls: (name: string, url: string, params?: object, timeout?: number) => exportXls(name, url, params, false, timeout),
handleImportXls: (data, url, success) => importXls(data, url, success),
- handleExportXlsx: (name: string, url: string, params?: object) => exportXls(name, url, params, true),
+ handleExportXlsx: (name: string, url: string, params?: object, timeout?: number) => exportXls(name, url, params, true, timeout),
};
/**
diff --git a/jeecgboot-vue3/src/hooks/system/useThirdLogin.ts b/jeecgboot-vue3/src/hooks/system/useThirdLogin.ts
index 5c2ba1b7d..0413bc765 100644
--- a/jeecgboot-vue3/src/hooks/system/useThirdLogin.ts
+++ b/jeecgboot-vue3/src/hooks/system/useThirdLogin.ts
@@ -68,15 +68,13 @@ export function useThirdLogin() {
} else {
createMessage.warning('不识别的信息传递');
}
- // update-begin--author:liaozhiyang---date:20240717---for:【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗
+ // 代码逻辑说明: 【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗
if (openWin?.closed) {
window.removeEventListener('message', receiveMessage, false);
}
- // update-end--author:liaozhiyang---date:20240717---for:【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗
};
- // update-begin--author:liaozhiyang---date:20240717---for:【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗
+ // 代码逻辑说明: 【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗
window.removeEventListener('message', receiveMessage, false);
- // update-end--author:liaozhiyang---date:20240717---for:【TV360X-1827】mac系统谷歌浏览器企业微信第三方登录成功后没有弹出绑定手机弹窗
window.addEventListener('message', receiveMessage, false);
}
// 根据token执行登录
diff --git a/jeecgboot-vue3/src/hooks/web/useMessage.ts b/jeecgboot-vue3/src/hooks/web/useMessage.ts
index 3567e6193..00f671eec 100644
--- a/jeecgboot-vue3/src/hooks/web/useMessage.ts
+++ b/jeecgboot-vue3/src/hooks/web/useMessage.ts
@@ -88,14 +88,13 @@ const getBaseOptions = () => {
};
function createModalOptions(options: ModalOptionsPartial, icon: string): ModalOptionsPartial {
- //update-begin-author:taoyan date:2023-1-10 for: 可以自定义图标
+ // 代码逻辑说明: 可以自定义图标
let titleIcon:any = ''
if(options.icon){
titleIcon = options.icon;
}else{
titleIcon = getIcon(icon)
}
- //update-end-author:taoyan date:2023-1-10 for: 可以自定义图标
return {
...getBaseOptions(),
...options,
diff --git a/jeecgboot-vue3/src/hooks/web/usePage.ts b/jeecgboot-vue3/src/hooks/web/usePage.ts
index aacd47919..57a7aebdc 100644
--- a/jeecgboot-vue3/src/hooks/web/usePage.ts
+++ b/jeecgboot-vue3/src/hooks/web/usePage.ts
@@ -17,10 +17,9 @@ function handleError(e: Error) {
// page switch
export function useGo(_router?: Router) {
- // update-begin--author:liaozhiyang---date:20230908---for:【issues/694】404返回首页问题
+ // 代码逻辑说明: 【issues/694】404返回首页问题
const userStore = useUserStore();
const homePath = userStore.getUserInfo.homePath || PageEnum.BASE_HOME;
- // update-end--author:liaozhiyang---date:20230908---for:【issues/694】404返回首页问题
let router;
if (!_router) {
router = useRouter();
@@ -52,7 +51,7 @@ export const useRedo = (_router?: Router, otherQuery?: Recordable) => {
resolve(false);
return;
}
- // update-begin--author:liaozhiyang---date:20231123---for:【QQYUN-7099】动态路由匹配右键重新加载404
+ // 代码逻辑说明: 【QQYUN-7099】动态路由匹配右键重新加载404
const tabStore = useMultipleTabStore();
if (otherQuery && Object.keys(otherQuery).length > 0) {
Object.keys(otherQuery).forEach((key) => {
@@ -75,7 +74,6 @@ export const useRedo = (_router?: Router, otherQuery?: Recordable) => {
});
params['path'] = fullPath;
}
- // update-end--author:liaozhiyang---date:20231123---for:【QQYUN-7099】动态路由匹配右键重新加载404
push({ name: REDIRECT_NAME, params, query }).then(() => resolve(true));
});
}
diff --git a/jeecgboot-vue3/src/hooks/web/usePermission.ts b/jeecgboot-vue3/src/hooks/web/usePermission.ts
index 5a275eea0..93c0b28f8 100644
--- a/jeecgboot-vue3/src/hooks/web/usePermission.ts
+++ b/jeecgboot-vue3/src/hooks/web/usePermission.ts
@@ -117,11 +117,10 @@ export function usePermission() {
if (hasBpmPermission(code, '2') === true) {
return true;
}
- //update-begin-author:taoyan date:2022-6-17 for: VUEN-1342【流程】编码方式 节点权限配置好后,未生效
+ // 代码逻辑说明: VUEN-1342【流程】编码方式 节点权限配置好后,未生效
if (isCodingButNoConfig(code) == true) {
return false;
}
- //update-end-author:taoyan date:2022-6-17 for: VUEN-1342【流程】编码方式 节点权限配置好后,未生效
}
//=============================工作流权限判断-禁用-end==============================================
return !hasPermission(value);
@@ -150,7 +149,6 @@ export function usePermission() {
resume();
}
- //update-begin-author:taoyan date:2022-6-17 for: VUEN-1342【流程】编码方式 节点权限配置好后,未生效
/**
* 判断是不是 代码里写了逻辑但是没有配置权限这种情况
*/
@@ -163,14 +161,12 @@ export function usePermission() {
return true;
}
} else {
- // update-begin--author:liaozhiyang---date:20240705---for:【TV360X-1604】按钮禁用权限在接口中查不到也禁用
+ // 代码逻辑说明: 【TV360X-1604】按钮禁用权限在接口中查不到也禁用
return false;
- // update-end--author:liaozhiyang---date:20240705---for:【TV360X-1604】按钮禁用权限在接口中查不到也禁用
}
}
return false;
}
- //update-end-author:taoyan date:2022-6-17 for: VUEN-1342【流程】编码方式 节点权限配置好后,未生效
return { changeRole, hasPermission, togglePermissionMode, refreshMenu, isDisabledAuth, initBpmFormData };
}
diff --git a/jeecgboot-vue3/src/hooks/web/useSso.ts b/jeecgboot-vue3/src/hooks/web/useSso.ts
index 8b69829dd..61be98acd 100644
--- a/jeecgboot-vue3/src/hooks/web/useSso.ts
+++ b/jeecgboot-vue3/src/hooks/web/useSso.ts
@@ -7,9 +7,8 @@ import { useUserStore } from '/@/store/modules/user';
const globSetting = useGlobSetting();
const openSso = globSetting.openSso;
export function useSso() {
- //update-begin---author:wangshuai---date:2024-01-03---for:【QQYUN-7805】SSO登录强制用http #957---
+ // 代码逻辑说明: 【QQYUN-7805】SSO登录强制用http #957---
let locationUrl = document.location.protocol +"//" + window.location.host + '/';
- //update-end---author:wangshuai---date:2024-01-03---for:【QQYUN-7805】SSO登录强制用http #957---
/**
* 单点登录
diff --git a/jeecgboot-vue3/src/hooks/web/useTabs.ts b/jeecgboot-vue3/src/hooks/web/useTabs.ts
index 6cde92b8f..ab6e88c2f 100644
--- a/jeecgboot-vue3/src/hooks/web/useTabs.ts
+++ b/jeecgboot-vue3/src/hooks/web/useTabs.ts
@@ -76,21 +76,16 @@ export function useTabs(_router?: Router) {
break;
case TableActionEnum.CLOSE_LEFT:
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
+ // 代码逻辑说明: 【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
await tabStore.closeLeftTabs(tab || currentTab, router);
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
break;
case TableActionEnum.CLOSE_RIGHT:
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
await tabStore.closeRightTabs(tab || currentTab, router);
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
break;
case TableActionEnum.CLOSE_OTHER:
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
await tabStore.closeOtherTabs(tab || currentTab, router);
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
break;
case TableActionEnum.CLOSE_CURRENT:
@@ -117,12 +112,11 @@ export function useTabs(_router?: Router) {
return {
refreshPage: () => handleTabAction(TableActionEnum.REFRESH),
changeDesign: () => handleTabAction(TableActionEnum.HOME_DESIGN),
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
+ // 代码逻辑说明: 【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
closeAll: (tab) => handleTabAction(TableActionEnum.CLOSE_ALL, tab),
closeLeft: (tab) => handleTabAction(TableActionEnum.CLOSE_LEFT, tab),
closeRight: (tab) => handleTabAction(TableActionEnum.CLOSE_RIGHT, tab),
closeOther: (tab) => handleTabAction(TableActionEnum.CLOSE_OTHER, tab),
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
closeCurrent: () => handleTabAction(TableActionEnum.CLOSE_CURRENT),
close: (tab?: RouteLocationNormalized) => handleTabAction(TableActionEnum.CLOSE, tab),
setTitle: (title: string, tab?: RouteLocationNormalized) => updateTabTitle(title, tab),
diff --git a/jeecgboot-vue3/src/hooks/web/useTitle.ts b/jeecgboot-vue3/src/hooks/web/useTitle.ts
index 0320765b7..7747d0d90 100644
--- a/jeecgboot-vue3/src/hooks/web/useTitle.ts
+++ b/jeecgboot-vue3/src/hooks/web/useTitle.ts
@@ -29,7 +29,7 @@ export function useTitle() {
if (route.name === REDIRECT_NAME) {
return;
}
- // update-begin--author:liaozhiyang---date:20231110---for:【QQYUN-6938】online菜单名字和页面title不一致
+ // 代码逻辑说明: 【QQYUN-6938】online菜单名字和页面title不一致
if (route.params && Object.keys(route.params).length) {
if (!menus.value) {
menus.value = await getMenus();
@@ -46,7 +46,6 @@ export function useTitle() {
const tTitle = t(route?.meta?.title as string);
pageTitle.value = tTitle ? ` ${tTitle} - ${title} ` : `${title}`;
}
- // update-end--author:liaozhiyang---date:20231110---for:【QQYUN-6938】online菜单名字和页面title不一致
},
{ immediate: true }
);
diff --git a/jeecgboot-vue3/src/hooks/web/useWebSocket.ts b/jeecgboot-vue3/src/hooks/web/useWebSocket.ts
index 31ee8a228..76bfbce8c 100644
--- a/jeecgboot-vue3/src/hooks/web/useWebSocket.ts
+++ b/jeecgboot-vue3/src/hooks/web/useWebSocket.ts
@@ -12,7 +12,7 @@ const listeners = new Map();
* @param url
*/
export function connectWebSocket(url: string) {
- //update-begin-author:taoyan date:2022-4-24 for: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278
+ // 代码逻辑说明: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278
const token = (getToken() || '') as string;
result = useWebSocket(url, {
// 自动重连 (遇到错误最多重复连接10次)
@@ -26,7 +26,7 @@ export function connectWebSocket(url: string) {
interval: 55000
},
protocols: [token],
- // update-begin--author:liaozhiyang---date:20240726---for:[issues/6662] 演示系统socket总断,换一个写法
+ // 代码逻辑说明: [issues/6662] 演示系统socket总断,换一个写法
onConnected: function (ws) {
console.log('[WebSocket] 连接成功', ws);
},
@@ -39,11 +39,10 @@ export function connectWebSocket(url: string) {
onMessage: function (_ws, e) {
console.debug('[WebSocket] -----接收消息-------', e.data);
try {
- //update-begin---author:wangshuai---date:2024-05-07---for:【issues/1161】前端websocket因心跳导致监听不起作用---
+ // 代码逻辑说明: 【issues/1161】前端websocket因心跳导致监听不起作用---
if (e.data === 'ping') {
return;
}
- //update-end---author:wangshuai---date:2024-05-07---for:【issues/1161】前端websocket因心跳导致监听不起作用---
const data = JSON.parse(e.data);
for (const callback of listeners.keys()) {
try {
@@ -56,10 +55,7 @@ export function connectWebSocket(url: string) {
console.error('[WebSocket] data解析失败:', err);
}
},
- // update-end--author:liaozhiyang---date:20240726---for:[issues/6662] 演示系统socket总断,换一个写法
});
- // update-begin--author:liaozhiyang---date:20240726---for:[issues/6662] 演示系统socket总断,换一个写法
- //update-end-author:taoyan date:2022-4-24 for: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278
// if (result) {
// result.open = onOpen;
// result.close = onClose;
@@ -68,13 +64,11 @@ export function connectWebSocket(url: string) {
// if(ws!=null){
// ws.onerror = onError;
// ws.onmessage = onMessage;
- // //update-begin---author:wangshuai---date:2024-04-30---for:【issues/1217】发送测试消息后,铃铛数字没有变化---
// ws.onopen = onOpen;
// ws.onclose = onClose;
- // //update-end---author:wangshuai---date:2024-04-30---for:【issues/1217】发送测试消息后,铃铛数字没有变化---
+ //
// }
// }
- // update-end--author:liaozhiyang---date:20240726---for:[issues/6662] 演示系统socket总断,换一个写法
}
function onOpen() {
@@ -92,11 +86,10 @@ function onError(e) {
function onMessage(e) {
console.debug('[WebSocket] -----接收消息-------', e.data);
try {
- //update-begin---author:wangshuai---date:2024-05-07---for:【issues/1161】前端websocket因心跳导致监听不起作用---
+ // 代码逻辑说明: 【issues/1161】前端websocket因心跳导致监听不起作用---
if(e==='ping'){
return;
}
- //update-end---author:wangshuai---date:2024-05-07---for:【issues/1161】前端websocket因心跳导致监听不起作用---
const data = JSON.parse(e.data);
for (const callback of listeners.keys()) {
try {
diff --git a/jeecgboot-vue3/src/layouts/default/content/index.vue b/jeecgboot-vue3/src/layouts/default/content/index.vue
index a5ca77472..8b846452b 100644
--- a/jeecgboot-vue3/src/layouts/default/content/index.vue
+++ b/jeecgboot-vue3/src/layouts/default/content/index.vue
@@ -1,9 +1,7 @@
+
+
diff --git a/jeecgboot-vue3/src/layouts/default/header/components/notify/index.vue b/jeecgboot-vue3/src/layouts/default/header/components/notify/index.vue
index e07f6097c..154c92192 100644
--- a/jeecgboot-vue3/src/layouts/default/header/components/notify/index.vue
+++ b/jeecgboot-vue3/src/layouts/default/header/components/notify/index.vue
@@ -1,21 +1,23 @@
-
+
-
+
+
+
diff --git a/jeecgboot-vue3/src/layouts/default/index.vue b/jeecgboot-vue3/src/layouts/default/index.vue
index b0cbbd850..f1c247239 100644
--- a/jeecgboot-vue3/src/layouts/default/index.vue
+++ b/jeecgboot-vue3/src/layouts/default/index.vue
@@ -86,9 +86,8 @@
&-main {
width: 100%;
- // update-begin--author:liaozhiyang---date:20250818---for:【issues/8709】LayoutContent样式多出1px
+ // 代码逻辑说明:【issues/8709】LayoutContent样式多出1px
// margin-left: 1px;
- // update-end--author:liaozhiyang---date:20250818---for:【issues/8709】LayoutContent样式多出1px
}
}
diff --git a/jeecgboot-vue3/src/layouts/default/menu/index.vue b/jeecgboot-vue3/src/layouts/default/menu/index.vue
index 9d7391f5e..58121b201 100644
--- a/jeecgboot-vue3/src/layouts/default/menu/index.vue
+++ b/jeecgboot-vue3/src/layouts/default/menu/index.vue
@@ -83,9 +83,8 @@
const getWrapperStyle = computed((): CSSProperties => {
return {
- // update-begin--author:liaozhiyang---date:20241216---for:【issues/7548】侧边栏导航模式时会导致下面菜单滚动显示不全
+ // 代码逻辑说明: 【issues/7548】侧边栏导航模式时会导致下面菜单滚动显示不全
height: `calc(100% - ${unref(getIsShowLogo) ? '60px' : '0px'})`,
- // update-end--author:liaozhiyang---date:20241216---for:【issues/7548】侧边栏导航模式时会导致下面菜单滚动显示不全
};
});
@@ -116,7 +115,7 @@
* click menu
* @param menu
*/
- //update-begin-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
+ // 代码逻辑说明: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
const localeStore = useLocaleStore();
function handleMenuClick(path: string, item) {
if (item) {
@@ -124,7 +123,6 @@
}
go(path);
}
- //update-end-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
/**
* before click menu
@@ -174,11 +172,10 @@
});
diff --git a/jeecgboot-vue3/src/layouts/default/tabs/useTabDropdown.ts b/jeecgboot-vue3/src/layouts/default/tabs/useTabDropdown.ts
index 899405e10..1f41adef8 100644
--- a/jeecgboot-vue3/src/layouts/default/tabs/useTabDropdown.ts
+++ b/jeecgboot-vue3/src/layouts/default/tabs/useTabDropdown.ts
@@ -24,10 +24,8 @@ export function useTabDropdown(tabContentProps: TabContentProps, getIsTabs: Comp
const getTargetTab = computed((): RouteLocationNormalized => {
return unref(getIsTabs) ? tabContentProps.tabItem : unref(currentRoute);
});
- // update-begin--author:liaozhiyang---date:20250701---for:【QQYUN-12994】门户
// 隐藏下拉菜单中的门户设计项
const { getHideHomeDesign, isHideHomeDesign } = useHideHomeDesign(currentRoute);
- // update-end--author:liaozhiyang---date:20250701---for:【QQYUN-12994】门户
/**
* @description: drop-down list
@@ -45,7 +43,6 @@ export function useTabDropdown(tabContentProps: TabContentProps, getIsTabs: Comp
const isCurItem = curItem ? curItem.path === path : false;
const index = state.currentIndex;
const refreshDisabled = !isCurItem;
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
// Close left
const closeLeftDisabled = () => {
if (index === 0) {
@@ -69,11 +66,8 @@ export function useTabDropdown(tabContentProps: TabContentProps, getIsTabs: Comp
// Close right
const closeRightDisabled = index === tabStore.getTabList.length - 1 && tabStore.getLastDragEndIndex >= 0;
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
- // update-begin--author:liaozhiyang---date:20250701---for:【QQYUN-12994】门户
// 隐藏下拉菜单中的门户设计项
getHideHomeDesign(isCurItem, path);
- // update-end--author:liaozhiyang---date:20250701---for:【QQYUN-12994】门户
const dropMenuList: DropMenu[] = [
{
icon: 'jam:refresh-reverse',
@@ -100,9 +94,8 @@ export function useTabDropdown(tabContentProps: TabContentProps, getIsTabs: Comp
icon: 'mdi:arrow-left',
event: MenuEventEnum.CLOSE_LEFT,
text: t('layout.multipleTab.closeLeft'),
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
+ // 代码逻辑说明: 【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
disabled: closeLeftDisabled(),
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
divider: false,
},
{
@@ -116,9 +109,8 @@ export function useTabDropdown(tabContentProps: TabContentProps, getIsTabs: Comp
icon: 'material-symbols:arrows-outward',
event: MenuEventEnum.CLOSE_OTHER,
text: t('layout.multipleTab.closeOther'),
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
+ // 代码逻辑说明: 【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
disabled: closeOtherDisabled(),
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
},
// {
// icon: 'clarity:minus-line',
@@ -157,33 +149,23 @@ export function useTabDropdown(tabContentProps: TabContentProps, getIsTabs: Comp
break;
// Close left
case MenuEventEnum.CLOSE_LEFT:
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
closeLeft(state.current);
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
break;
// Close right
case MenuEventEnum.CLOSE_RIGHT:
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
closeRight(state.current);
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
break;
// Close other
case MenuEventEnum.CLOSE_OTHER:
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
closeOther(state.current);
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
break;
// Close all
case MenuEventEnum.CLOSE_ALL:
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
closeAll(state.current);
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
break;
// Close all
case MenuEventEnum.HOME_DESIGN:
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
changeDesign();
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
break;
}
}
diff --git a/jeecgboot-vue3/src/layouts/page/index.vue b/jeecgboot-vue3/src/layouts/page/index.vue
index 27cdde51a..901fe6f80 100644
--- a/jeecgboot-vue3/src/layouts/page/index.vue
+++ b/jeecgboot-vue3/src/layouts/page/index.vue
@@ -73,9 +73,8 @@
}
return tabStore.getCachedTabList;
});
- // update-begin--author:liaozhiyang---date:20250826---for:【QQYUN-13593】空白页美化
+ // 代码逻辑说明: 【QQYUN-13593】空白页美化
const { pageTip, getPageTip, effectVars } = useEmpty();
- // update-end--author:liaozhiyang---date:20250826---for:【QQYUN-13593】空白页美化
return {
getTransitionName,
openCache,
diff --git a/jeecgboot-vue3/src/locales/lang/en/layout.ts b/jeecgboot-vue3/src/locales/lang/en/layout.ts
index 2c1caf219..971b10da7 100644
--- a/jeecgboot-vue3/src/locales/lang/en/layout.ts
+++ b/jeecgboot-vue3/src/locales/lang/en/layout.ts
@@ -9,6 +9,8 @@ export default {
dropdownItemRefreshCache: 'Clean cache',
dropdownItemSwitchAccount: 'Account Setting',
dropdownItemSwitchDefaultHomePage: 'Switch Home Page',
+ dropdownItemSwitchDefaultWeb: 'Web Download',
+ dropdownItemSwitchDefaultAndroid: 'Android Apk Download',
tooltipErrorLog: 'Error log',
tooltipLock: 'Lock screen',
diff --git a/jeecgboot-vue3/src/locales/lang/en/sys.ts b/jeecgboot-vue3/src/locales/lang/en/sys.ts
index 952d84bb3..43dd3c4a5 100644
--- a/jeecgboot-vue3/src/locales/lang/en/sys.ts
+++ b/jeecgboot-vue3/src/locales/lang/en/sys.ts
@@ -95,6 +95,7 @@ export default {
userName: 'Username',
password: 'Password',
+ loginOrgCode: 'Department',
inputCode: 'Verification code',
confirmPassword: 'Confirm Password',
email: 'Email',
diff --git a/jeecgboot-vue3/src/locales/lang/zh-CN/layout.ts b/jeecgboot-vue3/src/locales/lang/zh-CN/layout.ts
index 19310a663..b6aa05b16 100644
--- a/jeecgboot-vue3/src/locales/lang/zh-CN/layout.ts
+++ b/jeecgboot-vue3/src/locales/lang/zh-CN/layout.ts
@@ -10,6 +10,9 @@ export default {
dropdownItemSwitchAccount: '账户设置',
dropdownItemSwitchDefaultHomePage: '切换首页',
+ dropdownItemSwitchDefaultWeb: '桌面应用',
+ dropdownItemSwitchDefaultAndroid: '移动App',
+
// tooltip
tooltipErrorLog: '错误日志',
tooltipLock: '锁定屏幕',
diff --git a/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts b/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts
index b0c1dc6fe..632d63ad8 100644
--- a/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts
+++ b/jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts
@@ -95,6 +95,7 @@ export default {
userName: '账号',
password: '密码',
+ loginOrgCode: '部门',
inputCode: '验证码',
confirmPassword: '确认密码',
email: '邮箱',
diff --git a/jeecgboot-vue3/src/logics/theme/index.ts b/jeecgboot-vue3/src/logics/theme/index.ts
index d105ce868..6634b2227 100644
--- a/jeecgboot-vue3/src/logics/theme/index.ts
+++ b/jeecgboot-vue3/src/logics/theme/index.ts
@@ -15,17 +15,16 @@ import { defHttp } from '/@/utils/http/axios';
let cssText = '';
export async function changeTheme(color: string) {
- // update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
+ // 代码逻辑说明: 【QQYUN-6366】升级到antd4.x
const appStore = useAppStore();
appStore.setProjectConfig({ themeColor: color });
- // update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
const colors = generateColors({
mixDarken,
mixLighten,
tinycolor,
color,
});
- // update-begin--author:liaozhiyang---date:20240322---for:【QQYUN-8570】生产环境暗黑模式下主题色不生效
+ // 代码逻辑说明: 【QQYUN-8570】生产环境暗黑模式下主题色不生效
if (import.meta.env.PROD && appStore.getDarkMode === 'dark') {
if (!darkCssIsReady && !cssText) {
await loadDarkThemeCss();
@@ -44,13 +43,11 @@ export async function changeTheme(color: string) {
});
fixDark();
}
- // update-end--author:liaozhiyang---date:20240322---for:【QQYUN-8570】生产环境暗黑模式下主题色不生效
}
// 【LOWCOD-2262】修复黑暗模式下切换皮肤无效的问题
async function fixDark() {
- // update-begin--author:liaozhiyang---date:20240322---for:【QQYUN-8570】生产环境暗黑模式下主题色不生效
+ // 代码逻辑说明: 【QQYUN-8570】生产环境暗黑模式下主题色不生效
const el = document.getElementById(styleTagId);
- // update-end--author:liaozhiyang---date:20240322---for:【QQYUN-8570】生产环境暗黑模式下主题色不生效
if (el) {
el.innerHTML = el.innerHTML.replace(/\\["']dark\\["']/g, `'dark'`);
}
diff --git a/jeecgboot-vue3/src/logics/theme/updateBackground.ts b/jeecgboot-vue3/src/logics/theme/updateBackground.ts
index ffe1b310d..6459f3d59 100644
--- a/jeecgboot-vue3/src/logics/theme/updateBackground.ts
+++ b/jeecgboot-vue3/src/logics/theme/updateBackground.ts
@@ -61,17 +61,16 @@ export function updateSidebarBgColor(color?: string) {
color = appStore.getMenuSetting.bgColor;
}
}
- // update-begin--author:liaozhiyang---date:20230811---for:【QQYUN-5922】logo背景色渐变
+ // 代码逻辑说明: 【QQYUN-5922】logo背景色渐变
let findIndex = SIDE_BAR_BG_COLOR_LIST.findIndex((item) => item === color);
setCssVar(SIDER_LOGO_BG_COLOR, findIndex == -1 ? 'linear-gradient(180deg, #000000, #282828)' : SIDER_LOGO_BG_COLOR_LIST[findIndex]);
- // update-end--author:liaozhiyang---date:20230811---for:【QQYUN-5922】llogo背景色渐变
setCssVar(SIDER_DARK_BG_COLOR, color);
setCssVar(SIDER_DARK_DARKEN_BG_COLOR, darken(color!, 6));
setCssVar(SIDER_LIGHTEN_BG_COLOR, lighten(color!, 5));
// only #ffffff is light
// Only when the background color is #fff, the theme of the menu will be changed to light
- // update-begin--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
+ // 代码逻辑说明: 【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
let theme;
let isThemeBright = false;
if (['#fff', '#ffffff'].includes(color!.toLowerCase()) && !darkMode) {
@@ -88,5 +87,4 @@ export function updateSidebarBgColor(color?: string) {
isThemeBright,
},
});
- // update-end--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
}
diff --git a/jeecgboot-vue3/src/router/constant.ts b/jeecgboot-vue3/src/router/constant.ts
index 68798598f..a641f59f2 100644
--- a/jeecgboot-vue3/src/router/constant.ts
+++ b/jeecgboot-vue3/src/router/constant.ts
@@ -3,9 +3,8 @@ export const REDIRECT_NAME = 'Redirect';
export const PARENT_LAYOUT_NAME = 'ParentLayout';
export const PAGE_NOT_FOUND_NAME = 'PageNotFound';
-// update-begin--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去
+// 代码逻辑说明: 【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去
export const PAGE_NOT_FOUND_NAME_404 = 'PageNotFound404';
-// update-end--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去
export const EXCEPTION_COMPONENT = () => import('/@/views/sys/exception/Exception.vue');
diff --git a/jeecgboot-vue3/src/router/guard/permissionGuard.ts b/jeecgboot-vue3/src/router/guard/permissionGuard.ts
index 89a297f53..e0c509be8 100644
--- a/jeecgboot-vue3/src/router/guard/permissionGuard.ts
+++ b/jeecgboot-vue3/src/router/guard/permissionGuard.ts
@@ -26,11 +26,8 @@ const TOKEN_LOGIN = PageEnum.TOKEN_LOGIN;
const ROOT_PATH = RootRoute.path;
-//update-begin---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------
-//update-begin---author:wangshuai ---date:20221111 for: [VUEN-2472]分享免登录------------
+// 代码逻辑说明: [VUEN-2472]分享免登录------------
const whitePathList: PageEnum[] = [LOGIN_PATH, OAUTH2_LOGIN_PAGE_PATH,SYS_FILES_PATH, TOKEN_LOGIN ];
-//update-end---author:wangshuai ---date:20221111 for: [VUEN-2472]分享免登录------------
-//update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------
export function createPermissionGuard(router: Router) {
const userStore = useUserStoreWithOut();
@@ -60,10 +57,8 @@ export function createPermissionGuard(router: Router) {
if (to.path === LOGIN_PATH && token) {
const isSessionTimeout = userStore.getSessionTimeout;
- //update-begin---author:scott ---date:2023-04-24 for:【QQYUN-4713】登录代码调整逻辑有问题,改造待观察--
//TODO vben默认写法,暂时不知目的,有问题暂时先注释掉
//await userStore.afterLoginAction();
- //update-end---author:scott ---date::2023-04-24 for:【QQYUN-4713】登录代码调整逻辑有问题,改造待观察--
try {
if (!isSessionTimeout) {
@@ -71,18 +66,16 @@ export function createPermissionGuard(router: Router) {
return;
}
} catch {}
- //update-begin---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------
+ // 代码逻辑说明: [issues/I5BG1I]vue3不支持auth2登录------------
} else if (to.path === LOGIN_PATH && isOAuth2AppEnv() && !token) {
//退出登录进入此逻辑
//如果进入的页面是login页面并且当前是OAuth2app环境,并且token为空,就进入OAuth2登录页面
- //update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
+ // 代码逻辑说明: [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]新建企业微信和钉钉配置表,通过租户模式隔离------------
return;
- //update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3不支持auth2登录------------
}
next();
return;
@@ -96,7 +89,7 @@ export function createPermissionGuard(router: Router) {
return;
}
- //update-begin---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3 Auth2未实现------------
+ // 代码逻辑说明: [issues/I5BG1I]vue3 Auth2未实现------------
let path = LOGIN_PATH;
if (whitePathList.includes(to.path as PageEnum)) {
// 在免登录白名单,如果进入的页面是login页面并且当前是OAuth2app环境,就进入OAuth2登录页面
@@ -107,7 +100,6 @@ export function createPermissionGuard(router: Router) {
next();
}
} else {
- //update-begin---author:wangshuai ---date:20230302 for:只有首次登陆并且是企业微信或者钉钉的情况下才会调用------------
//----------【首次登陆并且是企业微信或者钉钉的情况下才会调用】-----------------------------------------------
//只有首次登陆并且是企业微信或者钉钉的情况下才会调用
let href = window.location.href;
@@ -120,20 +112,17 @@ export function createPermissionGuard(router: Router) {
}
}
//---------【首次登陆并且是企业微信或者钉钉的情况下才会调用】------------------------------------------------
- //update-end---author:wangshuai ---date:20230302 for:只有首次登陆并且是企业微信或者钉钉的情况下才会调用------------
// 如果当前是在OAuth2APP环境,就跳转到OAuth2登录页面,否则跳转到登录页面
path = isOAuth2AppEnv() ? OAUTH2_LOGIN_PAGE_PATH : LOGIN_PATH;
}
- //update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3 Auth2未实现------------
// redirect login page
const redirectData: { path: string; replace: boolean; query?: Recordable } = {
- //update-begin---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3 Auth2未实现------------
+ // 代码逻辑说明: [issues/I5BG1I]vue3 Auth2未实现------------
path: path,
- //update-end---author:wangshuai ---date:20220629 for:[issues/I5BG1I]vue3 Auth2未实现------------
replace: true,
};
- //update-begin---author:scott ---date:2023-04-24 for:【QQYUN-4713】登录代码调整逻辑有问题,改造待观察--
+ // 代码逻辑说明: 【QQYUN-4713】登录代码调整逻辑有问题,改造待观察--
if (to.fullPath) {
console.log("to.fullPath 1",to.fullPath)
console.log("to.path 2",to.path)
@@ -142,13 +131,11 @@ export function createPermissionGuard(router: Router) {
if(getFullPath=='/' || getFullPath=='/500' || getFullPath=='/400' || getFullPath=='/login?redirect=/' || getFullPath=='/login?redirect=/login?redirect=/'){
return;
}
- //update-end---author:scott ---date:2023-04-24 for:【QQYUN-4713】登录代码调整逻辑有问题,改造待观察--
redirectData.query = {
...redirectData.query,
- // update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
+ // 代码逻辑说明: 修复登录成功后,没有正确重定向的问题
redirect: to.fullPath,
- // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
};
}
@@ -159,25 +146,21 @@ export function createPermissionGuard(router: Router) {
//==============================【首次登录并且是企业微信或者钉钉的情况下才会调用】==================
//判断是免登录页面,如果页面包含/tenantId/,那么就直接前往主页
if(isOAuth2AppEnv() && to.path.indexOf("/tenantId/") != -1){
- //update-begin---author:wangshuai---date:2024-11-08---for:【TV360X-2958】钉钉登录后打开了敲敲云,换其他账号登录后,再打开敲敲云显示的是原来账号的应用---
+ // 代码逻辑说明: 【TV360X-2958】钉钉登录后打开了敲敲云,换其他账号登录后,再打开敲敲云显示的是原来账号的应用---
if (isOAuth2DingAppEnv()) {
next(OAUTH2_LOGIN_PAGE_PATH);
} else {
next(userStore.getUserInfo.homePath || PageEnum.BASE_HOME);
}
- //update-end---author:wangshuai---date:2024-11-08---for:【TV360X-2958】钉钉登录后打开了敲敲云,换其他账号登录后,再打开敲敲云显示的是原来账号的应用---
return;
}
//==============================【首次登录并且是企业微信或者钉钉的情况下才会调用】==================
- // update-begin--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去
// Jump to the 404 page after processing the login
if (from.path === LOGIN_PATH && to.name === PAGE_NOT_FOUND_NAME_404 && to.fullPath !== (userStore.getUserInfo.homePath || PageEnum.BASE_HOME)) {
next(userStore.getUserInfo.homePath || PageEnum.BASE_HOME);
return;
}
- // update-end--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去
- //update-begin---author:scott ---date:2024-02-21 for:【QQYUN-8326】刷新首页,不需要重新获取用户信息---
// // get userinfo while last fetch time is empty
// if (userStore.getLastUpdateTime === 0) {
// try {
@@ -188,12 +171,10 @@ export function createPermissionGuard(router: Router) {
// next();
// }
// }
- //update-end---author:scott ---date::2024-02-21 for:【QQYUN-8326】刷新首页,不需要重新获获取用户信息---
- // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的)
+ // 代码逻辑说明: 【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的)
if (userStore.getLastUpdateTime === 0) {
userStore.setAllDictItemsByLocal();
}
- // update-end--author:liaozhiyang---date:20240321---for:【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的)
if (permissionStore.getIsDynamicAddedRoute) {
next();
return;
@@ -207,7 +188,7 @@ export function createPermissionGuard(router: Router) {
router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw);
permissionStore.setDynamicAddedRoute(true);
- // update-begin--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去
+ // 代码逻辑说明: 【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去
if (to.name === PAGE_NOT_FOUND_NAME_404) {
// 动态添加路由后,此处应当重定向到fullPath,否则会加载404页面内容
next({ path: to.fullPath, replace: true, query: to.query });
@@ -217,6 +198,5 @@ export function createPermissionGuard(router: Router) {
const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect };
next(nextData);
}
- // update-end--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去
});
}
diff --git a/jeecgboot-vue3/src/router/helper/menuHelper.ts b/jeecgboot-vue3/src/router/helper/menuHelper.ts
index ac8efc9b7..561c23a94 100644
--- a/jeecgboot-vue3/src/router/helper/menuHelper.ts
+++ b/jeecgboot-vue3/src/router/helper/menuHelper.ts
@@ -7,7 +7,6 @@ import { RouteParams } from 'vue-router';
import { toRaw } from 'vue';
export function getAllParentPath(treeData: T[], path: string) {
- // update-begin--author:sunjianlei---date:220230426---for:【issues/478】修复菜单展开合并BUG
// 原代码
// const menuList = findPath(treeData, (n) => n.path === path) as Menu[];
// 先匹配不包含隐藏菜单的路径
@@ -16,7 +15,6 @@ export function getAllParentPath(treeData: T[], path: string) {
if(!(menuList?.length)) {
menuList = findMenuPath(treeData, path, true)
}
- // update-end--author:sunjianlei---date:220230426---for:【issues/478】修复菜单展开合并BUG
return (menuList || []).map((item) => item.path);
}
diff --git a/jeecgboot-vue3/src/router/helper/routeHelper.ts b/jeecgboot-vue3/src/router/helper/routeHelper.ts
index 1c6eba9de..9e4980637 100644
--- a/jeecgboot-vue3/src/router/helper/routeHelper.ts
+++ b/jeecgboot-vue3/src/router/helper/routeHelper.ts
@@ -39,12 +39,10 @@ function asyncImportRoute(routes: AppRouteRecordRaw[] | undefined) {
if (item?.meta?.title) {
const { t } = useI18n();
if(item.meta.title.includes('t(\'') && t){
- // update-begin--author:liaozhiyang---date:20230906---for:【QQYUN-6390】eval替换成new Function,解决build警告
+ // 代码逻辑说明: 【QQYUN-6390】eval替换成new Function,解决build警告
item.meta.title = new Function('t', `return ${item.meta.title}`)(t);
- // update-end--author:liaozhiyang---date:20230906---for:【QQYUN-6390】eval替换成new Function,解决build警告
}
}
- // update-begin--author:sunjianlei---date:20210918---for:适配旧版路由选项 --------
// @ts-ignore 适配隐藏路由
if (item?.hidden) {
item.meta.hideMenu = true;
@@ -60,9 +58,8 @@ function asyncImportRoute(routes: AppRouteRecordRaw[] | undefined) {
let token = getToken();
let tenantId = getTenantId();
// URL支持{{ window.xxx }}占位符变量
- //update-begin---author:wangshuai ---date:20220711 for:[VUEN-1638]菜单tenantId需要动态生成------------
+ // 代码逻辑说明: [VUEN-1638]菜单tenantId需要动态生成------------
item.component = (item.component || '').replace(/{{([^}}]+)?}}/g, (s1, s2) => _eval(s2)).replace('${token}', token).replace('${tenantId}', tenantId);
- //update-end---author:wangshuai ---date:20220711 for:[VUEN-1638]菜单tenantId需要动态生成------------
// 适配 iframe
if (/^\/?http(s)?/.test(item.component as string)) {
item.component = item.component.substring(1, item.component.length);
@@ -71,16 +68,14 @@ function asyncImportRoute(routes: AppRouteRecordRaw[] | undefined) {
if (item.meta?.internalOrExternal) {
// @ts-ignore 外部打开
item.path = item.component;
- // update-begin--author:sunjianlei---date:20220408---for: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下
+ // 代码逻辑说明: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下
item.path = item.path.replace('#', URL_HASH_TAB);
- // update-end--author:sunjianlei---date:20220408---for: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下
} else {
// @ts-ignore 内部打开
item.meta.frameSrc = item.component;
}
delete item.component;
}
- // update-end--author:sunjianlei---date:20210918---for:适配旧版路由选项 --------
if (!item.component && item.meta?.frameSrc) {
item.component = 'IFRAME';
}
@@ -91,14 +86,12 @@ function asyncImportRoute(routes: AppRouteRecordRaw[] | undefined) {
if (layoutFound) {
item.component = layoutFound;
} else {
- // update-end--author:zyf---date:20220307--for:VUEN-219兼容后台返回动态首页,目的适配跟v2版本配置一致 --------
if (component.indexOf('dashboard/') > -1) {
//当数据标sys_permission中component没有拼接index时前端需要拼接
if (component.indexOf('/index') < 0) {
component = component + '/index';
}
}
- // update-end--author:zyf---date:20220307---for:VUEN-219兼容后台返回动态首页,目的适配跟v2版本配置一致 --------
item.component = dynamicImport(dynamicViewsModules, component as string);
}
} else if (name) {
diff --git a/jeecgboot-vue3/src/router/routes/basic.ts b/jeecgboot-vue3/src/router/routes/basic.ts
index cdf2d3c09..386e75f04 100644
--- a/jeecgboot-vue3/src/router/routes/basic.ts
+++ b/jeecgboot-vue3/src/router/routes/basic.ts
@@ -16,9 +16,8 @@ export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = {
children: [
{
path: '/:path(.*)*',
- // update-begin--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去
+ // 代码逻辑说明: 【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去
name: PAGE_NOT_FOUND_NAME_404,
- // update-end--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去
component: EXCEPTION_COMPONENT,
meta: {
title: 'ErrorPage',
diff --git a/jeecgboot-vue3/src/router/routes/index.ts b/jeecgboot-vue3/src/router/routes/index.ts
index c37758636..77b3dadfd 100644
--- a/jeecgboot-vue3/src/router/routes/index.ts
+++ b/jeecgboot-vue3/src/router/routes/index.ts
@@ -40,7 +40,7 @@ export const LoginRoute: AppRouteRecordRaw = {
},
};
-//update-begin---author:wangshuai ---date:20220629 for:auth2登录页面路由------------
+// 代码逻辑说明: auth2登录页面路由------------
export const Oauth2LoginRoute: AppRouteRecordRaw = {
path: '/oauth2-app/login',
name: 'oauth2-app-login',
@@ -51,7 +51,6 @@ export const Oauth2LoginRoute: AppRouteRecordRaw = {
title: t('routes.oauth2.login'),
},
};
-//update-end---author:wangshuai ---date:20220629 for:auth2登录页面路由------------
/**
* 【通过token直接静默登录】流程办理登录页面 中转跳转
diff --git a/jeecgboot-vue3/src/settings/componentSetting.ts b/jeecgboot-vue3/src/settings/componentSetting.ts
index e33f3421e..d9c22576b 100644
--- a/jeecgboot-vue3/src/settings/componentSetting.ts
+++ b/jeecgboot-vue3/src/settings/componentSetting.ts
@@ -25,7 +25,7 @@ export default {
defaultPageSize: 10,
// 默认排序方法
defaultSortFn: (sortInfo: SorterResult) => {
- //update-begin-author:taoyan date:2022-10-21 for: VUEN-2199【表单设计器】多字段排序
+ // 代码逻辑说明: VUEN-2199【表单设计器】多字段排序
if(sortInfo instanceof Array){
let sortInfoArray:any[] = []
for(let item of sortInfo){
@@ -41,15 +41,13 @@ export default {
let info = getSort(sortInfo)
return info || {}
}
- //update-end-author:taoyan date:2022-10-21 for: VUEN-2199【表单设计器】多字段排序
},
// 自定义过滤方法
defaultFilterFn: (data: Partial>) => {
return data;
},
- // update-begin--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义
+ // 代码逻辑说明: 【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义
scrollToFirstRowOnChange: false,
- // update-end--author:liaozhiyang---date:20240424---for:【issues/1188】BasicTable加上scrollToFirstRowOnChange类型定义
},
// 滚动组件配置
scrollbar: {
diff --git a/jeecgboot-vue3/src/settings/projectSetting.ts b/jeecgboot-vue3/src/settings/projectSetting.ts
index 60e2ddd6b..d7e6e53d0 100644
--- a/jeecgboot-vue3/src/settings/projectSetting.ts
+++ b/jeecgboot-vue3/src/settings/projectSetting.ts
@@ -11,9 +11,10 @@ import {
TabsThemeEnum,
} from '/@/enums/appEnum';
import { SIDE_BAR_BG_COLOR_LIST, HEADER_PRESET_BG_COLOR_LIST } from './designSetting';
-import { primaryColor } from '../../build/config/themeConfig';
import { darkMode } from '/@/settings/designSetting';
+import { getThemeColorByMenuType } from '/@/utils/getThemeColorByMenuType';
+const menuType = MenuTypeEnum.SIDEBAR;
// ! 改动后需要清空浏览器缓存
const setting: ProjectConfig = {
// 是否显示SettingButton
@@ -41,13 +42,10 @@ const setting: ProjectConfig = {
// SessionTimeoutProcessingEnum.ROUTE_JUMP: 路由跳转到登录页
// SessionTimeoutProcessingEnum.PAGE_COVERAGE: 生成登录弹窗,覆盖当前页面
sessionTimeoutProcessing: SessionTimeoutProcessingEnum.ROUTE_JUMP,
-
- // 项目主题色
- themeColor: primaryColor,
- // update-begin--author:liaozhiyang---date:20250414--for:【QQYUN-11956】修复projectSetting中配置主题模式不生效
+ // 项目主题色 - 根据导航栏模式确定主题色动态设置
+ themeColor: getThemeColorByMenuType(menuType),
// 项目主题模式
themeMode: darkMode,
- // update-end--author:liaozhiyang---date:20250414--for:【QQYUN-11956】修复projectSetting中配置主题模式不生效
// 网站灰色模式,用于可能悼念的日期开启
grayMode: false,
@@ -117,10 +115,8 @@ const setting: ProjectConfig = {
type: MenuTypeEnum.SIDEBAR,
// 菜单主题
theme: ThemeEnum.DARK,
- // update-begin--author:liaozhiyang---date:20241203---for:【issues/7522】解决menuSetting ts警告
// 左侧导航栏文字颜色调整区分彩色和暗黑 (不对应配置)
isThemeBright: false,
- // update-end--author:liaozhiyang---date:20241203---for:【issues/7522】解决menuSetting ts警告
// 分割菜单
split: false,
// 顶部菜单布局
diff --git a/jeecgboot-vue3/src/settings/registerThirdComp.ts b/jeecgboot-vue3/src/settings/registerThirdComp.ts
index 6c47552f2..2866b79d9 100644
--- a/jeecgboot-vue3/src/settings/registerThirdComp.ts
+++ b/jeecgboot-vue3/src/settings/registerThirdComp.ts
@@ -16,7 +16,7 @@ export async function registerThirdComp(app: App) {
await registerJVxeCustom();
//---------------------------------------------------------------------
// 注册全局聊天表情包
- // update-begin--author:liaozhiyang---date:20240308---for:【QQYUN-8241】emoji-mart-vue-fast库异步加载
+ // 代码逻辑说明: 【QQYUN-8241】emoji-mart-vue-fast库异步加载
app.component(
'Picker',
createAsyncComponent(() => {
diff --git a/jeecgboot-vue3/src/store/modules/app.ts b/jeecgboot-vue3/src/store/modules/app.ts
index 26a0867a8..ee2f831d7 100644
--- a/jeecgboot-vue3/src/store/modules/app.ts
+++ b/jeecgboot-vue3/src/store/modules/app.ts
@@ -125,9 +125,8 @@ export const useAppStore = defineStore({
setProjectConfig(config: DeepPartial): void {
this.projectConfig = deepMerge(this.projectConfig || {}, config);
- // update-begin--author:liaozhiyang---date:20240408---for:【QQYUN-8922】设置导航栏模式没存本地,刷新就还原了
+ // 代码逻辑说明: 【QQYUN-8922】设置导航栏模式没存本地,刷新就还原了
Persistent.setLocal(PROJ_CFG_KEY, this.projectConfig, true);
- // update-end--author:liaozhiyang---date:20240408---for:【QQYUN-8922】设置导航栏模式没存本地,刷新就还原了
},
async resetAllState() {
diff --git a/jeecgboot-vue3/src/store/modules/defIndex.ts b/jeecgboot-vue3/src/store/modules/defIndex.ts
index 3692e173b..5e6e505ab 100644
--- a/jeecgboot-vue3/src/store/modules/defIndex.ts
+++ b/jeecgboot-vue3/src/store/modules/defIndex.ts
@@ -67,9 +67,8 @@ export const defIndexApi = {
async update(url: string, component: string, isRoute: boolean) {
let apiUrl = '/sys/sysRoleIndex/updateDefIndex'
apiUrl += '?url=' + url
- //update-begin-author:liusq---date:2025-07-04--for: 设置默认首页接口传参修改,增加encodeURIComponent,防止{{ window._CONFIG['domianURL'] }}/**保存不上
+ // 代码逻辑说明: 设置默认首页接口传参修改,增加encodeURIComponent,防止{{ window._CONFIG['domianURL'] }}/**保存不上
apiUrl += '&component=' + encodeURIComponent(component)
- //update-end-author:liusq---date:2025-07-04--for: 设置默认首页接口传参修改,增加encodeURIComponent,防止{{ window._CONFIG['domianURL'] }}/**保存不上
apiUrl += '&isRoute=' + isRoute
return await defHttp.put({url: apiUrl});
},
diff --git a/jeecgboot-vue3/src/store/modules/locale.ts b/jeecgboot-vue3/src/store/modules/locale.ts
index eb326b81d..31030c014 100644
--- a/jeecgboot-vue3/src/store/modules/locale.ts
+++ b/jeecgboot-vue3/src/store/modules/locale.ts
@@ -35,11 +35,10 @@ export const useLocaleStore = defineStore({
getLocale(): LocaleType {
return this.localInfo?.locale ?? 'zh_CN';
},
- //update-begin-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
+ // 代码逻辑说明: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
getPathTitle: (state) => {
return (path) => state.pathTitleMap[path];
},
- //update-end-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
getAppIndexTheme(): string {
return this.appIndexTheme;
},
@@ -65,11 +64,10 @@ export const useLocaleStore = defineStore({
...this.localInfo,
});
},
- //update-begin-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
+ // 代码逻辑说明: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
setPathTitle(path, title) {
this.pathTitleMap[path] = title;
},
- //update-end-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
setAppIndexTheme(theme) {
this.appIndexTheme = theme;
},
diff --git a/jeecgboot-vue3/src/store/modules/multipleTab.ts b/jeecgboot-vue3/src/store/modules/multipleTab.ts
index 788090750..68af9f3b8 100644
--- a/jeecgboot-vue3/src/store/modules/multipleTab.ts
+++ b/jeecgboot-vue3/src/store/modules/multipleTab.ts
@@ -35,9 +35,8 @@ interface redirectPageParamType {
function handleGotoPage(router: Router, path?) {
const go = useGo(router);
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
+ // 代码逻辑说明: 【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
go(path || unref(router.currentRoute).path, true);
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
}
const getToTarget = (tabItem: RouteLocationNormalized) => {
const { params, path, query } = tabItem;
@@ -125,7 +124,7 @@ export const useMultipleTabStore = defineStore({
if (!needCache) {
continue;
}
- // update-begin--author:liaozhiyang---date:20240308---for:【QQYUN-12348】online生成的菜单sql 自动带上组件名称
+ // 代码逻辑说明: 【QQYUN-12348】online生成的菜单sql 自动带上组件名称
if (
['OnlineAutoList', 'DefaultOnlineList', 'CgformErpList', 'OnlCgformInnerTableList', 'OnlCgformTabList', 'OnlCgReportList', 'GraphreportAutoChart', 'AutoDesformDataList'].includes(item.name as string) &&
allMenus?.length
@@ -137,7 +136,6 @@ export const useMultipleTabStore = defineStore({
continue;
}
}
- // update-end--author:liaozhiyang---date:20240308---for:【QQYUN-12348】online生成的菜单sql 自动带上组件名称
const name = item.name as string;
cacheMap.add(name);
}
@@ -202,7 +200,6 @@ export const useMultipleTabStore = defineStore({
async addTab(route: RouteLocationNormalized) {
const { path, name, fullPath, params, query, meta } = getRawRoute(route);
- // update-begin--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去
// 404 The page does not need to add a tab
if (
path === PageEnum.ERROR_PAGE ||
@@ -212,7 +209,6 @@ export const useMultipleTabStore = defineStore({
) {
return;
}
- // update-end--author:liaozhiyang---date:202401127---for:【issues/7500】vue-router4.5.0版本路由name:PageNotFound同名导致登录进不去
let updateIndex = -1;
// Existing pages, do not add tabs repeatedly
@@ -232,7 +228,6 @@ export const useMultipleTabStore = defineStore({
curTab.fullPath = fullPath || curTab.fullPath;
this.tabList.splice(updateIndex, 1, curTab);
} else {
- // update-begin--author:liaozhiyang---date:20250709---for:【QQYUN-13058】菜单检测同样的地址(忽略query查询参数)只打开一个
// 只比较path,忽略query
const findIndex = this.tabList.findIndex((tab) => tab.path === path);
const isTabExist = findIndex !== -1;
@@ -240,7 +235,6 @@ export const useMultipleTabStore = defineStore({
this.tabList.splice(findIndex, 1, route);
return;
}
- // update-end--author:liaozhiyang---date:20250709---for:【QQYUN-13058】菜单检测同样的地址(忽略query查询参数)只打开一个
// Add tab
// 获取动态路由打开数,超过 0 即代表需要控制打开数
const dynamicLevel = meta?.dynamicLevel ?? -1;
@@ -357,19 +351,17 @@ export const useMultipleTabStore = defineStore({
pathList.push(item.fullPath);
}
}
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
+ // 代码逻辑说明: 【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
isCloseCurrentTab = closeTabContainCurrentRoute(router, pathList);
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
this.bulkCloseTabs(pathList);
}
this.updateCacheTab();
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
+ // 代码逻辑说明: 【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
if (isCloseCurrentTab) {
handleGotoPage(router, route.path);
} else {
handleGotoPage(router);
}
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
},
// Close the tab on the left and jump
@@ -386,19 +378,17 @@ export const useMultipleTabStore = defineStore({
pathList.push(item.fullPath);
}
}
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
+ // 代码逻辑说明: 【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
isCloseCurrentTab = closeTabContainCurrentRoute(router, pathList);
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
this.bulkCloseTabs(pathList);
}
this.updateCacheTab();
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
+ // 代码逻辑说明: 【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
if (isCloseCurrentTab) {
handleGotoPage(router, route.path);
} else {
handleGotoPage(router);
}
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
},
async closeAllTab(router: Router) {
@@ -431,13 +421,12 @@ export const useMultipleTabStore = defineStore({
isCloseCurrentTab = closeTabContainCurrentRoute(router, pathList);
this.bulkCloseTabs(pathList);
this.updateCacheTab();
- // update-begin--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
+ // 代码逻辑说明: 【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
if (isCloseCurrentTab) {
handleGotoPage(router, route.path);
} else {
handleGotoPage(router);
}
- // update-end--author:liaozhiyang---date:20240605---for:【TV360X-732】非当前页右键关闭左侧、关闭右侧、关闭其它功能正常使用
},
/**
diff --git a/jeecgboot-vue3/src/store/modules/permission.ts b/jeecgboot-vue3/src/store/modules/permission.ts
index f26f195c8..cdac51981 100644
--- a/jeecgboot-vue3/src/store/modules/permission.ts
+++ b/jeecgboot-vue3/src/store/modules/permission.ts
@@ -90,11 +90,10 @@ export const usePermissionStore = defineStore({
return this.isDynamicAddedRoute;
},
- //update-begin-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制
+ // 代码逻辑说明: VUEN-1162 子表按钮没控制
getOnlineSubTableAuth: (state) => {
return (code) => state.onlineSubTableAuthMap[code];
},
- //update-end-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制
},
actions: {
setPermCodeList(codeList: string[]) {
@@ -224,8 +223,6 @@ export const usePermissionStore = defineStore({
try {
routeList = await this.changePermissionCode();
//routeList = (await getMenuList()) as AppRouteRecordRaw[];
- // update-begin--author:liaozhiyang---date:20240313---for:【QQYUN-8487】注释掉判断菜单是否vue2版本逻辑代码
- // update-begin----author:sunjianlei---date:20220315------for: 判断是否是 vue3 版本的菜单 ---
// let hasIndex: boolean = false;
// let hasIcon: boolean = false;
// for (let menuItem of routeList) {
@@ -259,8 +256,6 @@ export const usePermissionStore = defineStore({
// 100
// );
// }
- // update-end----author:sunjianlei---date:20220315------for: 判断是否是 vue3 版本的菜单 ---
- // update-end--author:liaozhiyang---date:20240313---for:【QQYUN-8487】注释掉判断菜单是否vue2版本逻辑代码
} catch (error) {
console.error(error);
}
@@ -278,9 +273,8 @@ export const usePermissionStore = defineStore({
routeList = routeList.filter(routeRemoveIgnoreFilter);
routeList = flatMultiLevelRoutes(routeList);
- // update-begin--author:liaozhiyang---date:20240529---for:【TV360X-522】ai助手路由写死在前端
+ // 代码逻辑说明: 【TV360X-522】ai助手路由写死在前端
routes = [PAGE_NOT_FOUND_ROUTE, ...routeList, ...staticRoutesList];
- // update-end--author:liaozhiyang---date:20240529---for:【TV360X-522】ai助手路由写死在前端
break;
}
@@ -300,11 +294,10 @@ export const usePermissionStore = defineStore({
this.allAuthList = authList;
},
- //update-begin-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制
+ // 代码逻辑说明: VUEN-1162 子表按钮没控制
setOnlineSubTableAuth(code, hideBtnList) {
this.onlineSubTableAuthMap[code] = hideBtnList;
},
- //update-end-author:taoyan date:2022-6-1 for: VUEN-1162 子表按钮没控制
},
});
diff --git a/jeecgboot-vue3/src/store/modules/user.ts b/jeecgboot-vue3/src/store/modules/user.ts
index 099710d72..22bc6f24c 100644
--- a/jeecgboot-vue3/src/store/modules/user.ts
+++ b/jeecgboot-vue3/src/store/modules/user.ts
@@ -114,14 +114,13 @@ export const useUserStore = defineStore({
setAuthCache(DB_DICT_DATA_KEY, dictItems);
},
setAllDictItemsByLocal() {
- // update-begin--author:liaozhiyang---date:20240321---for:【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的)
+ // 代码逻辑说明: 【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的)
if (!this.dictItems) {
const allDictItems = getAuthCache(DB_DICT_DATA_KEY);
if (allDictItems) {
this.dictItems = allDictItems;
}
}
- // update-end--author:liaozhiyang---date:20240321---for:【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的)
},
setTenant(id) {
this.tenantid = id;
@@ -185,7 +184,6 @@ export const useUserStore = defineStore({
if (sessionTimeout) {
this.setSessionTimeout(false);
} else {
- //update-begin---author:scott ---date::2024-02-21 for:【QQYUN-8326】登录不需要构建路由,进入首页有构建---
// // 构建后台菜单路由
// const permissionStore = usePermissionStore();
// if (!permissionStore.isDynamicAddedRoute) {
@@ -196,36 +194,29 @@ export const useUserStore = defineStore({
// router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw);
// permissionStore.setDynamicAddedRoute(true);
// }
- //update-end---author:scott ---date::2024-02-21 for:【QQYUN-8326】登录不需要构建路由,进入首页有构建---
await this.setLoginInfo({ ...data, isLogin: true });
- //update-begin-author:liusq date:2022-5-5 for:登录成功后缓存拖拽模块的接口前缀
+ // 代码逻辑说明: 登录成功后缓存拖拽模块的接口前缀
localStorage.setItem(JDragConfigEnum.DRAG_BASE_URL, useGlobSetting().domainUrl);
- //update-end-author:liusq date:2022-5-5 for: 登录成功后缓存拖拽模块的接口前缀
- // update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
+ // 代码逻辑说明: 修复登录成功后,没有正确重定向的问题
let redirect = router.currentRoute.value?.query?.redirect as string;
// 判断是否有 redirect 重定向地址
- //update-begin---author:wangshuai ---date:20230424 for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------
+ // 代码逻辑说明: 【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------
if (redirect && goHome) {
- //update-end---author:wangshuai ---date:20230424 for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------
- // update-begin--author:liaozhiyang---date:20250407---for:【issues/8034】hash模式下退出重登录默认跳转地址异常
// router.options.history.base可替代之前的publicPath
// 当前页面打开
window.open(`${router.options.history.base}${redirect}`, '_self');
- // update-end--author:liaozhiyang---date:20250407---for:【issues/8034】hash模式下退出重登录默认跳转地址异常
return data;
}
- // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
- //update-begin---author:wangshuai---date:2024-04-03---for:【issues/1102】设置单点登录后页面,进入首页提示404,也没有绘制侧边栏 #1102---
+ // 代码逻辑说明: 【issues/1102】设置单点登录后页面,进入首页提示404,也没有绘制侧边栏 #1102---
let ticket = getUrlParam('ticket');
if(ticket){
goHome && (window.location.replace((userInfo && userInfo.homePath) || PageEnum.BASE_HOME));
}else{
goHome && (await router.replace((userInfo && userInfo.homePath) || PageEnum.BASE_HOME));
}
- //update-end---author:wangshuai---date:2024-04-03---for:【issues/1102】设置单点登录后页面,进入首页提示404,也没有绘制侧边栏 #1102---
}
return data;
},
@@ -242,10 +233,9 @@ 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---
+ // 代码逻辑说明: 【issues/7488】手机号码登录,在请求头中无法获取租户id---
const { token , userInfo } = data;
this.setTenant(userInfo!.loginTenantId);
- //update-end---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录,在请求头中无法获取租户id---
// save token
this.setToken(token);
return this.afterLoginAction(goHome, data);
@@ -294,12 +284,10 @@ export const useUserStore = defineStore({
}
}
- // //update-begin-author:taoyan date:2022-5-5 for: src/layouts/default/header/index.vue showLoginSelect方法 获取tenantId 退出登录后再次登录依然能获取到值,没有清空
// let username:any = this.userInfo && this.userInfo.username;
// if(username){
// removeAuthCache(username)
// }
- // //update-end-author:taoyan date:2022-5-5 for: src/layouts/default/header/index.vue showLoginSelect方法 获取tenantId 退出登录后再次登录依然能获取到值,没有清空
this.setToken('');
setAuthCache(TOKEN_KEY, null);
@@ -307,28 +295,25 @@ export const useUserStore = defineStore({
this.setUserInfo(null);
this.setLoginInfo(null);
this.setTenant(null);
- // update-begin--author:liaozhiyang---date:20240517---for:【TV360X-23】退出登录后会提示「Token时效,请重新登录」
+ // 代码逻辑说明: 【TV360X-23】退出登录后会提示「Token时效,请重新登录」
setTimeout(() => {
this.setAllDictItems(null);
}, 1e3);
- // update-end--author:liaozhiyang---date:20240517---for:【TV360X-23】退出登录后会提示「Token时效,请重新登录」
- //update-begin-author:liusq date:2022-5-5 for:退出登录后清除拖拽模块的接口前缀
+ // 代码逻辑说明: 退出登录后清除拖拽模块的接口前缀
localStorage.removeItem(JDragConfigEnum.DRAG_BASE_URL);
- //update-end-author:liusq date:2022-5-5 for: 退出登录后清除拖拽模块的接口前缀
//如果开启单点登录,则跳转到单点统一登录中心
const openSso = useGlobSetting().openSso;
if (openSso == 'true') {
await useSso().ssoLoginOut();
}
- //update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
//退出登录的时候需要用的应用id
if(isOAuth2AppEnv()){
let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
removeAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
goLogin && await router.push({ name:"Login",query:{ tenantId:tenantId }})
}else{
- // update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
+ // 代码逻辑说明: 修复登录成功后,没有正确重定向的问题
goLogin && (await router.push({
path: PageEnum.BASE_LOGIN,
query: {
@@ -336,10 +321,8 @@ export const useUserStore = defineStore({
redirect: router.currentRoute.value.fullPath,
}
}));
- // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
}
- //update-end---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
},
/**
* 登录事件
@@ -353,10 +336,9 @@ 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了---
+ // 代码逻辑说明: 【issues/6652】开启租户数据隔离,接入钉钉后登录默认租户为0了---
const { token, userInfo } = data;
this.setTenant(userInfo?.loginTenantId);
- //update-end---author:wangshuai---date:2024-07-01---for:【issues/6652】开启租户数据隔离,接入钉钉后登录默认租户为0了---
// save token
this.setToken(token);
return this.afterLoginAction(goHome, data);
diff --git a/jeecgboot-vue3/src/utils/cache/memory.ts b/jeecgboot-vue3/src/utils/cache/memory.ts
index 20622d53f..a4d89f0b5 100644
--- a/jeecgboot-vue3/src/utils/cache/memory.ts
+++ b/jeecgboot-vue3/src/utils/cache/memory.ts
@@ -101,10 +101,9 @@ export class Memory {
const item = this.cache[key];
item.timeoutId && clearTimeout(item.timeoutId);
});
- //update-begin---author:liusq Date:20220108 for:不删除登录用户的租户id,其他缓存信息都清除----
+ // 代码逻辑说明: 不删除登录用户的租户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,其他缓存信息都清除----
}
}
diff --git a/jeecgboot-vue3/src/utils/cache/persistent.ts b/jeecgboot-vue3/src/utils/cache/persistent.ts
index 7ebb0d961..a89b4f90c 100644
--- a/jeecgboot-vue3/src/utils/cache/persistent.ts
+++ b/jeecgboot-vue3/src/utils/cache/persistent.ts
@@ -60,14 +60,12 @@ function initPersistentMemory() {
export class Persistent {
static getLocal(key: LocalKeys) {
- //update-begin---author:scott ---date:2022-10-27 for:token过期退出重新登录,online菜单还是提示token过期----------
+ // 代码逻辑说明: token过期退出重新登录,online菜单还是提示token过期----------
const globalCache = ls.get(APP_LOCAL_CACHE_KEY);
- // update-begin--author:liaozhiyang---date:20240920---for:【issues/7250】自动锁屏无法解锁
+ // 代码逻辑说明: 【issues/7250】自动锁屏无法解锁
if (globalCache && router?.currentRoute?.value.path !== PageEnum.BASE_LOGIN) {
localMemory.setCache(globalCache);
}
- // update-end--author:liaozhiyang---date:20240920---for:【issues/7250】自动锁屏无法解锁
- //update-end---author:scott ---date::2022-10-27 for:token过期退出重新登录,online菜单还是提示token过期----------
return localMemory.get(key)?.value as Nullable;
}
diff --git a/jeecgboot-vue3/src/utils/cipher.ts b/jeecgboot-vue3/src/utils/cipher.ts
index 9a8a89a91..8d0bb8930 100644
--- a/jeecgboot-vue3/src/utils/cipher.ts
+++ b/jeecgboot-vue3/src/utils/cipher.ts
@@ -5,6 +5,7 @@ import ECB from 'crypto-js/mode-ecb';
import md5 from 'crypto-js/md5';
import UTF8 from 'crypto-js/enc-utf8';
import Base64 from 'crypto-js/enc-base64';
+import CryptoJS from 'crypto-js';
export interface EncryptionParams {
key: string;
@@ -53,3 +54,28 @@ export function decodeByBase64(cipherText: string) {
export function encryptByMd5(password: string) {
return md5(password).toString();
}
+
+// ================== 密码加密相关 ==================
+// 密码加密统一使用 AES CBC 模式,前后端 key 和 iv 必须保持一致
+// AES_KEY 和 AES_IV 需与后端配置完全一致,否则加密/解密会失败
+// ================== 密码加密相关 ===========BEGIN=======
+
+// AES加密key和iv常量
+export const AES_KEY = '1234567890adbcde';
+export const AES_IV = '1234567890hjlkew';
+
+/**
+ * AES CBC 加密,使用全局常量 AES_KEY 和 AES_IV
+ * @param plainText 明文
+ * @returns 加密后的密文
+ */
+export function encryptAESCBC(plainText: string): string {
+ const key = parse(AES_KEY);
+ const iv = parse(AES_IV);
+ return encrypt(plainText, key, {
+ iv: iv,
+ mode: CryptoJS.mode.CBC,
+ padding: pkcs7
+ }).toString();
+}
+// ================== 密码加密相关 =============END=====
diff --git a/jeecgboot-vue3/src/utils/common/compUtils.ts b/jeecgboot-vue3/src/utils/common/compUtils.ts
index 23eac0ca3..20c0b807e 100644
--- a/jeecgboot-vue3/src/utils/common/compUtils.ts
+++ b/jeecgboot-vue3/src/utils/common/compUtils.ts
@@ -2,8 +2,8 @@ import { useGlobSetting } from '/@/hooks/setting';
import { merge, random } from 'lodash-es';
import { isArray } from '/@/utils/is';
import { FormSchema } from '/@/components/Form';
-import { reactive } from "vue";
-import { getTenantId, getToken, getAuthCache, setAuthCache } from "/@/utils/auth";
+import { h, reactive, ref } from "vue";
+import { getTenantId, getToken } from "/@/utils/auth";
import { useUserStoreWithOut } from "/@/store/modules/user";
import dayjs from 'dayjs';
import Big from 'big.js';
@@ -11,6 +11,8 @@ import Big from 'big.js';
import { Modal } from "ant-design-vue";
import { defHttp } from "@/utils/http/axios";
import { useI18n } from "@/hooks/web/useI18n";
+//存放部门路径的数组
+const departNamePath = ref>({});
const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl;
@@ -146,19 +148,16 @@ export function mapTableTotalSummary(tableData: Recordable[], fieldKeys: string[
let totals: any = { _row: '合计', _index: '合计' };
fieldKeys.forEach((key) => {
totals[key] = tableData.reduce((prev, next) => {
- // update-begin--author:liaozhiyang---date:20240118---for:【QQYUN-7891】PR 合计工具方法,转换为Nuber类型再计算
+ // 代码逻辑说明: 【QQYUN-7891】PR 合计工具方法,转换为Nuber类型再计算
const value = Number(next[key]);
if (!Number.isNaN(value)) {
- // update-begin--author:liaozhiyang---date:20250224---for:【issues/7830】合计小数计算精度
+ // 代码逻辑说明: 【issues/7830】合计小数计算精度
prev = Big(prev).plus(value).toString();
- // update-end--author:liaozhiyang---date:20250224---for:【issues/7830】合计小数计算精度
}
- // update-end--author:liaozhiyang---date:20240118---for:【issues/7830】PR 合计工具方法,转换为Nuber类型再计算
return prev;
}, 0);
- // update-begin--author:liaozhiyang---date:20250224---for:【issues/7830】合计小数计算精度
+ // 代码逻辑说明: 【issues/7830】合计小数计算精度
totals[key] = +totals[key];
- // update-end--author:liaozhiyang---date:20250224---for:【issues/7830】合计小数计算精度
});
return totals;
}
@@ -512,12 +511,10 @@ export async function userExitChangeLoginTenantId(tenantId){
let loginTenantId = getTenantId();
userStore.setTenant(currentTenantId);
- //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一致,再刷新---
}
/**
@@ -619,18 +616,91 @@ export function freezeDeep(obj: Recordable | Recordable[]) {
* @return 部门名称
*/
export async function getDepartPathNameByOrgCode(orgCode, label, depId){
- let key:any = "DEPARTNAME" + depId + orgCode;
- let authCache = getAuthCache(key);
- if (authCache) {
- return authCache;
- }
if (orgCode) {
depId = "";
}
let result = await defHttp.get({ url: "/sys/sysDepart/getDepartPathNameByOrgCode", params:{ orgCode: orgCode, depId: depId } }, { isTransformResponse: false });
if (result.success) {
- setAuthCache(key,result.result);
return result.result;
}
return label;
}
+
+/**
+ * 获取部门路径名称
+ * @param title
+ * @param key 部门code或者部门id
+ * @param izOrgCode 是否是机构编码
+ */
+export function getDepartPathName(title,key,izOrgCode) {
+ if (departNamePath.value[key]) {
+ return departNamePath.value[key];
+ }
+ if(izOrgCode){
+ getDepartPathNameByOrgCode(key, title, "").then(result => {
+ departNamePath.value[key] = result;
+ });
+ }else{
+ getDepartPathNameByOrgCode("", title, key).then(result => {
+ departNamePath.value[key] = result;
+ });
+ }
+
+}
+
+/**
+ * 获取多个部门路径名称
+ * @param title
+ * @param id
+ */
+export function getMultiDepartPathName(title,id) {
+ if(!id || id.length === 0){
+ return '';
+ }
+ let postIds:any = "";
+ if(id instanceof Array){
+ postIds = id;
+ } else {
+ postIds = id.split(",")
+ }
+ let postNames = "";
+ postIds.forEach((postId)=>{
+ postNames += getDepartPathName(title,postId,false) + ",";
+ });
+ if(postNames.endsWith(",")){
+ postNames = postNames.substring(0,postNames.length - 1);
+ }
+ return postNames;
+}
+
+/**
+ * 获取部门名称 返回h
+ * @param departNamePath 部门路径
+ */
+export function getDepartName(departNamePath) {
+ if(departNamePath){
+ let names = departNamePath.split(",");
+ let textElements:any = [];
+ for (let i = 0; i < names.length; i++) {
+ textElements.push(h("p", { style: { marginBottom: '2px'} }, names[i]));
+ }
+ // 组合完整内容字符串用于title属性
+ const fullContent = names.join('\n');
+ return h("div",{
+ style: {
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ display: '-webkit-box',
+ WebkitLineClamp: 3,
+ WebkitBoxOrient: 'vertical',
+ lineHeight: '1.5em',
+ maxHeight: '4.5em',
+ width: '100%',
+ whiteSpace: 'normal'
+ },
+ // 鼠标悬停显示全部内容
+ title: fullContent
+ },textElements)
+ }
+ return departNamePath;
+}
\ No newline at end of file
diff --git a/jeecgboot-vue3/src/utils/common/renderUtils.ts b/jeecgboot-vue3/src/utils/common/renderUtils.ts
index 87889a842..1fdcc7881 100644
--- a/jeecgboot-vue3/src/utils/common/renderUtils.ts
+++ b/jeecgboot-vue3/src/utils/common/renderUtils.ts
@@ -84,7 +84,6 @@ const render = {
});
})
);
- //update-end-author:taoyan date:2022-5-24 for: VUEN-1084 【vue3】online表单测试发现的新问题 41、生成的代码,树默认图大小未改
},
/**
* 渲染 Tooltip
diff --git a/jeecgboot-vue3/src/utils/common/vxeUtils.ts b/jeecgboot-vue3/src/utils/common/vxeUtils.ts
index 247f9a86e..3c83f2785 100644
--- a/jeecgboot-vue3/src/utils/common/vxeUtils.ts
+++ b/jeecgboot-vue3/src/utils/common/vxeUtils.ts
@@ -16,7 +16,7 @@ export async function validateFormModelAndTables(validate, formData, cases, prop
// 验证主表表单
validate()
.then(() => {
- //update-begin---author:wangshuai ---date:20220507 for:[VUEN-912]一对多用户组件(所有风格,单表和树没问题)保存报错------------
+ // 代码逻辑说明: [VUEN-912]一对多用户组件(所有风格,单表和树没问题)保存报错------------
for (let data in formData) {
//如果该数据是数组
if (formData[data] instanceof Array) {
@@ -27,13 +27,11 @@ export async function validateFormModelAndTables(validate, formData, cases, prop
}
}
}
- //update-end---author:wangshuai ---date:20220507 for:[VUEN-912]一对多用户组件(所有风格,单表和树没问题)保存报错--------------
resolve(formData);
})
- //update-begin---author:wangshuai---date:2024-06-17---for:【TV360X-1064】非原生提交表单滚动校验没通过的项---
+ // 代码逻辑说明: 【TV360X-1064】非原生提交表单滚动校验没通过的项---
.catch(({ errorFields }) => {
reject({ error: VALIDATE_FAILED, index: 0, errorFields: errorFields });
- //update-end---author:wangshuai---date:2024-06-17---for:【TV360X-1064】非原生提交表单滚动校验没通过的项---
});
});
Object.assign(dataMap, { formValue: values });
@@ -81,9 +79,8 @@ export function validateTables(cases, autoJumpTab = true) {
}
}
// 出现未验证通过的表单,不再进行下一步校验,直接返回失败
- //update-begin-author:liusq date:2024-06-12 for: TV360X-478 一对多tab,校验未通过时,tab没有跳转
+ // 代码逻辑说明: TV360X-478 一对多tab,校验未通过时,tab没有跳转
reject({ error: VALIDATE_FAILED, index, paneKey, errMap, subIndex: index });
- //update-end-author:liusq date:2024-06-12 for: TV360X-478 一对多tab,校验未通过时,tab没有跳转
}
});
})();
diff --git a/jeecgboot-vue3/src/utils/dict/JDictSelectUtil.js b/jeecgboot-vue3/src/utils/dict/JDictSelectUtil.js
index 475c4d882..75354ab56 100644
--- a/jeecgboot-vue3/src/utils/dict/JDictSelectUtil.js
+++ b/jeecgboot-vue3/src/utils/dict/JDictSelectUtil.js
@@ -52,10 +52,9 @@ export function filterDictText(dictOptions, text) {
for (let txt of splitText) {
let dictText = txt;
for (let dictItem of dictOptions) {
- // update-begin--author:liaozhiyang---date:20240524---for:【TV360X-469】兼容数据null值防止报错
+ // 代码逻辑说明: 【TV360X-469】兼容数据null值防止报错
if (dictItem == null) continue;
if (dictItem.value == null) continue;
- // update-end--author:liaozhiyang---date:20240524---for:【TV360X-469】兼容数据null值防止报错
if (txt.toString() === dictItem.value.toString()) {
dictText = dictItem.text || dictItem.title || dictItem.label;
break;
@@ -132,7 +131,6 @@ export function filterDictTextByCache(dictCode, key) {
/** 通过code获取字典数组 */
export async function getDictItems(dictCode, params) {
- // update-begin--author:liaozhiyang---date:20230809---for:【issues/668】JDictSelectUtil数据字典工具类中的getDictItems方法出错
//优先从缓存中读取字典配置
if (getDictItemsByCode(dictCode)) {
let desformDictItems = getDictItemsByCode(dictCode).map((item) => ({
@@ -158,5 +156,4 @@ export async function getDictItems(dictCode, params) {
console.error('getDictItems error: ', res);
return Promise.resolve([]);
});
- // update-end--author:liaozhiyang---date:20230809---for:【issues/668】JDictSelectUtil数据字典工具类中的getDictItems方法出错
}
diff --git a/jeecgboot-vue3/src/utils/dict/index.ts b/jeecgboot-vue3/src/utils/dict/index.ts
index a48d0decf..55024fce8 100644
--- a/jeecgboot-vue3/src/utils/dict/index.ts
+++ b/jeecgboot-vue3/src/utils/dict/index.ts
@@ -8,20 +8,17 @@ import { DB_DICT_DATA_KEY } from '/@/enums/cacheEnum';
* @param code
*/
export const getDictItemsByCode = (code) => {
- // update-begin--author:liaozhiyang---date:20230908---for:【QQYUN-6417】生产环境字典慢的问题
+ // 代码逻辑说明: 【QQYUN-6417】生产环境字典慢的问题
const userStore = useUserStore();
const dictItems = userStore.getAllDictItems;
if (null != dictItems && typeof dictItems === 'object' && dictItems[code]) {
return dictItems[code];
}
- //update-begin-author:liusq---date:2023-10-13--for: 【issues/777】列表 分类字典不显示
//兼容以前的旧写法
if (getAuthCache(DB_DICT_DATA_KEY) && getAuthCache(DB_DICT_DATA_KEY)[code]) {
return getAuthCache(DB_DICT_DATA_KEY)[code];
}
- //update-end-author:liusq---date:2023-10-13--for:【issues/777】列表 分类字典不显示
- // update-end--author:liaozhiyang---date:20230908---for:【QQYUN-6417】生产环境字典慢的问题
};
/**
@@ -52,12 +49,11 @@ export const initDictOptions = (code) => {
});
}
//2.获取字典数组
- //update-begin-author:taoyan date:2022-6-21 for: 字典数据请求前将参数编码处理,但是不能直接编码,因为可能之前已经编码过了
+ // 代码逻辑说明: 字典数据请求前将参数编码处理,但是不能直接编码,因为可能之前已经编码过了
if (code.indexOf(',') > 0 && code.indexOf(' ') > 0) {
// 编码后类似sys_user%20where%20username%20like%20xxx' 是不包含空格的,这里判断如果有空格和逗号说明需要编码处理
code = encodeURI(code);
}
- //update-end-author:taoyan date:2022-6-21 for: 字典数据请求前将参数编码处理,但是不能直接编码,因为可能之前已经编码过了
return defHttp.get({ url: `/sys/dict/getDictItems/${code}` });
};
/**
diff --git a/jeecgboot-vue3/src/utils/encryption/signMd5Utils.js b/jeecgboot-vue3/src/utils/encryption/signMd5Utils.js
index 9b634ac8b..08e0a1c1a 100644
--- a/jeecgboot-vue3/src/utils/encryption/signMd5Utils.js
+++ b/jeecgboot-vue3/src/utils/encryption/signMd5Utils.js
@@ -32,11 +32,10 @@ export default class signMd5Utils {
static getSign(url, requestParams, requestBodyParams) {
let urlParams = this.parseQueryString(url);
let jsonObj = this.mergeObject(urlParams, requestParams);
- //update-begin---author:wangshuai---date:2024-04-16---for:【QQYUN-9005】发送短信加签---
+ // 代码逻辑说明: 【QQYUN-9005】发送短信加签---
if(requestBodyParams){
jsonObj = this.mergeObject(jsonObj, requestBodyParams)
}
- //update-end---author:wangshuai---date:2024-04-16---for:【QQYUN-9005】发送短信加签---
let requestBody = this.sortAsc(jsonObj);
delete requestBody._t;
// console.log('sign requestBody:', requestBody);
@@ -60,11 +59,9 @@ export default class signMd5Utils {
if (lastpathVariable.includes('?')) {
lastpathVariable = lastpathVariable.substring(0, lastpathVariable.indexOf('?'));
}
- //update-begin---author:wangshuai ---date:20221103 for:[issues/183]下拉搜索,使用动态字典,在线页面不报错,生成的代码报错 ------------
//解决Sign 签名校验失败 #2728
//decodeURI对特殊字符没有没有编码和解码的能力,需要使用decodeURIComponent
result['x-path-variable'] = decodeURIComponent(lastpathVariable);
- //update-end---author:wangshuai ---date:20221103 for:[issues/183]下拉搜索,使用动态字典,在线页面不报错,生成的代码报错 ------------
}
if (urlArray && urlArray[1]) {
let paramString = urlArray[1],
diff --git a/jeecgboot-vue3/src/utils/getThemeColorByMenuType.ts b/jeecgboot-vue3/src/utils/getThemeColorByMenuType.ts
new file mode 100644
index 000000000..6c1a9c0bc
--- /dev/null
+++ b/jeecgboot-vue3/src/utils/getThemeColorByMenuType.ts
@@ -0,0 +1,23 @@
+import { MenuTypeEnum } from '/@/enums/menuEnum';
+import { APP_PRESET_COLOR_LIST } from '/@/settings/designSetting';
+
+/**
+ * 根据菜单类型和模式获取对应的主题色
+ * @param menuType 菜单类型
+ */
+export function getThemeColorByMenuType(menuType: MenuTypeEnum): string {
+ if (menuType === MenuTypeEnum.TOP_MENU) {
+ // 顶部栏导航
+ return APP_PRESET_COLOR_LIST[1];
+ } else if (menuType === MenuTypeEnum.MIX) {
+ // 顶部混合菜单使用青绿色主题
+ return APP_PRESET_COLOR_LIST[2];
+ } else if (menuType === MenuTypeEnum.MIX_SIDEBAR) {
+ // 侧边折叠导航模式
+ return APP_PRESET_COLOR_LIST[1];
+ } else if (menuType === MenuTypeEnum.SIDEBAR) {
+ // 侧边栏导航
+ return APP_PRESET_COLOR_LIST[1];
+ }
+ return APP_PRESET_COLOR_LIST[1];
+}
diff --git a/jeecgboot-vue3/src/utils/helper/validator.ts b/jeecgboot-vue3/src/utils/helper/validator.ts
index 02ed2ec92..f17ab661c 100644
--- a/jeecgboot-vue3/src/utils/helper/validator.ts
+++ b/jeecgboot-vue3/src/utils/helper/validator.ts
@@ -126,7 +126,6 @@ export const rules = {
},
};
-//update-begin-author:taoyan date:2022-6-16 for: 代码生成-原生表单用
/**
* 唯一校验函数,给原生使用,vben的表单校验建议使用上述rules
* @param tableName 表名
@@ -152,4 +151,3 @@ export async function duplicateValidate(tableName, fieldName, fieldVal, dataId)
return Promise.reject('校验失败,可能是断网等问题导致的校验失败');
}
}
-//update-end-author:taoyan date:2022-6-16 for: 代码生成-原生表单用
diff --git a/jeecgboot-vue3/src/utils/http/axios/helper.ts b/jeecgboot-vue3/src/utils/http/axios/helper.ts
index a6069c0f7..790cc3d9a 100644
--- a/jeecgboot-vue3/src/utils/http/axios/helper.ts
+++ b/jeecgboot-vue3/src/utils/http/axios/helper.ts
@@ -1,8 +1,7 @@
import { isObject, isString } from '/@/utils/is';
import dayjs from "dayjs";
-// update-begin--author:liaozhiyang---date:20240426---for:【QQYUN-9138】系统用户保存的时间没有秒
+// 代码逻辑说明: 【QQYUN-9138】系统用户保存的时间没有秒
const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss';
-// update-end--author:liaozhiyang---date:20240426---for:【QQYUN-9138】系统用户保存的时间没有秒
export function joinTimestamp(join: boolean, restful: T): T extends true ? string : object;
diff --git a/jeecgboot-vue3/src/utils/http/axios/index.ts b/jeecgboot-vue3/src/utils/http/axios/index.ts
index 20529483d..e6e922f8a 100644
--- a/jeecgboot-vue3/src/utils/http/axios/index.ts
+++ b/jeecgboot-vue3/src/utils/http/axios/index.ts
@@ -92,19 +92,17 @@ const transform: AxiosTransform = {
beforeRequestHook: (config, options) => {
const { apiUrl, joinPrefix, joinParamsToUrl, formatDate, joinTime = true, urlPrefix } = options;
- //update-begin---author:scott ---date:2024-02-20 for:以http开头的请求url,不拼加前缀--
// http开头的请求url,不加前缀
let isStartWithHttp = false;
const requestUrl = config.url;
if(requestUrl!=null && (requestUrl.startsWith("http:") || requestUrl.startsWith("https:"))){
isStartWithHttp = true;
}
- // update-begin--author:sunjianlei---date:20250411---for:【QQYUN-9685】构建 electron 桌面应用
+ // 代码逻辑说明: 【QQYUN-9685】构建 electron 桌面应用
if (!isStartWithHttp && requestUrl != null) {
// 由于electron的url是file://开头的,所以需要判断一下
isStartWithHttp = requestUrl.startsWith('file://');
}
- // update-end----author:sunjianlei---date:20250411---for:【QQYUN-9685】构建 electron 桌面应用
if (!isStartWithHttp && joinPrefix) {
config.url = `${urlPrefix}${config.url}`;
}
@@ -112,7 +110,6 @@ const transform: AxiosTransform = {
if (!isStartWithHttp && apiUrl && isString(apiUrl)) {
config.url = `${apiUrl}${config.url}`;
}
- //update-end---author:scott ---date::2024-02-20 for:以http开头的请求url,不拼加前缀--
const params = config.params || {};
const data = config.data || false;
@@ -147,13 +144,12 @@ const transform: AxiosTransform = {
}
}
- // update-begin--author:sunjianlei---date:220241019---for:【JEECG作为乾坤子应用】作为乾坤子应用启动时,拼接请求路径
+ // 代码逻辑说明: 【JEECG作为乾坤子应用】作为乾坤子应用启动时,拼接请求路径
if (globSetting.isQiankunMicro) {
if (config.url && config.url.startsWith('/')) {
config.url = globSetting.qiankunMicroAppEntry + config.url
}
}
- // update-end--author:sunjianlei---date:220241019---for:【JEECG作为乾坤子应用】作为乾坤子应用启动时,拼接请求路径
return config;
},
@@ -166,18 +162,11 @@ const transform: AxiosTransform = {
const token = getToken();
let tenantId: string | number = getTenantId();
- //update-begin---author:wangshuai---date:2024-04-16---for:【QQYUN-9005】发送短信加签。解决没有token无法加签---
// 将签名和时间戳,添加在请求接口 Header
config.headers[ConfigEnum.TIMESTAMP] = signMd5Utils.getTimestamp();
- //update-begin---author:wangshuai---date:2024-04-25---for: 生成签名的时候复制一份,避免影响原来的参数---
config.headers[ConfigEnum.Sign] = signMd5Utils.getSign(config.url, cloneDeep(config.params), cloneDeep(config.data));
- //update-end---author:wangshuai---date:2024-04-25---for: 生成签名的时候复制一份,避免影响原来的参数---
- //update-end---author:wangshuai---date:2024-04-16---for:【QQYUN-9005】发送短信加签。解决没有token无法加签---
- // update-begin--author:liaozhiyang---date:20240509---for:【issues/1220】登录时,vue3版本不加载字典数据设置无效
- //--update-begin--author:liusq---date:20220325---for: 增加vue3标记
+
config.headers[ConfigEnum.VERSION] = 'v3';
- //--update-end--author:liusq---date:20220325---for:增加vue3标记
- // update-end--author:liaozhiyang---date:20240509---for:【issues/1220】登录时,vue3版本不加载字典数据设置无效
if (token && (config as Recordable)?.requestOptions?.withToken !== false) {
// jwt token
config.headers.Authorization = options.authenticationScheme ? `${options.authenticationScheme} ${token}` : token;
@@ -190,20 +179,19 @@ const transform: AxiosTransform = {
tenantId = 0;
}
- // update-begin--author:sunjianlei---date:220230428---for:【QQYUN-5279】修复分享的应用租户和当前登录租户不一致时,提示404的问题
+ // 代码逻辑说明: 【QQYUN-5279】修复分享的应用租户和当前登录租户不一致时,提示404的问题
const userStore = useUserStoreWithOut();
// 判断是否有临时租户id
if (userStore.hasShareTenantId && userStore.shareTenantId !== 0) {
// 临时租户id存在,使用临时租户id
tenantId = userStore.shareTenantId!;
}
- // 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-begin--author:sunjianlei---date:20220624--for: 添加低代码应用ID
+ // 代码逻辑说明: 添加低代码应用ID
let routeParams = router.currentRoute.value.params;
if (routeParams.appId) {
config.headers[ConfigEnum.X_LOW_APP_ID] = routeParams.appId;
@@ -213,7 +201,6 @@ const transform: AxiosTransform = {
delete routeParams.lowAppFilter;
}
}
- // update-end--author:sunjianlei---date:20220624--for: 添加低代码应用ID
// ========================================================================================
}
diff --git a/jeecgboot-vue3/src/utils/index.ts b/jeecgboot-vue3/src/utils/index.ts
index 60413596c..ca012f53b 100644
--- a/jeecgboot-vue3/src/utils/index.ts
+++ b/jeecgboot-vue3/src/utils/index.ts
@@ -6,9 +6,8 @@ import { unref } from 'vue';
import { isObject, isFunction, isString } from '/@/utils/is';
import Big from 'big.js';
import dayjs from "dayjs";
-// update-begin--author:sunjianlei---date:20220408---for: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下
+// 代码逻辑说明: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下
export const URL_HASH_TAB = `__AGWE4H__HASH__TAG__PWHRG__`;
-// update-end--author:sunjianlei---date:20220408---for: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下
export const noop = () => {};
@@ -41,11 +40,11 @@ export function setObjToUrlParams(baseUrl: string, obj: any): string {
export function deepMerge(src: any = {}, target: any = {}): T {
let key: string;
for (key in target) {
- // update-begin--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化
+ // 代码逻辑说明: 【QQYUN-7872】online表单label较长优化
if (isObject(src[key]) && isObject(target[key])) {
src[key] = deepMerge(src[key], target[key]);
} else {
- // update-begin--author:liaozhiyang---date:20250318---for:【issues/7940】componentProps写成函数形式时,updateSchema写成对象时,参数没合并
+ // 代码逻辑说明: 【issues/7940】componentProps写成函数形式时,updateSchema写成对象时,参数没合并
try {
if (isFunction(src[key]) && isObject(src[key]()) && isObject(target[key])) {
// src[key]是函数且返回对象,且target[key]是对象
@@ -62,9 +61,7 @@ export function deepMerge(src: any = {}, target: any = {}): T {
} catch (error) {
src[key] = target[key];
}
- // update-end--author:liaozhiyang---date:20250318---for:【issues/7940】componentProps写成函数形式时,updateSchema写成对象时,参数没合并
}
- // update-end--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化
}
return src;
}
@@ -98,11 +95,21 @@ export function getDynamicProps(props: T): Partial {
* @updateBy:zyf
*/
export function getValueType(props, field) {
- let formSchema = unref(unref(props)?.schemas);
+ let formSchema = unref(unref(props)?.schemas)
let valueType = 'string';
if (formSchema) {
let schema = formSchema.filter((item) => item.field === field)[0];
- valueType = schema && schema.componentProps && schema.componentProps.valueType ? schema.componentProps.valueType : valueType;
+ // 代码逻辑说明: 【issues/8976】useListPage 查询中componentProps是函数时获取不到valueType
+ if (schema && schema.componentProps) {
+ if (isFunction(schema.componentProps)) {
+ try {
+ const result = schema.componentProps({ schema, tableAction: {}, formModel: {}, formActionType: {} });
+ valueType = result?.valueType ?? valueType;
+ } catch (err) {}
+ } else {
+ valueType = schema.componentProps.valueType ? schema.componentProps.valueType : valueType;
+ }
+ }
}
return valueType;
}
@@ -116,14 +123,15 @@ export function getValueTypeBySchema(schema: FormSchema, formAction: FormActionT
let valueType = 'string';
if (schema) {
const componentProps = formAction.getSchemaComponentProps(schema);
- // update-begin--author:liaozhiyang---date:20250825---for:【issues/8738】componentProps是函数时获取不到valueType
+ // 代码逻辑说明: 【issues/8738】componentProps是函数时获取不到valueType
if (isFunction(componentProps)) {
- const result = componentProps(schema);
- valueType = result?.valueType ?? valueType;
+ try {
+ const result = componentProps({ schema, tableAction: {}, formModel: {}, formActionType: {} });
+ valueType = result?.valueType ?? valueType;
+ } catch (err) {}
} else {
valueType = componentProps?.valueType ? componentProps?.valueType : valueType;
}
- // update-end--author:liaozhiyang---date:20250825---for:【issues/8738】componentProps是函数时获取不到valueType
}
return valueType;
}
@@ -308,9 +316,8 @@ export function numToUpper(value) {
}
};
let lth = value.toString().length;
- // update-begin--author:liaozhiyang---date:20241202---for:【issues/7493】numToUpper方法返回解决错误
+ // 代码逻辑说明: 【issues/7493】numToUpper方法返回解决错误
value = new Big(value).times(100);
- // update-end--author:liaozhiyang---date:20241202---for:【issues/7493】numToUpper方法返回解决错误
value += '';
let length = value.length;
if (lth <= 8) {
@@ -340,7 +347,7 @@ export function numToUpper(value) {
return null;
}
-//update-begin-author:taoyan date:2022-6-8 for:解决老的vue2动态导入文件语法 vite不支持的问题
+// 代码逻辑说明: 解决老的vue2动态导入文件语法 vite不支持的问题
const allModules = import.meta.glob('../views/**/*.vue');
export function importViewsFile(path): Promise {
if (path.startsWith('/')) {
@@ -368,7 +375,6 @@ export function importViewsFile(path): Promise {
}
});
}
-//update-end-author:taoyan date:2022-6-8 for:解决老的vue2动态导入文件语法 vite不支持的问题
/**
@@ -378,10 +384,8 @@ export function importViewsFile(path): Promise {
* @param token
*/
export function goJmReportViewPage(url, id, token) {
- // update-begin--author:liaozhiyang---date:20230904---for:【QQYUN-6390】eval替换成new Function,解决build警告
// URL支持{{ window.xxx }}占位符变量
url = url.replace(/{{([^}]+)?}}/g, (_s1, s2) => _eval(s2))
- // update-end--author:liaozhiyang---date:20230904---for:【QQYUN-6390】eval替换成new Function,解决build警告
if (url.includes('?')) {
url += '&'
} else {
diff --git a/jeecgboot-vue3/src/utils/is.ts b/jeecgboot-vue3/src/utils/is.ts
index ec008fb44..612d1746f 100644
--- a/jeecgboot-vue3/src/utils/is.ts
+++ b/jeecgboot-vue3/src/utils/is.ts
@@ -53,9 +53,8 @@ export function isNumber(val: unknown): val is number {
}
export function isPromise(val: any): val is Promise {
- // update-begin--author:sunjianlei---date:20211022---for: 不能既是 Promise 又是 Object --------
+ // 代码逻辑说明: 不能既是 Promise 又是 Object --------
return is(val, 'Promise') && isFunction(val.then) && isFunction(val.catch);
- // update-end--author:sunjianlei---date:20211022---for: 不能既是 Promise 又是 Object --------
}
export function isString(val: unknown): val is string {
diff --git a/jeecgboot-vue3/src/views/demo/document/table/MultipleTableDemo.vue b/jeecgboot-vue3/src/views/demo/document/table/MultipleTableDemo.vue
new file mode 100644
index 000000000..c0b059230
--- /dev/null
+++ b/jeecgboot-vue3/src/views/demo/document/table/MultipleTableDemo.vue
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+ 测试父表格
+
+
+
+
+
+
+
+ 测试子表格
+
+
+
+
+
+
+
+
+
diff --git a/jeecgboot-vue3/src/views/demo/document/table/index.ts b/jeecgboot-vue3/src/views/demo/document/table/index.ts
index 9069393ec..7d726c8ae 100644
--- a/jeecgboot-vue3/src/views/demo/document/table/index.ts
+++ b/jeecgboot-vue3/src/views/demo/document/table/index.ts
@@ -12,4 +12,5 @@ export { default as InnerTableDemo } from './InnerTableDemo.vue';
export { default as MergeHeaderDemo } from './MergeHeaderDemo.vue';
export { default as MergeTableDemo } from './MergeTableDemo.vue';
export { default as SelectTableDemo } from './SelectTableDemo.vue';
-export { default as TreeTableDemo } from './TreeTableDemo.vue';
\ No newline at end of file
+export { default as TreeTableDemo } from './TreeTableDemo.vue';
+export { default as MultipleTableDemo } from './MultipleTableDemo.vue';
diff --git a/jeecgboot-vue3/src/views/demo/document/table/tabIndex.vue b/jeecgboot-vue3/src/views/demo/document/table/tabIndex.vue
index 261c9c3bd..1033360a1 100644
--- a/jeecgboot-vue3/src/views/demo/document/table/tabIndex.vue
+++ b/jeecgboot-vue3/src/views/demo/document/table/tabIndex.vue
@@ -24,9 +24,10 @@
InnerTableDemo,
MergeHeaderDemo,
MergeTableDemo,
- SelectTableDemo,
- TreeTableDemo,
- } from './index';
+ SelectTableDemo,
+ TreeTableDemo,
+ MultipleTableDemo,
+ } from './index';
export default defineComponent({
name: 'document-table-demo',
components: {
@@ -43,9 +44,10 @@
InnerTableDemo,
MergeHeaderDemo,
MergeTableDemo,
- SelectTableDemo,
- TreeTableDemo,
- },
+ SelectTableDemo,
+ TreeTableDemo,
+ MultipleTableDemo,
+ },
setup() {
//当前选中key
const activeKey = ref('BasicTableDemo');
@@ -64,9 +66,10 @@
{ key: 'MergeHeaderDemo', label: '分组表头示例' },
{ key: 'MergeTableDemo', label: '合并行列' },
{ key: 'SelectTableDemo', label: '可选择表格' },
- { key: 'TreeTableDemo', label: '树形表格' },
- { key: 'AuthColumnDemo', label: '权限列设置' },
- ]);
+ { key: 'TreeTableDemo', label: '树形表格' },
+ { key: 'AuthColumnDemo', label: '权限列设置' },
+ { key: 'MultipleTableDemo', label: '多表格实例' },
+ ]);
//当前选中组件
const currentComponent = computed(() => {
return activeKey.value;
diff --git a/jeecgboot-vue3/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo1.vue b/jeecgboot-vue3/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo1.vue
index 8f382bbef..5544256e7 100644
--- a/jeecgboot-vue3/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo1.vue
+++ b/jeecgboot-vue3/src/views/demo/jeecg/JVxeTableDemo/JVxeDemo1.vue
@@ -310,11 +310,10 @@
console.log('handleValueChange.event: ', event);
}
- // update-begin--author:liaozhiyang---date:20230817---for:【issues/636】JVxeTable加上blur事件
+ // 代码逻辑说明: 【issues/636】JVxeTable加上blur事件
function handleBlur(event){
console.log("blur",event);
}
- // update-end--author:liaozhiyang---date:20230817---for:【issues/636】JVxeTable加上blur事件
/** 表单验证 */
function handleTableCheck() {
tableRef.value!.validateTable().then((errMap) => {
diff --git a/jeecgboot-vue3/src/views/demo/jeecg/JeecgComponents.vue b/jeecgboot-vue3/src/views/demo/jeecg/JeecgComponents.vue
index dab36b5b6..9d15d0b02 100644
--- a/jeecgboot-vue3/src/views/demo/jeecg/JeecgComponents.vue
+++ b/jeecgboot-vue3/src/views/demo/jeecg/JeecgComponents.vue
@@ -25,7 +25,7 @@
@@ -34,7 +34,7 @@
diff --git a/jeecgboot-vue3/src/views/demo/jeecg/Native/one/OneNativeList.vue b/jeecgboot-vue3/src/views/demo/jeecg/Native/one/OneNativeList.vue
index 96545713c..3a9d349d8 100644
--- a/jeecgboot-vue3/src/views/demo/jeecg/Native/one/OneNativeList.vue
+++ b/jeecgboot-vue3/src/views/demo/jeecg/Native/one/OneNativeList.vue
@@ -56,9 +56,7 @@
编辑
-
更多
-
diff --git a/jeecgboot-vue3/src/views/demo/jeecg/Native/one/components/OneNativeForm.vue b/jeecgboot-vue3/src/views/demo/jeecg/Native/one/components/OneNativeForm.vue
index 54f84c083..c98b65fa3 100644
--- a/jeecgboot-vue3/src/views/demo/jeecg/Native/one/components/OneNativeForm.vue
+++ b/jeecgboot-vue3/src/views/demo/jeecg/Native/one/components/OneNativeForm.vue
@@ -269,7 +269,7 @@
return props.formDisabled;
});
const emit = defineEmits(['register', 'ok']);
- //update-begin---author:wangshuai ---date:20220616 for:报表示例验证修改--------------
+ // 代码逻辑说明: 报表示例验证修改--------------
const formState = reactive>({
name: '',
miMa: '',
@@ -303,7 +303,6 @@
yuanjia: '',
nyrsfm: '',
});
- //update-end---author:wangshuai ---date:20220616 for:报表示例验证修改--------------
const { createMessage } = useMessage();
const formRef = ref();
const useForm = Form.useForm;
@@ -349,9 +348,8 @@
yuanjia: [{ required: false, message: '请输入数值!' }],
nyrsfm: [{ required: false, message: '请选择年月日时分秒!' }],
};
- //update-begin---author:wangshuai ---date:20220616 for:报表示例验证修改------------
+ // 代码逻辑说明: 报表示例验证修改------------
const { resetFields, validate, validateInfos } = useForm(formState, validatorRules, { immediate: false });
- //update-end---author:wangshuai ---date:20220616 for:报表示例验证修改------------
const ldzjsOptions = ref([
{ label: '男', value: '1' },
{ label: '女', value: '2' },
@@ -380,7 +378,7 @@
*/
async function submitForm() {
// 触发表单验证
- //update-begin---author:wangshuai ---date:20220616 for:报表示例验证修改------------
+ // 代码逻辑说明: 报表示例验证修改------------
await validate();
confirmLoading.value = true;
let httpurl = '';
@@ -425,7 +423,6 @@
.finally(() => {
confirmLoading.value = false;
});
- //update-end---author:wangshuai ---date:20220616 for:报表示例验证修改--------------
}
/**
diff --git a/jeecgboot-vue3/src/views/demo/page/account/setting/BaseSetting.vue b/jeecgboot-vue3/src/views/demo/page/account/setting/BaseSetting.vue
index 768bab991..3400f706d 100644
--- a/jeecgboot-vue3/src/views/demo/page/account/setting/BaseSetting.vue
+++ b/jeecgboot-vue3/src/views/demo/page/account/setting/BaseSetting.vue
@@ -72,11 +72,10 @@
const userinfo = userStore.getUserInfo;
userinfo.avatar = data;
userStore.setUserInfo(userinfo);
- //update-begin---author:wangshuai ---date:20220909 for:[VUEN-2161]用户设置上传头像成功之后直接保存------------
+ // 代码逻辑说明: [VUEN-2161]用户设置上传头像成功之后直接保存------------
if(data){
defHttp.post({ url: '/sys/user/appEdit', params:{avatar:data} });
}
- //update-end---author:wangshuai ---date:20220909 for:[VUEN-2161]用户设置上传头像成功之后直接保存--------------
}
/**
*更新基本信息
diff --git a/jeecgboot-vue3/src/views/demo/table/EditableCellIdTest.vue b/jeecgboot-vue3/src/views/demo/table/EditableCellIdTest.vue
new file mode 100644
index 000000000..a6f399f3d
--- /dev/null
+++ b/jeecgboot-vue3/src/views/demo/table/EditableCellIdTest.vue
@@ -0,0 +1,252 @@
+
+
+
+
+
+
+
+
+
+
+ 数据源包含:id, name, age, email, address
+ Columns 显示:name, age, email, address(⚠️ 没有 id 列)
+ rowKey 配置:'id'
+
+
+
+
+
+
+
+
+ {{ testResult1.hasId ? '✅ 包含' : '❌ 不包含' }}
+ {{ testResult1.hasId ? `(id=${testResult1.idValue})` : '' }}
+
+
+
+ {{ field }}
+
+
+ {{ testResult1.recordJson }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 如果代码正常:
+ ✅ record 应该包含 id 字段
+ ✅ 可以使用 record.id 进行数据更新
+ ✅ 控制台显示绿色成功消息
+
+
+
+
+
+ 如果存在 Bug:
+ ❌ record 中没有 id 字段
+ ❌ record 只包含 columns 中定义的字段(name, age, email, address)
+ ❌ 无法执行数据更新操作
+ ❌ 控制台显示红色错误消息
+
+
+
+
+ 原代码使用 pick(record, keys) 过滤字段:
+ const keys = columns.map(c => c.dataIndex).filter(f => !!f);
+// keys = ['name', 'age', 'email', 'address'] // ⚠️ 没有 id
+
+record: pick(record, keys)
+// 只保留 keys 中的字段,id 被过滤掉了
+
+
+
+
+
+
+
+
+
+
diff --git a/jeecgboot-vue3/src/views/demo/vextable/OneToOneModal.vue b/jeecgboot-vue3/src/views/demo/vextable/OneToOneModal.vue
index 2f5cd1e5c..abb117ecc 100644
--- a/jeecgboot-vue3/src/views/demo/vextable/OneToOneModal.vue
+++ b/jeecgboot-vue3/src/views/demo/vextable/OneToOneModal.vue
@@ -117,13 +117,10 @@
Object.assign(orderMainModel, data.record);
let params = { id: orderMainModel.id };
const customerList = await orderCustomerList(params);
- //update-begin---author:wangshuai ---date:20220629 for:[VUEN-1484]在一对多示例页面,编辑一行(青岛订单A0001),客户信息无法填入------------
+ // 代码逻辑说明: [VUEN-1484]在一对多示例页面,编辑一行(青岛订单A0001),客户信息无法填入------------
orderMainModel.jeecgOrderCustomerList = customerList[0]?customerList[0]:{};
- //update-end---author:wangshuai ---date:20220629 for:[VUEN-1484]在一对多示例页面,编辑一行(青岛订单A0001),客户信息无法填入--------------
const ticketList = await orderTicketList(params);
- //update-begin---author:wangshuai ---date:20220629 for:[VUEN-1484]在一对多示例页面,编辑一行(青岛订单A0001),客户信息无法填入------------
orderMainModel.jeecgOrderTicketList = ticketList[0]?ticketList[0]:{};
- //update-end---author:wangshuai ---date:20220629 for:[VUEN-1484]在一对多示例页面,编辑一行(青岛订单A0001),客户信息无法填入--------------
}
});
const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
diff --git a/jeecgboot-vue3/src/views/demo/vextable/index.vue b/jeecgboot-vue3/src/views/demo/vextable/index.vue
index efe0f7d68..a4fb4d96d 100644
--- a/jeecgboot-vue3/src/views/demo/vextable/index.vue
+++ b/jeecgboot-vue3/src/views/demo/vextable/index.vue
@@ -87,9 +87,8 @@
//注册table数据
const [registerTable, { reload }, { rowSelection }] = tableContext;
//新增类型
- //update-begin---author:wangshuai ---date:20220720 for:[VUEN-1661]一对多示例,编辑的时候,有时候是一对一,有时候是一对多,默认一对多------------
+ // 代码逻辑说明: [VUEN-1661]一对多示例,编辑的时候,有时候是一对一,有时候是一对多,默认一对多------------
const addType = ref(3);
- //update-end---author:wangshuai ---date:20220720 for:[VUEN-1661]一对多示例,编辑的时候,有时候是一对一,有时候是一对多,默认一对多--------------
//添加事件
function handleCreate(e) {
addType.value = e.key;
diff --git a/jeecgboot-vue3/src/views/demo/vextable/jvxetable/JVxeTableModal.vue b/jeecgboot-vue3/src/views/demo/vextable/jvxetable/JVxeTableModal.vue
index 598074fd3..36b140b5f 100644
--- a/jeecgboot-vue3/src/views/demo/vextable/jvxetable/JVxeTableModal.vue
+++ b/jeecgboot-vue3/src/views/demo/vextable/jvxetable/JVxeTableModal.vue
@@ -1,7 +1,6 @@
-
-
@@ -176,11 +174,10 @@
//刷新列表
emit('success');
}
- // update-begin--author:liaozhiyang---date:20230804---for:【QQYUN-5866】放大行数自适应
+ // 代码逻辑说明: 【QQYUN-5866】放大行数自适应
const handleFullScreen = (val) => {
tableH.value=val ? document.documentElement.clientHeight - 387 : 300;
};
- // update-end--author:liaozhiyang---date:20230804---for:【QQYUN-5866】放大行数自适应
return {
formRef,
activeKey,
diff --git a/jeecgboot-vue3/src/views/monitor/log/index.vue b/jeecgboot-vue3/src/views/monitor/log/index.vue
index 4818b1b93..96e6f3019 100644
--- a/jeecgboot-vue3/src/views/monitor/log/index.vue
+++ b/jeecgboot-vue3/src/views/monitor/log/index.vue
@@ -74,6 +74,7 @@
name:"操作日志",
url: getExportUrl,
params: searchInfo,
+ timeout: 300000, // 设置超时时间为5分钟(300秒)
},
});
@@ -82,7 +83,7 @@
// 日志类型
function tabChange(key) {
searchInfo.logType = key;
- //update-begin---author:wangshuai ---date:20220506 for:[VUEN-943]vue3日志管理列表翻译不对------------
+ // 代码逻辑说明: [VUEN-943]vue3日志管理列表翻译不对------------
if (key == '2') {
logColumns.value = operationLogColumn;
searchSchema.value = operationSearchFormSchema;
@@ -93,7 +94,6 @@
searchSchema.value = searchFormSchema;
logColumns.value = columns;
}
- //update-end---author:wangshuai ---date:20220506 for:[VUEN-943]vue3日志管理列表翻译不对--------------
reload();
}
diff --git a/jeecgboot-vue3/src/views/monitor/mynews/DetailModal.vue b/jeecgboot-vue3/src/views/monitor/mynews/DetailModal.vue
index a8e8062f1..3ccbb2bb6 100644
--- a/jeecgboot-vue3/src/views/monitor/mynews/DetailModal.vue
+++ b/jeecgboot-vue3/src/views/monitor/mynews/DetailModal.vue
@@ -11,10 +11,13 @@
:destroyOnClose="true"
@visible-change="handleVisibleChange"
>
-
-
- 打印
-
+
+ 查看详情
+
+
+ 打印
+
+
@@ -76,6 +79,7 @@
import { useGlobSetting } from '@/hooks/setting';
import { encryptByBase64 } from '@/utils/cipher';
import { getToken } from '@/utils/auth';
+ import {defHttp} from "@/utils/http/axios";
const router = useRouter();
const glob = useGlobSetting();
const isUpdate = ref(true);
@@ -92,21 +96,22 @@
noticeFiles.value = [];
if (unref(isUpdate)) {
//data.record.msgContent = '2323
xss test';
- //update-begin-author:taoyan date:2022-7-14 for: VUEN-1702 【禁止问题】sql注入漏洞
+ // 代码逻辑说明: VUEN-1702 【禁止问题】sql注入漏洞
if (data.record.msgContent) {
- //update-begin---author:wangshuai---date:2023-11-15---for:【QQYUN-7049】3.6.0版本 通知公告中发布的富文本消息,在我的消息中查看没有样式---
+ // 代码逻辑说明: 【QQYUN-7049】3.6.0版本 通知公告中发布的富文本消息,在我的消息中查看没有样式---
data.record.msgContent = xss(data.record.msgContent, options);
- //update-end---author:wangshuai---date:2023-11-15---for:【QQYUN-7049】3.6.0版本 通知公告中发布的富文本消息,在我的消息中查看没有样式---
}
- //update-end-author:taoyan date:2022-7-14 for: VUEN-1702 【禁止问题】sql注入漏洞
- //update-begin-author:liusq---date:2025-06-17--for: [QQYUN-12521]通知公告消息增加访问量
+ // 代码逻辑说明: [QQYUN-12521]通知公告消息增加访问量
if (!data.record?.busId) {
await addVisitsNum({ id: data.record.id });
}
- //update-end-author:liusq---date:2025-06-17--for: [QQYUN-12521]通知公告消息增加访问量
content.value = data.record;
+ if(content.value.sender){
+ const userInfo = await defHttp.get({ url: '/sys/user/queryUserComponentData?isMultiTranslate=true', params: { username: content.value.sender } });
+ content.value.sender = userInfo && userInfo?.records && userInfo?.records.length>0?userInfo.records[0].realname : content.value.sender;
+ }
console.log('data---------->>>', data);
if (data.record?.files && data.record?.files.length > 0) {
noticeFiles.value = data.record.files.split(',').map((item) => {
@@ -300,13 +305,14 @@
.print-btn {
position: absolute;
- top: 80px;
- right: 40px;
+ right: 100px;
+ top: 20px;
cursor: pointer;
color: #a3a3a5;
z-index: 999;
.print-text {
margin-left: 5px;
+ font-size: 14px;
}
&:hover {
color: #40a9ff;
@@ -364,4 +370,17 @@
max-width: 100%;
height: auto;
}
+ .basic-title{
+ position: relative;
+ display: flex;
+ padding-left: 7px;
+ font-size: 16px;
+ font-weight: 500;
+ line-height: 24px;
+ color: rgba(0,0,0,0.88);
+ cursor: move;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+ }
diff --git a/jeecgboot-vue3/src/views/monitor/mynews/index.vue b/jeecgboot-vue3/src/views/monitor/mynews/index.vue
index 99352b0e0..5a15c29cd 100644
--- a/jeecgboot-vue3/src/views/monitor/mynews/index.vue
+++ b/jeecgboot-vue3/src/views/monitor/mynews/index.vue
@@ -1,21 +1,38 @@
-
+
全部标注已读
+
+
+
+
+
+ 删除
+
+
+
+
+ 批量操作
+
+
+
+
+
+
diff --git a/jeecgboot-vue3/src/views/monitor/mynews/mynews.api.ts b/jeecgboot-vue3/src/views/monitor/mynews/mynews.api.ts
index c9c77249c..57e6ec2d9 100644
--- a/jeecgboot-vue3/src/views/monitor/mynews/mynews.api.ts
+++ b/jeecgboot-vue3/src/views/monitor/mynews/mynews.api.ts
@@ -7,6 +7,8 @@ enum Api {
readAllMsg = '/sys/sysAnnouncementSend/readAll',
syncNotic = '/sys/annountCement/syncNotic',
getOne = '/sys/sysAnnouncementSend/getOne',
+ delete = '/sys/sysAnnouncementSend/delete',
+ deleteBatch = '/sys/sysAnnouncementSend/deleteBatch',
}
/**
@@ -59,3 +61,34 @@ export const getOne = (sendId) => {
return defHttp.get({ url: Api.getOne, params:{sendId} });
};
+/**
+ * 删除用户通告阅读标记的数据
+ * @param params
+ * @param handleSuccess
+ */
+export const deleteAnnSend = (params, handleSuccess) =>{
+ return defHttp.delete({ url: Api.delete, params }, { joinParamsToUrl: true }).then(()=>{
+ handleSuccess();
+ })
+}
+
+/**
+ * 批量删除用户通告阅读标记的数据
+ * @param params
+ * @param handleSuccess
+ */
+export const deleteBatchAnnSend = (params, handleSuccess) =>{
+ Modal.confirm({
+ iconType: 'warning',
+ title: '确认删除',
+ content: '是否删除选中数据',
+ okText: '确认',
+ cancelText: '取消',
+ onOk: () => {
+ return defHttp.delete({ url: Api.deleteBatch, params }, { joinParamsToUrl: true }).then(()=>{
+ handleSuccess();
+ })
+ },
+ });
+}
+
diff --git a/jeecgboot-vue3/src/views/monitor/mynews/mynews.data.ts b/jeecgboot-vue3/src/views/monitor/mynews/mynews.data.ts
index a2617ba1c..3af216b48 100644
--- a/jeecgboot-vue3/src/views/monitor/mynews/mynews.data.ts
+++ b/jeecgboot-vue3/src/views/monitor/mynews/mynews.data.ts
@@ -89,6 +89,12 @@ export const searchFormSchema: FormSchema[] = [
options: [
{ label: '通知公告', value: '1' },
{ label: '系统消息', value: '2' },
+ { label: '日程计划', value: 'plan' },
+ { label: '流程消息', value: 'flow' },
+ { label: '会议', value: 'meeting' },
+ { label: '知识库', value: 'file' },
+ { label: '协同通知', value: 'collab' },
+ { label: '督办通知', value: 'supe' },
],
},
colProps: { span: 6 },
diff --git a/jeecgboot-vue3/src/views/monitor/quartz/QuartzModal.vue b/jeecgboot-vue3/src/views/monitor/quartz/QuartzModal.vue
index bbf18cd4c..ab6c6ff5f 100644
--- a/jeecgboot-vue3/src/views/monitor/quartz/QuartzModal.vue
+++ b/jeecgboot-vue3/src/views/monitor/quartz/QuartzModal.vue
@@ -18,9 +18,8 @@
// labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
- // update-begin--author:liaozhiyang---date:20231017---for:【issues/790】弹窗内文本框不居中问题
+ // 代码逻辑说明: 【issues/790】弹窗内文本框不居中问题
labelWidth: 100,
- // update-end--author:liaozhiyang---date:20231017---for:【issues/790】弹窗内文本框不居中问题
});
//表单赋值
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
diff --git a/jeecgboot-vue3/src/views/monitor/redis/index.vue b/jeecgboot-vue3/src/views/monitor/redis/index.vue
index 89e1f59e7..a25e44064 100644
--- a/jeecgboot-vue3/src/views/monitor/redis/index.vue
+++ b/jeecgboot-vue3/src/views/monitor/redis/index.vue
@@ -203,9 +203,8 @@
initCharts();
openTimer();
});
- // update-begin--author:liaozhiyang---date:220230719---for:【issues-615】系统监控中的REDIS监控页面打开,再关闭后,没有关闭计时器
+ // 代码逻辑说明: 【issues-615】系统监控中的REDIS监控页面打开,再关闭后,没有关闭计时器
onUnmounted(() => {
closeTimer();
});
- // update-end--author:liaozhiyang---date:220230719---for:【issues-615】系统监控中的REDIS监控页面打开,再关闭后,没有关闭计时器
diff --git a/jeecgboot-vue3/src/views/monitor/route/RouteModal.vue b/jeecgboot-vue3/src/views/monitor/route/RouteModal.vue
index 3fd0764f7..9250faba0 100644
--- a/jeecgboot-vue3/src/views/monitor/route/RouteModal.vue
+++ b/jeecgboot-vue3/src/views/monitor/route/RouteModal.vue
@@ -112,12 +112,10 @@
diff --git a/jeecgboot-vue3/src/views/monitor/server/index.vue b/jeecgboot-vue3/src/views/monitor/server/index.vue
index 544b3a620..ee5aada1b 100644
--- a/jeecgboot-vue3/src/views/monitor/server/index.vue
+++ b/jeecgboot-vue3/src/views/monitor/server/index.vue
@@ -11,9 +11,7 @@
-
-
上次更新时间:{{ lastUpdateTime }}
diff --git a/jeecgboot-vue3/src/views/super/airag/aiapp/chat/AiChat.vue b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/AiChat.vue
index f7f4e0af1..adbfd04a8 100644
--- a/jeecgboot-vue3/src/views/super/airag/aiapp/chat/AiChat.vue
+++ b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/AiChat.vue
@@ -31,8 +31,20 @@
:chatTitle="chatTitle"
:quickCommandData="quickCommandData"
:showAdvertising = "showAdvertising"
+ :hasExtraFlowInputs="hasExtraFlowInputs"
+ :conversationSettings="getCurrentSettings"
+ @edit-settings="handleEditSettings"
+ ref="chatRef"
>
+
+
@@ -41,8 +53,9 @@
+
diff --git a/jeecgboot-vue3/src/views/super/airag/aiapp/chat/chat.vue b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/chat.vue
index 72689b882..73c1d670e 100644
--- a/jeecgboot-vue3/src/views/super/airag/aiapp/chat/chat.vue
+++ b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/chat.vue
@@ -2,13 +2,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jeecgboot-vue3/src/views/system/tenant/pack/TenantDefaultPackList.vue b/jeecgboot-vue3/src/views/system/tenant/pack/TenantDefaultPackList.vue
index fe6330e47..7aba73579 100644
--- a/jeecgboot-vue3/src/views/system/tenant/pack/TenantDefaultPackList.vue
+++ b/jeecgboot-vue3/src/views/system/tenant/pack/TenantDefaultPackList.vue
@@ -2,7 +2,7 @@
- + 默认套餐
+ 租户默认套餐
批量删除
+
+ 租户默认套餐是指新建租户时自动拥有的基础套餐,所有租户都将继承这些套餐权限
+
@@ -19,6 +22,7 @@
+
diff --git a/jeecgboot-vue3/src/views/system/tenant/pack/TenantPackList.vue b/jeecgboot-vue3/src/views/system/tenant/pack/TenantPackList.vue
index 57c61ac6c..23d41f715 100644
--- a/jeecgboot-vue3/src/views/system/tenant/pack/TenantPackList.vue
+++ b/jeecgboot-vue3/src/views/system/tenant/pack/TenantPackList.vue
@@ -26,6 +26,7 @@
+
diff --git a/jeecgboot-vue3/src/views/system/tenant/pack/TenantPackMenuModal.vue b/jeecgboot-vue3/src/views/system/tenant/pack/TenantPackMenuModal.vue
index b64d52b80..f2f640b7c 100644
--- a/jeecgboot-vue3/src/views/system/tenant/pack/TenantPackMenuModal.vue
+++ b/jeecgboot-vue3/src/views/system/tenant/pack/TenantPackMenuModal.vue
@@ -22,6 +22,8 @@
const tenantId = ref
();
//套餐包类型
const packType = ref();
+ //权限
+ const permissionIds = ref();
//表单赋值
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
//重置表单
@@ -35,12 +37,12 @@
//表单赋值
console.log(data.record)
await setFieldsValue({ ...data.record });
+ permissionIds.value = data.record.permissionIds;
}
- //update-begin---author:wangshuai ---date:20230705 for:【QQYUN-5685】2 套餐包增加一个查看:添加底部有没有按钮及表单禁用------------
+ // 代码逻辑说明: 【QQYUN-5685】2 套餐包增加一个查看:添加底部有没有按钮及表单禁用------------
setModalProps({ confirmLoading: false, showCancelBtn:!!data?.showFooter, showOkBtn:!!data?.showFooter });
// 隐藏底部时禁用整个表单
setProps({ disabled: !data?.showFooter })
- //update-end---author:wangshuai ---date:20230705 for:【QQYUN-5685】2 套餐包增加一个查看:添加底部有没有按钮及表单禁用------------
});
//设置标题
const title = computed(() => (unref(isUpdate) ? '编辑 租户套餐' : '新增 租户套餐'));
@@ -55,6 +57,7 @@
}else{
values.tenantId = 0;
}
+ values.permissionIds = permissionIds.value;
if (!unref(isUpdate)) {
await addPackPermission(values);
} else {
diff --git a/jeecgboot-vue3/src/views/system/tenant/tenant.api.ts b/jeecgboot-vue3/src/views/system/tenant/tenant.api.ts
index f82c14a04..0844de84d 100644
--- a/jeecgboot-vue3/src/views/system/tenant/tenant.api.ts
+++ b/jeecgboot-vue3/src/views/system/tenant/tenant.api.ts
@@ -33,6 +33,8 @@ enum Api {
editUser = '/sys/user/editTenantUser',
//根据租户id和用户获取用户的产品包列表和当前用户下的产品包id
listPackByTenantUserId = '/sys/tenant/listPackByTenantUserId',
+ // 获取菜单权限
+ queryPremTreeList = '/sys/role/queryTreeList',
}
/**
@@ -263,3 +265,10 @@ export const saveOrUpdateTenantUser = (params, isUpdate) => {
export const listPackByTenantUserId = (params) => {
return defHttp.get({ url: Api.listPackByTenantUserId, params });
}
+
+/**
+ * 获取菜单树
+ */
+export const queryPremTreeList = () =>{
+ return defHttp.get({ url: Api.queryPremTreeList });
+}
diff --git a/jeecgboot-vue3/src/views/system/tenant/tenant.data.ts b/jeecgboot-vue3/src/views/system/tenant/tenant.data.ts
index 199cc26aa..a91a0c02c 100644
--- a/jeecgboot-vue3/src/views/system/tenant/tenant.data.ts
+++ b/jeecgboot-vue3/src/views/system/tenant/tenant.data.ts
@@ -391,7 +391,7 @@ export const packMenuFormSchema: FormSchema[] = [
label: '套餐包名称',
component: 'Input',
},
- {
+/* {
field: 'permissionIds',
label: '授权菜单',
component: 'JTreeSelect',
@@ -405,7 +405,7 @@ export const packMenuFormSchema: FormSchema[] = [
converIsLeafVal: 0,
getPopupContainer: () => document.body,
},
- },
+ },*/
{
field: 'remarks',
label: '备注说明',
diff --git a/jeecgboot-vue3/src/views/system/user/UserDrawer.vue b/jeecgboot-vue3/src/views/system/user/UserDrawer.vue
index b38248735..697df062f 100644
--- a/jeecgboot-vue3/src/views/system/user/UserDrawer.vue
+++ b/jeecgboot-vue3/src/views/system/user/UserDrawer.vue
@@ -71,11 +71,9 @@
}
//负责部门/赋值
data.record.departIds && !Array.isArray(data.record.departIds) && (data.record.departIds = data.record.departIds.split(','));
- //update-begin---author:zyf Date:20211210 for:避免空值显示异常------------
- //update-begin---author:liusq Date:20231008 for:[issues/772]避免空值显示异常------------
+ // 代码逻辑说明: [issues/772]避免空值显示异常------------
data.record.departIds = (!data.record.departIds || data.record.departIds == '') ? [] : data.record.departIds;
- //update-end-----author:liusq Date:20231008 for:[issues/772]避免空值显示异常------------
- //update-begin---author:zyf Date:20211210 for:避免空值显示异常------------
+ data.record.sort = data.record.sort ? data.record.sort: 1000;
}
//处理角色用户列表情况(和角色列表有关系)
data.selectedroles && (await setFieldsValue({ selectedroles: data.selectedroles }));
@@ -108,27 +106,23 @@
{
field: 'selectedroles',
show: !data?.departDisabled,
- //update-begin---author:wangshuai ---date:20230424 for:【issues/4844】多租户模式下,新增或编辑用户,选择角色一栏,角色选项没有做租户隔离------------
//判断是否为多租户模式
componentProps:{
api: data.tenantSaas?getAllRolesList:getAllRolesListNoByTenant
}
- //update-end---author:wangshuai ---date:20230424 for:【issues/4844】多租户模式下,新增或编辑用户,选择角色一栏,角色选项没有做租户隔离------------
},
- //update-begin---author:wangshuai ---date:20230522 for:【issues/4935】租户用户编辑界面中租户下拉框未过滤,显示当前系统所有的租户------------
+ // 代码逻辑说明: 【issues/4935】租户用户编辑界面中租户下拉框未过滤,显示当前系统所有的租户------------
{
field: 'relTenantIds',
componentProps:{
disabled: !!data.tenantSaas,
},
},
- //update-end---author:wangshuai ---date:20230522 for:【issues/4935】租户用户编辑界面中租户下拉框未过滤,显示当前系统所有的租户------------
]);
- //update-begin---author:wangshuai ---date:20230522 for:【issues/4935】租户用户编辑界面中租户下拉框未过滤,显示当前系统所有的租户------------
+ // 代码逻辑说明: 【issues/4935】租户用户编辑界面中租户下拉框未过滤,显示当前系统所有的租户------------
if(!unref(isUpdate) && data.tenantSaas){
await setFieldsValue({ relTenantIds: getTenantId().toString() })
}
- //update-end---author:wangshuai ---date:20230522 for:【issues/4935】租户用户编辑界面中租户下拉框未过滤,显示当前系统所有的租户------------
// 无论新增还是编辑,都可以设置表单值
if (typeof data.record === 'object') {
setFieldsValue({
@@ -136,9 +130,8 @@
});
}
// 隐藏底部时禁用整个表单
- //update-begin-author:taoyan date:2022-5-24 for: VUEN-1117【issue】0523周开源问题
+ // 代码逻辑说明: VUEN-1117【issue】0523周开源问题
setProps({ disabled: !showFooter.value });
- //update-end-author:taoyan date:2022-5-24 for: VUEN-1117【issue】0523周开源问题
if(unref(isUpdate)){
updateSchema([
//修改主岗位和兼职岗位的参数
@@ -162,13 +155,12 @@
});
//获取标题
const getTitle = computed(() => {
- // update-begin--author:liaozhiyang---date:20240306---for:【QQYUN-8389】系统用户详情抽屉title更改
+ // 代码逻辑说明: 【QQYUN-8389】系统用户详情抽屉title更改
if (!unref(isUpdate)) {
return '新增用户';
} else {
return unref(showFooter) ? '编辑用户' : '用户详情';
}
- // update-end--author:liaozhiyang---date:20240306---for:【QQYUN-8389】系统用户详情抽屉title更改
});
const { adaptiveWidth } = useDrawerAdaptiveWidth();
@@ -196,3 +188,8 @@
}
}
+
diff --git a/jeecgboot-vue3/src/views/system/user/UserRecycleBinModal.vue b/jeecgboot-vue3/src/views/system/user/UserRecycleBinModal.vue
index 7b709f1e0..31a0f3042 100644
--- a/jeecgboot-vue3/src/views/system/user/UserRecycleBinModal.vue
+++ b/jeecgboot-vue3/src/views/system/user/UserRecycleBinModal.vue
@@ -69,7 +69,7 @@
fixed: undefined,
},
});
- // update-begin--author:liaozhiyang---date:20240704---for:【TV360X-1657】系统用户回收站弹窗分页展示在可视区内
+ // 代码逻辑说明: 【TV360X-1657】系统用户回收站弹窗分页展示在可视区内
const handleFullScreen = (maximize) => {
setTableHeight(maximize);
};
@@ -95,7 +95,6 @@
},
{ deep: true }
);
- // update-end--author:liaozhiyang---date:20240704---for:【TV360X-1657】系统用户回收站弹窗分页展示在可视区内
/**
* 选择列配置
*/
diff --git a/jeecgboot-vue3/src/views/system/user/index.vue b/jeecgboot-vue3/src/views/system/user/index.vue
index fade40b15..cb976d254 100644
--- a/jeecgboot-vue3/src/views/system/user/index.vue
+++ b/jeecgboot-vue3/src/views/system/user/index.vue
@@ -24,10 +24,14 @@
解冻
+
+
+ 重置密码
+
批量操作
+ >批量操作
@@ -62,12 +66,13 @@
import { useModal } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage';
import { columns, searchFormSchema } from './user.data';
- import { listNoCareTenant, deleteUser, batchDeleteUser, getImportUrl, getExportUrl, frozenBatch } from './user.api';
+ import { listNoCareTenant, deleteUser, batchDeleteUser, getImportUrl, getExportUrl, frozenBatch, resetPassword } from './user.api';
import { usePermission } from '/@/hooks/web/usePermission';
import ImportExcelProgress from './components/ImportExcelProgress.vue';
const { createMessage, createConfirm } = useMessage();
- const { isDisabledAuth } = usePermission();
+ const { isDisabledAuth, hasPermission } = usePermission();
+
//注册drawer
const [registerDrawer, { openDrawer }] = useDrawer();
//回收站model
@@ -99,6 +104,10 @@
beforeFetch: (params) => {
return Object.assign({ column: 'createTime', order: 'desc' }, params);
},
+ defSort: {
+ column: "",
+ order: ""
+ },
},
exportConfig: {
name: '用户列表',
@@ -110,7 +119,7 @@
});
//注册table数据
- const [registerTable, { reload, updateTableDataRecord }, { rowSelection, selectedRows, selectedRowKeys }] = tableContext;
+ const [registerTable, { reload, updateTableDataRecord, clearSelectedRowKeys }, { rowSelection, selectedRows, selectedRowKeys }] = tableContext;
/**
* 新增事件
@@ -209,6 +218,28 @@
},
});
}
+ /**
+ * 批量重置密码
+ */
+ function batchResetPassword() {
+ let hasAdmin = selectedRows.value.filter((item) => item.username == 'admin');
+ if (unref(hasAdmin).length > 0) {
+ createMessage.warning('所选用户中包含管理员,管理员账号不允许重置密码!!');
+ return;
+ }
+ if (selectedRows.value.length > 0) {
+ createConfirm({
+ iconType: 'warning',
+ title: '确认操作',
+ content: '是否重置选中的账号密码?',
+ onOk: async () => {
+ const usernames = selectedRows.value.map((item) => item.username).join(',');
+ await resetPassword({ usernames: usernames }, ()=>{reload();clearSelectedRowKeys();});
+ },
+ });
+ }
+ }
+
/**
*同步钉钉和微信回调
diff --git a/jeecgboot-vue3/src/views/system/user/user.api.ts b/jeecgboot-vue3/src/views/system/user/user.api.ts
index 09c7ace90..f12d97596 100644
--- a/jeecgboot-vue3/src/views/system/user/user.api.ts
+++ b/jeecgboot-vue3/src/views/system/user/user.api.ts
@@ -26,8 +26,10 @@ enum Api {
userQuitAgent = '/sys/user/userQuitAgent',
getQuitList = '/sys/user/getQuitList',
putCancelQuit = '/sys/user/putCancelQuit',
+ resetPassword = '/sys/user/resetPassword',
updateUserTenantStatus='/sys/tenant/updateUserTenantStatus',
getUserTenantPageList='/sys/tenant/getUserTenantPageList',
+ getDepPostIdByDepId = '/sys/sysDepart/getDepPostIdByDepId',
}
/**
* 导出api
@@ -193,6 +195,15 @@ export const frozenBatch = (params, handleSuccess) => {
handleSuccess();
});
};
+/**
+ * 重置密码
+ * @param params
+ */
+export const resetPassword = (params, handleSuccess) => {
+ return defHttp.put({ url: Api.resetPassword, params },{joinParamsToUrl: true}).then(() => {
+ handleSuccess();
+ });
+};
/**
@@ -227,3 +238,12 @@ export const getUserTenantPageList = (params) => {
export const updateUserTenantStatus = (params) => {
return defHttp.put({ url: Api.updateUserTenantStatus, params }, { joinParamsToUrl: true, isTransformResponse: false });
};
+
+/**
+ * 根据部门id和已选中的部门岗位id获取部门下的岗位id
+ *
+ * @param params
+ */
+export const getDepPostIdByDepId = (params) => {
+ return defHttp.get({ url: Api.getDepPostIdByDepId, params },{ isTransformResponse: false });
+};
diff --git a/jeecgboot-vue3/src/views/system/user/user.data.ts b/jeecgboot-vue3/src/views/system/user/user.data.ts
index 620661ace..a9693568d 100644
--- a/jeecgboot-vue3/src/views/system/user/user.data.ts
+++ b/jeecgboot-vue3/src/views/system/user/user.data.ts
@@ -1,8 +1,11 @@
import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
-import { getAllRolesListNoByTenant, getAllTenantList } from './user.api';
+import { getAllRolesListNoByTenant, getDepPostIdByDepId } from './user.api';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
+import { getDepartPathNameByOrgCode, getDepartName, getMultiDepartPathName, getDepartPathName } from '@/utils/common/compUtils';
+import { h } from 'vue';
+import { Tag } from 'ant-design-vue';
export const columns: BasicColumn[] = [
{
title: '用户账号',
@@ -14,12 +17,12 @@ export const columns: BasicColumn[] = [
dataIndex: 'realname',
width: 100,
},
- {
+/* {
title: '头像',
dataIndex: 'avatar',
width: 120,
customRender: render.renderAvatar,
- },
+ },*/
{
title: '性别',
dataIndex: 'sex',
@@ -29,30 +32,62 @@ export const columns: BasicColumn[] = [
return render.renderDict(text, 'sex');
},
},
- {
+/* {
title: '生日',
dataIndex: 'birthday',
width: 100,
- },
+ },*/
{
title: '手机号',
dataIndex: 'phone',
width: 100,
+ customRender:( { record, text })=>{
+ if(record.izHideContact && record.izHideContact === '1'){
+ return '/';
+ }
+ return text;
+ }
},
{
title: '部门',
width: 150,
- dataIndex: 'orgCodeTxt',
+ dataIndex: 'belongDepIds',
+ customRender:( { record, text })=>{
+ if(!text){
+ return '';
+ }
+ return getDepartName(getMultiDepartPathName(record.orgCodeTxt,text));
+ }
},
{
title: '负责部门',
width: 150,
- dataIndex: 'departIds_dictText',
+ dataIndex: 'departIds',
+ customRender:( { record, text })=>{
+ if(!text){
+ return '';
+ }
+ return getDepartName(getMultiDepartPathName(record.departIds_dictText,text));
+ }
},
{
title: '主岗位',
width: 150,
- dataIndex: 'mainDepPostId_dictText',
+ dataIndex: 'mainDepPostId',
+ customRender: ({ record, text })=>{
+ return getDepartName(getDepartPathName(record.mainDepPostId_dictText,text,false));
+ }
+ },
+ {
+ title: '兼职岗位',
+ width: 150,
+ dataIndex: 'otherDepPostId',
+ customRender:({ record, text })=>{
+ if(!text){
+ return '';
+ }
+ return getDepartName(getMultiDepartPathName(record.otherDepPostId_dictText,text));
+ }
},
{
title: '状态',
@@ -130,6 +165,16 @@ export const searchFormSchema: FormSchema[] = [
},
//colProps: { span: 6 },
},
+ {
+ label: '所属部门',
+ field: 'departId',
+ component: 'JSelectDept',
+ componentProps: {
+ placeholder: '请选择所属部门',
+ showButton: false,
+ checkStrictly: true
+ },
+ },
];
export const formSchema: FormSchema[] = [
@@ -163,7 +208,7 @@ export const formSchema: FormSchema[] = [
},
{
pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
- message: '密码由8位数字、大小写字母和特殊符号组成!',
+ message: '密码由 8 位及以上数字、大小写字母和特殊符号组成!',
},
],
},
@@ -201,7 +246,8 @@ export const formSchema: FormSchema[] = [
required: false,
component: 'JDictSelectTag',
componentProps: {
- dictCode: "user_position"
+ dictCode: "user_position",
+ mode: 'multiple',
},
},
{
@@ -230,10 +276,6 @@ export const formSchema: FormSchema[] = [
const { updateSchema } = formActionType;
//所属部门修改后更新负责部门下拉框数据
updateSchema([
- {
- field: 'departIds',
- componentProps: { options },
- },
//修改主岗位和兼职岗位的参数
{
field: 'mainDepPostId',
@@ -244,17 +286,21 @@ export const formSchema: FormSchema[] = [
componentProps: { params: { departIds: values?values.value.join(","): "" } },
}
]);
- //update-begin---author:wangshuai---date:2024-05-11---for:【issues/1222】用户编辑界面“所属部门”与“负责部门”联动出错整---
+ //更新负责部门的option
+ updateDepartOption(options, updateSchema);
if(!values){
formModel.departIds = [];
formModel.mainDepPostId = "";
formModel.otherDepPostId = "";
return;
}
- //update-end---author:wangshuai---date:2024-05-11---for:【issues/1222】用户编辑界面“所属部门”与“负责部门”联动出错整---
//所属部门修改后更新负责部门数据
formModel.departIds && (formModel.departIds = formModel.departIds.filter((item) => values.value.indexOf(item) > -1));
},
+ onChange: async (values) => {
+ // 当所属部门发生改变时,需要取消主岗位和兼职岗位的选中值
+ await removeDepPostByDepId(formModel, values, formActionType);
+ }
};
},
},
@@ -264,7 +310,8 @@ export const formSchema: FormSchema[] = [
component: 'JSelectDepartPost',
componentProps: {
rowKey: 'id',
- multiple: false
+ multiple: false,
+ izShowDepPath: true,
},
ifShow: ({ values }) => {
if(!values.selecteddeparts){
@@ -279,6 +326,7 @@ export const formSchema: FormSchema[] = [
component: 'JSelectDepartPost',
componentProps: {
rowKey: 'id',
+ izShowDepPath: true,
},
ifShow: ({ values }) => {
if(!values.selecteddeparts){
@@ -320,9 +368,49 @@ export const formSchema: FormSchema[] = [
component: 'Select',
componentProps: {
mode: 'multiple',
+ tagRender: ({ label, value, closable, onClose }) => {
+ // 计算显示文本:前面省略号 + 后面字符
+ let displayLabel = label;
+ if(displayLabel && label.length >= 20) {
+ displayLabel = "..." + displayLabel.substring(label.length - 20);
+ }
+ return h(Tag, {
+ style: {
+ position: 'relative',
+ boxSizing: 'border-box',
+ height: '24px',
+ marginTop: '2px',
+ fontSize: '14px',
+ marginBottom: '2px',
+ lineHeight: '22px',
+ background: 'rgba(51, 51, 51, 0.06)',
+ border: '1px solid rgba(5, 5, 5, 0.06)',
+ borderRadius: '4px',
+ cursor: 'default'
+ },
+ title: label,
+ closable,
+ onClose:(e)=>{
+ e.stopPropagation();
+ onClose();
+ }
+ }, () => displayLabel);
+ }
},
ifShow: ({ values }) => values.userIdentity == 2,
},
+ {
+ label: '排序',
+ field: 'sort',
+ component: 'InputNumber',
+ defaultValue: 1000,
+ componentProps: {
+ min: 1,
+ max: 999999,
+ step: 1,
+ precision: 0
+ }
+ },
{
label: '头像',
field: 'avatar',
@@ -387,6 +475,16 @@ export const formSchema: FormSchema[] = [
stringToNumber: true,
},
},
+ {
+ label: '隐藏联系方式',
+ field: 'izHideContact',
+ defaultValue: '0',
+ component: 'JDictSelectTag',
+ componentProps: {
+ dictCode: 'yn',
+ type: 'radio',
+ },
+ },
];
export const formPasswordSchema: FormSchema[] = [
@@ -410,7 +508,7 @@ export const formPasswordSchema: FormSchema[] = [
},
{
pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
- message: '密码由8位数字、大小写字母和特殊符号组成!',
+ message: '密码由 8 位及以上数字、大小写字母和特殊符号组成!',
},
],
},
@@ -423,7 +521,6 @@ export const formPasswordSchema: FormSchema[] = [
];
-
//租户用户列表
export const userTenantColumns: BasicColumn[] = [
{
@@ -494,3 +591,105 @@ export const userTenantFormSchema: FormSchema[] = [
colProps: { span: 6 },
},
];
+
+
+/**
+ * 删除非当前部门下的数据
+ * 当所属部门发生改变时,取消主岗位和兼职岗位的选中值
+ *
+ * @param formModel 表单模型
+ * @param values 选中的部门值
+ * @param formActionType 表单操作方法
+ */
+async function removeDepPostByDepId(formModel, values, formActionType) {
+ const { setFieldsValue } = formActionType;
+ if (values) {
+ let departIds = "";
+ if (values instanceof Array) {
+ departIds = values.join(",");
+ } else {
+ departIds = values;
+ }
+ if (departIds) {
+ try {
+ // 查询当前选中部门下的岗位ID
+ const { result } = await getDepPostIdByDepId({ depIds: departIds });
+ const validPostIds = result.split(",") || [];
+
+ // 检查主岗位是否在当前部门下
+ if (formModel.mainDepPostId) {
+ const mainPostId = Array.isArray(formModel.mainDepPostId)
+ ? formModel.mainDepPostId[0]
+ : formModel.mainDepPostId;
+
+ if (mainPostId && !validPostIds.includes(mainPostId)) {
+ // 主岗位不在当前部门下,清空主岗位
+ setFieldsValue({ mainDepPostId: null });
+ formModel.mainDepPostId = null;
+ }
+ }
+
+ // 检查兼职岗位是否在当前部门下
+ if(typeof formModel.otherDepPostId === "string"){
+ formModel.otherDepPostId = formModel.otherDepPostId.split(",");
+ }
+ if (formModel.otherDepPostId && Array.isArray(formModel.otherDepPostId)) {
+ const validOtherPosts = formModel.otherDepPostId.filter(postId =>
+ validPostIds.includes(postId)
+ );
+ // 有兼职岗位不在当前部门下,更新兼职岗位
+ setFieldsValue({ otherDepPostId: validOtherPosts });
+ formModel.otherDepPostId = validOtherPosts;
+ }
+ } catch (error) {
+ console.error('查询部门岗位失败:', error);
+ // 查询失败时,清空所有岗位选择
+ setFieldsValue({
+ mainDepPostId: null,
+ otherDepPostId: []
+ });
+ formModel.mainDepPostId = null;
+ formModel.otherDepPostId = [];
+ }
+ } else {
+ // 没有选中部门时,清空所有岗位选择
+ setFieldsValue({
+ mainDepPostId: null,
+ otherDepPostId: []
+ });
+ formModel.mainDepPostId = null;
+ formModel.otherDepPostId = [];
+ }
+ }
+}
+
+/**
+ * 更新负责部门的options
+ *
+ * @param options
+ * @param updateSchema
+ */
+async function updateDepartOption(options, updateSchema) {
+ if (options && options.length > 0) {
+ // 并行处理所有异步操作
+ const updatedOptions = await Promise.all(
+ options.map(async (item) => {
+ const departPathName = await getDepartPathNameByOrgCode('', item.label, item.value);
+ return { ...item, label: departPathName };
+ })
+ );
+ updateSchema([
+ {
+ field: 'departIds',
+ componentProps: { options: updatedOptions },
+ },
+ ]);
+ } else {
+ updateSchema([
+ {
+ field: 'departIds',
+ componentProps: { options: [] },
+ },
+ ]);
+ }
+}
diff --git a/jeecgboot-vue3/src/views/system/usersetting/AccountSetting.vue b/jeecgboot-vue3/src/views/system/usersetting/AccountSetting.vue
index 859f4f356..5911bb892 100644
--- a/jeecgboot-vue3/src/views/system/usersetting/AccountSetting.vue
+++ b/jeecgboot-vue3/src/views/system/usersetting/AccountSetting.vue
@@ -161,7 +161,7 @@
});
diff --git a/jeecgboot-vue3/src/views/system/usersetting/BaseSetting.vue b/jeecgboot-vue3/src/views/system/usersetting/BaseSetting.vue
index 6f58f3f1b..2fa0132f8 100644
--- a/jeecgboot-vue3/src/views/system/usersetting/BaseSetting.vue
+++ b/jeecgboot-vue3/src/views/system/usersetting/BaseSetting.vue
@@ -403,7 +403,7 @@ onMounted(async () => {
diff --git a/jeecgboot-vue3/src/views/system/usersetting/TenantSetting.vue b/jeecgboot-vue3/src/views/system/usersetting/TenantSetting.vue
index 2818e32f0..03128b76f 100644
--- a/jeecgboot-vue3/src/views/system/usersetting/TenantSetting.vue
+++ b/jeecgboot-vue3/src/views/system/usersetting/TenantSetting.vue
@@ -227,8 +227,7 @@ const userDetail = ref({
*/
async function initDataSource() {
//获取用户数据
- //update-begin---author:wangshuai ---date:20230109 for: [QQYUN-3645]个人设置我的租户查询审核中和正常的------------
- //update-begin---author:wangshuai ---date:202307049 for:[QQYUN-5608]用户导入后,邀请后,被导入人同意即可,新增被邀信息-----------
+ // 代码逻辑说明: [QQYUN-5608]用户导入后,邀请后,被导入人同意即可,新增被邀信息-----------
getTenantListByUserId({ userTenantStatus: '1,3,5' }).then((res) => {
if (res.success) {
if(res.result && res.result.length>0){
@@ -253,10 +252,8 @@ const userDetail = ref({
}
} else {
setInitedValue();
- //update-end---author:wangshuai ---date:202307049 for:[QQYUN-5608]用户导入后,邀请后,被导入人同意即可,新增被邀信息------------
}
});
- //update-end---author:wangshuai ---date:20230109 for:[QQYUN-3645]个人设置我的租户查询审核中和正常的------------
}
function setInitedValue() {
dataSource.value = [];
@@ -391,13 +388,14 @@ const userDetail = ref({
createMessage.success(res.message);
cancelVisible.value = false;
initDataSource();
+ // 代码逻辑说明: 【QQYUN-6822】7、登录拥有多个租户身份的用户,退出租户,只剩下一个租户后显示为空---
userExitChangeLoginTenantId(unref(myTenantInfo).tenantUserId);
} else {
if (res.message === 'assignedOwen') {
//需要指定变更者
owenVisible.value = true;
cancelVisible.value = false;
- //update-begin---author:wangshuai ---date:20230426 for:【QQYUN-5270】名下租户全部退出后,再次登录,提示租户全部冻结。拥有者提示前往注销------------
+ // 代码逻辑说明: 【QQYUN-5270】名下租户全部退出后,再次登录,提示租户全部冻结。拥有者提示前往注销------------
}else if(res.message === 'cancelTenant'){
cancelVisible.value = false;
let fullPath = router.currentRoute.value.fullPath;
@@ -414,7 +412,6 @@ const userDetail = ref({
router.push('/myapps/settings/organization/organMessage/'+unref(myTenantInfo).tenantUserId)
}
})
- //update-end---author:wangshuai ---date:20230426 for:【QQYUN-5270】名下租户全部退出后,再次登录,提示租户全部冻结。拥有者提示前往注销------------
} else {
createMessage.warning(res.message);
}
@@ -444,9 +441,8 @@ const userDetail = ref({
if(res.success){
createMessage.success(res.message);
initDataSource();
- //update-begin---author:wangshuai---date:2023-10-23---for:【QQYUN-6822】7、登录拥有多个租户身份的用户,退出租户,只剩下一个租户后显示为空---
+ // 代码逻辑说明: 【QQYUN-6822】7、登录拥有多个租户身份的用户,退出租户,只剩下一个租户后显示为空---
userExitChangeLoginTenantId(unref(myTenantInfo).tenantUserId);
- //update-end---author:wangshuai---date:2023-10-23---for:【QQYUN-6822】7、登录拥有多个租户身份的用户,退出租户,只剩下一个租户后显示为空---
} else {
createMessage.warning(res.message);
}
@@ -689,7 +685,7 @@ const userDetail = ref({
font-size: 14px;
font-weight: 700;
}
-//update-begin---author:wangshuai ---date:20230704 for:被邀弹窗样式------------
+// 代码逻辑说明: 被邀弹窗样式------------
.approved-count{
background: #ffd2d2;
border-radius: 19px;
@@ -721,11 +717,10 @@ const userDetail = ref({
.pointer{
cursor: pointer;
}
-//update-end---author:wangshuai ---date:20230704 for:被邀弹窗样式------------
diff --git a/jeecgboot-vue3/src/views/system/usersetting/WeChatDingSetting.vue b/jeecgboot-vue3/src/views/system/usersetting/WeChatDingSetting.vue
index 6e6a03477..69063f709 100644
--- a/jeecgboot-vue3/src/views/system/usersetting/WeChatDingSetting.vue
+++ b/jeecgboot-vue3/src/views/system/usersetting/WeChatDingSetting.vue
@@ -245,7 +245,7 @@
});
diff --git a/jeecgboot-vue3/src/views/system/usersetting/commponents/UserAccountModal.vue b/jeecgboot-vue3/src/views/system/usersetting/commponents/UserAccountModal.vue
index f6e7ff132..1d187f4e8 100644
--- a/jeecgboot-vue3/src/views/system/usersetting/commponents/UserAccountModal.vue
+++ b/jeecgboot-vue3/src/views/system/usersetting/commponents/UserAccountModal.vue
@@ -34,11 +34,10 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
data.record.relTenantIds = data.record.relTenantIds.split(",")
}
userDetail.value = data.record;
- //update-begin---author:wangshuai ---date:20230130 for:[QQYUN-3976]个人信息 编辑时,刚注册没有设置生日 生日显示有问题------------
+ // 代码逻辑说明: [QQYUN-3976]个人信息 编辑时,刚注册没有设置生日 生日显示有问题------------
if(data.record.birthday === '未填写'){
data.record.birthday = undefined;
}
- //update-end---author:wangshuai ---date:20230130 for:[QQYUN-3976]个人信息 编辑时,刚注册没有设置生日 生日显示有问题------------
await setFieldsValue({ ...data.record });
});
diff --git a/jeecgboot-vue3/src/views/system/usersetting/commponents/UserPhoneModal.vue b/jeecgboot-vue3/src/views/system/usersetting/commponents/UserPhoneModal.vue
index b4ee3f9b9..b77251170 100644
--- a/jeecgboot-vue3/src/views/system/usersetting/commponents/UserPhoneModal.vue
+++ b/jeecgboot-vue3/src/views/system/usersetting/commponents/UserPhoneModal.vue
@@ -157,13 +157,12 @@ function updateSendCodeApi(type) {
if (res.success) {
resolve(true);
} else {
- //update-begin---author:wangshuai---date:2024-04-18---for:【QQYUN-9005】同一个IP,1分钟超过5次短信,则提示需要验证码---
+ // 代码逻辑说明: 【QQYUN-9005】同一个IP,1分钟超过5次短信,则提示需要验证码---
if(res.code != ExceptionEnum.PHONE_SMS_FAIL_CODE){
createMessage.error(res.message || '未知问题');
reject();
}
reject(res);
- //update-end---author:wangshuai---date:2024-04-18---for:【QQYUN-9005】同一个IP,1分钟超过5次短信,则提示需要验证码---
}
}).catch((res)=>{
createMessage.error(res.message || '未知问题');
diff --git a/jeecgboot-vue3/types/config.d.ts b/jeecgboot-vue3/types/config.d.ts
index 7a5df8b21..21d7f954f 100644
--- a/jeecgboot-vue3/types/config.d.ts
+++ b/jeecgboot-vue3/types/config.d.ts
@@ -24,9 +24,8 @@ export interface MenuSetting {
mode: MenuModeEnum;
type: MenuTypeEnum;
theme: ThemeEnum;
- // update-begin--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
+ // 代码逻辑说明: 【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
isThemeBright: boolean;
- // update-end--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
topMenuAlign: 'start' | 'center' | 'end';
trigger: TriggerEnum;
accordion: boolean;
@@ -163,6 +162,8 @@ export interface GlobConfig {
shortName: string;
// 短标题
shortTitle: string;
+ // 使用新任务弹窗
+ useNewTaskModal: boolean;
// 当前是否运行在 electron 平台
isElectronPlatform: boolean;