production.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <view class="production">
  3. <view class="nav">
  4. <view class="btn" :class="{activate : activate}" @click="activate = !activate">
  5. 运行中
  6. </view>
  7. <view class="btn" :class="{activate : !activate}" @click="activate = !activate">
  8. 未运行
  9. </view>
  10. </view>
  11. <view class="bom">
  12. <in-service v-show="activate"></in-service>
  13. <not-run v-show= '!activate'></not-run>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import InService from './InService.vue'
  19. import NotRun from './NotRun.vue'
  20. import {production} from '../../api/production.js'
  21. export default {
  22. data() {
  23. return {
  24. activate: true,
  25. };
  26. },
  27. onReachBottom(){
  28. console.log(1111);
  29. },
  30. components: {
  31. InService,
  32. NotRun
  33. },
  34. created() {
  35. }
  36. }
  37. </script>
  38. <style lang="scss">
  39. .production {
  40. height: 100%;
  41. .nav {
  42. height: 80rpx;
  43. display: flex;
  44. background-color: #f6f6f6;
  45. color: #000000;
  46. view {
  47. flex: 1;
  48. height: 100%;
  49. line-height: 80rpx;
  50. text-align: center;
  51. &.activate {
  52. background-color: #85d691;
  53. color: #f6f6f6;
  54. }
  55. }
  56. }
  57. .bom{
  58. height: calc(100% - 80rpx);
  59. overflow-y: scroll;
  60. }
  61. }
  62. </style>