【修改】修改草稿重复保存

This commit is contained in:
zhoulingpo
2023-05-11 14:44:48 +08:00
parent 930f97b050
commit 7e0c7b3c1d
+12 -4
View File
@@ -245,6 +245,7 @@ export default {
newParams=this.tableData.map(item=>{ newParams=this.tableData.map(item=>{
let obj={} let obj={}
obj={ obj={
id:'',
prcName:item.name, prcName:item.name,
prcType:item.power==0?'':item.power, prcType:item.power==0?'':item.power,
createUser:this.userId, createUser:this.userId,
@@ -252,7 +253,8 @@ export default {
userId:this.userId, userId:this.userId,
dataJson:'', dataJson:'',
bpnId: this.$store.getters.handleProcess?.id, bpnId: this.$store.getters.handleProcess?.id,
reportId: item.reportId reportId: item.reportId,
} }
let submitJson={ let submitJson={
oneApprove:item.oneApprove, oneApprove:item.oneApprove,
@@ -279,10 +281,16 @@ export default {
// 保存 // 保存
handleSave(){ handleSave(){
this.saveLoading = true this.saveLoading = true
if(this.tableData.length==0){
this.$message.warning('至少需要选择一条报告数据')
return
}
// 处理表格数据 // 处理表格数据
this.organizeData() this.organizeData()
this.params=this.params.map(item=>{
item.id = this.$store.getters.handleProcess?.id
return item
})
this.saveProcessALL(this.params).then( this.saveProcessALL(this.params).then(
()=>{ ()=>{
this.saveLoading = false this.saveLoading = false