融合视口crosshairsTool更改;数据同步页面更改;项目中培训文档路径更改
continuous-integration/drone/push Build is passing Details

uat_us
caiyiling 2026-04-21 16:49:40 +08:00
parent a7e7419a20
commit c4fd8c3ea3
8 changed files with 143 additions and 34 deletions

View File

@ -56,6 +56,7 @@ async function ossGenerateSTS() {
const urlParams = new URLSearchParams(window.location.search)
const trialId = urlParams.get('trialId')
if (Object.keys(fileInfo).length !== 0) {
fileInfo.fileType = mimeTypeToExt(fileInfo.fileType)
let params = Object.assign({path: objectName}, fileInfo)
addOrUpdateFileUploadRecord(params)
} else if (trialId) {
@ -108,6 +109,7 @@ async function ossGenerateSTS() {
const urlParams = new URLSearchParams(window.location.search)
const trialId = urlParams.get('trialId')
if (Object.keys(fileInfo).length !== 0) {
fileInfo.fileType = mimeTypeToExt(fileInfo.fileType)
let params = Object.assign({path: data.path}, fileInfo)
addOrUpdateFileUploadRecord(params)
} else if (trialId) {
@ -235,6 +237,7 @@ function uploadAWS(aws, data, progress, fileInfo) {
const trialId = urlParams.get('trialId')
if (Object.keys(fileInfo).length !== 0) {
fileInfo.fileType = mimeTypeToExt(fileInfo.fileType)
let params = Object.assign({path: decodeUtf8(curPath)}, fileInfo)
addOrUpdateFileUploadRecord(params)
} else if (trialId) {
@ -350,5 +353,37 @@ function isCredentialsExpired(credentials) {
return expireDate.getTime() - now.getTime() <= 300000;
}
function mimeTypeToExt(mimeType) {
const map = {
// 图片
'image/jpeg': '.jpg',
'image/jpg': '.jpg',
'image/png': '.png',
'image/gif': '.gif',
'image/webp': '.webp',
'image/svg+xml': '.svg',
'image/bmp': '.bmp',
// 文档
'application/dicom': '.dcm',
'application/pdf': '.pdf',
'application/msword': '.doc',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': '.docx',
'application/vnd.ms-excel': '.xls',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': '.xlsx',
'application/vnd.ms-powerpoint': '.ppt',
'application/vnd.openxmlformats-officedocument.presentationml.presentation': '.pptx',
'text/plain': '.txt',
// 音频/视频
'audio/mpeg': '.mp3',
'audio/wav': '.wav',
'video/mp4': '.mp4',
'video/mpeg': '.mpeg',
// 压缩包
'application/zip': '.zip',
'application/x-rar-compressed': '.rar',
'application/x-7z-compressed': '.7z',
};
return map[mimeType] || ''; // 找不到返回空字符串
}
export const OSSclient = ossGenerateSTS

View File

@ -840,7 +840,6 @@ export default {
this.sliderInfo.isMove = false
},
handletoolsMouseWheel(e) {
if (this.activeTool === 'Crosshairs') return
const { viewportId, wheel } = e.detail
if (this.isMip) {
const container = document.getElementById('rotateBar')
@ -864,7 +863,6 @@ export default {
this.rotateBarInfo.isMove = false
},
rotateBarMousemove(e) {
if (this.activeTool === 'Crosshairs') return
//
if (!this.rotateBarInfo.isMove) return
const container = document.getElementById('rotateBar')
@ -875,13 +873,12 @@ export default {
if (x < 0) x = 0
if (x > containerWidth - sliderWidth) x = containerWidth - sliderWidth
const deltaX = x - this.rotateBarLeft
// const angle = Math.sin((deltaX * (360 / (containerWidth - sliderWidth))) * Math.PI / 180)
const angle = (deltaX / (containerWidth - sliderWidth)) * (2 * Math.PI)
const angle = Math.sin((deltaX * (360 / (containerWidth - sliderWidth))) * Math.PI / 180)
// const angle = (deltaX / (containerWidth - sliderWidth)) * (2 * Math.PI)
this.rotate(angle)
this.rotateBarLeft = x
},
rotateBarMousedown(e) {
if (this.activeTool === 'Crosshairs') return
this.rotateBarInfo.initLeft = e.srcElement.offsetLeft
this.rotateBarInfo.initX = e.clientX
this.rotateBarInfo.isMove = true
@ -920,7 +917,6 @@ export default {
viewport.render()
},
clickRotate(e) {
if (this.activeTool === 'Crosshairs') return
// console.log('clickRotate')
const container = document.getElementById('rotateBar')
const containerWidth = container.offsetWidth
@ -928,8 +924,8 @@ export default {
const sliderWidth = slider.offsetWidth
const x = Math.trunc(e.offsetX)
const deltaX = x - this.rotateBarLeft
// const angle = Math.sin((deltaX * (360 / (containerWidth - sliderWidth))) * Math.PI / 180)
const angle = (deltaX / (containerWidth - sliderWidth)) * (2 * Math.PI)
const angle = Math.sin((deltaX * (360 / (containerWidth - sliderWidth))) * Math.PI / 180)
// const angle = (deltaX / (containerWidth - sliderWidth)) * (2 * Math.PI)
this.rotate(angle)
this.rotateBarLeft = x
},

View File

@ -1605,8 +1605,9 @@ export default {
});
} else if (toolGroupId === this.fusionToolGroupId) {
toolGroup.addTool(CrosshairsTool.toolName, {
getReferenceLineColor: this.setCrosshairsToolLineColor,
getReferenceLineSlabThicknessControlsOn: () => false
getReferenceLineColor: this.setFusionCrosshairsToolLineColor,
getReferenceLineSlabThicknessControlsOn: () => false,
minimal: { enabled: true, lineLengthInPx: 10000 }
});
} else {
toolGroup.addTool(WindowLevelTool.toolName)
@ -1665,8 +1666,13 @@ export default {
targetViewportIds: fusionViewportIds.filter((id) => id !== viewportId)
})
// Set the initial state of the tools, here we set one tool active on left click.
// This means left click will draw that tool.
toolGroup.setToolActive(VolumeRotateTool.toolName, {
bindings: [
{
mouseButton: MouseBindings.Wheel,
},
]
})
toolGroup.setToolActive(MIPJumpToClickTool.toolName, {
bindings: [
{
@ -2267,6 +2273,22 @@ export default {
let index = viewportId.split("-").pop()
return colors[colors.length - 1 - Number(index)] || colors[0]
},
setFusionCrosshairsToolLineColor(viewportId) {
let colors = [
'#fb628b',
'#fb628b',
'#fb628b',
'#ffd10a',
'#b6d634',
]
if (viewportId === 'viewport-fusion-hidden-sag') {
return colors[colors.length - 1]
} else {
let index = viewportId.split("-").pop()
return colors[Number(index)] || colors[0]
}
},
getLengthToolTextLines(data, targetId) {
const cachedVolumeStats = data.cachedStats[targetId]
const { length, unit } = cachedVolumeStats
@ -2573,7 +2595,7 @@ export default {
if (toolName === CrosshairsTool.toolName) {
toolGroup.setToolDisabled(this.activeTool)
this.setFusionMipJumpEnabled(true)
this.setFusionMipRotateEnabled(true)
// this.setFusionMipRotateEnabled(true)
} else {
toolGroup.setToolPassive(this.activeTool)
}
@ -2583,7 +2605,7 @@ export default {
if (this.activeTool === CrosshairsTool.toolName) {
toolGroup.setToolDisabled(this.activeTool)
this.setFusionMipJumpEnabled(true)
this.setFusionMipRotateEnabled(true)
// this.setFusionMipRotateEnabled(true)
} else {
toolGroup.setToolPassive(this.activeTool)
}
@ -2608,7 +2630,7 @@ export default {
// }
}
this.setFusionMipJumpEnabled(false)
this.setFusionMipRotateEnabled(false)
// this.setFusionMipRotateEnabled(false)
}
this.activeTool = toolName
}
@ -2624,7 +2646,9 @@ export default {
this.setFusionMipJumpEnabled(false)
if (isMip) {
if (toolGroup.hasTool(VolumeRotateTool.toolName)) {
toolGroup.setToolDisabled(VolumeRotateTool.toolName)
toolGroup.setToolActive(VolumeRotateTool.toolName, {
bindings: [{ mouseButton: MouseBindings.Wheel }]
})
}
if (toolGroup.hasTool(StackScrollTool.toolName)) {
toolGroup.setToolDisabled(StackScrollTool.toolName)

View File

@ -121,7 +121,7 @@ export default {
this.loading = true
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(
`/${this.$route.query.trialId}/DocumentToSign/${param.file.name}${new Date().getTime()}`,
`/${this.$route.query.trialId}/DocumentToSign/${param.file.name}`,
file
)
this.fileList.push({

View File

@ -201,7 +201,7 @@ export default {
this.loading = true
var file = await this.fileToBlob(param.file)
const trialId = this.$route.query.trialId
const res = await this.OSSclient.put(`/${trialId}/DocumentToSign/${param.file.name}${new Date().getTime()}`, file)
const res = await this.OSSclient.put(`/${trialId}/DocumentToSign/${param.file.name}`, file)
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url) })
this.form.Path = this.$getObjectName(res.url)
this.form.Name = param.file.name

View File

@ -178,9 +178,11 @@ export default {
try {
this.loading = true
this.searchData.TrialId = this.$route.query.trialId
if (Object.keys(this.rowInfo).length !== 0) {
this.searchData.StudyCode = this.rowInfo.StudyCode
this.searchData.SubjectCode = this.rowInfo.SubjectCode
this.searchData.VisitName = this.rowInfo.VisitName
}
let res = await getUploadFileSyncRecordList(this.searchData)
this.loading = false

View File

@ -4,9 +4,27 @@
<StudyList v-if="activeTab === 'study'"/>
</el-tab-pane>
<el-tab-pane label="其他" name="other">
<FileList v-if="activeTab === 'other'" :dataFileType="2" @openTaskTable="openTaskTable"/>
<!-- <FileList v-if="activeTab === 'other'" :dataFileType="2" @openTaskTable="openTaskTable"/> -->
<el-tabs v-if="activeTab === 'other'" class="detail-tabs" v-model="tabInfo.activeTab" @tab-click="handleDetailTabClick">
<el-tab-pane label="文件级别" name="file">
<!-- v-if="tabInfo.activeTab === 'file'" -->
<FileList
v-if="tabInfo.activeTab === 'file'"
:dataFileType="2"
@openTaskTable="openTaskTable"
/>
</el-tab-pane>
<el-dialog
<el-tab-pane label="任务级别" name="task">
<TaskList
v-if="tabInfo.activeTab === 'task'"
:rowInfo="tabInfo.currentRow"
:fileUploadRecordId="fileUploadRecordId"
:path="path"
/>
</el-tab-pane>
</el-tabs>
</el-tab-pane>
<!-- <el-dialog
v-if="detailDialog.visible"
:visible.sync="detailDialog.visible"
fullscreen
@ -21,7 +39,7 @@
:fileUploadRecordId="detailDialog.currentRow.Id"
:path="detailDialog.currentRow.Path"
/>
</el-dialog>
</el-dialog> -->
</el-tabs>
</template>
<script>
@ -38,18 +56,29 @@ export default {
data(){
return {
activeTab: 'study',
detailDialog: {
visible: false,
tabInfo: {
title: '详情',
activeTab: 'file',
currentRow: null
},
fileUploadRecordId: '',
path: ''
}
},
methods: {
openTaskTable(obj) {
this.detailDialog.currentRow = obj || null
this.detailDialog.visible = true
this.tabInfo.currentRow = obj || null
this.fileUploadRecordId = obj.Id
this.path = obj.Path
this.tabInfo.activeTab = 'task'
},
handleDetailTabClick(tab) {
const name = tab.name
if (name === 'file') {
this.fileUploadRecordId = ''
this.path = ''
}
},
}
}
</script>
@ -57,14 +86,15 @@ export default {
.data-sync-tabs{
height: 100%;
background-color: #fff;
.el-tabs__header {
> .el-tabs__header {
height: 100%;
}
.el-tabs__content {
> .el-tabs__content {
height: 100%;
padding: 0px;
overflow: auto;
}
.el-tab-pane {
> .el-tabs__content > .el-tab-pane {
height: 100%;
}
}
@ -92,4 +122,26 @@ export default {
}
}
}
.detail-tabs {
height: 100%;
display: flex;
flex-direction: column;
min-height: 0;
.el-tabs__header {
flex: 0 0 auto;
margin: 0 0 8px;
}
.el-tabs__content {
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
.el-tab-pane {
flex: 1 1 auto;
min-height: 0;
height: 100%;
}
}
</style>