fleeingGoods.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <view class="production">
  3. <view class="top">
  4. <view class="time">
  5. <picker mode="date" fields="month" :value="date" @change="bindDateChange">
  6. <view class="uni-input">月份</view>
  7. </picker>
  8. </view>
  9. </view>
  10. <view class="nav">
  11. <view class="btn" :class="{activate : activate}" @click="activate = !activate">
  12. 稽查人员上报
  13. </view>
  14. <view class="btn" :class="{activate : !activate}" @click="activate = !activate">
  15. 跨区预警提示
  16. </view>
  17. </view>
  18. <view class="bom">
  19. <staff v-show="activate" :date="date"></staff>
  20. <early v-show="!activate" :date="date"></early>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import staff from './staff.vue'
  26. import early from './early.vue'
  27. export default {
  28. data() {
  29. return {
  30. date: this.getCurrentMonth(),
  31. activate: true
  32. };
  33. },
  34. components: {
  35. staff,
  36. early
  37. },
  38. methods:{
  39. bindDateChange: function(e) {
  40. this.date = e.target.value
  41. },
  42. getData(){
  43. },
  44. getCurrentMonth() {
  45. const date = new Date()
  46. let year = date.getFullYear()
  47. let month = date.getMonth() + 1
  48. month = month > 9 ? month : '0' + month
  49. return `${year}-${month}`
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="scss">
  55. .production {
  56. height: 100%;
  57. .top {
  58. height: 70rpx;
  59. line-height: 70rpx;
  60. background-color: #e40315;
  61. position: relative;
  62. .time {
  63. position: absolute;
  64. top: 0;
  65. right: 0;
  66. text-align: center;
  67. width: 100rpx;
  68. height: 100%;
  69. color: #fff;
  70. }
  71. }
  72. .nav {
  73. height: 80rpx;
  74. display: flex;
  75. background-color: #f6f6f6;
  76. color: #000000;
  77. view {
  78. flex: 1;
  79. height: 100%;
  80. line-height: 80rpx;
  81. text-align: center;
  82. &.activate {
  83. background-color: #85d691;
  84. color: #f6f6f6;
  85. }
  86. }
  87. }
  88. .bom {
  89. height: calc(100% - 160rpx);
  90. }
  91. }
  92. </style>