main.vue 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view class="u-swipe-content">
  3. <view class="header py3 p-relative">
  4. <view class="text-center py2 u-font-34 text-color-white">待保养总数</view>
  5. <view class="text-center f-size-50 text-color-white">{{ detail.waitNum }}</view>
  6. <u-row class="p3 p-absolute row" style="bottom:0;" gutter="16" justify="space-between">
  7. <u-col span="4">
  8. <view class="text-center py2 f-size-32 text-color-white">{{ detail.sbNum }}</view>
  9. <view class="text-center f-size-24 text-color-white">保养设备数</view>
  10. </u-col>
  11. <u-col span="4" >
  12. <view class="text-center py2 f-size-32 text-color-white">{{ detail.monthNum }}</view>
  13. <view class="text-center f-size-24 text-color-white">本月保养任务</view>
  14. </u-col>
  15. <u-col span="4">
  16. <view class="text-center py2 f-size-32 text-color-white">{{ detail.compaleteNum }}</view>
  17. <view class="text-center f-size-24 text-color-white">本月保养记录</view>
  18. </u-col>
  19. </u-row>
  20. </view>
  21. <view >
  22. <u-cell-group class="my2" v-for="item in detail.sbInfoVOS" :key="item.id">
  23. <u-cell-item :title="item.name" @click="handleView(item.id)">
  24. <u-badge :count="item.checkNum" :absolute="false" slot="right-icon"></u-badge>
  25. </u-cell-item>
  26. <view class="divider"></view>
  27. </u-cell-group>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import { stringify } from 'qs';
  33. export default {
  34. data() {
  35. return {
  36. detail: {},
  37. params: {}
  38. }
  39. },
  40. onLoad(options) {
  41. this.params = options
  42. },
  43. onShow() {
  44. this.getData(this.params)
  45. },
  46. methods: {
  47. handleView(sbId) {
  48. const params = {
  49. filter: 0,
  50. sbId: sbId,
  51. timeFlag: this.params.timeFlag || null
  52. }
  53. uni.navigateTo({
  54. url: '/pages/maintain/maintain?' + stringify(params)
  55. });
  56. },
  57. getData(options) {
  58. console.log(options)
  59. this.$Http.getCheckJobDetail(options).then(res => {
  60. console.log(res)
  61. this.detail = res.data
  62. })
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .header{
  69. height:380rpx;
  70. width: 100vw;
  71. background: #0082FF;
  72. }
  73. .u-swipe-content{
  74. min-height: calc(100vh - 88rpx);
  75. }
  76. </style>