rolePower.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <view>
  3. <view class="user" v-for="item in rolePowers" :key="item.code">
  4. <view class="all">
  5. <view class="img">
  6. <image class="image" src="../../static/权限管理/管理员@2x.png"></image>
  7. </view>
  8. <view class="text">
  9. <text class="title">{{item.roleFlag}}</text>
  10. <view class="content">
  11. <text>角色权限:{{item.powerFlag}}</text>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. rolePowers: [],
  23. }
  24. },
  25. onLoad() {
  26. uni.request({
  27. url: 'http://127.0.0.1:9999/rolePower/list',
  28. method: 'GET',
  29. data: {},
  30. success: res => {
  31. this.rolePowers = res.data.data.rolePowers;
  32. console.log(res.data.data.rolePowers);
  33. },
  34. })
  35. },
  36. methods: {
  37. }
  38. }
  39. </script>
  40. <style>
  41. .text {
  42. margin-top: 24rpx;
  43. }
  44. .all {
  45. display: flex;
  46. flex-direction: row;
  47. }
  48. .image {
  49. margin-left: 24rpx;
  50. margin-top: 30rpx;
  51. width: 100rpx;
  52. height: 100rpx;
  53. }
  54. .anniu {
  55. width: 116rpx;
  56. height: 116rpx;
  57. float: right;
  58. margin-top: 10rpx;
  59. margin-right: 4rpx;
  60. }
  61. .user {
  62. width: 702rpx;
  63. height: 207rpx;
  64. background-color: white;
  65. margin-top: 30rpx;
  66. margin-left: 24rpx;
  67. border-radius: 10rpx;
  68. padding-top: 30rpx;
  69. }
  70. .content {
  71. margin-top: 20rpx;
  72. margin-left: 30rpx;
  73. font-size: 28rpx;
  74. color: #444546;
  75. }
  76. .title {
  77. font-size: 36rpx;
  78. margin-left: 30rpx;
  79. color: #282828;
  80. font-weight: 600;
  81. }
  82. </style>