reportadvanced.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801
  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="/teachCheck" style="color: #288add;"> < 返回 </a>
  7. <div class="header_basic">
  8. <br />
  9. <ul>
  10. <li><span class="vice-name">考试名称:</span><span class="vice-name_content">2019.03.07-在线检测</span></li>
  11. <li><span class="vice-name">考试类型:</span><span class="vice-name_content">区级联考</span></li>
  12. <li><span class="vice-name">考试总分:</span><span class="vice-name_content">460</span></li>
  13. <li><span class="vice-name">学习稳定系数:</span><span class="vice-name_content">0.6</span></li>
  14. </ul>
  15. </div>
  16. <div class="chooseexam">
  17. <div class="exam">
  18. <span>选择考试:</span>
  19. <Select v-model="model1" style="width:200px">
  20. <Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
  21. </Select>
  22. </div>
  23. <div class="subjects">
  24. <span>科目:</span>
  25. <Select v-model="model2" style="width:200px">
  26. <Option v-for="itemc in cityList1" :value="itemc.value" :key="itemc.value">{{ itemc.label }}</Option>
  27. </Select>
  28. </div>
  29. </div>
  30. <div class="summarize">
  31. <p class="summarize_header_title">总结:</p>
  32. <div class="summarize_content">
  33. <p class="content_text">你在本次<span class="exam_color">2019.03.07-在线检测</span>中,班级平均分为:<span class="number_color1">433.7</span>,年级平均分为:<span class="number_color2">467</span>,考试范围为:1-4章节。</p>
  34. <p class="content_text">本班在 <span class="dot1">知识点1、知识点2、知识点3</span> 处的题目都表现出色,全部都答对了。</p>
  35. <p class="content_text">本班在 <span class="dot2">知识点3、知识点4、知识点6 </span> 处的题目有待加强,部分答对了,其中<span class="dot3">知识点3-XXXX,知识点4-XXXX,知识点6-XXX</span> 需加强练习或复习。</p>
  36. <p class="content_text">本班在<span class="dot4">知识点7、知识点8、知识点9 </span> 处的题目表现较差,都答错了。建议将答错试题请教老师,重新学习知识点内容,也可进入补救题库,进行补救。</p>
  37. </div>
  38. </div>
  39. <div class="trend">
  40. <p class="reportTit">成绩分析趋势</p>
  41. <div id="zhexian" style="width:100%; height:400px;"></div>
  42. </div>
  43. <div class="structure">
  44. <p class="reportTit">知识点分数占比</p>
  45. <div id="zhishidian" style="width:100%; height:400px;"></div>
  46. </div>
  47. <div class="structure_details">
  48. <p class="reportTit">知识点掌握情况</p>
  49. <Table :columns="columns1" :data="data1"></Table>
  50. </div>
  51. <div class="pie_box">
  52. <div id="pie" style="width:100%; height:400px;"></div>
  53. </div>
  54. <div class="student_details">
  55. <p class="reportTit">全班学生情况</p>
  56. <Table :columns="columns2" :data="data2"></Table>
  57. </div>
  58. </div>
  59. <Footer></Footer>
  60. </div>
  61. </template>
  62. <script>
  63. import Header from '@/common/header.vue'
  64. import Master from '@/common/master.vue'
  65. import Footer from '@/common/footer.vue'
  66. export default {
  67. components: {
  68. Header,
  69. Master,
  70. Footer
  71. },
  72. data() {
  73. return {
  74. cityList: [
  75. {
  76. value: '2019.03.07-在线检测',
  77. label: '2019.03.07-在线检测'
  78. },
  79. {
  80. value: '2018.12.15-测试',
  81. label: '2018.12.15-测试'
  82. },
  83. {
  84. value: '2018.11.03-在线检测',
  85. label: '2018.11.03-在线检测'
  86. },
  87. {
  88. value: '2018.10.07-在线测试考',
  89. label: '2018.10.07-在线测试考'
  90. },
  91. ],
  92. model1: '2019.03.07-在线检测',
  93. cityList1: [
  94. {
  95. value: '语文',
  96. label: '语文'
  97. },
  98. {
  99. value: '数学',
  100. label: '数学'
  101. },
  102. {
  103. value: '英语',
  104. label: '英语'
  105. },
  106. {
  107. value: '物理',
  108. label: '物理'
  109. },
  110. ],
  111. model2: '数学',
  112. columns1: [
  113. {
  114. title: '知识点名称',
  115. key: 'name'
  116. },
  117. {
  118. title: '掌握情况',
  119. key: 'master'
  120. },
  121. {
  122. title: '难度系数',
  123. key: 'difficulty'
  124. },
  125. {
  126. title: '配分',
  127. key: 'score'
  128. },
  129. {
  130. title: '相关题目数',
  131. key: 'topic'
  132. },
  133. {
  134. title: '班级答对率',
  135. key: 'classaccuracy'
  136. },
  137. {
  138. title: '年级答对率',
  139. key: 'gradeaccuracy'
  140. },
  141. ],
  142. data1: [
  143. {
  144. name: '知识点1',
  145. master: '一般',
  146. difficulty: 0.6,
  147. score: 20,
  148. topic: '3/5',
  149. classaccuracy: '66%',
  150. gradeaccuracy:'67%',
  151. className: 'demo-table-info-column'
  152. },
  153. {
  154. name: '知识点2',
  155. master: '良好',
  156. difficulty: 0.4,
  157. score: 25,
  158. topic: '4/5',
  159. classaccuracy: '76%',
  160. gradeaccuracy: '72%',
  161. },
  162. {
  163. name: '知识点3',
  164. master: '差',
  165. difficulty: 0.5,
  166. score: 15,
  167. topic: '0/3',
  168. classaccuracy: '77%',
  169. gradeaccuracy: '79%',
  170. },
  171. {
  172. name: '知识点4',
  173. master: '差',
  174. difficulty: 0.7,
  175. score: 10,
  176. topic: '0/2',
  177. classaccuracy: '68%',
  178. gradeaccuracy: '48%',
  179. },
  180. {
  181. name: '知识点5',
  182. master: '优秀',
  183. difficulty: 0.6,
  184. score: 30,
  185. topic: '4/4',
  186. classaccuracy: '90%',
  187. gradeaccuracy: '95%',
  188. },
  189. ],
  190. columns2: [
  191. {
  192. title: '姓名',
  193. key: 'name'
  194. },
  195. {
  196. title: '学号',
  197. key: 'studennum'
  198. },
  199. {
  200. title: '排名',
  201. key: 'paiming'
  202. },
  203. {
  204. title: '分数',
  205. key: 'fenshu'
  206. },
  207. {
  208. title: '已超过班级百分比',
  209. key: 'chaoguo'
  210. },
  211. ],
  212. data2: [
  213. {
  214. name: '周宇鑫',
  215. studennum: '2018001001',
  216. paiming: '1',
  217. fenshu: '98',
  218. chaoguo:'99%'
  219. },
  220. {
  221. name: '李明悦',
  222. studennum: '2018001001',
  223. paiming: '2',
  224. fenshu: '96',
  225. chaoguo: '98%'
  226. },
  227. {
  228. name: '刘佳乐',
  229. studennum: '2018001001',
  230. paiming: '3',
  231. fenshu: '95',
  232. chaoguo: '97%'
  233. },
  234. {
  235. name: '王启航',
  236. studennum: '2018001001',
  237. paiming: '4',
  238. fenshu: '92',
  239. chaoguo: '96%'
  240. },
  241. {
  242. name: '王心怡',
  243. studennum: '2018001001',
  244. paiming: '5',
  245. fenshu: '90',
  246. chaoguo: '95%'
  247. },
  248. {
  249. name: '王程弈',
  250. studennum: '2018001001',
  251. paiming: '6',
  252. fenshu: '90',
  253. chaoguo: '95.5%'
  254. },
  255. {
  256. name: '郭文俊',
  257. studennum: '2018001001',
  258. paiming: '7',
  259. fenshu: '86',
  260. chaoguo: '94%'
  261. },
  262. {
  263. name: '刘玉婷',
  264. studennum: '2018001001',
  265. paiming: '8',
  266. fenshu: '85',
  267. chaoguo: '93%'
  268. },
  269. {
  270. name: '司文涛',
  271. studennum: '2018001001',
  272. paiming: '9',
  273. fenshu: '83',
  274. chaoguo: '92%'
  275. },
  276. {
  277. name: '周军',
  278. studennum: '2018001001',
  279. paiming: '10',
  280. fenshu: '81',
  281. chaoguo: '91%'
  282. },
  283. {
  284. name: '赵志杰',
  285. studennum: '2018001001',
  286. paiming: '11',
  287. fenshu: '79',
  288. chaoguo: '90%'
  289. },
  290. ],
  291. }
  292. },
  293. mounted() {
  294. this.drawLine();
  295. this.graph();
  296. this.pie();
  297. },
  298. methods: {
  299. drawLine() {
  300. let myChart = this.$echarts.init(document.getElementById('zhexian'));
  301. var xData = function () {
  302. var data = [];
  303. for (var i = 1; i < 15; i++) {
  304. data.push(i + "");
  305. }
  306. return data;
  307. }();
  308. myChart.setOption({
  309. backgroundColor: "#344b58",
  310. "tooltip": {
  311. "trigger": "axis",
  312. "axisPointer": {
  313. "type": "shadow",
  314. textStyle: {
  315. color: "#fff"
  316. }
  317. },
  318. },
  319. "grid": {
  320. "borderWidth": 0,
  321. "top": 100,
  322. "bottom": 35,
  323. "right":30,
  324. textStyle: {
  325. color: "#fff"
  326. }
  327. },
  328. "legend": {
  329. x: '4%',
  330. top: '11%',
  331. textStyle: {
  332. color: '#90979c',
  333. },
  334. "data": ['班级平均分','班级趋势',,'年级平均分']
  335. },
  336. "calculable": true,
  337. "xAxis": [{
  338. "type": "category",
  339. "axisLine": {
  340. lineStyle: {
  341. color: '#90979c'
  342. }
  343. },
  344. "splitLine": {
  345. "show": false
  346. },
  347. "axisTick": {
  348. "show": false
  349. },
  350. "splitArea": {
  351. "show": false
  352. },
  353. "axisLabel": {
  354. "interval": 0,
  355. },
  356. "data": ["在线检测(2019.03.07)", "在线检测(2019.01.13)", "在线检测(2018.12.20)", "在线检测(2018.12.03)", "在线检测(2018.11.15)"],
  357. }],
  358. "yAxis": [{
  359. "type": "value",
  360. "splitLine": {
  361. "show": false
  362. },
  363. "axisLine": {
  364. lineStyle: {
  365. color: '#90979c'
  366. }
  367. },
  368. "axisTick": {
  369. "show": false
  370. },
  371. "axisLabel": {
  372. "interval": 0,
  373. },
  374. "splitArea": {
  375. "show": false
  376. },
  377. }],
  378. "series": [
  379. {
  380. "name": "班级平均分",
  381. "type": "bar",
  382. symbolSize: 5,
  383. barMaxWidth: 30,//最大宽度
  384. symbol: 'circle',
  385. "itemStyle": {
  386. "normal": {
  387. "color": "rgba(127,255,212,1)",
  388. "barBorderRadius": 0,
  389. "label": {
  390. "show": true,
  391. "position": "top",
  392. formatter: function (p) {
  393. return p.value > 0 ? (p.value) : '';
  394. }
  395. }
  396. }
  397. },
  398. "data": [80, 82, 86, 80, 78, 83],
  399. },
  400. {
  401. "name": "班级趋势",
  402. "type": "line",
  403. "stack": "总量",
  404. "barMaxWidth": 5,
  405. "barGap": "10%",
  406. "itemStyle": {
  407. "normal": {
  408. "color": "rgba(255,144,128,1)",
  409. "label": {
  410. "show": true,
  411. "textStyle": {
  412. "color": "#fff"
  413. },
  414. "position": "insideTop",
  415. formatter: function (p) {
  416. return p.value > 0 ? (p.value) : '';
  417. }
  418. }
  419. }
  420. },
  421. "data": [76,83,93,90,68,83],
  422. },
  423. {
  424. "name": "年级平均分",
  425. "type": "line",
  426. symbolSize: 10,
  427. symbol: 'circle',
  428. "itemStyle": {
  429. "normal": {
  430. "color": "rgba(30,144,255,1)",
  431. "barBorderRadius": 0,
  432. "label": {
  433. "show": true,
  434. "position": "top",
  435. formatter: function (p) {
  436. return p.value > 0 ? (p.value) : '';
  437. }
  438. }
  439. }
  440. },
  441. "data": [76, 72, 76, 80, 79, 77],
  442. },
  443. ]
  444. })
  445. },
  446. graph() {
  447. let myCharts = this.$echarts.init(document.getElementById('zhishidian'));
  448. myCharts.setOption({
  449. backgroundColor: "#344b58",
  450. title: {
  451. text: '知识点分数占比',
  452. left: 'center',
  453. top: 20,
  454. textStyle: {
  455. color: '#fff'
  456. }
  457. },
  458. tooltip: {
  459. trigger: 'item',
  460. formatter: "{b} : {c} ({d}%)"
  461. },
  462. visualMap: {
  463. show: false,
  464. min: 0,
  465. max: 100,
  466. inRange: {
  467. //colorLightness: [0, 1]
  468. }
  469. },
  470. series: [{
  471. name: '访问来源',
  472. type: 'pie',
  473. radius: '70%',
  474. center: ['50%', '50%'],
  475. color: ['rgb(131,249,103)', '#FBFE27', '#FE5050', '#1DB7E5'], //'#FBFE27','rgb(11,228,96)','#FE5050'
  476. data: [{
  477. value: 15,
  478. name: '知识点1'
  479. },
  480. {
  481. value: 20,
  482. name: '知识点2'
  483. },
  484. {
  485. value: 30,
  486. name: '知识点3'
  487. },
  488. {
  489. value: 35,
  490. name: '知识点4'
  491. }
  492. ].sort(function (a, b) {
  493. return a.value - b.value
  494. }),
  495. roseType: 'radius',
  496. label: {
  497. normal: {
  498. formatter: ['{c|{c}分}', '{b|{b}}'].join('\n'),
  499. rich: {
  500. c: {
  501. color: '#fff',
  502. fontSize: 20,
  503. fontWeight: 'bold',
  504. lineHeight: 5
  505. },
  506. b: {
  507. color: 'rgb(98,137,169)',
  508. fontSize: 15,
  509. height: 40
  510. },
  511. },
  512. }
  513. },
  514. labelLine: {
  515. normal: {
  516. lineStyle: {
  517. color: 'rgb(98,137,169)',
  518. },
  519. smooth: 0.2,
  520. length: 10,
  521. length2: 20,
  522. }
  523. },
  524. itemStyle: {
  525. normal: {
  526. shadowColor: 'rgba(0, 0, 0, 0.8)',
  527. shadowBlur: 50,
  528. }
  529. }
  530. }]
  531. })
  532. },
  533. pie() {
  534. let myChartc = this.$echarts.init(document.getElementById('pie'));
  535. myChartc.setOption({
  536. backgroundColor: "#344b58",
  537. title: {
  538. text: '雷达图'
  539. },
  540. tooltip: {},
  541. legend: {
  542. top: 20,
  543. itemWidth: 12,
  544. itemHeight: 12,
  545. textStyle: {
  546. color: '#fff'
  547. }
  548. },
  549. radar: {
  550. radius: '60%',
  551. splitNumber: 8,
  552. axisLine: {
  553. lineStyle: {
  554. color: '#fff',
  555. opacity: .2
  556. }
  557. },
  558. splitLine: {
  559. lineStyle: {
  560. color: '#fff',
  561. opacity: .2
  562. }
  563. },
  564. splitArea: {
  565. areaStyle: {
  566. color: 'rgba(127,95,132,.3)',
  567. opacity: 1,
  568. shadowBlur: 45,
  569. shadowColor: 'rgba(0,0,0,.5)',
  570. shadowOffsetX: 0,
  571. shadowOffsetY: 15,
  572. }
  573. },
  574. indicator: [{
  575. name: '选择题',
  576. max: 100
  577. }, {
  578. name: '填空题',
  579. max: 100
  580. }, {
  581. name: '文言文',
  582. max: 100
  583. }, {
  584. name: '阅读理解',
  585. max: 100
  586. }, {
  587. name: '古诗词',
  588. max: 100
  589. }, {
  590. name: '作文',
  591. max: 100
  592. }]
  593. },
  594. series: [{
  595. name: '',
  596. type: 'radar',
  597. symbolSize: 0,
  598. areaStyle: {
  599. normal: {
  600. shadowBlur: 13,
  601. shadowColor: 'rgba(0,0,0,.2)',
  602. shadowOffsetX: 0,
  603. shadowOffsetY: 10,
  604. opacity: 1
  605. }
  606. },
  607. data: [{
  608. value: [70, 80, 65, 70, 60, 85],
  609. name: '',
  610. },]
  611. }],
  612. color: ['#ef4b4c', '#b1eadb'],
  613. backgroundColor: {
  614. type: 'radial',
  615. x: 0.4,
  616. y: 0.4,
  617. r: 0.35,
  618. colorStops: [{
  619. offset: 0,
  620. color: '#895355' // 0% 处的颜色
  621. }, {
  622. offset: .4,
  623. color: '#593640' // 100% 处的颜色
  624. }, {
  625. offset: 1,
  626. color: '#39273d' // 100% 处的颜色
  627. }],
  628. globalCoord: false // 缺省为 false
  629. }
  630. })
  631. },
  632. rowClassName(row, index) {
  633. if (index === 1) {
  634. return 'demo-table-info-row';
  635. } else if (index === 3) {
  636. return 'demo-table-error-row';
  637. }
  638. return '';
  639. }
  640. }
  641. }
  642. </script>
  643. <style>
  644. .ivu-select-single .ivu-select-selection .ivu-select-selected-value {
  645. border: 1px solid #d3d3d3 !important;
  646. border-radius: 7px;
  647. }
  648. .ivu-table .demo-table-info-row td {
  649. background-color: #2db7f5;
  650. color: #fff;
  651. }
  652. .ivu-table .demo-table-error-row td {
  653. background-color: #ff6600;
  654. color: #fff;
  655. }
  656. .ivu-table td.demo-table-info-column {
  657. background-color: #2db7f5;
  658. color: #fff;
  659. }
  660. .ivu-table .demo-table-info-cell-name {
  661. background-color: #2db7f5;
  662. color: #fff;
  663. }
  664. .ivu-table .demo-table-info-cell-age {
  665. background-color: #ff6600;
  666. color: #fff;
  667. }
  668. .ivu-table .demo-table-info-cell-address {
  669. background-color: #187;
  670. color: #fff;
  671. }
  672. </style>
  673. <style scoped>
  674. .report_container {
  675. width:100%;
  676. height:auto;
  677. }
  678. .report_box {
  679. width:1200px;
  680. height:auto;
  681. margin:0 auto;
  682. }
  683. .header_basic {
  684. width:100%;
  685. text-align:center;
  686. border-bottom:1px solid #ddd;
  687. margin-top:5px;
  688. padding:10px 0 20px
  689. }
  690. .header_basic ul {
  691. display:inline-block;
  692. margin-top:20px;
  693. }
  694. .header_basic ul li {
  695. padding:3px 4px 2px 4px;
  696. margin:0 15px;
  697. }
  698. .header_basic ul li i {
  699. float: left;
  700. margin-top: 4px;
  701. }
  702. .name {
  703. font-size: 18px;
  704. }
  705. .name_content {
  706. font-size: 20px;
  707. }
  708. .vice-name, .vice-name_content {
  709. font-size: 15px;color: #666;
  710. }
  711. .chooseexam {
  712. width:100%;
  713. height:auto;
  714. margin:60px 0 40px;
  715. }
  716. .exam {
  717. width:25%;
  718. float:left;
  719. padding-left:1%;
  720. margin-right: 30px;
  721. }
  722. .summarize {
  723. width: 96%;
  724. margin: 2%;
  725. /*border:1px solid #d3d3d3;*/
  726. background: #f5f5f5;
  727. padding:15px 20px 30px;
  728. border-radius:5px;
  729. }
  730. .summarize_header_title {
  731. font-size:22px;
  732. padding-top:10px;
  733. }
  734. .summarize_content {
  735. width:1000px;
  736. height:auto;
  737. margin:0 auto;
  738. }
  739. .summarize_content p {
  740. margin:10px 0;
  741. }
  742. .content_header {
  743. font-size: 16px;
  744. }
  745. .content_text {
  746. font-size: 14px;
  747. }
  748. .content_text span {
  749. font-size:16px;
  750. }
  751. .exam_color, .dot1 {
  752. color: #FF6633;
  753. }
  754. .number_color, .dot4 {
  755. color: #FF3366;
  756. }
  757. .number_color1 {
  758. color: #4876FF
  759. }
  760. .number_color2 {
  761. color: #76EE00
  762. }
  763. .dot2 {
  764. color: #0099CC;
  765. }
  766. .dot3 {
  767. color: #0000CC;
  768. }
  769. .trend, .structure {
  770. width: 100%;
  771. height: auto;
  772. padding: 1.5%;
  773. }
  774. .reportTit{
  775. font-size: 16px;
  776. font-weight: bold;
  777. margin:20px 0 10px;
  778. }
  779. .structure_details {
  780. width:100%;
  781. padding:1%;
  782. margin:20px 0;
  783. }
  784. </style>