diff --git a/src/App.vue b/src/App.vue
index ee93660f..6831a218 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,12 +1,7 @@
-
+ ">
i18n
-
+
-
+
-
-
+
+
-
-
+
+
@@ -81,71 +45,37 @@
-
+
- {
- $set(scope.row, 'Value', e)
- }
- "
- size="mini"
- >
+ {
+ $set(scope.row, 'Value', e)
+ }
+ " size="mini">
-
+
- {
- $set(scope.row, 'ValueCN', e)
- }
- "
- size="mini"
- >
+ {
+ $set(scope.row, 'ValueCN', e)
+ }
+ " size="mini">
-
+
-
-
+
+
-
+
- {{ $t('common:button:cancel') }}
+ {{ $t('common:button:cancel') }}
{{
$t('common:button:save')
@@ -153,6 +83,7 @@
+
@@ -163,11 +94,12 @@ import {
} from '@/api/dictionary/dictionary'
import { getTrialExtralConfig } from '@/api/trials'
import feedBack from '@/views/trials/trials-layout/components/feedBack'
+import timeTag from '@/components/timeTag'
import Vue from 'vue'
import i18n from './lang'
export default {
name: 'App',
- components: { feedBack },
+ components: { feedBack, timeTag },
data() {
return {
drawer: false,
@@ -366,13 +298,16 @@ export default {
\ No newline at end of file
diff --git a/src/views/dicom-show/dicom-study.vue b/src/views/dicom-show/dicom-study.vue
index 11529201..082cdd7f 100644
--- a/src/views/dicom-show/dicom-study.vue
+++ b/src/views/dicom-show/dicom-study.vue
@@ -29,8 +29,12 @@
:src="item.previewImageUrl"
fit="fill"
/> -->
-
+
@@ -136,7 +140,7 @@ import * as cornerstone from 'cornerstone-core'
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
import dicomViewer from '@/components/Dicom/DicomViewer'
import { getStudyInfo, getSeriesList } from '@/api/reading'
-import { getInstanceList, getPatientSeriesList, setSeriesStatus, setInstanceStatus } from '@/api/trials'
+import { getInstanceList, getPatientSeriesList, setSeriesStatus, setInstanceStatus, updateImageResizePath } from '@/api/trials'
import requestPoolManager from '@/utils/request-pool'
import store from '@/store'
@@ -247,6 +251,62 @@ export default {
workSpeedclose(true)
},
methods: {
+ async updateImageResizePath(data) {
+ try {
+ let res = await updateImageResizePath(data)
+ if (res.IsSuccess) {
+ this.$message.success(this.$t("message:tip:updateImageResizePath:success"))
+ }
+ } catch (err) {
+ console.log(err)
+ }
+ },
+ async refreshImage(item) {
+ let thumbnailPath = item.previewImageUrl.split(this.OSSclientConfig.basePath)[1]
+ let blob = await this.dicomToPng(item.imageIds[0])
+ let OSSclient = this.OSSclient
+ try {
+ let seriesRes = await OSSclient.put(thumbnailPath, blob)
+ if (seriesRes && seriesRes.url) {
+ let path = this.$getObjectName(seriesRes.url)
+ item.previewImageUrl = seriesRes.url
+ let data = {
+ seriesId: item.seriesId,
+ ImageResizePath: path
+ }
+ this.updateImageResizePath(data)
+ }
+ } catch (e) {
+
+ }
+ },
+ dicomToPng(imageId) {
+ return new Promise((resolve) => {
+ cornerstone.loadImage(imageId).then(async (image) => {
+ let width = image.columns, height = image.rows;
+ let canvas = document.createElement('canvas')
+ canvas.width = (width * 60) / height
+ canvas.height = 60
+ if (image) {
+ cornerstone.renderToCanvas(canvas, image)
+ // 将 Canvas 图像对象转换为 PNG 格式
+ let blob = await this.canvasToBlob(canvas)
+ resolve(blob)
+ } else {
+ resolve()
+ }
+ })
+ }).catch((reason) => {
+ reason()
+ })
+ },
+ canvasToBlob(canvas) {
+ return new Promise((resolve) => {
+ canvas.toBlob((blob) => {
+ resolve(blob)
+ })
+ })
+ },
async loadStudy() {
let params = {}
if (this.isPacs) {
@@ -905,7 +965,18 @@ export default {
}
-