reportDetail.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. <template>
  2. <div class="container">
  3. <div class="topWrap">
  4. <p class="tTilte" style="font-size:.17rem; margin-bottom:.08rem;">什么是学习报告:</p>
  5. <p>
  6. 阶段性课时完成后,我们将围绕
  7. <span>练习表现、节奏准确度、音符准确度、演奏连贯度</span>
  8. 等四个学习维度,对学员的学习进度和掌握程度进行精准评估,有助于家长及时了解孩子的学习成果和老师有针对性的指导,不断提升学员的学习能力和音乐成就。
  9. </p>
  10. </div>
  11. <div class="titleWrap">
  12. <img :src="imgList.title1" alt />
  13. <p>报告概览呈现的是学员本阶段的练习频率及累计时长,演奏技能的提升离不开日积月累的练习哦!</p>
  14. </div>
  15. <div class="reportWrap">
  16. <div class="border">
  17. <div class="imgBox">
  18. <div class="studentWrap">
  19. <img :src="imgList.logo" class="logo" alt />
  20. <div class="left">
  21. <img :src="studentInfo.avatar" alt />
  22. </div>
  23. <div class="right">
  24. <p class="name">{{ studentInfo.name }}</p>
  25. <p class="subject">{{ studentInfo.subjectName }}</p>
  26. </div>
  27. </div>
  28. <div class="studentTimeWrap">
  29. <div style="margin-right:.22rem">
  30. <p class="timeP">{{ studentInfo.times }}</p>
  31. <p class="descP">练习次数(次)</p>
  32. </div>
  33. <div>
  34. <p class="timeP">{{ studentInfo.totalMinutes }}</p>
  35. <p class="descP">练习时长(分钟)</p>
  36. </div>
  37. </div>
  38. <div class="assess">
  39. <p>
  40. 本次
  41. <span>练习表现优异,进步很大,希望持之以恒,</span> 要继续加油哦!
  42. </p>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="titleWrap">
  48. <img :src="imgList.title2" alt />
  49. <p>评价详情呈现的是老师就学员本组课程的练习表现、节奏准确度、音符准确度、节奏连贯度四个维度的具体评价。</p>
  50. </div>
  51. <div class="reportWrap1">
  52. <div class="imgBox1">
  53. <div style="width:100%; position: relative; margin-top:.1rem">
  54. <img :src="imgList.logo" class="logo1" alt />
  55. <p class="title">
  56. <img :src="imgList.squrt" class="squrt" alt />
  57. {{ subjectJson['1'].title}}
  58. </p>
  59. </div>
  60. <div class="cell">
  61. <img :src="subjectJson['1'].icon" class="icons" alt />
  62. {{ subjectJson['1'][item[0]] }}
  63. </div>
  64. <div style="width:100%">
  65. <p class="title">
  66. <img :src="imgList.squrt" class="squrt" alt />
  67. {{ subjectJson['2'].title}}
  68. </p>
  69. </div>
  70. <div class="cell">
  71. <img :src="subjectJson['2'].icon" class="icons" alt />
  72. {{ subjectJson['2'][item[1]] }}
  73. </div>
  74. <div style="width:100%">
  75. <p class="title">
  76. <img :src="imgList.squrt" class="squrt" alt />
  77. {{ subjectJson['3'].title}}
  78. </p>
  79. </div>
  80. <div class="cell">
  81. <img :src="subjectJson['3'].icon" class="icons" alt />
  82. {{ subjectJson['3'][item[2]] }}
  83. </div>
  84. <div style="width:100%">
  85. <p class="title">
  86. <img :src="imgList.squrt" class="squrt" alt />
  87. {{ subjectJson['4'].title}}
  88. </p>
  89. </div>
  90. <div class="cell">
  91. <img :src="subjectJson['4'].icon" class="icons" alt />
  92. {{ subjectJson['4'][item[3]] }}
  93. </div>
  94. </div>
  95. </div>
  96. <div class="titleWrap">
  97. <img :src="imgList.title3" alt />
  98. <p>老师评语是老师就学员的练习情况给予的总结,鼓励学员再接再厉哦!</p>
  99. </div>
  100. <div class="reportWrap2">
  101. <div class="boxWrap">
  102. <div class="teacherWrap">
  103. <img :src="imgList.logo" class="logo2" alt />
  104. <div class="left">
  105. <img :src="teacherInfo.avatar" alt />
  106. </div>
  107. <div class="right">
  108. <p class="name">{{teacherInfo.teacherName }}</p>
  109. <p class="subject">{{teacherInfo.subjectName }}</p>
  110. </div>
  111. </div>
  112. <div class="textWrap">
  113. <p>
  114. <i class="num1"></i>
  115. <span>{{strList[0]}}</span>
  116. </p>
  117. <p>
  118. <i class="num2"></i>
  119. <span>{{strList[1]}}</span>
  120. </p>
  121. <p>
  122. <i class="num3"></i>
  123. <span>{{strList[2]}}</span>
  124. </p>
  125. <p>
  126. <i class="num4"></i>
  127. <span>{{strList[3]}}</span>
  128. </p>
  129. </div>
  130. </div>
  131. </div>
  132. <!-- <div class="button">继续学习</div> -->
  133. </div>
  134. </template>
  135. <script>
  136. import { browser } from "@/common/common";
  137. import { studyReport } from "@/api/teacher";
  138. export default {
  139. data() {
  140. return {
  141. imgList: {
  142. title1: require("@/assets/images/start/title1.png"),
  143. title2: require("@/assets/images/start/title2.png"),
  144. title3: require("@/assets/images/start/title3.png"),
  145. default_head_img: require("@/assets/images/default_head_img.png"),
  146. logo: require("@/assets/images/start/logo.png"),
  147. excellent: require("@/assets/images/start/excellent.png"),
  148. good: require("@/assets/images/start/good.png"),
  149. normal: require("@/assets/images/start/normal.png"),
  150. squrt: require("@/assets/images/start/squrt.png"),
  151. btn: require("@/assets/images/start/button.png"),
  152. 1: require("@/assets/images/start/1.png"),
  153. 2: require("@/assets/images/start/2.png"),
  154. 3: require("@/assets/images/start/3.png"),
  155. 4: require("@/assets/images/start/4.png")
  156. },
  157. classGroupId: null,
  158. token: null,
  159. strList: [],
  160. studentInfo: {
  161. name: "",
  162. subjectName: "",
  163. times: "",
  164. totalMinutes: "",
  165. avatar: ""
  166. },
  167. teacherInfo: {},
  168. item: [],
  169. subjectJson: {
  170. '1': {
  171. title: "练习表现",
  172. 1: "表现优异!你就是最闪亮的星!",
  173. 2: "表现良好!你非常有潜力!",
  174. 3: "偶尔开小差,还要加油哦!",
  175. icon: ""
  176. },
  177. '2': {
  178. title: "节奏准确度",
  179. 1: "节奏优异!堪称人肉节拍器!",
  180. 2: "基本准确!注意时值饱满哦!",
  181. 3: "中等稳定!搭配练习节拍器会更好哦!",
  182. icon: ""
  183. },
  184. '3': {
  185. title: "音符准确度",
  186. 1: "百发百中!棒极了!",
  187. 2: "准确度良好!距离完美只有一步之遥!",
  188. 3: "中等准确!稍加练习你一定会更好!",
  189. icon: ""
  190. },
  191. '4': {
  192. title: "演奏连贯度",
  193. 1: "非常棒!你演奏一气呵成!",
  194. 2: "良好!多注意乐句末的音符时值哦!",
  195. 3: "继续努力!告诉自己,你一定能行的!",
  196. icon: ""
  197. }
  198. },
  199. };
  200. },
  201. created() {
  202. this.classGroupId = this.$route.query.classGroupId;
  203. this.token = localStorage.getItem("Authorization");
  204. if (!this.token || !this.classGroupId) {
  205. this.onAppBack();
  206. return;
  207. }
  208. studyReport({ classGroupId: this.classGroupId }).then(res => {
  209. if (res.data.code == 200) {
  210. this.studentInfo = {
  211. name: res.data.data.student.username || "",
  212. subjectName: res.data.data.subjectName,
  213. times: res.data.data.times,
  214. totalMinutes: res.data.data.totalMinutes,
  215. avatar: res.data.data.student.avatar || this.imgList.default_head_img
  216. };
  217. this.teacherInfo = {
  218. teacherName: res.data.data.teacher.name || "",
  219. subjectName: res.data.data.subjectName,
  220. avatar: res.data.data.teacher.headUrl || this.imgList.default_head_img
  221. };
  222. // 处理数据 1.item
  223. this.item = res.data.data.item.split(',');
  224. this.strList = res.data.data.comment.split('#');
  225. for(let i=1; i<=this.item.length;i++){
  226. this.setIcon(this.subjectJson,this.item[i-1],i);
  227. }
  228. }
  229. });
  230. },
  231. methods: {
  232. onAppBack() {
  233. if (browser().android) {
  234. DAYA.postMessage(JSON.stringify({ api: "back" }));
  235. } else if (browser().iPhone) {
  236. window.webkit.messageHandlers.DAYA.postMessage(
  237. JSON.stringify({ api: "back" })
  238. );
  239. }
  240. },
  241. setIcon(object,str,index){
  242. switch(str){
  243. case '1':{
  244. object[index].icon = this.imgList.excellent
  245. break
  246. }
  247. case '2':{
  248. object[index].icon = this.imgList.good
  249. break
  250. }
  251. case '3':{
  252. object[index].icon = this.imgList.normal
  253. break
  254. }
  255. }
  256. }
  257. }
  258. };
  259. </script>
  260. <style lang="less">
  261. @font-face {
  262. font-family: myFirstFont;
  263. src: url("../../assets/images/start/din-bold.otf"),
  264. url("../../assets/images/start/din-bold.otf"); /* IE9+ */
  265. }
  266. div {
  267. box-sizing: border-box;
  268. }
  269. .container {
  270. font-size: 0.14rem;
  271. box-sizing: border-box;
  272. background-color: #fff;
  273. padding-top: 0.2rem;
  274. padding-bottom: 0.36rem;
  275. display: flex;
  276. flex-direction: column;
  277. align-items: center;
  278. .logo {
  279. width: 1.03rem;
  280. height: 0.77rem;
  281. position: absolute;
  282. right: -0.15rem;
  283. top: -0.2rem;
  284. }
  285. .logo1 {
  286. width: 1.03rem;
  287. height: 0.77rem;
  288. position: absolute;
  289. right: 0rem;
  290. top: -0.08rem;
  291. }
  292. .logo2 {
  293. width: 1.03rem;
  294. height: 0.77rem;
  295. position: absolute;
  296. right: -0.2rem;
  297. top: -0.05rem;
  298. }
  299. .topWrap {
  300. background-color: #f6f6f6;
  301. width: 3.51rem;
  302. border-radius: 10px;
  303. padding: 0.16rem;
  304. margin-bottom: 0.26rem;
  305. color: #333;
  306. p {
  307. font-size: 0.14rem;
  308. line-height: 0.23rem;
  309. span {
  310. color: #28babd;
  311. }
  312. }
  313. }
  314. .titleWrap {
  315. margin-bottom: 0.24rem;
  316. img {
  317. width: 1.37rem;
  318. height: 0.74;
  319. }
  320. p {
  321. color: #666;
  322. line-height: 0.2rem;
  323. padding: 0 0.22rem;
  324. }
  325. }
  326. .reportWrap {
  327. width: 100%;
  328. padding: 0 0.22rem;
  329. margin-bottom: 0.28rem;
  330. .imgBox {
  331. width: 3.3rem;
  332. height: 4rem;
  333. background: url("../../assets/images/start/box1.png") no-repeat;
  334. background-size: 100% 100%;
  335. // margin-top: 0.22rem;
  336. display: flex;
  337. flex-direction: column;
  338. padding: 0.74rem 0.35rem 0;
  339. .studentWrap {
  340. position: relative;
  341. display: flex;
  342. flex-direction: row;
  343. justify-content: flex-start;
  344. align-items: center;
  345. .left {
  346. width: 0.72rem;
  347. height: 0.72rem;
  348. border-radius: 50%;
  349. overflow: hidden;
  350. margin-right: 0.13rem;
  351. img {
  352. width: 0.72rem;
  353. height: 0.72rem;
  354. }
  355. }
  356. .right {
  357. .name {
  358. font-size: 0.19rem;
  359. }
  360. .subject {
  361. font-size: 0.15rem;
  362. }
  363. }
  364. }
  365. .studentTimeWrap {
  366. padding: 0 0.08rem;
  367. margin-top: 0.2rem;
  368. display: flex;
  369. flex-direction: row;
  370. justify-content: flex-start;
  371. margin-bottom: 0.3rem;
  372. div {
  373. .timeP {
  374. font-family: myFirstFont, Microsoft YaHei;
  375. font-size: 0.4rem;
  376. font-weight: bold;
  377. color: rgba(51, 51, 51, 1);
  378. line-height: 0.45rem;
  379. }
  380. .descP {
  381. font-size: 0.13rem;
  382. font-family: Microsoft YaHei;
  383. font-weight: 400;
  384. color: rgba(128, 128, 128, 1);
  385. line-height: 0.2rem;
  386. }
  387. }
  388. }
  389. .assess {
  390. width: 100%;
  391. display: flex;
  392. flex-direction: column;
  393. align-items: center;
  394. background-color: #f6f6f6;
  395. p {
  396. box-sizing: border-box;
  397. padding: 0.17rem 0.13rem 0.17rem;
  398. width: 2.5rem;
  399. background: rgba(246, 246, 246, 1);
  400. border-radius: 5px;
  401. color: #666;
  402. span {
  403. font-weight: bold;
  404. }
  405. }
  406. }
  407. }
  408. }
  409. .reportWrap1 {
  410. width: 100%;
  411. padding: 0 0.22rem;
  412. margin-bottom: 0.28rem;
  413. .imgBox1 {
  414. position: relative;
  415. width: 3.3rem;
  416. height: 5.02rem;
  417. background: url("../../assets/images/start/box2.png") no-repeat;
  418. background-size: 100% 100%;
  419. display: flex;
  420. flex-direction: column;
  421. align-items: center;
  422. padding: 0.6rem 0.22rem 0;
  423. .title {
  424. box-sizing: border-box;
  425. display: flex;
  426. flex-direction: row;
  427. justify-content: flex-start;
  428. align-items: center;
  429. font-size: 0.21rem;
  430. height: 0.3rem;
  431. line-height: 0.3rem;
  432. margin: 0.1rem 0;
  433. padding: 0 0.16rem;
  434. color: #000;
  435. .squrt {
  436. width: 0.05rem;
  437. height: 0.22rem;
  438. margin-right: 0.1rem;
  439. }
  440. }
  441. .cell.activce {
  442. border: 1px solid #28babd;
  443. color: #28babd;
  444. }
  445. .cell {
  446. width: 2.6rem;
  447. height: 0.36rem;
  448. line-height: 0.36rem;
  449. box-sizing: border-box;
  450. overflow: hidden;
  451. text-overflow: ellipsis;
  452. white-space: nowrap;
  453. display: flex;
  454. flex-direction: row;
  455. align-items: center;
  456. border-radius: 21px;
  457. box-shadow: 0px 0px 9px 0px rgba(0, 0, 0, 0.14);
  458. background-color: #fff;
  459. font-size: 0.12rem;
  460. margin-bottom: 0.125rem;
  461. border: 1px solid transparent;
  462. .icons {
  463. width: 0.22rem;
  464. height: 0.22rem;
  465. margin: 0 0.105rem;
  466. }
  467. }
  468. }
  469. }
  470. .reportWrap2 {
  471. padding: 0 0.22rem;
  472. background: url("../../assets/images/start/box3.png") no-repeat;
  473. background-size: 100% 100%;
  474. width: 3.33rem;
  475. min-height: 5.31rem;
  476. display: flex;
  477. flex-direction: column;
  478. align-items: center;
  479. .teacherWrap {
  480. margin-top: 0.6rem;
  481. position: relative;
  482. display: flex;
  483. flex-direction: row;
  484. justify-content: flex-start;
  485. align-items: center;
  486. .left {
  487. width: 0.72rem;
  488. height: 0.72rem;
  489. border-radius: 50%;
  490. overflow: hidden;
  491. margin-right: 0.13rem;
  492. img {
  493. width: 0.72rem;
  494. height: 0.72rem;
  495. }
  496. }
  497. .right {
  498. .name {
  499. font-size: 0.19rem;
  500. }
  501. .subject {
  502. font-size: 0.15rem;
  503. }
  504. }
  505. }
  506. .textWrap {
  507. width: 2.5rem;
  508. max-height: 3.2rem;
  509. overflow: scroll;
  510. padding: 0.16rem 0.08rem 0.22rem;
  511. background-color: #f6f6f6;
  512. border-radius: 5px;
  513. margin-top: 0.24rem;
  514. p {
  515. display: flex;
  516. flex-direction: row;
  517. justify-content: flex-start;
  518. margin-bottom: 0.1rem;
  519. i {
  520. display: block;
  521. width: 0.19rem;
  522. height: 0.16rem;
  523. margin-right: 0.06rem;
  524. position: relative;
  525. top: 2px;
  526. }
  527. span {
  528. width: 2.25rem;
  529. font-size: 0.12rem;
  530. line-height: 0.18rem;
  531. color: #666;
  532. }
  533. .num1 {
  534. background: url("../../assets/images/start/1.png") no-repeat;
  535. background-size: 100% 100%;
  536. }
  537. .num2 {
  538. background: url("../../assets/images/start/2.png") no-repeat;
  539. background-size: 100% 100%;
  540. }
  541. .num3 {
  542. background: url("../../assets/images/start/3.png") no-repeat;
  543. background-size: 100% 100%;
  544. }
  545. .num4 {
  546. background: url("../../assets/images/start/4.png") no-repeat;
  547. background-size: 100% 100%;
  548. }
  549. }
  550. }
  551. }
  552. .button {
  553. width: 3.2rem;
  554. height: 0.5rem;
  555. line-height: 0.5rem;
  556. text-align: center;
  557. margin-top: 0.27rem;
  558. font-size: 0.18rem;
  559. color: #fff;
  560. background: linear-gradient(
  561. 90deg,
  562. rgba(97, 194, 196, 1) 0%,
  563. rgba(62, 174, 176, 1) 100%
  564. );
  565. border-radius: 0.25rem;
  566. }
  567. }
  568. </style>