先下载再上传的逻辑指定IVUS和OCT标准
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
7e9eb1f3a5
commit
cbd860a35e
|
|
@ -477,7 +477,10 @@ export default {
|
|||
let res = await getSubjectImageUploadList(params)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.isDownloaded = res.OtherInfo.IsIRImageDownloaded
|
||||
this.isDownloaded = this.Criterion && this.Criterion.CriterionType && (
|
||||
this.Criterion.CriterionType == 19 ||
|
||||
this.Criterion.CriterionType == 20
|
||||
) ? res.OtherInfo.IsIRImageDownloaded : true
|
||||
this.TrialModality = res.OtherInfo.TrialModality.split('|')
|
||||
this.IsReadingTaskViewInOrder = res.OtherInfo.IsReadingTaskViewInOrder || res.OtherInfo.IsReadingTaskViewInOrder === 0 ? res.OtherInfo.IsReadingTaskViewInOrder : 2
|
||||
this.StudyInstanceUidList = []
|
||||
|
|
|
|||
|
|
@ -353,7 +353,10 @@ export default {
|
|||
if (res.IsSuccess) {
|
||||
this.list = res.Result
|
||||
this.relationInfo = res.OtherInfo
|
||||
this.isDownloaded = res.OtherInfo.IsIRImageDownloaded
|
||||
this.isDownloaded = this.Criterion && this.Criterion.CriterionType && (
|
||||
this.Criterion.CriterionType == 19 ||
|
||||
this.Criterion.CriterionType == 20
|
||||
) ? res.OtherInfo.IsIRImageDownloaded : true
|
||||
this.faccept = []
|
||||
this.relationInfo.ImageFormatList.forEach((item) => {
|
||||
this.faccept.push(`.${item}`)
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ function zipFiles(zipName, files) {
|
|||
store.dispatch('trials/setUnLock', true)
|
||||
files = formatFiles(files)
|
||||
// 创建压缩文件输出流
|
||||
const zipFileOutputStream = streamSaver.createWriteStream(zipName);
|
||||
let zipFileOutputStream = streamSaver.createWriteStream(zipName);
|
||||
// 创建下载文件流
|
||||
const fileIterator = files.values();
|
||||
const readableZipStream = new ZIP({
|
||||
let readableZipStream = new ZIP({
|
||||
async pull(ctrl) {
|
||||
const fileInfo = fileIterator.next();
|
||||
if (fileInfo.done) {//迭代终止
|
||||
|
|
@ -41,9 +41,13 @@ function zipFiles(zipName, files) {
|
|||
.then(() => {
|
||||
console.log("同步下载打包结束时间:" + new Date());
|
||||
store.dispatch('trials/setUnLock', false)
|
||||
readableZipStream = null;
|
||||
zipFileOutputStream = null;
|
||||
resolve(true)
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
readableZipStream = null;
|
||||
zipFileOutputStream = null;
|
||||
resolve(false)
|
||||
});
|
||||
} else {
|
||||
|
|
@ -61,14 +65,16 @@ async function updateFile(file, name) {
|
|||
return new Promise(async resolve => {
|
||||
try {
|
||||
store.dispatch('trials/setUnLock', true)
|
||||
const fileOutputStream = streamSaver.createWriteStream(name);
|
||||
let fileOutputStream = streamSaver.createWriteStream(name);
|
||||
// file = decodeUtf8(file);
|
||||
let res = await fetch(file);
|
||||
res.body.pipeTo(fileOutputStream).then(() => {
|
||||
store.dispatch('trials/setUnLock', true)
|
||||
fileOutputStream = null;
|
||||
resolve(true)
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
fileOutputStream = null;
|
||||
resolve(false)
|
||||
});
|
||||
} catch (err) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue