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

uat
caiyiling 2025-03-06 11:02:41 +08:00
commit 4ad67e5501
20 changed files with 2587 additions and 152 deletions

View File

@ -10516,7 +10516,7 @@ class BaseViewer {
const pageNumber = this._currentPageNumber,
state = this.#scrollModePageState,
viewer = this.viewer;
viewmr = this.viewer;
viewer.textContent = "";
state.pages.length = 0;

View File

@ -1202,3 +1202,42 @@ export function deleteTrialNormalRecordList(data) {
data
})
}
// 项目文档-培训记录列表
export function getTrialTrianingRecordList(data) {
return request({
url: `/TrialTrianingRecord/getTrialTrianingRecordList`,
method: 'post',
data
})
}
// 项目文档-培训记录新增/修改
export function addOrUpdateTrialTrianingRecord(data) {
return request({
url: `/TrialTrianingRecord/addOrUpdateTrialTrianingRecord`,
method: 'post',
data
})
}
// 项目文档-培训记录批量新增/修改
export function batchAddTrialTrianingRecord(data) {
return request({
url: `/TrialTrianingRecord/batchAddTrialTrianingRecord`,
method: 'post',
data
})
}
// 项目文档-删除培训记录
export function deleteTrialTrianingRecord(id) {
return request({
url: `/TrialTrianingRecord/deleteTrialTrianingRecord/${id}`,
method: 'delete',
})
}
// 项目文档-培训记录授权
export function authorizedTrialTrianingRecord(data) {
return request({
url: `/TrialTrianingRecord/authorizedTrialTrianingRecord`,
method: 'post',
data
})
}

View File

@ -1080,7 +1080,13 @@ export function setSeriesStatus(trialId, subjectVisitId, studyId, seriesId, stat
method: 'put'
})
}
export function setNodicomStudyState(params) {
return request({
url: `/QCOperation/setNodicomStudyState`,
method: 'put',
params
})
}
export function setInstanceStatus(trialId, subjectVisitId, seriesId, instanceId, state) {
return request({
url: `/QCOperation/setInstanceState/${trialId}/${subjectVisitId}/${seriesId}/${instanceId}/${state}`,

View File

@ -1308,7 +1308,7 @@ export default {
o.imageColumns,
o.imageRows
)
let thumbnailPath = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.visitTaskId}/${dicomInfo.studyUid}/${v.seriesUid}.png`
let thumbnailPath = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.visitTaskId}/${dicomInfo.studyUid}/${v.seriesUid}.jpg`
let OSSclient = scope.OSSclient
let seriesRes = await OSSclient.put(
thumbnailPath,
@ -1421,7 +1421,7 @@ export default {
v.instanceList[0].imageColumns,
v.instanceList[0].imageRows
)
let thumbnailPath = `/${params.trialId}/Image/${params.trialSiteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}.png`
let thumbnailPath = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}.jpg`
let OSSclient = scope.OSSclient
try {
let seriesRes = await OSSclient.put(thumbnailPath, blob)
@ -1499,8 +1499,8 @@ export default {
return new Promise((resolve) => {
cornerstone.loadImage(imageId).then(async (image) => {
let canvas = document.createElement('canvas')
canvas.width = width
canvas.height = height
canvas.width = (width * 60) / height
canvas.height = 60
if (image) {
cornerstone.renderToCanvas(canvas, image)
// Canvas PNG

View File

@ -567,7 +567,7 @@ export default {
for (let i = 0; i < arr.length; i++) {
let dicom = arr[i];
if (dicom.StudyInstanceUid !== StudyInstanceUid) continue;
let thumbnailPath = `/${dicom.params.TrialId}/TaskImage/${dicom.params.SubjectId}/${dicom.params.VisitTaskId}/${dicom.StudyInstanceUid}/${dicom.SeriesInstanceUid}.png`;
let thumbnailPath = `/${dicom.params.TrialId}/TaskImage/${dicom.params.SubjectId}/${dicom.params.VisitTaskId}/${dicom.StudyInstanceUid}/${dicom.SeriesInstanceUid}.jpg`;
if (!studyObj[dicom.StudyId]) {
studyObj[dicom.StudyId] = {
StudyId: dicom.StudyId,

View File

@ -189,8 +189,8 @@ const dicomToPng = (imageId, width, height) => {
return new Promise((resolve) => {
cornerstone.loadImage(imageId).then(async (image) => {
let canvas = document.createElement("canvas");
canvas.width = width;
canvas.height = height;
canvas.width = (width * 60) / height
canvas.height = 60
if (image) {
cornerstone.renderToCanvas(canvas, image);
// 将 Canvas 图像对象转换为 PNG 格式

View File

@ -9,9 +9,9 @@
<div v-for="(study, i) in studyList" :key="study.CodeView">
<div class="study-desc">
<span>{{ study.CodeView }}</span>
<span v-if="OtherInfo.IsShowStudyName" style="margin-left: 5px">{{
study.StudyName
}}</span>
<span v-if="OtherInfo.IsShowStudyName" style="margin-left: 5px">
{{ study.StudyName }}
</span>
<span style="margin: 0 5px">{{ study.Modality }}</span>
<span>{{ getBodyPart(study.BodyPart) }}</span>
</div>
@ -23,25 +23,48 @@
<slot name="empty">{{ $t('trials:audit:message:noData') }}</slot>
</div>
<div v-else id="imgList" style="height: 100%; overflow: hidden">
<div
v-for="(item, j) in study.NoneDicomStudyFileList"
:id="`img${item.Id}`"
:key="item.Id"
:class="{
'is-boxActive': item.Id === currentFileId,
}"
class="img-box"
@click="selected(item, i, j, true)"
>
<div v-if="item.FileName.length < 15" class="img-text">
{{ `${j + 1}. ${item.FileName}` }}
</div>
<el-tooltip v-else :content="item.FileName" placement="bottom">
<div class="img-text">
<template v-for="(item, j) in study.NoneDicomStudyFileList">
<div
:id="`img${item.Id}`"
:key="item.Id"
:class="{
'is-boxActive': item.Id === currentFileId,
}"
class="img-box"
@click="selected(item, i, j, true)"
>
<div v-if="item.FileName.length < 15" class="img-text">
{{ `${j + 1}. ${item.FileName}` }}
</div>
</el-tooltip>
</div>
<el-tooltip v-else :content="item.FileName" placement="bottom">
<div class="img-text">
{{ `${j + 1}. ${item.FileName}` }}
</div>
</el-tooltip>
<div v-if="isQcCheck" class="switchBox">
<div class="item">
<span>{{ $t('trials:audit:table:isReading') }}</span>
<el-switch
v-model="item.IsReading"
:disabled="item.IsDeleted || isAudit"
@change="changeReadingStatus($event, study, item)"
:active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)"
/>
</div>
<div class="item">
<span>{{ $t('trials:audit:table:isDelete') }}</span>
<el-switch
v-model="item.IsDeleted"
:disabled="isAudit"
@change="changeDeleteStatus($event, study, item)"
:active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)"
/>
</div>
</div>
</div>
</template>
</div>
</div>
</div>
@ -70,7 +93,7 @@
</template>
<script>
import { getNoneDicomStudyList } from '@/api/trials'
import { getNoneDicomStudyList, setNodicomStudyState } from '@/api/trials'
import store from '@/store'
import { changeURLStatic } from '@/utils/history.js'
import Preview from './components/preview'
@ -111,10 +134,14 @@ export default {
path: null,
type: null,
},
isQcCheck: false,
isAudit: false,
}
},
async created() {
this.bp = await this.$getBodyPart(this.$route.query.trialId)
this.isQcCheck = !!this.$route.query.isQcCheck
console.log(this.isQcCheck)
},
async mounted() {
if (this.$router.currentRoute.query.TokenKey) {
@ -127,6 +154,95 @@ export default {
//
},
methods: {
changeReadingStatus(callback, row, file) {
let statusStr = ''
if (callback) {
statusStr = this.$t('trials:audit:label:setSeriesReading')
file.IsReading = false
} else {
statusStr = this.$t('trials:audit:label:setSeriesNotReading')
file.IsReading = true
}
var message = this.$t('trials:audit:message:changeSeriesStatus').replace(
'xxx',
statusStr
)
message = message.replace('yyy', this.$fd('YesOrNo', !file.IsReading))
this.$confirm(message, {
distinguishCancelAndClose: true,
type: 'warning',
})
.then(() => {
const state = file.IsReading ? 1 : 2
this.loading = true
let params = {
SubjectVisitId: row.SubjectVisitId,
NoneDicomStudyId: row.Id,
State: state,
NoneDicomStudyFileId: file.Id,
}
return setNodicomStudyState(params)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
this.$message.success(
this.$t('common:message:savedSuccessfully')
)
this.getNoneDicomList()
}
})
.catch(() => {
file.IsReading = !file.IsReading
this.loading = false
})
})
.catch(() => {})
},
changeDeleteStatus(callback, row, file) {
let statusStr = ''
if (callback) {
statusStr = this.$t('trials:audit:label:setSeriesDeleted')
file.IsDeleted = false
} else {
statusStr = this.$t('trials:audit:label:setSeriesNotDelete')
file.IsDeleted = true
}
var message = this.$t('trials:audit:message:changeSeriesStatus').replace(
'xxx',
statusStr
)
message = message.replace('yyy', this.$fd('YesOrNo', !file.IsDeleted))
this.$confirm(message, {
distinguishCancelAndClose: true,
type: 'warning',
})
.then(() => {
const state = file.IsDeleted ? 5 : 4
this.loading = true
let params = {
SubjectVisitId: row.SubjectVisitId,
NoneDicomStudyId: row.Id,
State: state,
NoneDicomStudyFileId: file.Id,
}
return setNodicomStudyState(params)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
this.$message.success(
this.$t('common:message:savedSuccessfully')
)
this.getNoneDicomList()
}
})
.catch(() => {
file.IsDeleted = !file.IsDeleted
this.loading = false
})
})
.catch(() => {})
},
getBodyPart(bodyPart) {
console.log(bodyPart)
if (!bodyPart) return ''
@ -163,6 +279,7 @@ export default {
.then((res) => {
this.studyList = res.Result
this.OtherInfo = res.OtherInfo
this.isAudit = res.OtherInfo.AuditState * 1 > 6
this.loading = false
const studyIndex = this.studyList.findIndex((item) => {
return item.NoneDicomStudyFileList.length > 0
@ -328,4 +445,14 @@ export default {
width: 100%;
}
}
.switchBox {
margin-bottom: 5px;
color: #4e4e4e;
.item {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 5px;
}
}
</style>

View File

@ -77,6 +77,7 @@
v-model="searchData.IsAuthorizedView"
style="width: 100px"
placeholder=""
clearable
>
<el-option
v-for="item in $d.YesOrNo"
@ -99,56 +100,53 @@
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
<el-form-item v-if="isManage && !viewStatus">
<el-button
type="primary"
:disabled="selectTable.length <= 0"
size="mini"
v-if="hasAccredit && isManage && !viewStatus"
@click.stop="auth"
>
{{ $t('trials:trialDocument:fileRecord:button:accredit') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasEdit && isManage && !viewStatus"
@click.stop="openFile(false)"
>
{{ $t('trials:trialDocument:fileRecord:button:uploadFile') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasEdit && isManage && !viewStatus"
@click.stop="openFile(true)"
>
{{ $t('trials:trialDocument:fileRecord:button:uploadFolder') }}
</el-button>
<el-button
type="primary"
icon="el-icon-bottom"
size="mini"
:disabled="selectTable.length <= 0"
v-if="hasDownLoad && isManage && !viewStatus"
@click.stop="downLoad"
>
{{ $t('trials:trialDocument:fileRecord:button:downLoad') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasDel && isManage && !viewStatus"
:disabled="selectTable.length <= 0"
@click.stop="delList"
>
{{ $t('trials:trialDocument:fileRecord:button:del') }}
</el-button>
</el-form-item>
</el-form>
<div
v-if="isManage && !viewStatus"
style="position: absolute; top: 0; right: 0"
>
<el-button
type="primary"
:disabled="selectTable.length <= 0"
size="mini"
v-if="hasAccredit"
@click.stop="auth"
>
{{ $t('trials:trialDocument:fileRecord:button:accredit') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasEdit"
@click.stop="openFile(false)"
>
{{ $t('trials:trialDocument:fileRecord:button:uploadFile') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasEdit"
@click.stop="openFile(true)"
>
{{ $t('trials:trialDocument:fileRecord:button:uploadFolder') }}
</el-button>
<el-button
type="primary"
icon="el-icon-bottom"
size="mini"
:disabled="selectTable.length <= 0"
v-if="hasDownLoad"
@click.stop="downLoad"
>
{{ $t('trials:trialDocument:fileRecord:button:downLoad') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasDel"
:disabled="selectTable.length <= 0"
@click.stop="delList"
>
{{ $t('trials:trialDocument:fileRecord:button:del') }}
</el-button>
</div>
</div>
<el-table
@ -161,7 +159,12 @@
@sort-change="handleSortByColumn"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" />
<el-table-column
type="selection"
width="55"
v-if="isManage && !viewStatus"
/>
<el-table-column type="index" v-else />
<!--名称-->
<el-table-column
@ -306,11 +309,7 @@
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
:label="$t('common:action:action')"
width="200"
fixed="right"
>
<el-table-column :label="$t('common:action:action')" width="200">
<template slot-scope="scope">
<el-button
icon="el-icon-view"
@ -675,6 +674,9 @@ export default {
async getList() {
try {
if (!this.Id) return false
if (this.viewStatus) {
this.searchData.IsAuthorizedView = true
}
this.searchData.TrialFileTypeId = this.Id
this.searchData.TrialId = this.$route.query.trialId
this.loading = true

View File

@ -93,6 +93,7 @@
v-model="searchData.IsAuthorizedView"
style="width: 100px"
placeholder=""
clearable
>
<el-option
v-for="item in $d.YesOrNo"
@ -115,39 +116,36 @@
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
<el-form-item v-if="isManage && !viewStatus">
<el-button
type="primary"
:disabled="selectTable.length <= 0"
size="mini"
v-if="hasAccredit && isManage && !viewStatus"
@click.stop="auth"
>
{{ $t('trials:trialDocument:reportDoc:button:accredit') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasAdd && isManage && !viewStatus"
@click.stop="handleAdd"
>
{{ $t('trials:trialDocument:reportDoc:button:add') }}
</el-button>
<el-button
type="primary"
icon="el-icon-bottom"
size="mini"
:disabled="selectTable.length <= 0"
v-if="hasDownLoad && isManage && !viewStatus"
@click.stop="downLoad"
>
{{ $t('trials:trialDocument:reportDoc:button:downLoad') }}
</el-button>
</el-form-item>
</el-form>
<div
v-if="isManage && !viewStatus"
style="position: absolute; top: 0; right: 0"
>
<el-button
type="primary"
:disabled="selectTable.length <= 0"
size="mini"
v-if="hasAccredit"
@click.stop="auth"
>
{{ $t('trials:trialDocument:reportDoc:button:accredit') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasAdd"
@click.stop="handleAdd"
>
{{ $t('trials:trialDocument:reportDoc:button:add') }}
</el-button>
<el-button
type="primary"
icon="el-icon-bottom"
size="mini"
:disabled="selectTable.length <= 0"
v-if="hasDownLoad"
@click.stop="downLoad"
>
{{ $t('trials:trialDocument:reportDoc:button:downLoad') }}
</el-button>
</div>
</div>
<el-table
@ -160,7 +158,12 @@
@sort-change="handleSortByColumn"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" />
<el-table-column
type="selection"
width="55"
v-if="isManage && !viewStatus"
/>
<el-table-column type="index" v-else />
<el-table-column
prop="Name"
@ -373,11 +376,7 @@
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
:label="$t('common:action:action')"
width="200"
fixed="right"
>
<el-table-column :label="$t('common:action:action')" width="200">
<template slot-scope="scope">
<el-button
icon="el-icon-view"
@ -699,6 +698,9 @@ export default {
async getList() {
try {
if (!this.Id) return false
if (this.viewStatus) {
this.searchData.IsAuthorizedView = true
}
this.searchData.TrialFileTypeId = this.Id
this.searchData.TrialId = this.$route.query.trialId
this.loading = true

View File

@ -0,0 +1,789 @@
<template>
<box-content>
<div class="title">
{{ TITLE }}
</div>
<el-form :inline="true" size="mini" class="base-search-form">
<el-form-item
:label="$t('trials:trialDocument:temp:form:isEnable')"
v-if="isManage && hasEdit && !viewStatus"
>
<el-radio-group
v-model="rowData.IsEnable"
:disabled="rowBtnStatus === 'edit'"
>
<el-radio
:label="item.value"
v-for="item in $d.YesOrNo"
:key="item.id"
>{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="isManage && hasEdit && !viewStatus">
<el-button
type="primary"
size="mini"
@click="rowBtnStatus = 'save'"
v-if="rowBtnStatus === 'edit'"
>
{{ $t('common:button:edit') }}
</el-button>
<el-button
type="primary"
size="mini"
:loading="rowBtnLoading"
@click="saveRowData"
v-if="rowBtnStatus === 'save'"
>
{{ $t('common:button:save') }}
</el-button>
</el-form-item>
</el-form>
<!-- 搜索框 -->
<div class="search" style="position: relative">
<el-form :inline="true" size="mini" class="base-search-form">
<el-form-item :label="$t('trials:trialDocument:temp:search:name')">
<el-input
v-model="searchData.FileName"
style="width: 100px"
clearable
/>
</el-form-item>
<el-form-item
:label="$t('trials:trialDocument:temp:search:isAuthorizedView')"
v-if="isManage && !viewStatus"
>
<el-select
v-if="!viewStatus"
v-model="searchData.IsAuthorizedView"
style="width: 100px"
placeholder=""
clearable
>
<el-option
v-for="item in $d.YesOrNo"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</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-item v-if="isManage && !viewStatus">
<el-button
type="primary"
:disabled="selectTable.length <= 0"
size="mini"
v-if="hasAccredit && isManage && !viewStatus"
@click.stop="auth"
>
{{ $t('trials:trialDocument:temp:button:accredit') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasEdit && isManage && !viewStatus"
@click.stop="openFile(false)"
>
{{ $t('trials:trialDocument:temp:button:uploadFile') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasEdit && isManage && !viewStatus"
@click.stop="openFile(true)"
>
{{ $t('trials:trialDocument:temp:button:uploadFolder') }}
</el-button>
<el-button
type="primary"
icon="el-icon-bottom"
size="mini"
:disabled="selectTable.length <= 0"
v-if="hasDownLoad && isManage && !viewStatus"
@click.stop="downLoad"
>
{{ $t('trials:trialDocument:temp:button:downLoad') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasDel && isManage && !viewStatus"
:disabled="selectTable.length <= 0"
@click.stop="delList"
>
{{ $t('trials:trialDocument:temp:button:del') }}
</el-button>
</el-form-item>
</el-form>
</div>
<el-table
v-loading="loading"
v-adaptive="{ bottomOffset: 75 }"
:data="list"
stripe
height="100"
style="width: 100%"
@sort-change="handleSortByColumn"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
v-if="isManage && !viewStatus"
/>
<el-table-column type="index" v-else />
<!--名称-->
<el-table-column
prop="FileName"
:label="$t('trials:trialDocument:temp:table:name')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
<div
v-if="
scope.row.TrialFileRecord &&
scope.row.TrialFileRecord.TrialFileTypeId
"
>
<span class="fileName">{{
scope.row.TrialFileRecord.FileName
}}</span>
</div>
</template>
</el-table-column>
<el-table-column
prop="fileType"
:label="$t('trials:trialDocument:temp:table:fileType')"
show-overflow-tooltip
>
<template slot-scope="scope">
<span v-if="scope.row.TrialFileRecord">{{
scope.row.TrialFileRecord.FileFormat
}}</span>
</template>
</el-table-column>
<el-table-column
prop="fileType"
:label="$t('trials:trialDocument:temp:table:fileSize')"
show-overflow-tooltip
>
<template slot-scope="scope">
<span v-if="scope.row.TrialFileRecord">{{
scope.row.TrialFileRecord.FileSize
? fileSizeFormatter(scope.row.TrialFileRecord.FileSize)
: ''
}}</span>
</template>
</el-table-column>
<el-table-column
prop="State"
:label="$t('trials:trialDocument:temp:table:State')"
show-overflow-tooltip
sortable="custom"
v-if="isManage && !viewStatus"
>
<template slot-scope="scope">
<el-switch
v-if="isManage && !viewStatus && hasEdit"
v-model="scope.row.State"
@change="(val) => auth(false, scope.row, val)"
:active-value="1"
:inactive-value="0"
:active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)"
>
</el-switch>
<span v-else>{{ $fd('IsUserEnable', scope.row.State) }}</span>
</template>
</el-table-column>
<el-table-column
prop="IsAuthorizedView"
:label="$t('trials:trialDocument:temp:table:isAuthorizedView')"
show-overflow-tooltip
sortable="custom"
v-if="isManage && !viewStatus"
>
<template slot-scope="scope">
<el-switch
v-if="isManage && !viewStatus && hasEdit"
v-model="scope.row.IsAuthorizedView"
@change="(val) => auth(false, scope.row, val)"
:active-value="true"
:inactive-value="false"
:active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)"
>
</el-switch>
<span v-else>{{ $fd('YesOrNo', scope.row.IsAuthorizedView) }}</span>
</template>
</el-table-column>
<el-table-column
prop="UpdateTime"
:label="$t('trials:trialDocument:temp:table:updateTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="CreateTime"
:label="$t('trials:trialDocument:temp:table:createTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column :label="$t('common:action:action')" width="200">
<template slot-scope="scope">
<el-button
icon="el-icon-view"
:title="$t('common:button:view')"
size="mini"
circle
:disabled="
!scope.row.TrialFileRecord ||
!scope.row.TrialFileRecord.FilePath ||
!~scope.row.TrialFileRecord.FileFormat.indexOf('pdf')
"
@click.stop="preview(scope.row.TrialFileRecord)"
/>
<el-button
v-if="hasDownLoad && isManage && !viewStatus"
icon="el-icon-download"
:title="$t('trials:trialDocument:temp:button:download')"
size="mini"
circle
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
/>
<el-button
v-if="hasDel && isManage && !viewStatus"
icon="el-icon-delete"
:title="$t('trials:trialDocument:temp:button:delete')"
size="mini"
circle
@click.stop="handleDel(scope.row)"
/>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<upload-files
:config="config"
:faccept="faccept"
:uploadPath="uploadPath"
:limitLength="limitLength"
v-if="config.visible"
@close="close"
@uplaodFile="uplaodFile"
/>
</box-content>
</template>
<script>
import {
addOrUpdateTrialFileType,
getTrialNormalRecordList,
deleteTrialNormalRecord,
authorizedTTrialNormalRecord,
addOrUpdateTrialNormalRecord,
batchAddTrialNormalRecord,
deleteTrialNormalRecordList,
} from '@/api/dictionary'
import { downLoadFile } from '@/utils/stream.js'
import { deepClone } from '@/utils/index.js'
import Pagination from '@/components/Pagination'
import BoxContent from '@/components/BoxContent'
import uploadFiles from '../uploadFiles.vue'
const searchDataDefault = () => {
return {
IsAuthorizedView: null,
FileName: null,
PageIndex: 1,
PageSize: 20,
Asc: false,
SortField: 'FileName',
}
}
export default {
name: 'temp',
components: { BoxContent, Pagination, uploadFiles },
props: {
viewStatus: {
type: Boolean,
default: true,
},
ArchiveTypeEnum: {
type: Number,
default: 0,
},
Id: {
type: String,
default: '',
},
rowData: {
type: Object,
default: () => {
return {}
},
},
},
data() {
return {
rowBtnStatus: 'edit', // edit save
rowBtnLoading: false,
searchData: searchDataDefault(),
loading: false,
list: [],
total: 0,
selectTable: [],
config: {
visible: false,
showClose: true,
width: '800px',
title: '',
appendToBody: false,
isFolder: false,
},
selectData: {},
selectKey: null,
uploadPath: null,
faccept: ['.pdf'],
limitLength: 0,
}
},
methods: {
//
async uplaodFile(list) {
console.log(list, 'list')
try {
if (!list || list.length <= 0) return false
if (this.selectKey) {
this.selectData[`${this.selectKey}FileRecord`] = list[0]
this.loading = true
let res = await addOrUpdateTrialNormalRecord(this.selectData)
this.loading = false
if (res.IsSuccess) {
this.getList()
}
return false
}
let arr = []
list.forEach((item) => {
let obj = {
TrialId: this.$route.query.trialId,
TrialFileTypeId: this.Id,
IsAuthorizedView: true,
State: 1,
TrialFileRecord: item,
HistoryFileRecord: null,
}
arr.push(obj)
})
this.loading = true
let res = await batchAddTrialNormalRecord({
TrialNormalRecordList: arr,
})
this.loading = false
if (res.IsSuccess) {
this.getList()
}
} catch (err) {
this.loading = false
console.log(err)
}
},
//
async delFile(row, key) {
try {
let confirm = await this.$confirm(
this.$t('trials:trialDocument:temp:message:deleteFile'),
{
type: 'warning',
distinguishCancelAndClose: true,
}
)
if (confirm !== 'confirm') return false
let data = deepClone(row)
data[`${key}FileRecord`] = null
this.loading = true
let res = await addOrUpdateTrialNormalRecord(data)
this.loading = false
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.getList()
}
} catch (err) {
this.loading = false
console.log(err)
}
},
//
async downLoad(isArray = true, row, type = 'zip') {
try {
if (type === 'file') {
return await downLoadFile(
this.OSSclientConfig.basePath + row.FilePath,
row.FileName
)
}
let { files, name } = this.formatDownloadFile(isArray, row)
let res = await downLoadFile(files, name, type)
// if (res && this.downloadId) {
// this.downloadImageSuccess()
// }
} catch (err) {
console.log(err)
}
},
//
formatDownloadFile(isArray = true, row) {
let files = [],
name = `${this.TITLE}_${new Date().getTime()}.zip`,
arr = ['Trial']
if (!isArray) {
name = `${row.Name}_${row.Version}_${new Date().getTime()}.zip`
arr.forEach((key) => {
if (row[`${key}FileRecord`] && row[`${key}FileRecord`].FilePath) {
let obj = {
name: `${row[`${key}FileRecord`].FileName.substring(
0,
row[`${key}FileRecord`].FileName.lastIndexOf('.')
)}__${row.Version}${row[`${key}FileRecord`].FileName.substring(
row[`${key}FileRecord`].FileName.lastIndexOf('.')
).toLocaleLowerCase()}`,
url:
this.OSSclientConfig.basePath +
row[`${key}FileRecord`].FilePath,
}
files.push(obj)
}
})
} else {
this.selectTable.forEach((item) => {
arr.forEach((key) => {
if (item[`${key}FileRecord`] && item[`${key}FileRecord`].FilePath) {
let obj = {
name: `${item[`${key}FileRecord`].FileName.substring(
0,
item[`${key}FileRecord`].FileName.lastIndexOf('.')
)}__${new Date().getTime()}${item[
`${key}FileRecord`
].FileName.substring(
item[`${key}FileRecord`].FileName.lastIndexOf('.')
).toLocaleLowerCase()}`,
url:
this.OSSclientConfig.basePath +
item[`${key}FileRecord`].FilePath,
}
files.push(obj)
}
})
})
}
return { files, name }
},
//
async auth(isArray = true, row, IsAuthorizedView) {
try {
let data = {}
if (isArray) {
data = {
Ids: this.selectTable.map((item) => item.Id),
IsAuthorizedView: true,
}
} else {
data = {
Ids: [row.Id],
IsAuthorizedView,
}
}
this.loading = true
let res = await authorizedTTrialNormalRecord(data)
this.loading = false
if (res.IsSuccess) {
this.$t('trials:trialDocument:temp:message:authSuccessfully')
if (isArray) {
this.getList()
}
}
} catch (err) {
this.loading = false
if (!isArray) {
row.IsAuthorizedView = !row.IsAuthorizedView
}
console.log(err)
}
},
//
handleDel(row) {
this.$confirm(
this.$t('trials:trialDocument:temp:message:deleteMessage'),
{
type: 'warning',
distinguishCancelAndClose: true,
}
)
.then(() => {
this.loading = true
deleteTrialNormalRecord(row.Id)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
this.getList()
this.$message.success(
this.$t('common:message:deletedSuccessfully')
)
}
})
.catch((err) => {
this.loading = false
console.log(err)
})
})
.catch((err) => {
this.loading = false
console.log(err)
})
},
//
delList() {
this.$confirm(
this.$t('trials:trialDocument:temp:message:deleteMessage'),
{
type: 'warning',
distinguishCancelAndClose: true,
}
)
.then(() => {
let data = {
Ids: this.selectTable.map((item) => item.Id),
}
this.loading = true
deleteTrialNormalRecordList(data)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
this.getList()
this.$message.success(
this.$t('common:message:deletedSuccessfully')
)
}
})
.catch((err) => {
this.loading = false
console.log(err)
})
})
.catch((err) => {
this.loading = false
console.log(err)
})
},
async getList() {
try {
if (!this.Id) return false
if (this.viewStatus) {
this.searchData.IsAuthorizedView = true
}
this.searchData.TrialFileTypeId = this.Id
this.searchData.TrialId = this.$route.query.trialId
this.loading = true
let res = await getTrialNormalRecordList(this.searchData)
this.loading = false
if (res.IsSuccess) {
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}
} catch (err) {
this.loading = false
console.log(err)
}
},
//
handleSearch() {
this.searchData.PageIndex = 1
this.getList()
},
//
handleReset() {
this.searchData = searchDataDefault()
this.getList()
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false
}
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
},
handleSelectionChange(val) {
this.selectTable = val
},
//
async saveRowData() {
try {
this.rowBtnLoading = true
let res = await addOrUpdateTrialFileType(this.rowData)
this.rowBtnLoading = false
if (res.IsSuccess) {
this.rowBtnStatus = 'edit'
this.$emit('getMenu')
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
} catch (err) {
console.log(err)
this.rowBtnLoading = false
}
},
//
preview(row) {
if (!row.FilePath) return false
this.$preview({
path: row.FilePath || row.fullPath,
type: 'pdf',
title: row.FileName,
})
},
close() {
this.config.visible = false
// this.selectData = {}
// this.selectKey = null
this.faccept = ['.pdf']
this.limitLength = 0
},
fileSizeFormatter(size) {
if (!size) return
return (size / Math.pow(1024, 2)).toFixed(3) + 'M'
},
openFile(isFolder = false) {
this.selectData = {}
this.selectKey = null
this.faccept = [
'.jpg',
'.jpeg',
'.png',
'.pdf',
'.zip',
'.doc',
'.docx',
'.xls',
'.xlsx',
]
this.limitLength = 0
this.config.title = this.$t(
'trials:trialDocument:temp:form:title:uploadFile'
)
this.config.visible = true
this.config.isFolder = isFolder
},
},
watch: {
Id: {
handler() {
this.getList()
},
immediate: true,
},
},
created() {
let typeArr = ['', 'Report', 'Doc', 'Record', 'Reviewer', 'Template']
let types = typeArr[this.ArchiveTypeEnum]
this.uploadPath = `/${this.$route.query.trialId}/Document/${types}`
console.log(this.uploadPath, this.ArchiveTypeEnum)
},
computed: {
isEN() {
return this.$i18n.locale !== 'zh'
},
isInspect() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:inspect',
])
},
isManage() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:manage',
])
},
hasAdd() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:add',
])
},
hasEdit() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:edit',
])
},
hasDel() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:del',
])
},
hasDownLoad() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:downLoad',
])
},
hasAccredit() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:accredit',
])
},
TITLE() {
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)}${
this.isEN ? this.rowData.Name : this.rowData.NameCN
}`
},
},
}
</script>
<style lang="scss" scoped>
.title {
line-height: 40px;
font-weight: bold;
margin-bottom: 10px;
}
.fileName {
display: inline-block;
max-width: 100%;
white-space: nowrap; /* 文本不换行 */
overflow: hidden; /* 超出部分隐藏 */
text-overflow: ellipsis;
}
.fileBtnBox {
display: inline-block;
width: 50px;
i {
cursor: pointer;
color: #409eff;
margin-right: 3px;
&:last-child {
margin: 0;
}
}
}
</style>

View File

@ -0,0 +1,299 @@
<template>
<base-model :config="config">
<div slot="dialog-body">
<el-form
ref="trainRecordForm"
:model="form"
label-width="140px"
size="small"
:rules="rules"
>
<div class="base-dialog-body">
<el-form-item
v-if="!config.upload"
:label="$t('trials:trialDocument:trainRecord:form:TrianingDate')"
prop="TrianingDate"
>
<el-date-picker
v-model="form.TrianingDate"
type="date"
placeholder=""
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
style="width: 100%"
>
</el-date-picker>
</el-form-item>
<el-form-item
v-if="!config.upload"
:label="$t('trials:trialDocument:trainRecord:form:TrianingCount')"
prop="TrianingCount"
>
<el-input v-model.number="form.TrianingCount" type="number" />
</el-form-item>
<el-form-item
v-if="!config.upload"
:label="$t('trials:trialDocument:trainRecord:form:TrianingState')"
prop="TrianingState"
>
<el-input v-model="form.TrianingState" type="number" />
</el-form-item>
<el-form-item
v-if="!config.upload"
:label="$t('trials:trialDocument:trainRecord:form:Note')"
prop="Note"
>
<el-input v-model="form.Note" type="number" />
</el-form-item>
<el-form-item
v-if="!config.upload || config.upload === 'Train'"
:label="$t('trials:trialDocument:trainRecord:form:TrialFileRecord')"
prop="TrialFileRecord"
>
<el-upload
class="upload-demo"
action
:before-upload="(param) => beforeUpload(param, 'Trial', '.pdf')"
:http-request="(param) => handleUploadFile(param, 'Trial')"
:on-remove="() => handleRemoveFile('Trial')"
:limit="1"
accept=".pdf"
:file-list="TrialFile"
>
<el-button
size="small"
type="primary"
:disabled="
!!form.TrialFileRecord && !!form.TrialFileRecord.FilePath
"
>{{ $t('common:button:upload') }}
</el-button>
<span slot="tip" class="el-upload__tip">
{{ $t('trials:trialDocument:trainRecord:rule:mustPDF') }}
</span>
</el-upload>
</el-form-item>
<el-form-item
v-if="!config.upload || config.upload === 'History'"
:label="
$t('trials:trialDocument:trainRecord:form:historyFileRecord')
"
>
<el-upload
class="upload-demo"
action
:before-upload="(param) => beforeUpload(param, 'History', '.zip')"
:http-request="(param) => handleUploadFile(param, 'History')"
:on-remove="() => handleRemoveFile('History')"
:limit="1"
accept=".zip"
:file-list="HistoryFile"
>
<el-button
size="small"
type="primary"
:disabled="
!!form.HistoryFileRecord && !!form.HistoryFileRecord.FilePath
"
>{{ $t('common:button:upload') }}
</el-button>
<span slot="tip" class="el-upload__tip">
{{ $t('trials:trialDocument:trainRecord:rule:mustZIP') }}
</span>
</el-upload>
</el-form-item>
</div>
</el-form>
</div>
<div slot="dialog-footer">
<el-button size="small" @click="canel">
{{ $t('trials:trialDocument:trainRecord:button:canel') }}
</el-button>
<el-button size="small" type="primary" :loading="loading" @click="save">
{{ $t('trials:trialDocument:trainRecord:button:save') }}
</el-button>
</div>
</base-model>
</template>
<script>
import baseModel from '@/components/BaseModel'
import { addOrUpdateTrialTrianingRecord } from '@/api/dictionary'
export default {
props: {
config: {
required: true,
default: () => {
return {}
},
},
data: {
required: true,
default: () => {
return {}
},
},
ArchiveTypeEnum: {
type: Number,
default: 0,
},
rowData: {
type: Object,
default: () => {
return {}
},
},
},
components: {
'base-model': baseModel,
},
data() {
return {
form: {
Note: null,
TrianingCount: null,
TrianingDate: null,
TrianingState: null,
IsAuthorizedView: true,
TrialFileRecord: null,
HistoryFileRecord: null,
},
rules: {
TrianingDate: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur', 'change'],
},
],
TrianingCount: [
{
type: 'number',
min: 0,
message: this.$t(
'trials:trialDocument:trainRecord:ruleMessage:TrianingCountPattern'
),
trigger: 'blur',
},
{
validator: (rule, value, callback) => {
if (
value &&
(String(value).includes('.') ||
new RegExp(/\D/g).test(String(value)))
) {
callback(
new Error(
this.$t(
'trials:trialDocument:trainRecord:ruleMessage:TrianingCountPatternS'
)
)
)
} else {
callback()
}
},
trigger: 'blur',
},
],
},
loading: false,
TrialFile: [],
HistoryFile: [],
}
},
created() {
if (this.config.status === 'edit') {
Object.keys(this.form).forEach((key) => {
this.form[key] = this.data[key]
})
let arr = ['Trial', 'History']
arr.forEach((key) => {
if (
this.form[`${key}FileRecord`] &&
this.form[`${key}FileRecord`].FilePath
) {
this[`${key}File`] = []
this[`${key}File`].push({
name: this.form[`${key}FileRecord`].FileName,
url: this.form[`${key}FileRecord`].FilePath,
})
}
})
}
},
methods: {
async save() {
try {
let validate = await this.$refs.trainRecordForm.validate()
if (!validate) return false
this.loading = true
this.form.TrialFileTypeId = this.rowData.Id
if (this.config.status === 'edit') {
this.form.Id = this.data.Id
}
let res = await addOrUpdateTrialTrianingRecord(this.form)
if (res.IsSuccess) {
this.$emit('close')
this.$emit('getList')
}
} catch (err) {
console.log(err)
this.loading = false
}
},
canel() {
this.$emit('close')
},
handleRemoveFile(key) {
this.form[`${key}FileRecord`] = null
this[`${key}File`] = []
},
beforeUpload(param, key, accept) {
if (this[`${key}File`] && this[`${key}File`][0]) {
this.$alert(
this.$t('trials:trialDocument:trainRecord:msg:hasFile')
).catch()
return
}
let extendName = param.name
.substring(param.name.lastIndexOf('.'))
.toLocaleLowerCase()
if (accept !== extendName) {
this.$alert(
this.$t('trials:trialDocument:trainRecord:msg:typeErr')
).catch()
return
}
},
async handleUploadFile(param, key) {
let trialId = this.$route.query.trialId
let extendName = param.file.name
.substring(param.file.name.lastIndexOf('.'))
.toLocaleLowerCase()
if (!trialId)
return this.$alert(
this.$t('trials:trialDocument:trainRecord:msg:noTrialId')
).catch()
this.loading = true
var file = await this.fileToBlob(param.file)
let typeArr = ['', 'Report', 'Doc', 'Record', 'Reviewer', 'Template']
let types = typeArr[this.ArchiveTypeEnum]
let fileNameNoType = param.file.name
.substring(0, param.file.name.lastIndexOf('.'))
.toLocaleLowerCase()
const res = await this.OSSclient.put(
`/${trialId}/Document/${types}/${fileNameNoType}${extendName}`,
file
)
this.form[`${key}FileRecord`] = {
FileName: param.file.name,
FilePath: this.$getObjectName(res.url),
FileSize: param.file.size,
FileFormat: extendName,
}
this.loading = false
},
},
}
</script>

View File

@ -0,0 +1,948 @@
<template>
<box-content>
<div class="title">
{{ TITLE }}
</div>
<el-form :inline="true" size="mini" class="base-search-form">
<el-form-item
:label="$t('trials:trialDocument:trainRecord:form:isConfirmRecord')"
v-if="isManage && hasEdit && !viewStatus"
>
<el-radio-group
v-model="rowData.IsConfirmRecord"
:disabled="rowBtnStatus === 'edit'"
>
<el-radio
:label="item.value"
v-for="item in $d.YesOrNo"
:key="item.id"
>{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
:label="$t('trials:trialDocument:trainRecord:form:isEnable')"
v-if="isManage && hasEdit && !viewStatus"
>
<el-radio-group
v-model="rowData.IsEnable"
:disabled="rowBtnStatus === 'edit'"
>
<el-radio
:label="item.value"
v-for="item in $d.YesOrNo"
:key="item.id"
>{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="isManage && hasEdit && !viewStatus">
<el-button
type="primary"
size="mini"
@click="rowBtnStatus = 'save'"
v-if="rowBtnStatus === 'edit'"
>
{{ $t('common:button:edit') }}
</el-button>
<el-button
type="primary"
size="mini"
:loading="rowBtnLoading"
@click="saveRowData"
v-if="rowBtnStatus === 'save'"
>
{{ $t('common:button:save') }}
</el-button>
</el-form-item>
</el-form>
<!-- 搜索框 -->
<div class="search" style="position: relative">
<el-form :inline="true" size="mini" class="base-search-form">
<!--培训日期-->
<el-form-item
:label="$t('trials:trialDocument:trainRecord:search:TrianingDate')"
>
<el-date-picker
style="width: 240px"
v-model="TrianingDate"
type="daterange"
:range-separator="$t('baseForm:daterange:rangeSeparator')"
start-placeholder=""
end-placeholder=""
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item
:label="$t('trials:trialDocument:trainRecord:search:name')"
>
<el-input
v-model="searchData.FileName"
style="width: 100px"
clearable
/>
</el-form-item>
<el-form-item
:label="
$t('trials:trialDocument:trainRecord:search:isAuthorizedView')
"
v-if="isManage && !viewStatus"
>
<el-select
v-if="!viewStatus"
v-model="searchData.IsAuthorizedView"
style="width: 100px"
placeholder=""
clearable
>
<el-option
v-for="item in $d.YesOrNo"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<!--更新时间-->
<el-form-item
:label="$t('trials:trialDocument:trainRecord:search:UpdateTime')"
style="margin-bottom: 10px"
>
<el-date-picker
style="width: 240px"
v-model="UpdateTime"
type="daterange"
:range-separator="$t('baseForm:daterange:rangeSeparator')"
start-placeholder=""
end-placeholder=""
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</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-item v-if="isManage && !viewStatus">
<el-button
type="primary"
:disabled="selectTable.length <= 0"
size="mini"
v-if="hasAccredit && isManage && !viewStatus"
@click.stop="auth"
>
{{ $t('trials:trialDocument:trainRecord:button:accredit') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasEdit && isManage && !viewStatus"
@click.stop="openFile(false)"
>
{{ $t('trials:trialDocument:trainRecord:button:uploadFile') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasEdit && isManage && !viewStatus"
@click.stop="openFile(true)"
>
{{ $t('trials:trialDocument:trainRecord:button:uploadFolder') }}
</el-button>
<el-button
type="primary"
size="mini"
v-if="hasAdd && isManage && !viewStatus"
@click.stop="handleAdd"
>
{{ $t('trials:trialDocument:trainRecord:button:add') }}
</el-button>
<el-button
type="primary"
icon="el-icon-bottom"
size="mini"
:disabled="selectTable.length <= 0"
v-if="hasDownLoad && isManage && !viewStatus"
@click.stop="downLoad"
>
{{ $t('trials:trialDocument:trainRecord:button:downLoad') }}
</el-button>
</el-form-item>
</el-form>
</div>
<el-table
v-loading="loading"
v-adaptive="{ bottomOffset: 75 }"
:data="list"
stripe
height="100"
style="width: 100%"
@sort-change="handleSortByColumn"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
v-if="isManage && !viewStatus"
/>
<el-table-column type="index" v-else />
<el-table-column
prop="TrianingDate"
:label="$t('trials:trialDocument:trainRecord:table:TrianingDate')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
<el-tooltip
v-if="!scope.row.TrianingDate"
class="item"
effect="dark"
:content="$t('trials:trialDocument:trainRecord:tip:noTrianingDate')"
placement="top"
>
<i
class="el-icon-warning"
style="cursor: pointer; color: #f56c6c"
></i>
</el-tooltip>
<span v-else>{{ scope.row.TrianingDate }}</span>
</template>
</el-table-column>
<el-table-column
prop="TrianingCount"
:label="$t('trials:trialDocument:trainRecord:table:TrianingCount')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="TrianingState"
:label="$t('trials:trialDocument:trainRecord:table:TrianingState')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="Note"
:label="$t('trials:trialDocument:trainRecord:table:Note')"
show-overflow-tooltip
sortable="custom"
/>
<!--文件名称-->
<el-table-column
prop="FileName"
:label="$t('trials:trialDocument:trainRecord:table:name')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
<div
v-if="
scope.row.TrialFileRecord &&
scope.row.TrialFileRecord.TrialFileTypeId
"
style="display: flex; align-items: center"
>
<span class="fileName">{{
scope.row.TrialFileRecord.FileName
}}</span>
<div v-if="isManage && !viewStatus" class="fileBtnBox">
<i
class="el-icon-view"
@click.stop="preview(scope.row.TrialFileRecord)"
/>
<i
class="el-icon-download"
v-if="hasDownLoad"
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
/>
<i
class="el-icon-delete"
v-if="hasDel"
@click.stop="delFile(scope.row, 'Trial')"
/>
</div>
</div>
<i
v-else-if="isManage && !viewStatus && hasEdit"
class="el-icon-upload2"
style="cursor: pointer; color: #409eff"
@click.stop="upload(scope.row, 'Trial')"
/>
</template>
</el-table-column>
<!--历史记录-->
<el-table-column
prop="HistoryFileRecord"
:label="$t('trials:trialDocument:trainRecord:table:historyFileRecord')"
show-overflow-tooltip
sortable="custom"
v-if="isManage && !viewStatus"
>
<template slot-scope="scope">
<div
v-if="
scope.row.HistoryFileRecord &&
scope.row.HistoryFileRecord.TrialFileTypeId
"
style="display: flex; align-items: center"
>
<span class="fileName">{{
scope.row.HistoryFileRecord.FileName
}}</span>
<div v-if="isManage && !viewStatus" class="fileBtnBox">
<i
class="el-icon-download"
v-if="hasDownLoad"
@click.stop="
downLoad(false, scope.row.HistoryFileRecord, 'file')
"
/>
<i
class="el-icon-delete"
v-if="hasDel"
@click.stop="delFile(scope.row, 'History')"
/>
</div>
</div>
<i
v-else-if="isManage && !viewStatus"
class="el-icon-upload2"
style="cursor: pointer; color: #409eff"
@click.stop="upload(scope.row, 'History')"
/>
</template>
</el-table-column>
<el-table-column
prop="IsAuthorizedView"
:label="$t('trials:trialDocument:trainRecord:table:isAuthorizedView')"
show-overflow-tooltip
sortable="custom"
v-if="isManage && !viewStatus"
>
<template slot-scope="scope">
<el-switch
:disabled="!scope.row.TrianingDate"
v-if="isManage && !viewStatus && hasEdit"
v-model="scope.row.IsAuthorizedView"
@change="(val) => auth(false, scope.row, val)"
:active-value="true"
:inactive-value="false"
:active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)"
>
</el-switch>
<span v-else>{{ $fd('YesOrNo', scope.row.IsAuthorizedView) }}</span>
</template>
</el-table-column>
<el-table-column
prop="UpdateTime"
:label="$t('trials:trialDocument:trainRecord:table:updateTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="CreateTime"
:label="$t('trials:trialDocument:trainRecord:table:createTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column :label="$t('common:action:action')" width="200">
<template slot-scope="scope">
<el-button
icon="el-icon-view"
:title="$t('common:button:view')"
size="mini"
circle
:disabled="
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
"
@click.stop="preview(scope.row.TrialFileRecord)"
/>
<el-button
v-if="hasEdit && isManage && !viewStatus"
icon="el-icon-edit-outline"
:title="$t('common:button:edit')"
size="mini"
circle
@click.stop="handleEdit(scope.row)"
/>
<el-button
v-if="hasDownLoad && isManage && !viewStatus"
icon="el-icon-download"
:title="$t('trials:trialDocument:trainRecord:button:download')"
size="mini"
circle
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
/>
<el-button
v-if="hasDel && isManage && !viewStatus"
icon="el-icon-delete"
:title="$t('trials:trialDocument:trainRecord:button:delete')"
size="mini"
circle
@click.stop="handleDel(scope.row)"
/>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<upload-files
:config="config"
:faccept="faccept"
:uploadPath="uploadPath"
:limitLength="limitLength"
v-if="config.visible"
@close="close"
@uplaodFile="uplaodFile"
/>
<trainRecord-form
:ArchiveTypeEnum="ArchiveTypeEnum"
:rowData="rowData"
:config="update_config"
:data="selectData"
v-if="update_config.visible"
@close="updateClose"
@getList="getList"
/>
</box-content>
</template>
<script>
import {
addOrUpdateTrialFileType,
getTrialTrianingRecordList,
deleteTrialTrianingRecord,
authorizedTrialTrianingRecord,
addOrUpdateTrialTrianingRecord,
batchAddTrialTrianingRecord,
} from '@/api/dictionary'
import { downLoadFile } from '@/utils/stream.js'
import { deepClone } from '@/utils/index.js'
import Pagination from '@/components/Pagination'
import BoxContent from '@/components/BoxContent'
import uploadFiles from '../uploadFiles.vue'
import trainRecordForm from './form.vue'
const searchDataDefault = () => {
return {
IsAuthorizedView: null,
FileName: null,
TrianingDateStartTime: null,
TrianingDateEndTime: null,
UpdateStartTime: null,
UpdateEndTime: null,
PageIndex: 1,
PageSize: 20,
Asc: false,
SortField: 'TrianingDate',
}
}
export default {
name: 'trainRecord',
components: { BoxContent, Pagination, uploadFiles, trainRecordForm },
props: {
viewStatus: {
type: Boolean,
default: true,
},
ArchiveTypeEnum: {
type: Number,
default: 0,
},
Id: {
type: String,
default: '',
},
rowData: {
type: Object,
default: () => {
return {}
},
},
},
data() {
return {
rowBtnStatus: 'edit', // edit save
rowBtnLoading: false,
searchData: searchDataDefault(),
loading: false,
list: [],
total: 0,
selectTable: [],
config: {
visible: false,
showClose: true,
width: '800px',
title: '',
appendToBody: false,
isFolder: false,
},
selectData: {},
uploadPath: null,
faccept: ['.pdf'],
limitLength: 0,
TrianingDate: [],
UpdateTime: [],
update_config: {
visible: false,
showClose: true,
width: '600px',
title: '',
appendToBody: false,
status: 'add',
upload: null,
},
}
},
methods: {
//
async uplaodFile(list) {
console.log(list, 'list')
try {
if (!list || list.length <= 0) return false
let arr = []
list.forEach((item) => {
let obj = {
TrialId: this.$route.query.trialId,
TrialFileTypeId: this.Id,
IsAuthorizedView: false,
TrialFileRecord: item,
HistoryFileRecord: null,
Note: null,
TrianingCount: null,
TrianingDate: null,
TrianingState: null,
}
arr.push(obj)
})
this.loading = true
let res = await batchAddTrialTrianingRecord({
TrianingRecordList: arr,
})
this.loading = false
if (res.IsSuccess) {
this.getList()
}
} catch (err) {
this.loading = false
console.log(err)
}
},
//
upload(row, key) {
this.selectData = deepClone(row)
this.update_config.title = `${this.$t(
'trials:trialDocument:trainRecord:form:title:upload'
)}
-
${this.isEN ? this.rowData.Name : this.rowData.NameCN}`
this.update_config.status = 'edit'
this.update_config.upload = key
this.update_config.visible = true
},
//
handleAdd() {
this.selectData = {}
this.update_config.title = `${this.$t(
'trials:trialDocument:trainRecord:form:title:add'
)}
-
${this.isEN ? this.rowData.Name : this.rowData.NameCN}`
this.update_config.status = 'add'
this.update_config.upload = null
this.update_config.visible = true
},
//
handleEdit(row) {
this.selectData = deepClone(row)
this.update_config.title = `${this.$t(
'trials:trialDocument:trainRecord:form:title:edit'
)}
-
${this.isEN ? this.rowData.Name : this.rowData.NameCN}`
this.update_config.status = 'edit'
this.update_config.upload = null
this.update_config.visible = true
},
//
async delFile(row, key) {
try {
let confirm = await this.$confirm(
this.$t('trials:trialDocument:trainRecord:message:deleteFile'),
{
type: 'warning',
distinguishCancelAndClose: true,
}
)
if (confirm !== 'confirm') return false
let data = deepClone(row)
data[`${key}FileRecord`] = null
this.loading = true
let res = await addOrUpdateTrialTrianingRecord(data)
this.loading = false
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.getList()
}
} catch (err) {
this.loading = false
console.log(err)
}
},
//
async downLoad(isArray = true, row, type = 'zip') {
try {
if (type === 'file') {
return await downLoadFile(
this.OSSclientConfig.basePath + row.FilePath,
row.FileName
)
}
let { files, name } = this.formatDownloadFile(isArray, row)
let res = await downLoadFile(files, name, type)
// if (res && this.downloadId) {
// this.downloadImageSuccess()
// }
} catch (err) {
console.log(err)
}
},
//
formatDownloadFile(isArray = true, row) {
let files = [],
name = `${this.TITLE}_${new Date().getTime()}.zip`,
arr = ['Trial', 'History']
if (!isArray) {
name = `${row.Name}_${row.Version}_${new Date().getTime()}.zip`
arr.forEach((key) => {
if (row[`${key}FileRecord`] && row[`${key}FileRecord`].FilePath) {
let obj = {
name: `${row[`${key}FileRecord`].FileName.substring(
0,
row[`${key}FileRecord`].FileName.lastIndexOf('.')
)}__${row.Version}${row[`${key}FileRecord`].FileName.substring(
row[`${key}FileRecord`].FileName.lastIndexOf('.')
).toLocaleLowerCase()}`,
url:
this.OSSclientConfig.basePath +
row[`${key}FileRecord`].FilePath,
}
files.push(obj)
}
})
} else {
this.selectTable.forEach((item) => {
arr.forEach((key) => {
if (item[`${key}FileRecord`] && item[`${key}FileRecord`].FilePath) {
let obj = {
name: `${item.TrianingDate}_${item[
`${key}FileRecord`
].FileName.substring(
0,
item[`${key}FileRecord`].FileName.lastIndexOf('.')
)}__${new Date().getTime()}${item[
`${key}FileRecord`
].FileName.substring(
item[`${key}FileRecord`].FileName.lastIndexOf('.')
).toLocaleLowerCase()}`,
url:
this.OSSclientConfig.basePath +
item[`${key}FileRecord`].FilePath,
}
files.push(obj)
}
})
})
}
return { files, name }
},
//
async auth(isArray = true, row, IsAuthorizedView) {
try {
let data = {}
if (isArray) {
let flag = this.selectTable.some((item) => !item.TrianingDate)
if (flag)
return this.$message.warning(
this.$t(
'trials:trialDocument:trainRecord:message:hsaNoTrianingDate'
)
)
data = {
Ids: this.selectTable.map((item) => item.Id),
IsAuthorizedView: true,
}
} else {
data = {
Ids: [row.Id],
IsAuthorizedView,
}
}
this.loading = true
let res = await authorizedTrialTrianingRecord(data)
this.loading = false
if (res.IsSuccess) {
this.$t('trials:trialDocument:trainRecord:message:authSuccessfully')
if (isArray) {
this.getList()
}
}
} catch (err) {
this.loading = false
if (!isArray) {
row.IsAuthorizedView = !row.IsAuthorizedView
}
console.log(err)
}
},
//
handleDel(row) {
this.$confirm(
this.$t('trials:trialDocument:trainRecord:message:deleteMessage'),
{
type: 'warning',
distinguishCancelAndClose: true,
}
)
.then(() => {
this.loading = true
deleteTrialTrianingRecord(row.Id)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
this.getList()
this.$message.success(
this.$t('common:message:deletedSuccessfully')
)
}
})
.catch((err) => {
this.loading = false
console.log(err)
})
})
.catch((err) => {
this.loading = false
console.log(err)
})
},
async getList() {
try {
if (!this.Id) return false
this.searchData.TrialFileTypeId = this.Id
this.searchData.TrialId = this.$route.query.trialId
if (this.viewStatus) {
this.searchData.IsAuthorizedView = true
}
if (this.TrianingDate && this.TrianingDate.length >= 2) {
this.searchData.TrianingDateStartTime = this.TrianingDate[0]
this.searchData.TrianingDateEndTime = this.TrianingDate[1]
} else {
this.searchData.TrianingDateStartTime = null
this.searchData.TrianingDateEndTime = null
}
if (this.UpdateTime && this.UpdateTime.length >= 2) {
this.searchData.UpdateStartTime = this.UpdateTime[0]
this.searchData.UpdateEndTime = this.UpdateTime[1]
} else {
this.searchData.UpdateStartTime = null
this.searchData.UpdateEndTime = null
}
this.loading = true
let res = await getTrialTrianingRecordList(this.searchData)
this.loading = false
if (res.IsSuccess) {
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}
} catch (err) {
this.loading = false
console.log(err)
}
},
//
handleSearch() {
this.searchData.PageIndex = 1
this.getList()
},
//
handleReset() {
this.searchData = searchDataDefault()
this.TrianingDate = []
this.UpdateTime = []
this.getList()
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false
}
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
},
handleSelectionChange(val) {
this.selectTable = val
},
//
async saveRowData() {
try {
this.rowBtnLoading = true
let res = await addOrUpdateTrialFileType(this.rowData)
this.rowBtnLoading = false
if (res.IsSuccess) {
this.rowBtnStatus = 'edit'
this.$emit('getMenu')
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
} catch (err) {
console.log(err)
this.rowBtnLoading = false
}
},
//
preview(row) {
if (!row.FilePath) return false
this.$preview({
path: row.FilePath || row.fullPath,
type: 'pdf',
title: row.FileName,
})
},
close() {
this.config.visible = false
// this.selectData = {}
// this.selectKey = null
this.faccept = ['.pdf']
this.limitLength = 0
},
updateClose() {
this.update_config.visible = false
},
fileSizeFormatter(size) {
if (!size) return
return (size / Math.pow(1024, 2)).toFixed(3) + 'M'
},
openFile(isFolder = false) {
this.selectData = {}
this.selectKey = null
this.faccept = ['.pdf']
this.limitLength = 0
this.config.title = this.$t(
'trials:trialDocument:trainRecord:form:title:uploadFile'
)
this.config.visible = true
this.config.isFolder = isFolder
},
},
watch: {
Id: {
handler() {
this.getList()
},
immediate: true,
},
},
created() {
let typeArr = ['', 'Report', 'Doc', 'Record', 'Reviewer', 'Template']
let types = typeArr[this.ArchiveTypeEnum]
this.uploadPath = `/${this.$route.query.trialId}/Document/${types}`
console.log(this.uploadPath, this.ArchiveTypeEnum)
},
computed: {
isEN() {
return this.$i18n.locale !== 'zh'
},
isInspect() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:inspect',
])
},
isManage() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:manage',
])
},
hasAdd() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:add',
])
},
hasEdit() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:edit',
])
},
hasDel() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:del',
])
},
hasDownLoad() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:downLoad',
])
},
hasAccredit() {
return this.hasPermi([
'trials:trials-panel:trial-summary:trial-document:accredit',
])
},
TITLE() {
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)}${
this.isEN ? this.rowData.Name : this.rowData.NameCN
}`
},
},
}
</script>
<style lang="scss" scoped>
.title {
line-height: 40px;
font-weight: bold;
margin-bottom: 10px;
}
.fileName {
display: inline-block;
max-width: calc(100% - 60px);
white-space: nowrap; /* 文本不换行 */
overflow: hidden; /* 超出部分隐藏 */
text-overflow: ellipsis;
}
.fileBtnBox {
display: inline-block;
width: 50px;
i {
cursor: pointer;
color: #409eff;
margin-right: 3px;
&:last-child {
margin: 0;
}
}
}
</style>

View File

@ -42,7 +42,6 @@
:rowData="rowData"
@getMenu="getMenu"
/>
<!--v-if="[2].includes(SubIdentificationEnum)"-->
<file-record
v-if="[2].includes(SubIdentificationEnum)"
:viewStatus="viewStatus"
@ -51,6 +50,23 @@
:rowData="rowData"
@getMenu="getMenu"
/>
<!--v-if="[4].includes(SubIdentificationEnum)"-->
<train-record
v-if="[4].includes(SubIdentificationEnum)"
:viewStatus="viewStatus"
:Id="Id"
:ArchiveTypeEnum="ArchiveTypeEnum"
:rowData="rowData"
@getMenu="getMenu"
/>
<temp
v-if="[6].includes(SubIdentificationEnum)"
:viewStatus="viewStatus"
:Id="Id"
:ArchiveTypeEnum="ArchiveTypeEnum"
:rowData="rowData"
@getMenu="getMenu"
/>
</div>
</div>
</template>
@ -59,9 +75,11 @@ import BaseContainer from '@/components/BaseContainer'
import Menu from './components/menu.vue'
import reportDoc from './components/report_doc/index.vue'
import fileRecord from './components/fileRecord/index.vue'
import trainRecord from './components/trainRecord/index.vue'
import temp from './components/template/index.vue'
export default {
name: 'trialDocument',
components: { BaseContainer, Menu, reportDoc, fileRecord },
components: { BaseContainer, Menu, reportDoc, fileRecord, trainRecord, temp },
data() {
return {
viewStatus: false,

View File

@ -34,6 +34,7 @@
height="300"
:row-class-name="tableRowClassName"
@selection-change="handleSelectionChange"
:default-sort="{ prop: 'UploadedTime', order: 'ascending' }"
>
<el-table-column
v-if="!(data.SubmitState * 1 === 2) || data.IsQCConfirmedReupload"
@ -46,27 +47,32 @@
:label="$t('trials:uploadedDicoms:table:studyId')"
min-width="80"
show-overflow-tooltip
sortable
/>
<!-- 检查名称 -->
<el-table-column
v-if="relationInfo.IsShowStudyName"
prop="StudyName"
:label="$t('trials:audit:table:StudyName')"
sortable
/>
<!-- 检查类型 -->
<el-table-column
prop="ModalityForEdit"
:label="$t('trials:audit:table:modality')"
sortable
/>
<!-- 检查类型 -->
<el-table-column
prop="Modalities"
:label="$t('trials:audit:table:modality1')"
sortable
/>
<!-- 检查部位 -->
<el-table-column
prop="BodyPartForEdit"
:label="$t('trials:uploadedDicoms:table:bodyPart')"
sortable
min-width="100"
show-overflow-tooltip
>
@ -78,6 +84,7 @@
<el-table-column
prop="SeriesCount"
:label="$t('trials:uploadedDicoms:table:seriesCount')"
sortable
min-width="100"
show-overflow-tooltip
/>
@ -85,6 +92,7 @@
<el-table-column
prop="InstanceCount"
:label="$t('trials:uploadedDicoms:table:instanceCount')"
sortable
min-width="100"
show-overflow-tooltip
/>
@ -92,6 +100,7 @@
<el-table-column
prop="StudyTime"
:label="$t('trials:uploadedDicoms:table:studyDate')"
sortable
min-width="120"
show-overflow-tooltip
>
@ -99,11 +108,20 @@
{{ moment(scope.row.StudyTime).format('YYYY-MM-DD') }}
</template>
</el-table-column>
<!-- 更新时间 -->
<el-table-column
prop="UpdateTime"
:label="$t('trials:uploadedDicoms:table:UpdateTime')"
min-width="120"
show-overflow-tooltip
sortable
/>
<!-- 上传时间 -->
<el-table-column
prop="UploadedTime"
:label="$t('trials:uploadedDicoms:table:uploadedTime')"
min-width="80"
sortable
min-width="120"
show-overflow-tooltip
/>
<el-table-column

View File

@ -36,6 +36,7 @@
:row-class-name="tableRowClassName"
max-height="250"
@selection-change="handleUploadedSelectionChange"
:default-sort="{ prop: 'UploadedTime', order: 'ascending' }"
>
<el-table-column type="selection" width="55" />
<!-- 检查编号 -->
@ -44,6 +45,7 @@
:label="$t('trials:uploadedDicoms:table:studyId')"
min-width="80"
show-overflow-tooltip
sortable
>
<template slot-scope="scope">
<el-tooltip
@ -92,16 +94,19 @@
v-if="relationInfo.IsShowStudyName"
prop="StudyName"
:label="$t('trials:audit:table:StudyName')"
sortable
/>
<!-- 检查类型 -->
<el-table-column
prop="ModalityForEdit"
:label="$t('trials:audit:table:modality')"
sortable
/>
<!-- 检查设备 -->
<el-table-column
prop="Modalities"
:label="$t('trials:audit:table:modality1')"
sortable
/>
<!-- 检查部位 -->
<el-table-column
@ -109,6 +114,7 @@
:label="$t('trials:uploadedDicoms:table:bodyPart')"
min-width="100"
show-overflow-tooltip
sortable
>
<template slot-scope="scope">
{{ getBodyPart(scope.row.BodyPartForEdit) }}
@ -120,6 +126,7 @@
:label="$t('trials:uploadedDicoms:table:seriesCount')"
min-width="100"
show-overflow-tooltip
sortable
/>
<!-- 图像数量 -->
<el-table-column
@ -127,6 +134,7 @@
:label="$t('trials:uploadedDicoms:table:instanceCount')"
min-width="100"
show-overflow-tooltip
sortable
/>
<!-- 检查日期 -->
<el-table-column
@ -134,6 +142,7 @@
:label="$t('trials:uploadedDicoms:table:studyDate')"
min-width="120"
show-overflow-tooltip
sortable
>
<template slot-scope="scope">
{{
@ -143,12 +152,21 @@
}}
</template>
</el-table-column>
<!-- 更新时间 -->
<el-table-column
prop="UpdateTime"
:label="$t('trials:uploadedDicoms:table:UpdateTime')"
min-width="120"
show-overflow-tooltip
sortable
/>
<!-- 上传时间 -->
<el-table-column
prop="UploadedTime"
:label="$t('trials:uploadedDicoms:table:uploadedTime')"
min-width="80"
min-width="120"
show-overflow-tooltip
sortable
/>
<el-table-column
:label="$t('common:action:action')"
@ -1171,8 +1189,12 @@ export default {
patientNameElement ? patientNameElement.dataOffset : 0,
patientNameElement ? patientNameElement.length : 0
)
// dicom 2025.03.04
let SpecificCharacterSet = data.string('x00080005')
? data.string('x00080005').replace('ISO IR', 'ISO_IR')
: ''
const patientNameStr = convertBytes(
data.string('x00080005'),
SpecificCharacterSet,
patientNameBytes
)
scope.uploadQueues.push({
@ -1280,8 +1302,11 @@ export default {
: 0,
seriesDescriptionElement ? seriesDescriptionElement.length : 0
)
let SpecificCharacterSet = data.string('x00080005')
? data.string('x00080005').replace('ISO IR', 'ISO_IR')
: ''
const seriesDescriptionStr = convertBytes(
data.string('x00080005'),
SpecificCharacterSet,
seriesDescriptionBytes
)
seriesItem = {
@ -1493,17 +1518,13 @@ export default {
${li.join('')}
</ol>
</div>`
this.$alert(
content,
'',
{
confirmButtonText: this.$t(
'trials:uploadDicomList:label:confirm'
),
dangerouslyUseHTMLString: true,
callback: (action) => {},
}
)
this.$alert(content, '', {
confirmButtonText: this.$t(
'trials:uploadDicomList:label:confirm'
),
dangerouslyUseHTMLString: true,
callback: (action) => {},
})
this.btnLoading = false
}
var results = []
@ -1591,8 +1612,8 @@ export default {
return new Promise((resolve) => {
cornerstone.loadImage(imageId).then(async (image) => {
let canvas = document.createElement('canvas')
canvas.width = width
canvas.height = height
canvas.width = (width * 60) / height
canvas.height = 60
if (image) {
cornerstone.renderToCanvas(canvas, image)
// Canvas PNG
@ -1760,7 +1781,7 @@ export default {
o.imageColumns,
o.imageRows
)
let thumbnailPath = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}.png`
let thumbnailPath = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}.jpg`
let OSSclient = scope.OSSclient
let seriesRes = await OSSclient.put(
thumbnailPath,
@ -1873,7 +1894,7 @@ export default {
v.instanceList[0].imageColumns,
v.instanceList[0].imageRows
)
let thumbnailPath = `/${params.trialId}/Image/${params.trialSiteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}.png`
let thumbnailPath = `/${params.trialId}/Image/${params.trialSiteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}.jpg`
let OSSclient = scope.OSSclient
try {
let seriesRes = await OSSclient.put(thumbnailPath, blob)

View File

@ -23,27 +23,35 @@
</el-button>
</div>
<el-table :data="nonDicomStudyList" style="width: 100%">
<el-table
:data="nonDicomStudyList"
style="width: 100%"
:default-sort="{ prop: 'CreateTime', order: 'ascending' }"
>
<!-- 检查编号 -->
<el-table-column
prop="CodeView"
:label="$t('trials:uploadNonDicoms:table:studyId')"
sortable
/>
<!-- 检查名称 -->
<el-table-column
v-if="relationInfo.IsShowStudyName"
prop="StudyName"
:label="$t('trials:uploadNonDicoms:table:StudyName')"
sortable
/>
<!-- 检查类型 -->
<el-table-column
prop="Modality"
:label="$t('trials:uploadNonDicoms:table:modality')"
sortable
/>
<!-- 检查部位 -->
<el-table-column
prop="BodyPart"
:label="$t('trials:uploadNonDicoms:table:bodyPart')"
sortable
>
<template slot-scope="scope">
{{ getBodyPart(scope.row.BodyPart) }}
@ -53,6 +61,7 @@
<el-table-column
prop="FileCount"
:label="$t('trials:uploadNonDicoms:table:files')"
sortable
>
<template slot-scope="scope">
<el-popover
@ -165,6 +174,7 @@
<el-table-column
prop="ImageDate"
:label="$t('trials:uploadNonDicoms:table:studyDate')"
sortable
>
<template slot-scope="scope">
{{ moment(scope.row.ImageDate).format('YYYY-MM-DD') }}
@ -174,6 +184,13 @@
<el-table-column
prop="UpdateTime"
:label="$t('trials:uploadNonDicoms:table:updateTime')"
sortable
/>
<!-- 创建时间 -->
<el-table-column
prop="CreateTime"
:label="$t('trials:uploadNonDicoms:table:CreateTime')"
sortable
/>
<el-table-column :label="$t('common:action:action')" min-width="200">
<template slot-scope="scope">

View File

@ -19,6 +19,7 @@
height="300"
:row-class-name="tableRowClassName"
@selection-change="handleSelectionChange"
:default-sort="{ prop: 'UploadedTime', order: 'ascending' }"
>
<!-- 检查编号 -->
<el-table-column
@ -26,6 +27,7 @@
:label="$t('trials:audit:table:studyId')"
min-width="80"
show-overflow-tooltip
sortable
/>
<!-- &lt;!&ndash; 检查类型 &ndash;&gt;-->
<!-- <el-table-column-->
@ -51,15 +53,18 @@
v-if="relationInfo.IsShowStudyName"
prop="StudyName"
:label="$t('trials:audit:table:StudyName')"
sortable
/>
<el-table-column
prop="ModalityForEdit"
:label="$t('trials:audit:table:modality')"
sortable
/>
<!-- 检查类型 -->
<el-table-column
prop="Modalities"
:label="$t('trials:audit:table:modality1')"
sortable
/>
<!-- 检查部位 -->
<el-table-column
@ -67,6 +72,7 @@
:label="$t('trials:uploadedDicoms:table:bodyPart')"
min-width="100"
show-overflow-tooltip
sortable
>
<template slot-scope="scope">
{{ getBodyPart(scope.row.BodyPartForEdit) }}
@ -78,6 +84,7 @@
:label="$t('trials:audit:table:seriesCount')"
min-width="100"
show-overflow-tooltip
sortable
/>
<!-- 图像数量 -->
<el-table-column
@ -85,6 +92,7 @@
:label="$t('trials:audit:table:instanceCount')"
min-width="100"
show-overflow-tooltip
sortable
/>
<!-- 检查日期 -->
<el-table-column
@ -92,17 +100,27 @@
:label="$t('trials:audit:table:studyDate')"
min-width="120"
show-overflow-tooltip
sortable
>
<template slot-scope="scope">
{{ moment(scope.row.StudyTime).format('YYYY-MM-DD') }}
</template>
</el-table-column>
<!-- 更新时间 -->
<el-table-column
prop="UpdateTime"
:label="$t('trials:audit:table:studyUpdateTime')"
min-width="80"
show-overflow-tooltip
sortable
/>
<!-- 上传时间 -->
<el-table-column
prop="UploadedTime"
:label="$t('trials:audit:table:studyUploadTime')"
min-width="80"
show-overflow-tooltip
sortable
/>
<el-table-column
:label="$t('common:action:action')"

View File

@ -98,18 +98,21 @@
:data="studyList"
:row-class-name="tableRowClassName"
@selection-change="handleSelectionChangeDicom"
:default-sort="{ prop: 'UploadedTime', order: 'ascending' }"
>
<el-table-column type="selection" width="55"> </el-table-column>
<!-- 检查编号 -->
<el-table-column
prop="StudyCode"
:label="$t('trials:audit:table:studyId')"
sortable
/>
<!-- 检查名称 -->
<el-table-column
prop="StudyName"
v-if="relationInfo.IsShowStudyName"
:label="$t('trials:audit:table:StudyName')"
sortable
>
<template slot-scope="scope">
<el-tooltip
@ -131,16 +134,19 @@
<el-table-column
prop="ModalityForEdit"
:label="$t('trials:audit:table:modality')"
sortable
/>
<!-- 检查类型 -->
<el-table-column
prop="Modalities"
:label="$t('trials:audit:table:modality1')"
sortable
/>
<!-- 检查部位 -->
<el-table-column
prop="BodyPartForEdit"
:label="$t('trials:audit:table:bodyPart')"
sortable
>
<template slot-scope="scope">
<el-tooltip
@ -164,16 +170,19 @@
<el-table-column
prop="SeriesCount"
:label="$t('trials:audit:table:seriesCount')"
sortable
/>
<!-- 图像数量 -->
<el-table-column
prop="InstanceCount"
:label="$t('trials:audit:table:instanceCount')"
sortable
/>
<!-- 检查日期 -->
<el-table-column
prop="StudyTime"
:label="$t('trials:audit:table:studyDate')"
sortable
>
<template slot-scope="scope">
<el-tooltip
@ -204,6 +213,22 @@
}}</span>
</template>
</el-table-column>
<!-- 更新时间 -->
<el-table-column
prop="UpdateTime"
:label="$t('trials:audit:table:seriesOfUpdateTime')"
min-width="120"
sortable
show-overflow-tooltip
/>
<!-- 上传时间 -->
<el-table-column
prop="UploadedTime"
:label="$t('trials:audit:table:seriesOfUploadedDate')"
min-width="120"
sortable
show-overflow-tooltip
/>
<el-table-column :label="$t('common:action:action')">
<template slot-scope="scope">
<!-- 预览 -->
@ -241,32 +266,41 @@
</el-table>
<!-- 序列信息 -->
<h3>{{ $t('trials:audit:title:series') }}</h3>
<el-table :data="seriesList" :row-class-name="tableRowClassName">
<el-table
:data="seriesList"
:row-class-name="tableRowClassName"
:default-sort="{ prop: 'CreateTime', order: 'ascending' }"
>
<!-- 序列号 -->
<el-table-column
prop="SeriesNumber"
:label="$t('trials:audit:table:seriesId')"
sortable
/>
<!-- 检查编号 -->
<el-table-column
prop="StudyCode"
:label="$t('trials:audit:table:seriesOfStudyId')"
sortable
/>
<!-- 检查类型 -->
<el-table-column
prop="Modality"
:label="$t('trials:audit:table:seriesModality')"
sortable
show-overflow-tooltip
/>
<!-- 图像数量 -->
<el-table-column
prop="InstanceCount"
:label="$t('trials:audit:table:seriesOfInstanceCount')"
sortable
/>
<!-- 检查日期 -->
<el-table-column
prop="SeriesTime"
:label="$t('trials:audit:table:seriesOfStudyDate')"
sortable
show-overflow-tooltip
>
<template slot-scope="scope">
@ -277,16 +311,25 @@
}}
</template>
</el-table-column>
<!-- 更新时间 -->
<el-table-column
prop="UpdateTime"
:label="$t('trials:audit:table:seriesOfUpdateTime')"
sortable
show-overflow-tooltip
/>
<!-- 上传时间 -->
<el-table-column
prop="CreateTime"
:label="$t('trials:audit:table:seriesOfUploadedDate')"
sortable
show-overflow-tooltip
/>
<!-- 是否阅片 -->
<el-table-column
prop="IsReading"
:label="$t('trials:audit:table:isReading')"
sortable
>
<template slot-scope="scope">
<el-switch
@ -302,6 +345,7 @@
<el-table-column
prop="IsDeleted"
:label="$t('trials:audit:table:isDelete')"
sortable
>
<template slot-scope="scope">
<el-switch
@ -329,7 +373,6 @@
</el-tab-pane>
<!-- 非DICOM影像 -->
<el-tab-pane
v-if="data.NoneDicomStudyCount > 0"
:label="$t('trials:audit:tab:nonDicoms')"
name="none-dicom"
>
@ -404,28 +447,34 @@
<el-table
:data="noneDicomStudyList"
@selection-change="handleSelectionChangeNonedicom"
:row-class-name="tableRowClassName"
:default-sort="{ prop: 'CreateTime', order: 'ascending' }"
>
<el-table-column type="selection" width="55"> </el-table-column>
<!-- 检查编号 -->
<el-table-column
prop="CodeView"
:label="$t('trials:audit:table:nonDicomsStudyId')"
sortable
/>
<!-- 检查名称 -->
<el-table-column
prop="StudyName"
v-if="relationInfo.IsShowStudyName"
:label="$t('trials:audit:table:StudyName')"
sortable
/>
<!-- 检查类型 -->
<el-table-column
prop="Modality"
:label="$t('trials:audit:table:nonDicomsModality')"
sortable
/>
<!-- 检查部位 -->
<el-table-column
prop="BodyPart"
:label="$t('trials:audit:table:nonDicomsBodypart')"
sortable
>
<template slot-scope="scope">
{{ getBodyPart(scope.row.BodyPart) }}
@ -435,6 +484,7 @@
<el-table-column
prop="FileCount"
:label="$t('trials:audit:table:nonDicomsFileCount')"
sortable
>
<template slot-scope="scope">
<el-popover
@ -514,6 +564,7 @@
<el-table-column
prop="ImageDate"
:label="$t('trials:audit:table:nonDicomsStudyDate')"
sortable
>
<template slot-scope="scope">
<i
@ -538,7 +589,46 @@
<el-table-column
prop="UpdateTime"
:label="$t('trials:audit:table:nonDicomsUpdateTime')"
sortable
/>
<!-- 创建时间 -->
<el-table-column
prop="CreateTime"
:label="$t('trials:audit:table:nonDicomsCreateTime')"
sortable
/>
<!-- 是否阅片 -->
<el-table-column
prop="IsReading"
:label="$t('trials:audit:table:isReading')"
sortable
>
<template slot-scope="scope">
<el-switch
v-model="scope.row.IsReading"
:disabled="scope.row.IsDeleted || isAudit"
@change="changeReadingStatus($event, scope.row, true)"
:active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)"
/>
</template>
</el-table-column>
<!-- 是否删除 -->
<el-table-column
prop="IsDeleted"
:label="$t('trials:audit:table:isDelete')"
sortable
>
<template slot-scope="scope">
<el-switch
v-model="scope.row.IsDeleted"
:disabled="isAudit"
@change="changeDeleteStatus($event, scope.row, true)"
:active-text="$fd('YesOrNo', true)"
:inactive-text="$fd('YesOrNo', false)"
/>
</template>
</el-table-column>
<el-table-column :label="$t('common:action:action')">
<template slot-scope="scope">
<!-- 预览 -->
@ -1376,6 +1466,7 @@ import {
verifyCanQCPassedOrFailed,
verifyQCCanAddChallenge,
setSeriesStatus,
setNodicomStudyState,
addOrUpdateNoneDicomStudy,
addOrUpdateQCQuestionAnswerList,
addOrUpdateQCChallenge,
@ -2061,7 +2152,7 @@ export default {
this.currentQCRow = { ...row }
this.chatVisible = true
},
changeReadingStatus(callback, row) {
changeReadingStatus(callback, row, isNoDicom = false) {
let statusStr = ''
if (callback) {
statusStr = this.$t('trials:audit:label:setSeriesReading')
@ -2082,6 +2173,26 @@ export default {
.then(() => {
const state = row.IsReading ? 1 : 2
this.loading = true
if (isNoDicom) {
let params = {
SubjectVisitId: row.SubjectVisitId,
NoneDicomStudyId: row.Id,
State: state,
}
return setNodicomStudyState(params)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
this.$message.success(
this.$t('common:message:savedSuccessfully')
)
this.getQCInfo()
}
})
.catch(() => {
this.loading = false
})
}
setSeriesStatus(
this.trialId,
this.data.Id,
@ -2104,7 +2215,7 @@ export default {
})
.catch(() => {})
},
changeDeleteStatus(callback, row) {
changeDeleteStatus(callback, row, isNoDicom = false) {
let statusStr = ''
if (callback) {
statusStr = this.$t('trials:audit:label:setSeriesDeleted')
@ -2125,6 +2236,26 @@ export default {
.then(() => {
const state = row.IsDeleted ? 5 : 4
this.loading = true
if (isNoDicom) {
let params = {
SubjectVisitId: row.SubjectVisitId,
NoneDicomStudyId: row.Id,
State: state,
}
return setNodicomStudyState(params)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
this.$message.success(
this.$t('common:message:savedSuccessfully')
)
this.getQCInfo()
}
})
.catch(() => {
this.loading = false
})
}
setSeriesStatus(
this.trialId,
this.data.Id,
@ -2574,7 +2705,7 @@ export default {
let trialId = this.$route.query.trialId
var token = getToken()
const routeData = this.$router.resolve({
path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${this.data.Id}&TokenKey=${token}`,
path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${this.data.Id}&TokenKey=${token}&isQcCheck=1`,
})
this.open = window.open(routeData.href, '_blank')
},
@ -2586,7 +2717,7 @@ export default {
let trialId = this.$route.query.trialId
var token = getToken()
const routeData = this.$router.resolve({
path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${this.data.Id}&studyId=${row.Id}&TokenKey=${token}`,
path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${this.data.Id}&studyId=${row.Id}&TokenKey=${token}&isQcCheck=1`,
})
this.open = window.open(routeData.href, '_blank')
},

View File

@ -11760,7 +11760,7 @@ const DEFAULT_L10N_STRINGS = {
rendering_error: "An error occurred while rendering the page.",
page_scale_width: "Page Width",
page_scale_fit: "Page Fit",
page_scale_auto: "Automatic Zoom",
page_scale_auto: "100%", //Automatic Zoom
page_scale_actual: "Actual Size",
page_scale_percent: "{{scale}}%",
loading: "Loading…",