Browse Source

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper

QuYueTing 8 tháng trước cách đây
mục cha
commit
aec9b4e61f

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/echartsData.js

@@ -124,7 +124,7 @@ export function debounce(func, delay) {
 }
 
 // export const fixedTaskGrouping = ['工程部现场安装施工', '工程部配合调试', '生产部电气', '生产部车间', '研发部BIM设计', '研发部工艺设计', '研发部工艺调试验收', '研发部电气设计', '研发部电气调试验收', '研发部结构设计']
-export const fixedTaskGrouping = ['研发部工艺设计', '研发部结构设计', '研发部BIM设计', '研发部电气设计', '研发部BIM设计', '生产部车间', '生产部电气', '工程部现场安装施工', '研发部电气调试验收', '工程部配合调试']
+export const fixedTaskGrouping = ['研发部工艺设计', '研发部结构设计', '研发部BIM设计', '研发部电气设计', '生产部车间', '生产部电气', '工程部现场安装施工', '研发部电气调试验收', '工程部配合调试', '研发部工艺调试验收']
 
 // 固定分组数据
 export const fixedGrouping = {

+ 13 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -4431,6 +4431,7 @@ export default {
           groupNames: this.groupConsumptionName.join(',')
         })
         // this.groupConsumptionLoading = false
+        data = this.sortData(data)
         this.listLoading = false
         let nameList = data.map(item => (item.groupName || ''))
         let realHourList = data.map(item => returnNum((item.realHour || 0)))
@@ -4444,6 +4445,18 @@ export default {
           return num > 0 ? num : 0
         }
       }, 500)
+    },
+    sortData(arrs = []) {
+      let arr = fixedTaskGrouping
+      const orderMap = new Map(arr.map((name, index) => [name, index]));
+
+      arrs.sort((a, b) => {
+          const indexA = orderMap.get(a.groupName);
+          const indexB = orderMap.get(b.groupName);
+          return (indexA !== undefined ? indexA : Infinity) - (indexB !== undefined ? indexB : Infinity);
+      });
+
+      return arrs
     }
   },
 };