Compare commits

..

No commits in common. "d5f1ecbb04be34fca975f9b37472905585d2cd3a" and "3ab5c46455fffce1b86f6fdce8f41a1718826907" have entirely different histories.

2 changed files with 212 additions and 432 deletions

View File

@ -361,12 +361,8 @@ async function VueInit() {
} }
const h = _vm.$createElement const h = _vm.$createElement
/* eslint-disable */ /* 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; window.VUE_APP_COMPANY_NAME = process.env.VUE_APP_COMPANY_NAME;
waitOperate(true ? () => { waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => {
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh' 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') { 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; count = 0;
@ -375,19 +371,6 @@ async function VueInit() {
} }
_vm.$store.dispatch('user/logout').then(res => { _vm.$store.dispatch('user/logout').then(res => {
// window.location.href = `/login` // window.location.href = `/login`
let dom = document.querySelectorAll('.el-message-box__wrapper');
for (let i = 0; i < dom.length; i++) {
let item = dom[i];
let title = item.getAttribute("aria-label");
if (title === '已锁定' || title === 'Locked') {
document.body.removeChild(item);
let modal = document.querySelectorAll('.v-modal');
for (let i = 0; i < modal.length; i++) {
let m = modal[i];
document.body.removeChild(m);
}
}
}
router.push("/login") router.push("/login")
}).then(() => { }).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!', { _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!', {
@ -395,8 +378,8 @@ async function VueInit() {
}) })
}) })
} : () => { }, 20, } : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME,
true ? () => { eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => {
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh' 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') { 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; count = 0;
@ -526,7 +509,7 @@ async function VueInit() {
]) ])
]) ])
}) })
} : () => { }, 10) } : () => { }, process.env.VUE_APP_LOCK_FOR_TIME)
} }
VueInit() VueInit()

View File

@ -4,27 +4,21 @@
<el-tab-pane <el-tab-pane
v-for="cd in clinicalDatas" v-for="cd in clinicalDatas"
:key="cd.ClinicalDataTrialSetId" :key="cd.ClinicalDataTrialSetId"
:label=" :label="$i18n.locale === 'zh' ? cd.ClinicalDataSetName : cd.ClinicalDataSetEnName"
$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=" @click.native.prevent="addPreviousHistory(cd.ClinicalDataTrialSetId)"
addPreviousHistory(cd.ClinicalDataTrialSetId)
"
> >
{{ $t("common:button:new") }} {{ $t('common:button:new') }}
</el-button> </el-button>
</div> </div>
@ -32,7 +26,10 @@
:data="cd.ClinicalTableData.PreviousHistoryList" :data="cd.ClinicalTableData.PreviousHistoryList"
style="width: 100%" style="width: 100%"
> >
<el-table-column type="index" width="50" /> <el-table-column
type="index"
width="50"
/>
<!-- 放疗部位 --> <!-- 放疗部位 -->
<el-table-column <el-table-column
prop="Position" prop="Position"
@ -44,11 +41,7 @@
: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>
<!-- 结束日期 --> <!-- 结束日期 -->
@ -57,11 +50,7 @@
: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 -->
@ -70,7 +59,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
@ -81,19 +70,16 @@
<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=" v-if="(data.SubmitState*1 < 2 || (data.SubmitState === 2 && data.IsQCConfirmedReupload))"
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')"
@ -104,22 +90,25 @@
</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 type="index" width="50" /> <el-table-column
type="index"
width="50"
/>
<!-- 手术名称 --> <!-- 手术名称 -->
<el-table-column <el-table-column
prop="OperationName" prop="OperationName"
@ -131,11 +120,7 @@
: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>
@ -147,7 +132,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')"
@ -156,10 +141,7 @@
/> />
<!-- 移除 --> <!-- 移除 -->
<el-button <el-button
v-if=" v-if="data.SubmitState*1 < 2 || (data.SubmitState === 2 && data.IsQCConfirmedReupload)"
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')"
@ -170,8 +152,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"
@ -179,14 +161,17 @@
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 type="index" width="50" /> <el-table-column
type="index"
width="50"
/>
<!-- 治疗类型 --> <!-- 治疗类型 -->
<el-table-column <el-table-column
prop="TreatmentType" prop="TreatmentType"
@ -198,11 +183,7 @@
: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>
<!-- 结束日期 --> <!-- 结束日期 -->
@ -211,11 +192,7 @@
: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>
@ -227,7 +204,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')"
@ -236,10 +213,7 @@
/> />
<!-- 移除 --> <!-- 移除 -->
<el-button <el-button
v-if=" v-if="(data.SubmitState*1 < 2 || (data.SubmitState === 2 && data.IsQCConfirmedReupload))"
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')"
@ -252,7 +226,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"
@ -262,50 +236,26 @@
: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
id="directoryInputWrapper"
class="btn btn-link"
style="
position: relative;
overflow: hidden;
display: inline-block;
"
>
<!-- 新增 --> <!-- 新增 -->
<el-button <el-button
icon="el-icon-plus" icon="el-icon-plus"
type="primary" type="primary"
size="small" size="small"
:disabled="btnLoading" @click.native.prevent="addFile(cd.Id,cd.ClinicalDataTrialSetId)"
:loading="btnLoading"
> >
{{ $t("common:button:new") }} {{ $t('common:button:new') }}
</el-button> </el-button>
<input </div>
type="file" <el-table
name="file" :data="cd.PDFFileList"
multiple style="width: 100%"
style=" >
position: absolute; <el-table-column
top: 0; type="index"
left: 0; width="50"
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-column <el-table-column
prop="FileName" prop="FileName"
@ -318,7 +268,10 @@
:label="$t('trials:uploadClinicalData:table:uploadedTime')" :label="$t('trials:uploadClinicalData:table:uploadedTime')"
width="200" 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"> <template slot-scope="scope">
<!-- 预览 --> <!-- 预览 -->
<el-button <el-button
@ -330,7 +283,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')"
@ -380,13 +333,7 @@
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<PreviousRadiotherapy <PreviousRadiotherapy v-if="prVisible" :data="currentRow" :subject-visit-id="subjectVisitId" @closePRDialog="closePRDialog" @refresh="refresh" />
v-if="prVisible"
:data="currentRow"
:subject-visit-id="subjectVisitId"
@closePRDialog="closePRDialog"
@refresh="refresh"
/>
</el-dialog> </el-dialog>
<!-- 既往手术史 --> <!-- 既往手术史 -->
<el-dialog <el-dialog
@ -398,14 +345,7 @@
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<PreviousSurgery <PreviousSurgery v-if="psVisible" :data="currentRow" :parent-data="data" :subject-visit-id="subjectVisitId" @closePSDialog="closePSDialog" @refresh="refresh" />
v-if="psVisible"
:data="currentRow"
:parent-data="data"
:subject-visit-id="subjectVisitId"
@closePSDialog="closePSDialog"
@refresh="refresh"
/>
</el-dialog> </el-dialog>
<!-- 既往其他治疗史 --> <!-- 既往其他治疗史 -->
<el-dialog <el-dialog
@ -417,14 +357,7 @@
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<PreviousOther <PreviousOther v-if="poVisible" :data="currentRow" :parent-data="data" :subject-visit-id="subjectVisitId" @closePODialog="closePODialog" @refresh="refresh" />
v-if="poVisible"
:data="currentRow"
:parent-data="data"
:subject-visit-id="subjectVisitId"
@closePODialog="closePODialog"
@refresh="refresh"
/>
</el-dialog> </el-dialog>
<!-- 上传文件 --> <!-- 上传文件 -->
<el-dialog <el-dialog
@ -436,14 +369,7 @@
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<PreviousFiles <PreviousFiles v-if="upVisible" :data="currentRow" :parent-data="data" :subject-visit-id="subjectVisitId" @closeUpDialog="closeUpDialog" @refresh="refresh" />
v-if="upVisible"
:data="currentRow"
:parent-data="data"
:subject-visit-id="subjectVisitId"
@closeUpDialog="closeUpDialog"
@refresh="refresh"
/>
</el-dialog> </el-dialog>
<!-- 预览文件 --> <!-- 预览文件 -->
<el-dialog <el-dialog
@ -454,79 +380,57 @@
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<div <div class="base-modal-body" style="border:2px solid #ccc;padding: 10px">
class="base-modal-body" <PreviewFile v-if="previewObj.visible" :file-path="previewObj.filePath" :file-type="previewObj.fileType" />
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 { import { deleteReadingClinicalDataPDF, deletePreviousHistory, deletePreviousOther, deletePreviousSurgery,
deleteReadingClinicalDataPDF, DownloadTrialClinicalFile } from '@/api/trials'
deletePreviousHistory, import { getCRCClinicalData } from '@/api/trials'
deletePreviousOther, import PreviousRadiotherapy from './previousRadiotherapy'
deletePreviousSurgery, import PreviousSurgery from './previousSurgery'
DownloadTrialClinicalFile, import PreviousOther from './previousOther'
addOrUpdateReadingClinicalData, import PreviousFiles from './previousFiles'
getCRCClinicalData, import clinicalDataQuestions from '@/components/clinicalDataQuestions'
} from "@/api/trials"; import PreviewFile from '@/components/PreviewFile/index'
import PreviousRadiotherapy from "./previousRadiotherapy"; import moment from 'moment'
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: { components: { PreviousRadiotherapy, PreviousSurgery, PreviousOther, PreviousFiles, clinicalDataQuestions,PreviewFile },
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,
@ -536,290 +440,183 @@ 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) getCRCClinicalData(param).then(res => {
.then((res) => { this.clinicalDatas = res.Result
this.clinicalDatas = res.Result; this.loading = false
this.loading = false; }).catch(() => {
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(() => { })
this.loading = true; .then(() => {
deletePreviousHistory( this.loading = true
this.$route.query.trialId, deletePreviousHistory(this.$route.query.trialId, this.subjectVisitId, row.Id).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
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(() => { })
// row.Type = '' .then(() => {
this.loading = true; // row.Type = ''
deletePreviousSurgery( this.loading = true
this.$route.query.trialId, deletePreviousSurgery(this.$route.query.trialId, this.subjectVisitId, row.Id)
this.subjectVisitId, .then(res => {
row.Id this.loading = false
) if (res.IsSuccess) {
.then((res) => { this.getClinicalData()
this.loading = false; this.$message.success(this.$t('trials:uploadedDicoms:message:deleteSuccessfully'))
if (res.IsSuccess) { this.$emit('getList')
this.getClinicalData(); }
this.$message.success( }).catch(() => { this.loading = false })
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(() => { })
// row.Type = '' .then(() => {
this.loading = true; // row.Type = ''
deletePreviousOther( this.loading = true
this.$route.query.trialId, deletePreviousOther(this.$route.query.trialId, this.subjectVisitId, row.Id)
this.subjectVisitId, .then(res => {
row.Id this.loading = false
) if (res.IsSuccess) {
.then((res) => { this.getClinicalData()
this.loading = false; this.$message.success(this.$t('trials:uploadedDicoms:message:deleteSuccessfully'))
if (res.IsSuccess) { this.$emit('getList')
this.getClinicalData(); }
this.$message.success( }).catch(() => { this.loading = false })
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 = { this.currentRow = { Id: id, ClinicalDataTrialSetId: clinicalDataTrialSetId, SubjectId: this.data.SubjectId }
Id: id, this.currentRow.TrialId = this.$route.query.trialId
ClinicalDataTrialSetId: clinicalDataTrialSetId, this.upVisible = true
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(() => { })
this.loading = true; .then(() => {
deleteReadingClinicalDataPDF(id) this.loading = true
.then((res) => { deleteReadingClinicalDataPDF(id)
this.loading = false; .then(res => {
if (res.IsSuccess) { this.loading = false
this.getClinicalData(); if (res.IsSuccess) {
this.$emit("getList"); this.getClinicalData()
this.$message.success( this.$emit('getList')
this.$t("trials:uploadedDicoms:message:deleteSuccessfully") this.$message.success(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;