上传流程修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
8156c43525
commit
113404766d
|
@ -46,10 +46,13 @@ service.interceptors.request.use(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var isConfirm = true
|
||||||
|
|
||||||
service.interceptors.response.use(
|
service.interceptors.response.use(
|
||||||
response => {
|
response => {
|
||||||
const res = response.data
|
const res = response.data
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
|
isConfirm = true
|
||||||
return Promise.resolve(res)
|
return Promise.resolve(res)
|
||||||
} else if (res.IsSuccess === false) {
|
} else if (res.IsSuccess === false) {
|
||||||
if (res.Code !== 5) {
|
if (res.Code !== 5) {
|
||||||
|
@ -115,7 +118,7 @@ service.interceptors.response.use(
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(message !== ''){
|
if(message !== '' && isConfirm){
|
||||||
MessageBox.confirm(message, store.state.lang.language === 'en'? 'Warning' : '警告', {
|
MessageBox.confirm(message, store.state.lang.language === 'en'? 'Warning' : '警告', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
showCancelButton: false,
|
showCancelButton: false,
|
||||||
|
@ -124,12 +127,13 @@ service.interceptors.response.use(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!window.navigator.onLine) {
|
if (!window.navigator.onLine && isConfirm) {
|
||||||
MessageBox.confirm(store.state.lang.language === 'en'? 'Please check your network, refresh the page later to try again!' : '请检查您的网络,稍后刷新页面重试!', store.state.lang.language === 'en'? 'Warning' : '警告', {
|
MessageBox.confirm(store.state.lang.language === 'en'? 'Please check your network,and try again later!' : '请检查网络,稍后重试!', store.state.lang.language === 'en'? 'Warning' : '警告', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
showCancelButton: false,
|
showCancelButton: false,
|
||||||
callback: action => {}
|
callback: action => {}
|
||||||
})
|
})
|
||||||
|
isConfirm = false
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(message || 'Error'))
|
return Promise.reject(new Error(message || 'Error'))
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<template v-if="readingTaskState<2 && task.VisitTaskId === visitTaskId && (scope.row.Type==='input' || scope.row.Type==='number' || scope.row.Type==='select' || scope.row.Type==='textarea' || scope.row.Type==='radio')">
|
<template v-if="readingTaskState<2 && task.VisitTaskId === visitTaskId && (scope.row.Type==='input' || scope.row.Type==='number' || scope.row.Type==='select' || scope.row.Type==='textarea' || scope.row.Type==='radio')">
|
||||||
<template>
|
<template>
|
||||||
|
{{readingTaskState}}{{task.VisitTaskId === visitTaskId}}{{scope.row.Type}}{{scope.row.IsShowInDicom}}
|
||||||
<!-- 输入框 -->
|
<!-- 输入框 -->
|
||||||
<div>
|
<div>
|
||||||
<template v-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)">
|
<template v-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)">
|
||||||
|
|
|
@ -44,7 +44,17 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tooltip placement="top">
|
<el-tooltip placement="top" v-if="(() => {
|
||||||
|
var r = false
|
||||||
|
if (scope.row.IsHaveUploadFailed) {
|
||||||
|
uploadQueues.forEach((v) => {
|
||||||
|
if (v.dicomInfo.studyUid === scope.row.StudyInstanceUid && v.uploadState.record && v.uploadState.record.Failed.length){
|
||||||
|
r = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return r
|
||||||
|
})()">
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
{{ $t('trials:uploadDicomList:table:status4') }}
|
{{ $t('trials:uploadDicomList:table:status4') }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -133,16 +143,15 @@
|
||||||
circle
|
circle
|
||||||
@click="handleDeleteStudy(scope.row)"
|
@click="handleDeleteStudy(scope.row)"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
icon="el-icon-toilet-paper"
|
<!-- icon="el-icon-toilet-paper"-->
|
||||||
circle
|
<!-- circle-->
|
||||||
:title="$t('trials:uploadDicomFiles:button:historical')"
|
<!-- :title="$t('trials:uploadDicomFiles:button:historical')"-->
|
||||||
@click="handleHistorical(scope.row)"
|
<!-- @click="handleHistorical(scope.row)"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<!-- 多文件上传 -->
|
<!-- 多文件上传 -->
|
||||||
<form id="inputForm" ref="uploadForm" enctype="multipart/form-data">
|
<form id="inputForm" ref="uploadForm" enctype="multipart/form-data">
|
||||||
<el-divider content-position="left">{{ $t('trials:uploadedDicoms:title:dicomFilesOnly') }}</el-divider>
|
<el-divider content-position="left">{{ $t('trials:uploadedDicoms:title:dicomFilesOnly') }}</el-divider>
|
||||||
|
@ -1140,7 +1149,7 @@ export default {
|
||||||
Record.Existed.push(name)
|
Record.Existed.push(name)
|
||||||
Record.FileCount++
|
Record.FileCount++
|
||||||
} else {
|
} else {
|
||||||
let path = `/${params.trialId}/Image/${params.siteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}/${o.instanceUid}/${scope.getGuid(dicomInfo.studyUid + v.seriesUid + o.instanceUid + params.trialId)}`
|
let path = `/${params.trialId}/Image/${params.siteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${scope.getGuid(dicomInfo.studyUid + v.seriesUid + o.instanceUid + params.trialId)}`
|
||||||
let res = await dcmUpload(path, o.file, config)
|
let res = await dcmUpload(path, o.file, config)
|
||||||
if (!res || !res.url) {
|
if (!res || !res.url) {
|
||||||
params.failedFileCount++
|
params.failedFileCount++
|
||||||
|
@ -1151,7 +1160,7 @@ export default {
|
||||||
o.file
|
o.file
|
||||||
)
|
)
|
||||||
let blob = await scope.dicomToPng(fileId, o.imageColumns, o.imageRows)
|
let blob = await scope.dicomToPng(fileId, o.imageColumns, o.imageRows)
|
||||||
let thumbnailPath = `/${params.trialId}/Image/${params.siteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}/${v.seriesUid}.png`
|
let thumbnailPath = `/${params.trialId}/Image/${params.siteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}.png`
|
||||||
let OSSclient = scope.OSSclient
|
let OSSclient = scope.OSSclient
|
||||||
let seriesRes = await OSSclient.put(thumbnailPath, blob)
|
let seriesRes = await OSSclient.put(thumbnailPath, blob)
|
||||||
if (seriesRes && seriesRes.url) {
|
if (seriesRes && seriesRes.url) {
|
||||||
|
@ -1237,7 +1246,7 @@ export default {
|
||||||
v.instanceList[0].file
|
v.instanceList[0].file
|
||||||
)
|
)
|
||||||
let blob = await scope.dicomToPng(fileId, v.instanceList[0].imageColumns, v.instanceList[0].imageRows)
|
let blob = await scope.dicomToPng(fileId, v.instanceList[0].imageColumns, v.instanceList[0].imageRows)
|
||||||
let thumbnailPath = `/${params.trialId}/Image/${params.siteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}/${v.seriesUid}.png`
|
let thumbnailPath = `/${params.trialId}/Image/${params.siteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}.png`
|
||||||
let OSSclient = scope.OSSclient
|
let OSSclient = scope.OSSclient
|
||||||
let seriesRes = await OSSclient.put(thumbnailPath, blob)
|
let seriesRes = await OSSclient.put(thumbnailPath, blob)
|
||||||
if (seriesRes && seriesRes.url) {
|
if (seriesRes && seriesRes.url) {
|
||||||
|
|
|
@ -180,12 +180,6 @@
|
||||||
min-width="120"
|
min-width="120"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tooltip placement="top" v-key="scope.row.Id" v-if="scope.row.IsHaveUploadFailed">
|
|
||||||
<div slot="content">
|
|
||||||
{{ $t('trials:uploadDicomList:table:status4') }}
|
|
||||||
</div>
|
|
||||||
<span class="el-icon-warning" style="color: #cbb024;cursor: pointer"></span>
|
|
||||||
</el-tooltip>
|
|
||||||
<span style="margin: 0 4px">{{ scope.row.SubjectCode }}</span>
|
<span style="margin: 0 4px">{{ scope.row.SubjectCode }}</span>
|
||||||
<!-- 基 -->
|
<!-- 基 -->
|
||||||
<span v-if="scope.row.SubjectFirstGiveMedicineTime" class="status-primary-circle">
|
<span v-if="scope.row.SubjectFirstGiveMedicineTime" class="status-primary-circle">
|
||||||
|
@ -1428,11 +1422,10 @@ export default {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
let text = this.$t('trials:crcUpload:message:submit')
|
let text = this.$t('trials:crcUpload:message:submit')
|
||||||
if (this.rowData.IsHaveUploadFailed) {
|
if (this.rowData.IsHaveUploadFailed) {
|
||||||
text = `<div>${this.$t('trials:crcUpload:message:submit')}</div>` +
|
text = `<div>${this.$t('trials:crcUpload:message:submit')}</div>`
|
||||||
`<div style="font-size: 12px;color:#f66;margin-top: 5px;"><span class="el-icon-warning"></span>${this.$t('trials:crcUpload:message:submitNote')}</div>`
|
|
||||||
}
|
}
|
||||||
this.$confirm(text, {
|
this.$confirm(text, {
|
||||||
dangerouslyUseHTMLString: true ,
|
dangerouslyUseHTMLString: true,
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true
|
distinguishCancelAndClose: true
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue