diff --git a/react-ui/config/proxy.ts b/react-ui/config/proxy.ts
index 2b02d8f0..527bff75 100644
--- a/react-ui/config/proxy.ts
+++ b/react-ui/config/proxy.ts
@@ -16,8 +16,8 @@ export default {
'/api/': {
// 要代理的地址
// target: 'http://172.20.32.181:31205',
- // target: 'http://172.20.32.98:8082',
- target: 'http://172.20.32.150:8082',
+ target: 'http://172.20.32.98:8082',
+ // target: 'http://172.20.32.150:8082',
// 配置了这个可以从 http 代理到 https
// 依赖 origin 的功能可能需要这个,比如 cookie
changeOrigin: true,
diff --git a/react-ui/src/pages/Dataset/index.less b/react-ui/src/pages/Dataset/index.less
index 8be59a9d..9ab21750 100644
--- a/react-ui/src/pages/Dataset/index.less
+++ b/react-ui/src/pages/Dataset/index.less
@@ -223,36 +223,50 @@
flex: 1;
flex-wrap: wrap;
align-content: flex-start;
- width: 100%;
+ width: 103%;
.dataItem {
position: relative;
- width: 32%;
- height: 66px;
- margin: 0 15px 18px 0;
- background: rgba(128, 128, 128, 0.05);
- border-radius: 8px;
- box-shadow: 0px 0px 12px rgba(75, 84, 137, 0.05);
+ width: 23%;
+ height:164px;
+ background:#ffffff;
+ border:1px solid;
+ border-color:#eaeaea;
+ border-radius:4px;
+ margin: 0 20px 25px 0;
cursor: pointer;
.itemText {
position: absolute;
- top: 10px;
+ top: 20px;
left: 20px;
color: #1d1d20;
- font-size: 15px;
+ font-size: 16px;
+ }
+ .itemDescripition{
+ position: absolute;
+ top: 57px;
+ left: 20px;
+ padding-right: 28px;
+ color:#575757;
+ font-size:14px;
+ word-break: break-all;
+ overflow: hidden;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
}
.itemTime {
position: absolute;
- bottom: 10px;
+ bottom: 22px;
left: 20px;
color: #808080;
- font-size: 14px;
+ font-size: 13px;
}
.itemIcon {
position: absolute;
right: 20px;
- bottom: 10px;
+ bottom: 22px;
color: #808080;
- font-size: 14px;
+ font-size: 13px;
}
}
}
diff --git a/react-ui/src/pages/Dataset/personalData.jsx b/react-ui/src/pages/Dataset/personalData.jsx
index cbebbd0a..f5632d0d 100644
--- a/react-ui/src/pages/Dataset/personalData.jsx
+++ b/react-ui/src/pages/Dataset/personalData.jsx
@@ -269,8 +269,9 @@ const PublicData = (React.FC = () => {
return (
routeToIntro(e, item)}>
{item.name}
+
{item.description}
- 最近更新: {moment(item.update_time).format('YYYY-MM-DD')}
+ {item.create_by}
![]()
{
src={`/assets/images/upload-icon.png`}
alt=""
/>
-
1582
+
最近更新: {moment(item.update_time).format('YYYY-MM-DD')}
);
diff --git a/react-ui/src/pages/Pipeline/editPipeline/index.jsx b/react-ui/src/pages/Pipeline/editPipeline/index.jsx
index 5d31298a..94989ae5 100644
--- a/react-ui/src/pages/Pipeline/editPipeline/index.jsx
+++ b/react-ui/src/pages/Pipeline/editPipeline/index.jsx
@@ -101,22 +101,32 @@ const EditPipeline = () => {
openParamsDrawer();
return;
}
- const data = graph.save();
- console.log(data);
- const params = {
- ...locationParams,
- dag: JSON.stringify(data),
- global_param: JSON.stringify(res.global_param),
- };
- saveWorkflow(params).then((ret) => {
- message.success('保存成功');
- closeParamsDrawer();
- setTimeout(() => {
- if (val) {
- navgite({ pathname: `/pipeline` });
- }
- }, 500);
- });
+ const [propsRes, propsError] = await to(propsRef.current.getFieldsValue());
+ console.log(await to(propsRef.current.getFieldsValue()));
+ if (propsError) {
+ message.error('基本信息必填项需配置');
+ // handlerClick();
+ return;
+ }
+ propsRef.current.propClose();
+ setTimeout(() => {
+ const data = graph.save();
+ console.log(data);
+ const params = {
+ ...locationParams,
+ dag: JSON.stringify(data),
+ global_param: JSON.stringify(res.global_param),
+ };
+ saveWorkflow(params).then((ret) => {
+ message.success('保存成功');
+ closeParamsDrawer();
+ setTimeout(() => {
+ if (val) {
+ navgite({ pathname: `/pipeline` });
+ }
+ }, 500);
+ });
+ }, 500);
};
const handlerClick = (e) => {
e.stopPropagation();
diff --git a/react-ui/src/pages/Pipeline/editPipeline/props.jsx b/react-ui/src/pages/Pipeline/editPipeline/props.jsx
index 5ed82de9..2db770f5 100644
--- a/react-ui/src/pages/Pipeline/editPipeline/props.jsx
+++ b/react-ui/src/pages/Pipeline/editPipeline/props.jsx
@@ -1,5 +1,6 @@
import { pick } from '@/utils/index';
import { openAntdModal } from '@/utils/modal';
+import { to } from '@/utils/promise';
import { Icon } from '@umijs/max';
import { Button, Drawer, Form, Input } from 'antd';
import { forwardRef, useImperativeHandle, useState } from 'react';
@@ -8,6 +9,7 @@ import Styles from './editPipeline.less';
const { TextArea } = Input;
const Props = forwardRef(({ onParentChange }, ref) => {
const [form] = Form.useForm();
+
const [stagingItem, setStagingItem] = useState({});
const [open, setOpen] = useState(false);
const [selectedModel, setSelectedModel] = useState(undefined);
@@ -59,6 +61,15 @@ const Props = forwardRef(({ onParentChange }, ref) => {
console.log('Failed:', errorInfo);
};
useImperativeHandle(ref, () => ({
+ getFieldsValue: async () => {
+ const [propsRes, propsError] = await to(form.validateFields());
+ if (propsRes && !propsError) {
+ const values = form.getFieldsValue();
+ return values;
+ } else {
+ return Promise.reject(propsError);
+ }
+ },
showDrawer(e) {
if (e.item && e.item.getModel()) {
// console.log(e.item.getModel().in_parameters);
@@ -83,6 +94,15 @@ const Props = forwardRef(({ onParentChange }, ref) => {
setOpen(true);
}
},
+ propClose: async () => {
+ setOpen(false);
+ const [openRes, propsError] = await to(setOpen(false));
+ console.log(setOpen(false));
+ },
+ // propClose() {
+
+ // setOpen(false);
+ // },
}));
// 选择数据集、模型