0bc8d9f6 by lihua

调整报告生成样式

1 parent cb50dc19
......@@ -125,7 +125,7 @@ const getAnalysisResultPageData = (isFull = false) => {
});
obj['equivalenceClassNum'] = changeNum(d.equivalenceClassNum || 0, 0);
obj['reIdentifyRisk'] = changeNum(d.reIdentifyRisk || 0, 2);
obj['isGtThreshold'] = d.isGtThreshold;
obj['isGtThreshold'] = d.isGtThreshold === 'Y' ? '是取值为1' : '否取值为0';
fullResultData.value.push(obj);
});
resultData.value = fullResultData.value.slice(0, pageInfo.value.limit);
......@@ -139,7 +139,7 @@ const getAnalysisResultPageData = (isFull = false) => {
});
obj['equivalenceClassNum'] = changeNum(d.equivalenceClassNum || 0, 0);
obj['reIdentifyRisk'] = changeNum(d.reIdentifyRisk || 0, 2);
obj['isGtThreshold'] = d.isGtThreshold;
obj['isGtThreshold'] = d.isGtThreshold === 'Y' ? '是取值为1' : '否取值为0';
resultData.value.push(obj);
});
pageInfo.value.rows = res.data?.totalRows ?? 0;
......@@ -206,7 +206,21 @@ const downloadWord = () => {
resultDataLoading.value = true;
loadingText.value = '报告正在下载中,请勿关闭浏览器...';
downPromise.value = convertHtml2Img(report, dom).then(() => {
downloadAnonReport({ taskGuid: taskGuid.value, title: `${analysisResultInfo.value.tenantName}持有的“${oldAnonTaskValueInfo.value.taskName}”`, evaluationDate: analysisResultInfo.value.execTime ? analysisResultInfo.value.execTime.substring(0, 10) : '', deIdentProcessorName: userData.tenantName, html: encodeURIComponent(`<div>${getHTML(dom.innerHTML)}</div>`) }).then((res: any) => { downPromise.value = null
const htmlContent = getHTML(dom.innerHTML);
const pageBreakRegex = /<br\s[^>]*>/gi;
const match = htmlContent.match(pageBreakRegex);
let htmlOverview = htmlContent;
let htmlContentPart = '';
if (match && match.length >= 1) {
const secondBr = match[0];
const index = htmlContent.indexOf(secondBr);
if (index !== -1) {
htmlOverview = htmlContent.substring(0, index + secondBr.length);
htmlContentPart = htmlContent.substring(index + secondBr.length);
}
}
downloadAnonReport({ 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) => {
loadingText.value = '';
resultDataLoading.value = false;
if (res && !res.msg) {
......
......@@ -2151,7 +2151,7 @@ const getAnalysisResultPageData = (isFull = false) => {
});
obj['equivalenceClassNum'] = changeNum(d.equivalenceClassNum || 0, 0);
obj['reIdentifyRisk'] = changeNum(d.reIdentifyRisk || 0, 2);
obj['isGtThreshold'] = d.isGtThreshold;
obj['isGtThreshold'] = d.isGtThreshold === 'Y' ? '是取值为1' : '否取值为0';
fullResultData.value.push(obj);
});
resultData.value = fullResultData.value.slice(0, pageInfo.value.limit);
......@@ -2165,7 +2165,7 @@ const getAnalysisResultPageData = (isFull = false) => {
});
obj['equivalenceClassNum'] = changeNum(d.equivalenceClassNum || 0, 0);
obj['reIdentifyRisk'] = changeNum(d.reIdentifyRisk || 0, 2);
obj['isGtThreshold'] = d.isGtThreshold;
obj['isGtThreshold'] = d.isGtThreshold === 'Y' ? '是取值为1' : '否取值为0';
resultData.value.push(obj);
});
pageInfo.value.rows = res.data?.totalRows ?? 0;
......@@ -2234,6 +2234,7 @@ const downloadWord = () => {
dom.innerHTML = report?.innerHTML;
loadingText.value = '报告正在下载中,请勿关闭浏览器...';
downloadLoading.value = true;
downPromise.value = convertHtml2Img(report, dom).then(() => {
downloadAnonReport({ taskGuid: oldAnonTaskValueInfo.value.guid, title: `${analysisResultInfo.value.tenantName}持有的“${oldAnonTaskValueInfo.value.taskName}”`, evaluationDate: analysisResultInfo.value.execTime ? analysisResultInfo.value.execTime.substring(0, 10) : '',
deIdentProcessorName: userData.tenantName, html: encodeURIComponent(`<div>${getHTML(dom.innerHTML)}</div>`) }).then((res: any) => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!