-
+
{
chapterList.map((item, index) => {
- return
+ return
{
index < 10 ?
0{index + 1} :
{index + 1}
}
-
- {
- item.name
- }
-
+
+
+ {
+ item.name
+ }
+
+
+
})
@@ -150,7 +153,7 @@ function Index(props) {
{ setNowTop(e)}}
+ afterChange={e => { setNowTop(e) }}
dots={false}
>
{chapterList.map((item, index) => {
@@ -226,7 +229,7 @@ function Index(props) {
{item.domainName}
-
+
@@ -238,13 +241,13 @@ function Index(props) {
chapterList.slice(3).map((item, index) => {
return
-
{ window.open(item.extendDataUrl) }}>{item.name}
+
{item.name}
-
{item.summary}
+
{item.summary}
{moment(item.createTime).format('YYYY/MM/DD')}
@@ -260,8 +263,11 @@ function Index(props) {
return
{item.name}
- {/* */}
-
+
{item.summary}
@@ -314,7 +320,11 @@ function Index(props) {

{index === 0 ?
{item.name}
:
}
{item.summary}
-
+
})
}
diff --git a/src/factory/lessons/index.scss b/src/factory/lessons/index.scss
index e3b99aea5..bb6151d2d 100644
--- a/src/factory/lessons/index.scss
+++ b/src/factory/lessons/index.scss
@@ -122,6 +122,14 @@
transition: all .4s cubic-bezier(.25, .46, .45, .94);
margin-left: 36px;
+ .active {
+
+ span,
+ div {
+ color: #164ce4 !important;
+ }
+ }
+
.chapter-item {
height: 88px;
width: 100%;
@@ -395,7 +403,7 @@
display: flex;
&-item {
- width: 390px;
+ width: 300px;
display: flex;
flex-direction: column;
@@ -434,7 +442,7 @@
}
h4 {
- max-width: 340px;
+ max-width: 240px;
line-height: 30px;
font-family: alibabaBold;
font-weight: 700;
@@ -533,7 +541,7 @@
p {
max-width: 356px;
- -webkit-line-clamp: 2;
+ -webkit-line-clamp: 3;
}
diff --git a/src/factory/resource/commonTools/detail/index.jsx b/src/factory/resource/commonTools/detail/index.jsx
index 7b0a8627a..0c07cac5a 100644
--- a/src/factory/resource/commonTools/detail/index.jsx
+++ b/src/factory/resource/commonTools/detail/index.jsx
@@ -86,7 +86,11 @@ function Index(props) {
工具类型
-
{
diff --git a/src/factory/resource/components/Search/index.jsx b/src/factory/resource/components/Search/index.jsx
index 87440419c..06fac84fc 100644
--- a/src/factory/resource/components/Search/index.jsx
+++ b/src/factory/resource/components/Search/index.jsx
@@ -1,17 +1,19 @@
import React, { useEffect, useState, useImperativeHandle, forwardRef } from 'react';
import { styles } from './index.scss';
import { getSourceList, getProjectsLists } from '../../../api'
-import { factoryZoneId, toolId, versionId } from '../../../../constants/factory'
+import { factoryZoneId, toolId, versionId, commontoolId } from '../../../../constants/factory'
import ActionItem from '../ActionItem';
import emptyImg from '../../../../images/factory/resource/empty.webp'
-function Index({searchValue, searchType},ref) {
+function Index({ searchValue, searchType }, ref) {
const [versionList, setVersionList] = useState([]);
const [versionTotal, setVersionTotal] = useState(0);
const [projectList, setProjectList] = useState([]);
const [projectTotal, setProjectTotal] = useState(0);
const [toolList, setToolList] = useState([]);
const [toolTotal, setToolTotal] = useState(0);
+ const [cToolList, setCToolList] = useState([]);
+ const [cToolTotal, setCToolTotal] = useState(0);
const [page, setPage] = useState(0);
const pageSize = 20
const totalSize = 6 // 聚合查询只查六个
@@ -26,13 +28,14 @@ function Index({searchValue, searchType},ref) {
getVersionList(1)
getProjectsList(1)
getToolsList(1)
+ getCToolsList(1)
}
const getVersionList = () => {
getSourceList({
pageNum: page,
pageSize: searchType ? pageSize : totalSize,
- id: factoryZoneId, name: searchValue, keywords: versionId
+ id: factoryZoneId, name: searchValue, keywords: versionId
}).then(res => {
setVersionList(res.data.rows.slice(0, 4));
setVersionTotal(res.data.total)
@@ -43,13 +46,24 @@ function Index({searchValue, searchType},ref) {
getSourceList({
pageNum: page,
pageSize: searchType ? pageSize : totalSize,
- id: factoryZoneId, name: searchValue, keywords: toolId
+ id: factoryZoneId, name: searchValue, keywords: toolId
}).then(res => {
setToolList(res.data.rows.slice(0, 4));
setToolTotal(res.data.total)
});
};
+ const getCToolsList = () => {
+ getSourceList({
+ pageNum: page,
+ pageSize: searchType ? pageSize : totalSize,
+ id: factoryZoneId, name: searchValue, keywords: commontoolId
+ }).then(res => {
+ setCToolList(res.data.rows.slice(0, 4));
+ setCToolTotal(res.data.total)
+ });
+ };
+
const getProjectsList = (page) => {
getProjectsLists(factoryZoneId, {
pageNum: page,
@@ -69,7 +83,7 @@ function Index({searchValue, searchType},ref) {
{
projectList.length > 0 &&
-
软件项目
+
工厂开源项目
#项目 {projectTotal}个
@@ -77,7 +91,7 @@ function Index({searchValue, searchType},ref) {
projectList.map((item, index) => {
const project = item.projectProperties || {}
let imageUrl = project.authorImageUrl.split(':4000/') && project.authorImageUrl.split(':4000/')[1]
- const authorImageUrl = imageUrl ? `${window.location.origin}/${ imageUrl }` : project.authorImageUrl
+ const authorImageUrl = imageUrl ? `${window.location.origin}/${imageUrl}` : project.authorImageUrl
return
@@ -111,11 +125,47 @@ function Index({searchValue, searchType},ref) {
}
+ {
+ cToolList.length > 0 &&
+
+
共建共用工具
+
#工具 {cToolTotal}个
+
+
+ {
+ cToolList.map((item, index) => {
+ const createUser = item.createUser || {}
+ return
+
+
+

+
{item.name}
+
+
+ {item.domainName}
+
+
+ {item.summary}
+
+
+ {item.downloadCount}
+
+
+
+
+
+
+
+ })
+ }
+
+
+ }
{
toolList.length > 0 &&
-
开发工具
-
#工具 {toolTotal}个
+
开源社区软件
+
#软件 {toolTotal}个
{
@@ -150,8 +200,8 @@ function Index({searchValue, searchType},ref) {
{
versionList.length > 0 &&
-
软件工厂基座
-
#版本 {versionTotal}个
+
生产线安装包
+
#安装包 {versionTotal}个
{
@@ -169,9 +219,9 @@ function Index({searchValue, searchType},ref) {
}
{
- versionTotal + projectTotal + toolTotal === 0 &&
+ versionTotal + projectTotal + toolTotal + cToolTotal === 0 &&

-
抱歉,暂无与“{ searchValue }”相关的数据
+
抱歉,暂无与“{searchValue}”相关的数据
}
diff --git a/src/factory/resource/components/Search/index.scss b/src/factory/resource/components/Search/index.scss
index b59610088..bc287d9a8 100644
--- a/src/factory/resource/components/Search/index.scss
+++ b/src/factory/resource/components/Search/index.scss
@@ -75,7 +75,7 @@
.item-desc {
margin-top: 20px;
- line-height: 21px;
+ line-height: 24px;
font-family: alibabareg;
color: #091221;
font-size: 15px;
diff --git a/src/factory/resource/developmentTools/detail/index.jsx b/src/factory/resource/developmentTools/detail/index.jsx
index 7285da708..5882eedc8 100644
--- a/src/factory/resource/developmentTools/detail/index.jsx
+++ b/src/factory/resource/developmentTools/detail/index.jsx
@@ -86,7 +86,11 @@ function Index(props) {
工具类型
-
+
更多热门工具
{
diff --git a/src/factory/resource/developmentTools/index.jsx b/src/factory/resource/developmentTools/index.jsx
index 3a7820695..c8c56122c 100644
--- a/src/factory/resource/developmentTools/index.jsx
+++ b/src/factory/resource/developmentTools/index.jsx
@@ -95,10 +95,10 @@ function Index(props) {
orderByDownloadCount: true
}
if (selectedType) params.domainId = selectedType
-
- getSourceList(params).then(res => {
+
+ getSourceList(params).then(res => {
setLoading(false)
- if (res.data.rows) {
+ if (res.data.rows) {
const rows = []
res.data.rows.forEach(e => {
let extendData = {}
@@ -106,7 +106,7 @@ function Index(props) {
extendData = JSON.parse(e.extendData)
}
rows.push({ ...e, extendDataUrl: extendData.url, extendDataHeadImg: extendData.headImg })
-
+
});
setContentList(rows)
}
@@ -162,7 +162,11 @@ function Index(props) {
{item.domainName}
{item.summary}
-
+
)
})
@@ -194,7 +198,7 @@ function Index(props) {
const createUser = item.createUser
return
-

+
{item.name}
@@ -205,7 +209,11 @@ function Index(props) {
-
+
})
@@ -222,7 +230,7 @@ function Index(props) {
newList.map((item, index) => {
const createUser = item.createUser
return
-

+
{item.name}
@@ -230,7 +238,11 @@ function Index(props) {
{item.summary}
-
+
})
@@ -255,7 +267,7 @@ function Index(props) {
-

+
{item.name}
@@ -268,7 +280,11 @@ function Index(props) {
-
+
diff --git a/src/factory/resource/factoryVersion/index.jsx b/src/factory/resource/factoryVersion/index.jsx
index c19c70183..950375667 100644
--- a/src/factory/resource/factoryVersion/index.jsx
+++ b/src/factory/resource/factoryVersion/index.jsx
@@ -73,7 +73,7 @@ function Index(props) {
{item.createTime}
-
+
})
@@ -96,7 +96,11 @@ function Index(props) {

{index === 0 ?
{item.name}
:
}
{item.summary}
-
+
})
}
diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js
index 24a5187b5..17ce9a8a1 100644
--- a/src/forge/Main/Detail.js
+++ b/src/forge/Main/Detail.js
@@ -664,12 +664,12 @@ class Detail extends Component {