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