step4.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <div class="h100 steps4">
  3. <div class="btns-view">
  4. <el-button>根据关键内容批量标准化设备标识</el-button>
  5. <el-button>根据关键内容批量对应数据字典</el-button>
  6. </div>
  7. <el-tabs type="border-card" @tab-click="clickTabs" class="tabs-h" tab-position="bottom">
  8. <el-tab-pane>
  9. <span slot="label">
  10. <i class="el-icon-date"></i> 我的行程
  11. </span>
  12. <js-mind-component ref="jsmind1"></js-mind-component>
  13. </el-tab-pane>
  14. <el-tab-pane class="h100" label="消息中心">
  15. <js-mind-component ref="jsmind2"></js-mind-component>
  16. </el-tab-pane>
  17. </el-tabs>
  18. </div>
  19. </template>
  20. <script>
  21. import jsMindComponent from "components/common/jsmind"
  22. export default {
  23. name: "steps4",
  24. data() {
  25. return {}
  26. },
  27. created() {},
  28. mounted() {},
  29. methods: {
  30. clickTabs(val) {
  31. console.log(this.$refs, val)
  32. var mind = {
  33. /* 元数据,定义思维导图的名称、作者、版本等信息 */
  34. meta: {
  35. name: "jsMind-demo-tree",
  36. author: "hizzgdev@163.com",
  37. version: "0.2"
  38. },
  39. /* 数据格式声明 */
  40. format: "node_tree",
  41. /* 数据内容 */
  42. data: {
  43. id: "root",
  44. topic: "jsMind",
  45. children: [{
  46. id: "easy",
  47. topic: "Easy",
  48. direction: "left",
  49. expanded: false,
  50. children: [{
  51. id: "easy1",
  52. topic: "Easy to show"
  53. },
  54. {
  55. id: "easy2",
  56. topic: "Easy to edit"
  57. },
  58. {
  59. id: "easy3",
  60. topic: "Easy to store"
  61. },
  62. {
  63. id: "easy4",
  64. topic: "Easy to embed"
  65. }
  66. ]
  67. },
  68. {
  69. id: "open",
  70. topic: "Open Source",
  71. direction: "right",
  72. expanded: true,
  73. children: [{
  74. id: "open1",
  75. topic: "on GitHub"
  76. },
  77. {
  78. id: "open2",
  79. topic: "BSD License"
  80. }
  81. ]
  82. },
  83. {
  84. id: "powerful",
  85. topic: "Powerful",
  86. direction: "right",
  87. children: [{
  88. id: "powerful1",
  89. topic: "Base on Javascript"
  90. },
  91. {
  92. id: "powerful2",
  93. topic: "Base on HTML5"
  94. },
  95. {
  96. id: "powerful3",
  97. topic: "Depends on you"
  98. }
  99. ]
  100. },
  101. {
  102. id: "other",
  103. topic: "test node",
  104. direction: "left",
  105. children: [{
  106. id: "other1",
  107. topic: "I'm from local variable"
  108. },
  109. {
  110. id: "other2",
  111. topic: "I can do everything"
  112. }
  113. ]
  114. }
  115. ]
  116. }
  117. };
  118. let jsMind1 = this.$refs.jsmind1.initData({}, mind)
  119. }
  120. },
  121. components: {
  122. jsMindComponent
  123. }
  124. }
  125. </script>
  126. <style lang="scss">
  127. .tabs-h {
  128. height: calc(100% - 50px);
  129. .el-tabs__content {
  130. height: calc(100% - 70px);
  131. >div {
  132. height: 100%;
  133. }
  134. }
  135. }
  136. .saga-mind-view {
  137. // height: 450px;
  138. }
  139. </style>