rolePower.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view>
  3. <view class="systemSet" @tap="showPower" v-for="item in roles" :key="item.code" :data-flag="item.flag">
  4. <image class="image1" src="../../static/权限管理/管理员@2x.png"></image>
  5. <text style="margin-top: 40rpx;margin-left: 30rpx; width: 500rpx;">{{item.name}}</text>
  6. <image class="image2" src="../../static/运营商管理/ico2@3x.png"></image>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. data() {
  13. return {
  14. roles: [],
  15. }
  16. },
  17. onLoad() {
  18. uni.request({
  19. url: 'http://127.0.0.1:9999/role/list',
  20. method: 'GET',
  21. data: {},
  22. success: res => {
  23. this.roles = res.data.data.roles;
  24. console.log(res.data.data.roles);
  25. },
  26. })
  27. },
  28. methods: {
  29. showPower(e) {
  30. var flag = e.currentTarget.dataset.flag;
  31. uni.navigateTo({
  32. url: '/pages/roleShowPower/roleShowPower?flag=' + flag,
  33. })
  34. }
  35. }
  36. }
  37. </script>
  38. <style>
  39. .systemSet {
  40. display: flex;
  41. flex-direction: row;
  42. height: 125rpx;
  43. background-color: white;
  44. margin-top: 30rpx;
  45. width: 704rpx;
  46. margin-left: 23rpx;
  47. border-radius: 10rpx;
  48. }
  49. .rolePower {
  50. display: flex;
  51. flex-direction: row;
  52. height: 125rpx;
  53. background-color: white;
  54. margin-top: 30rpx;
  55. width: 704rpx;
  56. margin-left: 23rpx;
  57. border-radius: 10rpx;
  58. }
  59. .image1 {
  60. width: 90rpx;
  61. height: 90rpx;
  62. margin-top: 20rpx;
  63. margin-left: 20rpx;
  64. }
  65. .image2 {
  66. width: 10px;
  67. height: 10px;
  68. margin-top: 50rpx;
  69. // margin-left: 400rpx;
  70. }
  71. </style>