稽查文档管理问题修复
continuous-integration/drone/push Build is passing Details

uat
wangxiaoshuang 2025-04-10 14:32:21 +08:00
parent ab058d6659
commit 9af3cd4280
4 changed files with 245 additions and 676 deletions

View File

@ -8,61 +8,25 @@
</div> </div>
</div> </div>
<!--检查列表--> <!--检查列表-->
<el-table <el-table :data="list" style="width: 100%" v-adaptive="{ bottomOffset: 60 }" :loading="loading"
:data="list" @sort-change="handleSortByColumn" :default-sort="{ prop: 'TaskBlindName', order: 'descending' }">
style="width: 100%"
v-adaptive="{ bottomOffset: 60 }"
:loading="loading"
@sort-change="handleSortByColumn"
:default-sort="{ prop: 'TaskBlindName', order: 'descending' }"
>
<!--受试者--> <!--受试者-->
<el-table-column <el-table-column prop="SubjectCode" :label="$t('upload:nonedicom:table:subject')" />
prop="SubjectCode"
:label="$t('upload:nonedicom:table:subject')"
/>
<!--任务名称--> <!--任务名称-->
<el-table-column <el-table-column prop="TaskBlindName" :label="$t('upload:nonedicom:table:taskName')" sortable="custom" />
prop="TaskBlindName"
:label="$t('upload:nonedicom:table:taskName')"
sortable="custom"
/>
<!--检查类型--> <!--检查类型-->
<el-table-column <el-table-column prop="Modality" :label="$t('upload:nonedicom:table:molityType')" sortable="custom">
prop="Modality"
:label="$t('upload:nonedicom:table:molityType')"
sortable="custom"
>
</el-table-column> </el-table-column>
<!--检查部位--> <!--检查部位-->
<el-table-column <el-table-column prop="BodyPart" :label="$t('upload:nonedicom:table:bodyPart')" sortable="custom" />
prop="BodyPart"
:label="$t('upload:nonedicom:table:bodyPart')"
sortable="custom"
/>
<!--原文件数--> <!--原文件数-->
<el-table-column <el-table-column prop="FileCount" :label="$t('upload:nonedicom:table:fileCount')">
prop="FileCount"
:label="$t('upload:nonedicom:table:fileCount')"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover <el-popover v-if="scope.row.FileCount" trigger="click" placement="bottom">
v-if="scope.row.FileCount"
trigger="click"
placement="bottom"
>
<el-table :data="scope.row.FileList" height="300" size="small"> <el-table :data="scope.row.FileList" height="300" size="small">
<!-- 文件名称 --> <!-- 文件名称 -->
<el-table-column <el-table-column prop="FileName" :label="$t('trials:audit:table:nonDicomsFileName')" width="200" />
prop="FileName" <el-table-column prop="FileSize" :label="$t('trials:audit:table:nonDicomsFileSize')" width="100">
:label="$t('trials:audit:table:nonDicomsFileName')"
width="200"
/>
<el-table-column
prop="FileSize"
:label="$t('trials:audit:table:nonDicomsFileSize')"
width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
scope.row.FileSize && scope.row.FileSize > 0 scope.row.FileSize && scope.row.FileSize > 0
@ -74,27 +38,13 @@
<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 <viewer :ref="files.row.Path" style="margin: 0 10px"
:ref="files.row.Path" :images="[`${OSSclientConfig.basePath}${files.row.Path}`]">
style="margin: 0 10px" <el-button circle icon="el-icon-view" :title="$t('upload:nonedicom:button:preview')" :disabled="files.row.FileType &&
:images="[`${OSSclientConfig.basePath}${files.row.Path}`]" files.row.FileType.indexOf('zip') >= 0
> " @click.native.prevent="previewFile(files.row)" />
<el-button <img v-show="false" crossorigin="anonymous" :src="`${OSSclientConfig.basePath}${files.row.Path}`"
circle alt="Image" />
icon="el-icon-view"
: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> </viewer>
</template> </template>
</el-table-column> </el-table-column>
@ -109,32 +59,13 @@
</template> </template>
</el-table-column> </el-table-column>
<!--后处理文件数--> <!--后处理文件数-->
<el-table-column <el-table-column prop="UploadedFileCount" :label="$t('upload:nonedicom:table:uploadFileCount')">
prop="UploadedFileCount"
:label="$t('upload:nonedicom:table:uploadFileCount')"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover <el-popover v-if="scope.row.UploadedFileCount" trigger="click" placement="bottom">
v-if="scope.row.UploadedFileCount" <el-table :data="scope.row.UploadedFileList" height="300" size="small">
trigger="click"
placement="bottom"
>
<el-table
:data="scope.row.UploadedFileList"
height="300"
size="small"
>
<!-- 文件名称 --> <!-- 文件名称 -->
<el-table-column <el-table-column prop="FileName" :label="$t('trials:audit:table:nonDicomsFileName')" width="200" />
prop="FileName" <el-table-column prop="FileSize" :label="$t('trials:audit:table:nonDicomsFileSize')" width="100">
:label="$t('trials:audit:table:nonDicomsFileName')"
width="200"
/>
<el-table-column
prop="FileSize"
:label="$t('trials:audit:table:nonDicomsFileSize')"
width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
scope.row.FileSize && scope.row.FileSize > 0 scope.row.FileSize && scope.row.FileSize > 0
@ -146,27 +77,13 @@
<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 <viewer :ref="files.row.Path" style="margin: 0 10px"
:ref="files.row.Path" :images="[`${OSSclientConfig.basePath}${files.row.Path}`]">
style="margin: 0 10px" <el-button circle icon="el-icon-view" :title="$t('upload:nonedicom:button:preview')" :disabled="files.row.FileType &&
:images="[`${OSSclientConfig.basePath}${files.row.Path}`]" files.row.FileType.indexOf('zip') >= 0
> " @click.native.prevent="previewFile(files.row)" />
<el-button <img v-show="false" crossorigin="anonymous" :src="`${OSSclientConfig.basePath}${files.row.Path}`"
circle alt="Image" />
icon="el-icon-view"
: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> </viewer>
</template> </template>
</el-table-column> </el-table-column>
@ -180,75 +97,34 @@
<span v-else>{{ scope.row.UploadedFileCount }}</span> <span v-else>{{ scope.row.UploadedFileCount }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('common:action:action')" fixed="right" width="180">
:label="$t('common:action:action')"
fixed="right"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!--预览---> <!--预览--->
<el-button <el-button circle :disabled="scope.row.UploadedFileCount <= 0" icon="el-icon-view"
circle :title="$t('upload:nonedicom:button:preview')" @click.stop="handlePreviewNoneDicomFiles(scope.row)" />
:disabled="scope.row.UploadedFileCount <= 0"
icon="el-icon-view"
:title="$t('upload:nonedicom:button:preview')"
@click.stop="handlePreviewNoneDicomFiles(scope.row)"
/>
<!--上传---> <!--上传--->
<el-button <el-button circle icon="el-icon-upload2" :title="$t('upload:nonedicom:button:upload')"
circle @click.native.prevent="handleUpload(scope.row)" />
icon="el-icon-upload2"
:title="$t('upload:nonedicom:button:upload')"
@click.native.prevent="handleUpload(scope.row)"
/>
<!--删除---> <!--删除--->
<el-button <el-button :disabled="scope.row.UploadedFileCount <= 0 ||
:disabled=" scope.row.ReadingTaskState === 2
scope.row.UploadedFileCount <= 0 || " circle icon="el-icon-delete" :title="$t('upload:nonedicom:button:delete')"
scope.row.ReadingTaskState === 2 @click.stop="remove(scope.row)" />
"
circle
icon="el-icon-delete"
:title="$t('upload:nonedicom:button:delete')"
@click.stop="remove(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 预览单个图像 --> <!-- 预览单个图像 -->
<el-dialog <el-dialog v-if="imgObj.visible" :visible.sync="imgObj.visible" :title="$t('upload:nonedicom:dialogTitle:preview')"
v-if="imgObj.visible" append-to-body width="565px">
:visible.sync="imgObj.visible" <div v-loading="imgObj.loading" class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
:title="$t('upload:nonedicom:dialogTitle:preview')" <el-image :src="`${OSSclientConfig.basePath}${imgObj.url}`" crossorigin="anonymous" fit="fit"
append-to-body style="height: 500px; width: 500px" @error="imgObj.loading = false" @load="imgObj.loading = false" />
width="565px"
>
<div
v-loading="imgObj.loading"
class="base-modal-body"
style="border: 2px solid #ccc; padding: 10px"
>
<el-image
:src="`${OSSclientConfig.basePath}${imgObj.url}`"
crossorigin="anonymous"
fit="fit"
style="height: 500px; width: 500px"
@error="imgObj.loading = false"
@load="imgObj.loading = false"
/>
</div> </div>
</el-dialog> </el-dialog>
<!-- 上传非dicom文件 --> <!-- 上传非dicom文件 -->
<el-dialog <el-dialog v-if="uploadVisible" :visible.sync="uploadVisible" :close-on-click-modal="false"
v-if="uploadVisible" :title="$t('trials:uploadNonDicoms:dialogTitle:upload')" width="800px" append-to-body
:visible.sync="uploadVisible" custom-class="base-dialog-wrapper" @close="resetFileDiaolg">
:close-on-click-modal="false"
:title="$t('trials:uploadNonDicoms:dialogTitle:upload')"
width="800px"
append-to-body
custom-class="base-dialog-wrapper"
@close="resetFileDiaolg"
>
<!-- 多文件上传 --> <!-- 多文件上传 -->
<form id="inputForm" ref="uploadForm"> <form id="inputForm" ref="uploadForm">
<el-divider content-position="left">{{ <el-divider content-position="left">{{
@ -256,33 +132,15 @@
}}</el-divider> }}</el-divider>
<div class="form-group"> <div class="form-group">
<div class="upload" style="margin-right: 10px"> <div class="upload" style="margin-right: 10px">
<input <input multiple="multiple" webkitdirectory="" directory accept="*/*" type="file" name="uploadFolder"
multiple="multiple" class="select-file" title="" @change="beginScanFiles($event)" v-if="!btnLoading" />
webkitdirectory=""
directory
accept="*/*"
type="file"
name="uploadFolder"
class="select-file"
title=""
@change="beginScanFiles($event)"
v-if="!btnLoading"
/>
<div class="btn-select"> <div class="btn-select">
{{ $t('trials:uploadNonDicoms:button:selectFolder') }} {{ $t('trials:uploadNonDicoms:button:selectFolder') }}
</div> </div>
</div> </div>
<div class="upload"> <div class="upload">
<input <input class="select-file" multiple="" :accept="faccept.join(',')" type="file" name="uploadFile" title=""
class="select-file" @change="beginScanFiles($event)" v-if="!btnLoading" />
multiple=""
:accept="faccept.join(',')"
type="file"
name="uploadFile"
title=""
@change="beginScanFiles($event)"
v-if="!btnLoading"
/>
<div class="btn-select"> <div class="btn-select">
{{ $t('trials:uploadNonDicoms:button:select') }} {{ $t('trials:uploadNonDicoms:button:select') }}
</div> </div>
@ -293,82 +151,46 @@
</div> </div>
</form> </form>
<!-- 文件列表 --> <!-- 文件列表 -->
<el-table <el-table ref="filesTable" :data="fileList" class="dicomFiles-table" height="300"
ref="filesTable" @selection-change="handleSelectionChange">
:data="fileList" <el-table-column type="selection" width="55" :selectable="(row, index) => row.status !== 2 && !btnLoading" />
class="dicomFiles-table"
height="300"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
:selectable="(row, index) => row.status !== 2 && !btnLoading"
/>
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<!-- 文件名称 --> <!-- 文件名称 -->
<el-table-column <el-table-column prop="name" :label="$t('trials:uploadNonDicoms:table:fileName')" min-width="100" />
prop="name"
:label="$t('trials:uploadNonDicoms:table:fileName')"
min-width="100"
/>
<!-- 文件大小 --> <!-- 文件大小 -->
<el-table-column <el-table-column prop="size" :label="$t('trials:uploadNonDicoms:table:fileSize')">
prop="size"
:label="$t('trials:uploadNonDicoms:table:fileSize')"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
scope.row.size && scope.row.size > 0 scope.row.size && scope.row.size > 0
? `${(scope.row.size / 1024 / 1024).toFixed(3)}MB` ? `${(scope.row.size / 1024 / 1024).toFixed(3)}MB`
: '' : '0MB'
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 文件类型 --> <!-- 文件类型 -->
<el-table-column <el-table-column prop="type" :label="$t('trials:uploadNonDicoms:table:fileType')" />
prop="type"
:label="$t('trials:uploadNonDicoms:table:fileType')"
/>
<!-- 上传状态 --> <!-- 上传状态 -->
<el-table-column <el-table-column prop="status" :label="$t('trials:uploadNonDicoms:table:uploadStatus')" min-width="100">
prop="status"
:label="$t('trials:uploadNonDicoms:table:uploadStatus')"
min-width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag <el-tag :type="['warning', 'info', 'success', 'danger'][scope.row.status]"
:type="['warning', 'info', 'success', 'danger'][scope.row.status]" v-if="scope.row.status || scope.row.status === 0">{{ $fd('NoneDicomUploadStatus', scope.row.status) }}
v-if="scope.row.status || scope.row.status === 0"
>{{ $fd('NoneDicomUploadStatus', scope.row.status) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('trials:uploadNonDicoms:table:failedFileCount')" min-width="150"
:label="$t('trials:uploadNonDicoms:table:failedFileCount')" show-overflow-tooltip>
min-width="150"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-progress <el-progress color="#409eff" :percentage="scope.row.size && scope.row.size > 0 ? ((scope.row.uploadFileSize * 100) / scope.row.size).toFixed(2) *
color="#409eff" 1
:percentage=" : ((scope.row.uploadFileSize * 100) / 1).toFixed(2) *
((scope.row.uploadFileSize * 100) / scope.row.size).toFixed(2) * 1
1 " />
"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('common:action:action')"> <el-table-column :label="$t('common:action:action')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" icon="el-icon-delete" circle :disabled="btnLoading"
size="mini" :title="$t('trials:crcUpload:action:delete')" @click="handleRemoveFile(scope.row)" />
icon="el-icon-delete"
circle
:disabled="btnLoading"
:title="$t('trials:crcUpload:action:delete')"
@click="handleRemoveFile(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -376,13 +198,8 @@
<span style="margin-right: 10px">{{ <span style="margin-right: 10px">{{
$store.state.trials.uploadTip $store.state.trials.uploadTip
}}</span> }}</span>
<el-button <el-button size="small" type="primary" :disabled="selectArr.length == 0" :loading="btnLoading"
size="small" @click="beginUpload">
type="primary"
:disabled="selectArr.length == 0"
:loading="btnLoading"
@click="beginUpload"
>
{{ $t('trials:uploadNonDicoms:action:upload') }} {{ $t('trials:uploadNonDicoms:action:upload') }}
</el-button> </el-button>
</div> </div>
@ -588,7 +405,7 @@ export default {
) )
} }
}) })
.catch(() => {}) .catch(() => { })
}, },
resetUploadForm() { resetUploadForm() {
this.$nextTick(() => { this.$nextTick(() => {
@ -714,11 +531,10 @@ export default {
if (!this.uploadVisible) return if (!this.uploadVisible) return
let file = this.fileList.filter((item) => item.id === arr[index].id)[0] let file = this.fileList.filter((item) => item.id === arr[index].id)[0]
file.status = 1 file.status = 1
let path = `/${this.$route.query.trialId}/TaskImage/${ let path = `/${this.$route.query.trialId}/TaskImage/${this.currentRow.SubjectId
this.currentRow.SubjectId }/${this.currentRow.VisitTaskId}/${this.$guid()}${file.name
}/${this.currentRow.VisitTaskId}/${this.$guid()}${file.name .substring(file.name.lastIndexOf('.'))
.substring(file.name.lastIndexOf('.')) .toLocaleLowerCase()}`
.toLocaleLowerCase()}`
file.curPath = path file.curPath = path
const fileData = await this.fileToBlob(file.file) const fileData = await this.fileToBlob(file.file)
let res = await this.fileToOss(path, fileData, file) let res = await this.fileToOss(path, fileData, file)
@ -772,7 +588,7 @@ export default {
(percentage, checkpoint, lastPer) => { (percentage, checkpoint, lastPer) => {
item.uploadFileSize += checkpoint.size * (percentage - lastPer) item.uploadFileSize += checkpoint.size * (percentage - lastPer)
if (item.uploadFileSize > file.fileSize) { if (item.uploadFileSize > file.fileSize) {
item.uploadFileSize = file.fileSize item.uploadFileSize = file.fileSize > 0 ? file.fileSize : 1
} }
} }
) )
@ -869,6 +685,7 @@ export default {
.top { .top {
margin: 10px 0; margin: 10px 0;
} }
.upload { .upload {
display: inline-block; display: inline-block;
height: 30px; height: 30px;
@ -883,6 +700,7 @@ export default {
background: #428bca; background: #428bca;
border-color: #428bca; border-color: #428bca;
color: #fff; color: #fff;
.select-file { .select-file {
height: 30px; height: 30px;
width: 90px; width: 90px;
@ -893,6 +711,7 @@ export default {
opacity: 0; opacity: 0;
font-size: 0; font-size: 0;
} }
.btn-select { .btn-select {
// //
width: 90px; width: 90px;
@ -908,10 +727,12 @@ export default {
pointer-events: none; //pointer-events:none穿 pointer-events: none; //pointer-events:none穿
} }
} }
.tip { .tip {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
margin-top: 5px; margin-top: 5px;
i { i {
margin: 3px 5px 0 0; margin: 3px 5px 0 0;
} }

View File

@ -43,7 +43,7 @@
<span>{{ <span>{{
scope.row.size && scope.row.size > 0 scope.row.size && scope.row.size > 0
? `${(scope.row.size / 1024 / 1024).toFixed(3)}MB` ? `${(scope.row.size / 1024 / 1024).toFixed(3)}MB`
: '' : '0MB'
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -60,9 +60,10 @@
<el-table-column :label="$t('trials:trialDocument:table:failedFileCount')" min-width="150" <el-table-column :label="$t('trials:trialDocument:table:failedFileCount')" min-width="150"
show-overflow-tooltip> show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<el-progress color="#409eff" :percentage="((scope.row.uploadFileSize * 100) / scope.row.size).toFixed(2) * <el-progress color="#409eff" :percentage="scope.row.size && scope.row.size > 0 ? ((scope.row.uploadFileSize * 100) / scope.row.size).toFixed(2) *
1 1
" /> : ((scope.row.uploadFileSize * 100) / 1).toFixed(2) *
1" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('common:action:action')"> <el-table-column :label="$t('common:action:action')">
@ -325,7 +326,7 @@ export default {
(percentage, checkpoint, lastPer) => { (percentage, checkpoint, lastPer) => {
item.uploadFileSize += checkpoint.size * (percentage - lastPer) item.uploadFileSize += checkpoint.size * (percentage - lastPer)
if (item.uploadFileSize > file.fileSize) { if (item.uploadFileSize > file.fileSize) {
item.uploadFileSize = file.fileSize item.uploadFileSize = file.fileSize > 0 ? file.fileSize : 1
} }
} }
) )

View File

@ -2,93 +2,40 @@
<div v-loading="loading" class="non-dicom-wrapper"> <div v-loading="loading" class="non-dicom-wrapper">
<!-- <h4 class="box-title">既往放疗史</h4> --> <!-- <h4 class="box-title">既往放疗史</h4> -->
<div style="text-align: right"> <div style="text-align: right">
<el-button <el-button v-if="allowAddOrEdit" v-hasPermi="['trials:trials-panel:visit:crc-upload:edit']" icon="el-icon-plus"
v-if="allowAddOrEdit" type="primary" size="small" @click.native.prevent="handleAdd">
v-hasPermi="['trials:trials-panel:visit:crc-upload:edit']"
icon="el-icon-plus"
type="primary"
size="small"
@click.native.prevent="handleAdd"
>
{{ $t('common:button:new') }} {{ $t('common:button:new') }}
</el-button> </el-button>
<el-button <el-button icon="el-icon-view" type="primary" size="small" :disabled="nonDicomStudyList.length === 0"
icon="el-icon-view" @click="handlePreviewAllVisitFiles">
type="primary"
size="small"
:disabled="nonDicomStudyList.length === 0"
@click="handlePreviewAllVisitFiles"
>
{{ $t('trials:uploadNonDicoms:button:preview') }} {{ $t('trials:uploadNonDicoms:button:preview') }}
</el-button> </el-button>
</div> </div>
<el-table <el-table :data="nonDicomStudyList" style="width: 100%" :default-sort="{ prop: 'CreateTime', order: 'ascending' }"
:data="nonDicomStudyList" :row-class-name="tableRowClassName">
style="width: 100%"
:default-sort="{ prop: 'CreateTime', order: 'ascending' }"
:row-class-name="tableRowClassName"
>
<!-- 检查编号 --> <!-- 检查编号 -->
<el-table-column <el-table-column prop="CodeView" :label="$t('trials:uploadNonDicoms:table:studyId')" sortable />
prop="CodeView"
:label="$t('trials:uploadNonDicoms:table:studyId')"
sortable
/>
<!-- 检查名称 --> <!-- 检查名称 -->
<el-table-column <el-table-column v-if="relationInfo.IsShowStudyName" prop="StudyName"
v-if="relationInfo.IsShowStudyName" :label="$t('trials:uploadNonDicoms:table:StudyName')" sortable />
prop="StudyName"
:label="$t('trials:uploadNonDicoms:table:StudyName')"
sortable
/>
<!-- 检查类型 --> <!-- 检查类型 -->
<el-table-column <el-table-column prop="Modality" :label="$t('trials:uploadNonDicoms:table:modality')" sortable />
prop="Modality"
:label="$t('trials:uploadNonDicoms:table:modality')"
sortable
/>
<!-- 检查部位 --> <!-- 检查部位 -->
<el-table-column <el-table-column prop="BodyPart" :label="$t('trials:uploadNonDicoms:table:bodyPart')" sortable>
prop="BodyPart"
:label="$t('trials:uploadNonDicoms:table:bodyPart')"
sortable
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ getBodyPart(scope.row.BodyPart) }} {{ getBodyPart(scope.row.BodyPart) }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 文件 --> <!-- 文件 -->
<el-table-column <el-table-column prop="FileCount" :label="$t('trials:uploadNonDicoms:table:files')" sortable>
prop="FileCount"
:label="$t('trials:uploadNonDicoms:table:files')"
sortable
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover <el-popover v-if="scope.row.FileCount" trigger="click" placement="bottom" popper-class="imgTable">
v-if="scope.row.FileCount" <el-table v-loading="filesLoading" :data="nonDicomfilesList" height="300" size="small"
trigger="click" :row-class-name="tableRowClassName">
placement="bottom"
popper-class="imgTable"
>
<el-table
v-loading="filesLoading"
:data="nonDicomfilesList"
height="300"
size="small"
:row-class-name="tableRowClassName"
>
<!-- 文件名称 --> <!-- 文件名称 -->
<el-table-column <el-table-column prop="FileName" :label="$t('trials:uploadNonDicoms:table:fileName')" width="200" />
prop="FileName" <el-table-column prop="FileSize" :label="$t('trials:audit:table:nonDicomsFileSize')" width="100">
:label="$t('trials:uploadNonDicoms:table:fileName')"
width="200"
/>
<el-table-column
prop="FileSize"
:label="$t('trials:audit:table:nonDicomsFileSize')"
width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
scope.row.FileSize && scope.row.FileSize > 0 scope.row.FileSize && scope.row.FileSize > 0
@ -101,71 +48,38 @@
<template slot-scope="files"> <template slot-scope="files">
<div style="display: flex"> <div style="display: flex">
<!-- 预览 --> <!-- 预览 -->
<viewer <viewer v-if="files.row.type !== 'MP4'" :ref="files.row.FullFilePath" style="margin: 0 10px"
v-if="files.row.type !== 'MP4'"
:ref="files.row.FullFilePath"
style="margin: 0 10px"
:images="[ :images="[
`${OSSclientConfig.basePath}${files.row.FullFilePath}`, `${OSSclientConfig.basePath}${files.row.FullFilePath}`,
]" ]">
> <el-button icon="el-icon-view" circle :title="$t('trials:uploadNonDicoms:action:preview')"
<el-button size="small" :disabled="files.row.FileType &&
icon="el-icon-view"
circle
:title="$t('trials:uploadNonDicoms:action:preview')"
size="small"
:disabled="
files.row.FileType &&
files.row.FileType.indexOf('zip') >= 0 files.row.FileType.indexOf('zip') >= 0
" " @click.native.prevent="handlePreviewImg(files.row)">
@click.native.prevent="handlePreviewImg(files.row)"
>
</el-button> </el-button>
<img <img v-show="false" crossorigin="anonymous"
v-show="false" :src="`${OSSclientConfig.basePath}${files.row.FullFilePath}`" alt="Image" />
crossorigin="anonymous"
:src="`${OSSclientConfig.basePath}${files.row.FullFilePath}`"
alt="Image"
/>
</viewer> </viewer>
<el-button <el-button v-if="files.row.type === 'MP4'" icon="el-icon-view" circle
v-if="files.row.type === 'MP4'" :title="$t('trials:uploadNonDicoms:action:preview')" size="small" :disabled="files.row.FileType &&
icon="el-icon-view"
circle
:title="$t('trials:uploadNonDicoms:action:preview')"
size="small"
:disabled="
files.row.FileType &&
files.row.FileType.indexOf('zip') >= 0 files.row.FileType.indexOf('zip') >= 0
" " @click.native.prevent="handleLookVideo(scope.row)" />
@click.native.prevent="handleLookVideo(scope.row)"
/>
<!-- 删除 --> <!-- 删除 -->
<el-button <el-button v-if="allowAddOrEdit" v-hasPermi="[
v-if="allowAddOrEdit" 'trials:trials-panel:visit:crc-upload:delete',
v-hasPermi="[ ]" icon="el-icon-delete" circle :title="$t('trials:uploadNonDicoms:action:delete')" size="small"
'trials:trials-panel:visit:crc-upload:delete',
]"
icon="el-icon-delete"
circle
:title="$t('trials:uploadNonDicoms:action:delete')"
size="small"
@click.native.prevent=" @click.native.prevent="
files.row.type === 'MP4' files.row.type === 'MP4'
? hadnleDeleteVideo(scope.row) ? hadnleDeleteVideo(scope.row)
: handleDeleteFile(files.row.Id) : handleDeleteFile(files.row.Id)
" " />
/>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<el-button <el-button type="text" @click.native.prevent="handleGetFilesList(scope.row)">
type="text"
@click.native.prevent="handleGetFilesList(scope.row)"
>
{{ scope.row.FileCount }} {{ scope.row.FileCount }}
</el-button> </el-button>
</div> </div>
@ -174,46 +88,23 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 检查日期 --> <!-- 检查日期 -->
<el-table-column <el-table-column prop="ImageDate" :label="$t('trials:uploadNonDicoms:table:studyDate')" sortable>
prop="ImageDate"
:label="$t('trials:uploadNonDicoms:table:studyDate')"
sortable
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ moment(scope.row.ImageDate).format('YYYY-MM-DD') }} {{ moment(scope.row.ImageDate).format('YYYY-MM-DD') }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 更新时间 --> <!-- 更新时间 -->
<el-table-column <el-table-column prop="UpdateTime" :label="$t('trials:uploadNonDicoms:table:updateTime')" sortable />
prop="UpdateTime"
:label="$t('trials:uploadNonDicoms:table:updateTime')"
sortable
/>
<!-- 创建时间 --> <!-- 创建时间 -->
<el-table-column <el-table-column prop="CreateTime" :label="$t('trials:uploadNonDicoms:table:CreateTime')" sortable />
prop="CreateTime"
:label="$t('trials:uploadNonDicoms:table:CreateTime')"
sortable
/>
<el-table-column :label="$t('common:action:action')" min-width="200"> <el-table-column :label="$t('common:action:action')" min-width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 预览 --> <!-- 预览 -->
<el-button <el-button icon="el-icon-view" circle :title="$t('trials:uploadNonDicoms:action:preview')"
icon="el-icon-view" :disabled="scope.row.FileCount === 0" @click.native.prevent="handlePreviewAllFiles(scope.row)" />
circle
:title="$t('trials:uploadNonDicoms:action:preview')"
:disabled="scope.row.FileCount === 0"
@click.native.prevent="handlePreviewAllFiles(scope.row)"
/>
<!-- 上传 --> <!-- 上传 -->
<el-button <el-button v-if="allowAddOrEdit" icon="el-icon-upload2" circle :disabled="scope.row.IsDeleted"
v-if="allowAddOrEdit" :title="$t('trials:uploadNonDicoms:action:upload')" @click.native.prevent="handleUpload(scope.row)" />
icon="el-icon-upload2"
circle
:disabled="scope.row.IsDeleted"
:title="$t('trials:uploadNonDicoms:action:upload')"
@click.native.prevent="handleUpload(scope.row)"
/>
<!-- 上传视频 --> <!-- 上传视频 -->
<!-- <el-button <!-- <el-button
v-if="( allowAddOrEdit)" v-if="( allowAddOrEdit)"
@ -223,156 +114,86 @@
@click.native.prevent="handleUploadVideo(scope.row)" @click.native.prevent="handleUploadVideo(scope.row)"
/> --> /> -->
<!-- 编辑 --> <!-- 编辑 -->
<el-button <el-button v-if="allowAddOrEdit" v-hasPermi="['trials:trials-panel:visit:crc-upload:edit']"
v-if="allowAddOrEdit" icon="el-icon-edit-outline" circle :title="$t('trials:uploadNonDicoms:action:edit')"
v-hasPermi="['trials:trials-panel:visit:crc-upload:edit']" @click.native.prevent="handleEdit(scope.row)" />
icon="el-icon-edit-outline"
circle
:title="$t('trials:uploadNonDicoms:action:edit')"
@click.native.prevent="handleEdit(scope.row)"
/>
<!-- 删除 --> <!-- 删除 -->
<el-button <el-button v-if="allowAddOrEdit" v-hasPermi="['trials:trials-panel:visit:crc-upload:delete']"
v-if="allowAddOrEdit" icon="el-icon-delete" circle :title="$t('trials:uploadNonDicoms:action:delete')"
v-hasPermi="['trials:trials-panel:visit:crc-upload:delete']" @click.native.prevent="handleDelete(scope.row)" />
icon="el-icon-delete"
circle
:title="$t('trials:uploadNonDicoms:action:delete')"
@click.native.prevent="handleDelete(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 编辑 --> <!-- 编辑 -->
<el-dialog <el-dialog v-if="dialogVisible" :visible.sync="dialogVisible" :close-on-click-modal="false" :title="title"
v-if="dialogVisible" width="600px" append-to-body custom-class="base-dialog-wrapper">
:visible.sync="dialogVisible"
:close-on-click-modal="false"
:title="title"
width="600px"
append-to-body
custom-class="base-dialog-wrapper"
>
<el-form ref="editForm" :model="form" label-width="100px"> <el-form ref="editForm" :model="form" label-width="100px">
<div class="base-dialog-body"> <div class="base-dialog-body">
<!-- 检查编号 --> <!-- 检查编号 -->
<el-form-item <el-form-item v-if="!!form.CodeView" :label="$t('trials:uploadNonDicoms:table:studyId')">
v-if="!!form.CodeView"
:label="$t('trials:uploadNonDicoms:table:studyId')"
>
<el-input v-model="form.CodeView" disabled /> <el-input v-model="form.CodeView" disabled />
</el-form-item> </el-form-item>
<!-- 检查名称 --> <!-- 检查名称 -->
<el-form-item <el-form-item v-if="relationInfo.IsShowStudyName" :label="$t('trials:uploadNonDicoms:table:StudyName')"
v-if="relationInfo.IsShowStudyName" prop="StudyName" :rules="[
:label="$t('trials:uploadNonDicoms:table:StudyName')"
prop="StudyName"
:rules="[
{ {
required: true, required: true,
message: $t('common:ruleMessage:specify'), message: $t('common:ruleMessage:specify'),
trigger: 'blur', trigger: 'blur',
}, },
]" ]">
>
<el-radio-group v-model="form.StudyName"> <el-radio-group v-model="form.StudyName">
<template v-for="m in relationInfo.StudyNameList"> <template v-for="m in relationInfo.StudyNameList">
<el-radio <el-radio v-if="m.IsChoose" :key="m.Name" :label="isEN ? m.EnName : m.Name" style="line-height: 40px" />
v-if="m.IsChoose"
:key="m.Name"
:label="isEN ? m.EnName : m.Name"
style="line-height: 40px"
/>
</template> </template>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<!-- 检查类型 --> <!-- 检查类型 -->
<el-form-item <el-form-item :label="$t('trials:uploadNonDicoms:table:modality')" prop="Modality" :rules="[
:label="$t('trials:uploadNonDicoms:table:modality')" {
prop="Modality" required: true,
:rules="[ message: $t('common:ruleMessage:specify'),
{ trigger: 'blur',
required: true, },
message: $t('common:ruleMessage:specify'), ]">
trigger: 'blur',
},
]"
>
<el-radio-group v-model="form.Modality"> <el-radio-group v-model="form.Modality">
<template v-for="m in trialModalitys"> <template v-for="m in trialModalitys">
<el-radio <el-radio v-if="m !== ''" :key="m" :label="m" style="line-height: 40px" />
v-if="m !== ''"
:key="m"
:label="m"
style="line-height: 40px"
/>
</template> </template>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<!-- 检查部位 --> <!-- 检查部位 -->
<el-form-item <el-form-item :label="$t('trials:uploadNonDicoms:table:bodyPart')" prop="BodyParts" :rules="[
:label="$t('trials:uploadNonDicoms:table:bodyPart')" {
prop="BodyParts" required: true,
:rules="[ message: $t('common:ruleMessage:specify'),
{ trigger: 'blur',
required: true, },
message: $t('common:ruleMessage:specify'), ]">
trigger: 'blur',
},
]"
>
<el-checkbox-group v-model="form.BodyParts"> <el-checkbox-group v-model="form.BodyParts">
<el-checkbox <el-checkbox v-for="bodyPart in trialBodyPartTypes" :key="bodyPart" :label="bodyPart">{{
v-for="bodyPart in trialBodyPartTypes" $fd('Bodypart', bodyPart, 'Code', BodyPart, 'Name')
:key="bodyPart" }}</el-checkbox>
:label="bodyPart"
>{{
$fd('Bodypart', bodyPart, 'Code', BodyPart, 'Name')
}}</el-checkbox
>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<!-- 检查日期 --> <!-- 检查日期 -->
<el-form-item <el-form-item :label="$t('trials:uploadNonDicoms:table:studyDate')" prop="ImageDate" :rules="[
:label="$t('trials:uploadNonDicoms:table:studyDate')" {
prop="ImageDate" required: true,
:rules="[ message: $t('common:ruleMessage:specify'),
{ trigger: 'blur',
required: true, },
message: $t('common:ruleMessage:specify'), ]">
trigger: 'blur', <el-date-picker v-model="form.ImageDate" type="date" :picker-options="pickerOption"
}, value-format="yyyy-MM-dd" format="yyyy-MM-dd" style="width: 100%" />
]"
>
<el-date-picker
v-model="form.ImageDate"
type="date"
:picker-options="pickerOption"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
style="width: 100%"
/>
</el-form-item> </el-form-item>
</div> </div>
<div <div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
class="base-dialog-footer"
style="text-align: right; margin-top: 10px"
>
<el-form-item> <el-form-item>
<el-button <el-button size="small" type="primary" :disabled="btnLoading" @click="dialogVisible = false">
size="small"
type="primary"
:disabled="btnLoading"
@click="dialogVisible = false"
>
{{ $t('common:button:cancel') }} {{ $t('common:button:cancel') }}
</el-button> </el-button>
<el-button <el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">
size="small"
type="primary"
:loading="btnLoading"
@click="handleSave"
>
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -381,16 +202,9 @@
</el-dialog> </el-dialog>
<!-- 上传非dicom文件 --> <!-- 上传非dicom文件 -->
<el-dialog <el-dialog v-if="uploadVisible" :visible.sync="uploadVisible" :close-on-click-modal="false"
v-if="uploadVisible" :title="$t('trials:uploadNonDicoms:dialogTitle:upload')" width="800px" append-to-body
:visible.sync="uploadVisible" custom-class="base-dialog-wrapper" @close="resetFileDiaolg">
:close-on-click-modal="false"
:title="$t('trials:uploadNonDicoms:dialogTitle:upload')"
width="800px"
append-to-body
custom-class="base-dialog-wrapper"
@close="resetFileDiaolg"
>
<!-- 多文件上传 --> <!-- 多文件上传 -->
<form id="inputForm" ref="uploadForm"> <form id="inputForm" ref="uploadForm">
<el-divider content-position="left">{{ <el-divider content-position="left">{{
@ -401,33 +215,15 @@
}}</el-divider> }}</el-divider>
<div class="form-group"> <div class="form-group">
<div class="upload" style="margin-right: 10px"> <div class="upload" style="margin-right: 10px">
<input <input multiple="multiple" webkitdirectory="" directory accept="*/*" type="file" name="uploadFolder"
multiple="multiple" class="select-file" title="" @change="beginScanFiles($event)" v-if="!btnLoading" />
webkitdirectory=""
directory
accept="*/*"
type="file"
name="uploadFolder"
class="select-file"
title=""
@change="beginScanFiles($event)"
v-if="!btnLoading"
/>
<div class="btn-select"> <div class="btn-select">
{{ $t('trials:uploadNonDicoms:button:selectFolder') }} {{ $t('trials:uploadNonDicoms:button:selectFolder') }}
</div> </div>
</div> </div>
<div class="upload"> <div class="upload">
<input <input class="select-file" multiple="" :accept="faccept.join(',')" type="file" name="uploadFile" title=""
class="select-file" @change="beginScanFiles($event)" v-if="!btnLoading" />
multiple=""
:accept="faccept.join(',')"
type="file"
name="uploadFile"
title=""
@change="beginScanFiles($event)"
v-if="!btnLoading"
/>
<div class="btn-select"> <div class="btn-select">
{{ $t('trials:uploadNonDicoms:button:select') }} {{ $t('trials:uploadNonDicoms:button:select') }}
</div> </div>
@ -435,82 +231,46 @@
</div> </div>
</form> </form>
<!-- 文件列表 --> <!-- 文件列表 -->
<el-table <el-table ref="filesTable" :data="fileList" class="dicomFiles-table" height="300"
ref="filesTable" @selection-change="handleSelectionChange">
:data="fileList" <el-table-column type="selection" width="55" :selectable="(row, index) => row.status !== 2 && !btnLoading" />
class="dicomFiles-table"
height="300"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
:selectable="(row, index) => row.status !== 2 && !btnLoading"
/>
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<!-- 文件名称 --> <!-- 文件名称 -->
<el-table-column <el-table-column prop="name" :label="$t('trials:uploadNonDicoms:table:fileName')" min-width="100" />
prop="name"
:label="$t('trials:uploadNonDicoms:table:fileName')"
min-width="100"
/>
<!-- 文件大小 --> <!-- 文件大小 -->
<el-table-column <el-table-column prop="size" :label="$t('trials:uploadNonDicoms:table:fileSize')">
prop="size"
:label="$t('trials:uploadNonDicoms:table:fileSize')"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
scope.row.size && scope.row.size > 0 scope.row.size && scope.row.size > 0
? `${(scope.row.size / 1024 / 1024).toFixed(3)}MB` ? `${(scope.row.size / 1024 / 1024).toFixed(3)}MB`
: '' : '0MB'
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 文件类型 --> <!-- 文件类型 -->
<el-table-column <el-table-column prop="type" :label="$t('trials:uploadNonDicoms:table:fileType')" />
prop="type"
:label="$t('trials:uploadNonDicoms:table:fileType')"
/>
<!-- 上传状态 --> <!-- 上传状态 -->
<el-table-column <el-table-column prop="status" :label="$t('trials:uploadNonDicoms:table:uploadStatus')" min-width="100">
prop="status"
:label="$t('trials:uploadNonDicoms:table:uploadStatus')"
min-width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag <el-tag :type="['warning', 'info', 'success', 'danger'][scope.row.status]"
:type="['warning', 'info', 'success', 'danger'][scope.row.status]" v-if="scope.row.status || scope.row.status === 0">{{ $fd('NoneDicomUploadStatus', scope.row.status) }}
v-if="scope.row.status || scope.row.status === 0"
>{{ $fd('NoneDicomUploadStatus', scope.row.status) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('trials:uploadNonDicoms:table:failedFileCount')" min-width="150"
:label="$t('trials:uploadNonDicoms:table:failedFileCount')" show-overflow-tooltip>
min-width="150"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-progress <el-progress color="#409eff" :percentage="scope.row.size && scope.row.size > 0 ? ((scope.row.uploadFileSize * 100) / scope.row.size).toFixed(2) *
color="#409eff"
:percentage="
((scope.row.uploadFileSize * 100) / scope.row.size).toFixed(2) *
1 1
" : ((scope.row.uploadFileSize * 100) / 1).toFixed(2) *
/> 1
" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('common:action:action')"> <el-table-column :label="$t('common:action:action')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" icon="el-icon-delete" circle :disabled="btnLoading"
size="mini" :title="$t('trials:crcUpload:action:delete')" @click="handleRemoveFile(scope.row)" />
icon="el-icon-delete"
circle
:disabled="btnLoading"
:title="$t('trials:crcUpload:action:delete')"
@click="handleRemoveFile(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -518,13 +278,8 @@
<span style="margin-right: 10px">{{ <span style="margin-right: 10px">{{
$store.state.trials.uploadTip $store.state.trials.uploadTip
}}</span> }}</span>
<el-button <el-button size="small" type="primary" :disabled="selectArr.length == 0" :loading="btnLoading"
size="small" @click="beginUpload">
type="primary"
:disabled="selectArr.length == 0"
:loading="btnLoading"
@click="beginUpload"
>
{{ $t('trials:uploadNonDicoms:action:upload') }} {{ $t('trials:uploadNonDicoms:action:upload') }}
</el-button> </el-button>
</div> </div>
@ -544,25 +299,11 @@
<upload-videos @uploadOver="uploadOver" /> <upload-videos @uploadOver="uploadOver" />
</el-dialog> --> </el-dialog> -->
<!-- 预览非DICOM视频文件 --> <!-- 预览非DICOM视频文件 -->
<el-dialog <el-dialog v-if="lookVideoVisible" :visible.sync="lookVideoVisible" upload-video-visible
v-if="lookVideoVisible" :close-on-click-modal="false" :title="$t('trials:uploadNonDicoms:title:xflookvideo')" width="480px" append-to-body
:visible.sync="lookVideoVisible" custom-class="base-dialog-wrapper">
upload-video-visible
:close-on-click-modal="false"
:title="$t('trials:uploadNonDicoms:title:xflookvideo')"
width="480px"
append-to-body
custom-class="base-dialog-wrapper"
>
<div style="display: flex; justify-content: center"> <div style="display: flex; justify-content: center">
<video <video v-if="lookVideoVisible" id="video" controls crossorigin="anonymous" width="400" height="270">
v-if="lookVideoVisible"
id="video"
controls
crossorigin="anonymous"
width="400"
height="270"
>
<source :src="currentRow.VideoUrl" type="video/mp4" /> <source :src="currentRow.VideoUrl" type="video/mp4" />
</video> </video>
</div> </div>
@ -572,27 +313,12 @@
</el-button> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <el-dialog v-if="previewImgVisible" :visible.sync="previewImgVisible"
v-if="previewImgVisible" :title="$t('trials:uploadNonDicoms:dialogTitle:preview')" append-to-body width="565px">
:visible.sync="previewImgVisible" <div v-loading="imageLoading" class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
:title="$t('trials:uploadNonDicoms:dialogTitle:preview')" <el-image :src="`${OSSclientConfig.basePath}${imgUrl}`" crossorigin="anonymous" fit="fit"
append-to-body style="height: 500px; width: 500px" @error="imageLoading = false" @load="imageLoading = false"
width="565px" :preview-src-list="[`${OSSclientConfig.basePath}${imgUrl}`]" />
>
<div
v-loading="imageLoading"
class="base-modal-body"
style="border: 2px solid #ccc; padding: 10px"
>
<el-image
:src="`${OSSclientConfig.basePath}${imgUrl}`"
crossorigin="anonymous"
fit="fit"
style="height: 500px; width: 500px"
@error="imageLoading = false"
@load="imageLoading = false"
:preview-src-list="[`${OSSclientConfig.basePath}${imgUrl}`]"
/>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -839,7 +565,7 @@ export default {
this.loading = false this.loading = false
}) })
}) })
.catch(() => {}) .catch(() => { })
}, },
// //
handleUpload(row) { handleUpload(row) {
@ -962,9 +688,8 @@ export default {
type: extendName.split('.')[1], type: extendName.split('.')[1],
status: 0, status: 0,
file: files[i], file: files[i],
id: `${files[i].lastModified}${ id: `${files[i].lastModified}${files[i].name
files[i].name }${new Date().getTime()}${i + 1}`,
}${new Date().getTime()}${i + 1}`,
fileType: files[i].type, fileType: files[i].type,
uploadFileSize: 0, uploadFileSize: 0,
} }
@ -1024,7 +749,7 @@ export default {
) )
} }
}) })
.catch(() => {}) .catch(() => { })
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
@ -1070,11 +795,10 @@ export default {
if (!this.uploadVisible) return if (!this.uploadVisible) return
let file = this.fileList.filter((item) => item.id === arr[index].id)[0] let file = this.fileList.filter((item) => item.id === arr[index].id)[0]
file.status = 1 file.status = 1
let path = `/${this.trialId}/Image/${this.data.SubjectId}/${ let path = `/${this.trialId}/Image/${this.data.SubjectId}/${this.data.Id
this.data.Id }/${this.$guid()}${file.name
}/${this.$guid()}${file.name .substring(file.name.lastIndexOf('.'))
.substring(file.name.lastIndexOf('.')) .toLocaleLowerCase()}`
.toLocaleLowerCase()}`
file.curPath = path file.curPath = path
const fileData = await this.fileToBlob(file.file) const fileData = await this.fileToBlob(file.file)
let res = await this.fileToOss(path, fileData, file) let res = await this.fileToOss(path, fileData, file)
@ -1128,7 +852,7 @@ export default {
(percentage, checkpoint, lastPer) => { (percentage, checkpoint, lastPer) => {
item.uploadFileSize += checkpoint.size * (percentage - lastPer) item.uploadFileSize += checkpoint.size * (percentage - lastPer)
if (item.uploadFileSize > file.fileSize) { if (item.uploadFileSize > file.fileSize) {
item.uploadFileSize = file.fileSize item.uploadFileSize = file.fileSize > 0 ? file.fileSize : 1
} }
} }
) )
@ -1271,7 +995,7 @@ export default {
this.loading = false this.loading = false
}) })
}) })
.catch(() => {}) .catch(() => { })
}, },
// //
handlePreview(row) { handlePreview(row) {
@ -1338,6 +1062,7 @@ export default {
background: #428bca; background: #428bca;
border-color: #428bca; border-color: #428bca;
color: #fff; color: #fff;
.select-file { .select-file {
height: 30px; height: 30px;
width: 90px; width: 90px;
@ -1348,6 +1073,7 @@ export default {
opacity: 0; opacity: 0;
font-size: 0; font-size: 0;
} }
.btn-select { .btn-select {
// //
width: 90px; width: 90px;
@ -1363,6 +1089,7 @@ export default {
pointer-events: none; //pointer-events:none穿 pointer-events: none; //pointer-events:none穿
} }
} }
.non-dicom-wrapper { .non-dicom-wrapper {
::v-deep .delete-row { ::v-deep .delete-row {
text-decoration-line: line-through; text-decoration-line: line-through;

View File

@ -122,7 +122,7 @@
@openContextmenu="openContextmenu" @openFileNewVersion="openFileNewVersion" @delData="delData" /> @openContextmenu="openContextmenu" @openFileNewVersion="openFileNewVersion" @delData="delData" />
<viewer ref="picture_perview" style="margin: 0 10px" <viewer ref="picture_perview" style="margin: 0 10px"
v-if="rowData.FileFormat && ['png', 'jpg', 'jpeg'].includes(rowData.FileFormat.toLowerCase())" v-if="rowData.FileFormat && ['png', 'jpg', 'jpeg'].includes(rowData.FileFormat.toLowerCase())"
:images="[`${OSSclientConfig.basePath}${rowData.FilePath}`]"> :images="[`${OSSclientConfig.basePath}${rowData.FilePath}`]" :options="viewerOptions">
<img v-show="false" crossorigin="anonymous" :src="`${OSSclientConfig.basePath}${rowData.FilePath}`" <img v-show="false" crossorigin="anonymous" :src="`${OSSclientConfig.basePath}${rowData.FilePath}`"
alt="Image" /> alt="Image" />
@ -194,6 +194,20 @@ export default {
type: null, // type: null, //
ctrlKey: false, // ctrl ctrlKey: false, // ctrl
viewerOptions: {
toolbar: {
zoomIn: true,
zoomOut: true,
reset: true,
prev: false,
next: false,
rotateLeft: true,
rotateRight: true,
flipHorizontal: true,
flipVertical: true,
}
}
} }
}, },
watch: { watch: {
@ -225,9 +239,9 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.$t('trials:trials-workbench:auditDocument:message:authSuccessfully') this.$t('trials:trials-workbench:auditDocument:message:authSuccessfully')
if (isArray) { // if (isArray) {
this.getList() this.getList()
} // }
} }
} catch (err) { } catch (err) {
this.loading = false this.loading = false
@ -838,7 +852,7 @@ export default {
}, },
// //
formatFileSize(row) { formatFileSize(row) {
if (!row.FileSize) return '' if (!row.FileSize && row.FileSize !== 0) return ''
if (row.FileSize < 1000) { if (row.FileSize < 1000) {
return row.FileSize + "B" return row.FileSize + "B"
} }
@ -935,7 +949,10 @@ export default {
this.$refs.contextmenu.init(e, row, 'file') this.$refs.contextmenu.init(e, row, 'file')
}, },
// //
handleRowDblclick(row) { handleRowDblclick(row, column, cell, event) {
//
const isExpandButton = event.target.closest('.el-table__expand-icon');
if (isExpandButton) return; //
if (!row.AuditDocumentTypeEnum) { if (!row.AuditDocumentTypeEnum) {
this.Id = row.Id this.Id = row.Id
this.resetOpt() this.resetOpt()
@ -955,6 +972,9 @@ export default {
} else { } else {
this.checkList = [row.Id] this.checkList = [row.Id]
} }
if (this.$refs.contextmenu) {
this.$refs.contextmenu.foo()
}
// if (this.ctrlKey) { // if (this.ctrlKey) {
// if (!!~index) { // if (!!~index) {
// this.checkList.splice(index, 1) // this.checkList.splice(index, 1)