|
|
@@ -4,7 +4,6 @@
|
|
|
class="l-flex--col c-tree"
|
|
|
>
|
|
|
<el-tabs
|
|
|
- v-if="__STAGING__"
|
|
|
v-model="active"
|
|
|
class="c-tabs has-bottom-padding"
|
|
|
>
|
|
|
@@ -250,28 +249,26 @@ export default {
|
|
|
}
|
|
|
return getDeviceTree().then(({ data }) => {
|
|
|
this.$groupCache = data
|
|
|
- if (__STAGING__) {
|
|
|
- const map = {}
|
|
|
- const cache = []
|
|
|
- const ids = {}
|
|
|
- data.forEach(({ list }) => {
|
|
|
- list.forEach(device => {
|
|
|
- const resolutionRatio = device.resolutionRatio
|
|
|
- if (!ids[device.id]) {
|
|
|
- if (!map[resolutionRatio]) {
|
|
|
- map[resolutionRatio] = []
|
|
|
- cache.push({
|
|
|
- name: resolutionRatio,
|
|
|
- list: map[resolutionRatio]
|
|
|
- })
|
|
|
- }
|
|
|
- ids[device.id] = 1
|
|
|
- map[resolutionRatio].push(device)
|
|
|
+ const map = {}
|
|
|
+ const cache = []
|
|
|
+ const ids = {}
|
|
|
+ data.forEach(({ list }) => {
|
|
|
+ list.forEach(device => {
|
|
|
+ const resolutionRatio = device.resolutionRatio
|
|
|
+ if (!ids[device.id]) {
|
|
|
+ if (!map[resolutionRatio]) {
|
|
|
+ map[resolutionRatio] = []
|
|
|
+ cache.push({
|
|
|
+ name: resolutionRatio,
|
|
|
+ list: map[resolutionRatio]
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
+ ids[device.id] = 1
|
|
|
+ map[resolutionRatio].push(device)
|
|
|
+ }
|
|
|
})
|
|
|
- this.$ratioCache = cache
|
|
|
- }
|
|
|
+ })
|
|
|
+ this.$ratioCache = cache
|
|
|
return this[key]
|
|
|
})
|
|
|
},
|