roleShowPower.vue 1.6 KB

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