myOrder.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <div class="myOrder">
  3. <div class="myOrderItem" v-for="item in orderList">
  4. <div class="myOrderItemTop">
  5. <span class="myOrderItemTopLeft">
  6. <img src="./image/frame.svg" class="frameIcon">
  7. 共享资源·会议室预约
  8. </span>
  9. <span :class="item.status==='等待审核'?'orgColor':item.status==='预定成功'?'greColor':'grayColor'">{{item.status}}</span>
  10. </div>
  11. <div class="orderTheme">{{item.theme}}</div>
  12. <div class="myOrderItemBottom">
  13. <div class="myOrderItemBottomLeft">
  14. <span>订单号:202405061228</span>
  15. <span>预约时间:2021-1-21 13:00</span>
  16. </div>
  17. <button class="cancelBtn" v-if="item.status!=='已取消'" @tap.stop="toCancel">去取消</button>
  18. </div>
  19. <div class="cancleBox" v-if="item.status==='已取消'">
  20. 取消原因:取消原因取消原因取消原因取消原因取消原因取消原因取消原因取消原因取消原因取消原因取消原因取消原因取消原因取消原因
  21. </div>
  22. </div>
  23. <van-dialog
  24. use-slot
  25. title="取消预约"
  26. :show="show"
  27. show-cancel-button
  28. confirm-button-open-type="getUserInfo"
  29. @confirm="confirm"
  30. >
  31. <div class="dialogBox">
  32. <van-field
  33. :value="contant"
  34. autosize
  35. type="textarea"
  36. placeholder="请输入取消原因"
  37. class="myField"
  38. maxlength="800"
  39. show-word-limit
  40. />
  41. </div>
  42. </van-dialog>
  43. </div>
  44. </template>
  45. <script>
  46. export default {
  47. name: "myOrder",
  48. data(){
  49. return{
  50. orderList:[
  51. {theme:'会议主题会议主题会议主题会议主题会议主题会议主题会议主题会议主',status:'等待审核'},
  52. {theme:'会议主题会议主题会议主题会议主题会议主题会议主题会议主题会议主',status:'预定成功'},
  53. {theme:'会议主题会议主题会议主题会议主题会议主题会议主题会议主题会议主',status:'已取消'},
  54. ],
  55. show: false,
  56. contant: ''
  57. }
  58. },
  59. methods:{
  60. toCancel() {
  61. console.log(11111)
  62. this.show = true
  63. },
  64. confirm(){
  65. console.log(22222)
  66. this.show = false
  67. }
  68. }
  69. }
  70. </script>
  71. <style lang="scss">
  72. .myOrder{
  73. padding: 24rpx 32rpx;
  74. .myOrderItem{
  75. width: 686rpx;
  76. padding: 32rpx 0;
  77. border-radius: 16rpx;
  78. background: white;
  79. box-sizing: border-box;
  80. margin-bottom: 24rpx;
  81. .myOrderItemTop{
  82. display: flex;
  83. justify-content: space-between;
  84. padding:0 32rpx 24rpx 32rpx;
  85. border-bottom: 1px solid rgba(232, 237, 245, 1);
  86. .myOrderItemTopLeft{
  87. display: flex;
  88. align-items: center;
  89. color: rgba(102, 102, 102, 1);
  90. font-size: 28rpx;
  91. .frameIcon{
  92. width: 28rpx;
  93. height: 28rpx;
  94. margin-right: 16rpx;
  95. }
  96. }
  97. .orgColor{
  98. font-size: 28rpx;
  99. color: rgba(226, 81, 0, 1);
  100. }
  101. .greColor{
  102. font-size: 28rpx;
  103. color: rgba(34, 181, 101, 1);
  104. }
  105. .grayColor{
  106. font-size: 28rpx;
  107. color: rgba(136, 136, 136, 1);
  108. }
  109. }
  110. .orderTheme{
  111. padding: 16rpx 32rpx;
  112. color: rgba(34, 34, 34, 1);
  113. font-size: 32rpx;
  114. line-height: 50rpx;
  115. display: flex;
  116. flex-wrap: wrap;
  117. font-weight: 600;
  118. }
  119. .myOrderItemBottom{
  120. display: flex;
  121. align-items: center;
  122. padding: 0 32rpx;
  123. justify-content: space-between;
  124. .myOrderItemBottomLeft{
  125. display: flex;
  126. flex-direction: column;
  127. font-size: 28rpx;
  128. color:rgba(136, 136, 136, 1);
  129. line-height: 44rpx;
  130. }
  131. .cancelBtn{
  132. background: linear-gradient( 316deg, #84AAFF 0%, #0365F9 100%);
  133. width: 160rpx;
  134. height: 60rpx;
  135. border-radius: 32rpx;
  136. display: flex;
  137. align-items: center;
  138. justify-content: center;
  139. color: rgba(255, 255, 255, 1);
  140. font-size: 28rpx;
  141. &::after{
  142. border: none;
  143. }
  144. }
  145. }
  146. .cancleBox{
  147. font-size: 28rpx;
  148. color:rgba(242, 25, 18, 1);
  149. width: 622rpx;
  150. background: rgba(245, 247, 250, 1);
  151. padding: 24rpx;
  152. box-sizing: border-box;
  153. margin-left: 32rpx;
  154. display: flex;
  155. flex-wrap: wrap;
  156. line-height: 40rpx;
  157. margin-top: 16rpx;
  158. }
  159. }
  160. .dialogBox{
  161. padding: 32rpx;
  162. }
  163. .van-cell {
  164. background: #F5F7FA !important;
  165. border-radius: 8rpx;
  166. font-size: 28rpx;
  167. }
  168. }
  169. </style>