bottomOperate.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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. {
  54. name: '更换周转车',
  55. type: 'turnover'
  56. }
  57. ]
  58. }
  59. }
  60. },
  61. methods: {
  62. open() {
  63. this.isOperate = !this.isOperate
  64. },
  65. operate(type) {
  66. this.$emit('operate', type)
  67. },
  68. }
  69. }
  70. </script>
  71. <style lang="scss" scoped>
  72. .bottom_box {
  73. background: #fff;
  74. }
  75. .nav_box {
  76. width: 750rpx;
  77. height: 40rpx;
  78. background: $theme-color;
  79. .open_icon {
  80. width: 48rpx;
  81. height: 48rpx;
  82. }
  83. .open_icon_reversal {
  84. transform: scaleY(-1);
  85. /* 垂直翻转 */
  86. }
  87. }
  88. .operate_list {
  89. margin: 0 32rpx;
  90. .list {
  91. border-radius: 8rpx;
  92. border: 1rpx solid $theme-color;
  93. background: #F0F8F2;
  94. height: 64rpx;
  95. padding: 0rpx 16rpx;
  96. margin-top: 16rpx;
  97. }
  98. .round {
  99. width: 32rpx;
  100. height: 32rpx;
  101. line-height: 32rpx;
  102. text-align: center;
  103. border-radius: 50%;
  104. background: $theme-color;
  105. font-size: 24rpx;
  106. font-style: normal;
  107. font-weight: 400;
  108. color: #fff;
  109. }
  110. .name {
  111. font-family: PingFang HK;
  112. font-size: 24rpx;
  113. font-style: normal;
  114. font-weight: 600;
  115. color: $theme-color;
  116. }
  117. .arrow_right {
  118. width: 32rpx;
  119. height: 32rpx;
  120. }
  121. }
  122. .btn_box {
  123. display: flex;
  124. padding: 16rpx 32rpx;
  125. align-items: flex-start;
  126. gap: 16rpx;
  127. align-self: stretch;
  128. .btn {
  129. width: 160rpx;
  130. height: 64rpx;
  131. line-height: 64rpx;
  132. background: $theme-color;
  133. text-align: center;
  134. border-radius: 8rpx;
  135. color: #fff;
  136. font-family: PingFang HK;
  137. font-size: 24rpx;
  138. font-style: normal;
  139. font-weight: 600;
  140. }
  141. }
  142. </style>