IVUS&OCT阅片优化点:靶段标记和阅片页面数据下载和导入
continuous-integration/drone/push Build is passing Details

uat_us^2
wangxiaoshuang 2026-08-18 09:32:10 +08:00
parent e2b105cf39
commit a6c3ae8e05
7 changed files with 184 additions and 83 deletions

10
package-lock.json generated
View File

@ -57,6 +57,7 @@
"sortablejs": "^1.15.5",
"streamsaver": "^2.0.6",
"svgo": "^1.2.2",
"unzipit": "^2.0.3",
"v-viewer": "^1.7.4",
"vcrontab": "^0.3.5",
"vue": "2.7.16",
@ -21835,6 +21836,15 @@
"node": ">=0.10.0"
}
},
"node_modules/unzipit": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/unzipit/-/unzipit-2.0.3.tgz",
"integrity": "sha512-e6+ftgSQRj9Hwf2mIWFwYIGqBoKV7AziG/d7pep2Uv3NCzHbhLO5d9dGRwpahVlnpQ7aQC+5kWk72dnWocdYyA==",
"license": "MIT",
"engines": {
"node": ">=18"
}
},
"node_modules/unzipper": {
"version": "0.10.14",
"resolved": "https://registry.npmmirror.com/unzipper/-/unzipper-0.10.14.tgz",

View File

@ -63,6 +63,7 @@
"sortablejs": "^1.15.5",
"streamsaver": "^2.0.6",
"svgo": "^1.2.2",
"unzipit": "^2.0.3",
"v-viewer": "^1.7.4",
"vcrontab": "^0.3.5",
"vue": "2.7.16",

View File

@ -3,7 +3,7 @@
:append-to-body="true" class="uploadDicomAndNonedicom">
<span slot="title">{{ title }}</span>
<el-tabs type="border-card" v-model="activeName">
<el-tab-pane :label="$t('uploadDicomAndNonedicom:label:dicom')" name="dicom">
<el-tab-pane :label="$t('uploadDicomAndNonedicom:label:dicom')" name="dicom" v-if="!IsImageSegment">
<dicomFile v-if="activeName === 'dicom'" :SubjectId="SubjectId" :SubjectCode="SubjectCode"
:Criterion="Criterion" :TaskId="VisitTaskId" :isUpload.sync="isUpload"
:isReadingTaskViewInOrder="isReadingTaskViewInOrder" :IsImageSegment="IsImageSegment" :forbid="forbid"
@ -72,10 +72,16 @@ export default {
isUpload: false,
}
},
watch: {
IsImageSegment() {
if (this.IsImageSegment) this.activeName = 'nonedicom'
}
},
mounted() {
this.title = `Upload Images${this.SubjectCode}${this.Criterion.TrialReadingCriterionName}`
if (this.IsImageSegment) this.title = `Upload Images${this.SubjectCode}`
if (this.isReadingTaskViewInOrder === 0) this.title = ''
if (this.IsImageSegment) this.activeName = 'nonedicom'
store.dispatch('trials/setUnLock', true)
},
methods: {

View File

@ -224,6 +224,7 @@ import {
import { preArchiveStudy, uploadNoneDicomFile } from '@/api/trials'
import store from '@/store'
import { getToken } from '@/utils/auth'
import { unzipRaw } from 'unzipit';
let defaultSearchData = () => {
return {
SubjectId: null,
@ -332,6 +333,34 @@ export default {
store.dispatch('trials/setUnLock', false)
},
methods: {
async readZipFileListRaw(zipFile) {
try {
// 1. 使 unzipRaw
const { entries } = await unzipRaw(zipFile);
// 2. entries
const fileList = entries.map(entry => {
// 3. 使 TextDecoder
// ZIP 使 'gbk'
const decoder = new TextDecoder('gbk'); // 'big5'
const name = decoder.decode(entry.nameBytes);
return {
path: name,
name: name.split('/').pop(),
isDirectory: entry.isDirectory,
size: entry.size,
lastModified: entry.lastModDate
};
});
console.log('解码后的文件列表:', fileList);
return fileList;
} catch (error) {
console.error('读取 ZIP 失败:', error);
throw error;
}
},
async getList() {
try {
this.searchData.SubjectId = this.SubjectId
@ -370,11 +399,15 @@ export default {
//
beginScanFiles(e) {
var files = [...e.target.files]
var sameFiles = []
var sameFiles = [], zipFiles = [], f = false
files.forEach((file) => {
var extendName = file.name
.substring(file.name.lastIndexOf('.'))
.toLocaleLowerCase()
if (extendName === '.zip' && this.IsImageSegment) {
if (file.name.indexOf('筛选期') > -1 || file.name.indexOf('研究结束') > -1) f = true
zipFiles.push(file)
}
if (
this.faccept.indexOf(extendName) !== -1 &&
this.fileList.findIndex((v) => v.name === file.name) > -1
@ -382,6 +415,16 @@ export default {
sameFiles.push(file.name)
}
})
if (zipFiles.length > 0) {
zipFiles.forEach(async file => {
let list = await this.readZipFileListRaw(file)
if (!f) f = list.some(i => i.path.indexOf('筛选期') > -1 || i.path.indexOf('研究结束') > -1)
list = null
})
}
if (f) return this.$confirm(this.$t("trials:uploadNonDicoms:confirm:zipNameNonCompliant"), '', {
type: "warning"
})
var scope = this
if (sameFiles.length > 0) {
const h = this.$createElement

View File

@ -166,7 +166,7 @@
<template
v-if="!notShowFieldList.includes('MRIPDFFScanTime') || !notShowFieldList.includes('MRIPDFFLeadTime') || !notShowFieldList.includes('MRIPDFFOther')">
<!-- MRI-PDFF 检查的检测周期含单次检查时长预约等待时长等 -->
<el-table-column :label="$t('trials:researchForm:form:IsRoutineMRIPDEE')">
<!-- <el-table-column :label="$t('trials:researchForm:form:IsRoutineMRIPDEE')"> -->
<!-- 单次检查时长分钟 -->
<el-table-column v-show="!notShowFieldList.includes('MRIPDFFScanTime')" prop="MRIPDFFScanTime"
:label="$t('trials:researchForm:form:MRIPDFFScanTime')" show-overflow-tooltip />
@ -176,7 +176,7 @@
<!-- 特殊情况备注-->
<el-table-column v-show="!notShowFieldList.includes('MRIPDFFOther')" prop="MRIPDFFOther"
:label="$t('trials:researchForm:form:MRIPDFFOther')" show-overflow-tooltip />
</el-table-column>
<!-- </el-table-column> -->
</template>
<template
v-if="!notShowFieldList.includes('IsAuthorizeRadiologistsParticipate') || !notShowFieldList.includes('AssignFixedTechnologists')">

View File

@ -1,94 +1,127 @@
<template>
<BaseContainer>
<div slot="search-container">
<el-form :inline="true">
<!-- 受试者编号 -->
<el-form-item :label="$t('trials:pendingReadingTasks:table:subjectCode')">
<el-input v-model="searchData.SubjectCode" style="width: 130px" clearable />
</el-form-item>
<el-form-item>
<!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
<!-- 重置 -->
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
</el-form>
</div>
<div slot="main-container">
<el-table v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100" @sort-change="handleSortChange"
v-loading="loading">
<el-table-column type="index" width="40" align="left" />
<el-table-column prop="IsUrgent" :label="$t('trials:consistencyCheck:table:isUrgent')"
show-overflow-tooltip min-width="100">
<template slot-scope="scope">
<el-tag :type="scope.row.IsUrgent
? 'danger' : 'primary'
">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
</template>
</el-table-column>
<!-- 受试者编号 -->
<el-table-column prop="SubjectCode" min-width="100"
:label="$t('trials:pendingReadingTasks:table:subjectCode')" show-overflow-tooltip
sortable="custom" />
<!-- 访视数量 -->
<el-table-column prop="VisitCount" :label="$t('trials:pendingReadingTasks:table:VisitCount')"
show-overflow-tooltip sortable="custom" />
<!-- dicom检查数量 -->
<!-- <el-table-column prop="DicomStudyCount" :label="$t('trials:pendingReadingTasks:table:DicomStudyCount')"
<div>
<el-tabs type="border-card" v-model="activeName">
<template v-for="item in tabPaneList">
<el-tab-pane :label="$t(`uploadDicomAndNonedicom:label:TargetSection_${item}`)" :name="item">
<BaseContainer v-if="activeName == item">
<div slot="search-container">
<el-form :inline="true">
<!-- 受试者编号 -->
<el-form-item :label="$t('trials:pendingReadingTasks:table:subjectCode')">
<el-input v-model="searchData.SubjectCode" style="width: 130px" clearable />
</el-form-item>
<el-form-item>
<!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
<!-- 重置 -->
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
</el-form>
</div>
<div slot="main-container">
<el-table v-adaptive="{ bottomOffset: 85 }" :data="list" stripe height="100"
@sort-change="handleSortChange" v-loading="loading">
<el-table-column type="index" width="40" align="left" />
<el-table-column prop="IsUrgent" :label="$t('trials:consistencyCheck:table:isUrgent')"
show-overflow-tooltip min-width="100">
<template slot-scope="scope">
<el-tag :type="scope.row.IsUrgent
? 'danger' : 'primary'
">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
</template>
</el-table-column>
<!-- 受试者编号 -->
<el-table-column prop="SubjectCode" min-width="100"
:label="$t('trials:pendingReadingTasks:table:subjectCode')" show-overflow-tooltip
sortable="custom" />
<!-- 访视数量 -->
<el-table-column prop="VisitCount"
:label="$t('trials:pendingReadingTasks:table:VisitCount')" show-overflow-tooltip
sortable="custom" />
<!-- dicom检查数量 -->
<!-- <el-table-column prop="DicomStudyCount" :label="$t('trials:pendingReadingTasks:table:DicomStudyCount')"
show-overflow-tooltip sortable="custom" /> -->
<!-- 非dicom检查数量 -->
<!-- <el-table-column prop="NoneDicomStudyCount"
<!-- 非dicom检查数量 -->
<!-- <el-table-column prop="NoneDicomStudyCount"
:label="$t('trials:pendingReadingTasks:table:NoneDicomStudyCount')" show-overflow-tooltip
sortable="custom" /> -->
<!-- 标记访视数量 -->
<el-table-column prop="MarkVisitCount" :label="$t('trials:pendingReadingTasks:table:MarkVisitCount')"
show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ `${scope.row.MarkIVUSVisitCount || 0}/${scope.row.MarkOCTVisitCount || 0}` }}</span>
</template>
</el-table-column>
<!-- 标记dicom检查数量 -->
<!-- <el-table-column prop="MarkDicomStudyCount"
<!-- 标记访视数量 -->
<el-table-column prop="MarkVisitCount"
:label="$t('trials:pendingReadingTasks:table:MarkVisitCount')" show-overflow-tooltip
sortable="custom">
<template slot-scope="scope">
<span>{{ scope.row.MarkIVUSVisitCount || 0
}}</span>
</template>
</el-table-column>
<!-- 标记访视数量 -->
<el-table-column prop="MarkVisitCount"
:label="$t('trials:pendingReadingTasks:table:MarkOCTVisitCount')"
show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
<span>{{ scope.row.MarkOCTVisitCount ||
0
}}</span>
</template>
</el-table-column>
<!-- 标记dicom检查数量 -->
<!-- <el-table-column prop="MarkDicomStudyCount"
:label="$t('trials:pendingReadingTasks:table:MarkDicomStudyCount')" show-overflow-tooltip
sortable="custom" /> -->
<!-- 标记非dicom检查数量 -->
<!-- <el-table-column prop="MarkNoneDicomStudyCount"
<!-- 标记非dicom检查数量 -->
<!-- <el-table-column prop="MarkNoneDicomStudyCount"
:label="$t('trials:pendingReadingTasks:table:MarkNoneDicomStudyCount')" show-overflow-tooltip
sortable="custom" /> -->
<el-table-column :label="$t('common:action:action')" width="100" fixed="right">
<template slot-scope="scope">
<!-- 阅片 -->
<!-- <el-button :disabled="scope.row.ExistReadingApply" circle :title="scope.row.ExistReadingApply
<!-- 下载时间 -->
<el-table-column prop="LatestDownloadTime" min-width="100"
:label="$t('trials:pendingReadingTasks:table:latestDownloadTime')"
show-overflow-tooltip sortable="custom" />
<!-- 上传时间 -->
<el-table-column prop="LatestUploadTime" min-width="100"
:label="$t('trials:pendingReadingTasks:table:latestUploadTime')"
show-overflow-tooltip sortable="custom" />
<el-table-column :label="$t('common:action:action')" width="100" fixed="right">
<template slot-scope="scope">
<!-- 阅片 -->
<!-- <el-button :disabled="scope.row.ExistReadingApply" circle :title="scope.row.ExistReadingApply
? $t(
'trials:pendingReadingTasks:button:ExistReadingApply'
)
: $t('trials:pendingReadingTasks:button:review')
" icon="el-icon-edit-outline" @click="handleReadImage(scope.row)" /> -->
<!-- 上传 -->
<el-button v-hasPermi="['role:ir', 'role:pm', 'role:apm']" circle icon="el-icon-upload2"
:title="$t('trials:pendingReadingTasks:button:upload')"
@click="openUploadImage(scope.row, 'upload')" />
<!-- 下载 -->
<el-button v-hasPermi="['role:ir', 'role:pm', 'role:apm']" circle icon="el-icon-download"
:title="$t('trials:pendingReadingTasks:button:download')"
@click="openUploadImage(scope.row, 'download')" />
</template>
</el-table-column>
</el-table>
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
</div>
<upload-dicom-and-nonedicom v-if="uploadImageVisible" :SubjectId="uploadSubjectId"
:SubjectCode="uploadSubjectCode" :Criterion="uploadTrialCriterion" :visible.sync="uploadImageVisible"
:IsImageSegment="true" :forbid="forbid" />
<download-dicom-and-nonedicom v-if="downloadImageVisible" :SubjectId="uploadSubjectId"
:SubjectCode="uploadSubjectCode" :Criterion="uploadTrialCriterion" :visible.sync="downloadImageVisible"
:IsImageSegment="true" :forbid="forbid" />
</BaseContainer>
<!-- 上传 -->
<el-button v-hasPermi="['role:ir', 'role:pm', 'role:apm']" circle
icon="el-icon-upload2"
:title="$t('trials:pendingReadingTasks:button:upload')"
@click="openUploadImage(scope.row, 'upload')" />
<!-- 下载 -->
<el-button v-hasPermi="['role:ir', 'role:pm', 'role:apm']" circle
icon="el-icon-download"
:title="$t('trials:pendingReadingTasks:button:download')"
@click="openUploadImage(scope.row, 'download')" />
</template>
</el-table-column>
</el-table>
<pagination class="page" :total="total" :page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize" @pagination="getList" />
</div>
<upload-dicom-and-nonedicom v-if="uploadImageVisible" :SubjectId="uploadSubjectId"
:SubjectCode="uploadSubjectCode" :Criterion="uploadTrialCriterion"
:visible.sync="uploadImageVisible" :IsImageSegment="true" :forbid="forbid" />
<download-dicom-and-nonedicom v-if="downloadImageVisible" :SubjectId="uploadSubjectId"
:SubjectCode="uploadSubjectCode" :Criterion="uploadTrialCriterion"
:visible.sync="downloadImageVisible" :IsImageSegment="true" :forbid="forbid" />
</BaseContainer>
</el-tab-pane>
</template>
</el-tabs>
</div>
</template>
<script>
import BaseContainer from '@/components/BaseContainer'
@ -99,6 +132,7 @@ import { getTrialSubjectVisitMarkList } from "@/api/trials"
const searchDataDefault = () => {
return {
SubjectCode: '',
State: 0,
PageIndex: 1,
PageSize: 20,
}
@ -129,6 +163,8 @@ export default {
},
data() {
return {
activeName: '0',
tabPaneList: ['0', '1', '2'],
searchData: searchDataDefault(),
loading: false,
list: [],
@ -153,6 +189,9 @@ export default {
if (!v) {
this.getList()
}
},
activeName() {
this.getList()
}
},
mounted() {
@ -171,6 +210,7 @@ export default {
try {
this.searchData.TrialId = this.$route.query.trialId
this.searchData.TrialReadingCriterionId = this.TrialReadingCriterionId
this.searchData.State = this.activeName
this.loading = true
let res = await getTrialSubjectVisitMarkList(this.searchData)
this.loading = false

View File

@ -135,7 +135,8 @@ module.exports = defineConfig({
test: /\.wasm$/,
type: 'asset/resource'
}
]
],
exprContextCritical: false,
},
optimization: {
splitChunks: {