workReport.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. <template>
  2. <view class="page-view">
  3. <top-return color="#FFF"></top-return>
  4. <!-- 背景 -->
  5. <view class="bg1"></view>
  6. <view class="flex-row">
  7. <view class="flex-column" style="margin: 120rpx 0 0 50rpx;">
  8. <view class="report-title">作业</view>
  9. <view class="report-title">分析报告</view>
  10. <view class="report-subtitle">{{workData[index].work.name}}</view>
  11. </view>
  12. <view class="detail-image" :style="{backgroundImage:`url(${image})`}"></view>
  13. </view>
  14. <view class="card-view">
  15. <view class="card-item">
  16. <view class="title-box">
  17. <view class="title-tag"></view>
  18. <view class="title">作业题详情</view>
  19. </view>
  20. <view class="table-container">
  21. <uni-table :loading="tableLoading">
  22. <!-- 表头行 -->
  23. <uni-tr>
  24. <uni-th width="46" align="center">题号</uni-th>
  25. <uni-th width="12" align="center">题型</uni-th>
  26. <!-- <uni-th>名次</uni-th> -->
  27. <uni-th width="25" align="center">作答</uni-th>
  28. <uni-th width="25" align="center">答案</uni-th>
  29. <uni-th width="25" align="center">更多</uni-th>
  30. </uni-tr>
  31. <uni-tr v-for="(item,index) in reportData.tableData" :key="index" v-if="index < showTableNum">
  32. <uni-td width="46" align="center">
  33. <view class="data">{{item.name}}</view>
  34. </uni-td>
  35. <uni-td width="12" align="center">
  36. <view class="subtitle">{{item.type}}</view>
  37. </uni-td>
  38. <uni-td width="25" align="center">
  39. <view v-if="item.answer != '详情'" class="data"
  40. :style="{color: item.answer === item.rightAnswer?'#23b46c':'#ff5959'}">
  41. {{item.answer}}
  42. </view>
  43. <view class="table-box" v-if="item.answer === '详情'">
  44. <view class="data" style="color: #4169E1">{{item.answer}}
  45. </view>
  46. <view class="t-icon t-icon-you"></view>
  47. </view>
  48. </uni-td>
  49. <uni-td width="25" align="center">
  50. <view v-if="item.rightAnswer != '详情'" class="data">
  51. {{item.rightAnswer}}
  52. </view>
  53. <view class="table-box" v-if="item.rightAnswer === '详情'">
  54. <view class="data" style="color: #4169E1">{{item.rightAnswer}}
  55. </view>
  56. <view class="t-icon t-icon-you"></view>
  57. </view>
  58. </uni-td>
  59. <uni-td width="25" align="center">
  60. <view class="table-box">
  61. <view class="data" style="color: #4169E1;">解析</view>
  62. <view class="t-icon t-icon-you"></view>
  63. </view>
  64. </uni-td>
  65. </uni-tr>
  66. </uni-table>
  67. </view>
  68. <view class="table-btn" v-if="reportData.tableData.length > showTableNum">
  69. <view class="btn-text" @click="showTableList">展开全部作业题</view>
  70. <u-icon name="arrow-down" color="#616367" @click="showTableList"></u-icon>
  71. </view>
  72. </view>
  73. <view class="card-item">
  74. <view class="title-box">
  75. <view class="title-tag"></view>
  76. <view class="title">知识点分析</view>
  77. <view class="subsection">
  78. <u-subsection :list="pointList" :current="pointCurrent" @change="changePoint"
  79. activeColor="#FFF">
  80. </u-subsection>
  81. </view>
  82. </view>
  83. <view class="chart-box" style="height: 700rpx;width: 100%;">
  84. <qiun-data-charts type="bar" ontouch="true" :chartData="reportData.pointChartData"
  85. :opts="{legend:{position: 'top',float:'left'},xAxis:{format:'xAxisBar'}}" />
  86. </view>
  87. <view class="point-analyse">
  88. <view class="flex-row">
  89. <view class="analyse-box1">
  90. <view class="analyse-title">知识点</view>
  91. </view>
  92. <view class="analyse-box2">
  93. <view class="analyse-subtitle">掌握程度</view>
  94. </view>
  95. </view>
  96. <view class="flex-row" v-for="(item,index) in reportData.pointData" :key="index">
  97. <view class="analyse-box1" style="background-color: #f3f4f9;">
  98. <view class="point-box">
  99. <view class="point-title" style="margin-left: 30rpx;">{{item.pointName}}</view>
  100. </view>
  101. </view>
  102. <view class="analyse-box2" style="background-color: #f3f4f9;">
  103. <view class="circle" :style="{backgroundColor: item.level === '优秀掌握'?'#23b46c': item.level === '部分掌握'? '#f9c752':'#FF6D31'}"></view>
  104. <view class="point-title">{{item.level}}</view>
  105. <u-icon name="arrow-right" color="#616367" size="15"></u-icon>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="cutting-line"></view>
  110. <view class="title-box">
  111. <view class="title-tag"></view>
  112. <view class="title">诊断分析</view>
  113. </view>
  114. <view class="analysis-box">
  115. <view class="subtitle">本次作业孩子在:</view>
  116. <view class="title" style="color: #ff5959;">[化学能与热能]、[反应速率与化学平衡]</view>
  117. <view class="subtitle">等知识点上的掌握低于班级平均水平,请重点加强练习。</view>
  118. </view>
  119. <view class="subtitle" style="margin:30rpx;font-size: 26rpx;">#结果由系统维度分析得出,仅供参考#</view>
  120. <view class="btn">
  121. <view class="btn-text">获取练习方案</view>
  122. </view>
  123. </view>
  124. <view class="card-item">
  125. <view class="title-box">
  126. <view class="title-tag"></view>
  127. <view class="title">作业分趋势</view>
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. </view>
  133. </template>
  134. <script>
  135. import {
  136. mapState
  137. } from 'vuex'
  138. export default {
  139. computed: {
  140. ...mapState('m_children', ['workData'])
  141. },
  142. data() {
  143. return {
  144. index: '',
  145. reportData: {
  146. tableData: [{
  147. name: '单选题01',
  148. type: '单选',
  149. answer: 'A',
  150. rightAnswer: 'A',
  151. }, {
  152. name: '单选题02',
  153. type: '单选',
  154. answer: 'B',
  155. rightAnswer: 'A',
  156. }, {
  157. name: '单选题03',
  158. type: '单选',
  159. answer: 'C',
  160. rightAnswer: 'C',
  161. }, {
  162. name: '单选题04',
  163. type: '单选',
  164. answer: 'A',
  165. rightAnswer: 'D',
  166. }, {
  167. name: '填空题01',
  168. type: '填空',
  169. answer: '123',
  170. rightAnswer: '321',
  171. }, {
  172. name: '填空题02',
  173. type: '填空',
  174. answer: '正确',
  175. rightAnswer: '错误',
  176. }, {
  177. name: '解答题01',
  178. type: '解答',
  179. answer: '详情',
  180. rightAnswer: '详情',
  181. }, {
  182. name: '解答题02',
  183. type: '解答',
  184. answer: '详情',
  185. rightAnswer: '详情',
  186. }],
  187. pointChartData: {
  188. "categories": ["文案居中", "知识点信息", "知识点信息", "知识点信息", "知识点信息", "知识点信息"],
  189. "series": [{
  190. "name": "个人得分率",
  191. "data": [80, 100, 55, 10, 100, 70]
  192. },
  193. {
  194. "name": "班级得分率",
  195. "data": [70, 90, 65, 50, 80, 50]
  196. }
  197. ]
  198. },
  199. pointData: [{
  200. pointName: '化学能与热能',
  201. level: '未掌握'
  202. },
  203. {
  204. pointName: '化学反应速率与化学平衡',
  205. level: '未掌握'
  206. },
  207. {
  208. pointName: '溶液中得离子平衡',
  209. level: '部分掌握'
  210. },
  211. {
  212. pointName: '化学能与电能',
  213. level: '部分掌握'
  214. },
  215. {
  216. pointName: '化学反应原理综合',
  217. level: '部分掌握'
  218. },
  219. {
  220. pointName: '原子结构与性质',
  221. level: '优秀掌握'
  222. },
  223. {
  224. pointName: '晶体结构与性质',
  225. level: '优秀掌握'
  226. }
  227. ]
  228. },
  229. showTableNum: 5,
  230. tableLoading: false,
  231. pointList: ['优势', '短板'],
  232. pointCurrent: 0,
  233. image: 'https://ouch-cdn2.icons8.com/L7XZ0sgjVoRcfTOPCIQaYDAjSFWSuLHiH__hrCVy_CQ/rs:fit:439:456/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9wbmcvNTM2/L2M3ZmQyOTdiLTgz/ODEtNGQzYy1hNzk1/LWY1MmY3ZWUyMjIw/YS5wbmc.png'
  234. };
  235. },
  236. onLoad(param) {
  237. this.index = param.index
  238. },
  239. methods: {
  240. showTableList() {
  241. this.showTableNum = this.reportData.tableData.length
  242. },
  243. changePoint(e) {
  244. this.pointCurrent = e
  245. }
  246. },
  247. }
  248. </script>
  249. <style lang="scss">
  250. @import 'data_pages.scss';
  251. @import 'top_info.scss';
  252. .bg1 {
  253. position: fixed;
  254. width: 100%;
  255. height: 1200rpx;
  256. background-size: 100%;
  257. background-repeat: no-repeat;
  258. background-image: linear-gradient(to top, #f3f4f9, #f9c752);
  259. }
  260. .detail-image {
  261. position: absolute;
  262. top: 140rpx;
  263. left: 430rpx;
  264. width: 330rpx;
  265. height: 360rpx;
  266. background-size: 100%; //背景图片自适应
  267. background-repeat: no-repeat;
  268. z-index: 50;
  269. }
  270. .card-item {
  271. width: 100%;
  272. .title-box {
  273. display: flex;
  274. align-items: center;
  275. padding: 20rpx 0;
  276. .title-tag {
  277. margin-left: -10rpx;
  278. margin-right: 20rpx;
  279. height: 100%;
  280. width: 20rpx;
  281. border-radius: 100rpx;
  282. background-color: #f9c752;
  283. z-index: 99;
  284. }
  285. .title {
  286. font-size: 35rpx;
  287. line-height: 50rpx;
  288. }
  289. .subsection {
  290. width: 300rpx;
  291. height: 100%;
  292. margin: 0 30rpx 0 auto;
  293. .u-subsection--button__bar {
  294. background-color: #f9c752 !important;
  295. }
  296. }
  297. }
  298. .table-container {
  299. margin-bottom: 20rpx;
  300. .uni-table-td {
  301. padding: 26rpx 10rpx !important;
  302. }
  303. .table-box {
  304. display: flex;
  305. align-items: center;
  306. justify-content: center;
  307. margin-right: -22rpx;
  308. }
  309. .data {
  310. line-height: 28rpx;
  311. font-size: 28rpx;
  312. font-weight: bold;
  313. color: $title;
  314. }
  315. .subtitle {
  316. line-height: 24rpx;
  317. font-size: 24rpx;
  318. font-weight: bold;
  319. color: $subtitle;
  320. }
  321. .t-icon {
  322. width: 30rpx;
  323. height: 30rpx;
  324. }
  325. }
  326. .table-btn {
  327. width: 100%;
  328. height: 50rpx;
  329. display: flex;
  330. align-items: center;
  331. justify-content: center;
  332. margin-bottom: 40rpx;
  333. .btn-text {
  334. font-size: 26rpx;
  335. font-weight: bold;
  336. color: #616367;
  337. margin-right: 10rpx;
  338. }
  339. }
  340. .point-analyse {
  341. margin: 0 20rpx 40rpx 20rpx;
  342. border-radius: $border-radius;
  343. display: flex;
  344. flex-direction: column;
  345. border-radius: $border-radius;
  346. overflow: hidden;
  347. .analyse-box1 {
  348. display: flex;
  349. align-items: center;
  350. justify-content: center;
  351. background-color: #f9c752;
  352. height: 80rpx;
  353. width: 70%;
  354. .point-box{
  355. display: flex;
  356. align-items: center;
  357. width: 100%;
  358. height: 100%;
  359. }
  360. .analyse-title {
  361. line-height: 32rpx;
  362. font-size: 32rpx;
  363. font-weight: bold;
  364. color: #FFF;
  365. }
  366. .point-title {
  367. line-height: 30rpx;
  368. font-size: 30rpx;
  369. font-weight: bold;
  370. color: #616367;
  371. }
  372. }
  373. .analyse-box2 {
  374. display: flex;
  375. align-items: center;
  376. justify-content: center;
  377. background-color: #f9edc6;
  378. height: 80rpx;
  379. width: 30%;
  380. .circle{
  381. height: 24rpx;
  382. width: 24rpx;
  383. border-radius: 50%;
  384. margin-right: 10rpx;
  385. }
  386. .analyse-subtitle {
  387. line-height: 32rpx;
  388. font-size: 32rpx;
  389. font-weight: bold;
  390. color: $title;
  391. }
  392. .point-title {
  393. line-height: 28rpx;
  394. font-size: 28rpx;
  395. font-weight: bold;
  396. color: #616367;
  397. }
  398. }
  399. }
  400. .cutting-line {
  401. margin: 0 50rpx 20rpx 50rpx;
  402. height: 1px;
  403. background-color: #e6e7eb;
  404. }
  405. .analysis-box {
  406. display: flex;
  407. flex-direction: column;
  408. margin: 10rpx 30rpx;
  409. .title {
  410. margin: 10rpx;
  411. line-height: 35rpx;
  412. font-size: 35rpx;
  413. color: $color-pink;
  414. }
  415. .subtitle {
  416. line-height: 30rpx;
  417. font-size: 30rpx;
  418. font-weight: 400;
  419. color: $title;
  420. }
  421. }
  422. .btn {
  423. display: flex;
  424. align-items: center;
  425. justify-content: center;
  426. height: 80rpx;
  427. margin: 0 30rpx 30rpx 30rpx;
  428. background-color: #f9c752;
  429. border-radius: $border-radius;
  430. box-shadow: $box-shadow;
  431. .btn-text {
  432. line-height: 38rpx;
  433. font-size: 38rpx;
  434. color: #FFF;
  435. font-family: YSfont;
  436. }
  437. }
  438. }
  439. </style>