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";
type projectInfo = {
id?: string;
......@@ -12,14 +20,22 @@ type productInfo = {
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(
sessionStorage.getItem("currentProductInfo") || "{}"
const localStorageCurrentProductInfo = JSON.parse(
localStorage.getItem(`currentProductInfo_${userInfo.name}`) || "{}"
);
const sessionStorageProjectList = JSON.parse(
sessionStorage.getItem("projectList") || "[]"
const localStorageProjectList = JSON.parse(
localStorage.getItem(`projectList_${userInfo.name}`) || "[]"
);
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>) => {
this.projectList = list;
sessionStorage.setItem("projectList", JSON.stringify(list));
localStorage.setItem(`projectList_${userInfo.name}`, JSON.stringify(list));
};
changeProject = (project: projectInfo) => {
this.currentProjectInfo = project;
sessionStorage.setItem("currentProjectInfo", JSON.stringify(project));
localStorage.setItem(`currentProjectInfo_${userInfo.name}`, JSON.stringify(project));
};
changeProductInfo = (productInfo: productInfo) => {
this.currentProductInfo = productInfo;
sessionStorage.setItem("currentProductInfo", JSON.stringify(productInfo));
localStorage.setItem(`currentProductInfo_${userInfo.name}`, JSON.stringify(productInfo));
};
}
......
/*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-07 18:37:53
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-15 17:49:27
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-23 11:19:11
* @FilePath: /bkunyun/src/utils/util.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -67,7 +67,7 @@ export const getTokenInfo = () => {
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) => {
return IsNumberLetterChineseReg.test(string);
......
......@@ -21,7 +21,7 @@ const CustomOperator = observer((props: IProps) => {
const Message = useMessage();
const [operatorList, setOperatorList] = useState<ITask[]>(initOperatorList);
const [saveFormDialog, setSaveFormDialog] = useState(false);
const [inputActive, setInputActive] = useState(true);
const [inputActive, setInputActive] = useState(false);
// const [showCustomOperator, setShowCustomOperator] = useState(false);
/** 设置选中唯一标识符 */
......
......@@ -125,7 +125,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
"sdf",
"sdf2d",
"sdf3d",
"smiles",
// "smiles",
].includes(item)
) {
arr.push({ label: item, value: item });
......
......@@ -75,7 +75,7 @@
font-size: 14px;
}
.outputItemName{
max-width: 190px;
max-width: 172px;
white-space: nowrap;
display: block;
overflow: hidden;
......
......@@ -50,7 +50,6 @@ const BatchOperatorFlow = (props: IProps) => {
showVersion = false,
...other
} = props;
console.log(tasks);
/** 自定义的节点类型 */
const nodeTypes = useMemo(() => {
return { batchNode: BatchNode, flowNode: FlowNode };
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-12 11:29:46
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -98,7 +98,7 @@ const FlowNode = (props: any) => {
);
})
: null}
<div>
<div style={{display: 'flex', alignItems: 'center'}}>
<span style={{fontSize: '12px', lineHeight: '24px'}}>{title || ""} {showVersion && version}</span>
{flowType !== "edit" && isCheck ? (
<span className={styles.successDot}></span>
......
......@@ -11,7 +11,7 @@ import ReactFlow, {
import { useCallback, useEffect, useMemo, useState } from "react";
import { uuid } from "@/utils/util";
import { IEdge, IParameter, ITask } from "../../ProjectSubmitWork/interface";
import { IParameter, ITask } from "../../ProjectSubmitWork/interface";
import { ILine } from "./interface";
import BatchNode from "./components/BatchNode";
import FlowNode from "./components/FlowNode";
......@@ -61,7 +61,7 @@ const Flow = (props: IProps) => {
showControls = true,
...other
} = props;
console.log(tasks);
/** 自定义的节点类型 */
const nodeTypes = useMemo(() => {
return { batchNode: BatchNode, flowNode: FlowNode };
......@@ -221,7 +221,7 @@ const Flow = (props: IProps) => {
// const nodesInputAndOutputStatus = useCallback(
// (id: string) => {
// /** 所有的连线 */
// const lineArr: IEdge[] = [];
// const lineArr: ] = [];
// tasks?.length &&
// tasks.forEach((item) => {
// item.edges?.length && lineArr.push(...item.edges);
......
/*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-15 15:47:16
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-07-15 16:30:59
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-23 11:32:19
* @FilePath: /bkunyun/src/views/WorkFlowEdit/components/SaveCustomTemplate/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -107,7 +107,7 @@ const SaveCustomTemplate = (props: IProps) => {
helperText: "必须输入模板名称",
});
return false;
} else if (title.length > 15) {
} else if (title.length > 50) {
setTitleHelper({
error: true,
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