|
@@ -234,7 +234,8 @@ export async function exportProcessReportDocs(processId,bookList) {
|
|
|
|
|
|
module.exports.exportProcessReportDocs = exportProcessReportDocs
|
|
|
|
|
|
-function fixVolumeData(json,volumeData,index,totalJson){
|
|
|
+function fixVolumeData(json,volumeData,index,totalJson,isChildren){
|
|
|
+ let volumeIndex = index;
|
|
|
json.index = index + 1;
|
|
|
// 教材基本信息
|
|
|
|
|
@@ -346,8 +347,11 @@ function fixVolumeData(json,volumeData,index,totalJson){
|
|
|
item.index = index + 1
|
|
|
item.birth = toYearMonth(item?.birth)
|
|
|
if(item?.examine){
|
|
|
- // totalJson.examineList = pushDistinctItem(totalJson.examineList,item) // 名称去重
|
|
|
- totalJson.examineList.push(item); // 全量导出
|
|
|
+ if(!(isChildren&&volumeIndex==0)){ // 子册第一册不重复导出
|
|
|
+ // totalJson.examineList = pushDistinctItem(totalJson.examineList,item) // 名称去重
|
|
|
+ console.log(item)
|
|
|
+ totalJson.examineList.push(item); // 全量导出
|
|
|
+ }
|
|
|
}
|
|
|
return item
|
|
|
})
|
|
@@ -357,8 +361,11 @@ function fixVolumeData(json,volumeData,index,totalJson){
|
|
|
// 其他编者政治审查表
|
|
|
totalJson.otherList = totalJson.otherList || []
|
|
|
if(volumeData?.otherEditor){
|
|
|
- // totalJson.otherList = pushDistinctItem(totalJson.otherList,volumeData?.otherEditor) // 名称去重
|
|
|
- totalJson.otherList.push(volumeData?.otherEditor); //全量导出
|
|
|
+ if(!(isChildren&&volumeIndex==0)){ // 子册第一册不重复导出
|
|
|
+ // totalJson.otherList = pushDistinctItem(totalJson.otherList,volumeData?.otherEditor) // 名称去重
|
|
|
+ console.log(volumeData?.otherEditor)
|
|
|
+ totalJson.otherList.push(volumeData?.otherEditor); //全量导出
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 成果列表
|
|
@@ -434,7 +441,7 @@ function renderReportDocsByTextbook(textbook){
|
|
|
for (let index = 0; index < 12; index++) {
|
|
|
if(json?.childrens?.[index]){
|
|
|
let volumeData = json?.childrens?.[index]
|
|
|
- volumeData = fixVolumeData(volumeData,volumeData,index,json)
|
|
|
+ volumeData = fixVolumeData(volumeData,volumeData,index,json,true)
|
|
|
volumeList.push(volumeData)
|
|
|
}
|
|
|
}
|