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 @@ ...@@ -8,12 +8,12 @@
z-index: 100; z-index: 100;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
animation: showBG 1s ease; animation: showBG 1.1s ease;
-webkit-animation: showBG 1s ease; -webkit-animation: showBG 1.1s ease;
} }
.drawerBoxHidden { .drawerBoxHidden {
animation: hiddenBG 1s ease; animation: hiddenBG 1.1s ease;
-webkit-animation: hiddenBG 1s ease; -webkit-animation: hiddenBG 1.1s ease;
} }
.closeBox { .closeBox {
display: flex; display: flex;
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
top: 0; top: 0;
left: 0; left: 0;
align-items: center; align-items: center;
animation: showClose 1s ease; animation: showClose 1.1s ease;
-webkit-animation: showClose 1s ease; -webkit-animation: showClose 1.1s ease;
} }
.closeBoxHidden { .closeBoxHidden {
animation: hiddenClose 1s ease; animation: hiddenClose 1.1s ease;
-webkit-animation: hiddenClose 1s ease; -webkit-animation: hiddenClose 1.1s ease;
} }
.closeiIcon { .closeiIcon {
position: absolute; position: absolute;
...@@ -49,12 +49,12 @@ ...@@ -49,12 +49,12 @@
/* padding: 24px 32px; */ /* padding: 24px 32px; */
box-sizing: border-box; box-sizing: border-box;
overflow: scroll; overflow: scroll;
animation: showDrawer 1s ease; animation: showDrawer 1.1s ease;
-webkit-animation: showDrawer 1s ease; -webkit-animation: showDrawer 1.1s ease;
} }
.contentBoxHidden { .contentBoxHidden {
animation: hiddenDrawer 1s ease; animation: hiddenDrawer 1.1s ease;
-webkit-animation: hiddenDrawer 1s ease; -webkit-animation: hiddenDrawer 1.1s ease;
} }
@keyframes showBG { @keyframes showBG {
......
...@@ -62,9 +62,6 @@ const MyCircularProgress = (props: IMyCircularProgressProps) => { ...@@ -62,9 +62,6 @@ const MyCircularProgress = (props: IMyCircularProgressProps) => {
{children} {children}
</div> </div>
); );
} else {
if (children) {
return children;
} else { } else {
return ( return (
<div <div
...@@ -102,10 +99,13 @@ const MyCircularProgress = (props: IMyCircularProgressProps) => { ...@@ -102,10 +99,13 @@ const MyCircularProgress = (props: IMyCircularProgressProps) => {
</div> </div>
); );
} }
} } else {
if (children) {
return <>{children}</>;
} else { } else {
return null; return null;
} }
}
}; };
export default MyCircularProgress; export default MyCircularProgress;
...@@ -19,6 +19,7 @@ import classNames from "classnames"; ...@@ -19,6 +19,7 @@ import classNames from "classnames";
import Save from "./save"; import Save from "./save";
import NoData from "@/components/BusinessComponents/NoData"; import NoData from "@/components/BusinessComponents/NoData";
import Download from "./download"; import Download from "./download";
import { useMessage } from "@/components/MySnackbar";
import style from "./index.module.css"; import style from "./index.module.css";
type ISeeDatasetProps = { type ISeeDatasetProps = {
...@@ -31,6 +32,7 @@ type ISeeDatasetProps = { ...@@ -31,6 +32,7 @@ type ISeeDatasetProps = {
const SeeDataset = observer((props: ISeeDatasetProps) => { const SeeDataset = observer((props: ISeeDatasetProps) => {
const { path, name, fileToken, projectId } = props; const { path, name, fileToken, projectId } = props;
const Message = useMessage();
const { currentProjectStore } = useStores(); const { currentProjectStore } = useStores();
const productId = toJS(currentProjectStore.currentProductInfo.id); // 产品id 如:cadd const productId = toJS(currentProjectStore.currentProductInfo.id); // 产品id 如:cadd
const token = getToken(); const token = getToken();
...@@ -98,10 +100,11 @@ const SeeDataset = observer((props: ISeeDatasetProps) => { ...@@ -98,10 +100,11 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
index: searchDataType ? `meta.${searchDataType}` : "", index: searchDataType ? `meta.${searchDataType}` : "",
sort: sort === "null" ? "" : sort, sort: sort === "null" ? "" : sort,
query: keyword, query: keyword,
})?.then((res) => { })
?.then((res) => {
setList(res.data.list); setList(res.data.list);
setCount(res.data.totalPage - 1); setCount(res.data.totalPage - 1);
if (res.data.list) { if (res.data.list && res.data.list.length > 0) {
if (res.data.list[0].meta) { if (res.data.list[0].meta) {
const meta = res.data.list[0].meta; const meta = res.data.list[0].meta;
const arr = Object.keys(meta).map((item) => { const arr = Object.keys(meta).map((item) => {
...@@ -115,6 +118,10 @@ const SeeDataset = observer((props: ISeeDatasetProps) => { ...@@ -115,6 +118,10 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
} else { } else {
setdataTypes([]); setdataTypes([]);
} }
})
?.catch((error) => {
console.log(error);
Message.error(error?.response?.data?.message || "获取数据集信息失败");
}); });
}, },
[ [
...@@ -127,6 +134,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => { ...@@ -127,6 +134,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
searchDataType, searchDataType,
sort, sort,
keyword, keyword,
Message,
] ]
); );
...@@ -361,7 +369,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => { ...@@ -361,7 +369,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
</div> </div>
</> </>
)} )}
{list.length === 0 && <NoData></NoData>} {list.length === 0 && <NoData text="未搜索到相关数据"></NoData>}
</div> </div>
</div> </div>
<div className={style.foot}> <div className={style.foot}>
......
...@@ -17,8 +17,7 @@ ...@@ -17,8 +17,7 @@
} }
.templateBlock { .templateBlock {
width: 21.4876%; height: 194px;
height: 160px;
background: #ffffff; background: #ffffff;
border-radius: 4px; border-radius: 4px;
border: 1px solid #ebedf0; border: 1px solid #ebedf0;
...@@ -26,8 +25,39 @@ ...@@ -26,8 +25,39 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
margin: 8px; margin-bottom: 16px;
position: relative; 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 { .addTemplateMask {
......
...@@ -145,7 +145,7 @@ const ProjectMembers = observer(() => { ...@@ -145,7 +145,7 @@ const ProjectMembers = observer(() => {
</Box> </Box>
)} )}
{templateList.length > 0 && ( {templateList.length > 0 && (
<Box sx={{ display: "flex", flexWrap: "wrap", marginLeft: "-8px" }}> <Box sx={{ display: "flex", flexWrap: "wrap" }}>
{templateList && {templateList &&
templateList.length > 0 && templateList.length > 0 &&
templateList.map((item, key) => { 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