Browse Source

调整工时导入选择日期表格错乱的BUG

Lijy 3 years ago
parent
commit
989ecfd866

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/config/index.js

@@ -4,8 +4,8 @@ var path = require('path')
 // var ip = '192.168.2.36'
 
  
-var ip = '47.100.37.243'
-// var ip = '192.168.2.34'
+// var ip = '47.100.37.243'
+var ip = '192.168.2.63'
 
 // var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
 

+ 11 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -621,14 +621,19 @@
                     ></el-date-picker>
                 <el-button style="float:right;" type="primary" @click="submitBatchSubFillData">提交</el-button>
             </div>
-                <el-table  border :data="checkinList" highlight-current-row v-loading="checkinLoading" :height="520" 
+                <el-table border :data="checkinList" highlight-current-row v-loading="checkinLoading" :height="520" 
                 :key="timeStamp"
-                style="width: 100%;margin-top:5px;">
+                style="width: 100%;margin-top:5px;" ref="tab">
                 <el-table-column prop="createDate" label="工作日期"  width="100px" fixed="left"></el-table-column>
                 <el-table-column prop="username" label="员工姓名"   width="80px" fixed="left"></el-table-column>
                 <el-table-column prop="startTime" label="上班时间"  width="80px" fixed="left"></el-table-column>
                 <el-table-column prop="endTime" label="下班时间"  width="80px" fixed="left"></el-table-column>
                 <el-table-column prop="workHours" label="工作时长" width="80px" align="right" fixed="left">
+                <!-- <el-table-column prop="createDate" label="工作日期"  width="100"></el-table-column>
+                <el-table-column prop="username" label="员工姓名"   width="80"></el-table-column>
+                <el-table-column prop="startTime" label="上班时间"  width="80"></el-table-column>
+                <el-table-column prop="endTime" label="下班时间"  width="80"></el-table-column>
+                <el-table-column prop="workHours" label="工作时长" width="80" align="right"> -->
                     <template slot-scope="scope">
                         {{scope.row.workHours.toFixed(1)}}h
                     </template>
@@ -645,7 +650,6 @@
                     </template>
                 </el-table-column>
                 </el-table>
-
             <!-- <div v-if="active==0" style="padding:30px;height:360px;">
                 
             </div>
@@ -850,6 +854,10 @@
                         this.checkinList = res.data.list;
                         this.projectColumns = res.data.projects;
                         console.log(res.data);
+                        // 自定义表格会导致表格错乱,需重新计算表格
+                        this.$nextTick(()=>{
+                            this.$refs.tab.doLayout()
+                        })
                     } 
                 },
                 error => {
@@ -2911,5 +2919,4 @@
         display: inline-block;
         width: 380px;
     }
-    
 </style>