report.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. <template>
  2. <div class="report_container">
  3. <Header></Header>
  4. <Master></Master>
  5. <div class="report_box bgf pad20" style="margin-top:40px;">
  6. <a href="/teachCheckList" style="color: #288add;"> < 返回 </a>
  7. <div class="header_basic">
  8. <ul>
  9. <li><!--<Icon type="md-person" size="24" />--><span class="name">姓名:</span><span class="name_content">张三</span></li>
  10. <li><!--<Icon type="md-bookmarks" size="24" />--><span class="name">学号:</span><span class="name_content">201901001</span></li>
  11. <li><!--<Icon type="ios-clipboard" size="24" />--><span class="name">班级:</span><span class="name_content">2019级五班</span></li>
  12. </ul>
  13. <br/>
  14. <ul>
  15. <li><span class="vice-name">考试名称:</span><span class="vice-name_content">2019.03.07-在线检测</span></li>
  16. <li><span class="vice-name">考试类型:</span><span class="vice-name_content">区级联考</span></li>
  17. <li><span class="vice-name">考试总分:</span><span class="vice-name_content">460</span></li>
  18. <li><span class="vice-name">学习稳定系数:</span><span class="vice-name_content">0.6</span></li>
  19. </ul>
  20. </div>
  21. <div class="chooseexam">
  22. <div class="exam">
  23. <span>选择考试:</span>
  24. <Select v-model="model1" style="width:200px">
  25. <Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
  26. </Select>
  27. </div>
  28. <div class="subjects">
  29. <span>科目:</span>
  30. <Select v-model="model2" style="width:200px">
  31. <Option v-for="itemc in cityList1" :value="itemc.value" :key="itemc.value">{{ itemc.label }}</Option>
  32. </Select>
  33. </div>
  34. </div>
  35. <div class="summarize">
  36. <p class="summarize_header_title">总结:</p>
  37. <div class="summarize_content">
  38. <p class="content_header">张三同学,你好!</p>
  39. <p class="content_text">你在本次<span class="exam_color">在线检测(2019-03-07)</span>中,考试总分为<span class="number_color">460分</span>,考试范围为:1-4章节。</p>
  40. <p class="content_text">你在 <span class="dot1">知识点1、知识点2、知识点3</span> 处的题目都表现出色,全部都答对了。</p>
  41. <p class="content_text">你在 <span class="dot2">知识点3、知识点4、知识点6 </span> 处的题目有待加强,部分答对了,其中<span class="dot3">知识点3-XXXX,知识点4-XXXX,知识点6-XXX</span> 需加强练习或复习。</p>
  42. <p class="content_text">你在<span class="dot4">知识点7、知识点8、知识点9 </span> 处的题目表现较差,都答错了。建议将答错试题请教老师,重新学习知识点内容,也可进入补救题库,进行补救。</p>
  43. </div>
  44. </div>
  45. <div class="trend">
  46. <p class="reportTit">成绩分析趋势</p>
  47. <div id="zhexian" style="width:100%; height:400px;"></div>
  48. </div>
  49. <div class="structure">
  50. <p class="reportTit">知识点分数占比</p>
  51. <div id="zhishidian" style="width:100%; height:400px;"></div>
  52. </div>
  53. <div class="structure_details">
  54. <p class="reportTit">知识点掌握情况</p>
  55. <Table :columns="columns1" :data="data1"></Table>
  56. </div>
  57. </div>
  58. <Footer></Footer>
  59. </div>
  60. </template>
  61. <script>
  62. import Header from '@/common/header.vue'
  63. import Master from '@/common/master.vue'
  64. import Footer from '@/common/footer.vue'
  65. export default {
  66. components: {
  67. Header,
  68. Master,
  69. Footer
  70. },
  71. data() {
  72. return {
  73. cityList: [
  74. {
  75. value: '2019.03.07-在线检测',
  76. label: '2019.03.07-在线检测'
  77. },
  78. {
  79. value: '2018.12.15-测试',
  80. label: '2018.12.15-测试'
  81. },
  82. {
  83. value: '2018.11.03-在线检测',
  84. label: '2018.11.03-在线检测'
  85. },
  86. {
  87. value: '2018.10.07-在线测试考',
  88. label: '2018.10.07-在线测试考'
  89. },
  90. ],
  91. model1: '2019.03.07-在线检测',
  92. cityList1: [
  93. {
  94. value: '语文',
  95. label: '语文'
  96. },
  97. {
  98. value: '数学',
  99. label: '数学'
  100. },
  101. {
  102. value: '英语',
  103. label: '英语'
  104. },
  105. {
  106. value: '物理',
  107. label: '物理'
  108. },
  109. ],
  110. model2: '数学',
  111. columns1: [
  112. {
  113. title: '知识点名称',
  114. key: 'name'
  115. },
  116. {
  117. title: '掌握情况',
  118. key: 'master'
  119. },
  120. {
  121. title: '难度系数',
  122. key: 'difficulty'
  123. },
  124. {
  125. title: '配分',
  126. key: 'score'
  127. },
  128. {
  129. title: '相关题目数',
  130. key: 'topic'
  131. },
  132. {
  133. title: '答对率',
  134. key: 'accuracy'
  135. },
  136. ],
  137. data1: [
  138. {
  139. name: '知识点1',
  140. master: '一般',
  141. difficulty: 0.6,
  142. score: 20,
  143. topic: '3/5',
  144. accuracy: '60%',
  145. className: 'demo-table-info-column'
  146. },
  147. {
  148. name: '知识点2',
  149. master: '良好',
  150. difficulty: 0.4,
  151. score: 25,
  152. topic: '4/5',
  153. accuracy: '80%'
  154. },
  155. {
  156. name: '知识点3',
  157. master: '差',
  158. difficulty: 0.5,
  159. score: 15,
  160. topic: '0/3',
  161. accuracy: '0%'
  162. },
  163. {
  164. name: '知识点4',
  165. master: '差',
  166. difficulty: 0.7,
  167. score: 10,
  168. topic: '0/2',
  169. accuracy: '0%'
  170. },
  171. {
  172. name: '知识点5',
  173. master: '优秀',
  174. difficulty: 0.6,
  175. score: 30,
  176. topic: '4/4',
  177. accuracy: '100%'
  178. },
  179. ]
  180. }
  181. },
  182. mounted() {
  183. this.drawLine();
  184. this.graph();
  185. },
  186. methods: {
  187. drawLine() {
  188. let myChart = this.$echarts.init(document.getElementById('zhexian'));
  189. var xData = function () {
  190. var data = [];
  191. for (var i = 1; i < 15; i++) {
  192. data.push(i + "");
  193. }
  194. return data;
  195. }();
  196. myChart.setOption({
  197. backgroundColor: "#344b58",
  198. "tooltip": {
  199. "trigger": "axis",
  200. "axisPointer": {
  201. "type": "shadow",
  202. textStyle: {
  203. color: "#fff"
  204. }
  205. },
  206. },
  207. "grid": {
  208. "borderWidth": 0,
  209. "top": 100,
  210. "bottom": 35,
  211. "right":30,
  212. textStyle: {
  213. color: "#fff"
  214. }
  215. },
  216. "legend": {
  217. x: '4%',
  218. top: '11%',
  219. textStyle: {
  220. color: '#90979c',
  221. },
  222. "data": ['成绩', '趋势']
  223. },
  224. "calculable": true,
  225. "xAxis": [{
  226. "type": "category",
  227. "axisLine": {
  228. lineStyle: {
  229. color: '#90979c'
  230. }
  231. },
  232. "splitLine": {
  233. "show": false
  234. },
  235. "axisTick": {
  236. "show": false
  237. },
  238. "splitArea": {
  239. "show": false
  240. },
  241. "axisLabel": {
  242. "interval": 0,
  243. },
  244. "data": ["在线检测(2019.03.07)", "在线检测(2019.01.13)", "在线检测(2018.12.20)", "在线检测(2018.12.03)","在线检测(2018.11.15)"],
  245. }],
  246. "yAxis": [{
  247. "type": "value",
  248. "splitLine": {
  249. "show": false
  250. },
  251. "axisLine": {
  252. lineStyle: {
  253. color: '#90979c'
  254. }
  255. },
  256. "axisTick": {
  257. "show": false
  258. },
  259. "axisLabel": {
  260. "interval": 0,
  261. },
  262. "splitArea": {
  263. "show": false
  264. },
  265. }],
  266. "series": [{
  267. "name": "成绩",
  268. "type": "bar",
  269. "stack": "总量",
  270. "barMaxWidth": 35,
  271. "barGap": "10%",
  272. "itemStyle": {
  273. "normal": {
  274. "color": "rgba(255,144,128,1)",
  275. "label": {
  276. "show": true,
  277. "textStyle": {
  278. "color": "#fff"
  279. },
  280. "position": "insideTop",
  281. formatter: function (p) {
  282. return p.value > 0 ? (p.value) : '';
  283. }
  284. }
  285. }
  286. },
  287. "data": [76,83,93,90,68,83],
  288. },
  289. {
  290. "name": "趋势",
  291. "type": "line",
  292. "stack": "总量",
  293. symbolSize: 20,
  294. symbol: 'circle',
  295. "itemStyle": {
  296. "normal": {
  297. "color": "rgba(252,230,48,1)",
  298. "barBorderRadius": 0,
  299. "label": {
  300. "show": true,
  301. "position": "top",
  302. formatter: function (p) {
  303. return p.value > 0 ? (p.value) : '';
  304. }
  305. }
  306. }
  307. },
  308. "data": [76, 83, 93, 90, 68, 83],
  309. },
  310. ]
  311. })
  312. },
  313. graph() {
  314. let myCharts = this.$echarts.init(document.getElementById('zhishidian'));
  315. myCharts.setOption({
  316. backgroundColor: "#344b58",
  317. title: {
  318. text: '知识点分数占比',
  319. left: 'center',
  320. top: 20,
  321. textStyle: {
  322. color: '#fff'
  323. }
  324. },
  325. tooltip: {
  326. trigger: 'item',
  327. formatter: "{b} : {c} ({d}%)"
  328. },
  329. visualMap: {
  330. show: false,
  331. min: 0,
  332. max: 100,
  333. inRange: {
  334. //colorLightness: [0, 1]
  335. }
  336. },
  337. series: [{
  338. name: '访问来源',
  339. type: 'pie',
  340. radius: '70%',
  341. center: ['50%', '50%'],
  342. color: ['rgb(131,249,103)', '#FBFE27', '#FE5050', '#1DB7E5'], //'#FBFE27','rgb(11,228,96)','#FE5050'
  343. data: [{
  344. value: 15,
  345. name: '知识点1'
  346. },
  347. {
  348. value: 20,
  349. name: '知识点2'
  350. },
  351. {
  352. value: 30,
  353. name: '知识点3'
  354. },
  355. {
  356. value: 35,
  357. name: '知识点4'
  358. }
  359. ].sort(function (a, b) {
  360. return a.value - b.value
  361. }),
  362. roseType: 'radius',
  363. label: {
  364. normal: {
  365. formatter: ['{c|{c}分}', '{b|{b}}'].join('\n'),
  366. rich: {
  367. c: {
  368. color: '#fff',
  369. fontSize: 20,
  370. fontWeight: 'bold',
  371. lineHeight: 5
  372. },
  373. b: {
  374. color: 'rgb(98,137,169)',
  375. fontSize: 15,
  376. height: 40
  377. },
  378. },
  379. }
  380. },
  381. labelLine: {
  382. normal: {
  383. lineStyle: {
  384. color: 'rgb(98,137,169)',
  385. },
  386. smooth: 0.2,
  387. length: 10,
  388. length2: 20,
  389. }
  390. },
  391. itemStyle: {
  392. normal: {
  393. shadowColor: 'rgba(0, 0, 0, 0.8)',
  394. shadowBlur: 50,
  395. }
  396. }
  397. }]
  398. })
  399. },
  400. rowClassName(row, index) {
  401. if (index === 1) {
  402. return 'demo-table-info-row';
  403. } else if (index === 3) {
  404. return 'demo-table-error-row';
  405. }
  406. return '';
  407. }
  408. }
  409. }
  410. </script>
  411. <style>
  412. .ivu-select-single .ivu-select-selection .ivu-select-selected-value {
  413. border: 1px solid #d3d3d3 !important;
  414. border-radius: 7px;
  415. }
  416. .ivu-table .demo-table-info-row td {
  417. background-color: #2db7f5;
  418. color: #fff;
  419. }
  420. .ivu-table .demo-table-error-row td {
  421. background-color: #ff6600;
  422. color: #fff;
  423. }
  424. .ivu-table td.demo-table-info-column {
  425. background-color: #2db7f5;
  426. color: #fff;
  427. }
  428. .ivu-table .demo-table-info-cell-name {
  429. background-color: #2db7f5;
  430. color: #fff;
  431. }
  432. .ivu-table .demo-table-info-cell-age {
  433. background-color: #ff6600;
  434. color: #fff;
  435. }
  436. .ivu-table .demo-table-info-cell-address {
  437. background-color: #187;
  438. color: #fff;
  439. }
  440. </style>
  441. <style scoped>
  442. .report_container {
  443. width:100%;
  444. height:auto;
  445. }
  446. .report_box {
  447. width:1200px;
  448. height:auto;
  449. margin:0 auto;
  450. }
  451. .header_basic {
  452. width:100%;
  453. text-align:center;
  454. border-bottom:1px solid #ddd;
  455. margin-top:5px;
  456. padding:10px 0 20px
  457. }
  458. .header_basic ul {
  459. display:inline-block;
  460. margin-top:20px;
  461. }
  462. .header_basic ul li {
  463. padding:3px 4px 2px 4px;
  464. margin:0 15px;
  465. }
  466. .header_basic ul li i {
  467. float: left;
  468. margin-top: 4px;
  469. }
  470. .name {
  471. font-size: 18px;
  472. }
  473. .name_content {
  474. font-size: 20px;
  475. }
  476. .vice-name, .vice-name_content {
  477. font-size: 15px;color: #666;
  478. }
  479. .chooseexam {
  480. width:100%;
  481. height:auto;
  482. margin:60px 0 40px;
  483. }
  484. .exam {
  485. width:25%;
  486. float:left;
  487. padding-left:1%;
  488. margin-right: 30px;
  489. }
  490. .summarize {
  491. width: 96%;
  492. margin: 2%;
  493. /*border:1px solid #d3d3d3;*/
  494. background: #f5f5f5;
  495. padding:15px 20px 30px;
  496. border-radius:5px;
  497. }
  498. .summarize_header_title {
  499. font-size:22px;
  500. padding-top:10px;
  501. }
  502. .summarize_content {
  503. width:1000px;
  504. height:auto;
  505. margin:0 auto;
  506. }
  507. .summarize_content p {
  508. margin:10px 0;
  509. }
  510. .content_header {
  511. font-size: 16px;
  512. }
  513. .content_text {
  514. font-size: 14px;
  515. }
  516. .content_text span {
  517. font-size:16px;
  518. }
  519. .exam_color, .dot1 {
  520. color: #FF6633;
  521. }
  522. .number_color, .dot4 {
  523. color: #FF3366;
  524. }
  525. .dot2 {
  526. color: #0099CC;
  527. }
  528. .dot3 {
  529. color: #0000CC;
  530. }
  531. .trend, .structure {
  532. width: 100%;
  533. height: auto;
  534. padding: 1.5%;
  535. }
  536. .reportTit{
  537. font-size: 16px;
  538. font-weight: bold;
  539. margin:20px 0 10px;
  540. }
  541. .structure_details {
  542. width:100%;
  543. padding:1%;
  544. margin:20px 0;
  545. }
  546. </style>