融合视口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 urlParams = new URLSearchParams(window.location.search)
const trialId = urlParams.get('trialId') const trialId = urlParams.get('trialId')
if (Object.keys(fileInfo).length !== 0) { if (Object.keys(fileInfo).length !== 0) {
fileInfo.fileType = mimeTypeToExt(fileInfo.fileType)
let params = Object.assign({path: objectName}, fileInfo) let params = Object.assign({path: objectName}, fileInfo)
addOrUpdateFileUploadRecord(params) addOrUpdateFileUploadRecord(params)
} else if (trialId) { } else if (trialId) {
@ -108,6 +109,7 @@ async function ossGenerateSTS() {
const urlParams = new URLSearchParams(window.location.search) const urlParams = new URLSearchParams(window.location.search)
const trialId = urlParams.get('trialId') const trialId = urlParams.get('trialId')
if (Object.keys(fileInfo).length !== 0) { if (Object.keys(fileInfo).length !== 0) {
fileInfo.fileType = mimeTypeToExt(fileInfo.fileType)
let params = Object.assign({path: data.path}, fileInfo) let params = Object.assign({path: data.path}, fileInfo)
addOrUpdateFileUploadRecord(params) addOrUpdateFileUploadRecord(params)
} else if (trialId) { } else if (trialId) {
@ -235,6 +237,7 @@ function uploadAWS(aws, data, progress, fileInfo) {
const trialId = urlParams.get('trialId') const trialId = urlParams.get('trialId')
if (Object.keys(fileInfo).length !== 0) { if (Object.keys(fileInfo).length !== 0) {
fileInfo.fileType = mimeTypeToExt(fileInfo.fileType)
let params = Object.assign({path: decodeUtf8(curPath)}, fileInfo) let params = Object.assign({path: decodeUtf8(curPath)}, fileInfo)
addOrUpdateFileUploadRecord(params) addOrUpdateFileUploadRecord(params)
} else if (trialId) { } else if (trialId) {
@ -350,5 +353,37 @@ function isCredentialsExpired(credentials) {
return expireDate.getTime() - now.getTime() <= 300000; 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 export const OSSclient = ossGenerateSTS

View File

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

View File

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

View File

@ -121,7 +121,7 @@ export default {
this.loading = true this.loading = true
var file = await this.fileToBlob(param.file) var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put( 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 file
) )
this.fileList.push({ this.fileList.push({

View File

@ -201,7 +201,7 @@ export default {
this.loading = true this.loading = true
var file = await this.fileToBlob(param.file) var file = await this.fileToBlob(param.file)
const trialId = this.$route.query.trialId 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.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.Path = this.$getObjectName(res.url)
this.form.Name = param.file.name this.form.Name = param.file.name

View File

@ -148,7 +148,7 @@
/> />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-dialog> </el-dialog>
</BaseContainer> </BaseContainer>
</template> </template>
<script> <script>

View File

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

View File

@ -4,9 +4,27 @@
<StudyList v-if="activeTab === 'study'"/> <StudyList v-if="activeTab === 'study'"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="其他" name="other"> <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-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-tab-pane>
<el-dialog <!-- <el-dialog
v-if="detailDialog.visible" v-if="detailDialog.visible"
:visible.sync="detailDialog.visible" :visible.sync="detailDialog.visible"
fullscreen fullscreen
@ -21,7 +39,7 @@
:fileUploadRecordId="detailDialog.currentRow.Id" :fileUploadRecordId="detailDialog.currentRow.Id"
:path="detailDialog.currentRow.Path" :path="detailDialog.currentRow.Path"
/> />
</el-dialog> </el-dialog> -->
</el-tabs> </el-tabs>
</template> </template>
<script> <script>
@ -38,18 +56,29 @@ export default {
data(){ data(){
return { return {
activeTab: 'study', activeTab: 'study',
detailDialog: { tabInfo: {
visible: false,
title: '详情', title: '详情',
activeTab: 'file',
currentRow: null currentRow: null
}, },
fileUploadRecordId: '',
path: ''
} }
}, },
methods: { methods: {
openTaskTable(obj) { openTaskTable(obj) {
this.detailDialog.currentRow = obj || null this.tabInfo.currentRow = obj || null
this.detailDialog.visible = true 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> </script>
@ -57,14 +86,15 @@ export default {
.data-sync-tabs{ .data-sync-tabs{
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
.el-tabs__header { > .el-tabs__header {
height: 100%; height: 100%;
} }
.el-tabs__content { > .el-tabs__content {
height: 100%; height: 100%;
padding: 0px;
overflow: auto; overflow: auto;
} }
.el-tab-pane { > .el-tabs__content > .el-tab-pane {
height: 100%; height: 100%;
} }
} }
@ -92,4 +122,26 @@ export default {
} }
} }
} }
</style> .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>