EI-Image-Viewer-Api/Start/Resource/EIImageViewerWeb/html/static/js/chunk-ab1040ea.9cb6c2fba59d...

1 line
17 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ab1040ea"],{"5bef":function(e,t,i){"use strict";i("c6bd")},"6fc8":function(e,t,i){"use strict";i.r(t);var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"viewerContainer"},[i("div",{staticClass:"viewerContentWrapper"},[i("div",{staticClass:"viewerLeftSidePanel"},[i("div",{staticClass:"sidePanelBody",attrs:{id:"listWrapper"}},[i("div",{staticClass:"sidePanelThumbs"},[i("el-tabs",{attrs:{type:"border-card"},on:{"tab-click":e.handleTabClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[i("el-tab-pane",{attrs:{label:"当前检查",name:"current-study"}},[i("div",{staticClass:"text-desc"},[e._v("\n "+e._s(e.visitInfo)+"\n ")]),e._v(" "),i("div",{staticClass:"viewerSidethumbs ps",staticStyle:{position:"relative"}},[i("div",{staticClass:"viewerSidethumbinner"},e._l(e.studyList,(function(t,s){return i("div",{key:s},[i("div",{staticClass:"text-desc"},[e._v("\n "+e._s(t.StudyCode)+"\n ")]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.Description,expression:"study.Description"}],staticClass:"text-desc"},[e._v("\n "+e._s(t.Description)+"\n ")]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.SeriesCount,expression:"study.SeriesCount"}],staticClass:"text-desc"},[e._v("\n "+e._s(t.Modalities)+" : "+e._s(t.SeriesCount)+" Series\n ")]),e._v(" "),e._l(t.SeriesList,(function(t,a){return i("div",{key:a,class:{viewerSideActive:0==a&&0===s},staticStyle:{position:"relative","margin-bottom":"5px","border-radius":"2px",border:"1px solid #404040"},attrs:{"series-type":"current"},on:{click:function(i){return e.showSeriesImage(i,s,a,t)}}},[i("div",{staticClass:"viewernavigatorwrapper"},[i("el-image",{staticClass:"image-preview",staticStyle:{height:"72px",width:"72px"},attrs:{src:t.previewImageUrl,fit:"fill"}}),e._v(" "),i("div",{staticClass:"viewernavitextwrapper"},[i("div",{staticStyle:{padding:"1px"}},[e._v("\n #"+e._s(t.seriesNumber)+"\n ")]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.InstanceCount,expression:"series.InstanceCount"}],staticStyle:{padding:"1px"}},[e._v("\n "+e._s(t.modality)+": "+e._s(t.instanceCount)+" image\n ")]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.sliceThickness,expression:" series.sliceThickness"}],staticStyle:{padding:"1px"}},[e._v("\n T: "+e._s(t.sliceThickness)+"\n ")]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.description,expression:"series.description"}],staticStyle:{width:"120px","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis",padding:"1x"}},[e._v("\n "+e._s(t.description)+"\n ")]),e._v(" "),i("div",{staticStyle:{padding:"1px"}},[e._v("\n "+e._s(t.prefetchInstanceCount)+"/"+e._s(t.instanceCount)+"\n ")])])],1),e._v(" "),e.showDelete?i("div",{on:{click:function(e){e.stopPropagation()}}},[i("span",{staticStyle:{"font-size":"12px"}},[e._v(e._s(e.$t("trials:audit:table:isReading")))]),e._v(" "),i("el-switch",{attrs:{size:"mini"},on:{change:function(i){return e.changeReadingStatus(i,t)}},model:{value:t.isReading,callback:function(i){e.$set(t,"isReading",i)},expression:"series.isReading"}}),e._v(" "),i("span",{staticStyle:{"font-size":"12px"}},[e._v(e._s(e.$t("trials:audit:table:isDelete")))]),e._v(" "),i("el-switch",{attrs:{size:"mini"},on:{change:function(i){return e.changeDeleteStatus(i,t)}},model:{value:t.isDeleted,callback:function(i){e.$set(t,"isDeleted",i)},expression:"series.isDeleted"}})],1):e._e(),e._v(" "),t.prefetchInstanceCount>0&&t.prefetchInstanceCount<t.instanceCount?i("div",[i("el-progress",{attrs:{percentage:parseInt((t.prefetchInstanceCount/t.instanceCount*100).toFixed(2))}})],1):e._e()])}))],2)})),0)])]),e._v(" "),i("el-tab-pane",{staticClass:"pane-relation-wrapper",attrs:{label:"关联检查",name:"relation-study"}},[i("div",e._l(e.relationStudyList,(function(t,s){return i("div",{key:s,staticStyle:{"margin-bottom":"5px"}},[i("div",{class:["text-desc","relationVisit","relation-study-wrapper-"+s],on:{click:function(i){return e.getRelationSeriesByStudy(t.StudyId,s)}}},[i("span",{directives:[{name:"show",rawName:"v-show",value:t.VisitName,expression:"study.VisitName"}]},[e._v(e._s(t.VisitName)+" ")]),e._v(" "),i("span",{directives:[{name:"show",rawName:"v-show",value:t.StudyCode,expression:"study.StudyCode"}]},[e._v(" : "+e._s(t.StudyCode))]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.Modalities,expression:"study.Modalities"}]},[e._v("\n "+e._s(t.Modalities)+" : "+e._s(t.SeriesCount)+" Series\n ")]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.Description,expression:"study.Description"}]},[e._v("\n "+e._s(t.Description)+"\n ")])]),e._v(" "),t.seriesList&&t.showSeries?i("div",{staticClass:"viewerSidethumbs ps",staticStyle:{position:"relative"}},[i("div",{staticClass:"viewerSidethumbinner"},e._l(t.seriesList,(function(t,s){return i("div",{key:s,staticClass:"viewernavigatorwrapper",staticStyle:{position:"relative"},attrs:{"series-type":"relation"},on:{click:function(i){return e.showRelationSeriesImage(i,t,s)}}},[i("el-image",{staticClass:"image-preview",staticStyle:{height:"72px",width:"72px"},attrs:{src:t.previewImageUrl,fit:"fill"}}),e._v(" "),i("div",{staticClass:"viewernavitextwrapper"},[t.keySeries?i("div",{staticStyle:{padding:"1px",color:"red"}},[e._v("\n Key Images\n ")]):i("div",{staticStyle:{padding:"1px"}},[e._v("\n #"+e._s(t.seriesNumber)+"\n ")]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.instanceCount,expression:" seriesItem.instanceCount"}],staticStyle:{padding:"1px"}},[e._v("\n "+e._s(t.modality)+": "+e._s(t.instanceCount)+" image\n ")]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.sliceThickness,expression:"seriesItem.sliceThickness"}],staticStyle:{padding:"1px"}},[e._v("\n T: "+e._s(t.sliceThickness)+"\n ")]),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.description,expression:"seriesItem.description"}],staticStyle:{width:"120px","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis",padding:"1x"}},[e._v("\n "+e._s(t.description)+"\n ")])])],1)})),0)]):e._e()])})),0)])],1)],1)])]),e._v(" "),i("div",{staticClass:"viewerContent"},[i("dicom-viewer",{ref:"dicomViewer",staticStyle:{height:"100%"},attrs:{id:"dicomViewer"}})],1)])])},a=[],n=(i("20d6"),i("6762"),i("2fdb"),i("db72")),r=(i("7f7f"),i("a481"),i("5df3"),i("1c4c"),i("28a5"),i("ac6a"),i("acd4")),o=i("81d9"),d=i("344d"),c=i("cc73"),u=i("0a05"),l=i("3e42"),h=i("f5c4"),v=i("4360"),p=i("a599");d["external"].dicomParser=r,d["external"].cornerstone=o;var m={name:"DicomsOfVisit",components:{"dicom-viewer":c["default"]},data:function(){return{studyList:[],visitInfo:"",activeName:"current-study",relationStudyList:[],cachedImages:[],isReading:null,isStartLoad:!1,firstInstanceId:"",firstSeriesId:"",showDelete:0,imageList:[]}},mounted:function(){this.$router.currentRoute.query.TokenKey&&(v["a"].dispatch("user/setToken",this.$router.currentRoute.query.TokenKey),Object(p["a"])("TokenKey","")),this.trialId=this.$router.currentRoute.query.trialId,this.subjectVisitId=this.$router.currentRoute.query.subjectVisitId,this.visitInfo=this.$router.currentRoute.query.visitInfo,this.isReading=this.$router.currentRoute.query.isReading?1*this.$router.currentRoute.query.isReading:0,this.showDelete=parseInt(this.$router.currentRoute.query.showDelete),o["events"].addEventListener("cornerstoneimageloaded",this.cornerstoneImageLoaded),this.getStudiesInfo()},beforeDestroy:function(){h["a"].stopTaskTimer()},methods:{getStudiesInfo:function(){var e=this;this.studyList=[],Object(u["n"])(this.trialId,this.subjectVisitId,this.isReading).then((function(t){if(t.Result.forEach((function(t){var i={};i.StudyId=t.StudyId,i.StudyCode=t.StudyCode,i.Modalities=t.Modalities,i.SeriesCount=t.SeriesCount,i.InstanceCount=t.InstanceCount,i.InstanceCount=t.InstanceCount,i.PreviewImageCount=0;var s=[];t.SeriesList.forEach((function(i){var a=[];i.InstancePathList.forEach((function(e){a.push("wadouri:".concat("USA"!==localStorage.getItem("location")?"https://zyypacs-mdc.oss-cn-shanghai.aliyuncs.com":"https://zyypacs-usa.oss-us-west-1.aliyuncs.com").concat(e))})),s.push({trialId:e.trialId,subjectVisitId:e.subjectVisitId,studyId:t.StudyId,imageIds:a,seriesId:i.Id,seriesUid:i.SeriesInstanceUid,seriesNumber:i.SeriesNumber,sliceThickness:i.SliceThickness,modality:i.Modality,description:i.Description,isReading:i.IsReading,isDeleted:i.IsDeleted,previewImageUrl:"/api/series/preview/".concat(i.Id),instanceCount:i.InstanceCount,prefetchInstanceCount:0,loadStatus:!1,imageloadedArr:[]})})),i.SeriesList=s,e.studyList.push(i)})),e.studyList.length>0){e.$refs.dicomViewer.loadImageStack(e.studyList[0].SeriesList[0]);var i=e.studyList[0].SeriesList[0].imageIds[0],s=i.split("/")[i.split("/").length-1];s=s.split(".")[0],e.firstInstanceId=s}}))},showSeriesImage:function(e,t,i,s){var a=this,n=e.currentTarget,r=document.querySelectorAll("[series-type]");if(Array.from(r).forEach((function(e){e.classList.remove("viewerSideActive")})),n.classList.add("viewerSideActive"),this.currentSeriesIndex=i,this.$refs.dicomViewer.loadImageStack(this.studyList[t].SeriesList[i]),!s.loadStatus){s.isLoading=!0;var o=parseInt((new Date).getTime());s.imageIds.map((function(e,t){var i="";i=0===t?10*parseInt((new Date).getTime()):o-1,a.imageList.push({imageId:e,seriesId:s.seriesId,priority:i})}))}},changeReadingStatus:function(e,t){var i=this,s="";e?(s=this.$t("trials:audit:label:setSeriesReading"),t.isReading=!1):(s=this.$t("trials:audit:label:setSeriesNotReading"),t.isReading=!0);var a=this.$t("trials:audit:message:changeSeriesStatus").replace("xxx",s);this.$confirm(a,{distinguishCancelAndClose:!0,type:"warning"}).then((function(){var e=t.isReading?1:2;i.loading=!0,Object(l["Re"])(t.trialId,t.subjectVisitId,t.studyId,t.seriesId,e).then((function(e){i.loading=!1,e.IsSuccess&&(t.isReading=!t.isReading,i.$message.success(i.$t("common:message:savedSuccessfully")),window.opener.postMessage({type:"refreshSeriesList",data:""},window.location))})).catch((function(){i.loading=!1}))})).catch((function(){}))},changeDeleteStatus:function(e,t){var i=this,s="";e?(s=this.$t("trials:audit:label:setSeriesDeleted"),t.isDeleted=!1):(s=this.$t("trials:audit:label:setSeriesNotDelete"),t.isDeleted=!0);var a=this.$t("trials:audit:message:changeSeriesStatus").replace("xxx",s);this.$confirm(a,{distinguishCancelAndClose:!0,type:"warning"}).then((function(){var e=t.isDeleted?5:4;i.loading=!0,Object(l["Re"])(t.trialId,t.subjectVisitId,t.studyId,t.seriesId,e).then((function(e){i.loading=!1,e.IsSuccess&&(t.isDeleted=!t.isDeleted,i.$message.success(i.$t("common:message:savedSuccessfully")),window.opener.postMessage({type:"refreshSeriesList",data:""},window.location))})).catch((function(){i.loading=!1}))})).catch((function(){}))},handleTabClick:function(e,t){var i=this;if("relation-study"===e.name&&this.relationStudyList.length<=0){var s=this.$loading({target:document.querySelector(".pane-relation-wrapper"),fullscreen:!1,lock:!0,text:"Loading",background:"rgb(49 49 49 / 50%)",spinner:"el-icon-loading"});Object(u["e"])(this.subjectVisitId).then((function(e){s.close(),i.relationStudyList=e.Result})).catch((function(){s.close()}))}},getRelationSeriesByStudy:function(e,t){if(this.relationStudyList[t].seriesCount)this.relationStudyList[t].showSeries=!this.relationStudyList[t].showSeries,this.$forceUpdate();else{var i=this,s=this.$loading({target:document.querySelector(".relation-study-wrapper-".concat(t)),fullscreen:!1,lock:!0,text:"Loading",background:"rgb(49 49 49 / 50%)",spinner:"el-icon-loading"});Object(u["k"])(e).then((function(a){i.relationStudyList[t].studyCode=a.Result.StudyCode,i.relationStudyList[t].modality=a.Result.Modalities,i.relationStudyList[t].seriesCount=a.Result.SeriesCount,Object(u["j"])("/series/list/".concat(e)).then((function(e){if(s.close(),null!=e.Result&&e.Result.length>0){var a=[],n=e.Result;n.forEach((function(e){var t=[];e.InstancePathList.forEach((function(e){t.push("wadouri:".concat("USA"!==localStorage.getItem("location")?"https://zyypacs-mdc.oss-cn-shanghai.aliyuncs.com":"https://zyypacs-usa.oss-us-west-1.aliyuncs.com").concat(e))})),a.push({imageIds:t,seriesId:e.Id,seriesUid:e.SeriesInstanceUid,seriesNumber:e.SeriesNumber,sliceThickness:e.SliceThickness,modality:e.Modality,description:e.Description,previewImageUrl:"/api/series/preview/".concat(e.Id),instanceCount:e.InstanceCount,prefetchInstanceCount:0,hasLabel:e.HasLabel,keySeries:e.KeySeries,loadStatus:!1,imageloadedArr:[]})})),i.relationStudyList[t].seriesCount=a.length,i.relationStudyList[t].seriesList=a,i.relationStudyList[t].showSeries=!0,i.$forceUpdate()}})).catch((function(){s.close()}))})).catch((function(){s.close()}))}},showRelationSeriesImage:function(e,t,i){var s=this;this.currentRelationIndex=i;var a=e.currentTarget,n=document.querySelectorAll("[series-type]");if(Array.from(n).forEach((function(e){e.classList.remove("viewerSideActive")})),a.classList.add("viewerSideActive"),this.$refs.dicomViewer.loadImageStack(t),!t.loadStatus){var r=parseInt((new Date).getTime());t.imageIds.map((function(e){s.imageList.push({imageId:e,seriesId:t.seriesId,priority:r})}))}},loadAllImages:function(){var e=this,t=parseInt((new Date).getTime());this.studyList.map((function(i){i.SeriesList.map((function(i){if(!i.loadStatus&&i.seriesId!==e.firstSeriesId){var s=isNaN(parseInt(i.sliceThickness))?null:parseInt(i.sliceThickness);(5===s||i.instanceCount<=100)&&i.imageIds.map((function(s){e.imageList.push({imageId:s,seriesId:i.seriesId,priority:t})}))}}))})),this.imageList.length>0&&this.loopLoad()},loopLoad:function(){var e=this;this.imageList.length>0&&(h["a"].startTaskTimer(),this.imageList.map((function(t){h["a"].loadAndCacheImagePlus(t.imageId,t.seriesId,t.priority).then((function(i){e.imageLoaded(t,i.data.string("x0020000e"))}))})),this.imageList=[])},load:function(e,t){var i=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:999;return new Promise((function(a,n){h["a"].loadAndCacheImagePlus(e,t,s).then((function(t){t&&(i.imageLoaded(e,t.data.string("x0020000e")),a(t))})).catch((function(e){n(e)}))}))},buildImageRequestTask:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(n["a"])(Object(n["a"])({key:e},t),{},{execute:function(){return o["loadAndCacheImage"](e)}})},datasetsCacheChanged:function(e){var t=e.detail.cacheInfo;t.cacheSizeInBytes},imageLoaded:function(e,t){for(var i=-1,s=-1,a=0;a<this.studyList.length;++a){for(var n=0;n<this.studyList[a].SeriesList.length;++n)if(this.studyList[a].SeriesList[n].seriesUid===t){i=a,s=n;break}if(i>0)break}if(!(s<0)){var r=this.studyList[i].SeriesList[s].imageIds.indexOf(e);r<0||this.studyList[i].SeriesList[s].imageloadedArr.indexOf(e)<0&&(++this.studyList[i].SeriesList[s].prefetchInstanceCount,this.studyList[i].SeriesList[s].imageloadedArr.push(e),this.studyList[i].SeriesList[s].prefetchInstanceCount>=this.studyList[i].SeriesList[s].instanceCount&&(this.studyList[i].SeriesList[s].prefetchInstanceCount=this.studyList[i].SeriesList[s].instanceCount,this.studyList[i].SeriesList[s].loadStatus=!0))}},cornerstoneImageLoaded:function(e){e.detail.image.imageId.includes(this.firstInstanceId)&&!this.isStartLoad&&(this.loadAllImages(),this.isStartLoad=!0);var t=e.detail.image.sharedCacheKey,i=this.cachedImages.findIndex((function(e){return e.uri===t}));-1===i?this.cachedImages.push({uri:t,timestamp:(new Date).getTime()}):this.cachedImages[i].timestamp=(new Date).getTime();for(var s=e.detail.image.imageId,a=e.detail.image.data.string("x0020000e"),n=-1,r=-1,o=0;o<this.studyList.length;++o){for(var d=0;d<this.studyList[o].SeriesList.length;++d)if(this.studyList[o].SeriesList[d].seriesUid===a){n=o,r=d;break}if(n>0)break}if(!(r<0)){var c=this.studyList[n].SeriesList[r].imageIds.indexOf(s);c<0||this.studyList[n].SeriesList[r].imageloadedArr.indexOf(s)<0&&(++this.studyList[n].SeriesList[r].prefetchInstanceCount,this.studyList[n].SeriesList[r].imageloadedArr.push(s),this.studyList[n].SeriesList[r].prefetchInstanceCount>=this.studyList[n].SeriesList[r].instanceCount&&(this.studyList[n].SeriesList[r].prefetchInstanceCount=this.studyList[n].SeriesList[r].instanceCount,this.studyList[n].SeriesList[r].loadStatus=!0))}}}},g=m,f=(i("5bef"),i("2877")),y=Object(f["a"])(g,s,a,!1,null,null,null);t["default"]=y.exports},c6bd:function(e,t,i){}}]);