dataStatisticsReport.vue 11 KB

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