index.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <div class="all">
  3. <div class="left">
  4. <u-equipment-tree @select="selectEquipment"></u-equipment-tree>
  5. </div>
  6. <div class="right">
  7. <interlock-summary-list ref="summaryList" :selectData="selectData"></interlock-summary-list>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. import InterlockSummaryList from './InterlockSummaryList.vue';
  13. export default({
  14. components: {
  15. InterlockSummaryList
  16. },
  17. data () {
  18. return {
  19. selectData: {}
  20. }
  21. },
  22. methods: {
  23. selectEquipment(selectedKeys,e){
  24. // console.log(99,selectedKeys,e)
  25. if (selectedKeys.length == 0) {
  26. this.$nextTick(()=>{
  27. this.$refs.summaryList.searchReset();
  28. })
  29. } else {
  30. let interlockType = e.selectedNodes[0].data.props.interlockType
  31. let pid = e.selectedNodes[0].data.props.pid
  32. // console.log(88,interlockType)
  33. this.selectData.interlockType = interlockType
  34. this.selectData.pid = pid
  35. this.selectData.id = e.selectedNodes[0].data.props.id
  36. this.$nextTick(()=>{
  37. this.$refs.summaryList.getDataList();
  38. })
  39. }
  40. }
  41. },
  42. })
  43. </script>
  44. <style scoped>
  45. .all{
  46. height: calc(100vh - 65px);
  47. width: 100%;
  48. display: flex;
  49. }
  50. .left{
  51. height: 100%;
  52. width: 20%;
  53. /* border: 2px solid red; */
  54. margin-right: 10px;
  55. margin-left: 5px;
  56. }
  57. .right{
  58. height: 100%;
  59. width: 80%;
  60. /* border: 2px solid red; */
  61. }
  62. </style>