16852fd6 by lihua

修改匿名化报告

1 parent 78bc58ff
...@@ -352,6 +352,13 @@ export const htmlToWord = (params) => request({ ...@@ -352,6 +352,13 @@ export const htmlToWord = (params) => request({
352 responseType: 'blob' 352 responseType: 'blob'
353 }) 353 })
354 354
355 export const downloadAnonReport = (params) => request({
356 url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/anon-task/download`,
357 method: 'postJsonD',
358 data: params,
359 responseType: 'blob'
360 })
361
355 /** 发送评测报告到邮箱 */ 362 /** 发送评测报告到邮箱 */
356 export const sendAnonReport = (params) => request({ 363 export const sendAnonReport = (params) => request({
357 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/anon-task/send-mail-and-msg`, 364 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/anon-task/send-mail-and-msg`,
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
4 4
5 <script lang="ts" setup name="anonResultReportView"> 5 <script lang="ts" setup name="anonResultReportView">
6 import { 6 import {
7 downloadAnonReport,
7 getAnonAnalyzePageData, 8 getAnonAnalyzePageData,
8 getAnonAnalyzeResult, 9 getAnonAnalyzeResult,
9 getAnonTaskDetail, 10 getAnonTaskDetail,
...@@ -16,11 +17,14 @@ import anonResultAnalysis from './components/anonResultAnalysis.vue'; ...@@ -16,11 +17,14 @@ import anonResultAnalysis from './components/anonResultAnalysis.vue';
16 import { commonPageConfig, USERROLE } from '@/utils/enum'; 17 import { commonPageConfig, USERROLE } from '@/utils/enum';
17 import { calcColumnWidth } from '@/utils'; 18 import { calcColumnWidth } from '@/utils';
18 import html2canvas from 'html2canvas'; 19 import html2canvas from 'html2canvas';
20 import useUserStore from "@/store/modules/user";
19 21
20 const route = useRoute(); 22 const route = useRoute();
21 const router = useRouter(); 23 const router = useRouter();
22 const fullPath = route.fullPath; 24 const fullPath = route.fullPath;
23 const taskGuid = ref(route.query.guid); 25 const taskGuid = ref(route.query.guid);
26 const userStore = useUserStore();
27 const userData = JSON.parse(userStore.userData)
24 const { proxy } = getCurrentInstance() as any; 28 const { proxy } = getCurrentInstance() as any;
25 const resultDataLoading = ref(false); 29 const resultDataLoading = ref(false);
26 30
...@@ -209,7 +213,7 @@ const downloadWord = () => { ...@@ -209,7 +213,7 @@ const downloadWord = () => {
209 loadingText.value = `评测报告正在${route.query.dataOwner == '1' ? '发送' : '下载' }中,请勿关闭浏览器...`; 213 loadingText.value = `评测报告正在${route.query.dataOwner == '1' ? '发送' : '下载' }中,请勿关闭浏览器...`;
210 downPromise.value = convertHtml2Img(report, dom).then(() => { 214 downPromise.value = convertHtml2Img(report, dom).then(() => {
211 if (route.query.dataOwner == '1') { 215 if (route.query.dataOwner == '1') {
212 sendAnonReport({ taskGuid: taskGuid.value, html: encodeURIComponent(`<div>${getHTML(dom.innerHTML)}</div>`) }).then((res: any) => { 216 sendAnonReport({ taskGuid: taskGuid.value, title: `${analysisResultInfo.value.tenantName}持有的“${oldAnonTaskValueInfo.value.taskName}”`, evaluationDate: analysisResultInfo.value.execTime, deIdentProcessorName: userData.tenantName, html: encodeURIComponent(`<div>${getHTML(dom.innerHTML)}</div>`) }).then((res: any) => {
213 downPromise.value = null 217 downPromise.value = null
214 loadingText.value = ''; 218 loadingText.value = '';
215 resultDataLoading.value = false; 219 resultDataLoading.value = false;
...@@ -220,7 +224,7 @@ const downloadWord = () => { ...@@ -220,7 +224,7 @@ const downloadWord = () => {
220 } 224 }
221 }) 225 })
222 } else { 226 } else {
223 htmlToWord({ html: encodeURIComponent(`<div>${getHTML(dom.innerHTML)}</div>`) }).then((res: any) => { 227 downloadAnonReport({ taskGuid: taskGuid.value, title: `${analysisResultInfo.value.tenantName}持有的“${oldAnonTaskValueInfo.value.taskName}”`, evaluationDate: analysisResultInfo.value.execTime, deIdentProcessorName: userData.tenantName, html: encodeURIComponent(`<div>${getHTML(dom.innerHTML)}</div>`) }).then((res: any) => {
224 downPromise.value = null 228 downPromise.value = null
225 loadingText.value = ''; 229 loadingText.value = '';
226 resultDataLoading.value = false; 230 resultDataLoading.value = false;
...@@ -273,7 +277,7 @@ onBeforeMount(() => { ...@@ -273,7 +277,7 @@ onBeforeMount(() => {
273 <div class="table_tool_wrap" v-loading="resultDataLoading" ref="containerRef" :element-loading-text="loadingText"> 277 <div class="table_tool_wrap" v-loading="resultDataLoading" ref="containerRef" :element-loading-text="loadingText">
274 <!-- 连接器不需要显示下载报告按钮 --> 278 <!-- 连接器不需要显示下载报告按钮 -->
275 <template v-if="!isDataProvider"> 279 <template v-if="!isDataProvider">
276 <el-button v-show="!isWordStyle" style="margin-bottom: 8px;" type="primary" @click="transfer" 280 <el-button v-show="!isWordStyle && analysisResultInfo.rating >= 2" style="margin-bottom: 8px;" type="primary" @click="transfer"
277 v-preReClick>预览Word评估报告</el-button> 281 v-preReClick>预览Word评估报告</el-button>
278 <div v-show="isWordStyle" style="margin-bottom: 8px;"> 282 <div v-show="isWordStyle" style="margin-bottom: 8px;">
279 <el-button @click="isWordStyle = false">返回</el-button> 283 <el-button @click="isWordStyle = false">返回</el-button>
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
168 </anonResultAnalysis> 168 </anonResultAnalysis>
169 <!-- 连接器只能查看报告 --> 169 <!-- 连接器只能查看报告 -->
170 <template v-if="!isDataProvider" #header> 170 <template v-if="!isDataProvider" #header>
171 <el-button v-show="isExecEnd && analysisResultInfo.status == 'Y' && !isWordStyle" type="primary" 171 <el-button v-show="isExecEnd && analysisResultInfo.status == 'Y' && !isWordStyle && analysisResultInfo.rating >= 2" type="primary"
172 v-loading="!!downPromise" @click="transfer">预览Word评估报告</el-button> 172 v-loading="!!downPromise" @click="transfer">预览Word评估报告</el-button>
173 <div v-show="isWordStyle"> 173 <div v-show="isWordStyle">
174 <el-button @click="isWordStyle = false">返回</el-button> 174 <el-button @click="isWordStyle = false">返回</el-button>
...@@ -237,6 +237,7 @@ import { ...@@ -237,6 +237,7 @@ import {
237 getDicomMeta, 237 getDicomMeta,
238 getDicomStatistics, 238 getDicomStatistics,
239 retryDicom, 239 retryDicom,
240 downloadAnonReport,
240 sendAnonReport 241 sendAnonReport
241 } from '@/api/modules/dataAnonymization'; 242 } from '@/api/modules/dataAnonymization';
242 import { 243 import {
...@@ -268,6 +269,7 @@ import html2canvas from 'html2canvas'; ...@@ -268,6 +269,7 @@ import html2canvas from 'html2canvas';
268 const anonymizationStore = useDataAnonymizationStore(); 269 const anonymizationStore = useDataAnonymizationStore();
269 const { proxy } = getCurrentInstance() as any; 270 const { proxy } = getCurrentInstance() as any;
270 const userStore = useUserStore(); 271 const userStore = useUserStore();
272 const userData = JSON.parse(userStore.userData)
271 const route = useRoute(); 273 const route = useRoute();
272 const router = useRouter(); 274 const router = useRouter();
273 const fullPath = route.fullPath; 275 const fullPath = route.fullPath;
...@@ -1252,6 +1254,7 @@ const dialogBtnClick = (btn) => { ...@@ -1252,6 +1254,7 @@ const dialogBtnClick = (btn) => {
1252 if (taskGuid.value) { 1254 if (taskGuid.value) {
1253 saveParams.guid = taskGuid.value; 1255 saveParams.guid = taskGuid.value;
1254 } 1256 }
1257 saveParams.dataSharingTypeName = saveParams.dataSharingTypeCode && dataSharingTypeList.value.find(d => d.value == saveParams.dataSharingTypeCode)?.label;
1255 dicomStatisticsData.value = {}; 1258 dicomStatisticsData.value = {};
1256 folderFileTableInfo.value.data = []; 1259 folderFileTableInfo.value.data = [];
1257 if (!taskGuid.value) { //保存 1260 if (!taskGuid.value) { //保存
...@@ -2219,7 +2222,8 @@ const downloadWord = () => { ...@@ -2219,7 +2222,8 @@ const downloadWord = () => {
2219 loadingText.value = '报告正在下载中,请勿关闭浏览器...'; 2222 loadingText.value = '报告正在下载中,请勿关闭浏览器...';
2220 downloadLoading.value = true; 2223 downloadLoading.value = true;
2221 downPromise.value = convertHtml2Img(report, dom).then(() => { 2224 downPromise.value = convertHtml2Img(report, dom).then(() => {
2222 htmlToWord({ html: encodeURIComponent(`<div>${getHTML(dom.innerHTML)}</div>`) }).then((res: any) => { 2225 downloadAnonReport({ taskGuid: oldAnonTaskValueInfo.value.guid, title: `${analysisResultInfo.value.tenantName}持有的“${oldAnonTaskValueInfo.value.taskName}”`, evaluationDate: analysisResultInfo.value.execTime,
2226 deIdentProcessorName: userData.tenantName, html: encodeURIComponent(`<div>${getHTML(dom.innerHTML)}</div>`) }).then((res: any) => {
2223 downPromise.value = null 2227 downPromise.value = null
2224 loadingText.value = ''; 2228 loadingText.value = '';
2225 downloadLoading.value = false; 2229 downloadLoading.value = false;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!