一致性分析临床数据
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
7e21325fa1
commit
1ce67efa9b
|
@ -3849,4 +3849,36 @@ export function getUserFeedBackInfo(data) {
|
|||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 一致性分析获取临床数据列表
|
||||
export function getConsistencyAnalysisReadingClinicalDataList(data) {
|
||||
return request({
|
||||
url: `/ReadingClinicalData/getConsistencyAnalysisReadingClinicalDataList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 新增或修改一致性分析临床数据
|
||||
export function addOrUpdateConsistencyAnalysisReadingClinicalData(data) {
|
||||
return request({
|
||||
url: `/ReadingClinicalData/addOrUpdateConsistencyAnalysisReadingClinicalData`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 一致性分析临床数据签名
|
||||
export function signConsistencyAnalysisReadingClinicalData(data) {
|
||||
return request({
|
||||
url: `/Inspection/ReadingClinicalData/SignConsistencyAnalysisReadingClinicalData`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 一致性分析临床数据设置任务为有效
|
||||
export function setTaskValid(data) {
|
||||
return request({
|
||||
url: `/ReadingClinicalData/setTaskValid`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
|
@ -337,7 +337,8 @@ export default {
|
|||
ClinicalDataTrialSetId: this.$router.currentRoute.query.ClinicalDataTrialSetId ? this.$router.currentRoute.query.ClinicalDataTrialSetId : '',
|
||||
readingId: this.$router.currentRoute.query.readingId ? this.$router.currentRoute.query.readingId : '',
|
||||
visitTaskId: this.$router.currentRoute.query.visitTaskId ? this.$router.currentRoute.query.visitTaskId : '',
|
||||
readingClinicalDataId: this.$router.currentRoute.query.readingClinicalDataId ? this.$router.currentRoute.query.readingClinicalDataId : ''
|
||||
readingClinicalDataId: this.$router.currentRoute.query.readingClinicalDataId ? this.$router.currentRoute.query.readingClinicalDataId : '',
|
||||
IsGetAllConsistencyAnalysis:this.$router.currentRoute.query.isGetAllConsistencyAnalysis == 0 ? false : true,
|
||||
}
|
||||
if (this.$router.currentRoute.query.IsOnlyGetCRCReadModule) {
|
||||
param.IsOnlyGetCRCReadModule = true
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -18,6 +18,7 @@
|
|||
<el-select
|
||||
v-model="form.ClinicalDataTrialSetId"
|
||||
@change="handleClinicalDataSetChange"
|
||||
:disabled="type === 'consistencyAnalysis'"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of clinicalDatas"
|
||||
|
@ -33,7 +34,7 @@
|
|||
type="text"
|
||||
@click="handleDownloadTpl"
|
||||
>
|
||||
{{ $t('trials:readingPeriod:cd:title:downloadTpl') }}
|
||||
{{ $t("trials:readingPeriod:cd:title:downloadTpl") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
|
@ -45,26 +46,35 @@
|
|||
<div
|
||||
id="directoryInputWrapper"
|
||||
class="btn btn-link"
|
||||
style="position: relative;overflow: hidden;display: inline-block;"
|
||||
style="
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 56px;"
|
||||
size="small"
|
||||
>
|
||||
{{ $t('trials:uploadClinicalData:button:selectFile') }}
|
||||
<el-button type="primary" style="width: 56px" size="small">
|
||||
{{ $t("trials:uploadClinicalData:button:selectFile") }}
|
||||
</el-button>
|
||||
<input
|
||||
type="file"
|
||||
name="file"
|
||||
multiple
|
||||
style="position: absolute;top: 0;left: 0;width: 56px;height: 100%;opacity: 0;cursor: pointer;"
|
||||
style="
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 56px;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
"
|
||||
:accept="faccept.join(',')"
|
||||
@change="beginScanFiles($event)"
|
||||
>
|
||||
<span style="margin-left: 10px">{{ ($t('trials:attachment:message:pdf')) }}</span>
|
||||
/>
|
||||
<span style="margin-left: 10px">{{
|
||||
$t("trials:attachment:message:pdf")
|
||||
}}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<!-- 文件列表 -->
|
||||
|
@ -73,7 +83,7 @@
|
|||
:data="fileList"
|
||||
class="dicomFiles-table"
|
||||
height="300"
|
||||
style="width:100%"
|
||||
style="width: 100%"
|
||||
border
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
|
@ -92,32 +102,35 @@
|
|||
<span>{{
|
||||
scope.row.size && scope.row.size > 0
|
||||
? `${(scope.row.size / 1024 / 1024).toFixed(2)}MB`
|
||||
: scope.row.Size && scope.row.Size > 0
|
||||
? `${(scope.row.Size / 1024 / 1024).toFixed(2)}MB`
|
||||
: 0
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
width="100"
|
||||
>
|
||||
<el-table-column :label="$t('common:action:action')" width="100">
|
||||
<template slot-scope="scope">
|
||||
<!-- 删除 -->
|
||||
<el-button
|
||||
circle
|
||||
:title="$t('trials:readingPeriod:cd:action:deleteFile')"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDeleteFile(scope.$index,scope.row)"
|
||||
@click="handleDeleteFile(scope.$index, scope.row)"
|
||||
/>
|
||||
<!-- 下载 -->
|
||||
<el-button
|
||||
v-if="type === 'consistencyAnalysis'"
|
||||
circle
|
||||
:title="$t('trials:readingPeriod:cd:action:upload')"
|
||||
icon="el-icon-download"
|
||||
@click="handleUploadFile(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
|
||||
</div>
|
||||
<div
|
||||
class="base-dialog-footer"
|
||||
style="text-align:right;margin-top:10px;"
|
||||
>
|
||||
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||
<el-form-item>
|
||||
<!-- 取消 -->
|
||||
<el-button
|
||||
|
@ -126,7 +139,7 @@
|
|||
type="primary"
|
||||
@click="close"
|
||||
>
|
||||
{{ $t('common:button:cancel') }}
|
||||
{{ $t("common:button:cancel") }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
|
@ -135,185 +148,257 @@
|
|||
:loading="btnLoading"
|
||||
@click="save"
|
||||
>
|
||||
{{ $t('common:button:save') }}
|
||||
{{ $t("common:button:save") }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { getTrialClinicalDataSelect,
|
||||
addOrUpdateReadingClinicalData, uploadClinicalData, DownloadTrialClinicalFile } from '@/api/trials'
|
||||
import {
|
||||
getTrialClinicalDataSelect,
|
||||
addOrUpdateReadingClinicalData,
|
||||
addOrUpdateConsistencyAnalysisReadingClinicalData,
|
||||
} from "@/api/trials";
|
||||
import { fileDownload } from "@/utils/uploadZip.js";
|
||||
export default {
|
||||
name: 'AddOrUpdateClinicalData',
|
||||
name: "AddOrUpdateClinicalData",
|
||||
props: {
|
||||
trialReadingCriterionId: {
|
||||
type: String,
|
||||
default: ''
|
||||
default: "",
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default() { return {} }
|
||||
}
|
||||
default() {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
type: {
|
||||
default: "readingPeriod",
|
||||
},
|
||||
option: {
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
faccept: ['.pdf'],
|
||||
faccept: [".pdf"],
|
||||
form: {
|
||||
Id: '',
|
||||
TrialId: '',
|
||||
SubjectId: '',
|
||||
ReadingId: '',
|
||||
ClinicalDataTrialSetId: '',
|
||||
Id: "",
|
||||
TrialId: "",
|
||||
SubjectId: "",
|
||||
ReadingId: "",
|
||||
ClinicalDataTrialSetId: "",
|
||||
IsVisist: true,
|
||||
AddFileList: [],
|
||||
DeleteFileIds: [],
|
||||
FileList: []
|
||||
FileList: [],
|
||||
},
|
||||
rules: {
|
||||
ClinicalDataTrialSetId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }]
|
||||
ClinicalDataTrialSetId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:select"),
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
},
|
||||
loading: false,
|
||||
btnLoading: false,
|
||||
clinicalDatas: [],
|
||||
pendingUploadList: [],
|
||||
pendingDeleteList: [],
|
||||
currentTpl: { id: '', isExist: false }
|
||||
}
|
||||
currentTpl: { id: "", isExist: false },
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
this.initForm();
|
||||
},
|
||||
methods: {
|
||||
// 下载临床数据
|
||||
handleUploadFile(row) {
|
||||
let href = this.OSSclientConfig.basePath + row.Path;
|
||||
let name = row.FileName;
|
||||
fileDownload(href, name);
|
||||
},
|
||||
async initForm() {
|
||||
await this.getClinicalDatas()
|
||||
if (this.type === "readingPeriod") {
|
||||
await this.getClinicalDatas();
|
||||
} else {
|
||||
this.clinicalDatas = this.option;
|
||||
}
|
||||
if (Object.keys(this.data).length > 0) {
|
||||
for (const k in this.form) {
|
||||
if (this.data.hasOwnProperty(k)) {
|
||||
this.form[k] = this.data[k]
|
||||
this.form[k] = this.data[k];
|
||||
}
|
||||
}
|
||||
this.handleClinicalDataSetChange(this.form.ClinicalDataTrialSetId)
|
||||
this.fileList = this.form.FileList.concat()
|
||||
this.handleClinicalDataSetChange(this.form.ClinicalDataTrialSetId);
|
||||
this.fileList = this.form.FileList.concat();
|
||||
}
|
||||
},
|
||||
save() {
|
||||
this.$refs.clinicalDataForm.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$refs.clinicalDataForm.validate((valid) => {
|
||||
if (!valid) return;
|
||||
if (this.fileList.length === 0) {
|
||||
// 请上传文件!
|
||||
this.$alert(this.$t('trials:readingPeriod:cd:message:uploadFile'))
|
||||
return
|
||||
this.$alert(this.$t("trials:readingPeriod:cd:message:uploadFile"));
|
||||
return;
|
||||
}
|
||||
this.pendingUploadList = []
|
||||
this.pendingUploadList = [];
|
||||
for (let i = 0; i < this.fileList.length; ++i) {
|
||||
if (this.fileList[i].Status === 0) {
|
||||
this.pendingUploadList.push(this.fileList[i].Files)
|
||||
this.pendingUploadList.push(this.fileList[i].Files);
|
||||
}
|
||||
}
|
||||
if (this.pendingUploadList.length > 0) {
|
||||
this.uploadFilesAndSave()
|
||||
this.uploadFilesAndSave();
|
||||
} else {
|
||||
this.saveClinicalData()
|
||||
this.saveClinicalData();
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
uploadFilesAndSave() {
|
||||
return new Promise(async(resolve, reject) => {
|
||||
this.form.AddFileList = []
|
||||
return new Promise(async (resolve, reject) => {
|
||||
this.form.AddFileList = [];
|
||||
for (var i = 0; i < this.pendingUploadList.length; ++i) {
|
||||
// const file = await this.convertBase64ToBlob(this.pendingUploadList[i])
|
||||
const file = await this.fileToBlob(this.pendingUploadList[i])
|
||||
const res = await this.OSSclient.put(`/${this.data.TrialId}/ClinicalData/${this.pendingUploadList[i].name}`, file)
|
||||
this.form.AddFileList.push({ fileName: this.pendingUploadList[i].name, path: this.$getObjectName(res.url) })
|
||||
const file = await this.fileToBlob(this.pendingUploadList[i]);
|
||||
const res = await this.OSSclient.put(
|
||||
`/${this.data.TrialId}/ClinicalData/${this.pendingUploadList[i].name}`,
|
||||
file
|
||||
);
|
||||
this.form.AddFileList.push({
|
||||
fileName: this.pendingUploadList[i].name,
|
||||
path: this.$getObjectName(res.url),
|
||||
size: this.pendingUploadList[i].size,
|
||||
type: this.pendingUploadList[i].type,
|
||||
});
|
||||
}
|
||||
this.saveClinicalData(this.form.AddFileList)
|
||||
resolve()
|
||||
})
|
||||
this.saveClinicalData(this.form.AddFileList);
|
||||
resolve();
|
||||
});
|
||||
},
|
||||
saveClinicalData() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.btnLoading = true
|
||||
this.form.DeleteFileIds = this.pendingDeleteList
|
||||
addOrUpdateReadingClinicalData(this.form).then(response => {
|
||||
this.btnLoading = false
|
||||
this.$emit('getList')
|
||||
this.$emit('close')
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
resolve()
|
||||
}).catch(() => {
|
||||
this.btnLoading = false
|
||||
reject()
|
||||
})
|
||||
})
|
||||
this.btnLoading = true;
|
||||
this.form.DeleteFileIds = this.pendingDeleteList;
|
||||
if (this.type === "consistencyAnalysis") {
|
||||
addOrUpdateConsistencyAnalysisReadingClinicalData(this.form)
|
||||
.then((response) => {
|
||||
this.btnLoading = false;
|
||||
this.$emit("getList");
|
||||
this.$emit("close");
|
||||
this.$message.success(
|
||||
this.$t("common:message:savedSuccessfully")
|
||||
);
|
||||
resolve();
|
||||
})
|
||||
.catch(() => {
|
||||
this.btnLoading = false;
|
||||
reject();
|
||||
});
|
||||
} else {
|
||||
addOrUpdateReadingClinicalData(this.form)
|
||||
.then((response) => {
|
||||
this.btnLoading = false;
|
||||
this.$emit("getList");
|
||||
this.$emit("close");
|
||||
this.$message.success(
|
||||
this.$t("common:message:savedSuccessfully")
|
||||
);
|
||||
resolve();
|
||||
})
|
||||
.catch(() => {
|
||||
this.btnLoading = false;
|
||||
reject();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
getClinicalDatas() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.loading = true
|
||||
this.loading = true;
|
||||
var param = {
|
||||
trialId: this.data.TrialId,
|
||||
IsVisit: this.data.IsVisit,
|
||||
ReadingId: this.data.ReadingId,
|
||||
SubjectId: this.data.SubjectId,
|
||||
ReadingClinicalDataId: this.data.Id ? this.data.Id : '',
|
||||
ReadingClinicalDataId: this.data.Id ? this.data.Id : "",
|
||||
IsBaseLine: this.data.IsBaseLine,
|
||||
TrialReadingCriterionId: this.trialReadingCriterionId
|
||||
}
|
||||
getTrialClinicalDataSelect(param).then(res => {
|
||||
this.clinicalDatas = res.Result
|
||||
this.loading = false
|
||||
resolve()
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
reject()
|
||||
})
|
||||
})
|
||||
TrialReadingCriterionId: this.trialReadingCriterionId,
|
||||
};
|
||||
getTrialClinicalDataSelect(param)
|
||||
.then((res) => {
|
||||
this.clinicalDatas = res.Result;
|
||||
this.loading = false;
|
||||
resolve();
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
reject();
|
||||
});
|
||||
});
|
||||
},
|
||||
handleDeleteFile(index, row) {
|
||||
this.$confirm(this.$t('trials:readingPeriod:cd:message:delete'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
this.$confirm(this.$t("trials:readingPeriod:cd:message:delete"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
})
|
||||
.then(() => {
|
||||
if (row.Id) {
|
||||
this.pendingDeleteList.push(row.Id)
|
||||
this.pendingDeleteList.push(row.Id);
|
||||
}
|
||||
this.fileList.splice(index, 1)
|
||||
}).catch(() => {})
|
||||
this.fileList.splice(index, 1);
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
beginScanFiles(e) {
|
||||
var files = e.target.files
|
||||
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()
|
||||
const fileName = files[i].name;
|
||||
var extendName = fileName
|
||||
.substring(fileName.lastIndexOf("."))
|
||||
.toLocaleLowerCase();
|
||||
if (this.faccept.indexOf(extendName) !== -1) {
|
||||
this.fileList.push({ FileName: fileName, Path: '', Status: 0, Files: files[i], size:files[i].size, type:fileName.split('.')[1] })
|
||||
this.fileList.push({
|
||||
FileName: fileName,
|
||||
Path: "",
|
||||
Status: 0,
|
||||
Files: files[i],
|
||||
size: files[i].size,
|
||||
type: fileName.split(".")[1],
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
handleClinicalDataSetChange(v) {
|
||||
var index = this.clinicalDatas.findIndex(item => item.Id === v)
|
||||
var index = this.clinicalDatas.findIndex((item) => item.Id === v);
|
||||
if (index > -1) {
|
||||
this.currentTpl.id = this.clinicalDatas[index].Id
|
||||
this.currentTpl.path = this.clinicalDatas[index].Path
|
||||
this.currentTpl.isExist = !!this.clinicalDatas[index].FileName
|
||||
this.currentTpl.id = this.clinicalDatas[index].Id;
|
||||
this.currentTpl.path = this.clinicalDatas[index].Path;
|
||||
this.currentTpl.isExist = !!this.clinicalDatas[index].FileName;
|
||||
}
|
||||
},
|
||||
handleDownloadTpl() {
|
||||
this.loading = true
|
||||
window.open(this.OSSclientConfig.basePath + this.currentTpl.path, '_blank')
|
||||
this.loading = false
|
||||
this.loading = true;
|
||||
window.open(
|
||||
this.OSSclientConfig.basePath + this.currentTpl.path,
|
||||
"_blank"
|
||||
);
|
||||
this.loading = false;
|
||||
// DownloadTrialClinicalFile(this.currentTpl.id).then(data => {
|
||||
// this.loading = false
|
||||
// }).catch(() => { this.loading = false })
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$emit("close");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue