Min 1 year ago
parent
commit
e4c9548aad

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/ProFunWorkContext.java

@@ -43,7 +43,7 @@ public class ProFunWorkContext extends Model<ProFunWorkContext> {
     private boolean editFlag;
 
     @TableField(exist = false)
-    private boolean isSubmit;
+    private Integer isSubmit;
 
 
     @Override

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/ProjectFunctionalDivision.java

@@ -55,7 +55,7 @@ public class ProjectFunctionalDivision extends Model<ProjectFunctionalDivision>
     private boolean editFlag;
 
     @TableField(exist = false)
-    private boolean isSubmit;
+    private Integer isSubmit;
 
 
     @Override

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -11023,7 +11023,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         List<ProjectFunctionalDivision> divisionList = projectFunctionalDivisionService.list(new QueryWrapper<ProjectFunctionalDivision>().eq("company_id", companyId));
         divisionList.forEach(dt->{
             dt.setEditFlag(false);
-            dt.setSubmit(true);
+            dt.setIsSubmit(1);
         });
         msg.setData(divisionList);
         return msg;
@@ -11054,7 +11054,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         List<ProFunWorkContext> contexts = proFunWorkContextService.list(new QueryWrapper<ProFunWorkContext>().eq("pro_fun_id", id));
         contexts.forEach(cs->{
             cs.setEditFlag(false);
-            cs.setSubmit(true);
+            cs.setIsSubmit(1);
         });
         msg.setData(contexts);
         return msg;

+ 15 - 11
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -1825,7 +1825,8 @@ a {
                 //工作内容
                 workContextDig:false,
                 functionalId:null,
-                workContextList:[]
+                workContextList:[],
+                oldValue:null,
             };
         },
         // 过滤器
@@ -5072,23 +5073,26 @@ a {
                 row.editFlag = false
                 if (row.isSubmit) {
                     if(type=="functional"){
-                         this.functionalList[index] = row
+                        // this.functionalList[index]=this.oldValue
+                        this.$set(this.functionalList,index,this.oldValue);
                     }else if(type=="workContext"){
-                         this.workContextList[index] = row
+                         this.workContextList[index] = this.oldValue
                     }
-                   
                 } 
-                // else {
-                //     if(type=="functional"){
-                //          this.functionalDelVersion(row,index);
-                //     }else if(type=="workContext"){
-                //          this.workContextDelVersion(row,index);
-                //     }
-                // }
+                else if(!row.id){
+                    if(type=="functional"){
+                         this.functionalDelVersion(row,index);
+                    }else if(type=="workContext"){
+                         this.workContextDelVersion(row,index);
+                    }
+                }
+                
             },
             // 编辑
             functionalEditVersion(row){
                 // v.value = JSON.parse(JSON.stringify(row));
+                this.oldValue= Object.assign({}, row);;
+                console.log("row",row,"old",this.oldValue)
                 row.editFlag = true;
             },
             // 删除