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

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