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

View File

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

View File

@ -122,7 +122,7 @@
@openContextmenu="openContextmenu" @openFileNewVersion="openFileNewVersion" @delData="delData" />
<viewer ref="picture_perview" style="margin: 0 10px"
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}`"
alt="Image" />
@ -194,6 +194,20 @@ export default {
type: null, //
ctrlKey: false, // ctrl
viewerOptions: {
toolbar: {
zoomIn: true,
zoomOut: true,
reset: true,
prev: false,
next: false,
rotateLeft: true,
rotateRight: true,
flipHorizontal: true,
flipVertical: true,
}
}
}
},
watch: {
@ -225,9 +239,9 @@ export default {
this.loading = false
if (res.IsSuccess) {
this.$t('trials:trials-workbench:auditDocument:message:authSuccessfully')
if (isArray) {
// if (isArray) {
this.getList()
}
// }
}
} catch (err) {
this.loading = false
@ -838,7 +852,7 @@ export default {
},
//
formatFileSize(row) {
if (!row.FileSize) return ''
if (!row.FileSize && row.FileSize !== 0) return ''
if (row.FileSize < 1000) {
return row.FileSize + "B"
}
@ -935,7 +949,10 @@ export default {
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) {
this.Id = row.Id
this.resetOpt()
@ -955,6 +972,9 @@ export default {
} else {
this.checkList = [row.Id]
}
if (this.$refs.contextmenu) {
this.$refs.contextmenu.foo()
}
// if (this.ctrlKey) {
// if (!!~index) {
// this.checkList.splice(index, 1)