Commit 3ba567f6 by 前端

修复多个图片bug

1 parent b1986506
......@@ -96,11 +96,12 @@
</div>
<div>
<div v-for="(obj,index) in backupContentJson(item.backupContent)" :key="index">
<div class="textHidden" :title="obj.attContent" v-if="obj.attType == 1" v-html="tramWord(obj.attContent)"></div>
<div class="textHidden" :title="obj.attContent" v-if="obj.attType == 1"
v-html="tramWord(obj.attContent)"></div>
</div>
<div class="event-inline" v-for="(obj,index) in backupContentJson(item.backupContent)" :key="index">
<div >
<div v-if="obj.attType == 2">
<div>
<div v-if="obj.attType == 2">
<img class="model-item-img"
:src="obj.attContent" alt/>
</div>
......@@ -934,9 +935,9 @@ export default {
followerTypeId: item.followerTypeId,
followerTypeName: item.followerTypeName,
reachesType: item.reachesType,
reachesTypeSet: item.reachesTypeSet
reachesTypeSet: item.reachesTypeSet,
resourceList: []
})
console.log(item.id)
if (item.id) {
params.eventList[index].id = item.id
}
......@@ -948,7 +949,6 @@ export default {
if (backupContent && backupContent.length <= 2) {
backupContent.forEach(obj => {
if (obj && obj.attType == 1) {
console.log(params.eventList[index])
params.eventList[index].eventContent = obj.attContent
}
if (obj && obj.attType == 2) {
......@@ -995,7 +995,6 @@ export default {
params.eventList[index].additionalType = 1
params.eventList[index].objectType = 10
let backupattContent = typeof (obj.attContent) == 'string' ? JSON.parse(obj.attContent) : obj.attContent
console.log(backupattContent)
params.eventList[index].objectId = backupattContent.objectId
}
})
......@@ -1007,8 +1006,7 @@ export default {
if (obj && obj.attType == 2) {
params.eventList[index].additionalType = 5
params.eventList[index].objectType = 11
videoImageStorage.push(obj.attContent)
params.eventList[index].resourceList = videoImageStorage
params.eventList[index].resourceList.push(obj.attContent)
}
if (obj && obj.attType == 6) {
params.eventList[index].additionalType = 6
......@@ -1037,7 +1035,7 @@ export default {
})
}
idx = idx + 1
}else{
} else {
params.eventList.push(item)
params.eventList[index].isDelete = true
}
......@@ -1047,6 +1045,7 @@ export default {
params.eventList = []
this.editForm.eventList.forEach((item, index) => {
params.eventList.push(JSON.parse(JSON.stringify(item)))
params.eventList[index].resourceList = []
if (item.object && item.object.length <= 2) {
item.object.forEach(obj => {
if (obj && obj.attType == 1) {
......@@ -1104,8 +1103,7 @@ export default {
if (obj && obj.attType == 2) {
params.eventList[index].additionalType = 5
params.eventList[index].objectType = 11
videoImageStorage.push(obj.attContent)
params.eventList[index].resourceList = videoImageStorage
params.eventList[index].resourceList.push(obj.attContent)
}
if (obj && obj.attType == 6) {
params.eventList[index].additionalType = 6
......@@ -1145,17 +1143,16 @@ export default {
deleteIdList: this.deleteIdList,
editList: params.eventList
}
console.log(batchEditParams.editList)
batchEditParams.editList.forEach((item,indx) =>{
if(item.backupContent instanceof Array){
batchEditParams.editList.forEach((item, indx) => {
if (item.backupContent instanceof Array) {
item.backupContent = JSON.stringify(item.backupContent)
}
if (item.isDelete){
if (item.isDelete) {
delete batchEditParams.editList[indx]
}
delete item.isDelete
})
batchEditParams.editList = batchEditParams.editList.filter(current =>{
batchEditParams.editList = batchEditParams.editList.filter(current => {
return current !== undefined
})
// 事件进行时,批量编辑sop事件
......@@ -1444,7 +1441,8 @@ export default {
text-overflow: ellipsis;
white-space: nowrap;
}
.event-inline{
.event-inline {
margin-top: 8px;
display: inline-block
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!