dataStatisticsReport.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. <!-- 毕业教育考试数据统计报告 -->
  2. <template>
  3. <view class="dataStatisticsReport-addPage">
  4. <!-- 报告主体 -->
  5. <view class="report-wrap" v-if="showType">
  6. <view class="report-wrap-big-box">
  7. <view class="report-wrap-min-box">
  8. <!-- logo -->
  9. <view class="logo-box">
  10. <image :src="logUrl" mode="widthFix" />
  11. </view>
  12. <!-- 标题 -->
  13. <text class="title-p">实验室安全教育成绩报告</text>
  14. <!-- 用户信息 -->
  15. <view class="user-box">
  16. <view class="user-min-box">
  17. <view>
  18. <text class="label">姓名:</text>
  19. <text>{{newData.userName}}</text>
  20. </view>
  21. <view>
  22. <text class="label">学号:</text>
  23. <text>{{newData.account}}</text>
  24. </view>
  25. </view>
  26. <view class="user-min-box">
  27. <view>
  28. <text class="label">学院:</text>
  29. <text>{{newData.deptName}}</text>
  30. </view>
  31. <view>
  32. <text class="label">年级:</text>
  33. <text>{{newData.grade}}</text>
  34. </view>
  35. </view>
  36. <view class="user-min-box">
  37. <view>
  38. <text class="label">用户类型:</text>
  39. <text>{{newData.educationTypeName}}</text>
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 学年学时 -->
  44. <view class="study-hours-max-big-box" v-if="newData.studyHoursList && newData.studyHoursList[0]">
  45. <view class="study-hours-title-box">
  46. <view class="title-bar"></view>
  47. <text class="title-text">学年学时完成情况</text>
  48. </view>
  49. <view class="study-hours-text-title-box">
  50. <text>学年</text>
  51. <text>完成学时</text>
  52. <text>要求学时</text>
  53. </view>
  54. <view class="study-hours-for-box" v-for="(item, index) in newData.studyHoursList" :key="index">
  55. <text>{{item.academicYear}}</text>
  56. <text>{{item.completedStudyHours}}</text>
  57. <text>{{item.studyHoursRequirement}}</text>
  58. </view>
  59. <view class="study-hours-bottom-box">
  60. <text class="sum-label">累计</text>
  61. <text class="sum-value">{{newData.totalStudyHours}} 学时</text>
  62. </view>
  63. </view>
  64. <!-- 考试通过记录 -->
  65. <view class="study-hours-max-big-box-2" v-if="newData.examPassRecords && newData.examPassRecords[0]">
  66. <view class="study-hours-title-box">
  67. <view class="title-bar"></view>
  68. <text class="title-text">考试通过记录</text>
  69. </view>
  70. <view class="study-hours-text-title-box">
  71. <text>学年</text>
  72. <text>考试类型</text>
  73. <text>成绩</text>
  74. </view>
  75. <view class="study-hours-for-box" v-for="(item, index) in newData.examPassRecords" :key="index">
  76. <text>{{item.academicYear}}</text>
  77. <text>{{item.examTypeName}}</text>
  78. <text>{{item.score}}</text>
  79. </view>
  80. </view>
  81. <!-- 描述信息 -->
  82. <text class="study-text-p">  该同学在校期间认真完成实验室安全教育各项学习任务,累计完成 <text class="bold-text">{{newData.totalStudyHours}}</text> 学时安全培训,通过全部年度安全考核,具备良好的实验室安全意识和规范操作能力,特此证明。</text>
  83. <!-- 落款 -->
  84. <view class="signature-box">
  85. <text>{{newData.issuingUnit}}</text>
  86. <text>{{newData.issuingTime}}</text>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. </template>
  93. <script>
  94. export default {
  95. name: 'dataStatisticsReport',
  96. props: {
  97. dataStatisticsReportPropsData: {
  98. type: Object,
  99. default: () => ({})
  100. }
  101. },
  102. data() {
  103. return {
  104. logUrl: 'https://labcontrol.nwafu.edu.cn/statics/2024/07/22/d1a9d129-ced7-49ac-b258-e5167d85232d.png',
  105. newData: {
  106. userName: '',
  107. account: '',
  108. deptName: '',
  109. grade: '',
  110. educationTypeName: '',
  111. totalStudyHours: '',
  112. studyHoursList: [],
  113. examPassRecords: [],
  114. issuingUnit: '',
  115. issuingTime: '',
  116. },
  117. showType: false,
  118. }
  119. },
  120. mounted() {
  121. this.initialize()
  122. },
  123. methods: {
  124. initialize() {
  125. this.$set(this, 'newData', this.dataStatisticsReportPropsData)
  126. this.$set(this, 'showType', true)
  127. },
  128. }
  129. }
  130. </script>
  131. <style scoped lang="scss">
  132. .dataStatisticsReport-addPage {
  133. background: #f5f7fa;
  134. flex: 1;
  135. display: flex;
  136. flex-direction: column;
  137. .report-wrap {
  138. flex: 1;
  139. display: flex;
  140. flex-direction: column;
  141. .report-wrap-big-box {
  142. margin: 20rpx;
  143. border: 1rpx solid #c9a84c;
  144. border-radius: 4rpx;
  145. position: relative;
  146. flex: 1;
  147. display: flex;
  148. flex-direction: column;
  149. background-color: #fffdf5;
  150. .report-wrap-min-box {
  151. flex: 1;
  152. display: flex;
  153. flex-direction: column;
  154. border: 1rpx solid #c9a84c;
  155. border-radius: 4rpx;
  156. margin: 1rpx;
  157. // logo
  158. .logo-box {
  159. width: 578rpx;
  160. height: 88rpx;
  161. border-radius: 6rpx;
  162. background-color: #1a6e3a;
  163. margin: 40rpx 0 0 48rpx;
  164. overflow: hidden;
  165. image {
  166. width: 350rpx;
  167. margin: 6rpx auto;
  168. display: block;
  169. }
  170. }
  171. // 标题
  172. .title-p {
  173. line-height: 56rpx;
  174. color: #8b452f;
  175. text-align: center;
  176. font-size: 20rpx;
  177. letter-spacing: 6rpx;
  178. display: block;
  179. }
  180. // 用户信息
  181. .user-box {
  182. width: 578rpx;
  183. background-color: #faf6ec;
  184. border: 1rpx solid #e8dcc8;
  185. margin: 9rpx 0 0 48rpx;
  186. border-radius: 4rpx;
  187. padding: 10rpx 20rpx;
  188. box-sizing: border-box;
  189. .user-min-box {
  190. display: flex;
  191. view {
  192. flex: 1;
  193. display: flex;
  194. .label {
  195. line-height: 26rpx;
  196. font-size: 14rpx;
  197. color: #4a3c2a;
  198. font-weight: 700;
  199. }
  200. text:not(.label) {
  201. line-height: 26rpx;
  202. font-size: 14rpx;
  203. color: #4a3c2a;
  204. }
  205. }
  206. }
  207. }
  208. // 学年学时列表
  209. .study-hours-max-big-box {
  210. margin: 20rpx 48rpx 0 48rpx;
  211. .study-hours-title-box {
  212. display: flex;
  213. align-items: center;
  214. .title-bar {
  215. height: 20rpx;
  216. width: 3rpx;
  217. background-color: #c9a84c;
  218. }
  219. .title-text {
  220. line-height: 20rpx;
  221. font-size: 12rpx;
  222. flex: 1;
  223. color: #8b4513;
  224. margin-left: 8rpx;
  225. font-weight: 700;
  226. }
  227. }
  228. .study-hours-text-title-box {
  229. display: flex;
  230. background-color: #f5edd8;
  231. border-bottom: 1rpx solid #d4c5a0;
  232. margin-top: 10rpx;
  233. text {
  234. line-height: 34rpx;
  235. font-size: 12rpx;
  236. color: #5a4320;
  237. flex: 1;
  238. text-align: center;
  239. font-weight: 700;
  240. }
  241. }
  242. .study-hours-for-box {
  243. display: flex;
  244. border-bottom: 1rpx solid #ebe3d0;
  245. text {
  246. line-height: 32rpx;
  247. font-size: 12rpx;
  248. color: #4a3c2a;
  249. flex: 1;
  250. text-align: center;
  251. }
  252. }
  253. .study-hours-bottom-box {
  254. display: flex;
  255. background-color: #faf6ec;
  256. border-bottom: 1rpx solid #ebe3d0;
  257. .sum-label {
  258. width: 216rpx;
  259. line-height: 32rpx;
  260. font-size: 12rpx;
  261. color: #4a3c2a;
  262. font-weight: 700;
  263. text-align: center;
  264. }
  265. .sum-value {
  266. flex: 1;
  267. line-height: 32rpx;
  268. font-size: 12rpx;
  269. color: #4a3c2a;
  270. font-weight: 700;
  271. text-align: center;
  272. }
  273. }
  274. }
  275. // 考试通过记录列表
  276. .study-hours-max-big-box-2 {
  277. margin: 20rpx 48rpx 0 48rpx;
  278. .study-hours-title-box {
  279. display: flex;
  280. align-items: center;
  281. .title-bar {
  282. height: 20rpx;
  283. width: 3rpx;
  284. background-color: #c9a84c;
  285. }
  286. .title-text {
  287. line-height: 20rpx;
  288. font-size: 12rpx;
  289. flex: 1;
  290. color: #8b4513;
  291. margin-left: 8rpx;
  292. font-weight: 700;
  293. }
  294. }
  295. .study-hours-text-title-box {
  296. display: flex;
  297. background-color: #f5edd8;
  298. border-bottom: 1rpx solid #d4c5a0;
  299. margin-top: 10rpx;
  300. text {
  301. line-height: 34rpx;
  302. font-size: 12rpx;
  303. color: #5a4320;
  304. flex: 1;
  305. text-align: center;
  306. font-weight: 700;
  307. }
  308. }
  309. .study-hours-for-box {
  310. display: flex;
  311. border-bottom: 1rpx solid #ebe3d0;
  312. text {
  313. line-height: 32rpx;
  314. font-size: 12rpx;
  315. color: #4a3c2a;
  316. flex: 1;
  317. text-align: center;
  318. }
  319. }
  320. }
  321. // 描述信息
  322. .study-text-p {
  323. margin: 25rpx 48rpx 0 48rpx;
  324. line-height: 24rpx;
  325. font-size: 14rpx;
  326. color: #4a3c2a;
  327. display: block;
  328. .bold-text {
  329. font-weight: 700;
  330. }
  331. }
  332. // 落款
  333. .signature-box {
  334. margin: 103rpx 180rpx 80rpx 48rpx;
  335. text {
  336. height: 24rpx;
  337. display: block;
  338. text-align: right;
  339. font-size: 14rpx;
  340. color: #4a3c2a;
  341. line-height: 24rpx;
  342. }
  343. }
  344. }
  345. }
  346. }
  347. }
  348. </style>