项目文档同意入项记录上传更改为弹框
parent
b0ff8e7163
commit
66d5591d50
|
@ -71,23 +71,9 @@
|
|||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(false)"
|
||||
>
|
||||
{{ $t('trials:trialDocument:entryRecord:button:uploadFile') }}
|
||||
<el-button type="primary" @click.stop="openUpload">
|
||||
{{ $t('trials:trialDocument:entryRecord:title:uploadFile') }}
|
||||
</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>
|
||||
</div>
|
||||
|
@ -197,6 +183,33 @@
|
|||
@close="close"
|
||||
@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">
|
||||
<div class="name">{{ file.FileName }}</div>
|
||||
</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-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>
|
||||
</div>
|
||||
</div>
|
||||
</base-model>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -205,6 +218,7 @@ import { uploadTrialFileTypeFile, getTrialFileTypeFile } from '@/api/dictionary'
|
|||
import Pagination from '@/components/Pagination'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import preview from '@/views/reviewers/curriculumVitae/preview.vue'
|
||||
import baseModel from '@/components/BaseModel'
|
||||
import { mapGetters } from 'vuex'
|
||||
import uploadFiles from '../../uploadFiles.vue'
|
||||
import { downLoadFile } from '@/utils/stream.js'
|
||||
|
@ -223,7 +237,7 @@ const searchDataDefault = () => {
|
|||
}
|
||||
export default {
|
||||
name: 'entryRecord',
|
||||
components: { BoxContent, Pagination, preview, uploadFiles },
|
||||
components: { BoxContent, Pagination, preview, uploadFiles, baseModel },
|
||||
props: {
|
||||
ArchiveTypeEnum: {
|
||||
type: Number,
|
||||
|
@ -255,6 +269,15 @@ export default {
|
|||
preview_visible: false,
|
||||
timeList: [],
|
||||
|
||||
upload_config: {
|
||||
visible: false,
|
||||
showClose: true,
|
||||
width: '800px',
|
||||
title: '',
|
||||
appendToBody: false,
|
||||
isFolder: false,
|
||||
},
|
||||
|
||||
config: {
|
||||
visible: false,
|
||||
showClose: true,
|
||||
|
@ -270,6 +293,14 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
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) {
|
||||
try {
|
||||
|
@ -467,4 +498,25 @@ export default {
|
|||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
.file_title {
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.file {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
// .name {
|
||||
// width: 70%;
|
||||
// white-space: nowrap; /* 文本不会换行,会在同一行内继续,直到遇到<br>标签为止 */
|
||||
// text-overflow: ellipsis; /* 当文本溢出包含它的容器时,显示省略号(...)来表示被截断的文本 */
|
||||
// overflow: hidden; /* 隐藏溢出容器的文本 */
|
||||
// }
|
||||
}
|
||||
.btnBox{
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue