rotationCard.vue 2.4 KB

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