|
|
@@ -31,21 +31,25 @@
|
|
31
|
31
|
}
|
|
32
|
32
|
},
|
|
33
|
33
|
created() {
|
|
34
|
|
- var str = window.localStorage.getItem('storageAllowUserDept')//获取允用科室ids
|
|
35
|
|
- var arr = []
|
|
36
|
|
- if (str.indexOf(',') >= 0) {
|
|
37
|
|
- for (var i = 0; i < str.split(",").length; i++) {
|
|
38
|
|
- if (this.$store.getters.deptmap[parseInt(str.split(",")[i])]) {
|
|
39
|
|
- arr.push({
|
|
40
|
|
- deptname: this.$store.getters.deptmap[parseInt(str.split(",")[i])].text,
|
|
41
|
|
- deptid: str.split(",")[i]
|
|
42
|
|
- })
|
|
43
|
|
- }
|
|
44
|
|
- }
|
|
45
|
|
- this.allowData = arr
|
|
46
|
|
- }
|
|
|
34
|
+ this.getData()
|
|
47
|
35
|
},
|
|
48
|
36
|
methods:{
|
|
|
37
|
+ getData(){
|
|
|
38
|
+ var str = window.localStorage.getItem('storageAllowUserDept')//获取允用科室ids
|
|
|
39
|
+ var arr = []
|
|
|
40
|
+ if (str.indexOf(',') >= 0) {
|
|
|
41
|
+ for (var i = 0; i < str.split(",").length; i++) {
|
|
|
42
|
+ if (this.$store.getters.deptmap[parseInt(str.split(",")[i])]) {
|
|
|
43
|
+ arr.push({
|
|
|
44
|
+ deptname: this.$store.getters.deptmap[parseInt(str.split(",")[i])].text,
|
|
|
45
|
+ deptid: str.split(",")[i]
|
|
|
46
|
+ })
|
|
|
47
|
+ }
|
|
|
48
|
+ }
|
|
|
49
|
+ this.allowData = arr
|
|
|
50
|
+ }
|
|
|
51
|
+ console.log(this.allowData)
|
|
|
52
|
+ },
|
|
49
|
53
|
handleSelectionChange(val) {
|
|
50
|
54
|
this.onchangedept = val.target.value
|
|
51
|
55
|
},
|