Commit 5dcaafc4 authored by chenshouchao's avatar chenshouchao

Merge branch 'feat-20220718' into 'release'

Feat 20220718

See merge request !37
parents 9b5a2318 9c3854a2
......@@ -8,12 +8,12 @@
z-index: 100;
display: flex;
flex-direction: column;
animation: showBG 1s ease;
-webkit-animation: showBG 1s ease;
animation: showBG 1.1s ease;
-webkit-animation: showBG 1.1s ease;
}
.drawerBoxHidden {
animation: hiddenBG 1s ease;
-webkit-animation: hiddenBG 1s ease;
animation: hiddenBG 1.1s ease;
-webkit-animation: hiddenBG 1.1s ease;
}
.closeBox {
display: flex;
......@@ -24,12 +24,12 @@
top: 0;
left: 0;
align-items: center;
animation: showClose 1s ease;
-webkit-animation: showClose 1s ease;
animation: showClose 1.1s ease;
-webkit-animation: showClose 1.1s ease;
}
.closeBoxHidden {
animation: hiddenClose 1s ease;
-webkit-animation: hiddenClose 1s ease;
animation: hiddenClose 1.1s ease;
-webkit-animation: hiddenClose 1.1s ease;
}
.closeiIcon {
position: absolute;
......@@ -49,12 +49,12 @@
/* padding: 24px 32px; */
box-sizing: border-box;
overflow: scroll;
animation: showDrawer 1s ease;
-webkit-animation: showDrawer 1s ease;
animation: showDrawer 1.1s ease;
-webkit-animation: showDrawer 1.1s ease;
}
.contentBoxHidden {
animation: hiddenDrawer 1s ease;
-webkit-animation: hiddenDrawer 1s ease;
animation: hiddenDrawer 1.1s ease;
-webkit-animation: hiddenDrawer 1.1s ease;
}
@keyframes showBG {
......
......@@ -63,48 +63,48 @@ const MyCircularProgress = (props: IMyCircularProgressProps) => {
</div>
);
} else {
if (children) {
return children;
} else {
return (
return (
<div
style={{
width: "100%",
height: "100%",
position: "absolute",
top: 0,
zIndex: zIndex,
minHeight: minHeight,
}}
>
<div
style={{
width: "100%",
height: "100%",
position: "absolute",
top: 0,
zIndex: zIndex,
minHeight: minHeight,
opacity: 0.6,
background: "#fff",
}}
></div>
<div
style={{
width: "100%",
height: "100%",
display: "flex",
justifyContent: "center",
alignItems: "center",
maxHeight: maxHeight,
}}
>
<div
style={{
width: "100%",
height: "100%",
position: "absolute",
top: 0,
opacity: 0.6,
background: "#fff",
}}
></div>
<div
style={{
width: "100%",
height: "100%",
display: "flex",
justifyContent: "center",
alignItems: "center",
maxHeight: maxHeight,
}}
>
<CircularProgress></CircularProgress>
</div>
<CircularProgress></CircularProgress>
</div>
);
}
</div>
);
}
} else {
return null;
if (children) {
return <>{children}</>;
} else {
return null;
}
}
};
......
......@@ -19,6 +19,7 @@ import classNames from "classnames";
import Save from "./save";
import NoData from "@/components/BusinessComponents/NoData";
import Download from "./download";
import { useMessage } from "@/components/MySnackbar";
import style from "./index.module.css";
type ISeeDatasetProps = {
......@@ -31,6 +32,7 @@ type ISeeDatasetProps = {
const SeeDataset = observer((props: ISeeDatasetProps) => {
const { path, name, fileToken, projectId } = props;
const Message = useMessage();
const { currentProjectStore } = useStores();
const productId = toJS(currentProjectStore.currentProductInfo.id); // 产品id 如:cadd
const token = getToken();
......@@ -98,24 +100,29 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
index: searchDataType ? `meta.${searchDataType}` : "",
sort: sort === "null" ? "" : sort,
query: keyword,
})?.then((res) => {
setList(res.data.list);
setCount(res.data.totalPage - 1);
if (res.data.list) {
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 };
});
setdataTypes(arr);
setSearchDataType(arr[0].value);
})
?.then((res) => {
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 };
});
setdataTypes(arr);
setSearchDataType(arr[0].value);
} else {
setdataTypes([]);
}
} else {
setdataTypes([]);
}
} else {
setdataTypes([]);
}
});
})
?.catch((error) => {
console.log(error);
Message.error(error?.response?.data?.message || "获取数据集信息失败");
});
},
[
productId,
......@@ -127,6 +134,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
searchDataType,
sort,
keyword,
Message,
]
);
......@@ -361,7 +369,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
</div>
</>
)}
{list.length === 0 && <NoData></NoData>}
{list.length === 0 && <NoData text="未搜索到相关数据"></NoData>}
</div>
</div>
<div className={style.foot}>
......
......@@ -17,8 +17,7 @@
}
.templateBlock {
width: 21.4876%;
height: 160px;
height: 194px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #ebedf0;
......@@ -26,8 +25,39 @@
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 8px;
margin-bottom: 16px;
position: relative;
box-sizing: border-box;
}
@media screen and (max-width:1220px) {
.templateBlock {
width: 49%;
margin-right: 2%;
}
.templateBlock:nth-child(2n){
margin-right: 0;
}
}
@media screen and (min-width:1220px) and (max-width:1600px) {
.templateBlock {
width: 32.423%;
margin-right: 1.365%;
}
.templateBlock:nth-child(3n){
margin-right: 0;
}
}
@media screen and (min-width:1600px) {
.templateBlock {
width: 24%;
margin-right: 1.333%;
}
.templateBlock:nth-child(4n){
margin-right: 0;
}
}
.addTemplateMask {
......
......@@ -101,12 +101,12 @@ const ProjectMembers = observer(() => {
}, 300);
}, [templateName, getTemplateInfo, projectIdData]);
// 回车搜索
// 回车搜索
const handleKeyWordChangeKeyUp = (e: any) => {
if (e.keyCode === 13) {
setTemplateName(e.target.value);
}
}
if (e.keyCode === 13) {
setTemplateName(e.target.value);
}
}
return (
<Box className={styles.headerBox}>
......@@ -145,7 +145,7 @@ const ProjectMembers = observer(() => {
</Box>
)}
{templateList.length > 0 && (
<Box sx={{ display: "flex", flexWrap: "wrap", marginLeft: "-8px" }}>
<Box sx={{ display: "flex", flexWrap: "wrap" }}>
{templateList &&
templateList.length > 0 &&
templateList.map((item, key) => {
......
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