临床数据上传流程优化

uat_us
wangxiaoshuang 2024-06-28 15:07:57 +08:00
parent 3ab5c46455
commit a53fc5478b
1 changed files with 411 additions and 208 deletions

View File

@ -4,21 +4,27 @@
<el-tab-pane <el-tab-pane
v-for="cd in clinicalDatas" v-for="cd in clinicalDatas"
:key="cd.ClinicalDataTrialSetId" :key="cd.ClinicalDataTrialSetId"
:label="$i18n.locale === 'zh' ? cd.ClinicalDataSetName : cd.ClinicalDataSetEnName" :label="
$i18n.locale === 'zh'
? cd.ClinicalDataSetName
: cd.ClinicalDataSetEnName
"
> >
<!-- 格式化录入 --> <!-- 格式化录入 -->
<div v-if="cd.ClinicalUploadType === 0"> <div v-if="cd.ClinicalUploadType === 0">
<!-- 既往放疗史 --> <!-- 既往放疗史 -->
<h4>{{ $t('trials:uploadClinicalData:title:pastTreatment') }}</h4> <h4>{{ $t("trials:uploadClinicalData:title:pastTreatment") }}</h4>
<div v-if="(allowAddOrEdit)" style="text-align:right"> <div v-if="allowAddOrEdit" style="text-align: right">
<!-- 新增 --> <!-- 新增 -->
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
size="small" size="small"
@click.native.prevent="addPreviousHistory(cd.ClinicalDataTrialSetId)" @click.native.prevent="
addPreviousHistory(cd.ClinicalDataTrialSetId)
"
> >
{{ $t('common:button:new') }} {{ $t("common:button:new") }}
</el-button> </el-button>
</div> </div>
@ -26,10 +32,7 @@
:data="cd.ClinicalTableData.PreviousHistoryList" :data="cd.ClinicalTableData.PreviousHistoryList"
style="width: 100%" style="width: 100%"
> >
<el-table-column <el-table-column type="index" width="50" />
type="index"
width="50"
/>
<!-- 放疗部位 --> <!-- 放疗部位 -->
<el-table-column <el-table-column
prop="Position" prop="Position"
@ -41,7 +44,11 @@
:label="$t('trials:uploadClinicalData:table:beginDate')" :label="$t('trials:uploadClinicalData:table:beginDate')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.StartTime?moment(scope.row.StartTime).format('YYYY-MM-DD'):'' }} {{
scope.row.StartTime
? moment(scope.row.StartTime).format("YYYY-MM-DD")
: ""
}}
</template> </template>
</el-table-column> </el-table-column>
<!-- 结束日期 --> <!-- 结束日期 -->
@ -50,7 +57,11 @@
:label="$t('trials:uploadClinicalData:table:endDate')" :label="$t('trials:uploadClinicalData:table:endDate')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.EndTime?moment(scope.row.EndTime).format('YYYY-MM-DD'):'' }} {{
scope.row.EndTime
? moment(scope.row.EndTime).format("YYYY-MM-DD")
: ""
}}
</template> </template>
</el-table-column> </el-table-column>
<!-- 病灶是否PD --> <!-- 病灶是否PD -->
@ -59,7 +70,7 @@
:label="$t('trials:uploadClinicalData:table:isPD')" :label="$t('trials:uploadClinicalData:table:isPD')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('IsPdEnum', scope.row.IsPD) }} {{ $fd("IsPdEnum", scope.row.IsPD) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -70,16 +81,19 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 编辑 --> <!-- 编辑 -->
<el-button <el-button
v-if="( allowAddOrEdit)" v-if="allowAddOrEdit"
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
circle circle
:title="$t('common:button:edit')" :title="$t('common:button:edit')"
size="small" size="small"
@click.native.prevent="editRow(scope.row,1)" @click.native.prevent="editRow(scope.row, 1)"
/> />
<!-- 移除 --> <!-- 移除 -->
<el-button <el-button
v-if="(data.SubmitState*1 < 2 || (data.SubmitState === 2 && data.IsQCConfirmedReupload))" v-if="
data.SubmitState * 1 < 2 ||
(data.SubmitState === 2 && data.IsQCConfirmedReupload)
"
icon="el-icon-delete" icon="el-icon-delete"
circle circle
:title="$t('common:button:delete')" :title="$t('common:button:delete')"
@ -90,25 +104,22 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 既往手术史 --> <!-- 既往手术史 -->
<h4>{{ $t('trials:uploadClinicalData:title:pastSurgery') }}</h4> <h4>{{ $t("trials:uploadClinicalData:title:pastSurgery") }}</h4>
<div v-if="( allowAddOrEdit)" style="text-align:right"> <div v-if="allowAddOrEdit" style="text-align: right">
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
size="small" size="small"
@click="addPreviousSurgery(cd.ClinicalDataTrialSetId)" @click="addPreviousSurgery(cd.ClinicalDataTrialSetId)"
> >
{{ $t('common:button:new') }} {{ $t("common:button:new") }}
</el-button> </el-button>
</div> </div>
<el-table <el-table
:data="cd.ClinicalTableData.PreviousSurgeryList" :data="cd.ClinicalTableData.PreviousSurgeryList"
style="width: 100%" style="width: 100%"
> >
<el-table-column <el-table-column type="index" width="50" />
type="index"
width="50"
/>
<!-- 手术名称 --> <!-- 手术名称 -->
<el-table-column <el-table-column
prop="OperationName" prop="OperationName"
@ -120,7 +131,11 @@
:label="$t('trials:uploadClinicalData:table:surgeryDate')" :label="$t('trials:uploadClinicalData:table:surgeryDate')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.OperationTime?moment(scope.row.OperationTime).format('YYYY-MM-DD'):'' }} {{
scope.row.OperationTime
? moment(scope.row.OperationTime).format("YYYY-MM-DD")
: ""
}}
</template> </template>
</el-table-column> </el-table-column>
@ -132,7 +147,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 编辑 --> <!-- 编辑 -->
<el-button <el-button
v-if="(allowAddOrEdit)" v-if="allowAddOrEdit"
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
circle circle
:title="$t('common:button:edit')" :title="$t('common:button:edit')"
@ -141,7 +156,10 @@
/> />
<!-- 移除 --> <!-- 移除 -->
<el-button <el-button
v-if="data.SubmitState*1 < 2 || (data.SubmitState === 2 && data.IsQCConfirmedReupload)" v-if="
data.SubmitState * 1 < 2 ||
(data.SubmitState === 2 && data.IsQCConfirmedReupload)
"
icon="el-icon-delete" icon="el-icon-delete"
circle circle
:title="$t('common:button:delete')" :title="$t('common:button:delete')"
@ -152,8 +170,8 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 既往其他治疗史 --> <!-- 既往其他治疗史 -->
<h4>{{ $t('trials:uploadClinicalData:title:others') }}</h4> <h4>{{ $t("trials:uploadClinicalData:title:others") }}</h4>
<div v-if="(allowAddOrEdit)" style="text-align:right"> <div v-if="allowAddOrEdit" style="text-align: right">
<!-- 新增 --> <!-- 新增 -->
<el-button <el-button
type="primary" type="primary"
@ -161,17 +179,14 @@
size="small" size="small"
@click="addPreviousOther(cd.ClinicalDataTrialSetId)" @click="addPreviousOther(cd.ClinicalDataTrialSetId)"
> >
{{ $t('common:button:new') }} {{ $t("common:button:new") }}
</el-button> </el-button>
</div> </div>
<el-table <el-table
:data="cd.ClinicalTableData.PreviousOtherList" :data="cd.ClinicalTableData.PreviousOtherList"
style="width: 100%" style="width: 100%"
> >
<el-table-column <el-table-column type="index" width="50" />
type="index"
width="50"
/>
<!-- 治疗类型 --> <!-- 治疗类型 -->
<el-table-column <el-table-column
prop="TreatmentType" prop="TreatmentType"
@ -183,7 +198,11 @@
:label="$t('trials:uploadClinicalData:table:treatmentbeginDate')" :label="$t('trials:uploadClinicalData:table:treatmentbeginDate')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.StartTime?moment(scope.row.StartTime).format('YYYY-MM-DD'):'' }} {{
scope.row.StartTime
? moment(scope.row.StartTime).format("YYYY-MM-DD")
: ""
}}
</template> </template>
</el-table-column> </el-table-column>
<!-- 结束日期 --> <!-- 结束日期 -->
@ -192,7 +211,11 @@
:label="$t('trials:uploadClinicalData:table:treatmentendDate')" :label="$t('trials:uploadClinicalData:table:treatmentendDate')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.EndTime?moment(scope.row.EndTime).format('YYYY-MM-DD'):'' }} {{
scope.row.EndTime
? moment(scope.row.EndTime).format("YYYY-MM-DD")
: ""
}}
</template> </template>
</el-table-column> </el-table-column>
@ -204,7 +227,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 编辑 --> <!-- 编辑 -->
<el-button <el-button
v-if="( allowAddOrEdit)" v-if="allowAddOrEdit"
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
circle circle
:title="$t('common:button:edit')" :title="$t('common:button:edit')"
@ -213,7 +236,10 @@
/> />
<!-- 移除 --> <!-- 移除 -->
<el-button <el-button
v-if="(data.SubmitState*1 < 2 || (data.SubmitState === 2 && data.IsQCConfirmedReupload))" v-if="
data.SubmitState * 1 < 2 ||
(data.SubmitState === 2 && data.IsQCConfirmedReupload)
"
icon="el-icon-delete" icon="el-icon-delete"
circle circle
:title="$t('common:button:delete')" :title="$t('common:button:delete')"
@ -226,7 +252,7 @@
</div> </div>
<!-- PDF录入 --> <!-- PDF录入 -->
<div v-if="cd.ClinicalUploadType === 1"> <div v-if="cd.ClinicalUploadType === 1">
<div v-if="(allowAddOrEdit)" style="text-align:right"> <div v-if="allowAddOrEdit" style="text-align: right">
<!-- 下载模板 --> <!-- 下载模板 -->
<el-button <el-button
v-if="cd.Path" v-if="cd.Path"
@ -236,26 +262,50 @@
:loading="downloadLoading" :loading="downloadLoading"
@click.native.prevent="handleDownloadTpl(cd)" @click.native.prevent="handleDownloadTpl(cd)"
> >
{{ $t('trials:uploadClinicalData:button:downloadTemplate') }} {{ $t("trials:uploadClinicalData:button:downloadTemplate") }}
</el-button> </el-button>
<!-- 新增 --> <div
<el-button id="directoryInputWrapper"
icon="el-icon-plus" class="btn btn-link"
type="primary" style="
size="small" position: relative;
@click.native.prevent="addFile(cd.Id,cd.ClinicalDataTrialSetId)" overflow: hidden;
display: inline-block;
"
> >
{{ $t('common:button:new') }} <!-- 新增 -->
</el-button> <el-button
icon="el-icon-plus"
type="primary"
size="small"
:disabled="btnLoading"
:loading="btnLoading"
>
{{ $t("common:button:new") }}
</el-button>
<input
type="file"
name="file"
multiple
style="
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
"
:accept="faccept.join(',')"
@change="
($event) =>
beginScanFiles($event, cd.Id, cd.ClinicalDataTrialSetId)
"
/>
</div>
</div> </div>
<el-table <el-table :data="cd.PDFFileList" style="width: 100%">
:data="cd.PDFFileList" <el-table-column type="index" width="50" />
style="width: 100%"
>
<el-table-column
type="index"
width="50"
/>
<!-- 文件名称 --> <!-- 文件名称 -->
<el-table-column <el-table-column
prop="FileName" prop="FileName"
@ -268,10 +318,7 @@
:label="$t('trials:uploadClinicalData:table:uploadedTime')" :label="$t('trials:uploadClinicalData:table:uploadedTime')"
width="200" width="200"
/> />
<el-table-column <el-table-column :label="$t('common:action:action')" width="200">
:label="$t('common:action:action')"
width="200"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 预览 --> <!-- 预览 -->
<el-button <el-button
@ -283,7 +330,7 @@
/> />
<!-- 移除 --> <!-- 移除 -->
<el-button <el-button
v-if="(allowAddOrEdit)" v-if="allowAddOrEdit"
icon="el-icon-delete" icon="el-icon-delete"
circle circle
:title="$t('common:button:delete')" :title="$t('common:button:delete')"
@ -333,7 +380,13 @@
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<PreviousRadiotherapy v-if="prVisible" :data="currentRow" :subject-visit-id="subjectVisitId" @closePRDialog="closePRDialog" @refresh="refresh" /> <PreviousRadiotherapy
v-if="prVisible"
:data="currentRow"
:subject-visit-id="subjectVisitId"
@closePRDialog="closePRDialog"
@refresh="refresh"
/>
</el-dialog> </el-dialog>
<!-- 既往手术史 --> <!-- 既往手术史 -->
<el-dialog <el-dialog
@ -345,7 +398,14 @@
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<PreviousSurgery v-if="psVisible" :data="currentRow" :parent-data="data" :subject-visit-id="subjectVisitId" @closePSDialog="closePSDialog" @refresh="refresh" /> <PreviousSurgery
v-if="psVisible"
:data="currentRow"
:parent-data="data"
:subject-visit-id="subjectVisitId"
@closePSDialog="closePSDialog"
@refresh="refresh"
/>
</el-dialog> </el-dialog>
<!-- 既往其他治疗史 --> <!-- 既往其他治疗史 -->
<el-dialog <el-dialog
@ -357,7 +417,14 @@
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<PreviousOther v-if="poVisible" :data="currentRow" :parent-data="data" :subject-visit-id="subjectVisitId" @closePODialog="closePODialog" @refresh="refresh" /> <PreviousOther
v-if="poVisible"
:data="currentRow"
:parent-data="data"
:subject-visit-id="subjectVisitId"
@closePODialog="closePODialog"
@refresh="refresh"
/>
</el-dialog> </el-dialog>
<!-- 上传文件 --> <!-- 上传文件 -->
<el-dialog <el-dialog
@ -369,7 +436,14 @@
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<PreviousFiles v-if="upVisible" :data="currentRow" :parent-data="data" :subject-visit-id="subjectVisitId" @closeUpDialog="closeUpDialog" @refresh="refresh" /> <PreviousFiles
v-if="upVisible"
:data="currentRow"
:parent-data="data"
:subject-visit-id="subjectVisitId"
@closeUpDialog="closeUpDialog"
@refresh="refresh"
/>
</el-dialog> </el-dialog>
<!-- 预览文件 --> <!-- 预览文件 -->
<el-dialog <el-dialog
@ -380,57 +454,79 @@
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<div class="base-modal-body" style="border:2px solid #ccc;padding: 10px"> <div
<PreviewFile v-if="previewObj.visible" :file-path="previewObj.filePath" :file-type="previewObj.fileType" /> class="base-modal-body"
style="border: 2px solid #ccc; padding: 10px"
>
<PreviewFile
v-if="previewObj.visible"
:file-path="previewObj.filePath"
:file-type="previewObj.fileType"
/>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { deleteReadingClinicalDataPDF, deletePreviousHistory, deletePreviousOther, deletePreviousSurgery, import {
DownloadTrialClinicalFile } from '@/api/trials' deleteReadingClinicalDataPDF,
import { getCRCClinicalData } from '@/api/trials' deletePreviousHistory,
import PreviousRadiotherapy from './previousRadiotherapy' deletePreviousOther,
import PreviousSurgery from './previousSurgery' deletePreviousSurgery,
import PreviousOther from './previousOther' DownloadTrialClinicalFile,
import PreviousFiles from './previousFiles' addOrUpdateReadingClinicalData,
import clinicalDataQuestions from '@/components/clinicalDataQuestions' getCRCClinicalData,
import PreviewFile from '@/components/PreviewFile/index' } from "@/api/trials";
import moment from 'moment' import PreviousRadiotherapy from "./previousRadiotherapy";
import PreviousSurgery from "./previousSurgery";
import PreviousOther from "./previousOther";
import PreviousFiles from "./previousFiles";
import clinicalDataQuestions from "@/components/clinicalDataQuestions";
import PreviewFile from "@/components/PreviewFile/index";
import moment from "moment";
export default { export default {
name: 'ClinicalData', name: "ClinicalData",
components: { PreviousRadiotherapy, PreviousSurgery, PreviousOther, PreviousFiles, clinicalDataQuestions,PreviewFile }, components: {
PreviousRadiotherapy,
PreviousSurgery,
PreviousOther,
PreviousFiles,
clinicalDataQuestions,
PreviewFile,
},
props: { props: {
data: { data: {
type: Object, type: Object,
default() { default() {
return {} return {};
} },
}, },
subjectVisitId: { subjectVisitId: {
type: String, type: String,
required: true required: true,
}, },
enumType: { enumType: {
type: Number, type: Number,
default: 0 default: 0,
}, },
allowAddOrEdit: { allowAddOrEdit: {
type: Boolean, type: Boolean,
default: false default: false,
} },
}, },
data() { data() {
return { return {
faccept: [".pdf"],
isShow: false, isShow: false,
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1, userTypeEnumInt: zzSessionStorage.getItem("userTypeEnumInt") * 1,
loading: false, loading: false,
PreviousHistoryList: [], PreviousHistoryList: [],
PreviousSurgeryList: [], PreviousSurgeryList: [],
PreviousOtherList: [], PreviousOtherList: [],
PreviousPDFList: [], PreviousPDFList: [],
fileList: [], fileList: [],
addFileList: [],
btnLoading: false,
currentRow: {}, currentRow: {},
prVisible: false, prVisible: false,
psVisible: false, psVisible: false,
@ -440,186 +536,293 @@ export default {
moment, moment,
downloadLoading: false, downloadLoading: false,
clinicalDatas: [], clinicalDatas: [],
previewObj:{visible:false,filePath:'',fileType:''} previewObj: { visible: false, filePath: "", fileType: "" },
} };
}, },
mounted() { mounted() {
this.getClinicalData() this.getClinicalData();
}, },
methods: { methods: {
beginScanFiles(e, id, clinicalDataTrialSetId) {
this.currentRow = {
Id: id,
ClinicalDataTrialSetId: clinicalDataTrialSetId,
SubjectId: this.data.SubjectId,
};
this.currentRow.TrialId = this.$route.query.trialId;
var files = e.target.files;
for (var i = 0; i < files.length; ++i) {
const fileName = files[i].name;
var extendName = fileName
.substring(fileName.lastIndexOf("."))
.toLocaleLowerCase();
if (this.faccept.indexOf(extendName) !== -1) {
this.fileList.push(files[i]);
}
}
this.handleUploadFile();
},
async handleUploadFile() {
this.btnLoading = true;
this.loading = true;
this.addFileList = [];
try {
for (var i = 0; i < this.fileList.length; ++i) {
const file = await this.fileToBlob(this.fileList[i]);
var timestamp = Date.now();
const res = await this.OSSclient.put(
`/${this.trialId}/ClinicalData/${timestamp}_${this.fileList[i].name}`,
file
);
this.addFileList.push({
fileName: this.fileList[i].name,
path: this.$getObjectName(res.url),
url: this.$getObjectName(res.url),
});
}
this.saveClinicalData();
} catch (err) {
console.log(err);
this.btnLoading = false;
this.loading = false;
}
},
saveClinicalData() {
this.btnLoading = true;
this.loading = true;
var param = {
id: this.currentRow.Id,
trialId: this.currentRow.TrialId,
subjectId: this.currentRow.SubjectId,
readingId: this.subjectVisitId,
clinicalDataTrialSetId: this.currentRow.ClinicalDataTrialSetId,
isVisit: true,
deleteFileIds: [],
addFileList: this.addFileList,
};
// if (this.studyData.StudyId) {
// param.StudyId = this.studyData.StudyId;
// }
addOrUpdateReadingClinicalData(param)
.then((response) => {
this.btnLoading = false;
this.loading = false;
//
this.getClinicalData();
this.$message.success(
this.$t("trials:uploadClinicalData:message:uploadSuccessfully")
);
})
.catch(() => {
this.btnLoading = false;
this.loading = false;
});
},
getClinicalData() { getClinicalData() {
this.loading = true this.loading = true;
this.data.TrialId = this.$route.query.trialId this.data.TrialId = this.$route.query.trialId;
var param = { var param = {
subjectVisitId: this.subjectVisitId, subjectVisitId: this.subjectVisitId,
trialId: this.trialId, trialId: this.trialId,
subjectId: this.data.SubjectId, subjectId: this.data.SubjectId,
isBaseLine: this.data.IsBaseLine isBaseLine: this.data.IsBaseLine,
} };
getCRCClinicalData(param).then(res => { getCRCClinicalData(param)
this.clinicalDatas = res.Result .then((res) => {
this.loading = false this.clinicalDatas = res.Result;
}).catch(() => { this.loading = false;
this.loading = false })
}) .catch(() => {
this.loading = false;
});
}, },
// //
editRow(row, type) { editRow(row, type) {
if (type === 1) { if (type === 1) {
this.prVisible = true this.prVisible = true;
} else if (type === 2) { } else if (type === 2) {
this.psVisible = true this.psVisible = true;
} else if (type === 3) { } else if (type === 3) {
this.poVisible = true this.poVisible = true;
} }
this.currentRow = { ...row } this.currentRow = { ...row };
this.currentRow.TrialId = this.$route.query.trialId this.currentRow.TrialId = this.$route.query.trialId;
}, },
// ID // ID
deletePreviousHistory(row) { deletePreviousHistory(row) {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), { this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
type: 'warning', type: "warning",
distinguishCancelAndClose: true distinguishCancelAndClose: true,
}) }).then(() => {
.then(() => { this.loading = true;
this.loading = true deletePreviousHistory(
deletePreviousHistory(this.$route.query.trialId, this.subjectVisitId, row.Id).then(res => { this.$route.query.trialId,
this.loading = false this.subjectVisitId,
row.Id
)
.then((res) => {
this.loading = false;
if (res.IsSuccess) { if (res.IsSuccess) {
this.getClinicalData() this.getClinicalData();
this.$message.success(this.$t('trials:uploadedDicoms:message:deleteSuccessfully')) this.$message.success(
this.$emit('getList') this.$t("trials:uploadedDicoms:message:deleteSuccessfully")
);
this.$emit("getList");
} }
}).catch(() => { this.loading = false }) })
}) .catch(() => {
this.loading = false;
});
});
}, },
// ID // ID
deletePreviousSurgery(row) { deletePreviousSurgery(row) {
console.log(this.$route.query.trialId) console.log(this.$route.query.trialId);
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), { this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
type: 'warning', type: "warning",
distinguishCancelAndClose: true distinguishCancelAndClose: true,
}) }).then(() => {
.then(() => { // row.Type = ''
// row.Type = '' this.loading = true;
this.loading = true deletePreviousSurgery(
deletePreviousSurgery(this.$route.query.trialId, this.subjectVisitId, row.Id) this.$route.query.trialId,
.then(res => { this.subjectVisitId,
this.loading = false row.Id
if (res.IsSuccess) { )
this.getClinicalData() .then((res) => {
this.$message.success(this.$t('trials:uploadedDicoms:message:deleteSuccessfully')) this.loading = false;
this.$emit('getList') if (res.IsSuccess) {
} this.getClinicalData();
}).catch(() => { this.loading = false }) this.$message.success(
}) this.$t("trials:uploadedDicoms:message:deleteSuccessfully")
);
this.$emit("getList");
}
})
.catch(() => {
this.loading = false;
});
});
}, },
// ID // ID
deletePreviousOther(row) { deletePreviousOther(row) {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), { this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
type: 'warning', type: "warning",
distinguishCancelAndClose: true distinguishCancelAndClose: true,
}) }).then(() => {
.then(() => { // row.Type = ''
// row.Type = '' this.loading = true;
this.loading = true deletePreviousOther(
deletePreviousOther(this.$route.query.trialId, this.subjectVisitId, row.Id) this.$route.query.trialId,
.then(res => { this.subjectVisitId,
this.loading = false row.Id
if (res.IsSuccess) { )
this.getClinicalData() .then((res) => {
this.$message.success(this.$t('trials:uploadedDicoms:message:deleteSuccessfully')) this.loading = false;
this.$emit('getList') if (res.IsSuccess) {
} this.getClinicalData();
}).catch(() => { this.loading = false }) this.$message.success(
}) this.$t("trials:uploadedDicoms:message:deleteSuccessfully")
);
this.$emit("getList");
}
})
.catch(() => {
this.loading = false;
});
});
}, },
// //
preview(row) { preview(row) {
if (!row.Path) return if (!row.Path) return;
this.previewObj.fileName = row.FileName this.previewObj.fileName = row.FileName;
this.previewObj.filePath = row.Path this.previewObj.filePath = row.Path;
this.previewObj.fileType ='pdf' this.previewObj.fileType = "pdf";
this.previewObj.visible = true this.previewObj.visible = true;
// window.open(this.OSSclientConfig.basePath + path, '_blank') // window.open(this.OSSclientConfig.basePath + path, '_blank')
}, },
addPreviousHistory(clinicalDataTrialSetId) { addPreviousHistory(clinicalDataTrialSetId) {
console.log(clinicalDataTrialSetId) console.log(clinicalDataTrialSetId);
this.currentRow = { ClinicalDataTrialSetId: clinicalDataTrialSetId } this.currentRow = { ClinicalDataTrialSetId: clinicalDataTrialSetId };
this.currentRow.TrialId = this.$route.query.trialId this.currentRow.TrialId = this.$route.query.trialId;
this.prVisible = true this.prVisible = true;
}, },
addPreviousSurgery(clinicalDataTrialSetId) { addPreviousSurgery(clinicalDataTrialSetId) {
this.currentRow = { ClinicalDataTrialSetId: clinicalDataTrialSetId } this.currentRow = { ClinicalDataTrialSetId: clinicalDataTrialSetId };
this.currentRow.TrialId = this.$route.query.trialId this.currentRow.TrialId = this.$route.query.trialId;
this.psVisible = true this.psVisible = true;
}, },
addPreviousOther(clinicalDataTrialSetId) { addPreviousOther(clinicalDataTrialSetId) {
this.currentRow = { ClinicalDataTrialSetId: clinicalDataTrialSetId } this.currentRow = { ClinicalDataTrialSetId: clinicalDataTrialSetId };
this.currentRow.TrialId = this.$route.query.trialId this.currentRow.TrialId = this.$route.query.trialId;
this.poVisible = true this.poVisible = true;
}, },
// //
closePRDialog() { closePRDialog() {
this.prVisible = false this.prVisible = false;
this.currentRow.TrialId = this.$route.query.trialId this.currentRow.TrialId = this.$route.query.trialId;
}, },
closePSDialog() { closePSDialog() {
this.psVisible = false this.psVisible = false;
this.currentRow.TrialId = this.$route.query.trialId this.currentRow.TrialId = this.$route.query.trialId;
}, },
closePODialog() { closePODialog() {
this.poVisible = false this.poVisible = false;
this.currentRow.TrialId = this.$route.query.trialId this.currentRow.TrialId = this.$route.query.trialId;
}, },
closeUpDialog() { closeUpDialog() {
this.upVisible = false this.upVisible = false;
this.currentRow.TrialId = this.$route.query.trialId this.currentRow.TrialId = this.$route.query.trialId;
}, },
refresh() { refresh() {
this.getClinicalData() this.getClinicalData();
this.$emit('getList') this.$emit("getList");
}, },
// //
addFile(id, clinicalDataTrialSetId) { addFile(id, clinicalDataTrialSetId) {
this.currentRow = { Id: id, ClinicalDataTrialSetId: clinicalDataTrialSetId, SubjectId: this.data.SubjectId } this.currentRow = {
this.currentRow.TrialId = this.$route.query.trialId Id: id,
this.upVisible = true ClinicalDataTrialSetId: clinicalDataTrialSetId,
SubjectId: this.data.SubjectId,
};
this.currentRow.TrialId = this.$route.query.trialId;
this.upVisible = true;
}, },
// //
deleteFile(id) { deleteFile(id) {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), { this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
type: 'warning', type: "warning",
distinguishCancelAndClose: true distinguishCancelAndClose: true,
}) }).then(() => {
.then(() => { this.loading = true;
this.loading = true deleteReadingClinicalDataPDF(id)
deleteReadingClinicalDataPDF(id) .then((res) => {
.then(res => { this.loading = false;
this.loading = false if (res.IsSuccess) {
if (res.IsSuccess) { this.getClinicalData();
this.getClinicalData() this.$emit("getList");
this.$emit('getList') this.$message.success(
this.$message.success(this.$t('trials:uploadedDicoms:message:deleteSuccessfully')) this.$t("trials:uploadedDicoms:message:deleteSuccessfully")
} );
}).catch(() => { }
this.loading = false })
}) .catch(() => {
}) this.loading = false;
});
});
}, },
handleDownloadTpl(cd) { handleDownloadTpl(cd) {
window.open(this.OSSclientConfig.basePath + cd.Path) window.open(this.OSSclientConfig.basePath + cd.Path);
} },
} },
};
}
</script> </script>
<style lang="scss"> <style lang="scss">
.clinical-data-wrapper{ .clinical-data-wrapper {
.box-title{ .box-title {
padding: 12px; padding: 12px;
margin-bottom: 10px; margin-bottom: 10px;
background-color: #dcdfe6; background-color: #dcdfe6;
} }
} }
</style> </style>