添加稍后下载、添加课程详情页、修改工厂引擎模块软件工厂标准样式、移除创建项目时确权,放出项目详情页组织、用户名称

This commit is contained in:
黄心宇 2026-01-08 09:36:41 +08:00
parent 9d5f554a3c
commit e33be69896
19 changed files with 342 additions and 130 deletions

View File

@ -108,7 +108,11 @@ function Feature(props) {
<div>
<h4>{item.name}</h4>
<p>{item.summary}</p>
<button onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }}>下载</button>
<button onClick={() => {
if (item.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
}
}} disabled={!item.fileIds} className={ !item.fileIds && 'disabled' } >{item.fileIds ? '下载' : '稍后下载'}</button>
</div>
</div>
)

View File

@ -153,7 +153,7 @@
.content-bottom {
width: 1600px;
height: 398px;
height: 260px;
display: flex;
align-items: center;
position: relative;
@ -161,7 +161,7 @@
background-color: transparent;
border: none;
display: block;
padding: 40px 54px;
padding: 20px 54px;
h3 {
color: white;
@ -179,14 +179,14 @@
.df-item {
width: 470px;
height: 244px;
height: 144px;
background: #ffffff;
border: 1px solid;
border-color: rgba(22, 76, 228, 0.2);
border-radius: 20px;
box-shadow: 0px 0px 20px rgba(22, 76, 228, 0.44);
display: flex;
padding: 32px;
padding: 16px;
img {
width: 44px;
@ -201,10 +201,10 @@
h4 {
width: 236px;
line-height: 33px;
line-height: 20px;
font-family: alibabaBold;
color: #091221;
font-size: 24px;
font-size: 20px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
@ -218,11 +218,11 @@
font-family: alibabareg;
color: #091221;
font-size: 15px;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
height: 82px;
word-break: break-all;
height: 32px;
text-align: left;
}

View File

@ -164,7 +164,7 @@
color: #091221;
font-size: 16px;
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-line-clamp: 8;
-webkit-box-orient: vertical;
overflow: hidden;
}

View File

@ -80,33 +80,25 @@ const Resource = forwardRef(({ zoneId }, ref) => {
}
});
//
timelineRef.current.to(panels[0], {
y: "-5%",
scale: 0.85,
duration: 1
}, 0);
//
panels.forEach((panel, index) => {
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 }
];
//
timelineRef.current.to(panels[1], {
y: "-50%",
scale: 0.9,
duration: 1
}, 0);
// v
timelineRef.current.to(panels[2], {
y: "-150%",
scale: 0.95,
duration: 1
}, 0);
// v
timelineRef.current.to(panels[3], {
y: "-230%",
scale: 0.98,
duration: 1.5
}, 0);
timelineRef.current.to(panel, {
...animations[index],
onComplete: () => {
panel.classList.add('animated-panel');
},
onReverseComplete: () => {
panel.classList.remove('animated-panel');
}
}, 0);
});
//
return () => {
@ -152,7 +144,7 @@ const Resource = forwardRef(({ zoneId }, ref) => {
});
}
const getCommonToolsList = () => {
const getCommonToolsList = () => {
getSourceList({ id: factoryZoneId, keywords: commontoolId }).then(res => {
const rows = []
res.data.rows.forEach(e => {
@ -192,7 +184,7 @@ const Resource = forwardRef(({ zoneId }, ref) => {
<div className="panels-stack">
<div ref={r1Ref} className="resource-1">
<div className="panel-content">
<div className="panel-content panel-content-1">
{
getLeftContent(1)
}
@ -200,18 +192,26 @@ const Resource = forwardRef(({ zoneId }, ref) => {
{
resourceList2.length > 0 && resourceList2.map((item, index) => {
return <div className="content-item2" key={index}>
<div className="item-name" title={ item.name }>{item.name}</div>
<div className="item-desc" title={ item.summary }>{item.summary}</div>
<button onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }}>下载</button>
<div className="item-name" title={item.name}>{item.name}</div>
<div className="item-desc" title={item.summary}>{item.summary}</div>
<button onClick={() => {
if (item.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
}
}} disabled={!item.fileIds} className={!item.fileIds && 'disabled'} >{item.fileIds ? '下载' : '稍后下载'}</button>
</div>
})
}
{
manualList.map((item, index) => {
return <div className="content-item2" key={index}>
<div className="item-name" title={ item.name }>{item.name}</div>
<div className="item-desc" title={ item.summary }>{item.summary}</div>
<button onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }}>下载</button>
<div className="item-name" title={item.name}>{item.name}</div>
<div className="item-desc" title={item.summary}>{item.summary}</div>
<button onClick={() => {
if (item.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
}
}} disabled={!item.fileIds} className={!item.fileIds && 'disabled'} >{item.fileIds ? '下载' : '稍后下载'}</button>
</div>
})
}
@ -225,7 +225,7 @@ const Resource = forwardRef(({ zoneId }, ref) => {
</div>
<div ref={r2Ref} className="resource-2">
<div className="panel-content">
<div className="panel-content panel-content-2">
{
getLeftContent(0)
}
@ -234,7 +234,7 @@ const Resource = forwardRef(({ zoneId }, ref) => {
resourceList1 && resourceList1.length > 0 && resourceList1.map((item, index) => {
const { projectProperties } = item;
let imageUrl = projectProperties.authorImageUrl.split(':4000/') && projectProperties.authorImageUrl.split(':4000/')[1]
const authorImageUrl = imageUrl ? `${window.location.origin}/${ imageUrl }` : projectProperties.authorImageUrl
const authorImageUrl = imageUrl ? `${window.location.origin}/${imageUrl}` : projectProperties.authorImageUrl
// projectProperties.praisesCount = Math.floor(Math.random(0, 1) * 50)
// projectProperties.forkedCount = Math.floor(Math.random(0, 1) * 50)
const tags = projectProperties.topics && projectProperties.topics.split(',');
@ -252,7 +252,7 @@ const Resource = forwardRef(({ zoneId }, ref) => {
}
</div>
}
<div className="item-desc" title={ projectProperties.description }>{projectProperties.description}</div>
<div className="item-desc" title={projectProperties.description}>{projectProperties.description}</div>
<div className="item-data">
<span><i className="iconfont-factory icon-guanzhu mr5 font-12" />{projectProperties.forkedCount}</span>
<span><i className="iconfont-factory icon-dianzan mr5 font-12" />{projectProperties.praisesCount}</span>
@ -265,7 +265,7 @@ const Resource = forwardRef(({ zoneId }, ref) => {
</div>
<div ref={r3Ref} className="resource-3">
<div className="panel-content">
<div className="panel-content panel-content-3">
{
getLeftContent(2)
}
@ -273,11 +273,15 @@ const Resource = forwardRef(({ zoneId }, ref) => {
{
resourceList3.length > 0 && resourceList3.map((item, index) => {
return <div className="content-item3" key={index}>
<div className="item-name" title={ item.name }>{item.name}</div>
<div className="item-desc" title={ item.summary }>{item.summary}</div>
<div className="item-name" title={item.name}>{item.name}</div>
<div className="item-desc" title={item.summary}>{item.summary}</div>
<div className="item-btn">
<Link to={`/sf/resources/commontools/${item.id}`}><button className="shiny-button">查看</button></Link>
<button onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }}>下载</button>
<button onClick={() => {
if (item.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
}
}} disabled={!item.fileIds} className={!item.fileIds && 'disabled'} >{item.fileIds ? '下载' : '稍后下载'}</button>
</div>
</div>
})
@ -286,7 +290,7 @@ const Resource = forwardRef(({ zoneId }, ref) => {
</div>
</div>
<div ref={r4Ref} className="resource-4">
<div className="panel-content">
<div className="panel-content panel-content-4">
{
getLeftContent(3)
}
@ -294,11 +298,15 @@ const Resource = forwardRef(({ zoneId }, ref) => {
{
resourceList4.length > 0 && resourceList4.map((item, index) => {
return <div className="content-item3" key={index}>
<div className="item-name" title={ item.name }>{item.name}</div>
<div className="item-desc" title={ item.summary }>{item.summary}</div>
<div className="item-name" title={item.name}>{item.name}</div>
<div className="item-desc" title={item.summary}>{item.summary}</div>
<div className="item-btn">
<Link to={`/sf/resources/devtools/${item.id}`}><button className="shiny-button">查看</button></Link>
<button onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }}>下载</button>
<button onClick={() => {
if (item.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
}
}} disabled={!item.fileIds} className={!item.fileIds && 'disabled'} >{item.fileIds ? '下载' : '稍后下载'}</button>
</div>
</div>
})

View File

@ -270,6 +270,30 @@
}
}
// 收起来时
.animated-panel {
.panel-content-1,
.panel-content-2,
.panel-content-3 {
.content-left {
.icon-container {
display: none !important;
}
h3 {
margin-top: 0 !important;
}
p {
display: none;
transition: display 0.3s ease;
}
}
}
}
// 面板内容样式
.panel-content {
height: 100%;
@ -283,6 +307,7 @@
flex-shrink: 0;
.icon-container {
transition: display 0.3s ease;
width: 58px;
height: 58px;
background: #ffffff;
@ -301,6 +326,7 @@
font-weight: 700;
color: #091221;
font-size: 26px;
transition: margin-top 0.3s ease;
}
p {
@ -309,6 +335,7 @@
font-family: alibabareg;
color: #091221;
font-size: 15px;
transition: display 0.3s ease;
}
a {

View File

@ -120,7 +120,7 @@ const Resource2 = forwardRef(({ zoneId }, ref) => {
<h1 className="module-title">学习专区多样资源服务工厂应用</h1>
<div className="resource2-content">
<div className="resource2-content-left">
<h3>在线课程</h3>
<Link to={`/sf/lessons`}><h3>在线课程<KFIcon type="icon-icon_blackarrow_hover" font={50} /></h3></Link>
<p>全景智治贯通需求到交付敏捷可视管控风险打造高效可信软件生产新范式赋能研发跃迁</p>
<div className="left-content">
{
@ -146,7 +146,11 @@ const Resource2 = forwardRef(({ zoneId }, ref) => {
<div className="standard-info">
<h3 title={ item.name }>{item.name}</h3>
<p title={ item.summary }>{item.summary}</p>
<button className="shiny-button" onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }}>立即下载</button>
<button onClick={() => {
if (item.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
}
}} disabled={!item.fileIds} className={`shiny-button ${!item.fileIds && 'disabled'}`} >{item.fileIds ? '立即下载' : '稍后下载'}</button>
</div>
<img className="standard-img" src={item.extendDataHeadImg} alt="" />
</div>
@ -155,7 +159,7 @@ const Resource2 = forwardRef(({ zoneId }, ref) => {
</div>
<div className="manual">
<h3>文档资料</h3>
<Link to={`/sf/lessons`}><h3>文档资料<KFIcon type="icon-icon_blackarrow_hover" font={50} /></h3></Link>
<div className="manual-content">
<ul>
{docList.map((item, index) => (

View File

@ -33,6 +33,33 @@
h3 {
color: #fff;
cursor: pointer;
width: fit-content;
i {
opacity: 0;
margin-left: auto;
height: 35px;
width: 35px;
position: relative;
display: inline-block;
overflow: hidden;
svg {
position: absolute;
left: -25px;
top: 8px;
}
}
&:hover {
color: #091221;
i {
opacity: 1;
}
}
}
p {
@ -232,6 +259,24 @@
background-image: url('../../../images/factory/lessons-right-2-bg.webp');
padding: 33px 35px;
h3 {
i {
margin-left: auto;
height: 35px;
width: 35px;
position: relative;
display: inline-block;
overflow: hidden;
svg {
position: absolute;
left: -25px;
top: 8px;
}
}
}
&-content {
display: flex;
width: 100%;

View File

@ -17,6 +17,7 @@ function Index(props) {
const id = props.match.params.id
const [detail, setDetail] = useState({})
const [content, setContent] = useState();
const videoRef = useRef(null)
useEffect(() => {
document.title = '规范详情-软件工厂专区';
@ -37,10 +38,11 @@ function Index(props) {
extendData = JSON.parse(response.data.data.extendData)
}
document.title = response.data.data.name
if (extendData.content) {
setContent(Base64.decode(extendData.content))
}
setDetail({...response.data.data, ...extendData});
if (extendData.content) {
const base64content = Base64.decode(extendData.content)
setContent(base64content !== '<p><br></p>' ? base64content : '')
}
setDetail({ ...response.data.data, ...extendData });
}
}).catch(error => { })
}
@ -53,12 +55,25 @@ function Index(props) {
<Breadcrumb separator=">">
<Breadcrumb.Item href={`/sf`}>首页</Breadcrumb.Item>
<Breadcrumb.Item href={`/sf/lessons`}>学习资源</Breadcrumb.Item>
<Breadcrumb.Item> <span className="breacrumb-name">{detail.name}</span> </Breadcrumb.Item>
<Breadcrumb.Item> <span className="breacrumb-name" title={detail.name}>{detail.name}</span> </Breadcrumb.Item>
</Breadcrumb>
<div className="header-content">
<h3 title={ detail.name }>{detail.name}</h3>
<p title={ detail.summary }>{detail.summary}</p>
<button className="shiny-button" onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${detail.fileIds}`) }}>立即下载</button>
<h3 title={detail.name}>{detail.name}</h3>
<p title={detail.summary}>{detail.summary}</p>
{
detail.fileIds && <button className="shiny-button" onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${detail.fileIds}`) }}>立即下载</button>
}
{
detail.url &&
<button className="shiny-button" onClick={() => {
window.scrollTo({left:0, top: document.body.scrollHeight, behavior: 'smooth'})
if (videoRef.current) {
videoRef.current.play()
}
}}>
立即观看
</button>
}
<div className="header-img">
<div className="header-img-wrapper">
<img src={detail.headImg || imageBack1} alt="" />
@ -68,11 +83,17 @@ function Index(props) {
</div>
</div>
<div className="news-detail-content">
<div className="news-detail-content-wrapper">
{
content && <RenderHtml className="informations_detail imageLayerParent" value={content} url={props.history.location} />
}
</div>
{
content &&
<div className="news-detail-content-wrapper">
<RenderHtml className="informations_detail imageLayerParent" value={content} url={props.history.location} />
</div>
}
{
detail.url && <div className="news-detail-content-wrapper">
<video ref={videoRef} src={ detail.url } controls={ true }></video>
</div>
}
</div>
</div>
)

View File

@ -63,12 +63,12 @@
p {
margin-top: 25px;
max-width: 650px;
line-height: 22px;
line-height: 30px;
font-family: alibabareg;
color: #5d6a80;
font-size: 16px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-line-clamp: 6;
-webkit-box-orient: vertical;
overflow: hidden;
}
@ -241,9 +241,16 @@
}
.news-detail-content-wrapper {
width: 1600px;
float: left;
padding-bottom: 60px;
background-image: url('../../../images/factory/resource/detail-bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
padding: 30px;
border-radius: 16px;
margin-bottom: 60px;
video {
width: 100%;
}
}
.news-detail-content-others {

View File

@ -106,7 +106,7 @@ function Index(props) {
}
rows.push({ ...e, extendDataUrl: extendData.url, extendDataHeadImg: extendData.headImg })
});
setDocList(rows.slice(0,6));
setDocList(rows.slice(0, 6));
});
}
@ -125,20 +125,23 @@ function Index(props) {
<h3>{lesson.name}</h3>
<p>{lesson.summary}</p>
<div className="chapter-wrapper">
<div className="chapter-list" style={{ marginTop: `-${ 88 * ( chapterList.length - nowTop < 4 ? chapterList.length - 4 : nowTop) }px` }}>
<div className="chapter-list" style={{ marginTop: `-${88 * (chapterList.length - nowTop < 4 ? chapterList.length - 4 : nowTop)}px` }}>
{
chapterList.map((item, index) => {
return <div className="chapter-item" key={item.id}>
return <div className={`chapter-item ${nowTop === index ? 'active' : ''}`} key={item.id}>
{
index < 10 ?
<span className="chapter-index">0{index + 1}</span> :
<span className="chapter-index">{index + 1}</span>
}
<div title={item.name}>
{
item.name
}
</div>
<Link to={`/sf/lessons/${item.id}`}>
<div title={item.name}>
{
item.name
}
</div>
</Link>
</div>
})
@ -150,7 +153,7 @@ function Index(props) {
<Carousel
autoplay
ref={carouselEL}
afterChange={e => { setNowTop(e)}}
afterChange={e => { setNowTop(e) }}
dots={false}
>
{chapterList.map((item, index) => {
@ -226,7 +229,7 @@ function Index(props) {
<span>{item.domainName}</span>
</div>
<div className="button-wrapper">
<button onClick={() => { window.open(item.extendDataUrl) }}>查看详情</button>
<Link to={`/sf/lessons/${item.id}`}><button>查看详情</button></Link>
</div>
</div>
</div>
@ -238,13 +241,13 @@ function Index(props) {
chapterList.slice(3).map((item, index) => {
return <div className="chapter-chapter2-item" key={item.id}>
<div className="chapter-head">
<h4 title={item.name} onClick={() => { window.open(item.extendDataUrl) }}>{item.name}</h4>
<Link to={`/sf/lessons/${item.id}`}><h4 title={item.name}>{item.name}</h4></Link>
<div className="line-1"></div>
<div className="line-2"></div>
<div className="line-3"></div>
</div>
<div className="chapter-body">
<p>{item.summary}</p>
<p title={ item.summary }>{item.summary}</p>
<span>{moment(item.createTime).format('YYYY/MM/DD')}</span>
</div>
</div>
@ -260,8 +263,11 @@ function Index(props) {
return <div className="standard-item" key={index}>
<div className="standard-item-head">
<h4>{item.name}</h4>
{/* <button onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }} >下载</button> */}
<button onClick={() => { message.info('标准正在拟制中!') }} >下载</button>
<button onClick={() => {
if (item.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
}
}} disabled={!item.fileIds} className={ !item.fileIds && 'disabled' } >{item.fileIds ? '下载' : '稍后下载'}</button>
</div>
<p>{item.summary}</p>
<div className="standard-item-img">
@ -314,7 +320,11 @@ function Index(props) {
<img src={index === 0 ? manual1 : manual2} alt="" />
{index === 0 ? <div>{item.name}</div> : <div><span>软件工厂</span><div></div>{nameList[1]}</div>}
<p>{item.summary}</p>
<button onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }} >下载</button>
<button onClick={() => {
if (item.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
}
}} disabled={!item.fileIds} className={ !item.fileIds && 'disabled-button' } >{item.fileIds ? '下载' : '稍后下载'}</button>
</div>
})
}

View File

@ -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;
}

View File

@ -86,7 +86,11 @@ function Index(props) {
<span>工具类型</span>
</div>
</div>
<button className="shiny-button" onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${detail.fileIds}`) }}>立即下载</button>
<button onClick={() => {
if (detail.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${detail.fileIds}`)
}
}} disabled={!detail.fileIds} className={`shiny-button ${!detail.fileIds && 'disabled'}`} >{detail.fileIds ? '立即下载' : '稍后下载'}</button>
<h6 className="more-title">更多热门工具</h6>
<div className="more-tools">
{

View File

@ -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 && <div className="search-project">
<div className="search-header">
<h3>软件项目</h3>
<h3>工厂开源项目</h3>
<div><span>#</span>项目 <span>{projectTotal}</span></div>
</div>
<div className="search-content">
@ -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 <ActionItem className="content-item-wrapper" key={index} padding="1px" borderRadius="23px">
<div className="content-project-item">
<div className="item-top">
@ -111,11 +125,47 @@ function Index({searchValue, searchType},ref) {
</div>
</div>
}
{
cToolList.length > 0 && <div className="search-tool">
<div className="search-header">
<h3>共建共用工具</h3>
<div><span>#</span>工具 <span>{cToolTotal}</span></div>
</div>
<div className="search-content">
{
cToolList.map((item, index) => {
const createUser = item.createUser || {}
return <ActionItem className="content-item-wrapper" key={index} padding="1px" borderRadius="23px">
<div className="content-tool-item">
<div className="item-top">
<img src={createUser.avatar} alt="" className="item-img"></img>
<h5 className="item-title">{item.name}</h5>
</div>
<div className="item-tags">
<span className="item-tag">{item.domainName}</span>
</div>
<div className="item-desc">
{item.summary}
</div>
<div className="item-data">
<span><i className="iconfont-factory icon-xiazai mr5 font-12" />{item.downloadCount}</span>
</div>
</div>
<div className="two-btn">
<button className="shiny-button">查看</button>
<button className="shiny-button">下载</button>
</div>
</ActionItem>
})
}
</div>
</div>
}
{
toolList.length > 0 && <div className="search-tool">
<div className="search-header">
<h3>开发工具</h3>
<div><span>#</span>工具 <span>{toolTotal}</span></div>
<h3>源社区软件</h3>
<div><span>#</span>软件 <span>{toolTotal}</span></div>
</div>
<div className="search-content">
{
@ -150,8 +200,8 @@ function Index({searchValue, searchType},ref) {
{
versionList.length > 0 && <div className="search-version">
<div className="search-header">
<h3>软件工厂基座</h3>
<div><span>#</span>版本 <span>{versionTotal}</span></div>
<h3>生产线安装包</h3>
<div><span>#</span>安装包 <span>{versionTotal}</span></div>
</div>
<div className="search-content">
{
@ -169,9 +219,9 @@ function Index({searchValue, searchType},ref) {
</div>
}
{
versionTotal + projectTotal + toolTotal === 0 && <div className="search-empty">
versionTotal + projectTotal + toolTotal + cToolTotal === 0 && <div className="search-empty">
<img src={emptyImg} alt="" />
<p>抱歉暂无与{ searchValue }相关的数据</p>
<p>抱歉暂无与{searchValue}相关的数据</p>
</div>
}
</div>

View File

@ -75,7 +75,7 @@
.item-desc {
margin-top: 20px;
line-height: 21px;
line-height: 24px;
font-family: alibabareg;
color: #091221;
font-size: 15px;

View File

@ -86,7 +86,11 @@ function Index(props) {
<span>工具类型</span>
</div>
</div>
<button className="shiny-button" onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${detail.fileIds}`) }}>立即下载</button>
<button onClick={() => {
if (detail.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${detail.fileIds}`)
}
}} disabled={!detail.fileIds} className={`shiny-button ${!detail.fileIds && 'disabled'}`} >{detail.fileIds ? '立即下载' : '稍后下载'}</button>
<h6 className="more-title">更多热门工具</h6>
<div className="more-tools">
{

View File

@ -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) {
<span className="item-tag">{item.domainName}</span>
<p className="item-desc">{item.summary}</p>
</div>
<button onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }}>立即下载</button>
<button onClick={() => {
if (item.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
}
}} disabled={!item.fileIds} className={`${!item.fileIds && 'disabled'}`} >{item.fileIds ? '立即下载' : '稍后下载'}</button>
</div>
)
})
@ -194,7 +198,7 @@ function Index(props) {
const createUser = item.createUser
return <ActionItem className="hot-item-wrapper" key={index} padding="1px" borderRadius="16px">
<div className="hot-item">
<img src={ item.extendDataHeadImg || defaultImg} alt="" className="item-img"></img>
<img src={item.extendDataHeadImg || defaultImg} alt="" className="item-img"></img>
<div className="item-info">
<h5 className="item-title">{item.name}</h5>
<p className="item-desc">
@ -205,7 +209,11 @@ function Index(props) {
</div>
<div className="two-btn">
<Link to={`/sf/resources/devtools/${item.id}`}><button className="shiny-button">查看</button></Link>
<button onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }}>下载</button>
<button onClick={() => {
if (item.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
}
}} disabled={!item.fileIds} className={`${!item.fileIds && 'disabled'}`} >{item.fileIds ? '下载' : '稍后下载'}</button>
</div>
</ActionItem>
})
@ -222,7 +230,7 @@ function Index(props) {
newList.map((item, index) => {
const createUser = item.createUser
return <div className="new-item">
<img src={ item.extendDataHeadImg || defaultImg} alt="" className="item-img"></img>
<img src={item.extendDataHeadImg || defaultImg} alt="" className="item-img"></img>
<div className="item-info">
<Link to={`/sf/resources/devtools/${item.id}`}>
<h5 className="item-title">{item.name}</h5>
@ -230,7 +238,11 @@ function Index(props) {
<p className="item-desc">
{item.summary}
</p>
<button onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }}>下载</button>
<button onClick={() => {
if (item.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
}
}} disabled={!item.fileIds} className={`${!item.fileIds && 'disabled'}`} >{item.fileIds ? ' 下载' : '稍后下载'}</button>
</div>
</div>
})
@ -255,7 +267,7 @@ function Index(props) {
<img src={getBackgroundImage(index)} alt="" className="item-bg" />
<div className="item-top">
<img src={ item.extendDataHeadImg || defaultImg} alt="" className="item-img"></img>
<img src={item.extendDataHeadImg || defaultImg} alt="" className="item-img"></img>
<h5 className="item-title">{item.name}</h5>
</div>
<div className="item-desc">
@ -268,7 +280,11 @@ function Index(props) {
<div className="content-bottom-btn">
<div className="two-btn">
<Link to={`/sf/resources/devtools/${item.id}`}><button className="shiny-button">查看</button></Link>
<button onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }}>下载</button>
<button onClick={() => {
if (item.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
}
}} disabled={!item.fileIds} className={`${!item.fileIds && 'disabled'}`} >{item.fileIds ? '下载' : '稍后下载'}</button>
</div>
</div>
</ActionItem>

View File

@ -73,7 +73,7 @@ function Index(props) {
<span><i className="iconfont-factory icon-shijian mr5 font-12" />{item.createTime}</span>
</div>
</div>
<button onClick={() => { index !== versionList.length - 1 && downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)}} className={index === 0 ? "shiny-button" : "version-btn"}>{ index !== versionList.length - 1 ? '立即下载' : '暂未开放'}</button>
<button onClick={() => { item.fileIds && downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)}} className={index === 0 ? "shiny-button" : "version-btn"}>{ item.fileIds ? '立即下载' : '暂未开放'}</button>
</div>
</div>
})
@ -96,7 +96,11 @@ function Index(props) {
<img src={index === 0 ? manual1 : manual2} alt="" />
{index === 0 ? <div>{item.name}</div> : <div><span>软件工厂</span><div></div>{nameList[1]}</div>}
<p>{item.summary}</p>
<button onClick={() => { downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`) }} >下载</button>
<button onClick={() => {
if (item.fileIds) {
downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)
}
}} disabled={!item.fileIds} className={`${!item.fileIds && 'disabled'}`} >{item.fileIds ? '下载' : '稍后下载'}</button>
</div>
})
}

View File

@ -664,12 +664,12 @@ class Detail extends Component {
<div>
<div className="AlignTop">
<div className="projectallName">
{/* {project && project.author &&
{project && project.author &&
<Link to={`/${project.author.login}`}>{project.author.name}</Link>
}
<span className="ml5 mr5">/</span> */}
{/* <Link to={`/${owner}/${projectsId}`} className="projectN mt6">{projectDetail && projectDetail.name}</Link> */}
{projectDetail && projectDetail.name}
<span className="ml5 mr5">/</span>
<Link to={`/${owner}/${projectsId}`} className="projectN mt6">{projectDetail && projectDetail.name}</Link>
{/* {projectDetail && projectDetail.name} */}
</div>
{projectDetail && projectDetail.private && <span className="privateTag mt6">私有</span>}
{!platform && <span className="privateTag red mt6">只读</span>}

View File

@ -729,7 +729,7 @@ class Index extends Component {
}
{/* 确权 仅在新建项目时 */}
{open_blockchain && projectsType === "deposit" && <div className='mt10 mb10'>
{/* {open_blockchain && projectsType === "deposit" && <div className='mt10 mb10'>
<p className='font-16'>确权</p>
<div className='mt5 mb5 color-grey3'><Checkbox checked={tokenConTri} onChange={(e)=>{this.setState({tokenConTri:e.target.checked})}}>加入贡献值激励确权机制</Checkbox></div>
{tokenConTri && <Form.Item
@ -753,7 +753,7 @@ class Index extends Component {
<Input placeholder='请填写您项目创建者获取的初始Token值'/>
)}
</Form.Item>}
</div>}
</div>} */}
<div className="mt20">
<span className="ant-form-item-required"></span>