home.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <view id="hazardousWasteRecyclingHome">
  3. <view class="max-big-button-box" v-if="buttonTypeA" @click="goPage(1)">
  4. <img class="left-box" :src="imagesUrl('hazardousWasteRecycling/wfhs_hsbb.png')">
  5. <view class="right-box">
  6. <view>回收报备</view>
  7. <view>可在回收日前填写报备单</view>
  8. </view>
  9. </view>
  10. <view class="max-big-button-box" v-if="buttonTypeB" @click="goPage(2)">
  11. <img class="left-box" :src="imagesUrl('hazardousWasteRecycling/wfhs_czdj.png')">
  12. <view class="right-box">
  13. <view>登记称重</view>
  14. <view>请在回收日等待回收,完成称重登记</view>
  15. </view>
  16. </view>
  17. <view class="max-big-button-box" @click="goPage(3)">
  18. <img class="left-box" :src="imagesUrl('hazardousWasteRecycling/wfhs_lsjl.png')">
  19. <view class="right-box">
  20. <view>历史记录</view>
  21. <view>查看我的危废回收记录</view>
  22. </view>
  23. </view>
  24. <view class="max-big-button-box" @click="goPage(4)">
  25. <img class="left-box" :src="imagesUrl('hazardousWasteRecycling/wfhs_qxsq.png')">
  26. <view class="right-box">
  27. <view>权限申请</view>
  28. <view>查看我的申请,提交新申请</view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import {
  35. hwmsAppRegisterApprovalMenuShow,
  36. } from '@/pages_hazardousWasteRecycling/api/index.js'
  37. export default {
  38. data() {
  39. return {
  40. buttonTypeA:false,
  41. buttonTypeB:false,
  42. }
  43. },
  44. onLoad(option) {
  45. },
  46. onShow() {
  47. this.hwmsAppRegisterApprovalMenuShow();
  48. },
  49. mounted() {
  50. },
  51. methods: {
  52. async hwmsAppRegisterApprovalMenuShow(){
  53. const {
  54. data
  55. } = await hwmsAppRegisterApprovalMenuShow()
  56. if (data.code == 200) {
  57. if(data.data == 1){
  58. this.$set(this,'buttonTypeA',true);
  59. this.$set(this,'buttonTypeB',true);
  60. }else if(data.data == 2){
  61. this.$set(this,'buttonTypeA',true);
  62. this.$set(this,'buttonTypeB',false);
  63. }else if(data.data == 3){
  64. this.$set(this,'buttonTypeA',false);
  65. this.$set(this,'buttonTypeB',true);
  66. }else if(data.data == 4){
  67. this.$set(this,'buttonTypeA',false);
  68. this.$set(this,'buttonTypeB',false);
  69. }
  70. }
  71. },
  72. goPage(type){
  73. if(type == 1){
  74. uni.navigateTo({
  75. url: "/pages_hazardousWasteRecycling/views/recyclingReportRecord/index",
  76. });
  77. }else if(type == 2){
  78. uni.navigateTo({
  79. url: "/pages_hazardousWasteRecycling/views/weighingRegistration/index",
  80. });
  81. }else if(type == 3){
  82. uni.navigateTo({
  83. url: "/pages_hazardousWasteRecycling/views/historicalRecords/index",
  84. });
  85. }else if(type == 4){
  86. // uni.navigateTo({
  87. // url: "/pages_hazardousWasteRecycling/views/permissionApply/index",
  88. // });
  89. uni.navigateTo({
  90. url: "/pages_hazardousWasteRecycling/views/permissionApply/listPage",
  91. });
  92. }
  93. },
  94. },
  95. }
  96. </script>
  97. <style lang="stylus" scoped>
  98. #hazardousWasteRecyclingHome {
  99. height: 100%;
  100. display flex;
  101. flex-direction column;
  102. .max-big-button-box{
  103. background-color: #fff;
  104. border-radius:20rpx;
  105. margin:40rpx 40rpx 0;
  106. display: flex;
  107. .left-box{
  108. margin:40rpx 40rpx 40rpx 60rpx;
  109. width:160rpx;
  110. height:160rpx;
  111. border-radius:20rpx;
  112. }
  113. .right-box{
  114. view:nth-child(1){
  115. font-size:28rpx;
  116. color:#333;
  117. margin-top:70rpx;
  118. }
  119. view:nth-child(2){
  120. font-size:22rpx;
  121. color:#999;
  122. margin-top:20rpx;
  123. }
  124. }
  125. }
  126. }
  127. </style>