上传临床数据按钮修改
continuous-integration/drone/push Build is passing Details

uat_us
DESKTOP-6C3NK6N\WXS 2024-09-14 10:26:12 +08:00
parent 97d786684b
commit 42ed756c4e
2 changed files with 195 additions and 188 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -13,7 +13,7 @@
<!-- 格式化录入 --> <!-- 格式化录入 -->
<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
@ -24,7 +24,7 @@
addPreviousHistory(cd.ClinicalDataTrialSetId) addPreviousHistory(cd.ClinicalDataTrialSetId)
" "
> >
{{ $t("common:button:new") }} {{ $t('common:button:new') }}
</el-button> </el-button>
</div> </div>
@ -46,8 +46,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.StartTime scope.row.StartTime
? moment(scope.row.StartTime).format("YYYY-MM-DD") ? moment(scope.row.StartTime).format('YYYY-MM-DD')
: "" : ''
}} }}
</template> </template>
</el-table-column> </el-table-column>
@ -59,8 +59,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.EndTime scope.row.EndTime
? moment(scope.row.EndTime).format("YYYY-MM-DD") ? moment(scope.row.EndTime).format('YYYY-MM-DD')
: "" : ''
}} }}
</template> </template>
</el-table-column> </el-table-column>
@ -70,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
@ -104,7 +104,7 @@
</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"
@ -112,7 +112,7 @@
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
@ -133,8 +133,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.OperationTime scope.row.OperationTime
? moment(scope.row.OperationTime).format("YYYY-MM-DD") ? moment(scope.row.OperationTime).format('YYYY-MM-DD')
: "" : ''
}} }}
</template> </template>
</el-table-column> </el-table-column>
@ -170,7 +170,7 @@
</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
@ -179,7 +179,7 @@
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
@ -200,8 +200,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.StartTime scope.row.StartTime
? moment(scope.row.StartTime).format("YYYY-MM-DD") ? moment(scope.row.StartTime).format('YYYY-MM-DD')
: "" : ''
}} }}
</template> </template>
</el-table-column> </el-table-column>
@ -213,8 +213,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.EndTime scope.row.EndTime
? moment(scope.row.EndTime).format("YYYY-MM-DD") ? moment(scope.row.EndTime).format('YYYY-MM-DD')
: "" : ''
}} }}
</template> </template>
</el-table-column> </el-table-column>
@ -252,7 +252,10 @@
</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; display: flex; justify-content: flex-end"
>
<!-- 下载模板 --> <!-- 下载模板 -->
<el-button <el-button
v-if="cd.Path" v-if="cd.Path"
@ -261,8 +264,9 @@
size="small" size="small"
:loading="downloadLoading" :loading="downloadLoading"
@click.native.prevent="handleDownloadTpl(cd)" @click.native.prevent="handleDownloadTpl(cd)"
style="margin-right: 10px"
> >
{{ $t("trials:uploadClinicalData:button:downloadTemplate") }} {{ $t('trials:uploadClinicalData:button:downloadTemplate') }}
</el-button> </el-button>
<!-- 新增 --> <!-- 新增 -->
<!-- <el-button <!-- <el-button
@ -274,35 +278,38 @@
{{ $t("common:button:new") }} {{ $t("common:button:new") }}
</el-button> --> </el-button> -->
<!-- 新增 --> <!-- 新增 -->
<el-button <div style="position: relative">
icon="el-icon-plus" <el-button
type="primary" icon="el-icon-plus"
size="small" type="primary"
:disabled="btnLoading" size="small"
:loading="btnLoading" :disabled="btnLoading"
> :loading="btnLoading"
{{ $t("common:button:new") }} >
</el-button> {{ $t('common:button:new') }}
<input </el-button>
type="file" <input
name="file" type="file"
multiple name="file"
ref="addFile" multiple
style=" ref="addFile"
position: absolute; :title="$t('common:button:new')"
top: 0; style="
left: 0; position: absolute;
width: 100%; top: 0;
height: 100%; left: 0;
opacity: 0; width: 100%;
cursor: pointer; height: 100%;
" opacity: 0;
:accept="faccept.join(',')" cursor: pointer;
@change=" "
($event) => :accept="faccept.join(',')"
beginScanFiles($event, cd.Id, cd.ClinicalDataTrialSetId) @change="
" ($event) =>
/> beginScanFiles($event, cd.Id, cd.ClinicalDataTrialSetId)
"
/>
</div>
</div> </div>
<el-table :data="cd.PDFFileList" style="width: 100%" height="300"> <el-table :data="cd.PDFFileList" style="width: 100%" height="300">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
@ -490,16 +497,16 @@ import {
deletePreviousSurgery, deletePreviousSurgery,
getCRCClinicalData, getCRCClinicalData,
addOrUpdateReadingClinicalData, addOrUpdateReadingClinicalData,
} from "@/api/trials"; } from '@/api/trials'
import PreviousRadiotherapy from "./previousRadiotherapy"; import PreviousRadiotherapy from './previousRadiotherapy'
import PreviousSurgery from "./previousSurgery"; import PreviousSurgery from './previousSurgery'
import PreviousOther from "./previousOther"; import PreviousOther from './previousOther'
import PreviousFiles from "./previousFiles"; import PreviousFiles from './previousFiles'
import clinicalDataQuestions from "@/components/clinicalDataQuestions"; import clinicalDataQuestions from '@/components/clinicalDataQuestions'
import PreviewFile from "@/components/PreviewFile/index"; import PreviewFile from '@/components/PreviewFile/index'
import moment from "moment"; import moment from 'moment'
export default { export default {
name: "uploadPetClinicalData", name: 'uploadPetClinicalData',
components: { components: {
PreviousRadiotherapy, PreviousRadiotherapy,
PreviousSurgery, PreviousSurgery,
@ -512,14 +519,14 @@ export default {
data: { data: {
type: Object, type: Object,
default() { default() {
return {}; return {}
}, },
}, },
studyData: { studyData: {
required: true, required: true,
type: Object, type: Object,
default() { default() {
return {}; return {}
}, },
}, },
subjectVisitId: { subjectVisitId: {
@ -537,9 +544,9 @@ export default {
}, },
data() { data() {
return { return {
faccept: [".pdf"], faccept: ['.pdf'],
isShow: false, isShow: false,
userTypeEnumInt: zzSessionStorage.getItem("userTypeEnumInt") * 1, userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1,
loading: false, loading: false,
btnLoading: false, btnLoading: false,
PreviousHistoryList: [], PreviousHistoryList: [],
@ -556,11 +563,11 @@ 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) { beginScanFiles(e, id, clinicalDataTrialSetId) {
@ -568,59 +575,59 @@ export default {
Id: id, Id: id,
ClinicalDataTrialSetId: clinicalDataTrialSetId, ClinicalDataTrialSetId: clinicalDataTrialSetId,
SubjectId: this.data.SubjectId, SubjectId: this.data.SubjectId,
}; }
this.currentRow.TrialId = this.$route.query.trialId; this.currentRow.TrialId = this.$route.query.trialId
var files = e.target.files; var files = e.target.files
this.fileList = []; this.fileList = []
for (var i = 0; i < files.length; ++i) { for (var i = 0; i < files.length; ++i) {
const fileName = files[i].name; const fileName = files[i].name
var extendName = fileName var extendName = fileName
.substring(fileName.lastIndexOf(".")) .substring(fileName.lastIndexOf('.'))
.toLocaleLowerCase(); .toLocaleLowerCase()
if (this.faccept.indexOf(extendName) !== -1) { if (this.faccept.indexOf(extendName) !== -1) {
let obj = { let obj = {
size: files[i].size, size: files[i].size,
type: extendName.split(".")[1], type: extendName.split('.')[1],
file: files[i], file: files[i],
}; }
this.fileList.push(obj); this.fileList.push(obj)
} }
} }
this.handleUploadFile(); this.handleUploadFile()
this.$refs.addFile.forEach((item) => { this.$refs.addFile.forEach((item) => {
item.value = null; item.value = null
}); })
}, },
async handleUploadFile() { async handleUploadFile() {
this.btnLoading = true; this.btnLoading = true
this.loading = true; this.loading = true
this.addFileList = []; this.addFileList = []
try { try {
for (var i = 0; i < this.fileList.length; ++i) { for (var i = 0; i < this.fileList.length; ++i) {
const file = await this.fileToBlob(this.fileList[i].file); const file = await this.fileToBlob(this.fileList[i].file)
var timestamp = Date.now(); var timestamp = Date.now()
const res = await this.OSSclient.put( const res = await this.OSSclient.put(
`/${this.trialId}/ClinicalData/${timestamp}_${this.fileList[i].file.name}`, `/${this.trialId}/ClinicalData/${timestamp}_${this.fileList[i].file.name}`,
file file
); )
this.addFileList.push({ this.addFileList.push({
fileName: this.fileList[i].file.name, fileName: this.fileList[i].file.name,
path: this.$getObjectName(res.url), path: this.$getObjectName(res.url),
url: this.$getObjectName(res.url), url: this.$getObjectName(res.url),
type: this.fileList[i].type, type: this.fileList[i].type,
size: this.fileList[i].size, size: this.fileList[i].size,
}); })
} }
this.saveClinicalData(); this.saveClinicalData()
} catch (err) { } catch (err) {
console.log(err); console.log(err)
this.btnLoading = false; this.btnLoading = false
this.loading = false; this.loading = false
} }
}, },
saveClinicalData() { saveClinicalData() {
this.btnLoading = true; this.btnLoading = true
this.loading = true; this.loading = true
var param = { var param = {
id: this.currentRow.Id, id: this.currentRow.Id,
trialId: this.currentRow.TrialId, trialId: this.currentRow.TrialId,
@ -630,185 +637,185 @@ export default {
isVisit: true, isVisit: true,
deleteFileIds: [], deleteFileIds: [],
addFileList: this.addFileList, addFileList: this.addFileList,
}; }
if (this.studyData.StudyId) { if (this.studyData.StudyId) {
param.StudyId = this.studyData.StudyId; param.StudyId = this.studyData.StudyId
} }
addOrUpdateReadingClinicalData(param) addOrUpdateReadingClinicalData(param)
.then((response) => { .then((response) => {
this.btnLoading = false; this.btnLoading = false
this.loading = false; this.loading = false
// //
this.getClinicalData(); this.getClinicalData()
this.$message.success( this.$message.success(
this.$t("trials:uploadClinicalData:message:uploadSuccessfully") this.$t('trials:uploadClinicalData:message:uploadSuccessfully')
); )
this.$emit("getStudyInfo"); this.$emit('getStudyInfo')
}) })
.catch(() => { .catch(() => {
this.btnLoading = false; this.btnLoading = false
this.loading = 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.studyData.SubjectVisitId, SubjectVisitId: this.studyData.SubjectVisitId,
StudyId: this.studyData.StudyId, StudyId: this.studyData.StudyId,
TrialId: this.$route.query.trialId, TrialId: this.$route.query.trialId,
SubjectId: this.studyData.SubjectId, SubjectId: this.studyData.SubjectId,
}; }
getCRCClinicalData(param) getCRCClinicalData(param)
.then((res) => { .then((res) => {
this.clinicalDatas = res.Result; this.clinicalDatas = res.Result
this.loading = false; this.loading = false
}) })
.catch(() => { .catch(() => {
this.loading = false; 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.$route.query.trialId,
this.subjectVisitId, this.subjectVisitId,
row.Id row.Id
) )
.then((res) => { .then((res) => {
this.loading = false; this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.getClinicalData(); this.getClinicalData()
this.$message.success( this.$message.success(
this.$t("trials:uploadedDicoms:message:deleteSuccessfully") this.$t('trials:uploadedDicoms:message:deleteSuccessfully')
); )
this.$emit("getStudyInfo"); this.$emit('getStudyInfo')
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; 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.$route.query.trialId,
this.subjectVisitId, this.subjectVisitId,
row.Id row.Id
) )
.then((res) => { .then((res) => {
this.loading = false; this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.getClinicalData(); this.getClinicalData()
this.$message.success( this.$message.success(
this.$t("trials:uploadedDicoms:message:deleteSuccessfully") this.$t('trials:uploadedDicoms:message:deleteSuccessfully')
); )
this.$emit("getStudyInfo"); this.$emit('getStudyInfo')
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; 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.$route.query.trialId,
this.subjectVisitId, this.subjectVisitId,
row.Id row.Id
) )
.then((res) => { .then((res) => {
this.loading = false; this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.getClinicalData(); this.getClinicalData()
this.$message.success( this.$message.success(
this.$t("trials:uploadedDicoms:message:deleteSuccessfully") this.$t('trials:uploadedDicoms:message:deleteSuccessfully')
); )
this.$emit("getStudyInfo"); this.$emit('getStudyInfo')
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; 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("getStudyInfo"); this.$emit('getStudyInfo')
}, },
// //
addFile(id, clinicalDataTrialSetId) { addFile(id, clinicalDataTrialSetId) {
@ -816,38 +823,38 @@ export default {
Id: id, Id: id,
ClinicalDataTrialSetId: clinicalDataTrialSetId, ClinicalDataTrialSetId: clinicalDataTrialSetId,
SubjectId: this.data.SubjectId, SubjectId: this.data.SubjectId,
}; }
this.currentRow.TrialId = this.$route.query.trialId; this.currentRow.TrialId = this.$route.query.trialId
this.upVisible = true; 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("getStudyInfo"); this.$emit('getStudyInfo')
this.$message.success( this.$message.success(
this.$t("trials:uploadedDicoms:message:deleteSuccessfully") this.$t('trials:uploadedDicoms:message:deleteSuccessfully')
); )
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; 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 {