dataStatisticsReport.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  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: uni.getStorageSync('rectangleLogo'),
  113. // logUrl: 'https://gzu.zjznai.com/statics/2026/06/17/00df3205-5321-4b46-aae3-0ffe4451ee51.png',
  114. newData: {
  115. userName: '',
  116. account: '',
  117. deptName: '',
  118. grade: '',
  119. educationTypeName: '',
  120. totalStudyHours: '',
  121. studyHoursList: [],
  122. examPassRecords: [],
  123. issuingUnit: '',
  124. issuingTime: '',
  125. },
  126. }
  127. },
  128. watch: {
  129. dataStatisticsReportPropsData: {
  130. immediate: true,
  131. handler(val) {
  132. if (val && Object.keys(val).length) {
  133. this.$set(this, 'newData', val);
  134. }
  135. }
  136. }
  137. },
  138. methods: {
  139. stopProp(e) {
  140. e.stopPropagation && e.stopPropagation();
  141. },
  142. handleClose() {
  143. this.$emit('close');
  144. },
  145. onOverlayTap() {
  146. this.$emit('close');
  147. },
  148. }
  149. }
  150. </script>
  151. <style scoped lang="scss">
  152. .dataStatisticsReport-addPage {
  153. position: fixed;
  154. top: 0;
  155. left: 0;
  156. right: 0;
  157. bottom: 0;
  158. z-index: 999;
  159. background: rgba(0, 0, 0, 0.5);
  160. display: flex;
  161. align-items: center;
  162. justify-content: center;
  163. .report-wrap {
  164. position: relative;
  165. width: 90%;
  166. max-height: 80vh;
  167. background: #fffdf5;
  168. border-radius: 8rpx;
  169. display: flex;
  170. flex-direction: column;
  171. .close-btn {
  172. position: absolute;
  173. top: 16rpx;
  174. right: 24rpx;
  175. z-index: 10;
  176. font-size: 36rpx;
  177. color: #8b452f;
  178. line-height: 1;
  179. padding: 8rpx;
  180. }
  181. .report-scroll {
  182. flex: 1;
  183. max-height: 80vh;
  184. }
  185. .report-wrap-big-box {
  186. margin: 20rpx;
  187. border: 1rpx solid #c9a84c;
  188. border-radius: 4rpx;
  189. background-color: #fffdf5;
  190. .report-wrap-min-box {
  191. display: flex;
  192. flex-direction: column;
  193. border: 1rpx solid #c9a84c;
  194. border-radius: 4rpx;
  195. margin: 1rpx;
  196. // logo
  197. .logo-box {
  198. width: 578rpx;
  199. height: 88rpx;
  200. border-radius: 6rpx;
  201. // background-color: #1a6e3a;
  202. background-color: #77161B;
  203. margin: 40rpx 0 0 24rpx;
  204. overflow: hidden;
  205. image {
  206. width: 350rpx;
  207. margin: 6rpx auto;
  208. display: block;
  209. }
  210. }
  211. // 标题
  212. .title-p {
  213. line-height: 56rpx;
  214. color: #8b452f;
  215. text-align: center;
  216. font-size: 20rpx;
  217. letter-spacing: 6rpx;
  218. display: block;
  219. }
  220. // 用户信息
  221. .user-box {
  222. width: 578rpx;
  223. background-color: #faf6ec;
  224. border: 1rpx solid #e8dcc8;
  225. margin: 9rpx 0 0 24rpx;
  226. border-radius: 4rpx;
  227. padding: 10rpx 20rpx;
  228. box-sizing: border-box;
  229. .user-min-box {
  230. display: flex;
  231. view {
  232. flex: 1;
  233. display: flex;
  234. .label {
  235. line-height: 26rpx;
  236. font-size: 14rpx;
  237. color: #4a3c2a;
  238. font-weight: 700;
  239. }
  240. text:not(.label) {
  241. line-height: 26rpx;
  242. font-size: 14rpx;
  243. color: #4a3c2a;
  244. }
  245. }
  246. }
  247. }
  248. // 学年学时列表
  249. .study-hours-max-big-box {
  250. margin: 20rpx 24rpx 0 24rpx;
  251. .study-hours-title-box {
  252. display: flex;
  253. align-items: center;
  254. .title-bar {
  255. height: 20rpx;
  256. width: 3rpx;
  257. background-color: #c9a84c;
  258. }
  259. .title-text {
  260. line-height: 20rpx;
  261. font-size: 12rpx;
  262. flex: 1;
  263. color: #8b4513;
  264. margin-left: 8rpx;
  265. font-weight: 700;
  266. }
  267. }
  268. .study-hours-text-title-box {
  269. display: flex;
  270. background-color: #f5edd8;
  271. border-bottom: 1rpx solid #d4c5a0;
  272. margin-top: 10rpx;
  273. text {
  274. line-height: 34rpx;
  275. font-size: 12rpx;
  276. color: #5a4320;
  277. flex: 1;
  278. text-align: center;
  279. font-weight: 700;
  280. }
  281. }
  282. .study-hours-for-box {
  283. display: flex;
  284. border-bottom: 1rpx solid #ebe3d0;
  285. text {
  286. line-height: 32rpx;
  287. font-size: 12rpx;
  288. color: #4a3c2a;
  289. flex: 1;
  290. text-align: center;
  291. }
  292. }
  293. .study-hours-bottom-box {
  294. display: flex;
  295. background-color: #faf6ec;
  296. border-bottom: 1rpx solid #ebe3d0;
  297. .sum-label {
  298. width: 216rpx;
  299. line-height: 32rpx;
  300. font-size: 12rpx;
  301. color: #4a3c2a;
  302. font-weight: 700;
  303. text-align: center;
  304. }
  305. .sum-value {
  306. flex: 1;
  307. line-height: 32rpx;
  308. font-size: 12rpx;
  309. color: #4a3c2a;
  310. font-weight: 700;
  311. text-align: center;
  312. }
  313. }
  314. }
  315. // 考试通过记录列表
  316. .study-hours-max-big-box-2 {
  317. margin: 20rpx 24rpx 0 24rpx;
  318. .study-hours-title-box {
  319. display: flex;
  320. align-items: center;
  321. .title-bar {
  322. height: 20rpx;
  323. width: 3rpx;
  324. background-color: #c9a84c;
  325. }
  326. .title-text {
  327. line-height: 20rpx;
  328. font-size: 12rpx;
  329. flex: 1;
  330. color: #8b4513;
  331. margin-left: 8rpx;
  332. font-weight: 700;
  333. }
  334. }
  335. .study-hours-text-title-box {
  336. display: flex;
  337. background-color: #f5edd8;
  338. border-bottom: 1rpx solid #d4c5a0;
  339. margin-top: 10rpx;
  340. text {
  341. line-height: 34rpx;
  342. font-size: 12rpx;
  343. color: #5a4320;
  344. flex: 1;
  345. text-align: center;
  346. font-weight: 700;
  347. }
  348. }
  349. .study-hours-for-box {
  350. display: flex;
  351. border-bottom: 1rpx solid #ebe3d0;
  352. text {
  353. line-height: 32rpx;
  354. font-size: 12rpx;
  355. color: #4a3c2a;
  356. flex: 1;
  357. text-align: center;
  358. }
  359. }
  360. }
  361. // 描述信息
  362. .study-text-p {
  363. margin: 25rpx 48rpx 0 48rpx;
  364. line-height: 24rpx;
  365. font-size: 14rpx;
  366. color: #4a3c2a;
  367. display: block;
  368. .bold-text {
  369. font-weight: 700;
  370. }
  371. }
  372. // 落款
  373. .signature-box {
  374. margin: 103rpx 180rpx 80rpx 48rpx;
  375. text {
  376. height: 24rpx;
  377. display: block;
  378. text-align: right;
  379. font-size: 14rpx;
  380. color: #4a3c2a;
  381. line-height: 24rpx;
  382. }
  383. }
  384. }
  385. }
  386. }
  387. }
  388. </style>