Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing Details

uat_us
caiyiling 2024-06-28 15:40:28 +08:00
commit 62d7315401
3 changed files with 433 additions and 210 deletions

View File

@ -361,6 +361,10 @@ async function VueInit() {
}
const h = _vm.$createElement
/* eslint-disable */
// eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION)
// process.env.VUE_APP_LOGOUT_FOR_TIME
// eval(process.env.VUE_APP_LOCK_FOR_PERMISSION)
// process.env.VUE_APP_LOCK_FOR_TIME
window.VUE_APP_COMPANY_NAME = process.env.VUE_APP_COMPANY_NAME;
waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => {
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
@ -371,6 +375,10 @@ async function VueInit() {
}
_vm.$store.dispatch('user/logout').then(res => {
// window.location.href = `/login`
_vm.$msgbox.close();
isOpen = false
isLock = null
zzSessionStorage.removeItem('isLock')
router.push("/login")
}).then(() => {
_vm.$alert(lang === 'zh' ? '由于您长时间未操作,为保护您的数据安全已强制将您下线,如果需要继续操作请重新登陆!' : 'No operation for a long time non-operation, you have been forced logout to protect data security. If continue to operate, please login again!', {
@ -379,7 +387,7 @@ async function VueInit() {
})
} : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME,
eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => {
eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => {
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
count = 0;

View File

@ -140,7 +140,8 @@
>
<template slot-scope="scope">
<div v-if="scope.row.CriterionCategoryList.find(v => {return v.TrialReadingCriterionId === ite.TrialReadingCriterionId}).StatementCriterionFileList.length > 0">
<el-button type="text" @click="windowOpen(scope.row.CriterionCategoryList.find(v => {return v.TrialReadingCriterionId === ite.TrialReadingCriterionId}).StatementCriterionFileList[0].FilePath)">View</el-button>
<el-button type="text" @click="preview(scope.row,ite.TrialReadingCriterionId)">View</el-button>
<!-- <el-button type="text" @click="windowOpen(scope.row.CriterionCategoryList.find(v => {return v.TrialReadingCriterionId === ite.TrialReadingCriterionId}).StatementCriterionFileList[0].FilePath)">View</el-button> -->
</div>
<div v-else>
<span>{{ $t('trials:enrolledReviews:label:notUpload') }}</span>
@ -474,6 +475,17 @@ export default {
this.initPage()
},
methods: {
//
preview(row,TrialReadingCriterionId){
let file = row.CriterionCategoryList.find(v => {return v.TrialReadingCriterionId === TrialReadingCriterionId}).StatementCriterionFileList[0];
let arr = file.FilePath.split(".");
this.$preview({
path:file.FilePath,
type:arr[arr.length - 1],
title:file.FileName
})
},
isConsistencyChange(row, ite, value, showMessage) {
this.batchSetCriterionJoinJoinAnalysis(row, ite, value, showMessage)
},

View File

@ -4,21 +4,27 @@
<el-tab-pane
v-for="cd in clinicalDatas"
: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">
<!-- 既往放疗史 -->
<h4>{{ $t('trials:uploadClinicalData:title:pastTreatment') }}</h4>
<div v-if="(allowAddOrEdit)" style="text-align:right">
<h4>{{ $t("trials:uploadClinicalData:title:pastTreatment") }}</h4>
<div v-if="allowAddOrEdit" style="text-align: right">
<!-- 新增 -->
<el-button
type="primary"
icon="el-icon-plus"
size="small"
@click.native.prevent="addPreviousHistory(cd.ClinicalDataTrialSetId)"
@click.native.prevent="
addPreviousHistory(cd.ClinicalDataTrialSetId)
"
>
{{ $t('common:button:new') }}
{{ $t("common:button:new") }}
</el-button>
</div>
@ -26,10 +32,7 @@
:data="cd.ClinicalTableData.PreviousHistoryList"
style="width: 100%"
>
<el-table-column
type="index"
width="50"
/>
<el-table-column type="index" width="50" />
<!-- 放疗部位 -->
<el-table-column
prop="Position"
@ -41,7 +44,11 @@
:label="$t('trials:uploadClinicalData:table:beginDate')"
>
<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>
</el-table-column>
<!-- 结束日期 -->
@ -50,7 +57,11 @@
:label="$t('trials:uploadClinicalData:table:endDate')"
>
<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>
</el-table-column>
<!-- 病灶是否PD -->
@ -59,7 +70,7 @@
:label="$t('trials:uploadClinicalData:table:isPD')"
>
<template slot-scope="scope">
{{ $fd('IsPdEnum', scope.row.IsPD) }}
{{ $fd("IsPdEnum", scope.row.IsPD) }}
</template>
</el-table-column>
<el-table-column
@ -70,16 +81,19 @@
<template slot-scope="scope">
<!-- 编辑 -->
<el-button
v-if="( allowAddOrEdit)"
v-if="allowAddOrEdit"
icon="el-icon-edit-outline"
circle
:title="$t('common:button:edit')"
size="small"
@click.native.prevent="editRow(scope.row,1)"
@click.native.prevent="editRow(scope.row, 1)"
/>
<!-- 移除 -->
<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"
circle
:title="$t('common:button:delete')"
@ -90,25 +104,22 @@
</el-table-column>
</el-table>
<!-- 既往手术史 -->
<h4>{{ $t('trials:uploadClinicalData:title:pastSurgery') }}</h4>
<div v-if="( allowAddOrEdit)" style="text-align:right">
<h4>{{ $t("trials:uploadClinicalData:title:pastSurgery") }}</h4>
<div v-if="allowAddOrEdit" style="text-align: right">
<el-button
type="primary"
icon="el-icon-plus"
size="small"
@click="addPreviousSurgery(cd.ClinicalDataTrialSetId)"
>
{{ $t('common:button:new') }}
{{ $t("common:button:new") }}
</el-button>
</div>
<el-table
:data="cd.ClinicalTableData.PreviousSurgeryList"
style="width: 100%"
>
<el-table-column
type="index"
width="50"
/>
<el-table-column type="index" width="50" />
<!-- 手术名称 -->
<el-table-column
prop="OperationName"
@ -120,7 +131,11 @@
:label="$t('trials:uploadClinicalData:table:surgeryDate')"
>
<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>
</el-table-column>
@ -132,7 +147,7 @@
<template slot-scope="scope">
<!-- 编辑 -->
<el-button
v-if="(allowAddOrEdit)"
v-if="allowAddOrEdit"
icon="el-icon-edit-outline"
circle
:title="$t('common:button:edit')"
@ -141,7 +156,10 @@
/>
<!-- 移除 -->
<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"
circle
:title="$t('common:button:delete')"
@ -152,8 +170,8 @@
</el-table-column>
</el-table>
<!-- 既往其他治疗史 -->
<h4>{{ $t('trials:uploadClinicalData:title:others') }}</h4>
<div v-if="(allowAddOrEdit)" style="text-align:right">
<h4>{{ $t("trials:uploadClinicalData:title:others") }}</h4>
<div v-if="allowAddOrEdit" style="text-align: right">
<!-- 新增 -->
<el-button
type="primary"
@ -161,17 +179,14 @@
size="small"
@click="addPreviousOther(cd.ClinicalDataTrialSetId)"
>
{{ $t('common:button:new') }}
{{ $t("common:button:new") }}
</el-button>
</div>
<el-table
:data="cd.ClinicalTableData.PreviousOtherList"
style="width: 100%"
>
<el-table-column
type="index"
width="50"
/>
<el-table-column type="index" width="50" />
<!-- 治疗类型 -->
<el-table-column
prop="TreatmentType"
@ -183,7 +198,11 @@
:label="$t('trials:uploadClinicalData:table:treatmentbeginDate')"
>
<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>
</el-table-column>
<!-- 结束日期 -->
@ -192,7 +211,11 @@
:label="$t('trials:uploadClinicalData:table:treatmentendDate')"
>
<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>
</el-table-column>
@ -204,7 +227,7 @@
<template slot-scope="scope">
<!-- 编辑 -->
<el-button
v-if="( allowAddOrEdit)"
v-if="allowAddOrEdit"
icon="el-icon-edit-outline"
circle
:title="$t('common:button:edit')"
@ -213,7 +236,10 @@
/>
<!-- 移除 -->
<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"
circle
:title="$t('common:button:delete')"
@ -226,7 +252,7 @@
</div>
<!-- PDF录入 -->
<div v-if="cd.ClinicalUploadType === 1">
<div v-if="(allowAddOrEdit)" style="text-align:right">
<div v-if="allowAddOrEdit" style="text-align: right">
<!-- 下载模板 -->
<el-button
v-if="cd.Path"
@ -236,26 +262,50 @@
:loading="downloadLoading"
@click.native.prevent="handleDownloadTpl(cd)"
>
{{ $t('trials:uploadClinicalData:button:downloadTemplate') }}
{{ $t("trials:uploadClinicalData:button:downloadTemplate") }}
</el-button>
<!-- 新增 -->
<el-button
icon="el-icon-plus"
type="primary"
size="small"
@click.native.prevent="addFile(cd.Id,cd.ClinicalDataTrialSetId)"
<div
id="directoryInputWrapper"
class="btn btn-link"
style="
position: relative;
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>
<el-table
:data="cd.PDFFileList"
style="width: 100%"
>
<el-table-column
type="index"
width="50"
/>
<el-table :data="cd.PDFFileList" style="width: 100%">
<el-table-column type="index" width="50" />
<!-- 文件名称 -->
<el-table-column
prop="FileName"
@ -268,10 +318,7 @@
:label="$t('trials:uploadClinicalData:table:uploadedTime')"
width="200"
/>
<el-table-column
:label="$t('common:action:action')"
width="200"
>
<el-table-column :label="$t('common:action:action')" width="200">
<template slot-scope="scope">
<!-- 预览 -->
<el-button
@ -283,7 +330,7 @@
/>
<!-- 移除 -->
<el-button
v-if="(allowAddOrEdit)"
v-if="allowAddOrEdit"
icon="el-icon-delete"
circle
:title="$t('common:button:delete')"
@ -333,7 +380,13 @@
append-to-body
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
@ -345,7 +398,14 @@
append-to-body
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
@ -357,7 +417,14 @@
append-to-body
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
@ -369,7 +436,14 @@
append-to-body
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
@ -380,57 +454,79 @@
append-to-body
custom-class="base-dialog-wrapper"
>
<div 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
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>
</el-dialog>
</div>
</template>
<script>
import { deleteReadingClinicalDataPDF, deletePreviousHistory, deletePreviousOther, deletePreviousSurgery,
DownloadTrialClinicalFile } from '@/api/trials'
import { getCRCClinicalData } from '@/api/trials'
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'
import {
deleteReadingClinicalDataPDF,
deletePreviousHistory,
deletePreviousOther,
deletePreviousSurgery,
DownloadTrialClinicalFile,
addOrUpdateReadingClinicalData,
getCRCClinicalData,
} from "@/api/trials";
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 {
name: 'ClinicalData',
components: { PreviousRadiotherapy, PreviousSurgery, PreviousOther, PreviousFiles, clinicalDataQuestions,PreviewFile },
name: "ClinicalData",
components: {
PreviousRadiotherapy,
PreviousSurgery,
PreviousOther,
PreviousFiles,
clinicalDataQuestions,
PreviewFile,
},
props: {
data: {
type: Object,
default() {
return {}
}
return {};
},
},
subjectVisitId: {
type: String,
required: true
required: true,
},
enumType: {
type: Number,
default: 0
default: 0,
},
allowAddOrEdit: {
type: Boolean,
default: false
}
default: false,
},
},
data() {
return {
faccept: [".pdf"],
isShow: false,
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1,
userTypeEnumInt: zzSessionStorage.getItem("userTypeEnumInt") * 1,
loading: false,
PreviousHistoryList: [],
PreviousSurgeryList: [],
PreviousOtherList: [],
PreviousPDFList: [],
fileList: [],
addFileList: [],
btnLoading: false,
currentRow: {},
prVisible: false,
psVisible: false,
@ -440,186 +536,293 @@ export default {
moment,
downloadLoading: false,
clinicalDatas: [],
previewObj:{visible:false,filePath:'',fileType:''}
}
previewObj: { visible: false, filePath: "", fileType: "" },
};
},
mounted() {
this.getClinicalData()
this.getClinicalData();
},
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() {
this.loading = true
this.data.TrialId = this.$route.query.trialId
this.loading = true;
this.data.TrialId = this.$route.query.trialId;
var param = {
subjectVisitId: this.subjectVisitId,
trialId: this.trialId,
subjectId: this.data.SubjectId,
isBaseLine: this.data.IsBaseLine
}
getCRCClinicalData(param).then(res => {
this.clinicalDatas = res.Result
this.loading = false
}).catch(() => {
this.loading = false
})
isBaseLine: this.data.IsBaseLine,
};
getCRCClinicalData(param)
.then((res) => {
this.clinicalDatas = res.Result;
this.loading = false;
})
.catch(() => {
this.loading = false;
});
},
//
editRow(row, type) {
if (type === 1) {
this.prVisible = true
this.prVisible = true;
} else if (type === 2) {
this.psVisible = true
this.psVisible = true;
} else if (type === 3) {
this.poVisible = true
this.poVisible = true;
}
this.currentRow = { ...row }
this.currentRow.TrialId = this.$route.query.trialId
this.currentRow = { ...row };
this.currentRow.TrialId = this.$route.query.trialId;
},
// ID
deletePreviousHistory(row) {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning',
distinguishCancelAndClose: true
})
.then(() => {
this.loading = true
deletePreviousHistory(this.$route.query.trialId, this.subjectVisitId, row.Id).then(res => {
this.loading = false
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
type: "warning",
distinguishCancelAndClose: true,
}).then(() => {
this.loading = true;
deletePreviousHistory(
this.$route.query.trialId,
this.subjectVisitId,
row.Id
)
.then((res) => {
this.loading = false;
if (res.IsSuccess) {
this.getClinicalData()
this.$message.success(this.$t('trials:uploadedDicoms:message:deleteSuccessfully'))
this.$emit('getList')
this.getClinicalData();
this.$message.success(
this.$t("trials:uploadedDicoms:message:deleteSuccessfully")
);
this.$emit("getList");
}
}).catch(() => { this.loading = false })
})
})
.catch(() => {
this.loading = false;
});
});
},
// ID
deletePreviousSurgery(row) {
console.log(this.$route.query.trialId)
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning',
distinguishCancelAndClose: true
})
.then(() => {
// row.Type = ''
this.loading = true
deletePreviousSurgery(this.$route.query.trialId, this.subjectVisitId, row.Id)
.then(res => {
this.loading = false
if (res.IsSuccess) {
this.getClinicalData()
this.$message.success(this.$t('trials:uploadedDicoms:message:deleteSuccessfully'))
this.$emit('getList')
}
}).catch(() => { this.loading = false })
})
console.log(this.$route.query.trialId);
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
type: "warning",
distinguishCancelAndClose: true,
}).then(() => {
// row.Type = ''
this.loading = true;
deletePreviousSurgery(
this.$route.query.trialId,
this.subjectVisitId,
row.Id
)
.then((res) => {
this.loading = false;
if (res.IsSuccess) {
this.getClinicalData();
this.$message.success(
this.$t("trials:uploadedDicoms:message:deleteSuccessfully")
);
this.$emit("getList");
}
})
.catch(() => {
this.loading = false;
});
});
},
// ID
deletePreviousOther(row) {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning',
distinguishCancelAndClose: true
})
.then(() => {
// row.Type = ''
this.loading = true
deletePreviousOther(this.$route.query.trialId, this.subjectVisitId, row.Id)
.then(res => {
this.loading = false
if (res.IsSuccess) {
this.getClinicalData()
this.$message.success(this.$t('trials:uploadedDicoms:message:deleteSuccessfully'))
this.$emit('getList')
}
}).catch(() => { this.loading = false })
})
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
type: "warning",
distinguishCancelAndClose: true,
}).then(() => {
// row.Type = ''
this.loading = true;
deletePreviousOther(
this.$route.query.trialId,
this.subjectVisitId,
row.Id
)
.then((res) => {
this.loading = false;
if (res.IsSuccess) {
this.getClinicalData();
this.$message.success(
this.$t("trials:uploadedDicoms:message:deleteSuccessfully")
);
this.$emit("getList");
}
})
.catch(() => {
this.loading = false;
});
});
},
//
preview(row) {
if (!row.Path) return
this.previewObj.fileName = row.FileName
this.previewObj.filePath = row.Path
this.previewObj.fileType ='pdf'
this.previewObj.visible = true
if (!row.Path) return;
this.previewObj.fileName = row.FileName;
this.previewObj.filePath = row.Path;
this.previewObj.fileType = "pdf";
this.previewObj.visible = true;
// window.open(this.OSSclientConfig.basePath + path, '_blank')
},
addPreviousHistory(clinicalDataTrialSetId) {
console.log(clinicalDataTrialSetId)
this.currentRow = { ClinicalDataTrialSetId: clinicalDataTrialSetId }
this.currentRow.TrialId = this.$route.query.trialId
this.prVisible = true
console.log(clinicalDataTrialSetId);
this.currentRow = { ClinicalDataTrialSetId: clinicalDataTrialSetId };
this.currentRow.TrialId = this.$route.query.trialId;
this.prVisible = true;
},
addPreviousSurgery(clinicalDataTrialSetId) {
this.currentRow = { ClinicalDataTrialSetId: clinicalDataTrialSetId }
this.currentRow.TrialId = this.$route.query.trialId
this.psVisible = true
this.currentRow = { ClinicalDataTrialSetId: clinicalDataTrialSetId };
this.currentRow.TrialId = this.$route.query.trialId;
this.psVisible = true;
},
addPreviousOther(clinicalDataTrialSetId) {
this.currentRow = { ClinicalDataTrialSetId: clinicalDataTrialSetId }
this.currentRow.TrialId = this.$route.query.trialId
this.poVisible = true
this.currentRow = { ClinicalDataTrialSetId: clinicalDataTrialSetId };
this.currentRow.TrialId = this.$route.query.trialId;
this.poVisible = true;
},
//
closePRDialog() {
this.prVisible = false
this.currentRow.TrialId = this.$route.query.trialId
this.prVisible = false;
this.currentRow.TrialId = this.$route.query.trialId;
},
closePSDialog() {
this.psVisible = false
this.currentRow.TrialId = this.$route.query.trialId
this.psVisible = false;
this.currentRow.TrialId = this.$route.query.trialId;
},
closePODialog() {
this.poVisible = false
this.currentRow.TrialId = this.$route.query.trialId
this.poVisible = false;
this.currentRow.TrialId = this.$route.query.trialId;
},
closeUpDialog() {
this.upVisible = false
this.currentRow.TrialId = this.$route.query.trialId
this.upVisible = false;
this.currentRow.TrialId = this.$route.query.trialId;
},
refresh() {
this.getClinicalData()
this.$emit('getList')
this.getClinicalData();
this.$emit("getList");
},
//
addFile(id, clinicalDataTrialSetId) {
this.currentRow = { Id: id, ClinicalDataTrialSetId: clinicalDataTrialSetId, SubjectId: this.data.SubjectId }
this.currentRow.TrialId = this.$route.query.trialId
this.upVisible = true
this.currentRow = {
Id: id,
ClinicalDataTrialSetId: clinicalDataTrialSetId,
SubjectId: this.data.SubjectId,
};
this.currentRow.TrialId = this.$route.query.trialId;
this.upVisible = true;
},
//
deleteFile(id) {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning',
distinguishCancelAndClose: true
})
.then(() => {
this.loading = true
deleteReadingClinicalDataPDF(id)
.then(res => {
this.loading = false
if (res.IsSuccess) {
this.getClinicalData()
this.$emit('getList')
this.$message.success(this.$t('trials:uploadedDicoms:message:deleteSuccessfully'))
}
}).catch(() => {
this.loading = false
})
})
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
type: "warning",
distinguishCancelAndClose: true,
}).then(() => {
this.loading = true;
deleteReadingClinicalDataPDF(id)
.then((res) => {
this.loading = false;
if (res.IsSuccess) {
this.getClinicalData();
this.$emit("getList");
this.$message.success(
this.$t("trials:uploadedDicoms:message:deleteSuccessfully")
);
}
})
.catch(() => {
this.loading = false;
});
});
},
handleDownloadTpl(cd) {
window.open(this.OSSclientConfig.basePath + cd.Path)
}
}
}
window.open(this.OSSclientConfig.basePath + cd.Path);
},
},
};
</script>
<style lang="scss">
.clinical-data-wrapper{
.box-title{
padding: 12px;
margin-bottom: 10px;
background-color: #dcdfe6;
}
.clinical-data-wrapper {
.box-title {
padding: 12px;
margin-bottom: 10px;
background-color: #dcdfe6;
}
}
</style>