fix(components): 优化多个组件的显示逻辑

- 在 ApprovalDetail组件中,改进了多个字段的显示逻辑,增加了对 0值的处理
- 在 AttachmentUpload 组件中,调整了必填项的显示逻辑
- 在 ProjectApply 组件中,修改了前置流程字段的显示条件
- 在 upload 组件中,优化了文件列表的处理逻辑
This commit is contained in:
dj
2025-05-28 23:01:16 +08:00
parent f4330b60d5
commit 7c2d713035
4 changed files with 15 additions and 15 deletions

View File

@@ -22,7 +22,7 @@
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="24">
<el-form-item :label="label" prop="" required>
<el-form-item :label="label" prop="" :required="label!='项目归档附件'">
<file-upload @getFile="getOtherFile"/>
<el-button color="#DED0B2" v-if="templateDownloadBtnShow" @click="handleImportTemplateDownload"
style="margin-left: 10px">模板下载

View File

@@ -302,7 +302,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.actualNewPatent ? props.formData.actualNewPatent : <span>{'--'}</span>
props.formData.actualNewPatent ? props.formData.actualNewPatent :props.formData.actualNewPatent==0?0: <span>{'--'}</span>
}
</div>
)
@@ -317,7 +317,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.actualSoftwareCopyright ? props.formData.actualSoftwareCopyright : <span>{'--'}</span>
props.formData.actualSoftwareCopyright ? props.formData.actualSoftwareCopyright : props.formData.actualSoftwareCopyright==0?0: <span>{'--'}</span>
}
</div>
)
@@ -332,7 +332,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.actualTechnicalNorms ? props.formData.actualTechnicalNorms : <span>{'--'}</span>
props.formData.actualTechnicalNorms ? props.formData.actualTechnicalNorms : props.formData.actualTechnicalNorms==0?0:<span>{'--'}</span>
}
</div>
)
@@ -347,7 +347,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.actualNewProduct ? props.formData.actualNewProduct : <span>{'--'}</span>
props.formData.actualNewProduct ? props.formData.actualNewProduct : props.formData.actualNewProduct==0?0:<span>{'--'}</span>
}
</div>
)
@@ -362,7 +362,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.actualNewProcess ? props.formData.actualNewProcess : <span>{'--'}</span>
props.formData.actualNewProcess ? props.formData.actualNewProcess : props.formData.actualNewProcess==0?0: <span>{'--'}</span>
}
</div>
)
@@ -377,7 +377,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.actualNewDevice ? props.formData.actualNewDevice : <span>{'--'}</span>
props.formData.actualNewDevice ? props.formData.actualNewDevice :props.formData.actualNewDevice==0?0: <span>{'--'}</span>
}
</div>
)
@@ -392,7 +392,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.actualNewMaterials ? props.formData.actualNewMaterials : <span>{'--'}</span>
props.formData.actualNewMaterials ? props.formData.actualNewMaterials : props.formData.actualNewMaterials==0?0: <span>{'--'}</span>
}
</div>
)
@@ -407,7 +407,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.actualComputerSoftware ? props.formData.actualComputerSoftware : <span>{'--'}</span>
props.formData.actualComputerSoftware ? props.formData.actualComputerSoftware : props.formData.actualComputerSoftware==0?0:<span>{'--'}</span>
}
</div>
)
@@ -422,7 +422,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.actualThesis ? props.formData.actualThesis : <span>{'--'}</span>
props.formData.actualThesis ? props.formData.actualThesis : props.formData.actualThesis==0?0:<span>{'--'}</span>
}
</div>
)
@@ -437,7 +437,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.actualResearchReport ? props.formData.actualResearchReport : <span>{'--'}</span>
props.formData.actualResearchReport ? props.formData.actualResearchReport : props.formData.actualResearchReport==0?0: <span>{'--'}</span>
}
</div>
)
@@ -452,7 +452,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.actualTrademark ? props.formData.actualTrademark : <span>{'--'}</span>
props.formData.actualTrademark ? props.formData.actualTrademark :props.formData.actualTrademark==0?0: <span>{'--'}</span>
}
</div>
)
@@ -467,7 +467,7 @@ const schema = computed(() => {
component: () => (
<div style="white-space: pre-wrap;">
{
props.formData.actualOther ? props.formData.actualOther : <span>{'--'}</span>
props.formData.actualOther ? props.formData.actualOther : props.formData.actualOther==0?0: <span>{'--'}</span>
}
</div>
)

View File

@@ -140,7 +140,7 @@
@cancelOrClear="optionalChargeLeaderPickerCancel"/>
</el-form-item>
</el-col>
<el-col :span="24" v-if="preProcessShow === 'EDIT'||title==='apply'">
<el-col :span="24" v-if="preProcessShow === 'EDIT'||title==='apply'||title==='check'">
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" :label-width="title==='apply'?130:125">
<select-pre-process :formData="localFormData" :basicData="basicData"/>
<!-- <el-button color="#DED0B2" @click="handleShowPreTable" style="margin-right: 10px">-->

View File

@@ -458,7 +458,6 @@ const getOldFileList = (tag,flag) => {
fileList.value.push(item)
})
}else{
console.log("🚀 ~ file:'res.data.fileList ",res.data.fileList )
res.data.fileList?.forEach(item=>{
item.oldType=true
if(getTagName(activeName.value)==item.tag){
@@ -517,6 +516,7 @@ const tabRemove = async (val) => {
}
const handleTabClick = (item) => {
activeName.value = item.props.name
const defaultArray=tagsOption.value.filter(item1=>item1.tagId==item.props.name)
if(defaultArray&&defaultArray.length>0){
isDefault.value=defaultArray[0].isDefault==1