EI-Image-Viewer-Api/Start/Resource/EIImageViewerWeb/html/static/js/chunk-ab1040ea.8c3813c644c8...

1 line
16 KiB
JavaScript

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