system-clients 3.2.86 → 3.2.87-fix

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "system-clients",
3
- "version": "3.2.86",
3
+ "version": "3.2.87-fix",
4
4
  "description": "系统基础框架",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,61 +1,67 @@
1
1
  <template>
2
2
  <div class='over'>
3
- <tree :model='functions' :flagres="false" :is-click="false" v-ref:tree @toggle="toggled" >
3
+ <tree :model='functions' :flagres="false" :is-click="false" v-ref:tree @toggle="toggled">
4
4
  <span partial class="row" :class="{ 'tree-img': isFolder(row), 'tree-span': !isFolder(row) }">
5
- <div class="col-sm-2" >
5
+ <div class="col-sm-2">
6
6
  <img v-if="isFolder(row)" :src="row.data.icon" alt="">
7
7
  </div>
8
- <div class="col-sm-8" style="padding-left:6%;text-align: left" title="{{row.data.name}}">{{row.data.name}}</div>
8
+ <div class="col-sm-8" style="padding-left:6%;text-align: left"
9
+ title="{{row.data.name}}">{{ row.data.name }}</div>
9
10
  </span>
10
11
  </tree>
11
12
  </div>
12
13
  </template>
13
14
  <script>
14
- import Vue from 'vue'
15
+ import Vue from 'vue'
15
16
 
16
17
  export default {
17
- props: ['functions', 'userid','tabs'],
18
+ props: ['functions', 'userid', 'tabs'],
18
19
  title: '左侧树菜单',
19
- data () {
20
+ data() {
20
21
  return {
21
22
  index: -1,
22
23
  name: null,
23
- tbcg:[]
24
+ tbcg: []
24
25
  }
25
26
  },
26
27
  methods: {
27
- open (row) {
28
+ open(row) {
28
29
  if (row.data.name === '资源管理') {
29
30
  this.$parent.changeMain(row.data.id)
30
- return
31
+ return
31
32
  }
32
- console.log(row.data.navigate)
33
- if (row.data.navigate) {
33
+ console.log(row.data.navigate)
34
+ if (row.data.navigate) {
34
35
 
35
- let isExist = false
36
+ let isExist = false
36
37
  this.tbcg.forEach((tab) => {
37
- if(tab.comp.name == row.data.link) {
38
+ if (tab.comp.props.compName === row.data.link) {
38
39
  isExist = true
39
40
  }
40
41
  })
41
- if (!isExist){
42
- this.$goto('embbed-page', {domainName: row.data.navigate, title: row.data.name, compName: row.data.link, login: Vue.$login, param: Vue.$appdata}, 'main')
43
- }else {
44
- console.log(isExist,'aa')
45
- this.$emit('isnodo',row.data.link)
42
+ if (!isExist) {
43
+ this.$goto('embbed-page', {
44
+ domainName: row.data.navigate,
45
+ title: row.data.name,
46
+ compName: row.data.link,
47
+ login: Vue.$login,
48
+ param: Vue.$appdata
49
+ }, 'main')
50
+ } else {
51
+ this.$emit('isnodo', row.data.link)
46
52
  }
47
53
  } else if (row.data.link) {
48
54
  let isExist = false
49
55
  this.tbcg.forEach((tab) => {
50
- if(tab.comp.name == row.data.link) {
56
+ if (tab.comp.name == row.data.link) {
51
57
  isExist = true
52
58
  }
53
59
  })
54
- if (!isExist){
60
+ if (!isExist) {
55
61
  this.$goto(row.data.link, {f: this.functions}, 'main')
56
- }else {
57
- console.log(isExist,'saaa')
58
- this.$emit('isnodo',row.data.link)
62
+ } else {
63
+ console.log(isExist, 'saaa')
64
+ this.$emit('isnodo', row.data.link)
59
65
  }
60
66
  }
61
67
  },
@@ -70,22 +76,22 @@ export default {
70
76
  // 当前激活页签有,index为-1,说明菜单收缩
71
77
  this.changeSelected(index)
72
78
  },
73
- selfFindIndex (name) {
79
+ selfFindIndex(name) {
74
80
 
75
81
  return this.$refs.tree.toNode.findIndex((item) => {
76
82
  return item.data.link === name
77
83
  })
78
84
  },
79
- changeSelected (index) {
85
+ changeSelected(index) {
80
86
 
81
87
  if (index === -1) {
82
88
  this.$refs.tree.selectStore.select(null)
83
- }else {
89
+ } else {
84
90
  this.$refs.tree.selectStore.select(this.$refs.tree.toNode[index])
85
91
  }
86
92
 
87
93
  },
88
- toggled () {
94
+ toggled() {
89
95
 
90
96
  if (this.name && this.index === -1) {
91
97
  let index = this.selfFindIndex(this.name)
@@ -102,8 +108,8 @@ export default {
102
108
  this.open(data.val)
103
109
  }
104
110
  },
105
- watch:{
106
- 'tabs'(val){
111
+ watch: {
112
+ 'tabs'(val) {
107
113
  this.tbcg = val
108
114
  }
109
115
  }
@@ -135,6 +135,13 @@ export default {
135
135
  userid: this.$login.f.id
136
136
  }, {resolveMsg: null, rejectMsg: '获取片区出错!!!'})
137
137
  let arr = getAllArea.data.filter((res) => {
138
+ if(Array.isArray(val)){
139
+ for (let i = 0; i <val.length ; i++) {
140
+ if(res.parentid == val[i]){
141
+ return true
142
+ }
143
+ }
144
+ }
138
145
  return res.parentid == val
139
146
  })
140
147
  this.sliceArea = []