fix: 下载报告附录分页
Showing
2 changed files
with
14 additions
and
10 deletions
| ... | @@ -228,11 +228,13 @@ const downloadWord = () => { | ... | @@ -228,11 +228,13 @@ const downloadWord = () => { |
| 228 | htmlOverview = htmlContent.substring(0, index + firstBr.length); | 228 | htmlOverview = htmlContent.substring(0, index + firstBr.length); |
| 229 | htmlContentPart = htmlContent.substring(index + firstBr.length); | 229 | htmlContentPart = htmlContent.substring(index + firstBr.length); |
| 230 | } | 230 | } |
| 231 | let secondBr = match[1]; | 231 | if (match?.length > 2) { |
| 232 | if (secondBr) { | 232 | let secondBr = match[1]; |
| 233 | const index = htmlContent.indexOf(secondBr); | 233 | if (secondBr) { |
| 234 | if (index !== -1) { | 234 | const index = htmlContent.indexOf(secondBr); |
| 235 | htmlAppendix = htmlContent.substring(index + secondBr.length); | 235 | if (index !== -1) { |
| 236 | htmlAppendix = htmlContent.substring(index + secondBr.length); | ||
| 237 | } | ||
| 236 | } | 238 | } |
| 237 | } | 239 | } |
| 238 | } | 240 | } | ... | ... |
| ... | @@ -2247,11 +2247,13 @@ const downloadWord = () => { | ... | @@ -2247,11 +2247,13 @@ const downloadWord = () => { |
| 2247 | htmlOverview = htmlContent.substring(0, index + firstBr.length); | 2247 | htmlOverview = htmlContent.substring(0, index + firstBr.length); |
| 2248 | htmlContentPart = htmlContent.substring(index + firstBr.length); | 2248 | htmlContentPart = htmlContent.substring(index + firstBr.length); |
| 2249 | } | 2249 | } |
| 2250 | let secondBr = match[1]; | 2250 | if (match?.length > 2) { |
| 2251 | if (secondBr) { | 2251 | let secondBr = match[1]; |
| 2252 | const index = htmlContent.indexOf(secondBr); | 2252 | if (secondBr) { |
| 2253 | if (index !== -1) { | 2253 | const index = htmlContent.indexOf(secondBr); |
| 2254 | htmlAppendix = htmlContent.substring(index + secondBr.length); | 2254 | if (index !== -1) { |
| 2255 | htmlAppendix = htmlContent.substring(index + secondBr.length); | ||
| 2256 | } | ||
| 2255 | } | 2257 | } |
| 2256 | } | 2258 | } |
| 2257 | } | 2259 | } | ... | ... |
-
Please register or sign in to post a comment