index.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <div>
  3. <div class="iotmenu-content-header">
  4. <a-icon type="file-text" />
  5. <span>联锁总表</span>
  6. </div>
  7. <div class="iotmenu-content">
  8. <u-equipment-tree-drag treeTitle="装置系统" @select="selectEquipment">
  9. <interlock-summary-list ref="summaryList"></interlock-summary-list>
  10. </u-equipment-tree-drag>
  11. </div>
  12. </div>
  13. </template>
  14. <script>
  15. import InterlockSummaryList from './InterlockSummaryList.vue';
  16. import store from '@/store'
  17. export default({
  18. components: {
  19. InterlockSummaryList,
  20. },
  21. data () {
  22. return {
  23. }
  24. },
  25. beforeRouteEnter(to, from, next) {
  26. console.log(to, from, next)
  27. if(from.path !== '/interLock/summary/set' && from.path !== '/interLock/detail' && from.path !== '/'){
  28. store.commit('SET_CLICKSYSTEMNODE', {});
  29. store.commit('SET_TREESELECTKEYS', []);
  30. store.commit('SET_TREEEXPANDEKEYS', []);
  31. }
  32. next()
  33. },
  34. created() {
  35. },
  36. mounted() {
  37. },
  38. methods: {
  39. selectEquipment(){
  40. this.$refs.summaryList.loadData();
  41. },
  42. },
  43. })
  44. </script>