Compare commits

..

No commits in common. "ac1f5c66285a4b993d5a384457b58b449e41d7ae" and "111dd526d97365437a6d9a3b7e0bdff145fb06ff" have entirely different histories.

3 changed files with 6 additions and 18 deletions

View File

@ -245,10 +245,6 @@ export default {
return [];
},
},
visible: {
type: Boolean,
default: false,
},
},
data() {
return {
@ -257,7 +253,6 @@ export default {
dicomList: [], //
requestNum: 6,
hasOtherStudy: false, //
isClose: false,
};
},
watch: {
@ -337,7 +332,6 @@ export default {
this.dicomList = [];
this.hasOtherStudy = false;
for (var i = 0; i < files.length; ++i) {
if (files[i].name.indexOf("DICOMDIR") >= 0) continue;
let dicom = await parseDicom(files[i]);
if (!dicom) continue;
let has = this.dicomList.some(
@ -484,7 +478,6 @@ export default {
},
//
async handleUploadTask(arr, index) {
if (this.isClose) return false;
arr[index].isUpload = 1;
let path = `/${arr[index].params.TrialId}/TaskImage/${
arr[index].params.SubjectId
@ -501,7 +494,7 @@ export default {
(item) => item.StudyInstanceUid === arr[index].StudyInstanceUid
)[0];
let res = await dicomToOSS(arr[index].file, path);
if (res) {
if (res && index < 20) {
arr[index].path = res;
uploadDicom.successCount++;
arr[index].isUpload = 2;
@ -745,9 +738,6 @@ export default {
return studyTime;
},
},
beforeDestroy() {
this.isClose = true;
},
};
</script>
<style lang="scss" scoped>

View File

@ -72,7 +72,7 @@ let defaultKey = ['Rows', 'Columns', 'SliceLocation', 'NumberOfFrames'];
let pormatParseKey = ['PatientName', 'SeriesDescription', 'StudyDescription'];
// 解析dicom文件
export const parseDicom = (file, name = false) => {
return new Promise(function (resolve) {
return new Promise(function (resolve, reject) {
let reader = new FileReader();
reader.onload = function (e) {
try {
@ -94,8 +94,7 @@ export const parseDicom = (file, name = false) => {
res[name] = data.intString(dicom[name])
}
} else {
console.log("name is inexistence");
resolve(false)
reject("name is inexistence");
}
} else {
Object.keys(dicom).forEach((key) => {
@ -126,13 +125,11 @@ export const parseDicom = (file, name = false) => {
})
resolve(res);
} catch (error) {
console.log(error)
resolve(false);
reject(error);
}
};
reader.onerror = function (e) {
console.log(e)
resolve(false);
reject(e);
};
reader.readAsArrayBuffer(file);
});

View File

@ -936,6 +936,7 @@ export default {
},
handleSetModality() {
this.modalityListVisible = true;
console.log(this.form.ModalityList);
var a = this.$d.Modality.filter((v) => {
return !!this.form.ModalityList.find((v1) => {
return v1 === v.value;