diff --git a/public/static/dicom/js/dicomViewPc.js b/public/static/dicom/js/dicomViewPc.js index 3d77719c..36dd2805 100644 --- a/public/static/dicom/js/dicomViewPc.js +++ b/public/static/dicom/js/dicomViewPc.js @@ -69,19 +69,19 @@ function next(imgId) { } var imgId = data.imageIds[index]; data.currentImageIdIndex = index; - cornerstone.loadAndCacheImage(imgId).then(function (image) { + cornerstone.loadImage(imgId).then(function (image) { cornerstone.enable(stateData.element); cornerstone.displayImage(stateData.element, image); renderTagText(stateData.element, image) }); - for (var i = 0; i < 10; i++) { - if (index + i == data.imageIds.length - 1) { - break; - } - cornerstone.loadImage(data.imageIds[index + i]).then((image) => { - console.log("loaded ok " + data.imageIds[index + i]); - }) - } + //for (var i = 0; i < 10; i++) { + // if (index + i == data.imageIds.length - 1) { + // break; + // } + // cornerstone.loadImage(data.imageIds[index + i]).then((image) => { + // console.log("loaded ok " + data.imageIds[index + i]); + // }) + //} setSliderValue(stateData.element.id) } @@ -475,15 +475,15 @@ function initData() { var data= JSON.parse(localData.do); console.log("网页接受到数据"+data) stateData.dicomInfo = data; - //初始化进度 - initProcess(); - initImgList(stateData.dicomInfo); + //初始化进度 + initProcess(); + initImgList(stateData.dicomInfo); //加载icon图片 - convertDicom2Img(); - //缓存文件 - setTimeout(function () { - cacheImages(); - }, 500) + convertDicom2Img(); + //缓存文件 + setTimeout(function () { + cacheImages(); + }, 500) initConerstoneAndData(); } @@ -552,14 +552,14 @@ function changeSlider(imgId, slider) { cornerstone.displayImage(stateData.element, image); renderTagText(stateData.element, image) }); - for (var i = 0; i < 10; i++) { - if (index + i == data.imageIds.length - 1) { - break; - } - cornerstone.loadImage(data.imageIds[index + i]).then((image) => { - console.log("loaded ok " + data.imageIds[index + i]); - }) - } + //for (var i = 0; i < 10; i++) { + // if (index + i == data.imageIds.length - 1) { + // break; + // } + // cornerstone.loadImage(data.imageIds[index + i]).then((image) => { + // console.log("loaded ok " + data.imageIds[index + i]); + // }) + //} } //渲染标签文本 @@ -655,20 +655,87 @@ function doCreate() { } function cacheImages() { - cacheImageIndex(0); + //cacheImageIndex(0); + startCache(); } -var cacheInterval = setInterval( - function () { - let size = stateData.dicomInfo.seriesList.length; - for (var i = 0; i < size; i++) { - let p = stateData.processMapping.get(i); - if (p >= stateData.dicomInfo.seriesList[i].instanceList.length) { - cacheImageIndex(i + 1) - } +//var cacheInterval = setInterval( +// function () { +// let size = stateData.dicomInfo.seriesList.length; +// for (var i = 0; i < size; i++) { +// let p = stateData.processMapping.get(i); +// if (p >= stateData.dicomInfo.seriesList[i].instanceList.length) { +// cacheImageIndex(i + 1) +// } +// } +// }, 200 +//); + +function cacheImageIndex1(a) { + if (a >= stateData.dicomInfo.seriesList.length) { + clearInterval(cacheInterval); + return; + } + var series = stateData.dicomInfo.seriesList[a].instanceList + const scheme = 'wadouri' + const baseUrl = '' + const imageIds = series.map(seriesImage => `${scheme}:${baseUrl}${seriesImage.imageid}`) + for (var j = 0; j < imageIds.length; j++) { + cornerstone.loadAndCacheImage(imageIds[j]).then(() => { + updateProcess(a, "cacheImages"); + }); + } +} + +var cacheProcess = { + index: 0, + sindex: 0, + isOk: null, + end: false +} + +var cacheInterval = null; + +function startCache() { + cacheInterval = setInterval(function () { + //如果已经结束,清除定时器 + if (cacheProcess.end) { + console.log("缓存结束-清除定时器"); + clearInterval(cacheInterval); + return; } - }, 200 -); + //如果未缓存完成,直接返回 + if (cacheProcess.isOk == false) { + console.log("缓存未完成-直接返回"); + return; + } + else if (cacheProcess.isOk == null || cacheProcess.isOk == true) { + console.log("缓存开始"); + cacheProcess.isOk = false; + var imageIds = stateData.dicomInfo.seriesList[cacheProcess.index].instanceList; + //上一个序列加载完成 + if (imageIds.length <= cacheProcess.sindex) { + cacheProcess.index++; + cacheProcess.sindex = 0; + } + if (stateData.dicomInfo.seriesList.length == cacheProcess.index) { + cacheProcess.end = true; + return; + } + imageIds = stateData.dicomInfo.seriesList[cacheProcess.index].instanceList; + const scheme = 'wadouri' + const baseUrl = '' + const imageId = `${scheme}:${baseUrl}${imageIds[cacheProcess.sindex].imageid}` + cornerstone.loadAndCacheImage(imageId).then(() => { + console.log("缓存回调--",cacheProcess); + updateProcess(cacheProcess.index); + cacheProcess.isOk = true; + cacheProcess.sindex++; + console.log("缓存回调用,更新索引--", cacheProcess); + }); + } + }, 10) +} function cacheImageIndex(a) { if (a >= stateData.dicomInfo.seriesList.length) { @@ -680,7 +747,7 @@ function cacheImageIndex(a) { const baseUrl = '' const imageIds = series.map(seriesImage => `${scheme}:${baseUrl}${seriesImage.imageid}`) for (var j = 0; j < imageIds.length; j++) { - cornerstone.loadImage(imageIds[j]).then(() => { + cornerstone.loadAndCacheImage(imageIds[j]).then(() => { updateProcess(a, "cacheImages"); }); } diff --git a/public/static/svg/批量分检.svg b/public/static/svg/批量分检.svg new file mode 100644 index 00000000..3bb93972 --- /dev/null +++ b/public/static/svg/批量分检.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/layout/components/Setting/src/Setting.vue b/src/layout/components/Setting/src/Setting.vue index e1908b63..c5dd36c7 100644 --- a/src/layout/components/Setting/src/Setting.vue +++ b/src/layout/components/Setting/src/Setting.vue @@ -260,7 +260,7 @@ const clear = () => { diff --git a/src/main.ts b/src/main.ts index c55750f3..6f0932d0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -42,10 +42,14 @@ import Logger from '@/utils/Logger' import VueDOMPurifyHTML from 'vue-dompurify-html' // 解决v-html 的安全隐患 import print from "vue3-print-nb";//打印的 + +import * as ElementPlusIconsVue from '@element-plus/icons-vue' // 创建实例 const setupAll = async () => { const app = createApp(App) - + for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component) + } await setupI18n(app) setupStore(app) diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index 126f0e37..2126d362 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -70,21 +70,21 @@ export const useAppStore = defineStore('app', { currentSize: wsCache.get('default') || 'default', // 组件尺寸 theme: wsCache.get(CACHE_KEY.THEME) || { // 主题色 - elColorPrimary: '#409eff', + elColorPrimary: '#4F8AF0', //#409eff // 左侧菜单边框颜色 leftMenuBorderColor: 'inherit', // 左侧菜单背景颜色 - leftMenuBgColor: '#001529', + leftMenuBgColor: '#4F8AF0', //#001529 // 左侧菜单浅色背景颜色 - leftMenuBgLightColor: '#0f2438', + leftMenuBgLightColor: '#4F8AF0',//#0f2438 // 左侧菜单选中背景颜色 leftMenuBgActiveColor: 'var(--el-color-primary)', // 左侧菜单收起选中背景颜色 leftMenuCollapseBgActiveColor: 'var(--el-color-primary)', // 左侧菜单字体颜色 - leftMenuTextColor: '#bfcbd9', + leftMenuTextColor: '#FFFFFF',//#bfcbd9 // 左侧菜单选中字体颜色 - leftMenuTextActiveColor: '#fff', + leftMenuTextActiveColor: '#c9c4c4', // logo字体颜色 logoTitleTextColor: '#fff', // logo边框颜色 diff --git a/src/views/applyregistration/applyform/ApplyformForm.vue b/src/views/applyregistration/applyform/ApplyformForm.vue index ffe5f993..479169ed 100644 --- a/src/views/applyregistration/applyform/ApplyformForm.vue +++ b/src/views/applyregistration/applyform/ApplyformForm.vue @@ -28,7 +28,7 @@ diff --git a/src/views/applyregistration/applyform/GuidePrint.vue b/src/views/applyregistration/applyform/GuidePrint.vue index 54ece96e..9b8a0bb8 100644 --- a/src/views/applyregistration/applyform/GuidePrint.vue +++ b/src/views/applyregistration/applyform/GuidePrint.vue @@ -58,7 +58,7 @@ diff --git a/src/views/applyregistration/applyform/index.vue b/src/views/applyregistration/applyform/index.vue index fb060069..81e2000b 100644 --- a/src/views/applyregistration/applyform/index.vue +++ b/src/views/applyregistration/applyform/index.vue @@ -1,166 +1,153 @@