linyanfei 3 years ago
parent
commit
b87f4abc9a

+ 5 - 5
shanXiPlatform/src/utils/index.js

@@ -416,11 +416,11 @@ export function getNowFormatDateone() {
416
     month+
416
     month+
417
     seperator1 +
417
     seperator1 +
418
     strDate 
418
     strDate 
419
-    // +
420
-    // "  " +
421
-    // hour +
422
-    // ":" +
423
-    // minutes+
419
+    +
420
+    "  " +
421
+    hour +
422
+    ":" +
423
+    minutes
424
     // ":"+
424
     // ":"+
425
     // seconds
425
     // seconds
426
 
426
 

+ 8 - 35
shanXiPlatform/src/views/systemManagement/userManagement/approverManagement/index.vue

@@ -1,5 +1,5 @@
1
 <template>
1
 <template>
2
-  <div class="container treebox">
2
+  <div class="container  treebox">
3
     <el-tree 
3
     <el-tree 
4
       id="mainLeft"
4
       id="mainLeft"
5
       class="filter-tree"
5
       class="filter-tree"
@@ -518,7 +518,8 @@ export default {
518
   methods: {
518
   methods: {
519
       //点击左侧树时
519
       //点击左侧树时
520
     handTreeClick(data) {
520
     handTreeClick(data) {
521
-    
521
+    this.depotId = data.depotCode
522
+    this.getRoleSelect()
522
     },
523
     },
523
       filterNode(value, data) {
524
       filterNode(value, data) {
524
       if (!value) return true
525
       if (!value) return true
@@ -539,19 +540,13 @@ export default {
539
         depotId: this.depotId,
540
         depotId: this.depotId,
540
         roleIds: this.rolesId,
541
         roleIds: this.rolesId,
541
       }
542
       }
542
-      console.log(params, "params...")
543
       roleList(params)
543
       roleList(params)
544
         .then((res) => {
544
         .then((res) => {
545
           if (res.code == 200) {
545
           if (res.code == 200) {
546
-            console.log(res.data, "下拉选")
547
-            console.log(this.tableData, "????????????????????????")
548
-
549
             this.tableData.forEach((item) => {
546
             this.tableData.forEach((item) => {
550
               if (item.title.indexOf("主管科长") != -1) {
547
               if (item.title.indexOf("主管科长") != -1) {
551
-                // item.approverSelect = res.data[2]
552
                 this.$set(item, "approverSelect", res.data[33]) //
548
                 this.$set(item, "approverSelect", res.data[33]) //
553
               } else if (item.title.indexOf("分管副总经理") != -1) {
549
               } else if (item.title.indexOf("分管副总经理") != -1) {
554
-                // item.approverSelect = res.data[3]
555
                 this.$set(item, "approverSelect", res.data[35])
550
                 this.$set(item, "approverSelect", res.data[35])
556
               } else if (item.title.indexOf("总经理") != -1) {
551
               } else if (item.title.indexOf("总经理") != -1) {
557
                 this.$set(item, "approverSelect", res.data[34])
552
                 this.$set(item, "approverSelect", res.data[34])
@@ -559,9 +554,6 @@ export default {
559
                 this.$set(item, "approverSelect", res.data[54])
554
                 this.$set(item, "approverSelect", res.data[54])
560
               }
555
               }
561
             })
556
             })
562
-
563
-            // this.$forceUpdate();
564
-            //this.tableData = JSON.parse(JSON.stringify(this.tableData));
565
           }
557
           }
566
         })
558
         })
567
         .catch((err) => {
559
         .catch((err) => {
@@ -596,21 +588,12 @@ export default {
596
     btnSave() {
588
     btnSave() {
597
       this.loading=true
589
       this.loading=true
598
       var flag = true
590
       var flag = true
599
-      // this.tableData.forEach((item) => {
600
-      //   if (item.content == null) {
601
-      //       flag = false
602
-      //     this.$message("请先选择人员")
603
-
604
-      //     return
605
-      //   }
606
-      // })
607
       for (let index = 0; index < this.tableData.length; index++) {
591
       for (let index = 0; index < this.tableData.length; index++) {
608
         const ele = this.tableData[index]
592
         const ele = this.tableData[index]
609
         if (ele.content == null) {
593
         if (ele.content == null) {
610
           flag = false
594
           flag = false
611
           this.$message("请先选择人员")
595
           this.$message("请先选择人员")
612
           this.loading = false
596
           this.loading = false
613
-
614
           return;
597
           return;
615
         }
598
         }
616
       }
599
       }
@@ -626,8 +609,6 @@ export default {
626
         type: this.type,
609
         type: this.type,
627
         depot_id: this.depotId,
610
         depot_id: this.depotId,
628
       }
611
       }
629
-      console.log(data.data, "......")
630
-        console.log(data.type, "data.type.....")
631
       approverSubmit(data)
612
       approverSubmit(data)
632
         .then((res) => {
613
         .then((res) => {
633
           if (res.code == 200) {
614
           if (res.code == 200) {
@@ -678,37 +659,29 @@ export default {
678
   created() {
659
   created() {
679
     this.gettotaltree()
660
     this.gettotaltree()
680
   },
661
   },
681
-
682
   mounted() {
662
   mounted() {
683
-    //获取当前缓存的登录用户信息
684
-
685
     this.userInfo = JSON.parse(getUser())
663
     this.userInfo = JSON.parse(getUser())
686
     console.log(this.userInfo, "this.userInfo.....?????")
664
     console.log(this.userInfo, "this.userInfo.....?????")
687
-
688
-    //获取当前用户所在库的库id
689
     this.depotId = this.userInfo.depotId
665
     this.depotId = this.userInfo.depotId
690
-
691
     this.approverList()
666
     this.approverList()
692
   },
667
   },
693
 }
668
 }
694
 </script>
669
 </script>
695
 <style lang="scss" scoped>
670
 <style lang="scss" scoped>
696
-// .container {
697
-//   width: 100%;
698
-
699
-//   padding: 10px;
700
-// }
701
 .container {
671
 .container {
702
   height: 100%;
672
   height: 100%;
703
   display: flex;
673
   display: flex;
704
   #mainLeft {
674
   #mainLeft {
705
-    width: 300px;
675
+    width: 340px;
706
     height: calc(100vh - 200px);
676
     height: calc(100vh - 200px);
707
     border: 1px solid #e6e6e6;
677
     border: 1px solid #e6e6e6;
678
+    .el-tree-node__label{
679
+      color: seagreen;
680
+    }
708
   }
681
   }
709
   #mainRight {
682
   #mainRight {
710
     margin-left: 20px;
683
     margin-left: 20px;
711
-    width: calc(100% - 320px);
684
+    width: calc(100% - 340px);
712
   }
685
   }
713
 }
686
 }
714
 
687