reportDetail.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  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. let params = this.$route.query;
  204. if (params.Authorization) {
  205. localStorage.setItem("Authorization", decodeURI(params.Authorization));
  206. localStorage.setItem("userInfo", decodeURI(params.Authorization));
  207. }
  208. if (!this.classGroupId) {
  209. this.onAppBack();
  210. return;
  211. }
  212. studyReport({ classGroupId: this.classGroupId }).then(res => {
  213. if (res.data.code == 200) {
  214. this.studentInfo = {
  215. name: res.data.data.student.username || "",
  216. subjectName: res.data.data.subjectName,
  217. times: res.data.data.times,
  218. totalMinutes: res.data.data.totalMinutes,
  219. avatar: res.data.data.student.avatar || this.imgList.default_head_img
  220. };
  221. this.teacherInfo = {
  222. teacherName: res.data.data.teacher.name || "",
  223. subjectName: res.data.data.subjectName,
  224. avatar: res.data.data.teacher.headUrl || this.imgList.default_head_img
  225. };
  226. // 处理数据 1.item
  227. this.item = res.data.data.item.split(',');
  228. this.strList = res.data.data.comment.split('#');
  229. for(let i=1; i<=this.item.length;i++){
  230. this.setIcon(this.subjectJson,this.item[i-1],i);
  231. }
  232. }
  233. });
  234. },
  235. methods: {
  236. onAppBack() {
  237. if (browser().android) {
  238. DAYA.postMessage(JSON.stringify({ api: "back" }));
  239. } else if (browser().iPhone) {
  240. window.webkit.messageHandlers.DAYA.postMessage(
  241. JSON.stringify({ api: "back" })
  242. );
  243. }
  244. },
  245. setIcon(object,str,index){
  246. switch(str){
  247. case '1':{
  248. object[index].icon = this.imgList.excellent
  249. break
  250. }
  251. case '2':{
  252. object[index].icon = this.imgList.good
  253. break
  254. }
  255. case '3':{
  256. object[index].icon = this.imgList.normal
  257. break
  258. }
  259. }
  260. }
  261. }
  262. };
  263. </script>
  264. <style lang="less" scoped>
  265. @font-face {
  266. font-family: myFirstFont;
  267. src: url("../../assets/images/start/din-bold.otf"),
  268. url("../../assets/images/start/din-bold.otf"); /* IE9+ */
  269. }
  270. div {
  271. box-sizing: border-box;
  272. }
  273. .container {
  274. font-size: 0.14rem;
  275. box-sizing: border-box;
  276. background-color: #fff;
  277. padding-top: 0.2rem;
  278. padding-bottom: 0.36rem;
  279. display: flex;
  280. flex-direction: column;
  281. align-items: center;
  282. .logo {
  283. width: 1.03rem;
  284. height: 0.77rem;
  285. position: absolute;
  286. right: -0.15rem;
  287. top: -0.2rem;
  288. }
  289. .logo1 {
  290. width: 1.03rem;
  291. height: 0.77rem;
  292. position: absolute;
  293. right: 0rem;
  294. top: -0.08rem;
  295. }
  296. .logo2 {
  297. width: 1.03rem;
  298. height: 0.77rem;
  299. position: absolute;
  300. right: -0.2rem;
  301. top: -0.05rem;
  302. }
  303. .topWrap {
  304. background-color: #f6f6f6;
  305. width: 3.51rem;
  306. border-radius: 10px;
  307. padding: 0.16rem;
  308. margin-bottom: 0.26rem;
  309. color: #333;
  310. p {
  311. font-size: 0.14rem;
  312. line-height: 0.23rem;
  313. span {
  314. color: #28babd;
  315. }
  316. }
  317. }
  318. .titleWrap {
  319. margin-bottom: 0.24rem;
  320. img {
  321. width: 1.37rem;
  322. height: 0.74;
  323. }
  324. p {
  325. color: #666;
  326. line-height: 0.2rem;
  327. padding: 0 0.22rem;
  328. }
  329. }
  330. .reportWrap {
  331. width: 100%;
  332. padding: 0 0.22rem;
  333. margin-bottom: 0.28rem;
  334. .imgBox {
  335. width: 3.3rem;
  336. height: 4rem;
  337. background: url("../../assets/images/start/box1.png") no-repeat;
  338. background-size: 100% 100%;
  339. // margin-top: 0.22rem;
  340. display: flex;
  341. flex-direction: column;
  342. padding: 0.74rem 0.35rem 0;
  343. .studentWrap {
  344. position: relative;
  345. display: flex;
  346. flex-direction: row;
  347. justify-content: flex-start;
  348. align-items: center;
  349. .left {
  350. width: 0.72rem;
  351. height: 0.72rem;
  352. border-radius: 50%;
  353. overflow: hidden;
  354. margin-right: 0.13rem;
  355. img {
  356. width: 0.72rem;
  357. height: 0.72rem;
  358. }
  359. }
  360. .right {
  361. .name {
  362. font-size: 0.19rem;
  363. }
  364. .subject {
  365. font-size: 0.15rem;
  366. }
  367. }
  368. }
  369. .studentTimeWrap {
  370. padding: 0 0.08rem;
  371. margin-top: 0.2rem;
  372. display: flex;
  373. flex-direction: row;
  374. justify-content: flex-start;
  375. margin-bottom: 0.3rem;
  376. div {
  377. .timeP {
  378. font-family: myFirstFont, Microsoft YaHei;
  379. font-size: 0.4rem;
  380. font-weight: bold;
  381. color: rgba(51, 51, 51, 1);
  382. line-height: 0.45rem;
  383. }
  384. .descP {
  385. font-size: 0.13rem;
  386. font-family: Microsoft YaHei;
  387. font-weight: 400;
  388. color: rgba(128, 128, 128, 1);
  389. line-height: 0.2rem;
  390. }
  391. }
  392. }
  393. .assess {
  394. width: 100%;
  395. display: flex;
  396. flex-direction: column;
  397. align-items: center;
  398. background-color: #f6f6f6;
  399. p {
  400. box-sizing: border-box;
  401. padding: 0.17rem 0.13rem 0.17rem;
  402. width: 2.5rem;
  403. background: rgba(246, 246, 246, 1);
  404. border-radius: 5px;
  405. color: #666;
  406. span {
  407. font-weight: bold;
  408. }
  409. }
  410. }
  411. }
  412. }
  413. .reportWrap1 {
  414. width: 100%;
  415. padding: 0 0.22rem;
  416. margin-bottom: 0.28rem;
  417. .imgBox1 {
  418. position: relative;
  419. width: 3.3rem;
  420. height: 5.02rem;
  421. background: url("../../assets/images/start/box2.png") no-repeat;
  422. background-size: 100% 100%;
  423. display: flex;
  424. flex-direction: column;
  425. align-items: center;
  426. padding: 0.6rem 0.22rem 0;
  427. .title {
  428. box-sizing: border-box;
  429. display: flex;
  430. flex-direction: row;
  431. justify-content: flex-start;
  432. align-items: center;
  433. font-size: 0.21rem;
  434. height: 0.3rem;
  435. line-height: 0.3rem;
  436. margin: 0.1rem 0;
  437. padding: 0 0.16rem;
  438. color: #000;
  439. .squrt {
  440. width: 0.05rem;
  441. height: 0.22rem;
  442. margin-right: 0.1rem;
  443. }
  444. }
  445. .cell.activce {
  446. border: 1px solid #28babd;
  447. color: #28babd;
  448. }
  449. .cell {
  450. width: 2.6rem;
  451. height: 0.36rem;
  452. line-height: 0.36rem;
  453. box-sizing: border-box;
  454. overflow: hidden;
  455. text-overflow: ellipsis;
  456. white-space: nowrap;
  457. display: flex;
  458. flex-direction: row;
  459. align-items: center;
  460. border-radius: 21px;
  461. box-shadow: 0px 0px 9px 0px rgba(0, 0, 0, 0.14);
  462. background-color: #fff;
  463. font-size: 0.12rem;
  464. margin-bottom: 0.125rem;
  465. border: 1px solid transparent;
  466. .icons {
  467. width: 0.22rem;
  468. height: 0.22rem;
  469. margin: 0 0.105rem;
  470. }
  471. }
  472. }
  473. }
  474. .reportWrap2 {
  475. padding: 0 0.22rem;
  476. background: url("../../assets/images/start/box3.png") no-repeat;
  477. background-size: 100% 100%;
  478. width: 3.33rem;
  479. min-height: 5.31rem;
  480. display: flex;
  481. flex-direction: column;
  482. align-items: center;
  483. .teacherWrap {
  484. margin-top: 0.6rem;
  485. position: relative;
  486. display: flex;
  487. flex-direction: row;
  488. justify-content: flex-start;
  489. align-items: center;
  490. .left {
  491. width: 0.72rem;
  492. height: 0.72rem;
  493. border-radius: 50%;
  494. overflow: hidden;
  495. margin-right: 0.13rem;
  496. img {
  497. width: 0.72rem;
  498. height: 0.72rem;
  499. }
  500. }
  501. .right {
  502. .name {
  503. font-size: 0.19rem;
  504. }
  505. .subject {
  506. font-size: 0.15rem;
  507. }
  508. }
  509. }
  510. .textWrap {
  511. width: 2.5rem;
  512. max-height: 3.2rem;
  513. overflow: scroll;
  514. padding: 0.16rem 0.08rem 0.22rem;
  515. background-color: #f6f6f6;
  516. border-radius: 5px;
  517. margin-top: 0.24rem;
  518. p {
  519. display: flex;
  520. flex-direction: row;
  521. justify-content: flex-start;
  522. margin-bottom: 0.1rem;
  523. i {
  524. display: block;
  525. width: 0.19rem;
  526. height: 0.16rem;
  527. margin-right: 0.06rem;
  528. position: relative;
  529. top: 2px;
  530. }
  531. span {
  532. width: 2.25rem;
  533. font-size: 0.12rem;
  534. line-height: 0.18rem;
  535. color: #666;
  536. }
  537. .num1 {
  538. background: url("../../assets/images/start/1.png") no-repeat;
  539. background-size: 100% 100%;
  540. }
  541. .num2 {
  542. background: url("../../assets/images/start/2.png") no-repeat;
  543. background-size: 100% 100%;
  544. }
  545. .num3 {
  546. background: url("../../assets/images/start/3.png") no-repeat;
  547. background-size: 100% 100%;
  548. }
  549. .num4 {
  550. background: url("../../assets/images/start/4.png") no-repeat;
  551. background-size: 100% 100%;
  552. }
  553. }
  554. }
  555. }
  556. .button {
  557. width: 3.2rem;
  558. height: 0.5rem;
  559. line-height: 0.5rem;
  560. text-align: center;
  561. margin-top: 0.27rem;
  562. font-size: 0.18rem;
  563. color: #fff;
  564. background: linear-gradient(
  565. 90deg,
  566. rgba(97, 194, 196, 1) 0%,
  567. rgba(62, 174, 176, 1) 100%
  568. );
  569. border-radius: 0.25rem;
  570. }
  571. }
  572. </style>