Commit 74c312d1 authored by wuyongsheng's avatar wuyongsheng

Merge branch 'feat-20220801' into 'release'

Feat 20220801

See merge request !66
parents c1b2afe3 1d6dd4f4
......@@ -14,10 +14,11 @@ import { ITask } from "@/views/Project/ProjectSubmitWork/interface";
type IProps = {
operatorList: ITask[];
setOperatorList: any;
setInputActive: any;
};
const OperatorList = (props: IProps) => {
const { operatorList, setOperatorList } = props; // 流程图中流算子列表
const { operatorList, setOperatorList, setInputActive } = props; // 流程图中流算子列表
const { currentProjectStore } = useStores();
const [list, setList] = useState<ITask[]>([]); // 算子列表
const productId = toJS(currentProjectStore.currentProductInfo.id); // 产品ID
......@@ -205,6 +206,12 @@ const OperatorList = (props: IProps) => {
value={keyword}
onChange={keywordChange}
onKeyUp={handleKeywordKeyUp}
onFocus={() => {
setInputActive(true);
}}
onBlur={() => {
setInputActive(false);
}}
sx={{ fontSize: "14px" }}
/>
</div>
......
......@@ -21,6 +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 [showCustomOperator, setShowCustomOperator] = useState(false);
/** 设置选中唯一标识符 */
......@@ -176,6 +177,7 @@ const CustomOperator = observer((props: IProps) => {
<OperatorList
operatorList={operatorList}
setOperatorList={setOperatorList}
setInputActive={setInputActive}
/>
<BatchOperatorFlow
tasks={operatorList}
......@@ -183,7 +185,7 @@ const CustomOperator = observer((props: IProps) => {
type="edit"
onFlowNodeClick={handleNodeClick}
flowNodeDraggable={true}
ListenState={!saveFormDialog}
ListenState={!saveFormDialog && !inputActive}
showVersion={true}
showControls={false}
/>
......
......@@ -48,6 +48,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
const [saveOpen, setSaveOpen] = useState(false); // 另存为弹窗显示控制
const [downloadOpen, setDownloadOpen] = useState(false); // 下载弹窗显示控制
const [showAnimation, setShowAnimation] = useState(true); // 弹窗动画变化中
const [firstGetList, setFirstGetList] = useState(true); // 第一次请求列表
// 解决图像渲染造成弹窗卡顿的问题
useEffect(() => {
......@@ -103,7 +104,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
name: name,
page: paramsPage,
size,
index: searchDataType ? `meta.${searchDataType}` : "",
index: searchDataType ? `${searchDataType}` : "",
sort: sort === "null" ? "" : sort,
query: keyword,
})
......@@ -111,14 +112,31 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
setList(res.data.list);
setCount(res.data.totalPage - 1);
if (res.data.list && res.data.list.length > 0) {
if (res.data.list[0].meta) {
const meta = res.data.list[0].meta;
const arr = Object.keys(meta).map((item) => {
return { label: item, value: item };
if (res.data.list[0]) {
let arr: any = [];
Object.keys(res.data.list[0]).forEach((item) => {
if (
![
"canonical_smiles",
"id",
"mol",
"mol2",
"pdb",
"sdf",
"sdf2d",
"sdf3d",
"smiles",
].includes(item)
) {
arr.push({ label: item, value: item });
}
});
if (firstGetList) {
setdataTypes(arr);
setSearchDataType(arr[0].value);
}
setFirstGetList(false);
}
}
})
?.catch((error) => {
......
......@@ -213,7 +213,10 @@ const ConfigForm = (props: ConfigFormProps) => {
{parameter.classTypeName}
</span>
</div>
<MyTooltip title={parameter.description} placement="right">
<MyTooltip
title={parameter.description || parameter.name}
placement="right"
>
<div className={styles.parameterContent}>
{(parameter.domType || "").toLowerCase() === "file" && (
<MyInput
......
......@@ -4,7 +4,7 @@
/* padding: 12px 20px; */
border: 1px solid #e6e8eb;
border-left: 4px solid #e6e8eb;
display: flex;
/* display: flex; */
align-items: center;
}
......@@ -37,7 +37,11 @@
}
.batchRotate {
transform: translateX(-50%) rotate(-90deg);
margin-bottom: 20px;
line-height: 22px;
font-size: 14px;
/* text-align: center; */
/* transform: translateX(-50%) rotate(-90deg); */
}
.handleBox::before{
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-12 11:20:29
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-09 11:24:38
* @LastEditTime: 2022-08-22 11:45:44
* @FilePath: /bkunyun/src/views/Project/components/Flow/components/BatchNode.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -68,11 +68,12 @@ const BatchNode = (props: IBatchNode) => {
className={styles.handleBox}
id={item.name}
style={{
background: "#fff ",
backgroundColor: "rgba(19, 112, 255, 1)",
border: item.error
? "1px solid #FF4E4E"
: "1px solid #D1D6DE",
: "1px solid #fff",
left: index * 24 + 20,
top: '-47px',
}}
type="target"
position={Position.Top}
......@@ -99,8 +100,8 @@ const BatchNode = (props: IBatchNode) => {
className={styles.handleBox}
id={item.name}
style={{
background: "#fff ",
border: "1px solid #D1D6DE",
backgroundColor: "rgba(19, 112, 255, 1)",
border: "1px solid #FFF",
left: index * 24 + 20,
}}
type="source"
......
......@@ -151,13 +151,13 @@ const BatchOperatorFlow = (props: IProps) => {
},
inStyle: {
backgroundColor: "rgba(19, 112, 255, 1)",
border: "none",
border: "1px solid #FFF",
left: 12,
top: "-2px",
},
outStyle: {
backgroundColor: "rgba(19, 112, 255, 1)",
border: "none",
border: "1px solid #FFF",
left: 12,
bottom: "-2px",
},
......
......@@ -270,14 +270,14 @@ const Flow = (props: IProps) => {
return a - b;
});
let width = 176,
height = 22;
height = 66;
if (positionXArr?.length) {
const val = positionXArr[positionXArr.length - 1] + 150;
const val = positionXArr[positionXArr.length - 1] + 144;
width = val > 176 ? val : width;
}
if (positionYArr?.length) {
const val = positionYArr[positionYArr.length - 1] + 6;
height = val > 22 ? val : height;
const val = positionYArr[positionYArr.length - 1] + 74;
height = val > 66 ? val : height;
}
return {
width,
......@@ -318,7 +318,8 @@ const Flow = (props: IProps) => {
/** 样式 */
style: {
...getBatchStyle(item),
padding: isFlowNode(item.id) ? "20px" : "12px 20px",
marginTop: '-44px',
padding: "12px 20px",
},
},
/** 坐标 */
......
......@@ -192,7 +192,10 @@ const ParameterSetting = (props: IParameterSettingProps) => {
const renderInput = useCallback(
(parameter: IParameter) => {
return (
<MyTooltip title={parameter.description} placement="right">
<MyTooltip
title={parameter.description || parameter.name}
placement="right"
>
<div>
{(parameter.domType || "").toLowerCase() === "file" && (
<MyInput
......@@ -581,6 +584,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
onChange={(e: any) =>
handleHiddenChange(e, parameter.name || "")
}
disabled={true}
></MySwitch>
</div>
</div>
......
......@@ -50,7 +50,7 @@ export const getCustomTemplateParameterCheckResult = (
} else if (parameter.hidden && !parameter.linked) {
return {
error: true,
helperText: '该输入为必填,需在右侧视图编辑区连接输入文件或重新改回“开启”状态',
helperText: '该输入为必填,需在右侧视图编辑区连接输入文件',
deleteLine: false,
}
}
......
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