Merge branch 'uat' of https://gitea.frp.extimaging.com/XCKJ/irc_web into uat
continuous-integration/drone/push Build is passing Details

uat_us^2
caiyiling 2026-08-18 15:49:36 +08:00
commit 53101bc811
7 changed files with 184 additions and 83 deletions

10
package-lock.json generated
View File

@ -57,6 +57,7 @@
"sortablejs": "^1.15.5", "sortablejs": "^1.15.5",
"streamsaver": "^2.0.6", "streamsaver": "^2.0.6",
"svgo": "^1.2.2", "svgo": "^1.2.2",
"unzipit": "^2.0.3",
"v-viewer": "^1.7.4", "v-viewer": "^1.7.4",
"vcrontab": "^0.3.5", "vcrontab": "^0.3.5",
"vue": "2.7.16", "vue": "2.7.16",
@ -21835,6 +21836,15 @@
"node": ">=0.10.0" "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": { "node_modules/unzipper": {
"version": "0.10.14", "version": "0.10.14",
"resolved": "https://registry.npmmirror.com/unzipper/-/unzipper-0.10.14.tgz", "resolved": "https://registry.npmmirror.com/unzipper/-/unzipper-0.10.14.tgz",

View File

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

View File

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

View File

@ -224,6 +224,7 @@ import {
import { preArchiveStudy, uploadNoneDicomFile } from '@/api/trials' import { preArchiveStudy, uploadNoneDicomFile } from '@/api/trials'
import store from '@/store' import store from '@/store'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { unzipRaw } from 'unzipit';
let defaultSearchData = () => { let defaultSearchData = () => {
return { return {
SubjectId: null, SubjectId: null,
@ -332,6 +333,34 @@ export default {
store.dispatch('trials/setUnLock', false) store.dispatch('trials/setUnLock', false)
}, },
methods: { 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() { async getList() {
try { try {
this.searchData.SubjectId = this.SubjectId this.searchData.SubjectId = this.SubjectId
@ -370,11 +399,15 @@ export default {
// //
beginScanFiles(e) { beginScanFiles(e) {
var files = [...e.target.files] var files = [...e.target.files]
var sameFiles = [] var sameFiles = [], zipFiles = [], f = false
files.forEach((file) => { files.forEach((file) => {
var extendName = file.name var extendName = file.name
.substring(file.name.lastIndexOf('.')) .substring(file.name.lastIndexOf('.'))
.toLocaleLowerCase() .toLocaleLowerCase()
if (extendName === '.zip' && this.IsImageSegment) {
if (file.name.indexOf('筛选期') > -1 || file.name.indexOf('研究结束') > -1) f = true
zipFiles.push(file)
}
if ( if (
this.faccept.indexOf(extendName) !== -1 && this.faccept.indexOf(extendName) !== -1 &&
this.fileList.findIndex((v) => v.name === file.name) > -1 this.fileList.findIndex((v) => v.name === file.name) > -1
@ -382,6 +415,16 @@ export default {
sameFiles.push(file.name) 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 var scope = this
if (sameFiles.length > 0) { if (sameFiles.length > 0) {
const h = this.$createElement const h = this.$createElement

View File

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

View File

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

View File

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