ca5ad8c5 by lihua

调整报告生成样式

1 parent fcaf8f28
...@@ -4,7 +4,8 @@ VITE_APP_TITLE = 可信数据服务平台 ...@@ -4,7 +4,8 @@ VITE_APP_TITLE = 可信数据服务平台
4 # VITE_API_BASEURL = https://www.zgsjzc.com/api 4 # VITE_API_BASEURL = https://www.zgsjzc.com/api
5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api 5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api
6 # VITE_API_BASEURL = http://localhost:9000 6 # VITE_API_BASEURL = http://localhost:9000
7 VITE_API_BASEURL = https://daop-zcgl-test.zgsjzc.com/ 7 # VITE_API_BASEURL = https://daop-zcgl-test.zgsjzc.com/
8 VITE_API_BASEURL = http://10.4.82.1:58052/
8 9
9 VITE_IDASS_BASEURL = https://daop-test.zgsjzc.com/portalLogin 10 VITE_IDASS_BASEURL = https://daop-test.zgsjzc.com/portalLogin
10 11
......
...@@ -131,7 +131,7 @@ const getAnalysisResultPageData = (isFull = false) => { ...@@ -131,7 +131,7 @@ const getAnalysisResultPageData = (isFull = false) => {
131 }); 131 });
132 obj['equivalenceClassNum'] = changeNum(d.equivalenceClassNum || 0, 0); 132 obj['equivalenceClassNum'] = changeNum(d.equivalenceClassNum || 0, 0);
133 obj['reIdentifyRisk'] = changeNum(d.reIdentifyRisk || 0, 2); 133 obj['reIdentifyRisk'] = changeNum(d.reIdentifyRisk || 0, 2);
134 obj['isGtThreshold'] = d.isGtThreshold; 134 obj['isGtThreshold'] = d.isGtThreshold === 'Y' ? '是取值为1' : '否取值为0';
135 fullResultData.value.push(obj); 135 fullResultData.value.push(obj);
136 }); 136 });
137 resultData.value = fullResultData.value.slice(0, pageInfo.value.limit); 137 resultData.value = fullResultData.value.slice(0, pageInfo.value.limit);
...@@ -145,7 +145,7 @@ const getAnalysisResultPageData = (isFull = false) => { ...@@ -145,7 +145,7 @@ const getAnalysisResultPageData = (isFull = false) => {
145 }); 145 });
146 obj['equivalenceClassNum'] = changeNum(d.equivalenceClassNum || 0, 0); 146 obj['equivalenceClassNum'] = changeNum(d.equivalenceClassNum || 0, 0);
147 obj['reIdentifyRisk'] = changeNum(d.reIdentifyRisk || 0, 2); 147 obj['reIdentifyRisk'] = changeNum(d.reIdentifyRisk || 0, 2);
148 obj['isGtThreshold'] = d.isGtThreshold; 148 obj['isGtThreshold'] = d.isGtThreshold === 'Y' ? '是取值为1' : '否取值为0';
149 resultData.value.push(obj); 149 resultData.value.push(obj);
150 }); 150 });
151 pageInfo.value.rows = res.data?.totalRows ?? 0; 151 pageInfo.value.rows = res.data?.totalRows ?? 0;
...@@ -212,8 +212,23 @@ const downloadWord = () => { ...@@ -212,8 +212,23 @@ const downloadWord = () => {
212 resultDataLoading.value = true; 212 resultDataLoading.value = true;
213 loadingText.value = `评测报告正在${route.query.dataOwner == '1' ? '发送' : '下载' }中,请勿关闭浏览器...`; 213 loadingText.value = `评测报告正在${route.query.dataOwner == '1' ? '发送' : '下载' }中,请勿关闭浏览器...`;
214 downPromise.value = convertHtml2Img(report, dom).then(() => { 214 downPromise.value = convertHtml2Img(report, dom).then(() => {
215 const htmlContent = getHTML(dom.innerHTML);
216 const pageBreakRegex = /<br\s[^>]*>/gi;
217 const match = htmlContent.match(pageBreakRegex);
218 let htmlOverview = htmlContent;
219 let htmlContentPart = '';
220
221 if (match && match.length >= 1) {
222 const secondBr = match[0];
223 const index = htmlContent.indexOf(secondBr);
224 if (index !== -1) {
225 htmlOverview = htmlContent.substring(0, index + secondBr.length);
226 htmlContentPart = htmlContent.substring(index + secondBr.length);
227 }
228 }
229
215 if (route.query.dataOwner == '1') { 230 if (route.query.dataOwner == '1') {
216 sendAnonReport({ 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) => { 231 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) => {
217 downPromise.value = null 232 downPromise.value = null
218 loadingText.value = ''; 233 loadingText.value = '';
219 resultDataLoading.value = false; 234 resultDataLoading.value = false;
...@@ -224,7 +239,7 @@ const downloadWord = () => { ...@@ -224,7 +239,7 @@ const downloadWord = () => {
224 } 239 }
225 }) 240 })
226 } else { 241 } else {
227 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) => { 242 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) => {
228 downPromise.value = null 243 downPromise.value = null
229 loadingText.value = ''; 244 loadingText.value = '';
230 resultDataLoading.value = false; 245 resultDataLoading.value = false;
......
...@@ -2138,7 +2138,7 @@ const getAnalysisResultPageData = (isFull = false) => { ...@@ -2138,7 +2138,7 @@ const getAnalysisResultPageData = (isFull = false) => {
2138 }); 2138 });
2139 obj['equivalenceClassNum'] = changeNum(d.equivalenceClassNum || 0, 0); 2139 obj['equivalenceClassNum'] = changeNum(d.equivalenceClassNum || 0, 0);
2140 obj['reIdentifyRisk'] = changeNum(d.reIdentifyRisk || 0, 2); 2140 obj['reIdentifyRisk'] = changeNum(d.reIdentifyRisk || 0, 2);
2141 obj['isGtThreshold'] = d.isGtThreshold; 2141 obj['isGtThreshold'] = d.isGtThreshold === 'Y' ? '是取值为1' : '否取值为0';
2142 fullResultData.value.push(obj); 2142 fullResultData.value.push(obj);
2143 }); 2143 });
2144 resultData.value = fullResultData.value.slice(0, pageInfo.value.limit); 2144 resultData.value = fullResultData.value.slice(0, pageInfo.value.limit);
...@@ -2152,7 +2152,7 @@ const getAnalysisResultPageData = (isFull = false) => { ...@@ -2152,7 +2152,7 @@ const getAnalysisResultPageData = (isFull = false) => {
2152 }); 2152 });
2153 obj['equivalenceClassNum'] = changeNum(d.equivalenceClassNum || 0, 0); 2153 obj['equivalenceClassNum'] = changeNum(d.equivalenceClassNum || 0, 0);
2154 obj['reIdentifyRisk'] = changeNum(d.reIdentifyRisk || 0, 2); 2154 obj['reIdentifyRisk'] = changeNum(d.reIdentifyRisk || 0, 2);
2155 obj['isGtThreshold'] = d.isGtThreshold; 2155 obj['isGtThreshold'] = d.isGtThreshold === 'Y' ? '是取值为1' : '否取值为0';
2156 resultData.value.push(obj); 2156 resultData.value.push(obj);
2157 }); 2157 });
2158 pageInfo.value.rows = res.data?.totalRows ?? 0; 2158 pageInfo.value.rows = res.data?.totalRows ?? 0;
...@@ -2221,6 +2221,7 @@ const downloadWord = () => { ...@@ -2221,6 +2221,7 @@ const downloadWord = () => {
2221 dom.innerHTML = report?.innerHTML; 2221 dom.innerHTML = report?.innerHTML;
2222 loadingText.value = '报告正在下载中,请勿关闭浏览器...'; 2222 loadingText.value = '报告正在下载中,请勿关闭浏览器...';
2223 downloadLoading.value = true; 2223 downloadLoading.value = true;
2224
2224 downPromise.value = convertHtml2Img(report, dom).then(() => { 2225 downPromise.value = convertHtml2Img(report, dom).then(() => {
2225 downloadAnonReport({ taskGuid: oldAnonTaskValueInfo.value.guid, title: `${analysisResultInfo.value.tenantName}持有的“${oldAnonTaskValueInfo.value.taskName}”`, evaluationDate: analysisResultInfo.value.execTime ? analysisResultInfo.value.execTime.substring(0, 10) : '', 2226 downloadAnonReport({ taskGuid: oldAnonTaskValueInfo.value.guid, title: `${analysisResultInfo.value.tenantName}持有的“${oldAnonTaskValueInfo.value.taskName}”`, evaluationDate: analysisResultInfo.value.execTime ? analysisResultInfo.value.execTime.substring(0, 10) : '',
2226 deIdentProcessorName: userData.tenantName, html: encodeURIComponent(`<div>${getHTML(dom.innerHTML)}</div>`) }).then((res: any) => { 2227 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!