| | |
| | | <van-collapse-item v-for="(item,i) in dataList" :key="i" :title="item.label" :name="i"> |
| | | <span> |
| | | <ul> |
| | | <li v-for="(element,i) in item.list" class="group_name" @click="toRouter(element)">{{ element.BattGroupName }}</li> |
| | | <li v-for="(element,i) in item.list" class="group_name" @click="toRouter(element)" :key="i"> |
| | | {{ element.BattGroupName }}</li> |
| | | </ul> |
| | | </span> |
| | | </van-collapse-item> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { searchStation,searchBattInfo } from "@/assets/js/api"; |
| | | import { |
| | | searchStation, |
| | | searchBattInfo |
| | | } from "@/assets/js/api"; |
| | | export default { |
| | | data(){ |
| | | return { |
| | |
| | | // 遍历数据构造树状 |
| | | data.forEach((item,i)=>{ |
| | | let tmp = {}; |
| | | tmp.label = item.StationName1+"-"+item.StationName2+"-"+item.StationName5+"-"+item.StationName3; |
| | | tmp.label = item.StationName1 + "-" + item.StationName2 + "-" + item.StationName5 + "-" + |
| | | item.StationName3; |
| | | tmp.key = item.FBSDeviceId+Math.random(); |
| | | tmp.id = item.FBSDeviceId; |
| | | tmp.data = item; |