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

uat
caiyiling 2025-03-18 15:27:16 +08:00
commit 070db5158d
15 changed files with 620 additions and 1099 deletions

View File

@ -1265,6 +1265,14 @@ export function getTrialFileTypeFile(data) {
data data
}) })
} }
// 项目文档-删除上传同意入项记录
export function deleteTrialTypeFile(params) {
return request({
url: `/TrialFileType/deleteTrialTypeFile`,
method: 'post',
params
})
}
// 项目文档-获取资质材料列表 // 项目文档-获取资质材料列表
export function getTrialAttachments(data) { export function getTrialAttachments(data) {
return request({ return request({

View File

@ -1,7 +1,7 @@
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
module.exports = { module.exports = {
title: 'IRCIS', title: 'IRC Imaging System',
/** /**
* @type {boolean} true | false * @type {boolean} true | false

View File

@ -1,6 +1,6 @@
import defaultSettings from '@/settings' import defaultSettings from '@/settings'
const title = defaultSettings.title || 'IRCIS' const title = defaultSettings.title || 'IRC Imaging System'
export default function getPageTitle(pageTitle) { export default function getPageTitle(pageTitle) {
if (pageTitle) { if (pageTitle) {

View File

@ -241,7 +241,7 @@ const searchDataDefault = () => {
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
asc: false, asc: false,
sortField: 'CreateTime', sortField: '',
} }
} }
export default { export default {

View File

@ -291,21 +291,33 @@
:label="$t('trials:seletctedReviews:table:institution')" :label="$t('trials:seletctedReviews:table:institution')"
show-overflow-tooltip show-overflow-tooltip
width="150" width="150"
/> >
<template slot-scope="scope">
<span>{{ isEN?scope.row.HospitalName:scope.row.HospitalNameCN }}</span>
</template>
</el-table-column>
<!-- City --> <!-- City -->
<el-table-column <el-table-column
prop="City" prop="City"
:label="$t('trials:seletctedReviews:table:city')" :label="$t('trials:seletctedReviews:table:city')"
show-overflow-tooltip show-overflow-tooltip
width="150" width="150"
/> >
<template slot-scope="scope">
<span>{{ isEN?scope.row.City:scope.row.CityCN }}</span>
</template>
</el-table-column>
<!-- Country --> <!-- Country -->
<el-table-column <el-table-column
prop="Country" prop="Country"
:label="$t('trials:seletctedReviews:table:country')" :label="$t('trials:seletctedReviews:table:country')"
show-overflow-tooltip show-overflow-tooltip
width="150" width="150"
/> >
<template slot-scope="scope">
<span>{{ isEN?scope.row.Country:scope.row.CountryCN }}</span>
</template>
</el-table-column>
<!-- Selector --> <!-- Selector -->
<el-table-column <el-table-column
prop="OptUserName" prop="OptUserName"

View File

@ -278,6 +278,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
:disabled="!scope.row.TrialFileRecord"
v-if="isManage && !viewStatus && hasEdit" v-if="isManage && !viewStatus && hasEdit"
v-model="scope.row.IsAuthorizedView" v-model="scope.row.IsAuthorizedView"
@change="(val) => auth(false, scope.row, val)" @change="(val) => auth(false, scope.row, val)"
@ -769,7 +770,7 @@ export default {
}, },
immediate: true, immediate: true,
}, },
rowData: { 'rowData.IsEnable': {
handler() { handler() {
this.DATA = Object.assign({}, this.rowData) this.DATA = Object.assign({}, this.rowData)
}, },

View File

@ -273,6 +273,12 @@ export default {
this.loading = true this.loading = true
let res = await setAuthorizedView(data) let res = await setAuthorizedView(data)
this.loading = false this.loading = false
if (res.IsSuccess) {
this.$emit('update:rowData', {})
this.$nextTick(() => {
this.$emit('update:rowData', item)
})
}
} catch (err) { } catch (err) {
this.loading = false this.loading = false
item.IsEnable = !item.IsEnable item.IsEnable = !item.IsEnable

View File

@ -766,7 +766,7 @@ export default {
}, },
immediate: true, immediate: true,
}, },
rowData: { 'rowData.IsEnable': {
handler() { handler() {
this.DATA = Object.assign({}, this.rowData) this.DATA = Object.assign({}, this.rowData)
}, },

View File

@ -722,7 +722,7 @@ export default {
}, },
immediate: true, immediate: true,
}, },
rowData: { 'rowData.IsEnable': {
handler() { handler() {
this.DATA = Object.assign({}, this.rowData) this.DATA = Object.assign({}, this.rowData)
}, },

View File

@ -1,101 +1,45 @@
<template> <template>
<base-model :config="config"> <base-model :config="config">
<div slot="dialog-body"> <div slot="dialog-body">
<el-form <el-form ref="trainRecordForm" :model="form" label-width="140px" size="small" :rules="rules">
ref="trainRecordForm"
:model="form"
label-width="140px"
size="small"
:rules="rules"
>
<div class="base-dialog-body"> <div class="base-dialog-body">
<el-form-item <el-form-item v-if="!config.upload" :label="$t('trials:trialDocument:trainRecord:form:TrianingDate')"
v-if="!config.upload" prop="TrianingDate">
:label="$t('trials:trialDocument:trainRecord:form:TrianingDate')" <el-date-picker v-model="form.TrianingDate" type="date" placeholder="" format="yyyy-MM-dd"
prop="TrianingDate" value-format="yyyy-MM-dd" style="width: 100%">
>
<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-date-picker>
</el-form-item> </el-form-item>
<el-form-item <el-form-item v-if="!config.upload" :label="$t('trials:trialDocument:trainRecord:form:TrianingCount')"
v-if="!config.upload" prop="TrianingCount">
:label="$t('trials:trialDocument:trainRecord:form:TrianingCount')" <el-input v-model.number="form.TrianingCount" type="number" />
prop="TrianingCount"
>
<el-input v-model="form.TrianingCount" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item v-if="!config.upload" :label="$t('trials:trialDocument:trainRecord:form:TrianingState')"
v-if="!config.upload" prop="TrianingState">
:label="$t('trials:trialDocument:trainRecord:form:TrianingState')"
prop="TrianingState"
>
<el-input v-model="form.TrianingState" /> <el-input v-model="form.TrianingState" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item v-if="!config.upload" :label="$t('trials:trialDocument:trainRecord:form:Note')" prop="Note">
v-if="!config.upload"
:label="$t('trials:trialDocument:trainRecord:form:Note')"
prop="Note"
>
<el-input v-model="form.Note" /> <el-input v-model="form.Note" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item v-if="!config.upload || config.upload === 'Trial'"
v-if="!config.upload || config.upload === 'Trial'" :label="$t('trials:trialDocument:trainRecord:form:TrialFileRecord')" prop="TrialFileRecord">
:label="$t('trials:trialDocument:trainRecord:form:TrialFileRecord')" <el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'Trial', '.pdf')"
prop="TrialFileRecord" :http-request="(param) => handleUploadFile(param, 'Trial')" :on-remove="() => handleRemoveFile('Trial')"
> :limit="1" accept=".pdf" :file-list="TrialFile">
<el-upload <el-button size="small" type="primary" :disabled="!!form.TrialFileRecord && !!form.TrialFileRecord.FilePath
class="upload-demo" ">{{ $t('common:button:upload') }}
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> </el-button>
<span slot="tip" class="el-upload__tip"> <span slot="tip" class="el-upload__tip">
{{ $t('trials:trialDocument:trainRecord:rule:mustPDF') }} {{ $t('trials:trialDocument:trainRecord:rule:mustPDF') }}
</span> </span>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item <el-form-item v-if="!config.upload || config.upload === 'History'" :label="$t('trials:trialDocument:trainRecord:form:historyFileRecord')
v-if="!config.upload || config.upload === 'History'" ">
:label=" <el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'History', '.zip')"
$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')" :http-request="(param) => handleUploadFile(param, 'History')"
:on-remove="() => handleRemoveFile('History')" :on-remove="() => handleRemoveFile('History')" :limit="1" accept=".zip" :file-list="HistoryFile">
:limit="1" <el-button size="small" type="primary" :disabled="!!form.HistoryFileRecord && !!form.HistoryFileRecord.FilePath
accept=".zip" ">{{ $t('common:button:upload') }}
:file-list="HistoryFile"
>
<el-button
size="small"
type="primary"
:disabled="
!!form.HistoryFileRecord && !!form.HistoryFileRecord.FilePath
"
>{{ $t('common:button:upload') }}
</el-button> </el-button>
<span slot="tip" class="el-upload__tip"> <span slot="tip" class="el-upload__tip">
{{ $t('trials:trialDocument:trainRecord:rule:mustZIP') }} {{ $t('trials:trialDocument:trainRecord:rule:mustZIP') }}
@ -165,6 +109,36 @@ export default {
trigger: ['blur', 'change'], 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:TrianingCountPattern'
)
)
)
} else {
callback()
}
},
trigger: 'blur',
},
]
}, },
loading: false, loading: false,
TrialFile: [], TrialFile: [],

View File

@ -865,7 +865,7 @@ export default {
}, },
immediate: true, immediate: true,
}, },
rowData: { 'rowData.IsEnable': {
handler() { handler() {
this.DATA = Object.assign({}, this.rowData) this.DATA = Object.assign({}, this.rowData)
}, },

View File

@ -7,112 +7,53 @@
<div class="search" style="position: relative"> <div class="search" style="position: relative">
<el-form :inline="true" class="base-search-form"> <el-form :inline="true" class="base-search-form">
<!--专业--> <!--专业-->
<el-form-item <el-form-item :label="$t('trials:trialDocument:curriculumVitae:search:Speciality')">
:label="$t('trials:trialDocument:curriculumVitae:search:Speciality')" <el-select v-model="searchData.SpecialityId" style="width: 200px" placeholder="" clearable>
> <el-option v-for="item in $d.Department" :key="item.id" :label="item.label" :value="item.id">
<el-select
v-model="searchData.SpecialityId"
style="width: 200px"
placeholder=""
clearable
>
<el-option
v-for="item in $d.Department"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--亚专业--> <!--亚专业-->
<el-form-item <el-form-item :label="$t('trials:trialDocument:curriculumVitae:search:Subspeciality')
:label=" ">
$t('trials:trialDocument:curriculumVitae:search:Subspeciality') <el-select v-model="searchData.SubspecialityId" style="width: 200px" placeholder="" clearable>
" <el-option v-for="item in $d.Subspeciality" :key="item.id" :label="item.label" :value="item.id">
>
<el-select
v-model="searchData.SubspecialityId"
style="width: 200px"
placeholder=""
clearable
>
<el-option
v-for="item in $d.Subspeciality"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--机构--> <!--机构-->
<el-form-item <el-form-item :label="$t('trials:trialDocument:curriculumVitae:search:HospitalName')
:label=" ">
$t('trials:trialDocument:curriculumVitae:search:HospitalName') <el-select v-model="searchData.HospitalId" style="width: 200px" placeholder="" clearable>
" <el-option v-for="(item, index) in hospitalList" :key="index"
> :label="isEN ? item.HospitalName : item.HospitalNameCN" :value="item.Id" />
<el-select
v-model="searchData.HospitalId"
style="width: 200px"
placeholder=""
clearable
>
<el-option
v-for="(item, index) in hospitalList"
:key="index"
:label="isEN ? item.HospitalName : item.HospitalNameCN"
:value="item.Id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleSearch"> <el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }} {{ $t('common:button:search') }}
</el-button> </el-button>
<el-button <el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t('common:button:reset') }} {{ $t('common:button:reset') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<el-table <el-table v-loading="loading" v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100"
v-loading="loading" style="width: 100%">
v-adaptive="{ bottomOffset: 75 }"
:data="list"
stripe
height="100"
style="width: 100%"
>
<el-table-column type="index" /> <el-table-column type="index" />
<!--姓名--> <!--姓名-->
<el-table-column <el-table-column prop="BlindName" :label="$t('trials:trialDocument:curriculumVitae:table:name')"
prop="BlindName" show-overflow-tooltip sortable="custom">
:label="$t('trials:trialDocument:curriculumVitae:table:name')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ isEN ? scope.row.BlindName : scope.row.BlindNameCN }}</span> <span>{{ isEN ? scope.row.BlindName : scope.row.BlindNameCN }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="Code" :label="$t('trials:trialDocument:curriculumVitae:table:UserName')"
prop="Code" show-overflow-tooltip sortable="custom" />
:label="$t('trials:trialDocument:curriculumVitae:table:UserName')" <el-table-column prop="Speciality" :label="$t('trials:trialDocument:curriculumVitae:table:Speciality')"
show-overflow-tooltip show-overflow-tooltip sortable="custom">
sortable="custom"
/>
<el-table-column
prop="Speciality"
:label="$t('trials:trialDocument:curriculumVitae:table:Speciality')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
{{ {{
@ -125,11 +66,8 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="Subspeciality" :label="$t('trials:trialDocument:curriculumVitae:table:Subspeciality')"
prop="Subspeciality" show-overflow-tooltip>
:label="$t('trials:trialDocument:curriculumVitae:table:Subspeciality')"
show-overflow-tooltip
>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="isEN"> <span v-if="isEN">
{{ {{
@ -147,62 +85,41 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="HospitalName" :label="$t('trials:trialDocument:curriculumVitae:table:HospitalName')"
prop="HospitalName" show-overflow-tooltip sortable="custom">
:label="$t('trials:trialDocument:curriculumVitae:table:HospitalName')"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
{{ isEN ? scope.row.HospitalName : scope.row.HospitalNameCN }} {{ isEN ? scope.row.HospitalName : scope.row.HospitalNameCN }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="OptTimeStr" :label="$t('trials:trialDocument:curriculumVitae:table:submmitTime')"
prop="OptTimeStr" show-overflow-tooltip sortable="custom" />
:label="$t('trials:trialDocument:curriculumVitae:table:submmitTime')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column :label="$t('common:action:action')" width="200"> <el-table-column :label="$t('common:action:action')" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button icon="el-icon-view" :title="$t('common:button:view')" circle @click.stop="preview(scope.row)" />
icon="el-icon-view"
:title="$t('common:button:view')"
circle
@click.stop="preview(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
class="page" @pagination="getList" />
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<el-dialog :visible.sync="preview_visible" fullscreen> <el-dialog :visible.sync="preview_visible" fullscreen>
<div style="height: 100%; overflow: auto"> <div style="height: 100%; overflow: auto">
<preview <preview :isEN="isEN" :isAll="isAll" :reviewerId.sync="reviewerId" v-if="preview_visible" />
:isEN="isEN"
:isAll="isAll"
:reviewerId.sync="reviewerId"
v-if="preview_visible"
/>
</div> </div>
</el-dialog> </el-dialog>
</box-content> </box-content>
</template> </template>
<script> <script>
const otherId = 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5'
import { getTrialDoctorList } from '@/api/dictionary' import { getTrialDoctorList } from '@/api/dictionary'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import BoxContent from '@/components/BoxContent' import BoxContent from '@/components/BoxContent'
import preview from '@/views/reviewers/curriculumVitae/preview.vue' import preview from '@/views/reviewers/curriculumVitae/preview.vue'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import store from '@/store'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
SubspecialityId: null, SubspecialityId: null,
@ -238,6 +155,7 @@ export default {
reviewerId: null, reviewerId: null,
isAll: false, isAll: false,
preview_visible: false, preview_visible: false,
otherId,
} }
}, },
methods: { methods: {
@ -293,6 +211,9 @@ export default {
immediate: true, immediate: true,
}, },
}, },
mounted() {
store.dispatch('global/getHospital')
},
computed: { computed: {
...mapGetters(['hospitalList']), ...mapGetters(['hospitalList']),
isEN() { isEN() {
@ -334,8 +255,7 @@ export default {
]) ])
}, },
TITLE() { TITLE() {
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)}${ return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)}${this.isEN ? this.rowData.Name : this.rowData.NameCN
this.isEN ? this.rowData.Name : this.rowData.NameCN
}` }`
}, },
}, },
@ -347,25 +267,32 @@ export default {
font-weight: bold; font-weight: bold;
margin-bottom: 10px; margin-bottom: 10px;
} }
.fileName { .fileName {
display: inline-block; display: inline-block;
max-width: 100%; max-width: 100%;
white-space: nowrap; /* 文本不换行 */ white-space: nowrap;
overflow: hidden; /* 超出部分隐藏 */ /* 文本不换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.fileBtnBox { .fileBtnBox {
display: inline-block; display: inline-block;
width: 50px; width: 50px;
i { i {
cursor: pointer; cursor: pointer;
color: #409eff; color: #409eff;
margin-right: 3px; margin-right: 3px;
&:last-child { &:last-child {
margin: 0; margin: 0;
} }
} }
} }
.topForm { .topForm {
.el-form-item { .el-form-item {
margin-right: 30px; margin-right: 30px;

View File

@ -71,23 +71,9 @@
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" @click.stop="openUpload">
type="primary" {{ $t('trials:trialDocument:entryRecord:title:uploadFile') }}
v-if="hasEdit && isManage && !viewStatus"
@click.stop="openFile(false)"
>
{{ $t('trials:trialDocument:entryRecord:button:uploadFile') }}
</el-button> </el-button>
<el-button
v-if="hasDownLoad && (isManage || isInspect)"
icon="el-icon-download"
type="primary"
:disabled="!file || !file.FilePath"
@click.stop="downLoad(file)"
>{{
$t('trials:trialDocument:entryRecord:button:downLoadFile')
}}</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -188,7 +174,7 @@
/> />
</div> </div>
</el-dialog> </el-dialog>
<upload-files <!-- <upload-files
:config="config" :config="config"
:faccept="faccept" :faccept="faccept"
:uploadPath="uploadPath" :uploadPath="uploadPath"
@ -196,17 +182,67 @@
v-if="config.visible" v-if="config.visible"
@close="close" @close="close"
@uplaodFile="uplaodFile" @uplaodFile="uplaodFile"
/> -->
<base-model :config="upload_config">
<div slot="dialog-body">
<div class="file_title">
{{ $t('trials:trialDocument:entryRecord:title:uploadFile') }}
</div>
<div class="file" v-if="file.FileName">
<div class="name">{{ file.FileName }}</div>
<i
v-if="hasDownLoad && (isManage || isInspect)"
class="el-icon-download"
:title="$t('common:button:download')"
@click.stop="downLoad(file)"
/> />
<i
v-if="hasDel && isManage && !viewStatus"
class="el-icon-delete"
:title="$t('common:button:delete')"
@click.stop="handleRemoveFile"
/>
</div>
<div class="btnBox">
<!-- <el-button
type="primary"
v-if="hasEdit && isManage && !viewStatus"
@click.stop="openFile(false)"
>
{{ $t('trials:trialDocument:entryRecord:button:uploadFile') }}
</el-button> -->
<el-upload
v-if="hasEdit && isManage && !viewStatus"
class="upload-demo"
action
:before-upload="(param) => beforeUpload(param, '.zip')"
:show-file-list="false"
:http-request="handleUploadFile"
:limit="1"
accept=".zip"
>
<el-button size="small" type="primary" :disabled="!!file.FileName">
{{ $t('trials:trialDocument:entryRecord:button:uploadFile') }}
</el-button>
</el-upload>
</div>
</div>
</base-model>
</box-content> </box-content>
</template> </template>
<script> <script>
import { getConfirmationReviewerList } from '@/api/trials' import { getConfirmationReviewerList } from '@/api/trials'
import { uploadTrialFileTypeFile, getTrialFileTypeFile } from '@/api/dictionary' import {
uploadTrialFileTypeFile,
getTrialFileTypeFile,
deleteTrialTypeFile,
} from '@/api/dictionary'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import BoxContent from '@/components/BoxContent' import BoxContent from '@/components/BoxContent'
import preview from '@/views/reviewers/curriculumVitae/preview.vue' import preview from '@/views/reviewers/curriculumVitae/preview.vue'
import baseModel from '@/components/BaseModel'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import uploadFiles from '../../uploadFiles.vue' // import uploadFiles from '../../uploadFiles.vue'
import { downLoadFile } from '@/utils/stream.js' import { downLoadFile } from '@/utils/stream.js'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
@ -223,7 +259,13 @@ const searchDataDefault = () => {
} }
export default { export default {
name: 'entryRecord', name: 'entryRecord',
components: { BoxContent, Pagination, preview, uploadFiles }, components: {
BoxContent,
Pagination,
preview,
// uploadFiles,
baseModel,
},
props: { props: {
ArchiveTypeEnum: { ArchiveTypeEnum: {
type: Number, type: Number,
@ -254,7 +296,6 @@ export default {
isAll: false, isAll: false,
preview_visible: false, preview_visible: false,
timeList: [], timeList: [],
config: { config: {
visible: false, visible: false,
showClose: true, showClose: true,
@ -263,6 +304,14 @@ export default {
appendToBody: false, appendToBody: false,
isFolder: false, isFolder: false,
}, },
upload_config: {
visible: false,
showClose: true,
width: '800px',
title: '',
appendToBody: false,
isFolder: false,
},
faccept: ['.zip'], faccept: ['.zip'],
limitLength: 1, limitLength: 1,
uploadPath: null, uploadPath: null,
@ -270,6 +319,88 @@ export default {
} }
}, },
methods: { methods: {
handleRemoveFile() {
this.$confirm(
this.$t('trials:trialDocument:entryRecord:message:deleteMes'),
{
type: 'warning',
distinguishCancelAndClose: true,
}
)
.then(() => {
deleteTrialTypeFile({
TrialFileTypeId: this.file.TrialFileTypeId,
}).then((res) => {
if (res.IsSuccess) {
this.getFile()
this.$message({
message: this.$t('common:message:deletedSuccessfully'),
type: 'success',
})
}
})
})
.catch((action) => {})
},
async handleUploadFile(param) {
try {
console.log(param)
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:entryRecord: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}/${this.$guid()}${extendName}`,
file
)
this.file = {
FileName: param.file.name,
FilePath: this.$getObjectName(res.url),
FileSize: param.file.size,
FileFormat: extendName,
}
this.loading = false
this.uplaodFile([this.file])
} catch (err) {
console.log(err)
}
},
beforeUpload(param, accept) {
if (this.file && !!this.file.FileName) {
this.$alert(
this.$t('trials:trialDocument:entryRecord:msg:hasFile')
).catch()
return
}
let extendName = param.name
.substring(param.name.lastIndexOf('.'))
.toLocaleLowerCase()
if (accept !== extendName) {
this.$alert(
this.$t('trials:trialDocument:entryRecord:msg:typeErr')
).catch()
return
}
},
openUpload() {
this.upload_config.title = `${this.$t(
'trials:trialDocument:entryRecord:title:uploadFile'
)}
-
${this.isEN ? this.rowData.Name : this.rowData.NameCN}`
this.upload_config.visible = true
},
// //
async downLoad(row) { async downLoad(row) {
try { try {
@ -467,4 +598,34 @@ export default {
margin-right: 30px; margin-right: 30px;
} }
} }
.file_title {
line-height: 40px;
font-weight: bold;
}
.file {
width: 100%;
display: flex;
margin-bottom: 10px;
.name {
max-width: 90%;
white-space: nowrap; /* 文本不会换行,会在同一行内继续,直到遇到<br>标签为止 */
text-overflow: ellipsis; /* 当文本溢出包含它的容器时,显示省略号(...)来表示被截断的文本 */
overflow: hidden; /* 隐藏溢出容器的文本 */
}
i {
cursor: pointer;
margin: 3px;
color: #409eff;
}
.disable {
cursor: not-allowed;
color: #909399;
}
}
.btnBox {
margin-top: 10px;
display: flex;
align-items: center;
justify-content: flex-end;
}
</style> </style>

View File

@ -11,7 +11,7 @@ const webpack = require('webpack')
const defaultSettings = require('./src/settings.js') const defaultSettings = require('./src/settings.js')
const moment = require('moment') const moment = require('moment')
var distDate = moment(new Date()).format('YYYY-MM-DD') var distDate = moment(new Date()).format('YYYY-MM-DD')
const name = process.env.NODE_ENV === 'usa' ? 'LILI' : defaultSettings.title || 'IRCIS' // page title const name = process.env.NODE_ENV === 'usa' ? 'Imaging Trial Management System' : defaultSettings.title || 'IRC Imaging System' // page title
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin // const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
module.exports = defineConfig({ module.exports = defineConfig({