studyReport.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <template>
  2. <div class="m-container">
  3. <img :src="imgList.topBanner" width="100%" class="topBanner" alt />
  4. <div class="card">
  5. <p class="title">
  6. <img :src="imgList.squrt" class="squrt" alt />
  7. 练习表现
  8. </p>
  9. <div class="cell" :class="one==1?'activce':''" @click="one=1">
  10. <img :src="imgList.excellent" class="icons" alt />
  11. 表现优异!你就是最闪亮的星!
  12. </div>
  13. <div class="cell" :class="one==2?'activce':''" @click="one=2">
  14. <img :src="imgList.good" class="icons" alt />
  15. 表现良好!你非常有潜力!
  16. </div>
  17. <div class="cell" :class="one==3?'activce':''" @click="one=3">
  18. <img :src="imgList.normal" class="icons" alt />
  19. 偶尔开小差,还要加油哦!
  20. </div>
  21. </div>
  22. <div class="card1">
  23. <p class="title">
  24. <img :src="imgList.squrt" class="squrt" alt />
  25. 节奏准确度
  26. </p>
  27. <div class="cell" :class="two==1?'activce':''" @click="two=1">
  28. <img :src="imgList.excellent" class="icons" alt />
  29. 节奏优异!堪称人肉节拍器!
  30. </div>
  31. <div class="cell" :class="two==2?'activce':''" @click="two=2">
  32. <img :src="imgList.good" class="icons" alt />
  33. 基本准确!注意时值饱满哦!
  34. </div>
  35. <div class="cell" :class="two==3?'activce':''" @click="two=3">
  36. <img :src="imgList.normal" class="icons" alt />
  37. 中等稳定!搭配练习节拍器会更好哦!
  38. </div>
  39. </div>
  40. <div class="card">
  41. <p class="title">
  42. <img :src="imgList.squrt" class="squrt" alt />
  43. 音符准确度
  44. </p>
  45. <div class="cell" :class="three==1?'activce':''" @click="three=1">
  46. <img :src="imgList.excellent" class="icons" alt />
  47. 百发百中!棒极了!
  48. </div>
  49. <div class="cell" :class="three==2?'activce':''" @click="three=2">
  50. <img :src="imgList.good" class="icons" alt />
  51. 准确度良好!距离完美只有一步之遥!
  52. </div>
  53. <div class="cell" :class="three==3?'activce':''" @click="three=3">
  54. <img :src="imgList.normal" class="icons" alt />
  55. 中等准确!稍加练习你一定会更好!
  56. </div>
  57. </div>
  58. <div class="card1">
  59. <p class="title">
  60. <img :src="imgList.squrt" class="squrt" alt />
  61. 演奏连贯度
  62. </p>
  63. <div class="cell" :class="four==1?'activce':''" @click="four=1">
  64. <img :src="imgList.excellent" class="icons" alt />
  65. 非常棒!你演奏一气呵成!
  66. </div>
  67. <div class="cell" :class="four==2?'activce':''" @click="four=2">
  68. <img :src="imgList.good" class="icons" alt />
  69. 良好!多注意乐句末的音符时值哦!
  70. </div>
  71. <div class="cell" :class="four==3?'activce':''" @click="four=3">
  72. <img :src="imgList.normal" class="icons" alt />
  73. 继续努力!告诉自己,你一定能行的!
  74. </div>
  75. </div>
  76. <div class="submit" @click="submietInfo">
  77. <img :src="imgList.btn" width="100%" alt />
  78. </div>
  79. </div>
  80. </template>
  81. <script>
  82. import { browser } from "@/common/common";
  83. import { addStudyReport } from "@/api/teacher";
  84. // addStudyReport
  85. export default {
  86. data() {
  87. return {
  88. imgList: {
  89. topBanner: require("@/assets/images/start/topBanner.png"),
  90. squrt: require("@/assets/images/start/squrt.png"),
  91. excellent: require("@/assets/images/start/excellent.png"),
  92. good: require("@/assets/images/start/good.png"),
  93. normal: require("@/assets/images/start/normal.png"),
  94. btn: require("@/assets/images/start/button.png")
  95. },
  96. one: "",
  97. two: "",
  98. three: "",
  99. four: "",
  100. json: {
  101. one: {
  102. "1":
  103. "保持日常练习,与老师良好的互动是进步的开始 !稳定的节奏就像是音乐的脉搏,搭配良好的音符准确度,也许将来会成为职业音乐家也不一定哦!",
  104. "2":
  105. "练习时不要怕出错,有疑问时也多多提出,问题的改正+疑惑的解开会让你有意想不到的收获!",
  106. "3":
  107. "专注是进步的基石,练习在“精”不在“长”,打开节拍器练习,认真读谱再演奏,高质量的练习会让你在课程中突飞猛进!"
  108. },
  109. two: {
  110. "1":
  111. "节奏是音乐的心跳,恭喜你有一颗良好跳动的音乐之心!保持你的优势,同时提升其他方面综合水平,相信未来的你会更好!",
  112. "2":
  113. "节拍器是练习的好帮手!在它的帮助下会让你的节奏更精准,现阶段要注意休止符空拍准确和长音演奏的饱满。",
  114. "3":
  115. "俗话说“错音不错节奏”,音乐的风格与律动与节奏有着离不开的关系,建议平时多使用节拍器练习,想要提升节奏稳定度,一定要“慢”不要“快”!"
  116. },
  117. three: {
  118. "1":
  119. "识谱能力非凡的你,在日常练习中可以针对其他环节做更多的练习,音乐是多元素的艺术表现方式,综合能力的提升才是硬道理!",
  120. "2":
  121. "重视每一个“小错误”,演奏前首先注意调号,还要关注临时变音记号通常会持续整个小,马马虎虎的话可是会谬以千里哦!",
  122. "3":
  123. "识谱慢?没关系!你知道吗,管乐器常用的音符一共才不超过36呦!熟悉它们的位置,分清线上和线间,包你读谱赛神仙!"
  124. },
  125. four: {
  126. "1":
  127. "你的演奏行云流水!现在可以在曲目演奏过程中加上一些你对音乐的理解,音乐的表达是重要的一环哦!",
  128. "2":
  129. "练习要目标明确,在不连贯的地方针对练习,会让你的练习更加高效!",
  130. "3":
  131. "经常卡壳?心急吃不了热豆腐,注意力集中的慢练才是“制胜法宝” !"
  132. }
  133. },
  134. classGroupId: null,
  135. comment: null,
  136. item: null
  137. };
  138. },
  139. created() {
  140. this.classGroupId = this.$route.query.classGroupId;
  141. this.token = localStorage.getItem("Authorization");
  142. if (!this.token || !this.classGroupId) {
  143. this.onAppBack();
  144. return;
  145. }
  146. },
  147. methods: {
  148. submietInfo() {
  149. // console.log(this.one)
  150. // console.log(this.json.one[this.one])
  151. if (!this.one || !this.two || !this.three || !this.four) {
  152. this.$toast("请认真选择每一项");
  153. return;
  154. }
  155. this.comment =
  156. this.json.one[this.one] +'#'+
  157. this.json.two[this.two] +'#'+
  158. this.json.three[this.three] +'#'+
  159. this.json.four[this.four];
  160. this.item =
  161. this.one + "," + this.two + "," + this.three + "," + this.four;
  162. addStudyReport({
  163. classGroupId: this.classGroupId,
  164. item: this.item,
  165. comment: this.comment
  166. }).then(res => {
  167. if (res.data.code == 200) {
  168. this.$toast("提交成功");
  169. setTimeout(() => {
  170. // this.$router.push({
  171. // path: "/studyReport",
  172. // query: { classGroupId: this.classGroupId }
  173. // });
  174. this.onAppBack();
  175. }, 2000);
  176. } else {
  177. this.$toast(res.data.msg);
  178. setTimeout(() => {
  179. // this.$router.push({
  180. // path: "/studyReport",
  181. // query: { classGroupId: this.classGroupId }
  182. // });
  183. }, 2000);
  184. }
  185. });
  186. },
  187. onAppBack() {
  188. if (browser().android) {
  189. DAYA.postMessage(JSON.stringify({ api: "back" }));
  190. } else if (browser().iPhone) {
  191. window.webkit.messageHandlers.DAYA.postMessage(
  192. JSON.stringify({ api: "back" })
  193. );
  194. }
  195. }
  196. }
  197. };
  198. </script>
  199. <style lang="less">
  200. .m-container {
  201. background: url("../../assets/images/start/bg.png") no-repeat;
  202. background-size: 100% 100%;
  203. width: 100%;
  204. min-height: 16.97rem;
  205. display: flex;
  206. flex-direction: column;
  207. align-items: center;
  208. .topBanner {
  209. position: relative;
  210. top: 0.1rem;
  211. }
  212. .card {
  213. display: flex;
  214. flex-direction: column;
  215. box-sizing: border-box;
  216. background: url("../../assets/images/start/topCard.png") no-repeat;
  217. background-size: 100% 100%;
  218. width: 3.38rem;
  219. height: 3.28rem;
  220. padding: 0.41rem 0.16rem 0.524rem;
  221. margin-bottom: 0.2rem;
  222. }
  223. .card1 {
  224. display: flex;
  225. flex-direction: column;
  226. box-sizing: border-box;
  227. background: url("../../assets/images/start/card.png") no-repeat;
  228. background-size: 100% 100%;
  229. width: 3.38rem;
  230. height: 3.28rem;
  231. padding: 0.41rem 0.16rem 0.524rem;
  232. margin-bottom: 0.2rem;
  233. }
  234. .title {
  235. display: flex;
  236. flex-direction: row;
  237. justify-content: flex-start;
  238. font-size: 0.22rem;
  239. height: 0.22rem;
  240. line-height: 0.22rem;
  241. margin-bottom: 0.365rem;
  242. .squrt {
  243. width: 0.05rem;
  244. height: 0.22rem;
  245. margin-right: 0.1rem;
  246. }
  247. }
  248. .cell.activce {
  249. border: 1px solid #28babd;
  250. color: #28babd;
  251. }
  252. .cell {
  253. width: 3.05rem;
  254. height: 0.42rem;
  255. line-height: 0.42rem;
  256. white-space: nowrap;
  257. overflow: hidden;
  258. text-overflow: ellipsis;
  259. display: flex;
  260. flex-direction: row;
  261. align-items: center;
  262. border-radius: 21px;
  263. box-shadow: 0px 0px 9px 0px rgba(0, 0, 0, 0.14);
  264. background-color: #fff;
  265. font-size: 0.15rem;
  266. margin-bottom: 0.245rem;
  267. border: 1px solid transparent;
  268. .icons {
  269. width: 0.26rem;
  270. height: 0.26rem;
  271. margin: 0 0.105rem;
  272. }
  273. }
  274. .submit {
  275. width: 3.2rem;
  276. }
  277. }
  278. </style>