非Dicom图片预览更改
continuous-integration/drone/push Build is passing Details

uat_us
caiyiling 2024-09-14 10:39:33 +08:00
parent 42ed756c4e
commit 37529cef33
3 changed files with 105 additions and 43 deletions

View File

@ -61,6 +61,11 @@
<el-table-column :label="$t('common:action:action')" width="120"> <el-table-column :label="$t('common:action:action')" width="120">
<template slot-scope="files"> <template slot-scope="files">
<!-- 预览 --> <!-- 预览 -->
<viewer
:ref="files.row.Path"
style="margin:0 10px;"
:images="[`${OSSclientConfig.basePath}${files.row.Path}`]"
>
<el-button <el-button
circle circle
icon="el-icon-view" icon="el-icon-view"
@ -71,6 +76,13 @@
" "
@click.native.prevent="previewFile(files.row)" @click.native.prevent="previewFile(files.row)"
/> />
<img
v-show="false"
crossorigin="anonymous"
:src="`${OSSclientConfig.basePath}${files.row.Path}`"
alt="Image"
>
</viewer>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -108,6 +120,11 @@
<el-table-column :label="$t('common:action:action')" width="120"> <el-table-column :label="$t('common:action:action')" width="120">
<template slot-scope="files"> <template slot-scope="files">
<!-- 预览 --> <!-- 预览 -->
<viewer
:ref="files.row.Path"
style="margin:0 10px;"
:images="[`${OSSclientConfig.basePath}${files.row.Path}`]"
>
<el-button <el-button
circle circle
icon="el-icon-view" icon="el-icon-view"
@ -118,6 +135,13 @@
" "
@click.native.prevent="previewFile(files.row)" @click.native.prevent="previewFile(files.row)"
/> />
<img
v-show="false"
crossorigin="anonymous"
:src="`${OSSclientConfig.basePath}${files.row.Path}`"
alt="Image"
>
</viewer>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -548,9 +572,10 @@ export default {
// //
previewFile(row) { previewFile(row) {
// window.open(row.FullFilePath, '_blank') // window.open(row.FullFilePath, '_blank')
this.imgObj.url = row.FullFilePath || row.Path // this.imgObj.url = row.FullFilePath || row.Path
this.imgObj.loading = true // this.imgObj.loading = true
this.imgObj.visible = true // this.imgObj.visible = true
this.$refs[row.Path].$viewer.show()
}, },
// Dicom // Dicom
handlePreviewNoneDicomFiles(row) { handlePreviewNoneDicomFiles(row) {

View File

@ -69,6 +69,12 @@
<el-table-column :label="$t('common:action:action')" width="120"> <el-table-column :label="$t('common:action:action')" width="120">
<template slot-scope="files"> <template slot-scope="files">
<!-- 预览 --> <!-- 预览 -->
<viewer
v-if="files.row.type !== 'MP4'"
:ref="files.row.FullFilePath"
style="margin:0 10px;"
:images="[`${OSSclientConfig.basePath}${files.row.FullFilePath}`]"
>
<el-button <el-button
icon="el-icon-view" icon="el-icon-view"
circle circle
@ -78,11 +84,27 @@
files.row.FileType && files.row.FileType &&
files.row.FileType.indexOf('zip') >= 0 files.row.FileType.indexOf('zip') >= 0
" "
@click.native.prevent=" @click.native.prevent="handlePreviewImg(files.row)">
files.row.type === 'MP4' </el-button>
? handleLookVideo(scope.row) <img
: handlePreviewImg(files.row) v-show="false"
crossorigin="anonymous"
:src="`${OSSclientConfig.basePath}${files.row.FullFilePath}`"
alt="Image"
>
</viewer>
<el-button
v-if="files.row.type === 'MP4'"
icon="el-icon-view"
circle
:title="$t('trials:uploadNonDicoms:action:preview')"
size="small"
:disabled="
files.row.FileType &&
files.row.FileType.indexOf('zip') >= 0
" "
@click.native.prevent="handleLookVideo(scope.row)"
/> />
<!-- 删除 --> <!-- 删除 -->
<el-button <el-button
@ -495,6 +517,7 @@
style="height: 500px; width: 500px" style="height: 500px; width: 500px"
@error="imageLoading = false" @error="imageLoading = false"
@load="imageLoading = false" @load="imageLoading = false"
:preview-src-list="[`${OSSclientConfig.basePath}${imgUrl}`]"
/> />
</div> </div>
</el-dialog> </el-dialog>
@ -866,9 +889,10 @@ export default {
}) })
}, },
handlePreviewImg(row) { handlePreviewImg(row) {
this.imgUrl = row.FullFilePath // this.imgUrl = row.FullFilePath
this.previewImgVisible = true // this.previewImgVisible = true
this.imageLoading = true // this.imageLoading = true
this.$refs[row.FullFilePath].$viewer.show()
}, },
beginScanFolder(e) { beginScanFolder(e) {
var files = e.target.files var files = e.target.files

View File

@ -417,6 +417,11 @@
> >
<template slot-scope="files"> <template slot-scope="files">
<!-- 预览 --> <!-- 预览 -->
<viewer
:ref="files.row.FullFilePath"
style="margin:0 10px;"
:images="[`${OSSclientConfig.basePath}${files.row.FullFilePath}`]"
>
<el-button <el-button
type="text" type="text"
:disabled=" :disabled="
@ -427,6 +432,13 @@
> >
{{ $t('trials:audit:button:nonDicomsPreview') }} {{ $t('trials:audit:button:nonDicomsPreview') }}
</el-button> </el-button>
<img
v-show="false"
crossorigin="anonymous"
:src="`${OSSclientConfig.basePath}${files.row.FullFilePath}`"
alt="Image"
>
</viewer>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -2335,9 +2347,10 @@ export default {
// //
previewFile(row) { previewFile(row) {
// window.open(row.FullFilePath, '_blank') // window.open(row.FullFilePath, '_blank')
this.imgObj.url = row.FullFilePath // this.imgObj.url = row.FullFilePath
this.imgObj.loading = true // this.imgObj.loading = true
this.imgObj.visible = true // this.imgObj.visible = true
this.$refs[row.FullFilePath].$viewer.show()
}, },
// //
handleViewImages() { handleViewImages() {