From 9d4f75777fb23d830baf47c4b02548ca233806cc Mon Sep 17 00:00:00 2001 From: lxd <1004405501@qq.com> Date: Mon, 19 Aug 2024 17:44:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=B3=E8=AF=B7=E5=8D=95?= =?UTF-8?q?=E7=99=BB=E8=AE=B0=E3=80=81=E8=B6=85=E5=A3=B0=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E5=8F=B0=E3=80=81=E5=BD=B1=E5=83=8F=E5=B7=A5=E4=BD=9C=E5=8F=B0?= =?UTF-8?q?=E3=80=81=E6=A3=80=E6=9F=A5=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E3=80=81=E6=9C=BA=E6=9E=84=E7=AE=A1=E7=90=86=E3=80=81=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=85=8D=E7=BD=AE=E7=AE=A1=E7=90=86=E3=80=81=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=AE=A1=E7=90=86=E3=80=81=E7=A7=91=E5=AE=A4=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/dicom/js/dicomViewPc.js | 141 +++++-- public/static/svg/批量分检.svg | 7 + src/layout/components/Setting/src/Setting.vue | 3 +- src/main.ts | 6 +- src/store/modules/app.ts | 10 +- .../applyform/ApplyformForm.vue | 2 +- .../applyform/GuidePrint.vue | 2 +- .../applyregistration/applyform/index.vue | 345 ++++++++-------- src/views/system/apiconfig/ApiconfigForm.vue | 2 +- src/views/system/apiconfig/index.vue | 180 +++----- .../system/department/DepartmentForm.vue | 2 +- src/views/system/department/index.vue | 98 +++-- src/views/system/doctor/Form.vue | 2 +- src/views/system/doctor/index.vue | 100 +++-- src/views/system/examitems/examitemsForm.vue | 2 +- src/views/system/examitems/index.vue | 126 +++--- src/views/system/operatelog/index.vue | 5 +- src/views/system/org/OrgForm.vue | 2 +- src/views/system/org/index.vue | 224 ++++------ src/views/system/wx/WxForm.vue | 2 +- src/views/system/wx/index.vue | 75 ++-- src/views/tblist/patientexamlist/index.vue | 375 ++++++----------- .../patientexamlistultrasonic/index.vue | 387 ++++++------------ 23 files changed, 930 insertions(+), 1168 deletions(-) create mode 100644 public/static/svg/批量分检.svg 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 @@