This commit is contained in:
parent
b4229e16eb
commit
3ed03ea44f
|
|
@ -49,6 +49,8 @@
|
|||
? '#67C23A'
|
||||
: '#F56C6C',
|
||||
}"
|
||||
style="cursor: pointer"
|
||||
@click="onHandlePreviewFile(data, item.type)"
|
||||
>
|
||||
{{ initIsUpload(data, item.type) }}
|
||||
</span>
|
||||
|
|
@ -101,6 +103,12 @@
|
|||
</el-row>
|
||||
</template>
|
||||
</DialogModel>
|
||||
|
||||
<FileView
|
||||
:filePath="filePath"
|
||||
:fileName="fileName"
|
||||
:visible.sync="fileViewVisible"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -108,6 +116,7 @@
|
|||
import TableModel from '@/components/TableModel'
|
||||
import DialogModel from '@/components/DialogModel'
|
||||
import AddOrEditForm from './add-or-edit-form'
|
||||
import FileView from '@/components/FileView'
|
||||
import { formLabel, columnsList, dialogConfig } from './config'
|
||||
import {
|
||||
deleteSubBaseInfoAPI,
|
||||
|
|
@ -119,6 +128,7 @@ export default {
|
|||
TableModel,
|
||||
DialogModel,
|
||||
AddOrEditForm,
|
||||
FileView,
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
@ -128,6 +138,9 @@ export default {
|
|||
dialogConfig,
|
||||
editFormData: {}, // 修改时回显的数据
|
||||
getSubBaseInfoListAPI, // 获取分包商列表的API
|
||||
filePath: '',
|
||||
fileName: '',
|
||||
fileViewVisible: false,
|
||||
|
||||
// 营业执照身份证等信息是否上传的插槽
|
||||
slots: [
|
||||
|
|
@ -227,6 +240,20 @@ export default {
|
|||
}
|
||||
return '未上传'
|
||||
},
|
||||
|
||||
// 预览附件
|
||||
onHandlePreviewFile(data, type) {
|
||||
const file = data.contractFile.find(
|
||||
(item) => item.sourceType == type,
|
||||
)
|
||||
if (!file) {
|
||||
this.$modal.msgError('附件不存在')
|
||||
return
|
||||
}
|
||||
this.filePath = file.lsUrl
|
||||
this.fileName = file.originFileName
|
||||
this.fileViewVisible = true
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,12 @@
|
|||
|
||||
<!-- 施工承诺书 -->
|
||||
<template slot="contractFile" slot-scope="{ data }">
|
||||
{{ initContractFile(data) }}
|
||||
<span
|
||||
style="cursor: pointer"
|
||||
@click="onHandlePreviewFile(data, 1)"
|
||||
>
|
||||
{{ initContractFile(data) }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template slot="handle" slot-scope="{ data }">
|
||||
|
|
@ -100,6 +105,12 @@
|
|||
</el-row>
|
||||
</template>
|
||||
</DialogModel>
|
||||
|
||||
<FileView
|
||||
:filePath="filePath"
|
||||
:fileName="fileName"
|
||||
:visible.sync="fileViewVisible"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -107,6 +118,7 @@
|
|||
import TableModel from '@/components/TableModel'
|
||||
import DialogModel from '@/components/DialogModel'
|
||||
import EntryAndExitForm from './entry-and-exit-form'
|
||||
import FileView from '@/components/FileView'
|
||||
import { formLabel, columnsList, dialogConfig } from './config'
|
||||
import { getTeamEntryListAPI } from '@/api/basic-manage/team-manage/team-entry-and-exit'
|
||||
|
||||
|
|
@ -116,6 +128,7 @@ export default {
|
|||
TableModel,
|
||||
DialogModel,
|
||||
EntryAndExitForm,
|
||||
FileView,
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
@ -126,6 +139,9 @@ export default {
|
|||
formType: 1,
|
||||
editFormData: {},
|
||||
getTeamEntryListAPI,
|
||||
filePath: '',
|
||||
fileName: '',
|
||||
fileViewVisible: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -212,6 +228,20 @@ export default {
|
|||
return '-'
|
||||
}
|
||||
},
|
||||
|
||||
// 预览附件
|
||||
onHandlePreviewFile(data, type) {
|
||||
const file = data.contractFile.find(
|
||||
(item) => item.sourceType == type,
|
||||
)
|
||||
if (!file) {
|
||||
this.$modal.msgError('附件不存在')
|
||||
return
|
||||
}
|
||||
this.filePath = file.lsUrl
|
||||
this.fileName = file.originFileName
|
||||
this.fileViewVisible = true
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue