风险测评小程序前端代码仓库
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.

161 lines
3.4 KiB

  1. <template>
  2. <view class="card">
  3. <view class="flex card-header">
  4. <image class="icon" src="@/static/image/icon.png" mode="widthFix"></image>
  5. <view>{{ data.name }}</view>
  6. </view>
  7. <view class="card-content">
  8. <view class="row">
  9. <view class="row-label">手机号码</view>
  10. <view class="row-content">{{ data.phone || '-' }}</view>
  11. </view>
  12. <view class="row">
  13. <view class="row-label">公司名称</view>
  14. <view class="row-content">{{ data.company }}</view>
  15. </view>
  16. <view class="row">
  17. <view class="row-label">生成时间</view>
  18. <view class="row-content">{{ $dayjs(data.createTime).format('YYYY-MM-DD HH:mm') }}</view>
  19. </view>
  20. </view>
  21. <view class="flex card-footer">
  22. <button class="btn" @click="onRestart">重新测评</button>
  23. <button class="btn btn-primary" @click="jumpToReport">查看报告</button>
  24. </view>
  25. <view class="flex tag">
  26. <view class="flex tag-content">已完成</view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. // const STATUS_AND_DESC_MAPPING = {
  32. // 0: '未完成',
  33. // 1: '已完成',
  34. // }
  35. export default {
  36. props: {
  37. data: {
  38. type: Object,
  39. default() {
  40. return {}
  41. }
  42. }
  43. },
  44. computed: {
  45. // statusDesc() {
  46. // return STATUS_AND_DESC_MAPPING[this.data.isFinished] || '已完成'
  47. // },
  48. },
  49. methods: {
  50. onRestart() {
  51. // uni.navigateTo({
  52. // url: `/pages_order/test/answer?id=${this.data.paperId}`
  53. // })
  54. uni.navigateTo({
  55. url: `/pages_order/test/start`
  56. })
  57. },
  58. jumpToReport() {
  59. uni.navigateTo({
  60. url: `/pages_order/report/index?batchNo=${this.data.batchNo}`
  61. })
  62. },
  63. },
  64. }
  65. </script>
  66. <style scoped lang="scss">
  67. .card {
  68. position: relative;
  69. padding: 42rpx 24rpx 17rpx 24rpx;
  70. color: #000000;
  71. background: #FFFFFF;
  72. border-radius: 15rpx;
  73. overflow: hidden;
  74. &-header {
  75. justify-content: flex-start;
  76. column-gap: 24rpx;
  77. padding: 0 12rpx 10rpx 12rpx;
  78. font-size: 30rpx;
  79. border-bottom: 1rpx solid rgba($color: #999999, $alpha: 0.22);
  80. .icon {
  81. width: 76rpx;
  82. height: auto;
  83. }
  84. }
  85. &-content {
  86. padding-bottom: 37rpx;
  87. }
  88. &-footer {
  89. padding: 0 20rpx;
  90. column-gap: 25rpx;
  91. }
  92. }
  93. .row {
  94. margin-top: 24rpx;
  95. display: flex;
  96. align-items: center;
  97. column-gap: 26rpx;
  98. font-size: 28rpx;
  99. &-label {
  100. color: #999999;
  101. }
  102. &-content {
  103. }
  104. }
  105. .btn {
  106. flex: 1;
  107. padding: 17rpx 0;
  108. box-sizing: border-box;
  109. font-family: PingFang SC;
  110. font-size: 22rpx;
  111. line-height: 1.4;
  112. color: #014FA2;
  113. border: 3rpx solid #014FA2;
  114. border-radius: 35rpx;
  115. &-primary {
  116. color: #FFFFFF;
  117. background: #014FA2;
  118. }
  119. }
  120. .tag {
  121. position: absolute;
  122. top: 0;
  123. right: 17rpx;
  124. transform: translate(0, -54rpx);
  125. width: 162rpx;
  126. height: 162rpx;
  127. font-size: 34rpx;
  128. color: #014FA2;
  129. border: 4rpx solid #014FA2;
  130. border-radius: 50%;
  131. &-content {
  132. transform: rotate(-25deg);
  133. width: 114rpx;
  134. height: 114rpx;
  135. // border: 1rpx dashed #014FA2;
  136. // border-image: repeating-linear-gradient(to right, #014FA2, #014FA2 10px, transparent 10px, transparent 15px) 1;
  137. // border-width: 4rpx;
  138. // border-style: solid;
  139. border: 4rpx dashed #014FA2;
  140. border-radius: 50%;
  141. }
  142. }
  143. </style>