jixujiaoyunianjian.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view class="container">
  3. <view class="info-box">
  4. <view class="info-item">
  5. 用&nbsp;&nbsp;户&nbsp;名:{{user.name}}
  6. </view>
  7. <view class="info-item">
  8. 任职机构:{{user.corpName ?? '无'}}
  9. </view>
  10. <view class="info-item">
  11. 业务水平认证证书编号:{{user.corpRegNo ?? '无'}}
  12. </view>
  13. </view>
  14. <view class="list-box">
  15. <view class="list-item-box">
  16. <view class="list-item year">
  17. 年份
  18. </view>
  19. <view class="list-item fen">
  20. 应休学分
  21. </view>
  22. <view class="list-item fen">
  23. 已修学分
  24. </view>
  25. <view class="list-item btn">
  26. 年检情况
  27. </view>
  28. </view>
  29. <view class="list-item-box" v-for="(item, index) in listData" :key="index">
  30. <view class="list-item year">
  31. {{item.year}}
  32. </view>
  33. <view class="list-item fen">
  34. {{item.credit}}
  35. </view>
  36. <view class="list-item fen">
  37. {{item.gotCredit}}
  38. </view>
  39. <view class="list-item btn">
  40. <view class="button" :class="[item.finish ? 'primary' : 'error']" @click="onXuexi(item)">
  41. {{item.annIns}}
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="desc-box">
  47. <!-- <rich-text :nodes="explain"></rich-text> -->
  48. <mp-html :content="explain" />
  49. </view>
  50. </view>
  51. </template>
  52. <script setup>
  53. import { ref } from 'vue'
  54. import { onLoad } from '@dcloudio/uni-app'
  55. import { useAuthStore } from '@/store/authStore'
  56. import { list } from '@/api/report.js'
  57. const authStore = useAuthStore()
  58. // 用户信息
  59. const user = ref({
  60. userIcon: '1',
  61. name: '某某某',
  62. corpName: '广州市xx地产有限公司',
  63. corpRegNo: '123xxxx'
  64. })
  65. const listData = ref([
  66. ])
  67. const explain = ref('')
  68. function onXuexi(val) {
  69. console.log('点击学习')
  70. }
  71. onLoad(() => {
  72. user.value = authStore.userInfo
  73. list().then(res => {
  74. if (res && res.message === 'success') {
  75. listData.value = res.data.creditList
  76. explain.value = res.data.explain
  77. }
  78. })
  79. })
  80. </script>
  81. <style lang="scss" scoped>
  82. .container {
  83. height: 100vh;
  84. width: 100vw;
  85. background: rgb(141, 204, 255);
  86. background: -moz-linear-gradient( 90deg, rgb(141, 204, 255) 10%, rgb(247, 247, 247) 30%);
  87. background: -webkit-linear-gradient(90deg, rgb(141, 204, 255) 10%, rgb(247, 247, 247) 30%);
  88. background: -o-linear-gradient( 90deg, rgb(141, 204, 255) 10%, rgb(247, 247, 247) 30%);
  89. background: -ms-linear-gradient( 90deg, rgb(141, 204, 255) 10%, rgb(247, 247, 247) 30%);
  90. background: linear-gradient( 180deg, rgb(141, 204, 255) 10%, rgb(247, 247, 247) 30%);
  91. .info-box {
  92. margin: 0 20rpx;
  93. padding: 0 40rpx;
  94. padding-top: 50rpx;
  95. margin-bottom: 30rpx;
  96. .info-item {
  97. margin-bottom: 10rpx;
  98. font-size: $uni-title-font-size-2;
  99. font-weight: bold;
  100. letter-spacing: 3rpx;
  101. }
  102. }
  103. .list-box {
  104. margin: 0 20rpx;
  105. background-color: $uni-bg-color-grey;
  106. border-radius: $uni-card-border-radius;
  107. padding: 20rpx 15rpx;
  108. margin-bottom: 30rpx;
  109. .year,.fen {
  110. width: 20%;
  111. }
  112. .btn {
  113. width: 40%;
  114. }
  115. .list-item-box {
  116. &:first-child {
  117. border-bottom: 5rpx solid #E6E6E6;
  118. font-size: $uni-font-size-1;
  119. font-weight: bold;
  120. .list-item {
  121. text-align: center;
  122. &:last-child {
  123. color: #303133;
  124. font-weight: bold;
  125. }
  126. }
  127. }
  128. padding: 15rpx 0;
  129. text-align: center;
  130. font-size: $uni-font-size-3;
  131. font-weight: bold;
  132. display: flex;
  133. align-items: center;
  134. .list-item {
  135. text-align: center;
  136. &:last-child {
  137. color: $uni-text-color-inverse;
  138. font-weight: normal;
  139. }
  140. }
  141. .button {
  142. width: fit-content;
  143. border-radius: $uni-card-border-radius;
  144. margin: 0 auto;
  145. }
  146. .primary {
  147. padding: 5rpx 25rpx;
  148. background-color: $uni-color-primary;
  149. }
  150. .error {
  151. padding: 5rpx 15rpx;
  152. background-color: $uni-color-error;
  153. }
  154. }
  155. }
  156. .desc-box {
  157. margin: 0 20rpx;
  158. font-weight: bold;
  159. .title {
  160. font-size: $uni-title-font-size-2;
  161. line-height: 50rpx;
  162. }
  163. .text {
  164. display: flex;
  165. align-items: center;
  166. text-indent: 2em;
  167. font-size: $uni-font-size-2;
  168. }
  169. .li {
  170. display: flex;
  171. align-items: center;
  172. font-size: $uni-font-size-2;
  173. &:before {
  174. content: '•';
  175. font-size: 30rpx;
  176. margin-right: 8rpx;
  177. }
  178. }
  179. .top {
  180. margin-top: 30rpx;
  181. }
  182. }
  183. }
  184. </style>