bfdb595c by lihua

没有附件不展示附件信息

1 parent ff971e61
......@@ -129,6 +129,29 @@ const getDetailInfo = () => {
if (assetDetailInfo.value.registerRSVO?.isAuthreSourceDevelop == 'N' && assetDetailInfo.value.registerRSVO?.isSharedData == 'Y') {
activeShareTabName.value = 'shareOrgs';
}
uploadFileDetailInfo.value = [];
assetDetailInfo.value.attachmentRSVOS?.forEach(attch => {
let f = uploadFileDetailInfo.value.find(u => u.fileType == attch.fileType);
if (f && f.files.length) {
f.files.push({
name: attch.fileName,
url: attch.fileUrl,
});
} else {
uploadFileDetailInfo.value.push({
fileType: attch.fileType,
fileTypeName: attch.fileTypeName,
files: [{
name: attch.fileName,
url: attch.fileUrl,
}]
});
}
});
if (!(uploadFileDetailInfo.value?.length || detailType.value != 'asset')) {
let index = tabsInfo.value.tabs.findIndex(t => t.label == '附件信息');
index > -1 && tabsInfo.value.tabs.splice(index, 1);
}
} else {
ElMessage.error(res.msg);
}
......@@ -204,6 +227,29 @@ const getDetailInfo = () => {
if (assetDetailInfo.value.registerRSVO?.isAuthreSourceDevelop == 'N' && assetDetailInfo.value.registerRSVO?.isSharedData == 'Y') {
activeShareTabName.value = 'shareOrgs';
}
uploadFileDetailInfo.value = [];
assetDetailInfo.value.attachmentRSVOS?.forEach(attch => {
let f = uploadFileDetailInfo.value.find(u => u.fileType == attch.fileType);
if (f && f.files.length) {
f.files.push({
name: attch.fileName,
url: attch.fileUrl,
});
} else {
uploadFileDetailInfo.value.push({
fileType: attch.fileType,
fileTypeName: attch.fileTypeName,
files: [{
name: attch.fileName,
url: attch.fileUrl,
}]
});
}
});
if (!(uploadFileDetailInfo.value?.length || detailType.value != 'asset')) {
let index = tabsInfo.value.tabs.findIndex(t => t.label == '附件信息');
index > -1 && tabsInfo.value.tabs.splice(index, 1);
}
} else {
ElMessage.error(res.msg);
}
......@@ -295,6 +341,29 @@ const getDetailInfo = () => {
if (assetDetailInfo.value.registerRSVO?.isAuthreSourceDevelop == 'N' && assetDetailInfo.value.registerRSVO?.isSharedData == 'Y') {
activeShareTabName.value = 'shareOrgs';
}
uploadFileDetailInfo.value = [];
assetDetailInfo.value.attachmentRSVOS?.forEach(attch => {
let f = uploadFileDetailInfo.value.find(u => u.fileType == attch.fileType);
if (f && f.files.length) {
f.files.push({
name: attch.fileName,
url: attch.fileUrl,
});
} else {
uploadFileDetailInfo.value.push({
fileType: attch.fileType,
fileTypeName: attch.fileTypeName,
files: [{
name: attch.fileName,
url: attch.fileUrl,
}]
});
}
});
if (!(uploadFileDetailInfo.value?.length || detailType.value != 'asset')) {
let index = tabsInfo.value.tabs.findIndex(t => t.label == '附件信息');
index > -1 && tabsInfo.value.tabs.splice(index, 1);
}
} else {
ElMessage.error(res.msg);
}
......@@ -346,6 +415,10 @@ const getDetailInfo = () => {
});
}
});
if (!(uploadFileDetailInfo.value?.length || detailType.value != 'asset')) {
let index = tabsInfo.value.tabs.findIndex(t => t.label == '附件信息');
index > -1 && tabsInfo.value.tabs.splice(index, 1);
}
deploymentId.value = approveVO?.camundaDeploymentId;
processInstanceId.value = approveVO?.camundaInstanceId;
isTextTruncated();
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!