OrderTask copy.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view class="marginTop">
  3. <view
  4. v-for="(item, index) in list"
  5. class="kd-row"
  6. :key="item.id"
  7. @click="goDetail(item)"
  8. v-show="list.length !== 0"
  9. >
  10. <!-- 进度组件 -->
  11. <view class="kd-col">
  12. <text class="title">{{ item.workOrderCode }}</text>
  13. <text>{{ item.planName }}</text>
  14. </view>
  15. <view class="kd-col">
  16. <text>规则名称:{{ item.ruleName }}</text>
  17. <text>{{ item.equiTypeName }}</text>
  18. </view>
  19. <view class="kd-col">
  20. <text
  21. class="status"
  22. :class="statusList[item.status && item.status.code]"
  23. >{{ item.status && item.status.descp }}</text
  24. >
  25. <text class="text-danger">截止时间 {{ item.planFinishTime }}</text>
  26. </view>
  27. </view>
  28. <view v-show="list.length === 0" class="no_data">
  29. <u-empty mode="data" textSize="22"></u-empty>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import CellTip from '@/components/CellTip.vue'
  35. export default {
  36. components: {
  37. CellTip
  38. },
  39. props: {
  40. list: {
  41. type: Array,
  42. default: () => []
  43. }
  44. },
  45. data () {
  46. return {
  47. statusList: {
  48. 0: 'text-primary',
  49. 1: '',
  50. 2: 'text-primary'
  51. }
  52. }
  53. },
  54. methods: {
  55. goDetail ({ workOrderCode, id }) {
  56. uni.navigateTo({
  57. url: `../detail/detail?workOrderCode=${workOrderCode}&id=${id}`
  58. })
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. .marginTop {
  65. border-top: 20rpx solid $page-bg;
  66. .kd-row {
  67. font-size: 28rpx;
  68. padding: 14rpx 12rpx 6rpx;
  69. border-bottom: 1rpx solid $page-bg;
  70. .kd-col {
  71. display: flex;
  72. justify-content: space-between;
  73. align-items: center;
  74. padding: 2rpx;
  75. color: #aaaaaa;
  76. .status {
  77. background-color: $page-bg;
  78. display: inline-block;
  79. padding: 4rpx 10rpx;
  80. border-radius: 18rpx;
  81. }
  82. }
  83. .title {
  84. font-weight: bold;
  85. color: #333333;
  86. }
  87. }
  88. .center {
  89. text-align: center;
  90. margin-bottom: 10rpx;
  91. color: #999;
  92. }
  93. .no_data {
  94. position: fixed;
  95. top: 50%;
  96. left: 50%;
  97. transform: translate(-50%, -50%);
  98. color: #999;
  99. font-size: 28rpx;
  100. }
  101. }
  102. </style>