PM在阅片期上传临床数据页面调整
continuous-integration/drone/push Build is passing Details

uat
wangxiaoshuang 2025-03-06 14:56:28 +08:00
parent a602be255b
commit 0b688bc33f
1 changed files with 240 additions and 217 deletions

View File

@ -9,14 +9,14 @@
<!--style="margin:0"--> <!--style="margin:0"-->
<h4> <h4>
<!-- 提示 --> <!-- 提示 -->
{{ $t("trials:readingPeriod:cd:title:tips") }} {{ $t('trials:readingPeriod:cd:title:tips') }}
</h4> </h4>
<h5> <h5>
<!-- 当前访视/阅片期需要采集临床数据名称请采集临床数据后按照模板上传并签名确认 --> <!-- 当前访视/阅片期需要采集临床数据名称请采集临床数据后按照模板上传并签名确认 -->
{{ tips1 }} {{ tips1 }}
</h5> </h5>
<h5> <h5>
{{ $t("trials:readingPeriod:cd:title:tips2") }} {{ $t('trials:readingPeriod:cd:title:tips2') }}
</h5> </h5>
</div> </div>
<div class="top"> <div class="top">
@ -28,7 +28,7 @@
:disabled="list.length === 0" :disabled="list.length === 0"
@click="handlePreview()" @click="handlePreview()"
> >
{{ $t("trials:readingPeriod:cd:title:preview") }} {{ $t('trials:readingPeriod:cd:title:preview') }}
</el-button> </el-button>
<!-- 添加 --> <!-- 添加 -->
<el-button <el-button
@ -43,24 +43,22 @@
size="small" size="small"
@click="handleAdd" @click="handleAdd"
> >
{{ $t("common:button:add") }} {{ $t('common:button:add') }}
</el-button> </el-button>
<!--下载模板-->
<el-button <el-button
v-if=" v-if="
otherInfo.IsCanAddClinicalData &&
hasPermi(['trials:trials-panel:subject:readingPeriod:edit']) && hasPermi(['trials:trials-panel:subject:readingPeriod:edit']) &&
clinicalType === '2' && clinicalType === '1' &&
list.length > 0 &&
list[0].ReadingClinicalDataState !== 3 &&
!list[0].IsCRCApplicationRevoke &&
type !== 'consistencyAnalysis' type !== 'consistencyAnalysis'
" "
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-download"
size="small" size="small"
:disabled="list.length === 0" @click="downLoadTemplate"
@click="handleVerification(list[0], 'confirm')"
> >
{{ $t("trials:readingPeriod:cd:title:cdCheck") }} {{ $t('trials:readingPeriod:cd:title:downLoadTemplate') }}
</el-button> </el-button>
<el-button <el-button
v-if=" v-if="
@ -102,7 +100,7 @@
min-width="100" 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>
<!-- 数据级别 --> <!-- 数据级别 -->
@ -112,7 +110,7 @@
min-width="100" 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>
<!-- 传输方式 --> <!-- 传输方式 -->
@ -122,7 +120,7 @@
min-width="120" 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>
<!-- 文件数量 --> <!-- 文件数量 -->
@ -133,7 +131,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.ClinicalUploadType === 0 ? "NA" : scope.row.FileCount scope.row.ClinicalUploadType === 0 ? 'NA' : scope.row.FileCount
}} }}
</template> </template>
</el-table-column> </el-table-column>
@ -149,7 +147,7 @@
type="info" type="info"
>{{ >{{
$fd( $fd(
"ReadingClinicalDataState", 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag
@ -159,7 +157,7 @@
type="danger" type="danger"
>{{ >{{
$fd( $fd(
"ReadingClinicalDataState", 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag
@ -169,7 +167,7 @@
type="primary" type="primary"
>{{ >{{
$fd( $fd(
"ReadingClinicalDataState", 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag
@ -179,7 +177,7 @@
type="warning" type="warning"
>{{ >{{
$fd( $fd(
"ReadingClinicalDataState", 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag
@ -296,10 +294,10 @@
> >
<div slot="title"> <div slot="title">
<span style="font-size: 18px">{{ <span style="font-size: 18px">{{
$t("common:dialogTitle:sign") $t('common:dialogTitle:sign')
}}</span> }}</span>
<span style="font-size: 12px; margin-left: 5px">{{ <span style="font-size: 12px; margin-left: 5px">{{
`(${$t("common:label:sign")}${currentUser})` `(${$t('common:label:sign')}${currentUser})`
}}</span> }}</span>
</div> </div>
<SignForm <SignForm
@ -325,7 +323,7 @@
:disabled="list.length === 0" :disabled="list.length === 0"
@click="handlePreview()" @click="handlePreview()"
> >
{{ $t("trials:readingPeriod:cd:title:preview") }} {{ $t('trials:readingPeriod:cd:title:preview') }}
</el-button> </el-button>
<!-- 添加 --> <!-- 添加 -->
<el-button <el-button
@ -338,7 +336,7 @@
size="small" size="small"
@click="handleAdd" @click="handleAdd"
> >
{{ $t("common:button:add") }} {{ $t('common:button:add') }}
</el-button> </el-button>
</div> </div>
<div class="main"> <div class="main">
@ -361,7 +359,7 @@
show-overflow-tooltip 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>
<!-- 数据级别 --> <!-- 数据级别 -->
@ -370,7 +368,7 @@
:label="$t('trials:readingPeriod:cd:table:dataLevel')" :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>
<!-- 传输方式 --> <!-- 传输方式 -->
@ -379,7 +377,7 @@
:label="$t('trials:readingPeriod:cd:table:transferType')" :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>
<!-- 文件数量 --> <!-- 文件数量 -->
@ -389,7 +387,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.ClinicalUploadType === 0 ? "NA" : scope.row.FileCount scope.row.ClinicalUploadType === 0 ? 'NA' : scope.row.FileCount
}} }}
</template> </template>
</el-table-column> </el-table-column>
@ -405,7 +403,7 @@
type="info" type="info"
>{{ >{{
$fd( $fd(
"ReadingClinicalDataState", 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag
@ -415,7 +413,7 @@
type="danger" type="danger"
>{{ >{{
$fd( $fd(
"ReadingClinicalDataState", 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag
@ -425,7 +423,7 @@
type="primary" type="primary"
>{{ >{{
$fd( $fd(
"ReadingClinicalDataState", 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag
@ -435,7 +433,7 @@
type="warning" type="warning"
>{{ >{{
$fd( $fd(
"ReadingClinicalDataState", 'ReadingClinicalDataState',
scope.row.ReadingClinicalDataState scope.row.ReadingClinicalDataState
) )
}}</el-tag }}</el-tag
@ -550,10 +548,10 @@
> >
<div slot="title"> <div slot="title">
<span style="font-size: 18px">{{ <span style="font-size: 18px">{{
$t("common:dialogTitle:sign") $t('common:dialogTitle:sign')
}}</span> }}</span>
<span style="font-size: 12px; margin-left: 5px">{{ <span style="font-size: 12px; margin-left: 5px">{{
`(${$t("common:label:sign")}${currentUser})` `(${$t('common:label:sign')}${currentUser})`
}}</span> }}</span>
</div> </div>
<SignForm <SignForm
@ -574,35 +572,36 @@ import {
getTrialClinicalDataSelect, getTrialClinicalDataSelect,
getConsistencyAnalysisReadingClinicalDataList, getConsistencyAnalysisReadingClinicalDataList,
signConsistencyAnalysisReadingClinicalData, signConsistencyAnalysisReadingClinicalData,
} from "@/api/trials"; } from '@/api/trials'
import AddOrEditCD from "./AddOrEditCD"; import AddOrEditCD from './AddOrEditCD'
import Verification from "./Verification"; import Verification from './Verification'
import SignForm from "@/views/trials/components/newSignForm"; 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'
export default { export default {
name: "ClinicalData", name: 'ClinicalData',
components: { AddOrEditCD, SignForm, Verification }, components: { AddOrEditCD, SignForm, Verification },
props: { props: {
trialReadingCriterionId: { trialReadingCriterionId: {
type: String, type: String,
default() { default() {
return ""; return ''
}, },
}, },
data: { data: {
type: Object, type: Object,
default() { default() {
return {}; return {}
}, },
}, },
type: { type: {
default: "readingPeriod", default: 'readingPeriod',
}, },
}, },
watch: { watch: {
clinicalType() { clinicalType() {
this.getList(); this.getList()
}, },
}, },
data() { data() {
@ -613,36 +612,63 @@ export default {
list: [], list: [],
total: 0, total: 0,
dialogVisible: false, dialogVisible: false,
addOrUpdateCD: { title: "", visible: false }, addOrUpdateCD: { title: '', visible: false },
verification: { title: "", visible: false }, verification: { title: '', visible: false },
currentData: {}, currentData: {},
currentOption: [], currentOption: [],
signCode: "", signCode: '',
currentUser: zzSessionStorage.getItem("userName"), currentUser: zzSessionStorage.getItem('userName'),
signVisible: false, signVisible: false,
otherInfo: {}, otherInfo: {},
spanArr: [], spanArr: [],
pos: 0, pos: 0,
tips1: null, tips1: null,
}; clinicalDatas: [],
}
}, },
mounted() { mounted() {
if (!(this.data.IsVisit || this.data.IsBaseLine)) { if (!(this.data.IsVisit || this.data.IsBaseLine)) {
// this.clinicalType = this.$d.GetClinicalType[0].value.toString(); // this.clinicalType = this.$d.GetClinicalType[0].value.toString();
this.clinicalType = '1'; this.clinicalType = '1'
} else { } else {
this.getList(true); this.getList(true)
} }
window.addEventListener("message", (res) => { window.addEventListener('message', (res) => {
if (res.data.type === "pmConfirmClinical") { if (res.data.type === 'pmConfirmClinical') {
this.getList(); this.getList()
} }
}); })
}, },
methods: { methods: {
//
async downLoadTemplate() {
try {
let { files, name } = this.formatDownloadFile()
let res = await downLoadFile(files, name, 'zip')
} catch (err) {
console.log(err)
}
},
//
formatDownloadFile() {
let files = [],
name = `${this.$route.query.trialId}_${
this.data.CriterionName
}_template_${new Date().getTime()}.zip`
this.clinicalDatas.forEach((item) => {
if (item.Path) {
let obj = {
name: item.FileName,
url: this.OSSclientConfig.basePath + item.Path,
}
files.push(obj)
}
})
return { files, name }
},
getClinicalDatas() { getClinicalDatas() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let message = ""; let message = ''
let currentData = Object.assign( let currentData = Object.assign(
{}, {},
{ {
@ -652,113 +678,114 @@ export default {
SubjectId: this.data.SubjectId, SubjectId: this.data.SubjectId,
IsBaseLine: this.data.IsBaseLine, IsBaseLine: this.data.IsBaseLine,
} }
); )
var param = { var param = {
trialId: currentData.TrialId, trialId: currentData.TrialId,
IsVisit: currentData.IsVisit, IsVisit: currentData.IsVisit,
ReadingId: currentData.ReadingId, ReadingId: currentData.ReadingId,
SubjectId: currentData.SubjectId, SubjectId: currentData.SubjectId,
ReadingClinicalDataId: currentData.Id ? currentData.Id : "", ReadingClinicalDataId: currentData.Id ? currentData.Id : '',
IsBaseLine: currentData.IsBaseLine, IsBaseLine: currentData.IsBaseLine,
TrialReadingCriterionId: this.trialReadingCriterionId, TrialReadingCriterionId: this.trialReadingCriterionId,
}; }
getTrialClinicalDataSelect(param) getTrialClinicalDataSelect(param)
.then((res) => { .then((res) => {
this.clinicalDatas = res.Result
res.Result.forEach((item, index) => { res.Result.forEach((item, index) => {
if (index < 1) { if (index < 1) {
message += item.ClinicalDataSetName; message += item.ClinicalDataSetName
} else { } else {
message = message + "、" + item.ClinicalDataSetName; message = message + '、' + item.ClinicalDataSetName
} }
}); })
resolve(message); resolve(message)
}) })
.catch(() => { .catch(() => {
reject(); reject()
}); })
}); })
}, },
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 6 && row.IsNeedMerge) { if (columnIndex === 6 && row.IsNeedMerge) {
const _row = this.spanArr[rowIndex]; const _row = this.spanArr[rowIndex]
const _col = _row > 0 ? 1 : 0; const _col = _row > 0 ? 1 : 0
return { return {
rowspan: _row, rowspan: _row,
colspan: _col, colspan: _col,
}; }
} }
}, },
getSpanArr(data) { getSpanArr(data) {
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (i === 0) { if (i === 0) {
this.spanArr.push(1); this.spanArr.push(1)
this.pos = 0; this.pos = 0
} else { } else {
// //
if (data[i].IsNeedMerge === data[i - 1].IsNeedMerge) { if (data[i].IsNeedMerge === data[i - 1].IsNeedMerge) {
this.spanArr[this.pos] += 1; this.spanArr[this.pos] += 1
this.spanArr.push(0); this.spanArr.push(0)
} else { } else {
this.spanArr.push(1); this.spanArr.push(1)
this.pos = i; this.pos = i
} }
} }
} }
}, },
getList(is) { getList(is) {
this.loading = true; this.loading = true
if (this.type === "consistencyAnalysis") { if (this.type === 'consistencyAnalysis') {
let data = { let data = {
SubjectId: this.data.SubjectId, SubjectId: this.data.SubjectId,
VisitTaskId: this.data.Id, VisitTaskId: this.data.Id,
TrialId: this.$route.query.trialId, TrialId: this.$route.query.trialId,
}; }
return getConsistencyAnalysisReadingClinicalDataList(data) return getConsistencyAnalysisReadingClinicalDataList(data)
.then((res) => { .then((res) => {
this.list = res.Result; this.list = res.Result
this.otherInfo = res.OtherInfo; this.otherInfo = res.OtherInfo
this.loading = false; this.loading = false
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false
}); })
} }
this.searchData.ReadingId = this.data.Id; this.searchData.ReadingId = this.data.Id
this.searchData.SubjectId = this.data.SubjectId; this.searchData.SubjectId = this.data.SubjectId
this.searchData.IsVisit = this.data.IsVisit; this.searchData.IsVisit = this.data.IsVisit
this.searchData.TrialId = this.data.TrialId; this.searchData.TrialId = this.data.TrialId
this.searchData.IsBaseLine = this.data.IsBaseLine; this.searchData.IsBaseLine = this.data.IsBaseLine
this.searchData.TrialReadingCriterionId = this.trialReadingCriterionId; this.searchData.TrialReadingCriterionId = this.trialReadingCriterionId
if (!is) { if (!is) {
this.searchData.GetClinicalType = this.clinicalType; this.searchData.GetClinicalType = this.clinicalType
} }
getReadingClinicalDataList(this.searchData) getReadingClinicalDataList(this.searchData)
.then(async (res) => { .then(async (res) => {
this.list = res.Result; this.list = res.Result
let message = ""; let message = ''
this.list.forEach((item, index) => { this.list.forEach((item, index) => {
if (index < 1) { if (index < 1) {
message += item.ClinicalDataSetName; message += item.ClinicalDataSetName
} else { } else {
message = message + "、" + item.ClinicalDataSetName; message = message + '、' + item.ClinicalDataSetName
} }
}); })
if (message === "" || !message) { if (message === '' || !message) {
message = await this.getClinicalDatas(); message = await this.getClinicalDatas()
} }
this.tips1 = this.$t("trials:readingPeriod:cd:title:tips1").replace( this.tips1 = this.$t('trials:readingPeriod:cd:title:tips1').replace(
"临床数据名称", '临床数据名称',
message message
); )
this.tips1 = this.tips1.replace("xxx", message); this.tips1 = this.tips1.replace('xxx', message)
this.pos = 0; this.pos = 0
this.getSpanArr(this.list); this.getSpanArr(this.list)
this.otherInfo = res.OtherInfo; this.otherInfo = res.OtherInfo
this.loading = false; this.loading = false
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false
}); })
}, },
handleAdd() { handleAdd() {
this.currentData = Object.assign( this.currentData = Object.assign(
@ -770,136 +797,136 @@ export default {
SubjectId: this.data.SubjectId, SubjectId: this.data.SubjectId,
IsBaseLine: this.data.IsBaseLine, IsBaseLine: this.data.IsBaseLine,
} }
); )
this.addOrUpdateCD.title = this.$t("common:button:new"); this.addOrUpdateCD.title = this.$t('common:button:new')
this.addOrUpdateCD.visible = true; this.addOrUpdateCD.visible = true
}, },
handleEdit(row) { handleEdit(row) {
this.currentData = { ...row }; this.currentData = { ...row }
this.currentData.TrialId = this.data.TrialId; this.currentData.TrialId = this.data.TrialId
this.currentData.SubjectId = this.data.SubjectId; this.currentData.SubjectId = this.data.SubjectId
if (this.type === "readingPeriod") { if (this.type === 'readingPeriod') {
this.currentData.ReadingId = this.data.Id; this.currentData.ReadingId = this.data.Id
} }
this.currentData.IsVisit = this.data.IsVisit; this.currentData.IsVisit = this.data.IsVisit
this.currentData.IsBaseLine = this.data.IsBaseLine; this.currentData.IsBaseLine = this.data.IsBaseLine
this.addOrUpdateCD.title = this.$t("common:button:edit"); this.addOrUpdateCD.title = this.$t('common:button:edit')
this.currentOption = [ this.currentOption = [
{ {
ClinicalDataSetName: ClinicalDataSetName:
this.$i18n.locale === "zh" this.$i18n.locale === 'zh'
? row.ClinicalDataSetName ? row.ClinicalDataSetName
: row.ClinicalDataSetEnName, : row.ClinicalDataSetEnName,
Id: row.ClinicalDataTrialSetId, Id: row.ClinicalDataTrialSetId,
}, },
]; ]
this.addOrUpdateCD.visible = true; this.addOrUpdateCD.visible = true
}, },
handleVerification(row, type) { handleVerification(row, type) {
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=${ }&subjectId=${this.data.SubjectId}&trialId=${
this.data.TrialId this.data.TrialId
}&readingId=${this.data.Id}&readingClinicalDataId=${ }&readingId=${this.data.Id}&readingClinicalDataId=${
row.readingClinicalDataId || "" row.readingClinicalDataId || ''
}&readModuleId=${row.ReadModuleId}&getClinicalType=${ }&readModuleId=${row.ReadModuleId}&getClinicalType=${
this.clinicalType 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=${ }&subjectId=${this.data.SubjectId}&trialId=${
this.data.TrialId this.data.TrialId
}&visitTaskId=${this.data.Id}&readingClinicalDataId=${ }&visitTaskId=${this.data.Id}&readingClinicalDataId=${
row.readingClinicalDataId || "" row.readingClinicalDataId || ''
}&readModuleId=${row.ReadModuleId}&getClinicalType=${ }&readModuleId=${row.ReadModuleId}&getClinicalType=${
this.clinicalType this.clinicalType
}&isConfirm=1&IsOnlyGetCRCReadModule=1&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`, }&isConfirm=1&IsOnlyGetCRCReadModule=1&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`,
}); })
} }
window.open(routeData.href, "_blank"); window.open(routeData.href, '_blank')
return; return
} }
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=${ }&subjectId=${this.data.SubjectId}&trialId=${
this.data.TrialId this.data.TrialId
}&readingId=${this.data.Id}&readingClinicalDataId=${ }&readingId=${this.data.Id}&readingClinicalDataId=${
row.readingClinicalDataId || "" row.readingClinicalDataId || ''
}&readModuleId=${row.ReadModuleId}&getClinicalType=${ }&readModuleId=${row.ReadModuleId}&getClinicalType=${
this.clinicalType 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=${ }&subjectId=${this.data.SubjectId}&trialId=${
this.data.TrialId this.data.TrialId
}&visitTaskId=${this.data.Id}&readingClinicalDataId=${ }&visitTaskId=${this.data.Id}&readingClinicalDataId=${
row.readingClinicalDataId || "" row.readingClinicalDataId || ''
}&readModuleId=${row.ReadModuleId}&getClinicalType=${ }&readModuleId=${row.ReadModuleId}&getClinicalType=${
this.clinicalType this.clinicalType
}&isConfirm=1&IsOnlyGetCRCReadModule=1&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`, }&isConfirm=1&IsOnlyGetCRCReadModule=1&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`,
}); })
} }
window.open(routeData.href, "_blank"); window.open(routeData.href, '_blank')
} else { } else {
this.currentData = { ...row }; this.currentData = { ...row }
this.currentData.TrialId = this.data.TrialId; this.currentData.TrialId = this.data.TrialId
this.currentData.SubjectId = this.data.SubjectId; this.currentData.SubjectId = this.data.SubjectId
if (this.type === "readingPeriod") { if (this.type === 'readingPeriod') {
this.currentData.ReadingId = this.data.Id; this.currentData.ReadingId = this.data.Id
} }
this.currentData.IsVisit = this.data.IsVisit; this.currentData.IsVisit = this.data.IsVisit
this.currentData.IsBaseLine = this.data.IsBaseLine; this.currentData.IsBaseLine = this.data.IsBaseLine
this.verification.title = this.$t( this.verification.title = this.$t(
"trials:readingPeriod:cd:title:cdCheck" 'trials:readingPeriod:cd:title:cdCheck'
); // '' ) // ''
this.verification.visible = true; this.verification.visible = true
} }
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm(this.$t("trials:readingPeriod:cd:message:delete"), { this.$confirm(this.$t('trials:readingPeriod:cd:message:delete'), {
type: "warning", type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}) })
.then(() => { .then(() => {
this.loading = true; this.loading = true
deleteReadingClinicalData(row.Id) deleteReadingClinicalData(row.Id)
.then((res) => { .then((res) => {
this.loading = false; this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.getList(); this.getList()
this.$message.success( this.$message.success(
this.$t("common:message:deletedSuccessfully") this.$t('common:message:deletedSuccessfully')
); )
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false
}); })
}) })
.catch(() => {}); .catch(() => {})
}, },
handleSign(from) { handleSign(from) {
// this.currentData = { ...row } // this.currentData = { ...row }
this.currentData.IsBlind = from.IsBlind; this.currentData.IsBlind = from.IsBlind
this.currentData.IsComplete = from.IsComplete; this.currentData.IsComplete = from.IsComplete
const { CDQualityConfirmation } = const_.processSignature; const { CDQualityConfirmation } = const_.processSignature
this.signCode = CDQualityConfirmation; this.signCode = CDQualityConfirmation
this.signVisible = true; this.signVisible = true
}, },
signConfirm(signInfo) { signConfirm(signInfo) {
this.loading = true; this.loading = true
let params = { let params = {
data: { data: {
readingClinicalDataId: this.currentData.Id, readingClinicalDataId: this.currentData.Id,
@ -908,8 +935,8 @@ export default {
TrialReadingCriterionId: this.trialReadingCriterionId, TrialReadingCriterionId: this.trialReadingCriterionId,
}, },
signInfo: signInfo, signInfo: signInfo,
}; }
if (this.type === "consistencyAnalysis") { if (this.type === 'consistencyAnalysis') {
params = { params = {
data: { data: {
consistentClinicalDataId: this.currentData.Id, consistentClinicalDataId: this.currentData.Id,
@ -917,94 +944,90 @@ export default {
IsComplete: this.currentData.IsComplete, IsComplete: this.currentData.IsComplete,
}, },
signInfo: signInfo, signInfo: signInfo,
}; }
signConsistencyAnalysisReadingClinicalData(params) signConsistencyAnalysisReadingClinicalData(params)
.then((res) => { .then((res) => {
this.loading = false; this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message.success( this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$t("common:message:savedSuccessfully") this.$refs['signForm'].btnLoading = false
);
this.$refs["signForm"].btnLoading = false;
this.signVisible = false; this.signVisible = false
this.getList(); this.getList()
this.$emit("getList"); this.$emit('getList')
this.$nextTick(() => { this.$nextTick(() => {
this.verification.visible = false; this.verification.visible = false
}); })
} }
}) })
.catch((_) => { .catch((_) => {
this.loading = false; this.loading = false
this.$refs["signForm"].btnLoading = false; this.$refs['signForm'].btnLoading = false
}); })
} else { } else {
ReadClinicalDataSign(params) ReadClinicalDataSign(params)
.then((res) => { .then((res) => {
this.loading = false; this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message.success( this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$t("common:message:savedSuccessfully") this.$refs['signForm'].btnLoading = false
);
this.$refs["signForm"].btnLoading = false;
this.signVisible = false; this.signVisible = false
this.getList(); this.getList()
this.$emit("getList"); this.$emit('getList')
this.$nextTick(() => { this.$nextTick(() => {
this.verification.visible = false; this.verification.visible = false
}); })
} }
}) })
.catch((_) => { .catch((_) => {
this.loading = false; this.loading = false
this.$refs["signForm"].btnLoading = false; this.$refs['signForm'].btnLoading = false
}); })
} }
}, },
// //
closeSignDialog(isSign, signInfo) { closeSignDialog(isSign, signInfo) {
if (isSign) { if (isSign) {
this.signConfirm(signInfo); this.signConfirm(signInfo)
} else { } else {
this.signVisible = false; this.signVisible = false
this.loading = false; this.loading = false
} }
}, },
handlePreview(readingClinicalDataId, row) { handlePreview(readingClinicalDataId, row) {
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=${ }&subjectId=${this.data.SubjectId}&trialId=${
this.data.TrialId this.data.TrialId
}&readingId=${this.data.Id}&readingClinicalDataId=${ }&readingId=${this.data.Id}&readingClinicalDataId=${
row.readingClinicalDataId || "" row.readingClinicalDataId || ''
}&getClinicalType=${this.clinicalType}&readModuleId=${ }&getClinicalType=${this.clinicalType}&readModuleId=${
row.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=${ }&subjectId=${this.data.SubjectId}&trialId=${
this.data.TrialId this.data.TrialId
}&visitTaskId=${this.data.Id}&readingClinicalDataId=${ }&visitTaskId=${this.data.Id}&readingClinicalDataId=${
row.readingClinicalDataId || "" row.readingClinicalDataId || ''
}&getClinicalType=${this.clinicalType}&readModuleId=${ }&getClinicalType=${this.clinicalType}&readModuleId=${
row.ReadModuleId row.ReadModuleId
}&IsOnlyGetCRCReadModule=1&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`, }&IsOnlyGetCRCReadModule=1&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`,
}); })
} }
window.open(routeData.href, "_blank"); window.open(routeData.href, '_blank')
} else { } else {
var token = getToken(); var token = getToken()
var routeData; var routeData
if (row) { if (row) {
routeData = this.$router.resolve({ routeData = this.$router.resolve({
path: `/clinicalData?ClinicalDataTrialSetId=${ path: `/clinicalData?ClinicalDataTrialSetId=${
@ -1012,47 +1035,47 @@ export default {
}&subjectId=${this.data.SubjectId}&trialId=${ }&subjectId=${this.data.SubjectId}&trialId=${
this.data.TrialId this.data.TrialId
}&readingId=${this.data.Id}&readingClinicalDataId=${ }&readingId=${this.data.Id}&readingClinicalDataId=${
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=${ }&subjectId=${this.data.SubjectId}&trialId=${
this.data.TrialId this.data.TrialId
}&visitTaskId=${this.data.Id}&readingClinicalDataId=${ }&visitTaskId=${this.data.Id}&readingClinicalDataId=${
readingClinicalDataId || "" readingClinicalDataId || ''
}&getClinicalType=${ }&getClinicalType=${
this.clinicalType 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=${ }&readingId=${this.data.Id}&readingClinicalDataId=${
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=${ }&visitTaskId=${this.data.Id}&readingClinicalDataId=${
readingClinicalDataId || "" readingClinicalDataId || ''
}&getClinicalType=${ }&getClinicalType=${
this.clinicalType this.clinicalType
}&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`, }&TokenKey=${token}&&isGetAllConsistencyAnalysis=${0}`,
}); })
} }
} }
window.open(routeData.href, "_blank"); window.open(routeData.href, '_blank')
} }
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.clinical-data_content { .clinical-data_content {