0eedaa43 by lihua

附录支持换行到下一页。

1 parent d732b721
...@@ -219,18 +219,27 @@ const downloadWord = () => { ...@@ -219,18 +219,27 @@ const downloadWord = () => {
219 const match = htmlContent.match(pageBreakRegex); 219 const match = htmlContent.match(pageBreakRegex);
220 let htmlOverview = htmlContent; 220 let htmlOverview = htmlContent;
221 let htmlContentPart = ''; 221 let htmlContentPart = '';
222 let htmlAppendix = '';
222 223
223 if (match && match.length >= 1) { 224 if (match && match.length >= 1) {
224 const secondBr = match[0]; 225 const firstBr = match[0];
226 const index = htmlContent.indexOf(firstBr);
227 if (index !== -1) {
228 htmlOverview = htmlContent.substring(0, index + firstBr.length);
229 htmlContentPart = htmlContent.substring(index + firstBr.length);
230 }
231 let secondBr = match[1];
232 if (secondBr) {
225 const index = htmlContent.indexOf(secondBr); 233 const index = htmlContent.indexOf(secondBr);
226 if (index !== -1) { 234 if (index !== -1) {
227 htmlOverview = htmlContent.substring(0, index + secondBr.length); 235 htmlAppendix = htmlContent.substring(index + secondBr.length);
228 htmlContentPart = htmlContent.substring(index + secondBr.length); 236 }
229 } 237 }
230 } 238 }
231 239
232 if (route.query.dataOwner == '1') { 240 if (route.query.dataOwner == '1') {
233 sendAnonReport({ taskGuid: taskGuid.value, title: `${analysisResultInfo.value.tenantName}持有的“${oldAnonTaskValueInfo.value.taskName}”`, evaluationDate: analysisResultInfo.value.execTime ? analysisResultInfo.value.execTime.substring(0, 10) : '', deIdentProcessorName: userData.tenantName, htmlOverview: encodeURIComponent(`<div>${htmlOverview}</div>`), htmlContent: encodeURIComponent(`<div>${htmlContentPart}</div>`) }).then((res: any) => { 241 sendAnonReport({ taskGuid: taskGuid.value, title: `${analysisResultInfo.value.tenantName}持有的“${oldAnonTaskValueInfo.value.taskName}”`, evaluationDate: analysisResultInfo.value.execTime ? analysisResultInfo.value.execTime.substring(0, 10) : '', deIdentProcessorName: userData.tenantName, htmlOverview: encodeURIComponent(`<div>${htmlOverview}</div>`),
242 htmlContent: encodeURIComponent(`<div>${htmlContentPart}</div>`), htmlAppendix: encodeURIComponent(`<div>${htmlAppendix}</div>`) }).then((res: any) => {
234 downPromise.value = null 243 downPromise.value = null
235 loadingText.value = ''; 244 loadingText.value = '';
236 resultDataLoading.value = false; 245 resultDataLoading.value = false;
......
...@@ -2238,20 +2238,30 @@ const downloadWord = () => { ...@@ -2238,20 +2238,30 @@ const downloadWord = () => {
2238 const match = htmlContent.match(pageBreakRegex); 2238 const match = htmlContent.match(pageBreakRegex);
2239 let htmlOverview = htmlContent; 2239 let htmlOverview = htmlContent;
2240 let htmlContentPart = ''; 2240 let htmlContentPart = '';
2241 let htmlAppendix = '';
2241 2242
2242 if (match && match.length >= 1) { 2243 if (match && match.length >= 1) {
2243 const secondBr = match[0]; 2244 const firstBr = match[0];
2245 const index = htmlContent.indexOf(firstBr);
2246 if (index !== -1) {
2247 htmlOverview = htmlContent.substring(0, index + firstBr.length);
2248 htmlContentPart = htmlContent.substring(index + firstBr.length);
2249 }
2250 let secondBr = match[1];
2251 if (secondBr) {
2244 const index = htmlContent.indexOf(secondBr); 2252 const index = htmlContent.indexOf(secondBr);
2245 if (index !== -1) { 2253 if (index !== -1) {
2246 htmlOverview = htmlContent.substring(0, index + secondBr.length); 2254 htmlAppendix = htmlContent.substring(index + secondBr.length);
2247 htmlContentPart = htmlContent.substring(index + secondBr.length);
2248 } 2255 }
2249 } 2256 }
2257 }
2258
2250 downPromise.value = convertHtml2Img(report, dom).then(() => { 2259 downPromise.value = convertHtml2Img(report, dom).then(() => {
2251 downloadAnonReport({ taskGuid: oldAnonTaskValueInfo.value.guid, title: `${analysisResultInfo.value.tenantName}持有的“${oldAnonTaskValueInfo.value.taskName}”`, evaluationDate: analysisResultInfo.value.execTime ? analysisResultInfo.value.execTime.substring(0, 10) : '', 2260 downloadAnonReport({ taskGuid: oldAnonTaskValueInfo.value.guid, title: `${analysisResultInfo.value.tenantName}持有的“${oldAnonTaskValueInfo.value.taskName}”`, evaluationDate: analysisResultInfo.value.execTime ? analysisResultInfo.value.execTime.substring(0, 10) : '',
2252 deIdentProcessorName: userData.tenantName, 2261 deIdentProcessorName: userData.tenantName,
2253 htmlOverview: encodeURIComponent(`<div>${htmlOverview}</div>`), 2262 htmlOverview: encodeURIComponent(`<div>${htmlOverview}</div>`),
2254 htmlContent: encodeURIComponent(`<div>${htmlContentPart}</div>`) }).then((res: any) => { 2263 htmlContent: encodeURIComponent(`<div>${htmlContentPart}</div>`),
2264 htmlAppendix: encodeURIComponent(`<div>${htmlAppendix}</div>`) }).then((res: any) => {
2255 downPromise.value = null 2265 downPromise.value = null
2256 loadingText.value = ''; 2266 loadingText.value = '';
2257 downloadLoading.value = false; 2267 downloadLoading.value = false;
......
...@@ -356,7 +356,8 @@ ...@@ -356,7 +356,8 @@
356 <br clear="all" style="page-break-before:always;mso-break-type:section-break"> 356 <br clear="all" style="page-break-before:always;mso-break-type:section-break">
357 357
358 <!-- 附录:不符合规则的文件清单 --> 358 <!-- 附录:不符合规则的文件清单 -->
359 <h1 v-if="noComplianceList.length" style="text-align: left;margin-top: 10px;margin-bottom: 10px;">附录:不符合规则的文件清单</h1> 359 <br v-if="noComplianceList.length" clear="all" style="page-break-before:always;mso-break-type:section-break">
360 <h1 class="MsoHeading1" v-if="noComplianceList.length" style="text-align: left;margin-top: 10px;margin-bottom: 10px;">附录:不符合规则的文件清单</h1>
360 <table v-if="noComplianceList.length" border="0" cellspacing="0" 361 <table v-if="noComplianceList.length" border="0" cellspacing="0"
361 style="width:100%;word-break: break-all;margin: 0 auto;text-align: left;border-collapse: collapse;color: #212121"> 362 style="width:100%;word-break: break-all;margin: 0 auto;text-align: left;border-collapse: collapse;color: #212121">
362 <thead> 363 <thead>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!