|
@@ -531,7 +531,7 @@ function renderReportDocsByTextbook(textbook){
|
|
|
codeBarImg:codePngPath,
|
|
|
// 封面信息
|
|
|
titlePad:padString(json?.title,21),
|
|
|
- ISBNPad:padString(json?.ISBN,21),
|
|
|
+ ISBNPad:fromatFiled(json?.childrens, 'ISBN') || padString(json?.ISBN,21),
|
|
|
ISBN:json?.ISBN,
|
|
|
inviteUnit:json?.inviteUnit||json?.department?.name||"",
|
|
|
one:squareCheck[(json?.type=="单本"||json?.type=="单册")?1:0], // 单本/单册 方框
|
|
@@ -539,10 +539,10 @@ function renderReportDocsByTextbook(textbook){
|
|
|
oneCircle:circleCheck[(json?.type=="单本"||json?.type=="单册")?1:0], // 单本/单册 圆圈
|
|
|
fullCircle:circleCheck[json?.type=="全册"?1:0], // 全册
|
|
|
tn:json?.typeNumber,
|
|
|
- authorPad:padString(json?.author,21),
|
|
|
+ authorPad:fromatFiled(json?.childrens, 'author') || padString(json?.author,21),
|
|
|
mobile:padString(mobile,21),
|
|
|
- authorUnit:padString(json?.unit,21),
|
|
|
- publisherPad:padString(json?.editionUnit,21),
|
|
|
+ authorUnit:fromatFiled(json?.childrens, 'unit') || padString(json?.unit,21),
|
|
|
+ publisherPad:fromatFiled(json?.childrens, 'editionUnit') || padString(json?.editionUnit,21),
|
|
|
createdDate:padString(createdDate,21),
|
|
|
// 基本信息
|
|
|
title:json?.title,
|
|
@@ -739,4 +739,13 @@ function padString(str,width) {
|
|
|
const rightSpaces = spaceChar.repeat(rightPadding);
|
|
|
// 返回补充后的字符串
|
|
|
return leftSpaces + str + rightSpaces;
|
|
|
-}
|
|
|
+}
|
|
|
+/* 格式化重复字段(首页多册情况展示:书号、第一主编、主编单位、出 版 社) */
|
|
|
+function fromatFiled(list, filed){
|
|
|
+ let arr = [];
|
|
|
+ list.forEach((item) => {
|
|
|
+ arr.push(item[filed]);
|
|
|
+ });
|
|
|
+ let j = Array.from(new Set(arr)).join('、');
|
|
|
+ return j || '-';
|
|
|
+ }
|