Commit 8b23da3e authored by wuyongsheng's avatar wuyongsheng

Merge branch 'feat-20220801' into 'release'

Feat 20220801

See merge request !69
parents a74d5b5a 2fccb697
/*
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-07-11 11:49:55
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-23 16:46:45
* @FilePath: /bkunyun/src/store/modules/currentProject.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { makeAutoObservable } from "mobx"; import { makeAutoObservable } from "mobx";
type projectInfo = { type projectInfo = {
id?: string; id?: string;
...@@ -12,14 +20,22 @@ type productInfo = { ...@@ -12,14 +20,22 @@ type productInfo = {
name?: string; name?: string;
}; };
const sessionStorageCurrentProjectInfo = JSON.parse( /** 用户信息 */
sessionStorage.getItem("currentProjectInfo") || "{}" let userInfo: any;
try {
userInfo = JSON.parse(localStorage.getItem("userInfo") || "{}");
} catch {
console.error("获取用户信息 出错");
}
const localStorageCurrentProjectInfo = JSON.parse(
localStorage.getItem(`currentProjectInfo_${userInfo.name}`) || "{}"
); );
const sessionStorageCurrentProductInfo = JSON.parse( const localStorageCurrentProductInfo = JSON.parse(
sessionStorage.getItem("currentProductInfo") || "{}" localStorage.getItem(`currentProductInfo_${userInfo.name}`) || "{}"
); );
const sessionStorageProjectList = JSON.parse( const localStorageProjectList = JSON.parse(
sessionStorage.getItem("projectList") || "[]" localStorage.getItem(`projectList_${userInfo.name}`) || "[]"
); );
class currentProject { class currentProject {
...@@ -28,22 +44,22 @@ class currentProject { ...@@ -28,22 +44,22 @@ class currentProject {
} }
// 选中的项目 // 选中的项目
currentProjectInfo: projectInfo = sessionStorageCurrentProjectInfo; currentProjectInfo: projectInfo = localStorageCurrentProjectInfo;
// 选中的产品下的项目列表 // 选中的产品下的项目列表
projectList: Array<projectInfo> = sessionStorageProjectList; projectList: Array<projectInfo> = localStorageProjectList;
// 选中的产品 // 选中的产品
currentProductInfo: productInfo = sessionStorageCurrentProductInfo; currentProductInfo: productInfo = localStorageCurrentProductInfo;
setProjectList = (list: Array<projectInfo>) => { setProjectList = (list: Array<projectInfo>) => {
this.projectList = list; this.projectList = list;
sessionStorage.setItem("projectList", JSON.stringify(list)); localStorage.setItem(`projectList_${userInfo.name}`, JSON.stringify(list));
}; };
changeProject = (project: projectInfo) => { changeProject = (project: projectInfo) => {
this.currentProjectInfo = project; this.currentProjectInfo = project;
sessionStorage.setItem("currentProjectInfo", JSON.stringify(project)); localStorage.setItem(`currentProjectInfo_${userInfo.name}`, JSON.stringify(project));
}; };
changeProductInfo = (productInfo: productInfo) => { changeProductInfo = (productInfo: productInfo) => {
this.currentProductInfo = productInfo; this.currentProductInfo = productInfo;
sessionStorage.setItem("currentProductInfo", JSON.stringify(productInfo)); localStorage.setItem(`currentProductInfo_${userInfo.name}`, JSON.stringify(productInfo));
}; };
} }
......
/* /*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-07 18:37:53 * @Date: 2022-06-07 18:37:53
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-06-15 17:49:27 * @LastEditTime: 2022-08-23 11:19:11
* @FilePath: /bkunyun/src/utils/util.ts * @FilePath: /bkunyun/src/utils/util.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
*/ */
...@@ -67,7 +67,7 @@ export const getTokenInfo = () => { ...@@ -67,7 +67,7 @@ export const getTokenInfo = () => {
return val; return val;
}; };
const IsNumberLetterChineseReg = new RegExp("^[A-Za-z0-9\u4e00-\u9fa5]+$"); const IsNumberLetterChineseReg = new RegExp("^[A-Za-z0-9\u4e00-\u9fa5]{1,50}$");
export const checkIsNumberLetterChinese = (string: string) => { export const checkIsNumberLetterChinese = (string: string) => {
return IsNumberLetterChineseReg.test(string); return IsNumberLetterChineseReg.test(string);
......
...@@ -21,7 +21,7 @@ const CustomOperator = observer((props: IProps) => { ...@@ -21,7 +21,7 @@ const CustomOperator = observer((props: IProps) => {
const Message = useMessage(); const Message = useMessage();
const [operatorList, setOperatorList] = useState<ITask[]>(initOperatorList); const [operatorList, setOperatorList] = useState<ITask[]>(initOperatorList);
const [saveFormDialog, setSaveFormDialog] = useState(false); const [saveFormDialog, setSaveFormDialog] = useState(false);
const [inputActive, setInputActive] = useState(true); const [inputActive, setInputActive] = useState(false);
// const [showCustomOperator, setShowCustomOperator] = useState(false); // const [showCustomOperator, setShowCustomOperator] = useState(false);
/** 设置选中唯一标识符 */ /** 设置选中唯一标识符 */
......
...@@ -125,7 +125,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => { ...@@ -125,7 +125,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
"sdf", "sdf",
"sdf2d", "sdf2d",
"sdf3d", "sdf3d",
"smiles", // "smiles",
].includes(item) ].includes(item)
) { ) {
arr.push({ label: item, value: item }); arr.push({ label: item, value: item });
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
font-size: 14px; font-size: 14px;
} }
.outputItemName{ .outputItemName{
max-width: 190px; max-width: 172px;
white-space: nowrap; white-space: nowrap;
display: block; display: block;
overflow: hidden; overflow: hidden;
......
...@@ -50,7 +50,6 @@ const BatchOperatorFlow = (props: IProps) => { ...@@ -50,7 +50,6 @@ const BatchOperatorFlow = (props: IProps) => {
showVersion = false, showVersion = false,
...other ...other
} = props; } = props;
console.log(tasks);
/** 自定义的节点类型 */ /** 自定义的节点类型 */
const nodeTypes = useMemo(() => { const nodeTypes = useMemo(() => {
return { batchNode: BatchNode, flowNode: FlowNode }; return { batchNode: BatchNode, flowNode: FlowNode };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-12 11:29:46 * @Date: 2022-07-12 11:29:46
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-22 16:47:06 * @LastEditTime: 2022-08-22 19:16:06
* @FilePath: /bkunyun/src/views/Project/components/Flow/components/FlowNode/index.tsx * @FilePath: /bkunyun/src/views/Project/components/Flow/components/FlowNode/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
*/ */
...@@ -98,7 +98,7 @@ const FlowNode = (props: any) => { ...@@ -98,7 +98,7 @@ const FlowNode = (props: any) => {
); );
}) })
: null} : null}
<div> <div style={{display: 'flex', alignItems: 'center'}}>
<span style={{fontSize: '12px', lineHeight: '24px'}}>{title || ""} {showVersion && version}</span> <span style={{fontSize: '12px', lineHeight: '24px'}}>{title || ""} {showVersion && version}</span>
{flowType !== "edit" && isCheck ? ( {flowType !== "edit" && isCheck ? (
<span className={styles.successDot}></span> <span className={styles.successDot}></span>
......
...@@ -11,7 +11,7 @@ import ReactFlow, { ...@@ -11,7 +11,7 @@ import ReactFlow, {
import { useCallback, useEffect, useMemo, useState } from "react"; import { useCallback, useEffect, useMemo, useState } from "react";
import { uuid } from "@/utils/util"; import { uuid } from "@/utils/util";
import { IEdge, IParameter, ITask } from "../../ProjectSubmitWork/interface"; import { IParameter, ITask } from "../../ProjectSubmitWork/interface";
import { ILine } from "./interface"; import { ILine } from "./interface";
import BatchNode from "./components/BatchNode"; import BatchNode from "./components/BatchNode";
import FlowNode from "./components/FlowNode"; import FlowNode from "./components/FlowNode";
...@@ -61,7 +61,7 @@ const Flow = (props: IProps) => { ...@@ -61,7 +61,7 @@ const Flow = (props: IProps) => {
showControls = true, showControls = true,
...other ...other
} = props; } = props;
console.log(tasks);
/** 自定义的节点类型 */ /** 自定义的节点类型 */
const nodeTypes = useMemo(() => { const nodeTypes = useMemo(() => {
return { batchNode: BatchNode, flowNode: FlowNode }; return { batchNode: BatchNode, flowNode: FlowNode };
...@@ -221,7 +221,7 @@ const Flow = (props: IProps) => { ...@@ -221,7 +221,7 @@ const Flow = (props: IProps) => {
// const nodesInputAndOutputStatus = useCallback( // const nodesInputAndOutputStatus = useCallback(
// (id: string) => { // (id: string) => {
// /** 所有的连线 */ // /** 所有的连线 */
// const lineArr: IEdge[] = []; // const lineArr: ] = [];
// tasks?.length && // tasks?.length &&
// tasks.forEach((item) => { // tasks.forEach((item) => {
// item.edges?.length && lineArr.push(...item.edges); // item.edges?.length && lineArr.push(...item.edges);
......
/* /*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-15 15:47:16 * @Date: 2022-07-15 15:47:16
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-07-15 16:30:59 * @LastEditTime: 2022-08-23 11:32:19
* @FilePath: /bkunyun/src/views/WorkFlowEdit/components/SaveCustomTemplate/index.tsx * @FilePath: /bkunyun/src/views/WorkFlowEdit/components/SaveCustomTemplate/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
*/ */
...@@ -107,7 +107,7 @@ const SaveCustomTemplate = (props: IProps) => { ...@@ -107,7 +107,7 @@ const SaveCustomTemplate = (props: IProps) => {
helperText: "必须输入模板名称", helperText: "必须输入模板名称",
}); });
return false; return false;
} else if (title.length > 15) { } else if (title.length > 50) {
setTitleHelper({ setTitleHelper({
error: true, error: true,
helperText: "格式不正确,必须在15字符以内,仅限大小写字母、数字、中文", helperText: "格式不正确,必须在15字符以内,仅限大小写字母、数字、中文",
......
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