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