bottomOperate.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. data() {
  27. return {
  28. isOperate: false,
  29. btnList: {
  30. '1': [
  31. {
  32. name: '领料',
  33. type: 'picking'
  34. },
  35. {
  36. name: '投料',
  37. type: 'feeding'
  38. },
  39. {
  40. name: '报工',
  41. type: ''
  42. },
  43. ]
  44. }
  45. }
  46. },
  47. methods: {
  48. open() {
  49. this.isOperate = !this.isOperate
  50. },
  51. operate(type) {
  52. this.$emit('operate', type)
  53. },
  54. }
  55. }
  56. </script>
  57. <style lang="scss" scoped>
  58. .bottom_box {
  59. background: #fff;
  60. }
  61. .nav_box {
  62. width: 750rpx;
  63. height: 40rpx;
  64. background: $theme-color;
  65. .open_icon {
  66. width: 48rpx;
  67. height: 48rpx;
  68. }
  69. .open_icon_reversal{
  70. transform: scaleY(-1); /* 垂直翻转 */
  71. }
  72. }
  73. .operate_list {
  74. margin: 0 32rpx;
  75. .list {
  76. border-radius: 8rpx;
  77. border: 1rpx solid $theme-color;
  78. background: #F0F8F2;
  79. height: 64rpx;
  80. padding: 0rpx 16rpx;
  81. margin-top: 16rpx;
  82. }
  83. .round {
  84. width: 32rpx;
  85. height: 32rpx;
  86. line-height: 32rpx;
  87. text-align: center;
  88. border-radius: 50%;
  89. background: $theme-color;
  90. font-size: 24rpx;
  91. font-style: normal;
  92. font-weight: 400;
  93. color: #fff;
  94. }
  95. .name {
  96. font-family: PingFang HK;
  97. font-size: 24rpx;
  98. font-style: normal;
  99. font-weight: 600;
  100. color: $theme-color;
  101. }
  102. .arrow_right {
  103. width: 32rpx;
  104. height: 32rpx;
  105. }
  106. }
  107. .btn_box {
  108. display: flex;
  109. padding: 16rpx 32rpx;
  110. align-items: flex-start;
  111. gap: 16rpx;
  112. align-self: stretch;
  113. .btn {
  114. width: 160rpx;
  115. height: 64rpx;
  116. line-height: 64rpx;
  117. background: $theme-color;
  118. text-align: center;
  119. border-radius: 8rpx;
  120. color: #fff;
  121. font-family: PingFang HK;
  122. font-size: 24rpx;
  123. font-style: normal;
  124. font-weight: 600;
  125. }
  126. }
  127. </style>