From 5e40349338a78e2947e1ac0b1eb9c52d87d7ee6c Mon Sep 17 00:00:00 2001 From: zhouyang Date: Fri, 10 Apr 2026 16:04:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update:=E4=BB=BF=E7=9C=9F=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=BA=94=E7=94=A8=E6=8B=89=E8=B5=B7=E4=BC=A0?= =?UTF-8?q?=E5=8F=82=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/runDetailPage/index.vue | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/src/views/task/execution/components/runDetailPage/index.vue b/src/views/task/execution/components/runDetailPage/index.vue index cbd456c5..25394955 100644 --- a/src/views/task/execution/components/runDetailPage/index.vue +++ b/src/views/task/execution/components/runDetailPage/index.vue @@ -951,10 +951,9 @@ const getSubmitParamFun = async (appPath: any) => { const taskPostCmdParam = { 'pptx.py': '', }; - const { fileIds, fileNames, taskCmdParam }: any = await getNodeFileIdAndNames(); - + const { fileIds, fileNames, taskCmdParam, nodeExeCommand }: any = await getNodeFileIdAndNames(); const fileType = await getfileTypeList(); - const uploadId = flowNodeData.value.userParams.outputDirId.toString(); + const uploadId = flowNodeData.value.outputDirId.toString(); const owner = getUserData()?.nickname; const tenantId = getUserTenantId().toString(); const userId = getUserId().toString(); @@ -988,11 +987,37 @@ const getSubmitParamFun = async (appPath: any) => { subRunId, asyncTaskId, outputFormat, + nodeExeCommand, }; }; const getNodeFileIdAndNames = async () => { const dirId = flowNodeData.value.userParams.inputDirId; + let nodeExeCommand = flowNodeParamData.value.nodeExeCommand; + const params = nodeExeCommand.split(' ').filter((item: any) => { + return item.startsWith('$'); + }); + + for (let i = 0; i < params.length; i++) { + for (const key in flowNodeData.value.userParams) { + if (params[i].includes(key)) { + // 1.字符串 + if (flowNodeData.value.userParams[key] instanceof String) { + nodeExeCommand = nodeExeCommand.replace(params[i], flowNodeData.value.userParams[key]); + } else if (flowNodeData.value.userParams[key] instanceof Array) { + // 2.数组 + const names = flowNodeData.value.userParams[key] + .map((item: any) => { + const name = item.split('/').at(-1); + return name; + }) + ?.join(','); + nodeExeCommand = nodeExeCommand.replace(params[i], `./${names}`); + } + } + } + } + const fileIds: any = []; const fileNames: any = []; const taskCmdParam: any = {}; @@ -1053,12 +1078,14 @@ const getNodeFileIdAndNames = async () => { fileIds, fileNames, taskCmdParam, + nodeExeCommand, }; } else { return { fileIds, fileNames, taskCmdParam, + nodeExeCommand, }; } } catch { @@ -1066,6 +1093,7 @@ const getNodeFileIdAndNames = async () => { fileIds, fileNames, taskCmdParam, + nodeExeCommand, }; } }; From 75826af58f085feeb733e7157011d7aba85541dd Mon Sep 17 00:00:00 2001 From: dongzhihuan Date: Fri, 10 Apr 2026 18:31:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?update=20=E8=B4=9F=E8=BD=BD=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/user.ts | 13 +- src/utils/common.ts | 33 ++- .../components/workloadPermission.vue | 256 +++++++++++++++++- src/views/system/configuration/index.vue | 8 +- 4 files changed, 289 insertions(+), 21 deletions(-) diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 6fdeb934..0a505147 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -1,5 +1,5 @@ import { post, get } from '@/api/request'; -import { userListFormat } from '@/utils/common'; +import { userListFormat, relatedUserFormat } from '@/utils/common'; const env = import.meta.env; const PREFIX = env.VITE_API_PREFIX_SYSTEM; @@ -68,3 +68,14 @@ export const getUserPermissionsApi = (params: any) => { export const listUserWithKeyWordApi = (params: any) => { return get(`${PREFIX}user/listUserWithKeyWord`, params); }; + +// 关联权限 +export const saveUserRelationApi = (params: any) => { + return post(`${PREFIX}user/saveUserRelation`, params); +}; + +// 根据用户获取权限 +export const queryRelatedUserIdsApi = async (params: any) => { + const res = await post(`${PREFIX}user/queryRelatedUserIds`, params); + return relatedUserFormat(res); +}; diff --git a/src/utils/common.ts b/src/utils/common.ts index 550ce3df..5ba719e4 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -172,16 +172,33 @@ export const resListFormat = (res: any) => { }; // CID用户列表返回数据格式化 export const userListFormat = (res: any) => { - res?.data?.data?.forEach((item: any) => { - item.userId = item.userInfo.userId; - item.nickname = item.userInfo.nickname; - item.roleListStr = item.roleList.map((item: any) => item.roleName).join(','); - item.postListStr = item.postList.map((item: any) => item.postName).join(','); - item.deptListStr = item.deptList.map((item: any) => item.deptName).join(','); - }); + const list = + res?.data?.data?.map((item: any) => { + return { + userId: item.userInfo.userId, + nickname: item.userInfo.nickname, + roleListStr: item.roleList.map((item: any) => item.roleName).join(','), + postListStr: item.postList.map((item: any) => item.postName).join(','), + deptListStr: item.deptList.map((item: any) => item.deptName).join(','), + }; + }) || []; + res.data.data = list; + return res; +}; +export const relatedUserFormat = (res: any) => { + const list = + res?.data?.map((item: any) => { + return { + userId: item.userInfo.userId, + nickname: item.userInfo.nickname, + roleListStr: item.roleList.map((item: any) => item.roleName).join(','), + postListStr: item.postList.map((item: any) => item.postName).join(','), + deptListStr: item.deptList.map((item: any) => item.deptName).join(','), + }; + }) || []; + res.data = list; return res; }; - const pageStorageData: any = JSON.parse(localStorage.getItem('PAGE_STORAGE_DATA') || '{}'); // 设置页面本地存储 export const setPageStorage = (key: string, val: any) => { diff --git a/src/views/system/configuration/components/workloadPermission.vue b/src/views/system/configuration/components/workloadPermission.vue index a26c0026..a7690e0b 100644 --- a/src/views/system/configuration/components/workloadPermission.vue +++ b/src/views/system/configuration/components/workloadPermission.vue @@ -1,6 +1,15 @@ + + diff --git a/src/views/system/configuration/index.vue b/src/views/system/configuration/index.vue index 9b44d39d..7b9e1c95 100644 --- a/src/views/system/configuration/index.vue +++ b/src/views/system/configuration/index.vue @@ -1,6 +1,6 @@