浏览代码

fix: 手动加班记录

chenzhen2 2 年之前
父节点
当前提交
04b3ce5f5d
共有 1 个文件被更改,包括 15 次插入5 次删除
  1. 15 5
      src/views/envmonitor/components/ManualWork/index.vue

+ 15 - 5
src/views/envmonitor/components/ManualWork/index.vue

@@ -940,6 +940,7 @@ export default defineComponent({
           type = "2";
         }
 
+        // if()
         let addObj: any = proxyData.formaTimeObj(
           customSceneList[0],
           type,
@@ -1128,11 +1129,20 @@ export default defineComponent({
             sceneEquipList.push(obj);
           }
         });
-        formTimerArr.map((item: any) => {
-          if (item.type == "1") {
-            sceneEquipList.push(item.sceneEquipList);
+        if (formTimerArr && formTimerArr.length == 2) {
+          if (
+            formTimerArr[1].startTime >= formTimerArr[0].startTime &&
+            formTimerArr[1].endTime <= formTimerArr[0].endTime
+          ) {
+          } else {
+            formTimerArr.map((item: any) => {
+              if (item.type == "1") {
+                sceneEquipList.concat(item.sceneEquipList)
+              }
+            });
           }
-        });
+        }
+
         sceneEquipList = proxyData.removeDuplicateObj(sceneEquipList);
         formTimerArr.map((item: any) => {
           if (item.type == "0" || item.type == "2") {
@@ -1141,7 +1151,7 @@ export default defineComponent({
         });
         console.log("提交申请-----");
         console.log(formTimerArr);
-        // proxyData.saveBatchCustomScene(formTimerArr);
+        proxyData.saveBatchCustomScene(formTimerArr);
       },
       // 提交加班记录
       saveBatchCustomScene(formTimerArr: any, type: any = 1) {