Commit b35fe90f authored by wuyongsheng's avatar wuyongsheng

Merge branch 'feat-20221012-environment' into 'master'

Feat 20221012 environment

See merge request !210
parents 2c78102d c52b6560
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com * @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-19 17:09:23 * @Date: 2022-10-19 17:09:23
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-10-31 11:22:34 * @LastEditTime: 2022-12-13 14:02:56
* @FilePath: /bkunyun/src/api/resourceCenter.ts * @FilePath: /bkunyun/src/api/resourceCenter.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -107,7 +107,7 @@ const getActorEnvOptions = (params: {type: string}) => { ...@@ -107,7 +107,7 @@ const getActorEnvOptions = (params: {type: string}) => {
}; };
// 获取工作流模板 // 获取工作流模板
const getWorkflowspecList = (params: {productId?: string, title?: string}) => { const getWorkflowspecList = (params: {productId?: string, title?: string, page: number, size: number}) => {
return request({ return request({
// url:`${Api.API_WORKFLOWSPEC_LIST}/${params.productId}`, // url:`${Api.API_WORKFLOWSPEC_LIST}/${params.productId}`,
url:`${Api.API_WORKFLOWSPEC_LIST}`, url:`${Api.API_WORKFLOWSPEC_LIST}`,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-05 14:00:37 * @Date: 2022-07-05 14:00:37
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-08 16:34:52 * @LastEditTime: 2022-12-13 14:21:36
* @FilePath: /bkunyun/src/api/workbench_api.ts * @FilePath: /bkunyun/src/api/workbench_api.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -27,6 +27,8 @@ function menu() { ...@@ -27,6 +27,8 @@ function menu() {
type workflowspecTemplateParams = { type workflowspecTemplateParams = {
projectId: string; projectId: string;
title?: string; title?: string;
page: number;
size: number;
}; };
// 查询项目下工作流模板列表 // 查询项目下工作流模板列表
......
...@@ -16,7 +16,7 @@ interface ICardTableProps { ...@@ -16,7 +16,7 @@ interface ICardTableProps {
const CardTable = (props: ICardTableProps) => { const CardTable = (props: ICardTableProps) => {
const { const {
data, data=[],
renderItem, renderItem,
tableKey = "id", tableKey = "id",
numberOfColumns: propsNumberOfColumns = 3, numberOfColumns: propsNumberOfColumns = 3,
...@@ -79,7 +79,7 @@ const CardTable = (props: ICardTableProps) => { ...@@ -79,7 +79,7 @@ const CardTable = (props: ICardTableProps) => {
{renderBefore()} {renderBefore()}
</div> </div>
)} )}
{data.map((item, index) => { {data?.map((item, index) => {
return ( return (
<div <div
className={style.itemBox} className={style.itemBox}
......
...@@ -79,7 +79,7 @@ const VrituallyCardTable = (props: IVrituallyCardTableProps) => { ...@@ -79,7 +79,7 @@ const VrituallyCardTable = (props: IVrituallyCardTableProps) => {
<div <div
style={{ style={{
display: "flex", display: "flex",
justifyContent: "space-between", justifyContent: "flex-start",
alignItems: "center", alignItems: "center",
boxSizing: "border-box", boxSizing: "border-box",
height: "100%", height: "100%",
......
...@@ -11,6 +11,7 @@ import FullScreenDrawer from "@/components/CommonComponents/FullScreenDrawer"; ...@@ -11,6 +11,7 @@ import FullScreenDrawer from "@/components/CommonComponents/FullScreenDrawer";
import ChevronLeftIcon from "@mui/icons-material/ChevronLeft"; import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
import ChevronRightIcon from "@mui/icons-material/ChevronRight"; import ChevronRightIcon from "@mui/icons-material/ChevronRight";
import useWindowSize from "@/hooks/useWindowSize"; import useWindowSize from "@/hooks/useWindowSize";
import MyCircularProgress from "@/components/mui/MyCircularProgress";
type LogViewProps = { type LogViewProps = {
logs: any[]; logs: any[];
...@@ -37,6 +38,8 @@ const LogView = (props: LogViewProps) => { ...@@ -37,6 +38,8 @@ const LogView = (props: LogViewProps) => {
const [leftButtonColor, setLeftButtonColor] = useState("#585D62"); const [leftButtonColor, setLeftButtonColor] = useState("#585D62");
const [rightButtonColor, setRightButtonColor] = useState("#585D62"); const [rightButtonColor, setRightButtonColor] = useState("#585D62");
const [logLoading, setLogLoading] = useState<boolean>(true)
useEffect(() => { useEffect(() => {
setLogPath(logs[logCurrent]?.logPath); setLogPath(logs[logCurrent]?.logPath);
...@@ -45,6 +48,7 @@ const LogView = (props: LogViewProps) => { ...@@ -45,6 +48,7 @@ const LogView = (props: LogViewProps) => {
// 请求日志文本 // 请求日志文本
useEffect(() => { useEffect(() => {
if (logPath) { if (logPath) {
setLogLoading(true)
const path = logPath.slice(12); const path = logPath.slice(12);
CloudEController.JobFileDownloadText( CloudEController.JobFileDownloadText(
path, path,
...@@ -52,6 +56,8 @@ const LogView = (props: LogViewProps) => { ...@@ -52,6 +56,8 @@ const LogView = (props: LogViewProps) => {
projectId as string projectId as string
)?.then((res) => { )?.then((res) => {
setLogText(res.data); setLogText(res.data);
}).finally(()=>{
// setLogLoading(false)
}); });
} else { } else {
setLogText(""); setLogText("");
...@@ -179,10 +185,12 @@ const LogView = (props: LogViewProps) => { ...@@ -179,10 +185,12 @@ const LogView = (props: LogViewProps) => {
<ChevronRightIcon /> <ChevronRightIcon />
</div> </div>
</div> </div>
<MyCircularProgress loading={logLoading} >
<div className={style.logViewContent}>{logText}</div> <div className={style.logViewContent}>{logText}</div>
<div className={style.logViewBottom}> <div className={style.logViewBottom}>
<MyButton text="下载当前日志" onClick={handleDownLoad} /> <MyButton text="下载当前日志" onClick={handleDownLoad} />
</div> </div>
</MyCircularProgress>
</div> </div>
</FullScreenDrawer> </FullScreenDrawer>
); );
......
...@@ -97,6 +97,22 @@ ...@@ -97,6 +97,22 @@
color: rgba(19, 112, 255, 1); color: rgba(19, 112, 255, 1);
font-size: 14px; font-size: 14px;
} }
.seeDataset {
width: 18px;
height: 18px;
background-image: url(../../../assets/project/taskResultsSeeIcon.svg);
}
.seeDataset:hover {
background-image: url(../../../assets/project/taskResultsSeeHoverIcon.svg);
}
.downloadFile {
width: 16px;
height: 16px;
background-image: url(../../../assets/project/taskResultsDownloadIcon.svg);
}
.downloadFile:hover {
background-image: url(../../../assets/project/taskResultsDownloadHoverIcon.svg);
}
.outputLiLeftImg { .outputLiLeftImg {
box-shadow: 0px 5px 11px -5px rgba(19, 110, 250, 0.64); box-shadow: 0px 5px 11px -5px rgba(19, 110, 250, 0.64);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 20:03:56 * @Date: 2022-06-21 20:03:56
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-09-06 10:54:40 * @LastEditTime: 2022-12-14 13:48:55
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx * @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -46,6 +46,8 @@ import { ...@@ -46,6 +46,8 @@ import {
getSameBatch, getSameBatch,
} from "./utils"; } from "./utils";
import MyTooltip from "@/components/mui/MyTooltip"; import MyTooltip from "@/components/mui/MyTooltip";
import taskResultsFileIcon from "@/assets/project/taskResultsFileIcon.svg";
import taskResultsDatasetIcon from "@/assets/project/taskResultsDatasetIcon.svg";
import styles from "./index.module.css"; import styles from "./index.module.css";
...@@ -72,7 +74,7 @@ const ProjectSubmitWork = observer(() => { ...@@ -72,7 +74,7 @@ const ProjectSubmitWork = observer(() => {
/** 选中的node Id */ /** 选中的node Id */
const [activeFlowIndex, setActiveFlowIndex] = useState<string>(""); const [activeFlowIndex, setActiveFlowIndex] = useState<string>("");
// const [showOptions, setShowOptions] = useState<boolean>(false); // const [showOptions, setShowOptions] = useState<boolean>(false);
const [randerOutputs1, setRanderOutputs] = useState<Array<any>>([]); const [renderOutputs1, setRenderOutputs] = useState<Array<any>>([]);
const locationInfo: any = useLocation()?.state; const locationInfo: any = useLocation()?.state;
// const locationInfo: any = location?.state; // const locationInfo: any = location?.state;
const navigate = useNavigate(); const navigate = useNavigate();
...@@ -97,7 +99,9 @@ const ProjectSubmitWork = observer(() => { ...@@ -97,7 +99,9 @@ const ProjectSubmitWork = observer(() => {
pollingInterval: 1000 * 20, pollingInterval: 1000 * 20,
pollingWhenHidden: false, pollingWhenHidden: false,
onSuccess: (res: IResponse<ITaskInfo>) => { onSuccess: (res: IResponse<ITaskInfo>) => {
getOutouts(res.data.outputs); if(!activeFlowIndex) {
getOutputs(res.data.outputs);
}
getLogs(res.data); getLogs(res.data);
setWorkFlowJobInfo(res.data); setWorkFlowJobInfo(res.data);
const newWorkflowId = locationInfo?.taskId?.replaceAll("-", ""); const newWorkflowId = locationInfo?.taskId?.replaceAll("-", "");
...@@ -180,6 +184,7 @@ const ProjectSubmitWork = observer(() => { ...@@ -180,6 +184,7 @@ const ProjectSubmitWork = observer(() => {
const { run: getworkFlowTaskInfoRun } = useMyRequest(getworkFlowTaskInfo, { const { run: getworkFlowTaskInfoRun } = useMyRequest(getworkFlowTaskInfo, {
onSuccess: (res) => { onSuccess: (res) => {
setPatchInfo(res.data); setPatchInfo(res.data);
getOutputs(res.data.outputs)
}, },
}); });
...@@ -225,7 +230,8 @@ const ProjectSubmitWork = observer(() => { ...@@ -225,7 +230,8 @@ const ProjectSubmitWork = observer(() => {
} }
}, [navigate, locationInfo.from, productId]); }, [navigate, locationInfo.from, productId]);
const getOutouts = (outputs: any) => { /** 获取输出文件 */
const getOutputs = (outputs: any) => {
if (outputs) { if (outputs) {
let result = Object.keys(outputs); let result = Object.keys(outputs);
let arr = result.map((item) => { let arr = result.map((item) => {
...@@ -233,8 +239,9 @@ const ProjectSubmitWork = observer(() => { ...@@ -233,8 +239,9 @@ const ProjectSubmitWork = observer(() => {
if (outputs[item].indexOf("dataset") !== -1) { if (outputs[item].indexOf("dataset") !== -1) {
type = "dataset"; type = "dataset";
} }
const nameArr = outputs[item]?.split('/') || []
return { return {
name: item, name: nameArr.length ? nameArr[nameArr.length - 1] : '',
type, type,
path: outputs[item], path: outputs[item],
size: 0, size: 0,
...@@ -242,20 +249,21 @@ const ProjectSubmitWork = observer(() => { ...@@ -242,20 +249,21 @@ const ProjectSubmitWork = observer(() => {
}); });
arr.forEach(async (item, index) => { arr.forEach(async (item, index) => {
if (item.type === "dataset") { if (item.type === "dataset") {
await getDataSetSize(item, index); await getDataSetSize(item, index,arr);
} else { } else {
await getFileSize(item, index); await getFileSize(item, index,arr);
} }
}); });
randerOutputs = arr; randerOutputs = arr;
setRanderOutputs([...randerOutputs]); setRenderOutputs([...randerOutputs]);
} else { } else {
randerOutputs = []; randerOutputs = []
setRanderOutputs([]); setRenderOutputs([]);
} }
}; };
const getDataSetSize = async (item: any, index: number) => { const getDataSetSize = async (item: any, index: number, arr: any) => {
CloudEController.GetDatasetSize({ CloudEController.GetDatasetSize({
type: productId, type: productId,
projectId: projectId as string, projectId: projectId as string,
...@@ -266,14 +274,14 @@ const ProjectSubmitWork = observer(() => { ...@@ -266,14 +274,14 @@ const ProjectSubmitWork = observer(() => {
}) })
?.then((res) => { ?.then((res) => {
randerOutputs[index].size = `${res.data}条`; randerOutputs[index].size = `${res.data}条`;
setRanderOutputs([...randerOutputs]); setRenderOutputs([...randerOutputs]);
}) })
?.catch(() => { ?.catch(() => {
message.error("获取数据集大小失败"); message.error("获取数据集大小失败");
}); });
}; };
const getFileSize = (item: any, index: number) => { const getFileSize = (item: any, index: number, arr:any) => {
let path = item.path.slice(12); let path = item.path.slice(12);
const lastIndex = path.lastIndexOf("/"); const lastIndex = path.lastIndexOf("/");
if (lastIndex === -1) { if (lastIndex === -1) {
...@@ -293,7 +301,7 @@ const ProjectSubmitWork = observer(() => { ...@@ -293,7 +301,7 @@ const ProjectSubmitWork = observer(() => {
randerOutputs[index].size = `${ randerOutputs[index].size = `${
item1.size ? storageUnitFromB(Number(item1.size)) : "-" item1.size ? storageUnitFromB(Number(item1.size)) : "-"
}`; }`;
setRanderOutputs([...randerOutputs]); setRenderOutputs(randerOutputs);
} }
}); });
} }
...@@ -324,6 +332,7 @@ const ProjectSubmitWork = observer(() => { ...@@ -324,6 +332,7 @@ const ProjectSubmitWork = observer(() => {
const setExternalSelectedNodeId = (id: string) => { const setExternalSelectedNodeId = (id: string) => {
setActiveFlowIndex(id); setActiveFlowIndex(id);
if(id) {
workFlowJobInfo?.tasks && workFlowJobInfo?.tasks &&
workFlowJobInfo?.tasks?.forEach((item) => { workFlowJobInfo?.tasks?.forEach((item) => {
if (item.id === id) { if (item.id === id) {
...@@ -333,6 +342,11 @@ const ProjectSubmitWork = observer(() => { ...@@ -333,6 +342,11 @@ const ProjectSubmitWork = observer(() => {
}); });
} }
}); });
} else {
/** 未选中算子初始化为 整体的任务结果 */
getOutputs(workFlowJobInfo?.outputs)
}
}; };
const selectedParameter = useCallback( const selectedParameter = useCallback(
...@@ -466,7 +480,7 @@ const ProjectSubmitWork = observer(() => { ...@@ -466,7 +480,7 @@ const ProjectSubmitWork = observer(() => {
{!activeFlowIndex && ( {!activeFlowIndex && (
<TaskInfo <TaskInfo
workFlowJobInfo={workFlowJobInfo as ITaskInfo} workFlowJobInfo={workFlowJobInfo as ITaskInfo}
randerOutputs1={randerOutputs1} randerOutputs1={renderOutputs1}
handleDownLoadOutput={handleDownLoadOutput} handleDownLoadOutput={handleDownLoadOutput}
handleShowPopper={handleShowPopper} handleShowPopper={handleShowPopper}
setGoToProjectDataPath={setGoToProjectDataPath} setGoToProjectDataPath={setGoToProjectDataPath}
...@@ -547,6 +561,54 @@ const ProjectSubmitWork = observer(() => { ...@@ -547,6 +561,54 @@ const ProjectSubmitWork = observer(() => {
{statusMap[overviewInfo?.status as IStatus]} {statusMap[overviewInfo?.status as IStatus]}
</div> </div>
</div> </div>
{ renderOutputs1?.length ?
<>
<div className={styles.title}>
算子结果
<span className={styles.taskResultsNum}>{renderOutputs1.length}</span>
</div>
<div className={styles.taskResults}>
{renderOutputs1.map((item, index) => {
return (
<div key={index} className={styles.outputLi}>
<div className={styles.outputLiLeft}>
<img
className={classNames({
[styles.outputLiLeftImg]: true,
[styles.outputLiLeftImgBoxShadow2]:
item.type === "file",
})}
src={
item.type === "file"
? taskResultsFileIcon
: taskResultsDatasetIcon
}
alt=""
/>
<div className={styles.outputLiLeftContent}>
<div className={styles.outputItemName}>{item.name}</div>
<div className={styles.outputLiSize}>{item.size}</div>
</div>
</div>
<div
onClick={(e: any) => {
handleDownLoadOutput(item);
}}
className={classNames({
[styles.outputLiRight]: true,
[styles.seeDataset]: item.type !== "file",
[styles.downloadFile]: item.type === "file",
})}
></div>
</div>
);
})}
</div>
</> :
null}
</div> </div>
)} )}
{!overviewActive && ( {!overviewActive && (
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com * @Author: 吴永生 15770852798@163.com
* @Date: 2022-08-15 14:44:24 * @Date: 2022-08-15 14:44:24
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-15 14:46:02 * @LastEditTime: 2022-12-12 18:05:01
* @FilePath: /bkunyun/src/views/Project/ProjectJobDetail/interface.ts * @FilePath: /bkunyun/src/views/Project/ProjectJobDetail/interface.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -10,5 +10,6 @@ export interface IFlowNodeTransmissionNum { ...@@ -10,5 +10,6 @@ export interface IFlowNodeTransmissionNum {
target: string, target: string,
value: number, value: number,
batchId: string, batchId: string,
source: string source: string,
outputs: any
} }
\ No newline at end of file
...@@ -53,8 +53,9 @@ const TaskCard = observer((props: TaskCardProps) => { ...@@ -53,8 +53,9 @@ const TaskCard = observer((props: TaskCardProps) => {
if (outputs[item].indexOf("dataset") !== -1) { if (outputs[item].indexOf("dataset") !== -1) {
type = "dataset"; type = "dataset";
} }
const nameArr = outputs[item]?.split('/') || []
return { return {
name: item, name: nameArr.length ? nameArr[nameArr.length - 1] : '',
type, type,
path: outputs[item], path: outputs[item],
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13 * @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-10-17 15:36:29 * @LastEditTime: 2022-12-13 16:12:00
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx * @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -58,7 +58,7 @@ const ProjectSetting = observer(() => { ...@@ -58,7 +58,7 @@ const ProjectSetting = observer(() => {
<Box sx={{ width: "100%", typography: "body1" }}> <Box sx={{ width: "100%", typography: "body1" }}>
<Tabs <Tabs
tabList={tabList} tabList={tabList}
defaultValue={location?.state?.type || "projectMember"} defaultValue={location?.state?.type || undefined}
/> />
</Box> </Box>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13 * @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-10-27 14:04:32 * @LastEditTime: 2022-12-13 14:22:05
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx * @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -58,7 +58,7 @@ const ProjectMembers = observer(() => { ...@@ -58,7 +58,7 @@ const ProjectMembers = observer(() => {
// 获取模板列表 // 获取模板列表
const { run: getTemplateInfo } = useMyRequest(getWorkbenchTemplate, { const { run: getTemplateInfo } = useMyRequest(getWorkbenchTemplate, {
onSuccess: (result: any) => { onSuccess: (result: any) => {
setTemplateList(result.data); setTemplateList(result.data.content);
}, },
}); });
...@@ -67,6 +67,8 @@ const ProjectMembers = observer(() => { ...@@ -67,6 +67,8 @@ const ProjectMembers = observer(() => {
onSuccess: (result: any) => { onSuccess: (result: any) => {
setOpenDialog(false); setOpenDialog(false);
getTemplateInfo({ getTemplateInfo({
page: 0,
size: 999,
projectId: currentProjectStore.currentProjectInfo.id as string, projectId: currentProjectStore.currentProjectInfo.id as string,
title: templateName, title: templateName,
}); });
...@@ -75,6 +77,8 @@ const ProjectMembers = observer(() => { ...@@ -75,6 +77,8 @@ const ProjectMembers = observer(() => {
useEffect(() => { useEffect(() => {
getTemplateInfo({ getTemplateInfo({
page: 0,
size: 999,
projectId: currentProjectStore.currentProjectInfo.id as string, projectId: currentProjectStore.currentProjectInfo.id as string,
}); });
}, [currentProjectStore.currentProjectInfo.id, getTemplateInfo]); }, [currentProjectStore.currentProjectInfo.id, getTemplateInfo]);
...@@ -106,6 +110,8 @@ const ProjectMembers = observer(() => { ...@@ -106,6 +110,8 @@ const ProjectMembers = observer(() => {
useEffect(() => { useEffect(() => {
setTimeout(() => { setTimeout(() => {
getTemplateInfo({ getTemplateInfo({
page: 0,
size: 999,
projectId: projectIdData as string, projectId: projectIdData as string,
title: templateName, title: templateName,
}); });
...@@ -264,6 +270,8 @@ const ProjectMembers = observer(() => { ...@@ -264,6 +270,8 @@ const ProjectMembers = observer(() => {
setShowAddTemplate={() => { setShowAddTemplate={() => {
setShowAddTemplate(false); setShowAddTemplate(false);
getTemplateInfo({ getTemplateInfo({
page: 0,
size: 999,
projectId: projectIdData as string, projectId: projectIdData as string,
title: templateName, title: templateName,
}); });
......
...@@ -270,18 +270,18 @@ const Flow = (props: IProps) => { ...@@ -270,18 +270,18 @@ const Flow = (props: IProps) => {
return a - b; return a - b;
}); });
const initialHeight = isFlowNode(value.id) ? 66 : 12; const initialHeight = isFlowNode(value.id) ? 66 : 12;
let width = 176, let minWidth = 176,
height = initialHeight height = initialHeight
if (positionXArr?.length) { if (positionXArr?.length) {
const val = positionXArr[positionXArr.length - 1] + 144; const val = positionXArr[positionXArr.length - 1] + 144;
width = val > 176 ? val : width; minWidth = val > 176 ? val : minWidth;
} }
if (positionYArr?.length) { if (positionYArr?.length) {
const val = positionYArr[positionYArr.length - 1] + 74; const val = positionYArr[positionYArr.length - 1] + 74;
height = val > initialHeight ? val : height; height = val > initialHeight ? val : height;
} }
return { return {
width, minWidth,
height, height,
}; };
}, },
......
...@@ -16,6 +16,8 @@ import TemplateDetail from "./TemplateDetail"; ...@@ -16,6 +16,8 @@ import TemplateDetail from "./TemplateDetail";
import style from "./index.module.css"; import style from "./index.module.css";
import TemplateItem from "./TemplateItem"; import TemplateItem from "./TemplateItem";
import NoData from "@/components/BusinessComponents/NoData"; import NoData from "@/components/BusinessComponents/NoData";
// import VrituallyCardTable from "@/components/CommonComponents/VrituallyCardTable";
const UserResourcesTemplate = observer(() => { const UserResourcesTemplate = observer(() => {
const [title, setTitle] = useState(""); const [title, setTitle] = useState("");
...@@ -81,13 +83,15 @@ const UserResourcesTemplate = observer(() => { ...@@ -81,13 +83,15 @@ const UserResourcesTemplate = observer(() => {
// 获取模板列表 // 获取模板列表
const { run } = useMyRequest(getWorkflowspecList, { const { run } = useMyRequest(getWorkflowspecList, {
onSuccess: (result: any) => { onSuccess: (result: any) => {
setList(result.data); setList(result.data.content);
}, },
}); });
useEffect(() => { useEffect(() => {
if (!showAddTemplate) { if (!showAddTemplate) {
run({ run({
page:0,
size: 999,
productId: product === "all" ? "" : product, productId: product === "all" ? "" : product,
title, title,
}); });
...@@ -99,6 +103,8 @@ const UserResourcesTemplate = observer(() => { ...@@ -99,6 +103,8 @@ const UserResourcesTemplate = observer(() => {
Message.success("删除成功"); Message.success("删除成功");
setShowDeleteDialog(false); setShowDeleteDialog(false);
run({ run({
page: 0,
size: 999,
productId: product === "all" ? "" : product, productId: product === "all" ? "" : product,
title, title,
}); });
...@@ -146,7 +152,13 @@ const UserResourcesTemplate = observer(() => { ...@@ -146,7 +152,13 @@ const UserResourcesTemplate = observer(() => {
data={list} data={list}
renderItem={renderItem} renderItem={renderItem}
itemMinWidth={377} itemMinWidth={377}
></CardTable> />
{/* <VrituallyCardTable
data={list}
renderItem={renderItem}
itemMinWidth={377}
rowHeight={220}
></VrituallyCardTable> */}
</div> </div>
{showAddTemplate && ( {showAddTemplate && (
<WorkFlowEdit <WorkFlowEdit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment