mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-02-02 16:45:24 +08:00
v3.9.0 里程碑版本发布
This commit is contained in:
@ -41,6 +41,8 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
|
||||
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<GlobConfig> => {
|
||||
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<GlobConfig> => {
|
||||
}
|
||||
domainURL = window.location.origin + domainURL;
|
||||
}
|
||||
// update-end--author:sunjianlei---date:220250115---for:【QQYUN-10956】配置了自定义前缀,外部连接打不开,需要兼容处理
|
||||
|
||||
// @ts-ignore
|
||||
window._CONFIG['domianURL'] = domainURL;
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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: 代码生成-原生表单用
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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() {
|
||||
<span>具体详情请<a href = ${href} download = ${fileName}> 点击下载 </a> </span>
|
||||
</div>`,
|
||||
});
|
||||
//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),
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@ -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执行登录
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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));
|
||||
});
|
||||
}
|
||||
|
||||
@ -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 };
|
||||
}
|
||||
|
||||
@ -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---
|
||||
|
||||
/**
|
||||
* 单点登录
|
||||
|
||||
@ -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),
|
||||
|
||||
@ -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 }
|
||||
);
|
||||
|
||||
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user