rotationCard.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view class="rotation-card" @tap="actionChecked">
  3. <view class="rotation-card__header">
  4. {{ item.sfDisplayname || item.sfName }}
  5. <u-icon
  6. name="checkmark-circle-fill"
  7. :color="item.isChecked ? '#14A478' : '#C9CDD4'"
  8. size="30rpx"
  9. ></u-icon>
  10. </view>
  11. <view class="rotation-card__content" v-if="tktype === 2">
  12. <view class="rotation-card__content-left">配方</view>
  13. <view class="rotation-card__content-right">
  14. <u-input
  15. maxlength="36"
  16. v-model="item.pfCode"
  17. placeholder="请输入配方"
  18. :border="false"
  19. input-align="right"
  20. />
  21. </view>
  22. </view>
  23. <view class="rotation-card__footer">
  24. <view class="rotation-card__footer-left">时长(分钟)</view>
  25. <view class="rotation-card__footer-right">
  26. <u-input
  27. type="number"
  28. maxlength="6"
  29. :max="999999"
  30. v-model="item.ti"
  31. placeholder="请输入时长"
  32. :border="false"
  33. input-align="right"
  34. /> </view
  35. ></view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. props: {
  41. item: {
  42. type: Object,
  43. default: () => {},
  44. },
  45. tktype: {
  46. type: Number,
  47. default: 1,
  48. },
  49. },
  50. data() {
  51. return {
  52. value: '',
  53. action: true,
  54. };
  55. },
  56. methods: {
  57. actionChecked() {
  58. this.item.isChecked = !this.item.isChecked;
  59. },
  60. },
  61. };
  62. </script>
  63. <style scoped lang="scss">
  64. .rotation-card {
  65. border-radius: 16rpx;
  66. background-color: #fff;
  67. margin-bottom: 22rpx;
  68. &__header {
  69. height: 64rpx;
  70. line-height: 64rpx;
  71. border-bottom: 2rpx solid #e4e7ed;
  72. color: #333333;
  73. font-family: 'Source Han Sans CN VF';
  74. font-size: 28rpx;
  75. font-weight: 500;
  76. padding-left: 32rpx;
  77. display: flex;
  78. justify-content: space-between;
  79. align-items: center;
  80. padding: 0 32rpx;
  81. }
  82. &__content {
  83. display: flex;
  84. justify-content: space-between;
  85. padding: 20rpx 30rpx;
  86. height: 40rpx;
  87. }
  88. &__content-left {
  89. width: 250rpx;
  90. font-size: 28rpx;
  91. }
  92. &__content-right {
  93. }
  94. &__footer {
  95. display: flex;
  96. justify-content: space-between;
  97. align-items: center;
  98. padding: 20rpx 30rpx;
  99. height: 40rpx;
  100. }
  101. &__footer-left {
  102. width: 250rpx;
  103. font-size: 28rpx;
  104. }
  105. &__footer-right {
  106. }
  107. }
  108. </style>