diff --git a/package.json b/package.json index cfa8ad5bd..03cc08252 100644 --- a/package.json +++ b/package.json @@ -179,7 +179,7 @@ "/src/**/?(*.)(spec|test).{js,jsx,mjs}" ], "testEnvironment": "node", - "testURL": "https://testforgeplus.trustie.net", + "testURL": "http://172.20.32.203:4000", "transform": { "^.+\\.(js|jsx|mjs)$": "/node_modules/babel-jest", "^.+\\.css$": "/config/jest/cssTransform.js", @@ -204,7 +204,7 @@ "eslintConfig": { "extends": "react-app" }, - "proxy": "https://testforgeplus.trustie.net/", + "proxy": "http://172.20.32.203:4000/", "port": "3007", "devDependencies": { "@babel/core": "^7.23.6", diff --git a/src/factory/components/Feature/index.scss b/src/factory/components/Feature/index.scss index 899a3d161..99d259bc3 100644 --- a/src/factory/components/Feature/index.scss +++ b/src/factory/components/Feature/index.scss @@ -89,7 +89,7 @@ img { width: 614px; - margin-top:48px; + margin-top: 48px; } &-gif { @@ -238,6 +238,11 @@ color: #091221; font-size: 14px; cursor: pointer; + + &:hover { + border-color: #164ce4; + color: #164ce4; + } } } } diff --git a/src/factory/components/Resource/index.jsx b/src/factory/components/Resource/index.jsx index 8819dc159..40099ea6d 100644 --- a/src/factory/components/Resource/index.jsx +++ b/src/factory/components/Resource/index.jsx @@ -85,8 +85,8 @@ const Resource = forwardRef(({ zoneId }, ref) => { const animations = [ { y: "-5%", scale: 0.85, duration: 1 }, { y: "-50%", scale: 0.9, duration: 1 }, - { y: "-150%", scale: 0.95, duration: 1 }, - { y: "-230%", scale: 0.98, duration: 1.5 } + { y: "-265%", scale: 0.95, duration: 1.2 }, + { y: "-415%", scale: 0.98, duration: 2 } ]; timelineRef.current.to(panel, { diff --git a/src/factory/components/Resource/index.scss b/src/factory/components/Resource/index.scss index 49b607df8..a25d2252d 100644 --- a/src/factory/components/Resource/index.scss +++ b/src/factory/components/Resource/index.scss @@ -1,6 +1,6 @@ .factory-resource { position: relative; - min-height: 2300px; + min-height: 2800px; overflow: hidden; margin-top: 56px; @@ -47,10 +47,13 @@ width: 1600px; border-radius: 30px; // box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); - // transition: transform 0.3s ease; + transition: z-index 0.3s ease; padding: 50px; z-index: 1; // transform-origin: center center; + // &:hover { + // z-index: 100; + // } } .resource-2 { @@ -180,7 +183,7 @@ } .resource-3 { - top: 1170px; + top: 1900px; height: 622px; background: #d5dfff; z-index: 3; @@ -225,7 +228,7 @@ } } .resource-4 { - top: 1810px; + top: 3010px; height: 622px; background: #DFF0EC; z-index: 4; diff --git a/src/factory/lessons/index.jsx b/src/factory/lessons/index.jsx index 07d666fc3..8b1d54fe4 100644 --- a/src/factory/lessons/index.jsx +++ b/src/factory/lessons/index.jsx @@ -11,12 +11,11 @@ import manual1 from '../../images/factory/lessons/manual-1.webp' import manual2 from '../../images/factory/lessons/manual-2.webp' import '../common.scss' import { Link } from "react-router-dom"; -import Waves from '../components/Waves/index' import moment from 'moment'; import { getSourceList, httpUrl } from '../api' import { downloadFunc } from '../../forge/Utils/utils' import chapterBg from '../../images/factory/lessons/chapter-bg.webp' -import { message } from 'antd'; +import InfiniteScroll from 'react-infinite-scroller'; const backList = [back1, back2, back3] @@ -30,6 +29,11 @@ function Index(props) { const [manualList, setManualList] = useState([]); const [lesson, setLesson] = useState([]) const [docList, setDocList] = useState([]) + const chapterListRef = useRef(null); + const pageSize = 10 + const [pageNum, setPageNum] = useState(1) + const [loading, setLoading] = useState(false) + const hasMore = useRef(true) useEffect(() => { document.title = '学习专区-软件工厂专区'; @@ -39,6 +43,12 @@ function Index(props) { getDocList(); }, []); + useEffect(() => { + if (chapterListRef.current) { + chapterListRef.current.scrollTop = 88 * (chapterList.length - nowTop < 4 ? chapterList.length - 4 : nowTop) + } + }, [nowTop]); + const getLessonList = () => { getSourceList({ id: factoryZoneId, keywords: lessonId }).then(res => { const rows = [] @@ -95,20 +105,38 @@ function Index(props) { setManualList(rows); }); } + const getDocList = (isMore = false) => { + if (!hasMore.current) return + let params = { + id: factoryZoneId, + keywords: docId, + pageNum: isMore ? isMore : pageNum, + pageSize + } - const getDocList = () => { - getSourceList({ id: factoryZoneId, keywords: docId }).then(res => { - const rows = [] - res.data.rows.forEach(e => { - let extendData = {} - if (e.extendData) { - extendData = JSON.parse(e.extendData) + setLoading(true) + getSourceList(params).then(res => { + setLoading(false) + if (res.data.rows) { + const rows = [] + res.data.rows.forEach(e => { + let extendData = {} + if (e.extendData) { + extendData = JSON.parse(e.extendData) + } + rows.push({ ...e, extendDataUrl: extendData.url, extendDataHeadImg: extendData.headImg }) + }); + + if (isMore) { + setPageNum(isMore) + setDocList([...docList, ...rows]) + } else { + setDocList(rows); } - rows.push({ ...e, extendDataUrl: extendData.url, extendDataHeadImg: extendData.headImg }) - }); - setDocList(rows.slice(0, 6)); + hasMore.current = res.data.total > [...docList, ...rows].length + } }); - } + }; return (
@@ -125,10 +153,13 @@ function Index(props) {

{lesson.name}

{lesson.summary}

-
+
{ chapterList.map((item, index) => { - return
+ return
{ index < 10 ? 0{index + 1} : @@ -247,7 +278,7 @@ function Index(props) {
-

{item.summary}

+

{item.summary}

{moment(item.createTime).format('YYYY/MM/DD')}
@@ -265,9 +296,9 @@ function Index(props) {

{item.name}

+ }} disabled={!item.fileIds} className={!item.fileIds && 'disabled'} >{item.fileIds ? '下载' : '稍后下载'}

{item.summary}

@@ -278,31 +309,6 @@ function Index(props) { }
-
-

文档资料

-
- { - docList.map((item, index) => { - return
-
- -
-
-

{item.name}

-

{item.summary}

-
- {moment(item.createTime).format('YYYY/MM/DD')} - - 查看详情 - - -
-
-
- }) - } -
-

用户手册

@@ -322,16 +328,49 @@ function Index(props) {

{item.summary}

+ }} disabled={!item.fileIds} className={!item.fileIds && 'disabled-button'} >{item.fileIds ? '下载' : '稍后下载'}
}) }
- - +
+

文档资料

+ { + docList && docList.length > 0 && { getDocList(e) }} + hasMore={!loading && hasMore.current} + > +
+ { + docList.map((item, index) => { + return
+
+ +
+
+

{item.name}

+

{item.summary}

+
+ {moment(item.createTime).format('YYYY/MM/DD')} + + 查看详情 + + +
+
+
+ }) + } +
+
+ } +
) diff --git a/src/factory/lessons/index.scss b/src/factory/lessons/index.scss index 32e53837f..a2330955e 100644 --- a/src/factory/lessons/index.scss +++ b/src/factory/lessons/index.scss @@ -116,11 +116,18 @@ .chapter-wrapper { height: 387px; - overflow: hidden; .chapter-list { - transition: all .4s cubic-bezier(.25, .46, .45, .94); + margin-right: -7px; margin-left: 36px; + height: 387px; + overflow-y: scroll; + overflow-x: hidden; + transition: all .4s cubic-bezier(.25, .46, .45, .94); + + &:hover { + margin-right: 0px; + } .active { diff --git a/src/factory/resource/developmentTools/detail/index.scss b/src/factory/resource/developmentTools/detail/index.scss index 3ad889182..3addb95d1 100644 --- a/src/factory/resource/developmentTools/detail/index.scss +++ b/src/factory/resource/developmentTools/detail/index.scss @@ -40,7 +40,7 @@ .header-content { margin-top: 30px; width: 1600px; - height: 481px; + // height: 481px; position: relative; border-radius: 16px; padding: 60px 45px; @@ -140,10 +140,11 @@ .more-tools { display: flex; - margin-top: 20px; + margin-top: 5px; + max-width: 800px; + flex-wrap: wrap; span { - max-width: 200px; cursor: pointer; display: inline-block; background: #e9f2ff; @@ -154,9 +155,7 @@ font-family: alibaba; color: #091221; font-size: 15px; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; + margin-top: 15px !important; img { width: 19px; diff --git a/src/factory/resource/factoryVersion/index.jsx b/src/factory/resource/factoryVersion/index.jsx index e27fe55f9..be5f74ec2 100644 --- a/src/factory/resource/factoryVersion/index.jsx +++ b/src/factory/resource/factoryVersion/index.jsx @@ -53,31 +53,33 @@ function Index(props) {
生产线安装包

标准化生产线快速迭代版本和稳定支持版本

-
- { - versionList.map((item, index) => { - return
-
- -
-
-
-
-

{item.name}

- {index === 0 && } +
+
+ { + versionList.map((item, index) => { + return
+
+ +
- -
-

{item.summary}

-
- {item.createTime} +
+
+

{item.name}

+ {index === 0 && }
+ +
+

{item.summary}

+
+ {item.createTime} +
+
+
-
-
- }) - } + }) + } +

用户手册

diff --git a/src/factory/resource/factoryVersion/index.scss b/src/factory/resource/factoryVersion/index.scss index 949a26b40..9a743b336 100644 --- a/src/factory/resource/factoryVersion/index.scss +++ b/src/factory/resource/factoryVersion/index.scss @@ -29,13 +29,22 @@ font-size: 14px; } } + .scroller-wrapper { + margin-top: 59px; + margin-bottom: 90px; + height: 331px; + overflow: hidden; + transition: all 0.2s ease-in-out; + &:hover { + height: 341px; + margin-bottom: 80px; + } + } .version-content { width: 1600px; display: flex; - margin-top: 59px; justify-content: flex-start; - margin-bottom: 90px; overflow-x: auto; .version-item { diff --git a/src/factory/resource/index.jsx b/src/factory/resource/index.jsx index 8ca3a81ce..44eb8eda3 100644 --- a/src/factory/resource/index.jsx +++ b/src/factory/resource/index.jsx @@ -132,7 +132,7 @@ function Index(props) { { typeMap.map(item => (
setSelectedType(item.key)}> - + {item.name}
)) diff --git a/src/factory/resource/index.scss b/src/factory/resource/index.scss index 1eb348c1f..c29886709 100644 --- a/src/factory/resource/index.scss +++ b/src/factory/resource/index.scss @@ -224,6 +224,7 @@ .switch-item-active { background: #ffffff; box-shadow: 0px 0px 15px rgba(0, 74, 168, 0.05); + color: #164ce4; } } } diff --git a/src/factory/resource/softwareProject/index.scss b/src/factory/resource/softwareProject/index.scss index 8f3f6115a..75bd016a0 100644 --- a/src/factory/resource/softwareProject/index.scss +++ b/src/factory/resource/softwareProject/index.scss @@ -192,6 +192,8 @@ height: 38px; border-radius: 50%; margin-right: 14px; + background-color: #ffffff; + } .item-title {