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

220 lines
5.3 KiB

  1. <template>
  2. <view class="page__view">
  3. <navbar title="报告" leftClick @leftClick="$utils.navigateBack" />
  4. <template v-if="detail">
  5. <view class="title">{{ detail.title }}</view>
  6. <view class="section">
  7. <view class="flex section-header">
  8. <view class="line"></view>
  9. <view>总概述</view>
  10. </view>
  11. <view class="section-content">
  12. <view class="summary">
  13. <view class="text">
  14. 经过本次问答信息收集的综合分析检测出风险点共<text class="highlight">{{ detail.levelAllNum - detail.level3Num }}</text>其中高风险{{ detail.level2Num }}中风险{{ detail.level1Num }}低风险{{ detail.level0Num }}
  15. </view>
  16. <view class="flex charts">
  17. <progressCircle label="高风险" :value="detail.level2Num" color="#FF0000"></progressCircle>
  18. <progressCircle label="中风险" :value="detail.level1Num" color="#FFA800"></progressCircle>
  19. <progressCircle label="低风险" :value="detail.level0Num" color="#014FA2"></progressCircle>
  20. <progressCircle label="合规" :value="detail.level3Num" color="#5AC725"></progressCircle>
  21. </view>
  22. </view>
  23. <view class="table">
  24. <!-- 全部合规 -->
  25. <template v-if="detail.level3Num === detail.levelAllNum">
  26. <image class="img-succ" :src="configList.compliance_img" mode="widthFix"></image>
  27. </template>
  28. <template v-else>
  29. <reportTableView :list="tableList"></reportTableView>
  30. </template>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="flex flex-column contact">
  35. <view>扫下方二维码联系我们给你1V1解决方案</view>
  36. <image class="qr" :src="configList.company_qrcode" :show-menu-by-longpress="true" mode="widthFix"></image>
  37. </view>
  38. <view>
  39. <image class="img" :src="configList.company_info" mode="widthFix"></image>
  40. <view class="logo">
  41. <image class="img" :src="configList.company_logo" mode="widthFix"></image>
  42. </view>
  43. </view>
  44. </template>
  45. </view>
  46. </template>
  47. <script>
  48. import progressCircle from './progressCircle.vue';
  49. import reportTableView from './reportTableView.vue';
  50. export default {
  51. components: {
  52. progressCircle,
  53. reportTableView,
  54. },
  55. data() {
  56. return {
  57. detail: null,
  58. tableList: [],
  59. }
  60. },
  61. onLoad(arg) {
  62. const { batchNo } = arg
  63. this.getData(batchNo)
  64. },
  65. methods: {
  66. async getData(batchNo) {
  67. try {
  68. const result = await this.$fetch('queryReportById', { batchNo })
  69. const {
  70. title,
  71. level0Num, // 低风险
  72. level1Num, // 中风险
  73. level2Num, // 高风险
  74. level3Num, // 合规
  75. levelAllNum,
  76. pageList,
  77. } = result
  78. this.tableList = pageList.reduce((arr, item) => {
  79. const { id, risk, reason, level, consequence } = item
  80. if (level == '3') {
  81. return arr
  82. }
  83. const obj = {
  84. id,
  85. reason,
  86. level,
  87. result: consequence,
  88. }
  89. const index = arr.findIndex(row => row.title === risk)
  90. if (index === -1) {
  91. arr.push({
  92. id: arr.length,
  93. title: risk,
  94. children: [obj]
  95. })
  96. } else {
  97. arr[index].children.push(obj)
  98. }
  99. return arr
  100. }, [])
  101. this.detail = {
  102. title,
  103. level0Num, // 低风险
  104. level1Num, // 中风险
  105. level2Num, // 高风险
  106. level3Num, // 合规
  107. levelAllNum,
  108. }
  109. } catch (err) {
  110. }
  111. },
  112. },
  113. }
  114. </script>
  115. <style scoped lang="scss">
  116. .title {
  117. width: 100%;
  118. padding: 42rpx 0 40rpx 0;
  119. box-sizing: border-box;
  120. text-align: center;
  121. font-size: 30rpx;
  122. font-weight: 600;
  123. color: #000000;
  124. }
  125. .section {
  126. padding: 0 12rpx;
  127. &-header {
  128. justify-content: flex-start;
  129. column-gap: 9rpx;
  130. padding: 0 17rpx;
  131. font-size: 28rpx;
  132. font-weight: 600;
  133. color: #014FA2;
  134. .line {
  135. width: 9rpx;
  136. height: 33rpx;
  137. background: #014FA2;
  138. border-radius: 6rpx;
  139. }
  140. }
  141. &-content {
  142. margin-top: 30rpx;
  143. }
  144. }
  145. .summary {
  146. .text {
  147. padding: 20rpx 10rpx;
  148. font-size: 26rpx;
  149. color: #014FA2;
  150. background: rgba($color: #014FA2, $alpha: 0.16);
  151. .highlight {
  152. color: #DB5742;
  153. }
  154. }
  155. .charts {
  156. margin-top: 54rpx;
  157. justify-content: space-between;
  158. padding: 0 42rpx;
  159. }
  160. }
  161. .table {
  162. margin-top: 49rpx;
  163. }
  164. .img-succ {
  165. width: 100%;
  166. height: auto;
  167. }
  168. .contact {
  169. margin-top: 53rpx;
  170. row-gap: 40rpx;
  171. width: 100%;
  172. padding: 30rpx 0 22rpx 0;
  173. box-sizing: border-box;
  174. font-size: 28rpx;
  175. color: #014FA2;
  176. border: 1rpx dashed #014FA2;
  177. .qr {
  178. width: 157rpx;
  179. height: auto;
  180. }
  181. }
  182. .img {
  183. width: 100%;
  184. height: auto;
  185. }
  186. .logo {
  187. width: 100%;
  188. padding: 42rpx 127rpx 46rpx 127rpx;
  189. box-sizing: border-box;
  190. }
  191. </style>