17613754660 3 rokov pred
rodič
commit
c3fea50079

+ 12 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/project/gantt.vue

@@ -85,13 +85,13 @@ export default {
     }
 };
     // gantt.config.autosize = true;
-    gantt.config.duration_unit = "hour";
+    // gantt.config.duration_unit = "hour";
     gantt.config.fit_tasks = true;
       gantt.config.drag_move = false;
     gantt.config.xml_date = "%Y-%m-%d";
     gantt.config.columns=[
         {name:"text",label:(this.stafforpro == "人员" ? "员工名称" : "项目名称"), align: "left" },
-        {name:"duration",label:"计划工时(h)", align: "center" }
+        {name:"time",label:"计划工时(h)", align: "center" }
         // {name:"start_date", label:"开始时间", width:'*' , align: "center" },
         // {name:"duration",   label:"工时(天)", width:'*' ,   align: "center" }
     ];
@@ -103,6 +103,15 @@ export default {
     gantt.config.subscales = [
       {unit: "day", step: 1, date: "周%D,%d"}
     ];
+    gantt.config.buttons_left = []
+    gantt.config.buttons_right = ["gantt_cancel_btn"]
+    gantt.config.drag_links = false
+    gantt.config.drag_resize = false
+    gantt.config.drag_progress = false
+    
+    // gantt.config.lightbox.sections = [
+    //   {name:"description", height:76, map_to:"text", type:"textarea",focus:true}
+    // ];
 
     gantt.config.start_date = new Date(this.valueDate[0]);
     gantt.config.end_date = new Date(this.valueDate[1]);
@@ -122,7 +131,7 @@ export default {
     //     group_id: "key",
     //     group_text: "label"
     // });
-    console.log("props",this.$props.tasks);
+    // console.log("props",gantt);
   }
 }
 </script>

+ 8 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -198,9 +198,16 @@ export default {
         this.http.post('/project/getGanttData', getlistcs ,
                         res => {
                             if (res.code == "ok") {
+                              // var list = JSON.parse(JSON.stringify(res.data));
+                              
+                              //   for (let index = 0; index < list.length; index++) {
+                              //     list[index].time123 = list[index].duration
+                              //   }
+                              //   console.log("list",list);
                                 this.tasks = {data:res.data};
                                 this.isDataLoaded = true;
-                                // console.log("getlist",res.data);
+                                // console.log("getlist",this.tasks);
+                                
                                 
                                 this.$nextTick(()=>{
                                   // if (this.reqpar1 = 0) {