Commit 0f03876f authored by Xiaxuxia's avatar Xiaxuxia

解决banner编辑时无连接参数不显示,影像图库修改源文件无反应问题

parent 879e070b
......@@ -234,7 +234,9 @@ export default {
filterParams(row) {
let a = {};
for (let i in this.formObject.formVal) {
a[i] = row[i] || null
if (row[i] !== '') {
a[i] = row[i]
}
}
return a
},
......
......@@ -290,7 +290,8 @@ export default {
let data = JSON.parse(JSON.stringify(afterFormat));
// data.paramJson = JSON.parse(data.paramJson);
data.imageInfoRelationList = data.imageInfoRelationList[0];
//注意:imageInfoRelationListParse为imageInfoRelationList参数的最后一项,赋值显示
data.imageInfoRelationList = data.imageInfoRelationListParse[0];
data.coverImg = data.coverImg || '';
this.ruleForm = data;
this.images.selects = this.ruleForm.relatedIds.split(',')//相似图片转为数组格式
......
......@@ -30,8 +30,8 @@
<el-table-column align="center" label="序号" prop="index" width="65"></el-table-column>
<el-table-column align="center" label="产品名称" prop="name"></el-table-column>
<el-table-column align="center" label="产品类型" prop="paramJson.productType"></el-table-column>
<el-table-column align="center" label="尺寸" prop="imageInfoRelationList[0].fileWidth"></el-table-column>
<el-table-column align="center" label="价格" prop="imageInfoRelationList[0].price"></el-table-column>
<el-table-column align="center" label="尺寸" prop="imageInfoRelationListParse[0].fileWidth"></el-table-column>
<el-table-column align="center" label="价格" prop="imageInfoRelationListParse[0].price"></el-table-column>
<el-table-column align="center" label="状态">
<template slot-scope="scope">
{{ getStatus(scope.row.status) }}
......@@ -231,6 +231,9 @@ export default {
element.index = ((this.listQuery.page-1)*this.listQuery.limit)+(index+1)
});
this.list = this.list.map(v => {
let len = v.imageInfoRelationList.length;
//注意:imageInfoRelationList参数后端返回的是数组,编辑后的源文件图片被放在最后一项。所以取数组的最后一项
v.imageInfoRelationListParse = len > 0 ? [v.imageInfoRelationList[v.imageInfoRelationList.length - 1]] : []
v.paramJson = JSON.parse(v.paramJson)
return v
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment