修改上传材料文件展示

prod
吕天方 8 months ago
parent 6c930e66a0
commit a6634e4a16

@ -271,6 +271,9 @@
font-size: 14px;
color: #333333;
}
.file-info-content {
display: flex;
}
.margin-top-file {
margin-top: 20px;
}

@ -27,10 +27,10 @@
<el-col :span="3">
<span>{{ item.key }}</span>
</el-col>
<el-col :span="21">
<span class="file-link" style="border: 1px solid #dcdfe6;padding: 5px;display: flex; align-items: center; width: 50%;">
<el-col :span="21" class="file-info-content">
<span class="file-link" v-for="(itemTwo,indexTwo) in item.url" :key="indexTwo + 'a' + index" style="border: 1px solid #dcdfe6;padding: 5px;display: flex; align-items: center; width: 45%; margin-right: 10px;">
<img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="" style="width: 20px; margin-right: 10px;">
<a :href="VUE_APP_BASE_API + item.url" target="_blank">{{ item.value }}</a>
<a :href="VUE_APP_BASE_API + itemTwo.url" target="_blank">{{ itemTwo.value }}</a>
</span>
</el-col>
</el-row>
@ -135,8 +135,18 @@ export default {
let url = newFile[key] ? newFile[key].split("/") : null;
let obj = {};
obj["key"] = key;
obj["url"] = newFile[key] ? newFile[key] : '';
obj["value"] = url ? url[url.length - 1] : '';
if(newFile[key]) {
let url = newFile[key].split(',')
obj["url"] = []
url.forEach(element => {
let urlSplit = element.split("/");
let objec = {}
objec.url = element;
objec.value = urlSplit[urlSplit.length - 1];
obj["url"].push(objec);
});
}
// obj["value"] = url ? url[url.length - 1] : '';
arr.push(obj)
}
}

Loading…
Cancel
Save