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