非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,16 +61,28 @@
<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">
<!-- 预览 --> <!-- 预览 -->
<el-button <viewer
circle :ref="files.row.Path"
icon="el-icon-view" style="margin:0 10px;"
:title="$t('upload:nonedicom:button:preview')" :images="[`${OSSclientConfig.basePath}${files.row.Path}`]"
:disabled=" >
files.row.FileType && <el-button
files.row.FileType.indexOf('zip') >= 0 circle
" icon="el-icon-view"
@click.native.prevent="previewFile(files.row)" :title="$t('upload:nonedicom:button:preview')"
/> :disabled="
files.row.FileType &&
files.row.FileType.indexOf('zip') >= 0
"
@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,16 +120,28 @@
<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">
<!-- 预览 --> <!-- 预览 -->
<el-button <viewer
circle :ref="files.row.Path"
icon="el-icon-view" style="margin:0 10px;"
:title="$t('upload:nonedicom:button:preview')" :images="[`${OSSclientConfig.basePath}${files.row.Path}`]"
:disabled=" >
files.row.FileType && <el-button
files.row.FileType.indexOf('zip') >= 0 circle
" icon="el-icon-view"
@click.native.prevent="previewFile(files.row)" :title="$t('upload:nonedicom:button:preview')"
/> :disabled="
files.row.FileType &&
files.row.FileType.indexOf('zip') >= 0
"
@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,7 +69,33 @@
<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
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="handlePreviewImg(files.row)">
</el-button>
<img
v-show="false"
crossorigin="anonymous"
:src="`${OSSclientConfig.basePath}${files.row.FullFilePath}`"
alt="Image"
>
</viewer>
<el-button <el-button
v-if="files.row.type === 'MP4'"
icon="el-icon-view" icon="el-icon-view"
circle circle
:title="$t('trials:uploadNonDicoms:action:preview')" :title="$t('trials:uploadNonDicoms:action:preview')"
@ -78,11 +104,7 @@
files.row.FileType && files.row.FileType &&
files.row.FileType.indexOf('zip') >= 0 files.row.FileType.indexOf('zip') >= 0
" "
@click.native.prevent=" @click.native.prevent="handleLookVideo(scope.row)"
files.row.type === 'MP4'
? handleLookVideo(scope.row)
: handlePreviewImg(files.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,16 +417,28 @@
> >
<template slot-scope="files"> <template slot-scope="files">
<!-- 预览 --> <!-- 预览 -->
<el-button <viewer
type="text" :ref="files.row.FullFilePath"
:disabled=" style="margin:0 10px;"
files.row.FileType && :images="[`${OSSclientConfig.basePath}${files.row.FullFilePath}`]"
files.row.FileType.indexOf('zip') >= 0
"
@click.native.prevent="previewFile(files.row)"
> >
{{ $t('trials:audit:button:nonDicomsPreview') }} <el-button
</el-button> type="text"
:disabled="
files.row.FileType &&
files.row.FileType.indexOf('zip') >= 0
"
@click.native.prevent="previewFile(files.row)"
>
{{ $t('trials:audit:button:nonDicomsPreview') }}
</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() {