Compare commits

..

No commits in common. "83b6c9f2cc22f5ed96abfa4c80f78aae8c901a3d" and "8bfaf7241a6fdec91aa39066c1b66059c50d5028" have entirely different histories.

2 changed files with 166 additions and 175 deletions

View File

@ -14,7 +14,7 @@
icon="el-icon-delete" icon="el-icon-delete"
@click="handleBatchDelete" @click="handleBatchDelete"
> >
{{ $t('trials:uploadedDicoms:action:delete') }} {{ $t("trials:uploadedDicoms:action:delete") }}
</el-button> </el-button>
<!-- 预览 --> <!-- 预览 -->
<el-button <el-button
@ -24,7 +24,7 @@
icon="el-icon-view" icon="el-icon-view"
@click="handlePreviewAllFiles" @click="handlePreviewAllFiles"
> >
{{ $t('trials:uploadedDicoms:action:preview') }} {{ $t("trials:uploadedDicoms:action:preview") }}
</el-button> </el-button>
</div> </div>
<el-table <el-table
@ -47,12 +47,6 @@
min-width="80" min-width="80"
show-overflow-tooltip show-overflow-tooltip
/> />
<!-- 检查名称 -->
<el-table-column
v-if="relationInfo.IsShowStudyName"
prop="StudyName"
:label="$t('trials:audit:table:StudyName')"
/>
<!-- 检查类型 --> <!-- 检查类型 -->
<el-table-column <el-table-column
prop="ModalityForEdit" prop="ModalityForEdit"
@ -96,7 +90,7 @@
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ moment(scope.row.StudyTime).format('YYYY-MM-DD') }} {{ moment(scope.row.StudyTime).format("YYYY-MM-DD") }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 上传时间 --> <!-- 上传时间 -->
@ -229,9 +223,7 @@
v-for="bodyPart in trialBodyPartTypes" v-for="bodyPart in trialBodyPartTypes"
:key="bodyPart" :key="bodyPart"
:label="bodyPart" :label="bodyPart"
>{{ >{{ $fd("Bodypart", bodyPart,'Code',BodyPart,'Name') }}</el-checkbox
$fd('Bodypart', bodyPart, 'Code', BodyPart, 'Name')
}}</el-checkbox
> >
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
@ -266,7 +258,7 @@
type="primary" type="primary"
@click="editStudyInfoVisible = false" @click="editStudyInfoVisible = false"
> >
{{ $t('common:button:cancel') }} {{ $t("common:button:cancel") }}
</el-button> </el-button>
<el-button <el-button
:loading="btnLoading" :loading="btnLoading"
@ -274,7 +266,7 @@
type="primary" type="primary"
@click="handleUpdateStudyInfo" @click="handleUpdateStudyInfo"
> >
{{ $t('common:button:save') }} {{ $t("common:button:save") }}
</el-button> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -299,18 +291,18 @@ import {
getSubjectVisitUploadedStudyList, getSubjectVisitUploadedStudyList,
deleteStudyList, deleteStudyList,
updateModality, updateModality,
} from '@/api/trials' } from "@/api/trials";
import moment from 'moment' import moment from "moment";
import { getToken } from '@/utils/auth' import { getToken } from "@/utils/auth";
import uploadPetClinicalData from './uploadPetClinicalData.vue' import uploadPetClinicalData from "./uploadPetClinicalData.vue";
export default { export default {
name: 'StudyInfo', name: "StudyInfo",
components: { uploadPetClinicalData }, components: { uploadPetClinicalData },
props: { props: {
data: { data: {
type: Object, type: Object,
default() { default() {
return {} return {};
}, },
}, },
}, },
@ -318,12 +310,12 @@ export default {
return { return {
editStudyInfoVisible: false, editStudyInfoVisible: false,
studyForm: { studyForm: {
StudyCode: '', StudyCode: "",
IsDicomData: true, IsDicomData: true,
Modalities: '', Modalities: "",
BodyPartForEdit: [], BodyPartForEdit: [],
SeriesCount: null, SeriesCount: null,
StudyTime: '', StudyTime: "",
}, },
deleteArr: [], deleteArr: [],
studyLoading: false, studyLoading: false,
@ -339,187 +331,189 @@ export default {
petVisible: false, petVisible: false,
rowData: {}, rowData: {},
BodyPart: {}, BodyPart:{}
} };
}, },
async mounted() { async mounted() {
this.getStudyInfo() this.getStudyInfo();
this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId) this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId)
}, },
methods: { methods: {
// //
handlePreviewClinicalData(row) { handlePreviewClinicalData(row) {
this.rowData = row this.rowData = row;
this.petVisible = true this.petVisible = true;
}, },
// //
handleEditStudy(row) { handleEditStudy(row) {
this.editStudyInfoVisible = true this.editStudyInfoVisible = true;
this.studyForm = { ...row } this.studyForm = { ...row };
var bodyPart = [] var bodyPart = [];
if (this.studyForm.BodyPartForEdit.indexOf('|') !== -1) { if (this.studyForm.BodyPartForEdit.indexOf("|") !== -1) {
bodyPart = this.studyForm.BodyPartForEdit.split('|') bodyPart = this.studyForm.BodyPartForEdit.split("|");
} else if (this.studyForm.BodyPartForEdit !== '') { } else if (this.studyForm.BodyPartForEdit !== "") {
bodyPart.push(this.studyForm.BodyPartForEdit) bodyPart.push(this.studyForm.BodyPartForEdit);
} }
this.studyForm.BodyPartForEdit = bodyPart this.studyForm.BodyPartForEdit = bodyPart;
}, },
// / // /
handleUpdateStudyInfo() { handleUpdateStudyInfo() {
this.$refs['studyForm'].validate((valid) => { this.$refs["studyForm"].validate((valid) => {
if (!valid) return if (!valid) return;
this.btnLoading = true this.btnLoading = true;
this.studyForm.BodyPart = this.studyForm.BodyPartForEdit.join('|') this.studyForm.BodyPart = this.studyForm.BodyPartForEdit.join("|");
this.studyForm.Modality = this.studyForm.Modalities this.studyForm.Modality = this.studyForm.Modalities;
var params = { var params = {
id: this.studyForm.StudyId, id: this.studyForm.StudyId,
subjectVisitId: this.data.Id, subjectVisitId: this.data.Id,
type: 1, type: 1,
modality: this.studyForm.Modality, modality: this.studyForm.Modality,
bodyPart: this.studyForm.BodyPart, bodyPart: this.studyForm.BodyPart,
} };
updateModality(this.data.TrialId, params) updateModality(this.data.TrialId, params)
.then((res) => { .then((res) => {
this.btnLoading = false this.btnLoading = false;
if (res.IsSuccess) { if (res.IsSuccess) {
this.getStudyInfo() this.getStudyInfo();
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(
this.editStudyInfoVisible = false this.$t("common:message:savedSuccessfully")
);
this.editStudyInfoVisible = false;
} }
}) })
.catch(() => { .catch(() => {
this.btnLoading = false this.btnLoading = false;
}) });
}) });
}, },
getStudyInfo() { getStudyInfo() {
this.studyLoading = true this.studyLoading = true;
getSubjectVisitUploadedStudyList(this.data.Id) getSubjectVisitUploadedStudyList(this.data.Id)
.then((res) => { .then((res) => {
this.studyList = res.Result this.studyList = res.Result;
this.studyLoading = false this.studyLoading = false;
this.relationInfo = res.OtherInfo this.relationInfo = res.OtherInfo;
console.log(this.relationInfo) console.log(this.relationInfo);
this.trialBodyPartTypes = this.relationInfo.BodyPartTypes this.trialBodyPartTypes = this.relationInfo.BodyPartTypes
? this.relationInfo.BodyPartTypes.split('|') ? this.relationInfo.BodyPartTypes.split("|")
: [] : [];
this.trialModalitys = this.relationInfo.Modalitys this.trialModalitys = this.relationInfo.Modalitys
? this.relationInfo.Modalitys.split('|') ? this.relationInfo.Modalitys.split("|")
: [] : [];
console.log(this.trialBodyPartTypes) console.log(this.trialBodyPartTypes);
console.log(this.trialModalitys) console.log(this.trialModalitys);
}) })
.catch(() => { .catch(() => {
this.studyLoading = false this.studyLoading = false;
}) });
}, },
// //
handleBatchDelete() { handleBatchDelete() {
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.studyLoading = true this.studyLoading = true;
deleteStudyList(this.trialId, this.data.Id, this.deleteArr) deleteStudyList(this.trialId, this.data.Id, this.deleteArr)
.then((res) => { .then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.getStudyInfo() this.getStudyInfo();
this.$emit('getList') this.$emit("getList");
this.$message.success( this.$message.success(
this.$t('trials:uploadedDicoms:message:deleteSuccessfully') this.$t("trials:uploadedDicoms:message:deleteSuccessfully")
) );
} }
}) })
.catch(() => { .catch(() => {
this.studyLoading = true this.studyLoading = true;
});
}) })
}) .catch(() => {});
.catch(() => {})
}, },
// //
handlePreviewAllFiles() { handlePreviewAllFiles() {
var tokenKey = getToken() var tokenKey = getToken();
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
path: `/showvisitdicoms?trialId=${this.data.TrialId}&visitInfo=${this.data.VisitName}(${this.data.VisitNum})&subjectVisitId=${this.data.Id}&isFromCRCUpload=1&TokenKey=${tokenKey}`, path: `/showvisitdicoms?trialId=${this.data.TrialId}&visitInfo=${this.data.VisitName}(${this.data.VisitNum})&subjectVisitId=${this.data.Id}&isFromCRCUpload=1&TokenKey=${tokenKey}`,
}) });
var newWindow = window.open(routeData.href, '_blank') var newWindow = window.open(routeData.href, "_blank");
this.$emit('setOpenWindow', newWindow) this.$emit("setOpenWindow", newWindow);
}, },
// //
handleViewStudy(row) { handleViewStudy(row) {
var token = getToken() var token = getToken();
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
path: `/showdicom?studyId=${row.StudyId}&isFromCRCUpload=1&TokenKey=${token}&type=Study`, path: `/showdicom?studyId=${row.StudyId}&isFromCRCUpload=1&TokenKey=${token}&type=Study`,
}) });
var newWindow = window.open(routeData.href, '_blank') var newWindow = window.open(routeData.href, "_blank");
this.$emit('setOpenWindow', newWindow) this.$emit("setOpenWindow", newWindow);
}, },
// //
handleDeleteStudy(row) { handleDeleteStudy(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.studyLoading = true this.studyLoading = true;
deleteStudyList(this.trialId, this.data.Id, [row.StudyId]) deleteStudyList(this.trialId, this.data.Id, [row.StudyId])
.then((res) => { .then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.getStudyInfo() this.getStudyInfo();
this.$emit('getList') this.$emit("getList");
this.$message.success( this.$message.success(
this.$t('trials:uploadedDicoms:message:deleteSuccessfully') this.$t("trials:uploadedDicoms:message:deleteSuccessfully")
) );
} }
}) })
.catch(() => { .catch(() => {
this.studyLoading = true this.studyLoading = true;
});
}) })
}) .catch(() => {});
.catch(() => {})
}, },
getBodyPart(bodyPart) { getBodyPart(bodyPart) {
if (!bodyPart) return '' if (!bodyPart) return "";
var separator = ',' var separator = ",";
if (bodyPart.indexOf('|') > -1) { if (bodyPart.indexOf("|") > -1) {
separator = '|' separator = "|";
} else if (bodyPart.indexOf(',') > -1) { } else if (bodyPart.indexOf(",") > -1) {
separator = ',' separator = ",";
} else if (bodyPart.indexOf('') > -1) { } else if (bodyPart.indexOf("") > -1) {
separator = '' separator = "";
} }
var arr = bodyPart.split(separator) var arr = bodyPart.split(separator);
var newArr = arr.map((i) => { var newArr = arr.map(i => {
return this.$fd('Bodypart', i.trim(), 'Code', this.BodyPart, 'Name') return this.$fd('Bodypart', i.trim(),'Code',this.BodyPart,'Name')
}) })
return newArr.join(' | ') return newArr.join(" | ");
}, },
// //
handleSelectionChange(val) { handleSelectionChange(val) {
this.deleteArr = [] this.deleteArr = [];
val.forEach((item) => { val.forEach((item) => {
this.deleteArr.push(item.StudyId) this.deleteArr.push(item.StudyId);
}) });
}, },
// //
hasDeleted(row) { hasDeleted(row) {
if (row.IsDeleted) { if (row.IsDeleted) {
return false return false;
} else { } else {
return true return true;
} }
}, },
// //
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (row.IsDeleted) { if (row.IsDeleted) {
return 'delete-row' return "delete-row";
} else { } else {
return '' return "";
} }
}, },
}, },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
.study-info { .study-info {

View File

@ -9,7 +9,7 @@
icon="el-icon-view" icon="el-icon-view"
@click="handlePreviewAllFiles" @click="handlePreviewAllFiles"
> >
{{ $t('trials:audit:action:preview') }} {{ $t("trials:audit:action:preview") }}
</el-button> </el-button>
</div> </div>
<el-table <el-table
@ -46,12 +46,6 @@
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<!-- &lt;!&ndash; 检查类型 &ndash;&gt;--> <!-- &lt;!&ndash; 检查类型 &ndash;&gt;-->
<!-- 检查名称 -->
<el-table-column
v-if="relationInfo.IsShowStudyName"
prop="StudyName"
:label="$t('trials:audit:table:StudyName')"
/>
<el-table-column <el-table-column
prop="ModalityForEdit" prop="ModalityForEdit"
:label="$t('trials:audit:table:modality')" :label="$t('trials:audit:table:modality')"
@ -94,7 +88,7 @@
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ moment(scope.row.StudyTime).format('YYYY-MM-DD') }} {{ moment(scope.row.StudyTime).format("YYYY-MM-DD") }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 上传时间 --> <!-- 上传时间 -->
@ -150,24 +144,27 @@
</div> </div>
</template> </template>
<script> <script>
import { getSubjectVisitUploadedStudyList, deleteStudyList } from '@/api/trials' import {
import { getToken } from '@/utils/auth' getSubjectVisitUploadedStudyList,
import uploadPetClinicalData from '@/views/trials/trials-panel/visit/crc-upload/components/uploadPetClinicalData.vue' deleteStudyList,
import moment from 'moment' } from "@/api/trials";
import { getToken } from "@/utils/auth";
import uploadPetClinicalData from "@/views/trials/trials-panel/visit/crc-upload/components/uploadPetClinicalData.vue";
import moment from "moment";
export default { export default {
name: 'StudyInfo', name: "StudyInfo",
components: { uploadPetClinicalData }, components: { uploadPetClinicalData },
props: { props: {
data: { data: {
type: Object, type: Object,
default() { default() {
return {} return {};
}, },
}, },
}, },
data() { data() {
return { return {
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1, userTypeEnumInt: zzSessionStorage.getItem("userTypeEnumInt") * 1,
deleteArr: [], deleteArr: [],
studyLoading: false, studyLoading: false,
studyList: [], studyList: [],
@ -178,117 +175,117 @@ export default {
rowData: {}, rowData: {},
relationInfo: {}, relationInfo: {},
bp: [], bp: [],
} };
}, },
async mounted() { async mounted() {
this.getStudyInfo() this.getStudyInfo();
this.bp = await this.$getBodyPart(this.$route.query.trialId) this.bp = await this.$getBodyPart(this.$route.query.trialId);
}, },
methods: { methods: {
// //
handlePreviewClinicalData(row) { handlePreviewClinicalData(row) {
this.rowData = row this.rowData = row;
this.petVisible = true this.petVisible = true;
}, },
getStudyInfo() { getStudyInfo() {
this.studyLoading = true this.studyLoading = true;
getSubjectVisitUploadedStudyList(this.data.Id) getSubjectVisitUploadedStudyList(this.data.Id)
.then((res) => { .then((res) => {
this.studyList = res.Result this.studyList = res.Result;
this.relationInfo = res.OtherInfo this.relationInfo = res.OtherInfo;
this.studyLoading = false this.studyLoading = false;
}) })
.catch(() => { .catch(() => {
this.studyLoading = false this.studyLoading = false;
}) });
}, },
// //
handleBatchDelete() { handleBatchDelete() {
this.$confirm(this.$t('trials:qcCheck:message:delete'), { this.$confirm(this.$t("trials:qcCheck:message:delete"), {
type: 'warning', type: "warning",
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}) })
.then(() => { .then(() => {
this.studyLoading = true this.studyLoading = true;
deleteStudyList(this.trialId, this.data.Id, this.deleteArr) deleteStudyList(this.trialId, this.data.Id, this.deleteArr)
.then((res) => { .then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.getStudyInfo() this.getStudyInfo();
this.$emit('getList') this.$emit("getList");
this.$message.success( this.$message.success(
this.$t('trials:qcCheck:message:deletedSuccessfully') this.$t("trials:qcCheck:message:deletedSuccessfully")
) );
} }
}) })
.catch(() => { .catch(() => {
this.studyLoading = true this.studyLoading = true;
});
}) })
}) .catch(() => {});
.catch(() => {})
}, },
// //
handlePreviewAllFiles() { handlePreviewAllFiles() {
var token = getToken() var token = getToken();
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
path: `/showvisitdicoms?trialId=${this.data.TrialId}&visitInfo=${this.data.VisitName}(${this.data.VisitNum})&subjectVisitId=${this.data.Id}&TokenKey=${token}`, path: `/showvisitdicoms?trialId=${this.data.TrialId}&visitInfo=${this.data.VisitName}(${this.data.VisitNum})&subjectVisitId=${this.data.Id}&TokenKey=${token}`,
}) });
window.open(routeData.href, '_blank') window.open(routeData.href, "_blank");
}, },
// //
handleViewStudy(row) { handleViewStudy(row) {
var token = getToken() var token = getToken();
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
path: `/showdicom?studyId=${row.StudyId}&TokenKey=${token}&type=Study`, path: `/showdicom?studyId=${row.StudyId}&TokenKey=${token}&type=Study`,
}) });
window.open(routeData.href, '_blank') window.open(routeData.href, "_blank");
}, },
getBodyPart(bodyPart) { getBodyPart(bodyPart) {
if (!bodyPart) return '' if (!bodyPart) return "";
var separator = ',' var separator = ",";
if (bodyPart.indexOf('|') > -1) { if (bodyPart.indexOf("|") > -1) {
separator = '|' separator = "|";
} else if (bodyPart.indexOf(',') > -1) { } else if (bodyPart.indexOf(",") > -1) {
separator = ',' separator = ",";
} else if (bodyPart.indexOf('') > -1) { } else if (bodyPart.indexOf("") > -1) {
separator = '' separator = "";
} }
var arr = bodyPart.split(separator) var arr = bodyPart.split(separator);
var newArr = arr.map((i) => { var newArr = arr.map((i) => {
return this.$fd( return this.$fd(
'Bodypart', "Bodypart",
i.trim(), i.trim(),
'Code', "Code",
{ Bodypart: this.bp }, { Bodypart: this.bp },
'Name' "Name"
) );
}) });
return newArr.join(' | ') return newArr.join(" | ");
}, },
// //
handleSelectionChange(val) { handleSelectionChange(val) {
this.deleteArr = [] this.deleteArr = [];
val.forEach((item) => { val.forEach((item) => {
this.deleteArr.push(item.StudyId) this.deleteArr.push(item.StudyId);
}) });
}, },
// //
hasDeleted(row) { hasDeleted(row) {
if (row.IsDeleted) { if (row.IsDeleted) {
return false return false;
} else { } else {
return true return true;
} }
}, },
// //
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (row.IsDeleted) { if (row.IsDeleted) {
return 'delete-row' return "delete-row";
} else { } else {
return '' return "";
} }
}, },
}, },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
.study-info { .study-info {