reportDetailNew.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713
  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.title4" class="topTitleImg" alt />
  13. <p>学习内容呈现的是老师本次课程教授的乐理,曲子及教材详情。</p>
  14. </div>
  15. <div class="studyWrap">
  16. <div class="border">
  17. <img :src="imgList.boxtitle1" width="100%" alt />
  18. <div class="borderContainer">
  19. <img :src="imgList.logo" class="logo1" alt />
  20. <div class="theoryBox">
  21. <div class="left">
  22. <img :src="imgList.theoryIcon" class="theoryIcon" alt />
  23. </div>
  24. <div class="right">
  25. <p class="subTitle">乐理</p>
  26. <p class="desc" v-for="(item,index) in musicTheory" :key="index">{{item.str}}</p>
  27. </div>
  28. </div>
  29. <div class="theoryBox">
  30. <div class="left">
  31. <img :src="imgList.muiscIcon" class="muiscIcon" alt />
  32. </div>
  33. <div class="right">
  34. <p class="subTitle">曲子</p>
  35. <p class="desc">{{ song }}</p>
  36. </div>
  37. </div>
  38. <div class="theoryBox">
  39. <div class="left">
  40. <img :src="imgList.bookIcon" class="bookIcon" alt />
  41. </div>
  42. <div class="right">
  43. <p class="subTitle">教材</p>
  44. <p class="desc" v-for="(item,index) in teachingMaterial" :key="index">{{item.str}}</p>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="titleWrap">
  51. <img :src="imgList.title1" alt />
  52. <p>报告概览呈现的是学员本阶段的练习频率及累计时长,演奏技能的提升离不开日积月累的练习哦!</p>
  53. </div>
  54. <div class="reportWrap">
  55. <div class="border">
  56. <div class="imgBox">
  57. <div class="studentWrap">
  58. <img :src="imgList.logo" class="logo" alt />
  59. <div class="left">
  60. <img :src="studentInfo.avatar" alt />
  61. </div>
  62. <div class="right">
  63. <p class="name">{{ studentInfo.name }}</p>
  64. <p class="subject">{{ studentInfo.subjectName }}</p>
  65. </div>
  66. </div>
  67. <div class="studentTimeWrap">
  68. <div style="margin-right:.22rem">
  69. <p class="timeP">{{ studentInfo.times }}</p>
  70. <p class="descP">练习次数(次)</p>
  71. </div>
  72. <div>
  73. <p class="timeP">{{ studentInfo.totalMinutes }}</p>
  74. <p class="descP">练习时长(分钟)</p>
  75. </div>
  76. </div>
  77. <div class="assess">
  78. <p>
  79. 本次
  80. <span>练习表现优异,进步很大,希望持之以恒,</span> 要继续加油哦!
  81. </p>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="titleWrap">
  87. <img :src="imgList.title2" alt />
  88. <p>评价详情呈现的是老师就学员本组课程的练习表现、节奏准确度、音符准确度、节奏连贯度四个维度的具体评价。</p>
  89. </div>
  90. <div class="reportWrap1">
  91. <div class="border">
  92. <img :src="imgList.boxtitle2" width="100%" alt />
  93. <div class="imgBox1">
  94. <div style="width:100%; position: relative; margin-top:.1rem">
  95. <img :src="imgList.logo" class="logo1" alt />
  96. <p class="title">
  97. <img :src="imgList.squrt" class="squrt" alt />
  98. {{ subjectJson['1'].title}}
  99. </p>
  100. </div>
  101. <div class="cell">
  102. <img :src="subjectJson['1'].icon" class="icons" alt />
  103. {{ subjectJson['1'][item.one] }}
  104. </div>
  105. <div style="width:100%">
  106. <p class="title">
  107. <img :src="imgList.squrt" class="squrt" alt />
  108. {{ subjectJson['2'].title}}
  109. </p>
  110. </div>
  111. <div class="cell">
  112. <img :src="subjectJson['2'].icon" class="icons" alt />
  113. {{ subjectJson['2'][item.two] }}
  114. </div>
  115. <div style="width:100%">
  116. <p class="title">
  117. <img :src="imgList.squrt" class="squrt" alt />
  118. {{ subjectJson['3'].title}}
  119. </p>
  120. </div>
  121. <div class="cell">
  122. <img :src="subjectJson['3'].icon" class="icons" alt />
  123. {{ subjectJson['3'][item.three] }}
  124. </div>
  125. <div style="width:100%">
  126. <p class="title">
  127. <img :src="imgList.squrt" class="squrt" alt />
  128. {{ subjectJson['4'].title}}
  129. </p>
  130. </div>
  131. <div class="cell">
  132. <img :src="subjectJson['4'].icon" class="icons" alt />
  133. {{ subjectJson['4'][item.four] }}
  134. </div>
  135. <div style="width:100%">
  136. <p class="title">
  137. <img :src="imgList.squrt" class="squrt" alt />
  138. {{ subjectJson['5'].title}}
  139. </p>
  140. </div>
  141. <div class="cell">
  142. <img :src="subjectJson['5'].icon" class="icons" alt />
  143. {{ subjectJson['5'][item.five] }}
  144. </div>
  145. <div style="width:100%" v-if="item.six">
  146. <p class="title">
  147. <img :src="imgList.squrt" class="squrt" alt />
  148. {{ subjectJson['6'].title}}
  149. </p>
  150. </div>
  151. <div class="cell" v-if="item.six">
  152. <img :src="subjectJson['6'].icon" class="icons" alt />
  153. {{ subjectJson['6'][item.six] }}
  154. </div>
  155. <div style="width:100%" v-if="item.seven">
  156. <p class="title">
  157. <img :src="imgList.squrt" class="squrt" alt />
  158. {{ subjectJson['7'].title}}
  159. </p>
  160. </div>
  161. <div class="cell" v-if="item.seven">
  162. <img :src="subjectJson['7'].icon" class="icons" alt />
  163. {{ subjectJson['7'][item.seven] }}
  164. </div>
  165. <div style="width:100%" v-if="item.eight">
  166. <p class="title">
  167. <img :src="imgList.squrt" class="squrt" alt />
  168. {{ subjectJson['8'].title}}
  169. </p>
  170. </div>
  171. <div class="cell" v-if="item.eight">
  172. <img :src="subjectJson['8'].icon" class="icons" alt />
  173. {{ subjectJson['8'][item.eight] }}
  174. </div>
  175. </div>
  176. </div>
  177. </div>
  178. <!-- <div class="button">继续学习</div> -->
  179. </div>
  180. </template>
  181. <script>
  182. import { browser } from "@/common/common";
  183. import { studyReport,getReviewsInfo } from "@/api/teacher";
  184. import { subjectJson } from "@/utils/questionJson";
  185. export default {
  186. data() {
  187. return {
  188. imgList: {
  189. title1: require("@/assets/images/start/title1.png"),
  190. title2: require("@/assets/images/start/title2.png"),
  191. title3: require("@/assets/images/start/title3.png"),
  192. title4: require("@/assets/images/start/title4.png"),
  193. default_head_img: require("@/assets/images/default_head_img.png"),
  194. logo: require("@/assets/images/start/logo.png"),
  195. excellent: require("@/assets/images/start/excellent.png"),
  196. good: require("@/assets/images/start/good.png"),
  197. normal: require("@/assets/images/start/normal.png"),
  198. squrt: require("@/assets/images/start/squrt.png"),
  199. boxtitle2: require("@/assets/images/start/boxtitle2.png"),
  200. boxtitle1: require("@/assets/images/start/boxtitle1.png"),
  201. theoryIcon: require("@/assets/images/start/theory-icon.png"),
  202. muiscIcon: require("@/assets/images/start/muisc-icon.png"),
  203. bookIcon: require("@/assets/images/start/book-icon.png")
  204. },
  205. classGroupId: null,
  206. token: null,
  207. strList: [],
  208. studentInfo: {
  209. name: "",
  210. subjectName: "",
  211. times: "",
  212. totalMinutes: "",
  213. avatar: ""
  214. },
  215. teacherInfo: {},
  216. item: [],
  217. subjectJson: subjectJson,
  218. musicTheory:[],
  219. song:'',
  220. teachingMaterial:[]
  221. };
  222. },
  223. created() {
  224. this.id = this.$route.query.id;
  225. let params = this.$route.query;
  226. if (params.Authorization) {
  227. localStorage.setItem("Authorization", decodeURI(params.Authorization));
  228. localStorage.setItem("userInfo", decodeURI(params.Authorization));
  229. }
  230. if (!this.id) {
  231. this.onAppBack();
  232. return;
  233. }
  234. getReviewsInfo({ id: this.id }).then(res => {
  235. if (res.data.code == 200) {
  236. this.studentInfo = {
  237. name: res.data.data.student&&res.data.data.student.username || "",
  238. avatar: res.data.data.student&&res.data.data.student.avatar || this.imgList.default_head_img,
  239. subjectName: res.data.data.subjectName,
  240. times: res.data.data.times,
  241. totalMinutes: res.data.data.totalMinutes,
  242. };
  243. this.teacherInfo = {
  244. teacherName: res.data.data.teacher&&res.data.data.teacher.name || "",
  245. subjectName: res.data.data.subjectName,
  246. avatar: res.data.data.teacher&&res.data.data.teacher.headUrl || this.imgList.default_head_img
  247. };
  248. this.teachingMaterial = JSON.parse(res.data.data.teachingMaterial);
  249. this.musicTheory = JSON.parse(res.data.data.musicTheory)
  250. this.song = res.data.data.song
  251. // 处理数据 1.item
  252. this.item = JSON.parse(res.data.data.item);
  253. this.strList = res.data.data.comment.split("#");
  254. console.log(this.item);
  255. for (let key in this.item) {
  256. this.setIcon(this.subjectJson, this.item[key], key);
  257. }
  258. // for (let i = 1; i <= this.item.length; i++) {
  259. // this.setIcon(this.subjectJson, this.item[i - 1], i);
  260. // }
  261. }
  262. });
  263. },
  264. methods: {
  265. onAppBack() {
  266. if (browser().android) {
  267. DAYA.postMessage(JSON.stringify({ api: "back" }));
  268. } else if (browser().iPhone) {
  269. window.webkit.messageHandlers.DAYA.postMessage(
  270. JSON.stringify({ api: "back" })
  271. );
  272. }
  273. },
  274. setIcon(object, str, index) {
  275. let some = {
  276. one: 1,
  277. two: 2,
  278. three: 3,
  279. four: 4,
  280. five: 5,
  281. six: 6,
  282. seven: 7,
  283. eight: 8
  284. };
  285. switch (str) {
  286. case 1: {
  287. object[some[index]].icon = this.imgList.excellent;
  288. break;
  289. }
  290. case 2: {
  291. // console.log( object[some[index]].icon)
  292. object[some[index]].icon = this.imgList.good;
  293. break;
  294. }
  295. case 3: {
  296. // console.log( object[some[index]].icon)
  297. object[some[index]].icon = this.imgList.normal;
  298. break;
  299. }
  300. }
  301. if (index == "seven" || index == "six") {
  302. object[some[index]].icon == this.imgList.good
  303. ? (object[some[index]].icon = this.imgList.normal)
  304. : object[some[index]].icon;
  305. }
  306. }
  307. }
  308. };
  309. </script>
  310. <style lang="less">
  311. @font-face {
  312. font-family: myFirstFont;
  313. src: url("../../assets/images/start/din-bold.otf"),
  314. url("../../assets/images/start/din-bold.otf"); /* IE9+ */
  315. }
  316. div {
  317. box-sizing: border-box;
  318. }
  319. .container {
  320. font-size: 0.14rem;
  321. box-sizing: border-box;
  322. background-color: #fff;
  323. padding-top: 0.2rem;
  324. padding-bottom: 0.36rem;
  325. display: flex;
  326. flex-direction: column;
  327. align-items: center;
  328. .logo {
  329. width: 1.03rem;
  330. height: 0.77rem;
  331. position: absolute;
  332. right: -0.15rem;
  333. top: -0.2rem;
  334. }
  335. .logo1 {
  336. width: 1.03rem;
  337. height: 0.77rem;
  338. position: absolute;
  339. right: 0rem;
  340. top: -0.08rem;
  341. }
  342. .logo2 {
  343. width: 1.03rem;
  344. height: 0.77rem;
  345. position: absolute;
  346. right: -0.2rem;
  347. top: -0.05rem;
  348. }
  349. .topWrap {
  350. background-color: #f6f6f6;
  351. width: 3.51rem;
  352. border-radius: 10px;
  353. padding: 0.16rem;
  354. margin-bottom: 0.26rem;
  355. color: #333;
  356. p {
  357. font-size: 0.14rem;
  358. line-height: 0.23rem;
  359. span {
  360. color: #28babd;
  361. }
  362. }
  363. }
  364. .titleWrap {
  365. margin-bottom: 0.24rem;
  366. img {
  367. width: 1.37rem;
  368. height: 0.74;
  369. }
  370. p {
  371. color: #666;
  372. line-height: 0.2rem;
  373. padding: 0 0.22rem;
  374. }
  375. }
  376. .studyWrap {
  377. min-height: 200px;
  378. padding: 0 0.2rem;
  379. width: 100%;
  380. .border {
  381. width: 100%;
  382. background-color: #2dc5c5;
  383. min-height: 200px;
  384. border-radius: 5px;
  385. padding: 0.18rem;
  386. margin-bottom: 0.1rem;
  387. .logo1 {
  388. position: absolute;
  389. top: -0.15rem;
  390. z-index: 20;
  391. }
  392. img {
  393. vertical-align: middle;
  394. position: relative;
  395. top: 0.01rem;
  396. }
  397. .theoryIcon {
  398. width: 0.17rem;
  399. height: 0.17rem;
  400. position: relative;
  401. top: -0.02rem;
  402. }
  403. .muiscIcon {
  404. width: 0.17rem;
  405. height: 0.19rem;
  406. position: relative;
  407. top: -0.02rem;
  408. }
  409. .bookIcon {
  410. width: 0.16rem;
  411. height: 0.19rem;
  412. position: relative;
  413. top: -0.02rem;
  414. }
  415. .borderContainer {
  416. position: relative;
  417. border-radius: 0 0 10px 10px;
  418. z-index: 1;
  419. min-height: 200px;
  420. background-color: #fff;
  421. display: flex;
  422. flex-direction: column;
  423. padding-left: 0.4rem;
  424. .theoryBox {
  425. display: flex;
  426. flex-direction: row;
  427. justify-content: flex-start;
  428. margin-bottom: 0.25rem;
  429. .right {
  430. margin-left: 0.09rem;
  431. .subTitle {
  432. font-size: 0.13rem;
  433. color: #000;
  434. }
  435. .desc {
  436. font-size: 0.13rem;
  437. color: #808080;
  438. line-height: 0.2rem;
  439. }
  440. }
  441. }
  442. }
  443. }
  444. }
  445. .reportWrap {
  446. width: 100%;
  447. padding: 0 0.22rem;
  448. margin-bottom: 0.28rem;
  449. .imgBox {
  450. width: 3.3rem;
  451. height: 4rem;
  452. background: url("../../assets/images/start/box1.png") no-repeat;
  453. background-size: 100% 100%;
  454. // margin-top: 0.22rem;
  455. display: flex;
  456. flex-direction: column;
  457. padding: 0.74rem 0.35rem 0;
  458. .studentWrap {
  459. position: relative;
  460. display: flex;
  461. flex-direction: row;
  462. justify-content: flex-start;
  463. align-items: center;
  464. .left {
  465. width: 0.72rem;
  466. height: 0.72rem;
  467. border-radius: 50%;
  468. overflow: hidden;
  469. margin-right: 0.13rem;
  470. img {
  471. width: 0.72rem;
  472. height: 0.72rem;
  473. }
  474. }
  475. .right {
  476. .name {
  477. font-size: 0.19rem;
  478. }
  479. .subject {
  480. font-size: 0.15rem;
  481. }
  482. }
  483. }
  484. .studentTimeWrap {
  485. padding: 0 0.08rem;
  486. margin-top: 0.2rem;
  487. display: flex;
  488. flex-direction: row;
  489. justify-content: flex-start;
  490. margin-bottom: 0.3rem;
  491. div {
  492. .timeP {
  493. font-family: myFirstFont, Microsoft YaHei;
  494. font-size: 0.4rem;
  495. font-weight: bold;
  496. color: rgba(51, 51, 51, 1);
  497. line-height: 0.45rem;
  498. }
  499. .descP {
  500. font-size: 0.13rem;
  501. font-family: Microsoft YaHei;
  502. font-weight: 400;
  503. color: rgba(128, 128, 128, 1);
  504. line-height: 0.2rem;
  505. }
  506. }
  507. }
  508. .assess {
  509. width: 100%;
  510. display: flex;
  511. flex-direction: column;
  512. align-items: center;
  513. background-color: #f6f6f6;
  514. p {
  515. box-sizing: border-box;
  516. padding: 0.17rem 0.13rem 0.17rem;
  517. width: 2.5rem;
  518. background: rgba(246, 246, 246, 1);
  519. border-radius: 5px;
  520. color: #666;
  521. span {
  522. font-weight: bold;
  523. }
  524. }
  525. }
  526. }
  527. }
  528. .reportWrap1 {
  529. width: 100%;
  530. padding: 0 0.22rem;
  531. // margin-bottom: 0.28rem;
  532. .border {
  533. width: 100%;
  534. background-color: #2dc5c5;
  535. min-height: 200px;
  536. border-radius: 5px;
  537. padding: 0.18rem;
  538. margin-bottom: 0.1rem;
  539. img {
  540. vertical-align: middle;
  541. }
  542. .imgBox1 {
  543. background-color: #fff;
  544. border-radius: 0 0 10px 10px;
  545. position: relative;
  546. width: 100%;
  547. // height: 5.02rem;
  548. // background: url("../../assets/images/start/box2.png") no-repeat;
  549. // background-size: 100% 100%;
  550. display: flex;
  551. flex-direction: column;
  552. align-items: center;
  553. // padding: 0.6rem 0.22rem 0;
  554. .title {
  555. box-sizing: border-box;
  556. display: flex;
  557. flex-direction: row;
  558. justify-content: flex-start;
  559. align-items: center;
  560. font-size: 0.18rem;
  561. height: 0.3rem;
  562. line-height: 0.3rem;
  563. margin: 0.1rem 0;
  564. padding: 0 0.16rem;
  565. color: #006b6b;
  566. .squrt {
  567. width: 0.05rem;
  568. height: 0.22rem;
  569. margin-right: 0.1rem;
  570. }
  571. }
  572. .cell.activce {
  573. border: 1px solid #28babd;
  574. color: #28babd;
  575. }
  576. .cell {
  577. width: 2.6rem;
  578. padding: 0.08rem 0.17rem 0.08rem 0;
  579. box-sizing: border-box;
  580. display: flex;
  581. flex-direction: row;
  582. border-radius: 10px;
  583. box-shadow: 0px 0px 9px 0px rgba(0, 0, 0, 0.14);
  584. background-color: #fff;
  585. font-size: 0.12rem;
  586. margin-bottom: 0.125rem;
  587. border: 1px solid transparent;
  588. .icons {
  589. width: 0.22rem;
  590. height: 0.22rem;
  591. margin: 0 0.105rem;
  592. }
  593. }
  594. }
  595. }
  596. }
  597. .reportWrap2 {
  598. padding: 0 0.22rem;
  599. background: url("../../assets/images/start/box3.png") no-repeat;
  600. background-size: 100% 100%;
  601. width: 3.33rem;
  602. min-height: 5.31rem;
  603. display: flex;
  604. flex-direction: column;
  605. align-items: center;
  606. .teacherWrap {
  607. margin-top: 0.6rem;
  608. position: relative;
  609. display: flex;
  610. flex-direction: row;
  611. justify-content: flex-start;
  612. align-items: center;
  613. .left {
  614. width: 0.72rem;
  615. height: 0.72rem;
  616. border-radius: 50%;
  617. overflow: hidden;
  618. margin-right: 0.13rem;
  619. img {
  620. width: 0.72rem;
  621. height: 0.72rem;
  622. }
  623. }
  624. .right {
  625. .name {
  626. font-size: 0.19rem;
  627. }
  628. .subject {
  629. font-size: 0.15rem;
  630. }
  631. }
  632. }
  633. .textWrap {
  634. width: 2.5rem;
  635. max-height: 3.2rem;
  636. overflow: scroll;
  637. padding: 0.16rem 0.08rem 0.22rem;
  638. background-color: #f6f6f6;
  639. border-radius: 5px;
  640. margin-top: 0.24rem;
  641. p {
  642. display: flex;
  643. flex-direction: row;
  644. justify-content: flex-start;
  645. margin-bottom: 0.1rem;
  646. i {
  647. display: block;
  648. width: 0.19rem;
  649. height: 0.16rem;
  650. margin-right: 0.06rem;
  651. position: relative;
  652. top: 2px;
  653. }
  654. span {
  655. width: 2.25rem;
  656. font-size: 0.12rem;
  657. line-height: 0.18rem;
  658. color: #666;
  659. }
  660. .num1 {
  661. background: url("../../assets/images/start/1.png") no-repeat;
  662. background-size: 100% 100%;
  663. }
  664. .num2 {
  665. background: url("../../assets/images/start/2.png") no-repeat;
  666. background-size: 100% 100%;
  667. }
  668. .num3 {
  669. background: url("../../assets/images/start/3.png") no-repeat;
  670. background-size: 100% 100%;
  671. }
  672. .num4 {
  673. background: url("../../assets/images/start/4.png") no-repeat;
  674. background-size: 100% 100%;
  675. }
  676. }
  677. }
  678. }
  679. .topTitleImg {
  680. width: 1.21rem!important;
  681. }
  682. .button {
  683. width: 3.2rem;
  684. height: 0.5rem;
  685. line-height: 0.5rem;
  686. text-align: center;
  687. margin-top: 0.27rem;
  688. font-size: 0.18rem;
  689. color: #fff;
  690. background: linear-gradient(
  691. 90deg,
  692. rgba(97, 194, 196, 1) 0%,
  693. rgba(62, 174, 176, 1) 100%
  694. );
  695. border-radius: 0.25rem;
  696. }
  697. }
  698. </style>