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

View File

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