OrderTask.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="marginTop">
  3. <uni-swipe-action>
  4. <uni-swipe-action-item v-for="(item,index) in list" :key="item.id" :right-options="options"
  5. @click="goDetail(item.id)" @change="swipeChange($event, index)">
  6. <!-- 进度组件 -->
  7. <view @click="goDetail(item.id)">
  8. <OrderList
  9. lable1="" :value1="item.code"
  10. lable2="" :value2="item.executor.name"
  11. lable3="" :value3="item.maintainDept"
  12. lable4="" :value4="item.maintainType == '1' ? '普通保养' : '润滑保养'"
  13. lable5="" :value5="type == '1'?'待执行' : '已执行'"
  14. lable6="" :value6="item.appointTime" :type="type"></OrderList>
  15. </view>
  16. </uni-swipe-action-item>
  17. </uni-swipe-action>
  18. </view>
  19. </template>
  20. <script>
  21. import CellTip from '@/components/CellTip.vue'
  22. import OrderList from '../components/OrderList.vue'
  23. export default {
  24. components: {
  25. CellTip,
  26. OrderList
  27. },
  28. props:{
  29. type:{
  30. type:[String,Number]
  31. },
  32. list:{
  33. type: Array,
  34. default:[]
  35. }
  36. },
  37. data() {
  38. return {
  39. options: [{
  40. text: '接单',
  41. style: {
  42. "backgroundColor": '#157A2C',
  43. "fontSize": "14px",
  44. "disableScroll": true,
  45. "app-plus": {
  46. "bounce": "none"
  47. }
  48. }
  49. }]
  50. }
  51. },
  52. methods: {
  53. swipeChange(e, index) {
  54. console.log('当前状态:' + e + ',下标:' + index)
  55. },
  56. goDetail(id){
  57. uni.navigateTo({
  58. url:'../detail/detail?id=' +id
  59. })
  60. },
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. .marginTop {
  66. border-top: 20rpx solid $page-bg;
  67. }
  68. </style>