rotationCard.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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="5"
  29. v-model="item.ti"
  30. placeholder="请输入时长"
  31. :border="false"
  32. input-align="right"
  33. /> </view
  34. ></view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. props: {
  40. item: {
  41. type: Object,
  42. default: () => {},
  43. },
  44. tktype: {
  45. type: Number,
  46. default: 1,
  47. },
  48. },
  49. data() {
  50. return {
  51. value: '',
  52. action: true,
  53. };
  54. },
  55. methods: {
  56. actionChecked() {
  57. this.item.isChecked = !this.item.isChecked;
  58. },
  59. },
  60. };
  61. </script>
  62. <style scoped lang="scss">
  63. .rotation-card {
  64. border-radius: 16rpx;
  65. background-color: #fff;
  66. margin-bottom: 22rpx;
  67. &__header {
  68. height: 64rpx;
  69. line-height: 64rpx;
  70. border-bottom: 2rpx solid #e4e7ed;
  71. color: #333333;
  72. font-family: 'Source Han Sans CN VF';
  73. font-size: 28rpx;
  74. font-weight: 500;
  75. padding-left: 32rpx;
  76. display: flex;
  77. justify-content: space-between;
  78. align-items: center;
  79. padding: 0 32rpx;
  80. }
  81. &__content {
  82. display: flex;
  83. justify-content: space-between;
  84. padding: 20rpx 30rpx;
  85. height: 40rpx;
  86. }
  87. &__content-left {
  88. width: 250rpx;
  89. font-size: 28rpx;
  90. }
  91. &__content-right {
  92. }
  93. &__footer {
  94. display: flex;
  95. justify-content: space-between;
  96. align-items: center;
  97. padding: 20rpx 30rpx;
  98. height: 40rpx;
  99. }
  100. &__footer-left {
  101. width: 250rpx;
  102. font-size: 28rpx;
  103. }
  104. &__footer-right {
  105. }
  106. }
  107. </style>