项目文档同意入项记录上传更改为弹框
parent
b0ff8e7163
commit
66d5591d50
|
@ -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>
|
||||||
|
@ -197,6 +183,33 @@
|
||||||
@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">
|
||||||
|
<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>
|
</box-content>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -205,6 +218,7 @@ import { uploadTrialFileTypeFile, getTrialFileTypeFile } 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'
|
||||||
|
@ -223,7 +237,7 @@ 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,
|
||||||
|
@ -255,6 +269,15 @@ export default {
|
||||||
preview_visible: false,
|
preview_visible: false,
|
||||||
timeList: [],
|
timeList: [],
|
||||||
|
|
||||||
|
upload_config: {
|
||||||
|
visible: false,
|
||||||
|
showClose: true,
|
||||||
|
width: '800px',
|
||||||
|
title: '',
|
||||||
|
appendToBody: false,
|
||||||
|
isFolder: false,
|
||||||
|
},
|
||||||
|
|
||||||
config: {
|
config: {
|
||||||
visible: false,
|
visible: false,
|
||||||
showClose: true,
|
showClose: true,
|
||||||
|
@ -270,6 +293,14 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
async downLoad(row) {
|
||||||
try {
|
try {
|
||||||
|
@ -467,4 +498,25 @@ 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 {
|
||||||
|
// 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>
|
</style>
|
Loading…
Reference in New Issue