lxy_01 8 часов назад
Родитель
Сommit
824ed76a48

+ 2 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/FactoryController.java

@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.annotation.Resource;
 import java.time.LocalDateTime;
 
 /**
@@ -24,7 +25,7 @@ import java.time.LocalDateTime;
 @RestController
 @RequestMapping("/factory")
 public class FactoryController {
-    @Autowired
+    @Resource
     private FactoryService factoryService;
     @RequestMapping("/getFactories")
     public HttpRespMsg getFactories(){

+ 32 - 5
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/components/chooseSomeone.vue

@@ -34,7 +34,7 @@
           @click="newGroupViewBackCli(true, groupView)"><van-icon name="arrow-left" />返回</div>
         <div class="treeBox_tree">
           <el-tree ref="tree" v-model="treeVal" show-checkbox node-key="id" :data="personnelTree" :props="defaultProps"
-            :filter-node-method="filterNode">
+            :filter-node-method="filterNode" @check-change="handleCheckChange">
             <span class="custom-tree-node" slot-scope="{ node }">
               <span>
                 {{ node.label }}
@@ -100,6 +100,17 @@ export default {
       type: Boolean,
       default:()=> true, 
     },
+    //仅在加班页面调用时使用
+    IsOverTime:{
+      type: Boolean,
+      default:()=> false, 
+    },
+    deptIdTree: {
+      type: Array,
+      default: () => []
+    },
+
+
   },
   components: {},
   data() {
@@ -141,11 +152,16 @@ export default {
       } else if (this.groupView == 2) {
         this.groupVal = newPpeopleListId
       } else if (this.groupView == 3) {
-        // tree 额外处理
-        console.log('tree 额外处理')
+        this.groupVal = newPpeopleListId
+
       }
     }
-    console.log(this.groupVal)
+    console.log("====================" + this.groupView)
+    if (this.groupView == 3 && this.IsOverTime) {
+      let newDeptIdTree = JSON.parse(JSON.stringify(this.deptIdTree))
+      this.setUserToDept(newDeptIdTree)
+      this.personnelTree = JSON.parse(JSON.stringify(newDeptIdTree))
+    }
     if (this.peopleList.length <= 0) {
       this.getPeople()
     }
@@ -168,6 +184,9 @@ export default {
       if (!value) return true;
       return data.label.indexOf(value) !== -1;
     },
+    handleCheckChange() {
+      this.treeVal = this.$refs.tree.getCheckedKeys()
+    },
     newGroupViewBackCli(flg, i) {
       this.newGroupViewBack = flg
       if(this.type != 1) {
@@ -215,7 +234,12 @@ export default {
             this.setUserToDept(res.data)
             this.personnelTree = list
             this.newPersonnelTree = JSON.parse(JSON.stringify(list))
-            console.log(this.personnelTree)
+            
+            if (this.IsOverTime) {
+                let newDeptIdTree = JSON.parse(JSON.stringify(this.deptIdTree))
+                this.setUserToDept(newDeptIdTree)
+                this.personnelTree = JSON.parse(JSON.stringify(newDeptIdTree))
+            }
           } else {
             this.$toast.clear();
             this.$toast.fail(res.msg);
@@ -243,6 +267,8 @@ export default {
     // 单选和复选点击确定触发的事件
     handClick() {
       let arr = this.groupView == 1 ? [this.radioVal] : this.groupVal
+      arr = this.groupView == 3 ? this.treeVal : arr
+      console.log(arr)
       let newArr = this.personnelList.filter(item => {
         return arr.includes(item.id)
       })
@@ -250,6 +276,7 @@ export default {
       // return
       this.loadingBtn = true
       this.$emit('ChooseSomeoneChanhe', newArr)
+      this.loadingBtn = false
     },
     treeHandClick() {
       if(this.newGroupView == 3) {

+ 8 - 0
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/router/index.js

@@ -111,6 +111,14 @@ const router = new Router({
               keepAlive: false
           }
       },
+      {
+        path: "/overtimeApplication",
+        component: () => import("@/views/overtime/overtimeApplication"),
+        meta: {
+            title: "加班管理",
+            keepAlive: false
+        }
+    },
      {
         path: "/MemberInfo",
         component: () => import("@/views/groupView/info"),

+ 8 - 0
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/index/index.vue

@@ -243,6 +243,14 @@ export default {
                 icon: 'balance-list-o',
                 fixed: true
               },
+              {
+                name: '加班管理',
+                moudelName: '加班管理',
+                url: '/overtimeApplication',
+                icon: 'balance-list-o',
+                fixed: true
+              },
+
             ]
             console.log(routersList, modelNameList)
             this.routers = routersList.filter(item => item.fixed || modelNameList.includes(item.moudelName));