风险测评小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.2 KiB

  1. <template>
  2. <view class="card">
  3. <view class="flex card-header">
  4. <!-- todo: 缺切图 -->
  5. <image class="icon" src="@/static/image/icon.png" mode="widthFix"></image>
  6. <view>{{ `您还有${data.unfinishCount}道题未完成` }}</view>
  7. </view>
  8. <view class="card-content">
  9. <view class="row">
  10. <view class="row-label">答题时间</view>
  11. <view class="row-content">{{ $dayjs(data.createTime).format('YYYY-MM-DD HH:mm') }}</view>
  12. </view>
  13. </view>
  14. <view class="flex card-footer">
  15. <button class="btn" @click="onRestart">重新测评</button>
  16. <button class="btn btn-primary" @click="onContinue">继续答题</button>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. props: {
  23. data: {
  24. type: Object,
  25. default() {
  26. return {}
  27. }
  28. }
  29. },
  30. computed: {
  31. },
  32. methods: {
  33. onRestart() {
  34. // todo: fetch by this.data.paperId
  35. let id
  36. uni.navigateTo({
  37. url: `/pages_order/test/answer?id=${id}`
  38. })
  39. },
  40. onContinue() {
  41. uni.navigateTo({
  42. url: `/pages_order/test/answer?id=${this.data.id}&current=${this.data.current}`,
  43. })
  44. },
  45. },
  46. }
  47. </script>
  48. <style scoped lang="scss">
  49. .card {
  50. position: relative;
  51. padding: 17rpx 0 22rpx 0;
  52. color: #000000;
  53. background: #FFFFFF;
  54. border-radius: 15rpx;
  55. overflow: hidden;
  56. &-header {
  57. justify-content: flex-start;
  58. column-gap: 24rpx;
  59. padding: 0 26rpx;
  60. font-size: 30rpx;
  61. .icon {
  62. width: 48rpx;
  63. height: auto;
  64. }
  65. }
  66. &-content {
  67. padding-left: 94rpx;
  68. }
  69. &-footer {
  70. padding: 22rpx 35rpx 0 35rpx;
  71. column-gap: 25rpx;
  72. }
  73. }
  74. .row {
  75. margin-top: 12rpx;
  76. display: flex;
  77. align-items: center;
  78. justify-content: flex-start;
  79. column-gap: 26rpx;
  80. font-size: 28rpx;
  81. color: #999999;
  82. }
  83. .btn {
  84. flex: 1;
  85. padding: 17rpx 0;
  86. box-sizing: border-box;
  87. font-family: PingFang SC;
  88. font-size: 22rpx;
  89. line-height: 1.4;
  90. color: #014FA2;
  91. border: 3rpx solid #014FA2;
  92. border-radius: 35rpx;
  93. &-primary {
  94. color: #FFFFFF;
  95. background: #014FA2;
  96. }
  97. }
  98. </style>