@@ -111,6 +193,8 @@ function Index(props) {
versionList.map((categoryItem, categoryIndex) => {
// 判断是否是源码项
const isSourceCode = categoryItem.id === 'code';
+ const hasHistory = hasHistoryVersion(categoryItem.category);
+
return
@@ -124,6 +208,17 @@ function Index(props) {
? categoryItem.items.find(item => item.summary)?.summary
: `请依次下载「主服务包」「仓库与账户服务包」「流水线服务包」三个安装包,并参照「部署文档与手册」完成 ${categoryItem.category} 环境的完整部署。`)}
+ {hasHistory && (
+
+
+
+ )}
@@ -154,6 +249,9 @@ function Index(props) {
})
}
+
+ {/* 历史版本弹窗结束 */}
+
用户手册
@@ -181,6 +279,58 @@ function Index(props) {
}
+
+ {/* 历史版本弹窗 */}
+
+ {(() => {
+ // 获取当前打开的分类的历史版本数据
+ if (!currentHistoryCategory) return null;
+
+ const historyData = getHistoryVersionByCategory(currentHistoryCategory);
+ if (!historyData || !historyData.items || historyData.items.length === 0) {
+ return 暂无历史版本
;
+ }
+
+ return (
+
+
+ {historyData.items.map((item, itemIndex) => {
+ const displayName = extractDisplayName(item.name, currentHistoryCategory);
+ return
+
+
+
+
+
+ { displayName }
+
+
{item.summary}
+
+ { item.fileList ? item.fileList.length : 0 }个文件
+ {moment(item.createTime).format('YYYY-MM-DD HH:mm')}
+
+
+
查看
+

+
+
+ })}
+
+
+ );
+ })()}
+
)
}
diff --git a/src/factory/resource/factoryVersion/index.scss b/src/factory/resource/factoryVersion/index.scss
index 4f52bd2c..d7f9f32e 100644
--- a/src/factory/resource/factoryVersion/index.scss
+++ b/src/factory/resource/factoryVersion/index.scss
@@ -59,7 +59,7 @@
background-image: url('../../../images/factory/resource/version-item-header3.webp');
}
.version-header {
- height: 220px;
+ height: 260px;
background-repeat: no-repeat;
background-size: 100% 100%;
padding: 27px 34px;
@@ -103,6 +103,24 @@
border-radius: 4px;
}
}
+ .history-version-btn-wrapper {
+ margin-top: 15px;
+
+ .history-version-btn {
+ cursor: pointer;
+ width:106px;
+ height:32px;
+ border:1px solid;
+ border-color:#091221;
+ border-radius:8px;
+ line-height: 32px;
+ font-family: alibaba;
+ font-weight: 500;
+ color:#091221;
+ font-size: 14px;
+ background-color: transparent;
+ }
+ }
}
.version-content {
height: 422PX;
@@ -333,4 +351,126 @@
}
}
}
+}
+
+// 历史版本弹窗样式
+.history-version-modal {
+ .ant-modal-content{
+ background-image: url("../../../images/factory/resource/modal1.png");
+ background-size: 100% auto;
+ background-repeat: no-repeat;
+ border-radius:20px;
+ padding: 20px 25px;
+ }
+ .ant-modal-header{
+ background: transparent;
+ border-bottom: none;
+ padding-top: 10px;
+ padding-bottom: 0;
+ }
+ .ant-modal-body {
+ padding: 20px;
+ }
+
+ .history-version-content {
+
+ .version-content-box {
+ min-height: 500px;
+ max-height: 700px;
+ background:#ffffff;
+ border-radius:8px;
+ box-shadow:0px 0px 8px rgba(0, 88, 68, 0.05);
+ padding: 15px 0;
+ overflow-y: auto;
+
+ .version-content-item {
+ border-radius: 6px;
+ position: relative;
+ display: flex;
+ align-items: center;
+ padding: 20px 22px;
+ // .version-item-icon-box{
+ // background:linear-gradient(46.14deg,#f1f7fe 5.48%,#f8f5ff 94.87%);
+ // border-radius:9px;
+ // }
+ img {
+ width: 30px;
+ height: 30px;
+ margin: 15px;
+ }
+ .version-item-info {
+ margin-left: 8px;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ flex: 1;
+ span:nth-child(1) {
+ font-family: alibaba;
+ color: #091221;
+ font-size: 16px;
+ max-width: 280px;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
+ .version-item-info-bottom{
+ background: #f7f8fc;
+ border-radius: 6px;
+ padding: 5px 10px;
+ margin-top: 5px;
+ }
+ .version-item-info-bottom span {
+ line-height: 20px;
+ font-family: alibabaReg;
+ color:#72748e;
+ font-size: 15px;
+ }
+ }
+ &:not(:last-child) {
+ position: relative;
+ &::after {
+ position: absolute;
+ content: "";
+ width: 860px;
+ height: 0px;
+ border: 1px dashed;
+ border-color: #164de41a;
+ bottom: 0;
+ }
+ }
+ .version-content-item-button {
+ margin-left: auto;
+ visibility: hidden;
+ font-family: alibabareg;
+ color: #164ce4;
+ font-size: 14px;
+ text-align: right;
+ display: flex;
+ align-items: center;
+ flex-shrink: 0;
+ margin-left: 20px;
+ img {
+ width: 13.62px;
+ height: auto;
+ margin-left: 5px;
+ }
+
+ }
+ &:hover {
+ background:rgba(22, 76, 228, 0.07);
+ .version-content-item-button {
+ visibility: visible;
+ }
+ }
+
+ }
+ }
+ }
+
+ .no-history-data {
+ text-align: center;
+ color: #999;
+ font-size: 14px;
+ padding: 40px 0;
+ }
}
\ No newline at end of file
diff --git a/src/forge/projectHome/explore/index.jsx b/src/forge/projectHome/explore/index.jsx
index 51381f96..df4576bd 100644
--- a/src/forge/projectHome/explore/index.jsx
+++ b/src/forge/projectHome/explore/index.jsx
@@ -109,6 +109,12 @@ function ProjectHomePage(props) {
}
function getProject() {
+ // 当分类数据尚未加载时,不执行请求
+ // 等待 getCate() 返回后再请求正确分类的数据,避免竞态条件
+ if (cateList === undefined) {
+ return;
+ }
+
const url = `/projects.json`;
let params = {
pinned: "d",
diff --git a/src/images/factory/resource/modal1.png b/src/images/factory/resource/modal1.png
new file mode 100644
index 00000000..cb8543b9
Binary files /dev/null and b/src/images/factory/resource/modal1.png differ