下载优化
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2025-12-18 10:58:05 +08:00
parent 6acadf6287
commit dea612422e
2 changed files with 303 additions and 486 deletions

View File

@ -3672,7 +3672,7 @@ export function visitImageBack(data) {
data data
}) })
} }
// 阅片任务退回 // 访视影像下载
export function VisitImageDownload(data) { export function VisitImageDownload(data) {
return requestDownload({ return requestDownload({
url: `/download/VisitImageDownload`, url: `/download/VisitImageDownload`,
@ -3681,3 +3681,12 @@ export function VisitImageDownload(data) {
data data
}) })
} }
// 临床数据下载
export function ClinicalDataDownload(data) {
return requestDownload({
url: `/download/ClinicalDataDownload`,
method: 'post',
responseType: 'blob',
data
})
}

View File

@ -1,10 +1,6 @@
<template> <template>
<div class="clinical-data_content"> <div class="clinical-data_content">
<el-tabs <el-tabs type="card" v-model="clinicalType" v-if="!(data.IsVisit || data.IsBaseLine)">
type="card"
v-model="clinicalType"
v-if="!(data.IsVisit || data.IsBaseLine)"
>
<div v-if="type === 'readingPeriod'"> <div v-if="type === 'readingPeriod'">
<!--style="margin:0"--> <!--style="margin:0"-->
<h4> <h4>
@ -21,114 +17,68 @@
</div> </div>
<div class="top"> <div class="top">
<!-- 预览 --> <!-- 预览 -->
<el-button <el-button type="primary" icon="el-icon-view" size="small" :disabled="list.length === 0"
type="primary" @click="handlePreview()">
icon="el-icon-view"
size="small"
:disabled="list.length === 0"
@click="handlePreview()"
>
{{ $t('trials:readingPeriod:cd:title:preview') }} {{ $t('trials:readingPeriod:cd:title:preview') }}
</el-button> </el-button>
<!-- 添加 --> <!-- 添加 -->
<el-button <el-button v-if="
v-if="
otherInfo.IsCanAddClinicalData && otherInfo.IsCanAddClinicalData &&
hasPermi(['trials:trials-panel:subject:readingPeriod:edit']) && hasPermi(['trials:trials-panel:subject:readingPeriod:edit']) &&
clinicalType === '1' && clinicalType === '1' &&
type !== 'consistencyAnalysis' type !== 'consistencyAnalysis'
" " type="primary" icon="el-icon-plus" size="small" @click="handleAdd">
type="primary"
icon="el-icon-plus"
size="small"
@click="handleAdd"
>
{{ $t('common:button:add') }} {{ $t('common:button:add') }}
</el-button> </el-button>
<!--下载模板--> <!--下载模板-->
<el-button <el-button v-if="
v-if="
otherInfo.IsCanAddClinicalData && otherInfo.IsCanAddClinicalData &&
hasPermi(['trials:trials-panel:subject:readingPeriod:edit']) && hasPermi(['trials:trials-panel:subject:readingPeriod:edit']) &&
clinicalType === '1' && clinicalType === '1' &&
type !== 'consistencyAnalysis' type !== 'consistencyAnalysis'
" " type="primary" icon="el-icon-download" size="small" @click="downLoadTemplate">
type="primary"
icon="el-icon-download"
size="small"
@click="downLoadTemplate"
>
{{ $t('trials:readingPeriod:cd:title:downLoadTemplate') }} {{ $t('trials:readingPeriod:cd:title:downLoadTemplate') }}
</el-button> </el-button>
<el-button <el-button v-if="
v-if="
hasPermi(['trials:trials-panel:subject:readingPeriod:edit']) && hasPermi(['trials:trials-panel:subject:readingPeriod:edit']) &&
clinicalType === '2' && clinicalType === '2' &&
list.length > 0 && list.length > 0 &&
list[0].ReadingClinicalDataState !== 3 && list[0].ReadingClinicalDataState !== 3 &&
list[0].IsCRCApplicationRevoke && list[0].IsCRCApplicationRevoke &&
type !== 'consistencyAnalysis' type !== 'consistencyAnalysis'
" " type="primary" icon="el-icon-plus" size="small" :disabled="list.length === 0"
type="primary" @click="handleVerification(list[0], 'unconfirm')">
icon="el-icon-plus"
size="small"
:disabled="list.length === 0"
@click="handleVerification(list[0], 'unconfirm')"
>
撤回审批 撤回审批
</el-button> </el-button>
</div> </div>
<div class="main"> <div class="main">
<el-table <el-table v-loading="loading" :data="list" stripe style="width: 100%" height="500">
v-loading="loading"
:data="list"
stripe
style="width: 100%"
height="500"
>
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<!-- 临床数据名称 --> <!-- 临床数据名称 -->
<el-table-column <el-table-column prop="ClinicalDataSetName" :label="$t('trials:readingPeriod:cd:table:clinicalDataName')"
prop="ClinicalDataSetName" min-width="100" />
:label="$t('trials:readingPeriod:cd:table:clinicalDataName')" <el-table-column prop="UploadRole" :label="$t('trials:studyList:table:uploader')" show-overflow-tooltip
min-width="100" min-width="100">
/>
<el-table-column
prop="UploadRole"
:label="$t('trials:studyList:table:uploader')"
show-overflow-tooltip
min-width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('ClinicalDataUploadRole', scope.row.UploadRole) }} {{ $fd('ClinicalDataUploadRole', scope.row.UploadRole) }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 数据级别 --> <!-- 数据级别 -->
<el-table-column <el-table-column prop="ClinicalDataLevel" :label="$t('trials:readingPeriod:cd:table:dataLevel')"
prop="ClinicalDataLevel" min-width="100">
:label="$t('trials:readingPeriod:cd:table:dataLevel')"
min-width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('ClinicalLevel', scope.row.ClinicalDataLevel) }} {{ $fd('ClinicalLevel', scope.row.ClinicalDataLevel) }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 传输方式 --> <!-- 传输方式 -->
<el-table-column <el-table-column prop="ClinicalUploadType" :label="$t('trials:readingPeriod:cd:table:transferType')"
prop="ClinicalUploadType" min-width="120">
:label="$t('trials:readingPeriod:cd:table:transferType')"
min-width="120"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('ClinicalUploadType', scope.row.ClinicalUploadType) }} {{ $fd('ClinicalUploadType', scope.row.ClinicalUploadType) }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 文件数量 --> <!-- 文件数量 -->
<el-table-column <el-table-column prop="FileCount" :label="$t('trials:readingPeriod:cd:table:fileCount')" min-width="120">
prop="FileCount"
:label="$t('trials:readingPeriod:cd:table:fileCount')"
min-width="120"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.ClinicalUploadType === 0 ? 'NA' : scope.row.FileCount scope.row.ClinicalUploadType === 0 ? 'NA' : scope.row.FileCount
@ -136,162 +86,83 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 阅片临床数据状态 --> <!-- 阅片临床数据状态 -->
<el-table-column <el-table-column prop="ReadingClinicalDataState" :label="$t('trials:readingPeriod:cd:title:cdStatus')"
prop="ReadingClinicalDataState" width="150">
:label="$t('trials:readingPeriod:cd:title:cdStatus')"
width="150"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag <el-tag v-if="scope.row.ReadingClinicalDataState === 0" type="info">{{
v-if="scope.row.ReadingClinicalDataState === 0"
type="info"
>{{
$fd( $fd(
'ReadingClinicalDataState', 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag>
> <el-tag v-if="scope.row.ReadingClinicalDataState === 1" type="danger">{{
<el-tag
v-if="scope.row.ReadingClinicalDataState === 1"
type="danger"
>{{
$fd( $fd(
'ReadingClinicalDataState', 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag>
> <el-tag v-if="scope.row.ReadingClinicalDataState === 2" type="primary">{{
<el-tag
v-if="scope.row.ReadingClinicalDataState === 2"
type="primary"
>{{
$fd( $fd(
'ReadingClinicalDataState', 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag>
> <el-tag v-if="scope.row.ReadingClinicalDataState === 3" type="warning">{{
<el-tag
v-if="scope.row.ReadingClinicalDataState === 3"
type="warning"
>{{
$fd( $fd(
'ReadingClinicalDataState', 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag>
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('common:action:action')" width="260"> <el-table-column :label="$t('common:action:action')" width="260">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 查看 --> <!-- 查看 -->
<el-button <el-button circle :disabled="scope.row.ClinicalUploadType === 1 &&
circle
:disabled="
scope.row.ClinicalUploadType === 1 &&
scope.row.FileCount === 0 scope.row.FileCount === 0
" " :title="$t('trials:readingPeriod:cd:action:view')" icon="el-icon-view"
:title="$t('trials:readingPeriod:cd:action:view')" @click="handlePreview(scope.row.Id, scope.row)" />
icon="el-icon-view"
@click="handlePreview(scope.row.Id, scope.row)"
/>
<!-- 编辑 --> <!-- 编辑 -->
<el-button <el-button v-if="clinicalType === '1'" v-hasPermi="['trials:trials-panel:subject:readingPeriod:edit']"
v-if="clinicalType === '1'" circle :title="$t('trials:readingPeriod:cd:action:edit')" icon="el-icon-edit-outline" :disabled="scope.row.IsCRCUpload ||
v-hasPermi="['trials:trials-panel:subject:readingPeriod:edit']"
circle
:title="$t('trials:readingPeriod:cd:action:edit')"
icon="el-icon-edit-outline"
:disabled="
scope.row.IsCRCUpload ||
scope.row.IsSign || scope.row.IsSign ||
scope.row.UploadRole === 0 scope.row.UploadRole === 0
" " @click="handleEdit(scope.row)" />
@click="handleEdit(scope.row)"
/>
<!-- 编辑 --> <!-- 编辑 -->
<el-button <el-button v-hasPermi="['trials:trials-panel:subject:readingPeriod:edit']" v-if="clinicalType === '1'"
v-hasPermi="['trials:trials-panel:subject:readingPeriod:edit']" circle :title="$t('trials:readingPeriod:cd:title:cdCheck')" icon="el-icon-s-claim" :disabled="(scope.row.IsCRCUpload ||
v-if="clinicalType === '1'"
circle
:title="$t('trials:readingPeriod:cd:title:cdCheck')"
icon="el-icon-s-claim"
:disabled="
(scope.row.IsCRCUpload ||
scope.row.IsSign || scope.row.IsSign ||
scope.row.UploadRole === 0) && scope.row.UploadRole === 0) &&
scope.row.ReadingClinicalDataState !== 2 scope.row.ReadingClinicalDataState !== 2
" " @click="handleVerification(scope.row, 'confirm')" />
@click="handleVerification(scope.row, 'confirm')"
/>
<!-- 删除 --> <!-- 删除 -->
<el-button <el-button v-if="clinicalType === '1' && type !== 'consistencyAnalysis'"
v-if="clinicalType === '1' && type !== 'consistencyAnalysis'" v-hasPermi="['trials:trials-panel:subject:readingPeriod:edit']" circle
v-hasPermi="['trials:trials-panel:subject:readingPeriod:edit']" :title="$t('trials:readingPeriod:cd:action:delete')" icon="el-icon-delete" :disabled="scope.row.IsCRCUpload ||
circle
:title="$t('trials:readingPeriod:cd:action:delete')"
icon="el-icon-delete"
:disabled="
scope.row.IsCRCUpload ||
scope.row.IsSign || scope.row.IsSign ||
scope.row.UploadRole === 0 scope.row.UploadRole === 0
" " @click="handleDelete(scope.row)" />
@click="handleDelete(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 添加或编辑 --> <!-- 添加或编辑 -->
<el-dialog <el-dialog v-if="addOrUpdateCD.visible" :visible.sync="addOrUpdateCD.visible" :close-on-click-modal="false"
v-if="addOrUpdateCD.visible" :title="addOrUpdateCD.title" width="600px" append-to-body custom-class="base-dialog-wrapper">
:visible.sync="addOrUpdateCD.visible" <AddOrEditCD :trial-reading-criterion-id="trialReadingCriterionId" :data="currentData" :option="currentOption"
:close-on-click-modal="false" :type="type" @close="addOrUpdateCD.visible = false" @getList="getList" />
:title="addOrUpdateCD.title"
width="600px"
append-to-body
custom-class="base-dialog-wrapper"
>
<AddOrEditCD
:trial-reading-criterion-id="trialReadingCriterionId"
:data="currentData"
:option="currentOption"
:type="type"
@close="addOrUpdateCD.visible = false"
@getList="getList"
/>
</el-dialog> </el-dialog>
<!-- 核查 --> <!-- 核查 -->
<el-dialog <el-dialog v-if="verification.visible" :visible.sync="verification.visible" :close-on-click-modal="false"
v-if="verification.visible" :title="verification.title" width="600px" append-to-body custom-class="base-dialog-wrapper">
:visible.sync="verification.visible" <Verification :data="currentData" @close="verification.visible = false" @getList="getList"
:close-on-click-modal="false" @handlePreview="handlePreview" @sign="handleSign" />
:title="verification.title"
width="600px"
append-to-body
custom-class="base-dialog-wrapper"
>
<Verification
:data="currentData"
@close="verification.visible = false"
@getList="getList"
@handlePreview="handlePreview"
@sign="handleSign"
/>
</el-dialog> </el-dialog>
<!-- 签名 --> <!-- 签名 -->
<el-dialog <el-dialog v-if="signVisible" :visible.sync="signVisible" :close-on-click-modal="false" width="600px"
v-if="signVisible" custom-class="base-dialog-wrapper" append-to-body>
:visible.sync="signVisible"
:close-on-click-modal="false"
width="600px"
custom-class="base-dialog-wrapper"
append-to-body
>
<div slot="title"> <div slot="title">
<span style="font-size: 18px">{{ <span style="font-size: 18px">{{
$t('common:dialogTitle:sign') $t('common:dialogTitle:sign')
@ -300,11 +171,7 @@
`(${$t('common:label:sign')}${currentUser})` `(${$t('common:label:sign')}${currentUser})`
}}</span> }}</span>
</div> </div>
<SignForm <SignForm ref="signForm" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
ref="signForm"
:sign-code-enum="signCode"
@closeDialog="closeSignDialog"
/>
</el-dialog> </el-dialog>
</div> </div>
<!-- <template v-for="item in $d.GetClinicalType"> <!-- <template v-for="item in $d.GetClinicalType">
@ -316,75 +183,42 @@
<div v-else> <div v-else>
<div class="top"> <div class="top">
<!-- 预览 --> <!-- 预览 -->
<el-button <el-button type="primary" icon="el-icon-view" size="small" :disabled="list.length === 0"
type="primary" @click="handlePreview()">
icon="el-icon-view"
size="small"
:disabled="list.length === 0"
@click="handlePreview()"
>
{{ $t('trials:readingPeriod:cd:title:preview') }} {{ $t('trials:readingPeriod:cd:title:preview') }}
</el-button> </el-button>
<!-- 添加 --> <!-- 添加 -->
<el-button <el-button v-if="
v-if="
otherInfo.IsCanAddClinicalData && otherInfo.IsCanAddClinicalData &&
hasPermi(['trials:trials-panel:subject:readingPeriod:edit']) hasPermi(['trials:trials-panel:subject:readingPeriod:edit'])
" " type="primary" icon="el-icon-plus" size="small" @click="handleAdd">
type="primary"
icon="el-icon-plus"
size="small"
@click="handleAdd"
>
{{ $t('common:button:add') }} {{ $t('common:button:add') }}
</el-button> </el-button>
</div> </div>
<div class="main"> <div class="main">
<el-table <el-table v-loading="loading" :data="list" stripe style="width: 100%" height="500">
v-loading="loading"
:data="list"
stripe
style="width: 100%"
height="500"
>
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<!-- 临床数据名称 --> <!-- 临床数据名称 -->
<el-table-column <el-table-column prop="ClinicalDataSetName" :label="$t('trials:readingPeriod:cd:table:clinicalDataName')" />
prop="ClinicalDataSetName" <el-table-column prop="UploadRole" :label="$t('trials:studyList:table:uploader')" show-overflow-tooltip>
:label="$t('trials:readingPeriod:cd:table:clinicalDataName')"
/>
<el-table-column
prop="UploadRole"
:label="$t('trials:studyList:table:uploader')"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('ClinicalDataUploadRole', scope.row.UploadRole) }} {{ $fd('ClinicalDataUploadRole', scope.row.UploadRole) }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 数据级别 --> <!-- 数据级别 -->
<el-table-column <el-table-column prop="ClinicalDataLevel" :label="$t('trials:readingPeriod:cd:table:dataLevel')">
prop="ClinicalDataLevel"
:label="$t('trials:readingPeriod:cd:table:dataLevel')"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('ClinicalLevel', scope.row.ClinicalDataLevel) }} {{ $fd('ClinicalLevel', scope.row.ClinicalDataLevel) }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 传输方式 --> <!-- 传输方式 -->
<el-table-column <el-table-column prop="ClinicalUploadType" :label="$t('trials:readingPeriod:cd:table:transferType')">
prop="ClinicalUploadType"
:label="$t('trials:readingPeriod:cd:table:transferType')"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('ClinicalUploadType', scope.row.ClinicalUploadType) }} {{ $fd('ClinicalUploadType', scope.row.ClinicalUploadType) }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 文件数量 --> <!-- 文件数量 -->
<el-table-column <el-table-column prop="FileCount" :label="$t('trials:readingPeriod:cd:table:fileCount')">
prop="FileCount"
:label="$t('trials:readingPeriod:cd:table:fileCount')"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.ClinicalUploadType === 0 ? 'NA' : scope.row.FileCount scope.row.ClinicalUploadType === 0 ? 'NA' : scope.row.FileCount
@ -392,160 +226,85 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 阅片临床数据状态 --> <!-- 阅片临床数据状态 -->
<el-table-column <el-table-column prop="ReadingClinicalDataState" :label="$t('trials:readingPeriod:cd:title:cdStatus')"
prop="ReadingClinicalDataState" width="150">
:label="$t('trials:readingPeriod:cd:title:cdStatus')"
width="150"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag <el-tag v-if="scope.row.ReadingClinicalDataState === 0" type="info">{{
v-if="scope.row.ReadingClinicalDataState === 0"
type="info"
>{{
$fd( $fd(
'ReadingClinicalDataState', 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag>
> <el-tag v-if="scope.row.ReadingClinicalDataState === 1" type="danger">{{
<el-tag
v-if="scope.row.ReadingClinicalDataState === 1"
type="danger"
>{{
$fd( $fd(
'ReadingClinicalDataState', 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag>
> <el-tag v-if="scope.row.ReadingClinicalDataState === 2" type="primary">{{
<el-tag
v-if="scope.row.ReadingClinicalDataState === 2"
type="primary"
>{{
$fd( $fd(
'ReadingClinicalDataState', 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag>
> <el-tag v-if="scope.row.ReadingClinicalDataState === 3" type="warning">{{
<el-tag
v-if="scope.row.ReadingClinicalDataState === 3"
type="warning"
>{{
$fd( $fd(
'ReadingClinicalDataState', 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag>
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('common:action:action')" width="260"> <el-table-column :label="$t('common:action:action')" width="260">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 查看 --> <!-- 查看 -->
<el-button <el-button circle :disabled="scope.row.ClinicalUploadType === 1 &&
circle
:disabled="
scope.row.ClinicalUploadType === 1 &&
scope.row.FileCount === 0 scope.row.FileCount === 0
" " :title="$t('trials:readingPeriod:cd:action:view')" icon="el-icon-view"
:title="$t('trials:readingPeriod:cd:action:view')" @click="handlePreview(scope.row.Id, scope.row)" />
icon="el-icon-view"
@click="handlePreview(scope.row.Id, scope.row)"
/>
<!-- 编辑 --> <!-- 编辑 -->
<el-button <el-button v-hasPermi="['trials:trials-panel:subject:readingPeriod:edit']" circle
v-hasPermi="['trials:trials-panel:subject:readingPeriod:edit']" :title="$t('trials:readingPeriod:cd:action:edit')" icon="el-icon-edit-outline" :disabled="scope.row.IsCRCUpload ||
circle
:title="$t('trials:readingPeriod:cd:action:edit')"
icon="el-icon-edit-outline"
:disabled="
scope.row.IsCRCUpload ||
scope.row.IsSign || scope.row.IsSign ||
scope.row.UploadRole === 0 || scope.row.UploadRole === 0 ||
(type === 'consistencyAnalysis' && (type === 'consistencyAnalysis' &&
scope.row.ReadingClinicalDataState === 3) scope.row.ReadingClinicalDataState === 3)
" " @click="handleEdit(scope.row)" />
@click="handleEdit(scope.row)"
/>
<!-- 编辑 --> <!-- 编辑 -->
<el-button <el-button v-hasPermi="['trials:trials-panel:subject:readingPeriod:edit']" circle
v-hasPermi="['trials:trials-panel:subject:readingPeriod:edit']" :title="$t('trials:readingPeriod:cd:title:cdCheck')" icon="el-icon-s-claim" :disabled="(scope.row.IsCRCUpload ||
circle
:title="$t('trials:readingPeriod:cd:title:cdCheck')"
icon="el-icon-s-claim"
:disabled="
(scope.row.IsCRCUpload ||
scope.row.IsSign || scope.row.IsSign ||
scope.row.UploadRole === 0 || scope.row.UploadRole === 0 ||
type === 'consistencyAnalysis') && type === 'consistencyAnalysis') &&
scope.row.ReadingClinicalDataState !== 2 scope.row.ReadingClinicalDataState !== 2
" " @click="handleVerification(scope.row, 'confirm')" />
@click="handleVerification(scope.row, 'confirm')"
/>
<!-- 删除 --> <!-- 删除 -->
<el-button <el-button v-hasPermi="['trials:trials-panel:subject:readingPeriod:edit']" circle
v-hasPermi="['trials:trials-panel:subject:readingPeriod:edit']" :title="$t('trials:readingPeriod:cd:action:delete')" icon="el-icon-delete" :disabled="scope.row.IsCRCUpload ||
circle
:title="$t('trials:readingPeriod:cd:action:delete')"
icon="el-icon-delete"
:disabled="
scope.row.IsCRCUpload ||
scope.row.IsSign || scope.row.IsSign ||
scope.row.UploadRole === 0 scope.row.UploadRole === 0
" " @click="handleDelete(scope.row)" />
@click="handleDelete(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 添加 --> <!-- 添加 -->
<el-dialog <el-dialog v-if="addOrUpdateCD.visible" :visible.sync="addOrUpdateCD.visible" :close-on-click-modal="false"
v-if="addOrUpdateCD.visible" :title="addOrUpdateCD.title" width="600px" append-to-body custom-class="base-dialog-wrapper">
:visible.sync="addOrUpdateCD.visible" <AddOrEditCD :trial-reading-criterion-id="trialReadingCriterionId" :data="currentData"
:close-on-click-modal="false" @close="addOrUpdateCD.visible = false" @getList="getList" />
:title="addOrUpdateCD.title"
width="600px"
append-to-body
custom-class="base-dialog-wrapper"
>
<AddOrEditCD
:trial-reading-criterion-id="trialReadingCriterionId"
:data="currentData"
@close="addOrUpdateCD.visible = false"
@getList="getList"
/>
</el-dialog> </el-dialog>
<!-- 核查 --> <!-- 核查 -->
<el-dialog <el-dialog v-if="verification.visible" :visible.sync="verification.visible" :close-on-click-modal="false"
v-if="verification.visible" :title="verification.title" width="600px" append-to-body custom-class="base-dialog-wrapper">
:visible.sync="verification.visible" <Verification :data="currentData" @close="verification.visible = false" @getList="getList"
:close-on-click-modal="false" @handlePreview="handlePreview" @sign="handleSign" />
:title="verification.title"
width="600px"
append-to-body
custom-class="base-dialog-wrapper"
>
<Verification
:data="currentData"
@close="verification.visible = false"
@getList="getList"
@handlePreview="handlePreview"
@sign="handleSign"
/>
</el-dialog> </el-dialog>
<!-- 签名 --> <!-- 签名 -->
<el-dialog <el-dialog v-if="signVisible" :visible.sync="signVisible" :close-on-click-modal="false" width="600px"
v-if="signVisible" custom-class="base-dialog-wrapper" append-to-body>
:visible.sync="signVisible"
:close-on-click-modal="false"
width="600px"
custom-class="base-dialog-wrapper"
append-to-body
>
<div slot="title"> <div slot="title">
<span style="font-size: 18px">{{ <span style="font-size: 18px">{{
$t('common:dialogTitle:sign') $t('common:dialogTitle:sign')
@ -554,14 +313,21 @@
`(${$t('common:label:sign')}${currentUser})` `(${$t('common:label:sign')}${currentUser})`
}}</span> }}</span>
</div> </div>
<SignForm <SignForm ref="signForm" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
ref="signForm"
:sign-code-enum="signCode"
@closeDialog="closeSignDialog"
/>
</el-dialog> </el-dialog>
</div> </div>
</div> </div>
<el-dialog :title="$t('dialog:title:downLoadProgress')" :visible.sync="downloadVisible" width="35%"
:close-on-click-modal="false" :close-on-press-escape="false" :before-close="handleClose">
<div v-if="downloadType == 'downLoad' || downloadType == 'start'">
<span style="margin-bottom: 5px;">{{ $t('dialog:sattus:downLoading') }}</span>
<span>{{ speed }}</span>
<el-progress :percentage="percentage * 1"></el-progress>
</div>
<div v-else>
<span>{{ $t('dialog:sattus:ziping') }}</span>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -572,6 +338,7 @@ import {
getTrialClinicalDataSelect, getTrialClinicalDataSelect,
getConsistencyAnalysisReadingClinicalDataList, getConsistencyAnalysisReadingClinicalDataList,
signConsistencyAnalysisReadingClinicalData, signConsistencyAnalysisReadingClinicalData,
ClinicalDataDownload
} from '@/api/trials' } from '@/api/trials'
import AddOrEditCD from './AddOrEditCD' import AddOrEditCD from './AddOrEditCD'
import Verification from './Verification' import Verification from './Verification'
@ -579,6 +346,7 @@ import SignForm from '@/views/trials/components/newSignForm'
import const_ from '@/const/sign-code' import const_ from '@/const/sign-code'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { downLoadFile } from '@/utils/stream.js' import { downLoadFile } from '@/utils/stream.js'
import * as signalR from '@microsoft/signalr'
export default { export default {
name: 'ClinicalData', name: 'ClinicalData',
components: { AddOrEditCD, SignForm, Verification }, components: { AddOrEditCD, SignForm, Verification },
@ -624,6 +392,15 @@ export default {
pos: 0, pos: 0,
tips1: null, tips1: null,
clinicalDatas: [], clinicalDatas: [],
//
downloading: false,
downloadId: null,
downloadVisible: false,
downloadType: '',
percentage: 0,
downLoadImageCount: 0,
speed: '0KB/s',
} }
}, },
mounted() { mounted() {
@ -638,13 +415,80 @@ export default {
this.getList() this.getList()
} }
}) })
let connection = new signalR.HubConnectionBuilder()
.withUrl("/DownloadHub", { accessTokenFactory: () => getToken() })
.configureLogging(signalR.LogLevel.Information)
.withAutomaticReconnect()
.build()
connection.start()
connection.on("ReceivProgressAsync", (id, obj) => {
console.log(obj)
this.speed = obj.speed
this.onUploadProgress(id, obj.sizePercent, 'downLoad')
});
}, },
methods: { methods: {
handleClose(done) {
this.downLoadType = 'start'
this.percentage = 0
this.downLoadImageCount = 0
this.downloadVisible = false
this.speed = '0KB/s'
this.downloadId = null
done()
},
generate() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
const r = Math.random() * 16 | 0;
const v = c === 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
},
async onUploadProgress(id, num, type = 'start') {
if (id !== this.downloadId) return false
this.downloadType = type
if (type === 'start') {
this.downloadVisible = true
}
if (type === 'downLoad') {
this.percentage = num
}
if (num >= 100) {
this.downLoadType = 'start'
this.percentage = 0
this.downLoadImageCount = 0
this.downloadVisible = false
this.speed = '0KB/s'
}
},
// //
async downLoadTemplate() { async downLoadTemplate() {
try { try {
let { files, name } = this.formatDownloadFile() // let { files, name } = this.formatDownloadFile()
let res = await downLoadFile(files, name, 'zip') // let res = await downLoadFile(files, name, 'zip')
let currentData = Object.assign(
{},
{
TrialId: this.data.TrialId,
ReadingId: this.data.Id,
IsVisit: this.data.IsVisit,
SubjectId: this.data.SubjectId,
IsBaseLine: this.data.IsBaseLine,
}
)
var param = {
trialId: currentData.TrialId,
IsVisit: currentData.IsVisit,
ReadingId: currentData.ReadingId,
SubjectId: currentData.SubjectId,
ReadingClinicalDataId: currentData.Id ? currentData.Id : '',
IsBaseLine: currentData.IsBaseLine,
TrialReadingCriterionId: this.trialReadingCriterionId,
}
this.downloadId = this.generate()
param.CurrentNoticeId = this.downloadId
this.onUploadProgress(this.downloadId)
await ClinicalDataDownload(param)
} catch (err) { } catch (err) {
console.log(err) console.log(err)
} }
@ -652,8 +496,7 @@ export default {
// //
formatDownloadFile() { formatDownloadFile() {
let files = [], let files = [],
name = `${this.$route.query.trialId}_${ name = `${this.$route.query.trialId}_${this.data.CriterionName
this.data.CriterionName
}_template_${new Date().getTime()}.zip` }_template_${new Date().getTime()}.zip`
this.clinicalDatas.forEach((item) => { this.clinicalDatas.forEach((item) => {
if (item.Path) { if (item.Path) {
@ -826,26 +669,18 @@ export default {
if (type === 'unconfirm') { if (type === 'unconfirm') {
var token = getToken() var token = getToken()
let routeData = this.$router.resolve({ let routeData = this.$router.resolve({
path: `/clinicalData?type=unconfirm&ClinicalDataTrialSetId=${ path: `/clinicalData?type=unconfirm&ClinicalDataTrialSetId=${row.ClinicalDataTrialSetId
row.ClinicalDataTrialSetId }&subjectId=${this.data.SubjectId}&trialId=${this.data.TrialId
}&subjectId=${this.data.SubjectId}&trialId=${ }&readingId=${this.data.Id}&readingClinicalDataId=${row.readingClinicalDataId || ''
this.data.TrialId }&readModuleId=${row.ReadModuleId}&getClinicalType=${this.clinicalType
}&readingId=${this.data.Id}&readingClinicalDataId=${
row.readingClinicalDataId || ''
}&readModuleId=${row.ReadModuleId}&getClinicalType=${
this.clinicalType
}&isConfirm=1&IsOnlyGetCRCReadModule=1&TokenKey=${token}`, }&isConfirm=1&IsOnlyGetCRCReadModule=1&TokenKey=${token}`,
}) })
if (this.type === 'consistencyAnalysis') { if (this.type === 'consistencyAnalysis') {
routeData = this.$router.resolve({ routeData = this.$router.resolve({
path: `/clinicalData?type=unconfirm&ClinicalDataTrialSetId=${ path: `/clinicalData?type=unconfirm&ClinicalDataTrialSetId=${row.ClinicalDataTrialSetId
row.ClinicalDataTrialSetId }&subjectId=${this.data.SubjectId}&trialId=${this.data.TrialId
}&subjectId=${this.data.SubjectId}&trialId=${ }&visitTaskId=${this.data.Id}&readingClinicalDataId=${row.readingClinicalDataId || ''
this.data.TrialId }&readModuleId=${row.ReadModuleId}&getClinicalType=${this.clinicalType
}&visitTaskId=${this.data.Id}&readingClinicalDataId=${
row.readingClinicalDataId || ''
}&readModuleId=${row.ReadModuleId}&getClinicalType=${
this.clinicalType
}&isConfirm=1&IsOnlyGetCRCReadModule=1&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`, }&isConfirm=1&IsOnlyGetCRCReadModule=1&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`,
}) })
} }
@ -855,26 +690,18 @@ export default {
if (row.IsNeedMerge) { if (row.IsNeedMerge) {
var token = getToken() var token = getToken()
let routeData = this.$router.resolve({ let routeData = this.$router.resolve({
path: `/clinicalData?ClinicalDataTrialSetId=${ path: `/clinicalData?ClinicalDataTrialSetId=${row.ClinicalDataTrialSetId
row.ClinicalDataTrialSetId }&subjectId=${this.data.SubjectId}&trialId=${this.data.TrialId
}&subjectId=${this.data.SubjectId}&trialId=${ }&readingId=${this.data.Id}&readingClinicalDataId=${row.readingClinicalDataId || ''
this.data.TrialId }&readModuleId=${row.ReadModuleId}&getClinicalType=${this.clinicalType
}&readingId=${this.data.Id}&readingClinicalDataId=${
row.readingClinicalDataId || ''
}&readModuleId=${row.ReadModuleId}&getClinicalType=${
this.clinicalType
}&isConfirm=1&IsOnlyGetCRCReadModule=1&TokenKey=${token}`, }&isConfirm=1&IsOnlyGetCRCReadModule=1&TokenKey=${token}`,
}) })
if (this.type === 'consistencyAnalysis') { if (this.type === 'consistencyAnalysis') {
routeData = this.$router.resolve({ routeData = this.$router.resolve({
path: `/clinicalData?ClinicalDataTrialSetId=${ path: `/clinicalData?ClinicalDataTrialSetId=${row.ClinicalDataTrialSetId
row.ClinicalDataTrialSetId }&subjectId=${this.data.SubjectId}&trialId=${this.data.TrialId
}&subjectId=${this.data.SubjectId}&trialId=${ }&visitTaskId=${this.data.Id}&readingClinicalDataId=${row.readingClinicalDataId || ''
this.data.TrialId }&readModuleId=${row.ReadModuleId}&getClinicalType=${this.clinicalType
}&visitTaskId=${this.data.Id}&readingClinicalDataId=${
row.readingClinicalDataId || ''
}&readModuleId=${row.ReadModuleId}&getClinicalType=${
this.clinicalType
}&isConfirm=1&IsOnlyGetCRCReadModule=1&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`, }&isConfirm=1&IsOnlyGetCRCReadModule=1&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`,
}) })
} }
@ -915,7 +742,7 @@ export default {
this.loading = false this.loading = false
}) })
}) })
.catch(() => {}) .catch(() => { })
}, },
handleSign(from) { handleSign(from) {
// this.currentData = { ...row } // this.currentData = { ...row }
@ -1001,26 +828,18 @@ export default {
if (row && row.IsNeedMerge) { if (row && row.IsNeedMerge) {
var token = getToken() var token = getToken()
let routeData = this.$router.resolve({ let routeData = this.$router.resolve({
path: `/clinicalData?ClinicalDataTrialSetId=${ path: `/clinicalData?ClinicalDataTrialSetId=${row.ClinicalDataTrialSetId
row.ClinicalDataTrialSetId }&subjectId=${this.data.SubjectId}&trialId=${this.data.TrialId
}&subjectId=${this.data.SubjectId}&trialId=${ }&readingId=${this.data.Id}&readingClinicalDataId=${row.readingClinicalDataId || ''
this.data.TrialId }&getClinicalType=${this.clinicalType}&readModuleId=${row.ReadModuleId
}&readingId=${this.data.Id}&readingClinicalDataId=${
row.readingClinicalDataId || ''
}&getClinicalType=${this.clinicalType}&readModuleId=${
row.ReadModuleId
}&IsOnlyGetCRCReadModule=1&TokenKey=${token}`, }&IsOnlyGetCRCReadModule=1&TokenKey=${token}`,
}) })
if (this.type === 'consistencyAnalysis') { if (this.type === 'consistencyAnalysis') {
routeData = this.$router.resolve({ routeData = this.$router.resolve({
path: `/clinicalData?ClinicalDataTrialSetId=${ path: `/clinicalData?ClinicalDataTrialSetId=${row.ClinicalDataTrialSetId
row.ClinicalDataTrialSetId }&subjectId=${this.data.SubjectId}&trialId=${this.data.TrialId
}&subjectId=${this.data.SubjectId}&trialId=${ }&visitTaskId=${this.data.Id}&readingClinicalDataId=${row.readingClinicalDataId || ''
this.data.TrialId }&getClinicalType=${this.clinicalType}&readModuleId=${row.ReadModuleId
}&visitTaskId=${this.data.Id}&readingClinicalDataId=${
row.readingClinicalDataId || ''
}&getClinicalType=${this.clinicalType}&readModuleId=${
row.ReadModuleId
}&IsOnlyGetCRCReadModule=1&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`, }&IsOnlyGetCRCReadModule=1&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`,
}) })
} }
@ -1030,43 +849,31 @@ export default {
var routeData var routeData
if (row) { if (row) {
routeData = this.$router.resolve({ routeData = this.$router.resolve({
path: `/clinicalData?ClinicalDataTrialSetId=${ path: `/clinicalData?ClinicalDataTrialSetId=${row.ClinicalDataTrialSetId
row.ClinicalDataTrialSetId }&subjectId=${this.data.SubjectId}&trialId=${this.data.TrialId
}&subjectId=${this.data.SubjectId}&trialId=${ }&readingId=${this.data.Id}&readingClinicalDataId=${readingClinicalDataId || ''
this.data.TrialId
}&readingId=${this.data.Id}&readingClinicalDataId=${
readingClinicalDataId || ''
}&getClinicalType=${this.clinicalType}&TokenKey=${token}`, }&getClinicalType=${this.clinicalType}&TokenKey=${token}`,
}) })
if (this.type === 'consistencyAnalysis') { if (this.type === 'consistencyAnalysis') {
routeData = this.$router.resolve({ routeData = this.$router.resolve({
path: `/clinicalData?ClinicalDataTrialSetId=${ path: `/clinicalData?ClinicalDataTrialSetId=${row.ClinicalDataTrialSetId
row.ClinicalDataTrialSetId }&subjectId=${this.data.SubjectId}&trialId=${this.data.TrialId
}&subjectId=${this.data.SubjectId}&trialId=${ }&visitTaskId=${this.data.Id}&readingClinicalDataId=${readingClinicalDataId || ''
this.data.TrialId }&getClinicalType=${this.clinicalType
}&visitTaskId=${this.data.Id}&readingClinicalDataId=${
readingClinicalDataId || ''
}&getClinicalType=${
this.clinicalType
}&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`, }&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`,
}) })
} }
} else { } else {
routeData = this.$router.resolve({ routeData = this.$router.resolve({
path: `/clinicalData?subjectId=${this.data.SubjectId}&trialId=${ path: `/clinicalData?subjectId=${this.data.SubjectId}&trialId=${this.data.TrialId
this.data.TrialId }&readingId=${this.data.Id}&readingClinicalDataId=${readingClinicalDataId || ''
}&readingId=${this.data.Id}&readingClinicalDataId=${
readingClinicalDataId || ''
}&getClinicalType=${this.clinicalType}&TokenKey=${token}`, }&getClinicalType=${this.clinicalType}&TokenKey=${token}`,
}) })
if (this.type === 'consistencyAnalysis') { if (this.type === 'consistencyAnalysis') {
routeData = this.$router.resolve({ routeData = this.$router.resolve({
path: `/clinicalData?subjectId=${this.data.SubjectId}&trialId=${ path: `/clinicalData?subjectId=${this.data.SubjectId}&trialId=${this.data.TrialId
this.data.TrialId }&visitTaskId=${this.data.Id}&readingClinicalDataId=${readingClinicalDataId || ''
}&visitTaskId=${this.data.Id}&readingClinicalDataId=${ }&getClinicalType=${this.clinicalType
readingClinicalDataId || ''
}&getClinicalType=${
this.clinicalType
}&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`, }&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`,
}) })
} }
@ -1082,6 +889,7 @@ export default {
.top { .top {
text-align: right; text-align: right;
} }
::v-deep .el-divider--horizontal { ::v-deep .el-divider--horizontal {
margin: 10px; margin: 10px;
} }