eleControl.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <view class="eleControlWrapper">
  3. <view class="cu-list menu-avatar">
  4. <view class="cu-item" @tap="goPowerCut()">
  5. <view class="cu-avatar " style="background-image:url(../../static/powerCut.png)"></view>
  6. <view class="content">
  7. <view class="">计划停电</view>
  8. </view>
  9. <view class="nav-right">
  10. <view class="text-grey">
  11. <text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="cu-item" @tap="goControlReport()">
  16. <view class="cu-avatar " style="background-image:url(../../static/controlReport.png)"></view>
  17. <view class="content">
  18. <view class="">监察上报</view>
  19. </view>
  20. <view class="nav-right">
  21. <view class="text-grey">
  22. <text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. permissionLabel:0
  34. }
  35. },
  36. onLoad() {
  37. this.getAuthorization()
  38. },
  39. methods: {
  40. async getAuthorization(params) {
  41. const res = await this.$myRequest({
  42. url: 'Com/getAuthorization',
  43. showLoading: true,
  44. data: params
  45. })
  46. console.log(res.data.permissionLabel)
  47. this.permissionLabel = res.data.permissionLabel
  48. },
  49. goControlReport() {
  50. uni.navigateTo({
  51. url: '/pages/eleControl/controlReport/controlReport',
  52. });
  53. },
  54. goPowerCut() {
  55. uni.navigateTo({
  56. url: '/pages/eleControl/powerCut/powerCut',
  57. });
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss">
  63. .eleControlWrapper {
  64. .cu-avatar {
  65. // width:40rpx;height:40rpx;
  66. background-color:#fff;
  67. }
  68. .cu-list.menu-avatar>.cu-item {
  69. height:120rpx;
  70. .content{
  71. left:80rpx;
  72. }
  73. .nav-right{
  74. margin-right:10rpx;
  75. }
  76. }
  77. }
  78. </style>