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

View File

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

View File

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