123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417 |
- <template>
- <view class="page-view">
- <top-return color="#FFF"></top-return>
- <!-- 背景 -->
- <view class="bg1"></view>
- <view class="flex-row">
- <view class="flex-column" style="margin: 120rpx 0 0 50rpx;">
- <view class="report-title">作业</view>
- <view class="report-title">分析报告</view>
- <view class="report-subtitle">{{workData[index].work.name}}</view>
- </view>
- <view class="detail-image" :style="{backgroundImage:`url(${image})`}"></view>
- </view>
- <view class="card-view">
- <view class="card-item">
- <view class="title-box">
- <view class="title-tag"></view>
- <view class="title">作业题详情</view>
- </view>
- <view class="table-container">
- <uni-table :loading="tableLoading">
- <!-- 表头行 -->
- <uni-tr>
- <uni-th width="46" align="center">题号</uni-th>
- <uni-th width="12" align="center">题型</uni-th>
- <!-- <uni-th>名次</uni-th> -->
- <uni-th width="25" align="center">作答</uni-th>
- <uni-th width="25" align="center">答案</uni-th>
- <uni-th width="25" align="center">更多</uni-th>
- </uni-tr>
- <uni-tr v-for="(item,index) in reportData.tableData" :key="index" v-if="index < showTableNum">
- <uni-td width="46" align="center">
- <view class="data">{{item.name}}</view>
- </uni-td>
- <uni-td width="12" align="center">
- <view class="subtitle">{{item.type}}</view>
- </uni-td>
- <uni-td width="25" align="center">
- <view v-if="item.answer != '详情'" class="data"
- :style="{color: item.answer === item.rightAnswer?'#23b46c':'#ff5959'}">
- {{item.answer}}
- </view>
- <view class="table-box" v-if="item.answer === '详情'">
- <view class="data" style="color: #4169E1">{{item.answer}}
- </view>
- <view class="t-icon t-icon-you"></view>
- </view>
- </uni-td>
- <uni-td width="25" align="center">
- <view v-if="item.rightAnswer != '详情'" class="data">
- {{item.rightAnswer}}
- </view>
- <view class="table-box" v-if="item.rightAnswer === '详情'">
- <view class="data" style="color: #4169E1">{{item.rightAnswer}}
- </view>
- <view class="t-icon t-icon-you"></view>
- </view>
- </uni-td>
- <uni-td width="25" align="center">
- <view class="table-box">
- <view class="data" style="color: #4169E1;">解析</view>
- <view class="t-icon t-icon-you"></view>
- </view>
- </uni-td>
- </uni-tr>
- </uni-table>
- </view>
- <view class="table-btn" v-if="reportData.tableData.length > showTableNum">
- <view class="btn-text" @click="showTableList">展开全部作业题</view>
- <u-icon name="arrow-down" color="#616367" @click="showTableList"></u-icon>
- </view>
- </view>
- <view class="card-item">
- <view class="title-box">
- <view class="title-tag"></view>
- <view class="title">知识点分析</view>
- <view class="subsection">
- <u-subsection :list="pointList" :current="pointCurrent" @change="changePoint"
- activeColor="#FFF">
- </u-subsection>
- </view>
- </view>
- <view class="chart-box" style="height: 700rpx;width: 100%;">
- <qiun-data-charts type="bar" ontouch="true" :chartData="reportData.pointChartData"
- :opts="{legend:{position: 'top',float:'left'},xAxis:{format:'xAxisBar'}}" />
- </view>
- <view class="point-analyse">
- <view class="flex-row">
- <view class="analyse-box1">
- <view class="analyse-title">知识点</view>
- </view>
- <view class="analyse-box2">
- <view class="analyse-subtitle">掌握程度</view>
- </view>
- </view>
- <view class="flex-row" v-for="(item,index) in reportData.pointData" :key="index">
- <view class="analyse-box1" style="background-color: #f3f4f9;">
- <view class="point-box">
- <view class="point-title" style="margin-left: 30rpx;">{{item.pointName}}</view>
- </view>
- </view>
- <view class="analyse-box2" style="background-color: #f3f4f9;">
- <view class="circle" :style="{backgroundColor: item.level === '优秀掌握'?'#23b46c': item.level === '部分掌握'? '#f9c752':'#FF6D31'}"></view>
- <view class="point-title">{{item.level}}</view>
- <u-icon name="arrow-right" color="#616367" size="15"></u-icon>
- </view>
- </view>
- </view>
- </view>
- <view class="card-item">
- <view class="title-box">
- <view class="title-tag"></view>
- <view class="title">作业分趋势</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex'
- export default {
- computed: {
- ...mapState('m_children', ['workData'])
- },
- data() {
- return {
- index: '',
- reportData: {
- tableData: [{
- name: '单选题01',
- type: '单选',
- answer: 'A',
- rightAnswer: 'A',
- }, {
- name: '单选题02',
- type: '单选',
- answer: 'B',
- rightAnswer: 'A',
- }, {
- name: '单选题03',
- type: '单选',
- answer: 'C',
- rightAnswer: 'C',
- }, {
- name: '单选题04',
- type: '单选',
- answer: 'A',
- rightAnswer: 'D',
- }, {
- name: '填空题01',
- type: '填空',
- answer: '123',
- rightAnswer: '321',
- }, {
- name: '填空题02',
- type: '填空',
- answer: '正确',
- rightAnswer: '错误',
- }, {
- name: '解答题01',
- type: '解答',
- answer: '详情',
- rightAnswer: '详情',
- }, {
- name: '解答题02',
- type: '解答',
- answer: '详情',
- rightAnswer: '详情',
- }],
- pointChartData: {
- "categories": ["文案居中", "知识点信息", "知识点信息", "知识点信息", "知识点信息", "知识点信息"],
- "series": [{
- "name": "个人得分率",
- "data": [80, 100, 55, 10, 100, 70]
- },
- {
- "name": "班级得分率",
- "data": [70, 90, 65, 50, 80, 50]
- }
- ]
- },
- pointData: [{
- pointName: '化学能与热能',
- level: '未掌握'
- },
- {
- pointName: '化学反应速率与化学平衡',
- level: '未掌握'
- },
- {
- pointName: '溶液中得离子平衡',
- level: '部分掌握'
- },
- {
- pointName: '化学能与电能',
- level: '部分掌握'
- },
- {
- pointName: '化学反应原理综合',
- level: '部分掌握'
- },
- {
- pointName: '原子结构与性质',
- level: '优秀掌握'
- },
- {
- pointName: '晶体结构与性质',
- level: '优秀掌握'
- }
- ]
- },
- showTableNum: 5,
- tableLoading: false,
- pointList: ['优势', '短板'],
- pointCurrent: 0,
- image: 'https://ouch-cdn2.icons8.com/L7XZ0sgjVoRcfTOPCIQaYDAjSFWSuLHiH__hrCVy_CQ/rs:fit:439:456/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9wbmcvNTM2/L2M3ZmQyOTdiLTgz/ODEtNGQzYy1hNzk1/LWY1MmY3ZWUyMjIw/YS5wbmc.png'
- };
- },
- onLoad(param) {
- this.index = param.index
- },
- methods: {
- showTableList() {
- this.showTableNum = this.reportData.tableData.length
- },
- changePoint(e) {
- this.pointCurrent = e
- }
- },
- }
- </script>
- <style lang="scss">
- @import 'data_pages.scss';
- @import 'top_info.scss';
- .bg1 {
- position: fixed;
- width: 100%;
- height: 1200rpx;
- background-size: 100%;
- background-repeat: no-repeat;
- background-image: linear-gradient(to top, #f3f4f9, #f9c752);
- }
- .detail-image {
- position: absolute;
- top: 140rpx;
- left: 430rpx;
- width: 330rpx;
- height: 360rpx;
- background-size: 100%; //背景图片自适应
- background-repeat: no-repeat;
- z-index: 50;
- }
- .card-item {
- width: 100%;
- .title-box {
- display: flex;
- align-items: center;
- padding: 20rpx 0;
- .title-tag {
- margin-left: -10rpx;
- margin-right: 20rpx;
- height: 100%;
- width: 20rpx;
- border-radius: 100rpx;
- background-color: #f9c752;
- z-index: 99;
- }
- .title {
- font-size: 35rpx;
- line-height: 50rpx;
- }
- .subsection {
- width: 300rpx;
- height: 100%;
- margin: 0 30rpx 0 auto;
- .u-subsection--button__bar {
- background-color: #f9c752 !important;
- }
- }
- }
- .table-container {
- margin-bottom: 20rpx;
- .uni-table-td {
- padding: 26rpx 10rpx !important;
- }
- .table-box {
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: -22rpx;
- }
- .data {
- line-height: 28rpx;
- font-size: 28rpx;
- font-weight: bold;
- color: $title;
- }
- .subtitle {
- line-height: 24rpx;
- font-size: 24rpx;
- font-weight: bold;
- color: $subtitle;
- }
- .t-icon {
- width: 30rpx;
- height: 30rpx;
- }
- }
- .table-btn {
- width: 100%;
- height: 50rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 40rpx;
- .btn-text {
- font-size: 26rpx;
- font-weight: bold;
- color: #616367;
- margin-right: 10rpx;
- }
- }
- .point-analyse {
- margin: 0 20rpx 20rpx 20rpx;
- border-radius: $border-radius;
- display: flex;
- flex-direction: column;
- border-radius: $border-radius;
- overflow: hidden;
- .analyse-box1 {
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: #f9c752;
- height: 80rpx;
- width: 70%;
- .point-box{
- display: flex;
- align-items: center;
- width: 100%;
- height: 100%;
- }
- .analyse-title {
- line-height: 32rpx;
- font-size: 32rpx;
- font-weight: bold;
- color: #FFF;
- }
- .point-title {
- line-height: 30rpx;
- font-size: 30rpx;
- font-weight: bold;
- color: #616367;
- }
- }
- .analyse-box2 {
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: #f9edc6;
- height: 80rpx;
- width: 30%;
- .circle{
- height: 24rpx;
- width: 24rpx;
- border-radius: 50%;
- margin-right: 10rpx;
- }
- .analyse-subtitle {
- line-height: 32rpx;
- font-size: 32rpx;
- font-weight: bold;
- color: $title;
- }
- .point-title {
- line-height: 28rpx;
- font-size: 28rpx;
- font-weight: bold;
- color: #616367;
- }
- }
- }
- }
- </style>
|