workReport.vue 12 KB

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