Commit 9241ea2d by 前端

Merge branch 'xuyl_dev_v3.3.1.1' into 'v3.3.1'

解决进行中的sop编辑问题

See merge request !407
2 parents 4bd53879 d6aaae62
...@@ -916,10 +916,9 @@ export default { ...@@ -916,10 +916,9 @@ export default {
if (this.routeInfo.addOrEdit == 'edit') { if (this.routeInfo.addOrEdit == 'edit') {
params.id = this.routeInfo.id params.id = this.routeInfo.id
params.eventList = [] params.eventList = []
params.backupList = []
var idx = 0 var idx = 0
console.log(this.editForm.eventList)
this.editForm.eventList.forEach((item, index) => { this.editForm.eventList.forEach((item, index) => {
console.log(item)
if (new Date(item.eventStartDate) > new Date()) { if (new Date(item.eventStartDate) > new Date()) {
params.eventList.push( params.eventList.push(
{ {
...@@ -1033,6 +1032,7 @@ export default { ...@@ -1033,6 +1032,7 @@ export default {
idx = idx + 1 idx = idx + 1
}else{ }else{
params.eventList.push(item) params.eventList.push(item)
params.eventList[index].isDelete = true
} }
}) })
} else { } else {
...@@ -1132,6 +1132,18 @@ export default { ...@@ -1132,6 +1132,18 @@ export default {
deleteIdList: this.deleteIdList, deleteIdList: this.deleteIdList,
editList: params.eventList editList: params.eventList
} }
batchEditParams.editList.forEach((item,indx) =>{
if(item.backupContent instanceof Array){
item.backupContent = JSON.stringify(item.backupContent)
}
if (item.isDelete){
delete batchEditParams.editList[indx]
}
delete item.isDelete
})
batchEditParams.editList = batchEditParams.editList.filter(current =>{
return current !== undefined
})
// 事件进行时,批量编辑sop事件 // 事件进行时,批量编辑sop事件
this.$apis.sop.batchEditSopEventApi(batchEditParams).then(res => { this.$apis.sop.batchEditSopEventApi(batchEditParams).then(res => {
this.$message({ this.$message({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!