bottomOperate.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <view class="bottom_box">
  3. <view class="nav_box rx-cc" @click="open">
  4. <image class="open_icon" :class="{open_icon_reversal : isOperate}" src="~@/static/pda/open.svg"></image>
  5. </view>
  6. <view class="operate_list" v-show="isOperate">
  7. <view v-for="(item, index) in btnList[state]" :key="index" class="list rx-bc" @click="operate(item.type)">
  8. <view class="round">{{index + 1}}</view>
  9. <view class="name">{{item.name}}</view>
  10. <image class="arrow_right" src="~@/static/pda/arrow_right.svg"></image>
  11. </view>
  12. </view>
  13. <view class="btn_box">
  14. <view class="btn">暂停</view>
  15. <view class="btn">终止</view>
  16. <view class="btn">转派</view>
  17. <view class="btn">工单交接</view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. props: {
  24. state: String,
  25. },
  26. watch: {
  27. btns: {
  28. immediate: true,
  29. deep: true,
  30. handler(newVal) {
  31. this.btnsList = []
  32. this.btnsList = newVal
  33. }
  34. },
  35. },
  36. data() {
  37. return {
  38. isOperate: false,
  39. btnsList: [],
  40. btnList: {
  41. '1': [{
  42. name: '领料',
  43. type: 'picking'
  44. },
  45. {
  46. name: '投料',
  47. type: 'feeding'
  48. },
  49. {
  50. name: '报工',
  51. type: 'jobBooking'
  52. },
  53. { name: '更换周转车', type: 'turnover'}
  54. ]
  55. }
  56. }
  57. },
  58. methods: {
  59. open() {
  60. this.isOperate = !this.isOperate
  61. },
  62. operate(type) {
  63. this.$emit('operate', type)
  64. },
  65. }
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. .bottom_box {
  70. background: #fff;
  71. }
  72. .nav_box {
  73. width: 750rpx;
  74. height: 40rpx;
  75. background: $theme-color;
  76. .open_icon {
  77. width: 48rpx;
  78. height: 48rpx;
  79. }
  80. .open_icon_reversal {
  81. transform: scaleY(-1);
  82. /* 垂直翻转 */
  83. }
  84. }
  85. .operate_list {
  86. margin: 0 32rpx;
  87. .list {
  88. border-radius: 8rpx;
  89. border: 1rpx solid $theme-color;
  90. background: #F0F8F2;
  91. height: 64rpx;
  92. padding: 0rpx 16rpx;
  93. margin-top: 16rpx;
  94. }
  95. .round {
  96. width: 32rpx;
  97. height: 32rpx;
  98. line-height: 32rpx;
  99. text-align: center;
  100. border-radius: 50%;
  101. background: $theme-color;
  102. font-size: 24rpx;
  103. font-style: normal;
  104. font-weight: 400;
  105. color: #fff;
  106. }
  107. .name {
  108. font-family: PingFang HK;
  109. font-size: 24rpx;
  110. font-style: normal;
  111. font-weight: 600;
  112. color: $theme-color;
  113. }
  114. .arrow_right {
  115. width: 32rpx;
  116. height: 32rpx;
  117. }
  118. }
  119. .btn_box {
  120. display: flex;
  121. padding: 16rpx 32rpx;
  122. align-items: flex-start;
  123. gap: 16rpx;
  124. align-self: stretch;
  125. .btn {
  126. width: 160rpx;
  127. height: 64rpx;
  128. line-height: 64rpx;
  129. background: $theme-color;
  130. text-align: center;
  131. border-radius: 8rpx;
  132. color: #fff;
  133. font-family: PingFang HK;
  134. font-size: 24rpx;
  135. font-style: normal;
  136. font-weight: 600;
  137. }
  138. }
  139. </style>