fix : 修复阶段变更详情页面细节

This commit is contained in:
2024-06-04 18:43:01 +08:00
parent b9d33bd6e4
commit df6f49caeb
2 changed files with 49 additions and 11 deletions

View File

@@ -2,7 +2,7 @@
<div v-loading="loading">
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
<el-form :model="formData" label-width="auto" >
<file-component title="需求上报附件" tag="需求上报"
<file-component :title="getTagName(type)+'附件'" :tag="getTagName(type)"
v-model:value="formData.fileList" :processViewer="processViewer"
:file-list-show="fileListShow"/>
</el-form>
@@ -122,7 +122,7 @@ const schema = computed(()=>{
)
},
]
} else {
} else if(props.type == 'archivist'){
arr = [
{
label: '项目归档附件',
@@ -144,13 +144,49 @@ const schema = computed(()=>{
}
</div>
)
},
]
} else if(props.type == 'phase'){
arr = [
{
label: '阶段变更附件',
prop: 'singleFile',
colProps: {
span: 24
},
component: ()=>(
<div>
{
props.formData.singleFile?.originalFileName?
<span
style={{color: '#409EFF', cursor: 'pointer'}}
onClick={()=>handleDownload(props.formData.singleFile)}
>
{props.formData.singleFile?.originalFileName}
</span> :
<span>{'--'}</span>
}
</div>
)
},
]
}
return arr
})
const getTagName = (type) => {
switch (type) {
case 'approval':
return '项目立项'
case 'execute':
return '项目实施'
case 'archivist':
return '项目归档'
case 'phase':
return '阶段变更'
}
}
const handleDownload = (row) => {
const loading = ElLoading.service({fullscreen: true})
downloadFile(row.fileId).then(res => {