maintenanceList.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <view class="body">
  3. <view class="content">
  4. <u-toast ref="uToast" />
  5. <u-collapse :item-style="itemStyle" accordion="true" event-type="close" arrow="true" :accordion="accordion">
  6. <u-collapse-item :index="index" :title="item.time" v-for="(item, index) in noticeList"
  7. :key="index">
  8. <view class="collapse-item">
  9. <p style="margin-left: 2vw;font-size: 0.8rem;"> <span>姓名:</span> <span style="margin-left: 2vw;"></span> <span style="color: red;"> {{item.name}}</span> </p>
  10. <p style="margin-left: 2vw;font-size: 0.8rem;"> <span>服务顾问:</span> <span style="margin-left: 2vw;"></span> <span style="color: red;"> {{item.create_user}}</span> </p>
  11. <view style="margin-left: 2vw;font-size: 0.8rem;"> <p>配件用料:</p> <p style=" color: red; ">{{item.parts}}</p> </view>
  12. <view style="margin-left: 2vw;font-size: 0.8rem;"> <p>维修项目:</p> <p style=" color: red; "> {{item.rapairs}} </p></view>
  13. <view style="margin-left: 2vw;font-size: 0.8rem;"> <p>描述:</p> <p style="color: red;"> {{item.description}}</p> </view >
  14. <p style="margin-left: 2vw;font-size: 0.8rem;"> <span>时间:</span> <span style="margin-left: 2vw;"></span> <span style="color: red;"> {{item.time}}</span> </p>
  15. </view>
  16. <!-- </scroll-view> -->
  17. </u-collapse-item>
  18. </u-collapse>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. // import uniSegmentedControl from '@/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue'
  24. export default {
  25. data() {
  26. return {
  27. trailerKeyboardShow: true,
  28. control: false,
  29. scrollTop: 0,
  30. token: '',
  31. noticeList: [],
  32. page:1
  33. }
  34. },
  35. onLoad(option) {
  36. if(option.id){
  37. console.log(option.id)
  38. this.getMaintenanceList(option.id)
  39. }
  40. },
  41. methods: {
  42. getMaintenanceList(id) {
  43. this.$api.getMaintenanceLog(id,res => {
  44. if (res.code == 0) {
  45. this.noticeList = res.data.data
  46. } else {
  47. this.errorToast(res.msg)
  48. }
  49. })
  50. },
  51. errorToast(msg) {
  52. this.$refs.uToast.show({
  53. title: msg,
  54. type: 'error',
  55. duration: 2000
  56. })
  57. }
  58. },
  59. }
  60. </script>
  61. <style scoped lang="scss">
  62. .body {
  63. width: 100vw;
  64. height: 99vh;
  65. box-sizing: border-box;
  66. padding: 0 2vw;
  67. background-color: #fafafa;
  68. }
  69. .paddingOder {
  70. // width: 96vw;
  71. // height: 93vh;
  72. // margin-top: 1vw;
  73. // background-color: #fafafa;
  74. // border-radius: 8px;
  75. .model {
  76. width: 96vw;
  77. height: 26vw;
  78. box-sizing: border-box;
  79. padding: 0 3vw;
  80. background-color: white;
  81. border-radius: 20px;
  82. margin-top: 2vw;
  83. ul {
  84. display: flex;
  85. justify-content: space-between;
  86. li {
  87. .Number {
  88. font-size: 0.8rem;
  89. display: flex;
  90. margin-top: 1vw;
  91. }
  92. .playOder {
  93. display: flex;
  94. font-size: 0.75rem;
  95. margin-top: 1vw;
  96. }
  97. }
  98. li:nth-child(2) {
  99. line-height: 20vw;
  100. color: red;
  101. }
  102. }
  103. }
  104. }
  105. </style>