sectionRyTreeList.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view>
  3. <uni-popup ref="popup" type="dialog">
  4. <view
  5. style="background-color: #fff;height: 70vh;width: 70vw;border-radius: 15rpx;padding: 50rpx;display: flex;flex-direction: column;">
  6. <view style="flex: 1;overflow: hidden;display: flex;">
  7. <scroll-view scroll-y="true" style="flex: 1;border-radius: 15rpx;border: 1rpx solid #babbbd;padding: 20rpx;">
  8. <my-mosowe-tree-list v-model="data" :treeData="treeList" text="text" nodeKey="_id"
  9. defaultShowChildren accordion multiple>
  10. </my-mosowe-tree-list>
  11. </scroll-view>
  12. <view style="margin: 20rpx;display: flex;flex-direction: column;align-items: center;justify-content: center;">
  13. <button type="primary" style="padding: 0;height:100rpx;line-height: 100rpx;color: #babbbd;">
  14. <uni-icons style="color: #fff;" type="left" size="30"></uni-icons>
  15. </button>
  16. <button type="primary"
  17. style="padding: 0;height:100rpx;line-height: 100rpx;color: #babbbd;margin-top: 30rpx;">
  18. <uni-icons style="color: #fff;" type="right" size="30"></uni-icons>
  19. </button>
  20. </view>
  21. <view style="flex: 1;border-radius: 15rpx;border: 1rpx solid #babbbd;padding: 20rpx;">
  22. </view>
  23. </view>
  24. <view style="height: 150rpx;border: 1rpx solid #babbbd;border-radius: 15rpx;margin-top: 20rpx;">
  25. </view>
  26. <view style="margin-top: 20rpx;">
  27. <u-button type="primary"
  28. style="height: 70rpx;line-height:70rpx;width: 300rpx; display: inline-block;">提交</u-button>
  29. <u-button
  30. style="height: 70rpx;line-height:70rpx;width: 300rpx; display: inline-block;margin-left: 20rpx;">关闭</u-button>
  31. </view>
  32. </view>
  33. </uni-popup>
  34. </view>
  35. </template>
  36. <script>
  37. import myMosoweTreeList from '../../components/myMosoweTreeList/myMosoweTreeList.vue'
  38. export default {
  39. components: {
  40. myMosoweTreeList
  41. },
  42. data() {
  43. return {
  44. data: [],
  45. treeList: [{
  46. _id: '64589cd409e29891989bc316',
  47. enable: false,
  48. text: '用户管理',
  49. childrens: [{
  50. _id: '64589cd409e29891989bc317',
  51. enable: true,
  52. text: '查看',
  53. },
  54. {
  55. _id: '64589cd409e29891989bc318',
  56. enable: true,
  57. text: '新增',
  58. },
  59. {
  60. _id: '64589cd409e29891989bc319',
  61. enable: true,
  62. text: '编辑',
  63. },
  64. {
  65. _id: '64589cd409e29891989bc31a',
  66. enable: true,
  67. text: '删除',
  68. },
  69. {
  70. _id: '64589cd409e29891989bc31b',
  71. enable: true,
  72. text: '重置密码',
  73. },
  74. {
  75. _id: '64589cd409e29891989bc31c',
  76. enable: true,
  77. text: '用户状态设置',
  78. }
  79. ],
  80. },
  81. {
  82. _id: '64589cd409e29891989bc31d',
  83. enable: true,
  84. text: '菜单管理',
  85. childrens: [{
  86. _id: '64589cd409e29891989bc31e',
  87. enable: true,
  88. text: '查看',
  89. },
  90. {
  91. _id: '64589cd409e29891989bc31f',
  92. enable: true,
  93. text: '新增',
  94. },
  95. {
  96. _id: '64589cd409e29891989bc320',
  97. enable: true,
  98. text: '编辑',
  99. },
  100. {
  101. _id: '64589cd409e29891989bc321',
  102. enable: true,
  103. text: '删除',
  104. }
  105. ],
  106. },
  107. {
  108. _id: '64589cd409e29891989bc322',
  109. enable: true,
  110. text: '角色管理',
  111. childrens: [{
  112. _id: '64589cd409e29891989bc323',
  113. enable: true,
  114. text: '查看',
  115. },
  116. {
  117. _id: '64589cd409e29891989bc324',
  118. enable: true,
  119. text: '新增',
  120. },
  121. {
  122. _id: '64589cd409e29891989bc325',
  123. enable: true,
  124. text: '编辑',
  125. },
  126. {
  127. _id: '64589cd409e29891989bc326',
  128. enable: true,
  129. text: '删除',
  130. }
  131. ]
  132. }
  133. ],
  134. }
  135. },
  136. methods: {
  137. open() {
  138. this.$refs.popup.open()
  139. }
  140. }
  141. }
  142. </script>
  143. <style>
  144. </style>