练习-联调
This commit is contained in:
parent
cca07aa193
commit
f7b913a5cf
|
|
@ -152,3 +152,21 @@ export function updateRemoveRecordData(params) {
|
|||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 学习项目-列表 /personalCenter/getStudentStudyWorkList
|
||||
export function getStudentStudyWorkList(params) {
|
||||
return request({
|
||||
url: '/personalCenter/getStudentStudyWorkList',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 学习项目-目录 /studyWork/StudyWorkAll
|
||||
export function studyWorkAll(params) {
|
||||
return request({
|
||||
url: '/studyWork/StudyWorkAll',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
|
@ -3,6 +3,9 @@ module.exports = {
|
|||
// baseUrl:'/prod-api',
|
||||
// baseUrl:'http://112.29.103.165:1616/ynuw',
|
||||
baseUrl:'http://192.168.0.137:2900/exam-student',
|
||||
// baseUrl:'http://192.168.0.137:2911/exam-bmw',
|
||||
// 图片展示基础地址
|
||||
imgUrl:'http://192.168.0.137:2900/exam-file',
|
||||
// 上传文件地址
|
||||
uploadUrl: 'http://192.168.0.137:2909/exam-file/file/uploadBase64',
|
||||
bmwUrl: 'http://192.168.0.137:2911/exam-bmw',
|
||||
|
|
|
|||
|
|
@ -1,66 +1,64 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<view class="page">
|
||||
<u-navbar title="学习项目" @leftClick="leftClick" placeholder />
|
||||
<view class="status-secs">
|
||||
<view
|
||||
v-for="(item, index) in statusList"
|
||||
:key="item.id"
|
||||
:class="[ { active: totalStatus.statusCount === item.id } ]"
|
||||
:class="[{ active: totalStatus.statusCount === item.id }]"
|
||||
@click="chooseStatus(item.id)"
|
||||
>
|
||||
{{ item.text }}
|
||||
</view>
|
||||
</view>
|
||||
<uni-easyinput
|
||||
prefixIcon="search"
|
||||
v-model="totalStatus.keyword"
|
||||
placeholder="请输入项目名称"
|
||||
@iconClick="toggleSearch"
|
||||
prefixIcon="search"
|
||||
v-model="totalStatus.keyword"
|
||||
placeholder="请输入项目名称"
|
||||
@iconClick="toggleSearch"
|
||||
></uni-easyinput>
|
||||
<zb-dropdown-menu style="width: 100%">
|
||||
<zb-dropdown-menu style="width: 100%">
|
||||
<zb-dropdown-item
|
||||
name="first"
|
||||
:options="learnTypeRange"
|
||||
v-model="totalStatus.learnType"
|
||||
@change="statusChange"
|
||||
name="first"
|
||||
:options="learnTypeRange"
|
||||
v-model="totalStatus.learnType"
|
||||
@change="statusChange"
|
||||
></zb-dropdown-item>
|
||||
<zb-dropdown-item
|
||||
name="two"
|
||||
:options="outDateStatusRange"
|
||||
v-model="totalStatus.outDateStatus"
|
||||
@change="statusChange"
|
||||
name="two"
|
||||
:options="outDateStatusRange"
|
||||
v-model="totalStatus.outDateStatus"
|
||||
@change="statusChange"
|
||||
></zb-dropdown-item>
|
||||
<zb-dropdown-item
|
||||
name="three"
|
||||
:options="qualStatusRange"
|
||||
v-model="totalStatus.qualStatus"
|
||||
@change="statusChange"
|
||||
name="three"
|
||||
:options="qualStatusRange"
|
||||
v-model="totalStatus.qualStatus"
|
||||
@change="statusChange"
|
||||
></zb-dropdown-item>
|
||||
<zb-dropdown-item
|
||||
name="four"
|
||||
:options="signupStatusRange"
|
||||
v-model="totalStatus.signupStatus"
|
||||
@change="statusChange"
|
||||
name="four"
|
||||
:options="signupStatusRange"
|
||||
v-model="totalStatus.signupStatus"
|
||||
@change="statusChange"
|
||||
></zb-dropdown-item>
|
||||
</zb-dropdown-menu>
|
||||
<view class="project-cont">
|
||||
<view
|
||||
v-for="(item, index) in projList"
|
||||
:key="item.id"
|
||||
class="single-proj"
|
||||
@click="toggleDetail(item.id)"
|
||||
>
|
||||
<view v-for="(item, index) in projList" :key="item.id" class="single-proj" @click="toggleDetail(item.id)">
|
||||
<h4 class="img">
|
||||
<image :src="item.img"></image>
|
||||
<image src="https://cdn.uviewui.com/uview/swiper/1.jpg"></image>
|
||||
</h4>
|
||||
<view class="proj-detail">
|
||||
<view class="detail-upper">
|
||||
<h5 style="font-size: 16px">{{ item.title }}</h5>
|
||||
<h5 style="font-size: 16px">{{ item.name }}</h5>
|
||||
<l-starRate v-model="item.star" :disabled="true"></l-starRate>
|
||||
<view class="icons">
|
||||
<uni-icons color="#c0c0c0" type="eye-filled"></uni-icons><span>3</span>
|
||||
<uni-icons color="#c0c0c0" type="chat-filled" style="margin-left: 5rpx"></uni-icons><span>3</span>
|
||||
<uni-icons color="#c0c0c0" type="hand-up-filled" style="margin-left: 5rpx"></uni-icons><span>3</span>
|
||||
<uni-icons color="#c0c0c0" type="eye-filled"></uni-icons>
|
||||
<span>3</span>
|
||||
<uni-icons color="#c0c0c0" type="chat-filled" style="margin-left: 5rpx"></uni-icons>
|
||||
<span>3</span>
|
||||
<uni-icons color="#c0c0c0" type="hand-up-filled" style="margin-left: 5rpx"></uni-icons>
|
||||
<span>3</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail-lower">
|
||||
|
|
@ -71,11 +69,11 @@
|
|||
<span>{{ item.user }}</span>
|
||||
<view class="bar">
|
||||
<liu-progressbar
|
||||
:progress="item.percent"
|
||||
color="#000"
|
||||
:height="'10rpx'"
|
||||
bgColor="#1989FA"
|
||||
:textInside="false"
|
||||
:progress="item.percent"
|
||||
color="#000"
|
||||
:height="'10rpx'"
|
||||
bgColor="#1989FA"
|
||||
:textInside="false"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -87,298 +85,273 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusList: [
|
||||
{ text: '全部', id: 0 },
|
||||
{ text: '已完成', id: 1 },
|
||||
{ text: '未完成', id: 2 },
|
||||
],
|
||||
// 参数状态
|
||||
totalStatus: {
|
||||
statusCount: 0,
|
||||
keyword: '',
|
||||
learnType: '',
|
||||
outDateStatus: '',
|
||||
qualStatus: '',
|
||||
signupStatus: ''
|
||||
import { getStudentStudyWorkList } from '@/api/eduApp'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusList: [
|
||||
{ text: '全部', id: 0 },
|
||||
{ text: '已完成', id: 1 },
|
||||
{ text: '未完成', id: 2 }
|
||||
],
|
||||
// 参数状态
|
||||
totalStatus: {
|
||||
statusCount: 0,
|
||||
keyword: '',
|
||||
learnType: '',
|
||||
outDateStatus: '',
|
||||
qualStatus: '',
|
||||
signupStatus: ''
|
||||
},
|
||||
// 状态选项
|
||||
learnTypeRange: [
|
||||
{ text: '学习类型', value: '' },
|
||||
{ text: '不学', value: 1 },
|
||||
{ text: '要学', value: 2 }
|
||||
],
|
||||
outDateStatusRange: [
|
||||
{ text: '逾期状态', value: '' },
|
||||
{ text: '临期', value: 1 },
|
||||
{ text: '过期', value: 2 }
|
||||
],
|
||||
qualStatusRange: [
|
||||
{ text: '合格状态', value: '' },
|
||||
{ text: '合格', value: 1 },
|
||||
{ text: '不及格', value: 2 }
|
||||
],
|
||||
signupStatusRange: [
|
||||
{ text: '报名状态', value: '' },
|
||||
{ text: '报了', value: 1 },
|
||||
{ text: '没报', value: 2 }
|
||||
],
|
||||
// 项目列表
|
||||
projList: [
|
||||
{
|
||||
id: 1,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 5,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 71
|
||||
},
|
||||
// 状态选项
|
||||
learnTypeRange: [
|
||||
{ text: '学习类型', value: '' },
|
||||
{ text: '不学', value: 1 },
|
||||
{ text: '要学', value: 2 },
|
||||
],
|
||||
outDateStatusRange: [
|
||||
{ text: '逾期状态', value: '' },
|
||||
{ text: '临期', value: 1 },
|
||||
{ text: '过期', value: 2 },
|
||||
],
|
||||
qualStatusRange: [
|
||||
{ text: '合格状态', value: '' },
|
||||
{ text: '合格', value: 1 },
|
||||
{ text: '不及格', value: 2 },
|
||||
],
|
||||
signupStatusRange: [
|
||||
{ text: '报名状态', value: '' },
|
||||
{ text: '报了', value: 1 },
|
||||
{ text: '没报', value: 2 },
|
||||
],
|
||||
// 项目列表
|
||||
projList: [
|
||||
{
|
||||
id: 1,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 5,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 71
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 3,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 33
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 2,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 94
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 4,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 76
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 1,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 63
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 5,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 52
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 4,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 18
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chooseStatus(count) {
|
||||
this.totalStatus.statusCount = count
|
||||
console.log(this.totalStatus)
|
||||
},
|
||||
toggleSearch() {
|
||||
console.log(this.totalStatus)
|
||||
},
|
||||
statusChange(item) {
|
||||
console.log(this.totalStatus)
|
||||
},
|
||||
toggleDetail(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/YNEduApp/learnProj/learnProjDetail?id=${id}`
|
||||
})
|
||||
},
|
||||
leftClick() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/YNEduApp/index/index'
|
||||
})
|
||||
{
|
||||
id: 2,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 3,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 33
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 2,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 94
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 4,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 76
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 1,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 63
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 5,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 52
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
img: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '应急抢险',
|
||||
star: 4,
|
||||
avatar: '/static/eduImg/avatar.jpg',
|
||||
user: '管理员',
|
||||
percent: 18
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
const params = {
|
||||
userId: 31
|
||||
}
|
||||
}
|
||||
}
|
||||
const res = await getStudentStudyWorkList(params)
|
||||
this.projList = res.data
|
||||
console.log('🚀 ~ getList ~ res:', res)
|
||||
},
|
||||
chooseStatus(count) {
|
||||
this.totalStatus.statusCount = count
|
||||
console.log(this.totalStatus)
|
||||
},
|
||||
toggleSearch() {
|
||||
console.log(this.totalStatus)
|
||||
},
|
||||
statusChange(item) {
|
||||
console.log(this.totalStatus)
|
||||
},
|
||||
toggleDetail(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/YNEduApp/learnProj/learnProjDetail?id=${id}`
|
||||
})
|
||||
},
|
||||
leftClick() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/YNEduApp/index/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #f8f8f8;
|
||||
box-sizing: border-box;
|
||||
padding: 0 10px;
|
||||
|
||||
.page{
|
||||
.status-secs {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 1vh;
|
||||
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #F8F8F8;
|
||||
box-sizing: border-box;
|
||||
padding: 0 10px;
|
||||
view {
|
||||
box-sizing: border-box;
|
||||
padding: 0 15rpx;
|
||||
font-size: 18px;
|
||||
color: #9ea2ac;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.status-secs{
|
||||
.active {
|
||||
font-size: 28px;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.drops {
|
||||
width: 100%;
|
||||
margin-top: 1vh;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.project-cont {
|
||||
width: 100%;
|
||||
height: 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.single-proj {
|
||||
width: 49%;
|
||||
height: 30vh;
|
||||
margin-bottom: 1vh;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
|
||||
view{
|
||||
|
||||
box-sizing: border-box;
|
||||
padding: 0 15rpx;
|
||||
font-size: 18px;
|
||||
color: #9EA2AC;
|
||||
font-weight: bold;
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 45%;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.active{
|
||||
|
||||
font-size: 28px;
|
||||
color: #000;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.drops{
|
||||
|
||||
width: 100%;
|
||||
margin-top: 1vh;
|
||||
display: flex;
|
||||
|
||||
}
|
||||
|
||||
.project-cont{
|
||||
|
||||
width: 100%;
|
||||
height: 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.single-proj{
|
||||
|
||||
width: 49%;
|
||||
height: 30vh;
|
||||
margin-bottom: 1vh;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
.proj-detail {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
|
||||
.img{
|
||||
|
||||
.detail-upper {
|
||||
width: 100%;
|
||||
height: 45%;
|
||||
|
||||
image{
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.proj-detail{
|
||||
|
||||
flex: 1;
|
||||
height: 65%;
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
box-sizing: border-box;
|
||||
padding: 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
|
||||
.detail-upper{
|
||||
.icons {
|
||||
font-size: 12px;
|
||||
color: #c0c0c0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
width: 100%;
|
||||
height: 65%;
|
||||
border-bottom: 1px solid #DFDFDF;
|
||||
span {
|
||||
padding-left: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail-lower {
|
||||
flex: 1;
|
||||
box-sizing: border-box;
|
||||
padding: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.avatar {
|
||||
width: 5vh;
|
||||
height: 5vh;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
margin-right: 10rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.progress {
|
||||
flex: 1;
|
||||
box-sizing: border-box;
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
|
||||
.icons{
|
||||
|
||||
font-size: 12px;
|
||||
color: #C0C0C0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
span{
|
||||
|
||||
padding-left: 5rpx;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.detail-lower{
|
||||
|
||||
flex: 1;
|
||||
box-sizing: border-box;
|
||||
padding: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.avatar{
|
||||
|
||||
width: 5vh;
|
||||
height: 5vh;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
margin-right: 10rpx;
|
||||
|
||||
image{
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.progress{
|
||||
|
||||
.bar {
|
||||
flex: 1;
|
||||
box-sizing: border-box;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
|
||||
.bar{
|
||||
|
||||
flex: 1;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
<view class="page">
|
||||
<u-navbar title="学习项目" @leftClick="leftClick" placeholder />
|
||||
<view class="proj-cont">
|
||||
<h2 style="margin-bottom: 15rpx">这是标题</h2>
|
||||
<span style="font-size: 12px; color: #b0b0b0">合格标准:学习进度完成100%,考试及格一场,练习通过一场</span>
|
||||
<h2 style="margin-bottom: 15rpx">{{ name }}</h2>
|
||||
<span style="font-size: 12px; color: #b0b0b0">合格标准:{{ eligibility }}</span>
|
||||
<view class="user-info">
|
||||
<view class="info-lef">
|
||||
<view class="avatar">
|
||||
<image src="/static/eduImg/avatar.jpg"></image>
|
||||
<span style="font-size: 18px">马晓峰</span>
|
||||
<span style="font-size: 18px">{{ createUserName }}</span>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center">
|
||||
<l-starRate v-model="starRate" :disabled="true" style="margin-right: 1vw"></l-starRate>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
<view class="rig-up">
|
||||
<view>
|
||||
培训内容
|
||||
<span>6</span>
|
||||
<span>{{ listStageContentNum }}</span>
|
||||
</view>
|
||||
<view style="margin-left: 2vw">
|
||||
观看记录
|
||||
|
|
@ -149,11 +149,18 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { studyWorkAll } from '@/api/eduApp'
|
||||
import config from 'config'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
projId: '',
|
||||
starRate: 4,
|
||||
name: '',
|
||||
createUserName: '',
|
||||
listStageContentNum: 0,
|
||||
eligibility: '',
|
||||
learnIconObj: { color: '#1A63AC', size: '18', type: 'calendar' },
|
||||
pracIconObj: { color: '#38B022', size: '18', type: 'compose' },
|
||||
theoryLearnList: [
|
||||
|
|
@ -188,9 +195,35 @@ export default {
|
|||
},
|
||||
onLoad(params) {
|
||||
this.projId = params.id
|
||||
console.log(this.projId)
|
||||
console.log('🚀 ~ onLoad ~ this.projId:', this.projId, config)
|
||||
this.getStudyWorkAll()
|
||||
},
|
||||
methods: {
|
||||
// 获取学习项目详情
|
||||
async getStudyWorkAll() {
|
||||
let params = { userId: '31', id: this.projId, type: '1' }
|
||||
// uni.request({
|
||||
// method: 'post',
|
||||
// url: config.bmwUrl + '/studyWork/StudyWorkAll',
|
||||
// data: params,
|
||||
// header: {
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
// Authorization: 'Bearer' + uni.getStorageSync('App-Token')
|
||||
// },
|
||||
// dataType: 'json',
|
||||
// success: res => {
|
||||
// console.log('🚀 ~ getStudyWorkAll ~ res:', res)
|
||||
// }
|
||||
// })
|
||||
|
||||
const res = await studyWorkAll(params)
|
||||
this.name = res.name
|
||||
this.createUserName = res.createUserName
|
||||
this.listStageContentNum = res.listStageContentNum
|
||||
this.eligibility = res.eligibility
|
||||
|
||||
console.log('🚀 ~ getStudyWorkAll ~ res:', res)
|
||||
},
|
||||
toggleTheoryLearn(id) {
|
||||
console.log(id)
|
||||
uni.navigateTo({
|
||||
|
|
|
|||
|
|
@ -12,17 +12,17 @@
|
|||
</div>
|
||||
<div class="total" @click="openSelect">
|
||||
<u-icon name="/static/images/quanbufenlei.png" size="15" />
|
||||
<div class="num">{{ allNum }}</div>
|
||||
<div class="num">{{ nowNum }}/{{ allNum }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="question-wrapper" v-for="(item, index) in questionList" :key="index">
|
||||
<div v-if="item.examType !== 2">
|
||||
<div class="title">{{ item.paperTopic }}{{ item.examType == 1 ? '(单选题)' : '(判断题)' }}</div>
|
||||
<div class="title">{{ nowNum }}.{{ item.paperTopic }}{{ item.examType == 1 ? '(单选题)' : '(判断题)' }}</div>
|
||||
<u--image
|
||||
v-if="item.analyUrl"
|
||||
v-if="item.paperTopicUrl"
|
||||
:showLoading="true"
|
||||
:src="item.analyUrl"
|
||||
:src="config.imgUrl + item.paperTopicUrl || ''"
|
||||
width="60px"
|
||||
height="60px"
|
||||
style="margin-bottom: 10px"
|
||||
|
|
@ -81,8 +81,8 @@
|
|||
</div>
|
||||
|
||||
<div v-if="item.isSelect">
|
||||
<div>正确答案:{{ item.correctGrade.join('、') }}</div>
|
||||
<div>你的答案:{{ item.select.join('、') }}</div>
|
||||
<div>正确答案:{{ item.correctGrade.split('').join('、') }}</div>
|
||||
<div>你的答案:{{ item.select && item.select.join('、') }}</div>
|
||||
|
||||
<div class="analysis">知识点</div>
|
||||
<div class="analysis-container">{{ item.answerAnaly }}</div>
|
||||
|
|
@ -104,6 +104,7 @@
|
|||
</div>
|
||||
<div class="btn">
|
||||
<u-button
|
||||
v-show="nowNum > 1"
|
||||
type="primary"
|
||||
size="small"
|
||||
shape="circle"
|
||||
|
|
@ -114,6 +115,7 @@
|
|||
</div>
|
||||
<div class="btn">
|
||||
<u-button
|
||||
v-show="nowNum < allNum"
|
||||
type="primary"
|
||||
size="small"
|
||||
shape="circle"
|
||||
|
|
@ -162,10 +164,10 @@
|
|||
:key="index"
|
||||
class="topic-wrapper"
|
||||
:class="{ correct: item.isCorrect, error: item.isError }"
|
||||
@click="handleJump(null, index)"
|
||||
@click="handleJump('jump', item.index)"
|
||||
>
|
||||
<div v-if="currentIndex == index">*</div>
|
||||
<div class="topic">{{ index + 1 }}</div>
|
||||
<div v-if="currentIndex == item.index">*</div>
|
||||
<div class="topic">{{ item.index }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
|
|
@ -184,6 +186,8 @@ import {
|
|||
savePracticeDuration, // 保存练习时长
|
||||
updateRemoveRecordData // 错题消除记录
|
||||
} from '@/api/eduApp'
|
||||
import config from 'config'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -192,6 +196,7 @@ export default {
|
|||
isNew: 1, // 是否新练习
|
||||
isOutOfOrder: 1, // 是否乱序
|
||||
isError: false, // 是否错题消除
|
||||
nowNum: 0, // 当前题目索引
|
||||
showModal: false,
|
||||
showModalSelect: false,
|
||||
// 正确率
|
||||
|
|
@ -216,10 +221,10 @@ export default {
|
|||
onLoad(opt) {
|
||||
opt = JSON.parse(opt.params)
|
||||
this.practiceId = opt.practiceId
|
||||
this.recordId = opt.recordId
|
||||
this.isNew = opt.isNew
|
||||
this.isOutOfOrder = opt.isOutOfOrder
|
||||
this.isError = opt.isError
|
||||
this.recordId = opt.recordId || ''
|
||||
this.isNew = opt.isNew || ''
|
||||
this.isOutOfOrder = opt.isOutOfOrder || ''
|
||||
this.isError = opt.isError || ''
|
||||
console.log('🚀 ~ onLoad ~ opt:', opt)
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -238,12 +243,14 @@ export default {
|
|||
const params = {
|
||||
practiceId: this.practiceId,
|
||||
recordId: this.recordId,
|
||||
isNew: this.isNew
|
||||
isNew: this.isNew || '',
|
||||
isMiss: this.isError ? 1 : ''
|
||||
}
|
||||
const res = await getPracticeItData(params)
|
||||
this.trueNum = res.data.trueNum
|
||||
this.falseNum = res.data.falseNum
|
||||
this.allNum = res.data.allNum
|
||||
this.nowNum = res.data.nowNum
|
||||
console.log('🚀 ~ getPracticeItData ~ res:', res)
|
||||
},
|
||||
// 获取题目
|
||||
|
|
@ -252,23 +259,33 @@ export default {
|
|||
const params = {
|
||||
practiceId: this.practiceId,
|
||||
recordId: this.recordId,
|
||||
isNew: this.isNew,
|
||||
isOutOfOrder: this.isOutOfOrder
|
||||
isNew: this.isNew || '',
|
||||
isOutOfOrder: this.isOutOfOrder || '',
|
||||
isMiss: this.isError ? 1 : ''
|
||||
}
|
||||
const res = await getPracticeQuestion(params)
|
||||
// this.questionList = res.data
|
||||
this.recordId = res.data.recordId
|
||||
this.questionList.push(res.data)
|
||||
console.log('🚀 ~ getPracticeQuestion ~ res:', res)
|
||||
console.log('🚀 ~ getPracticeQuestion ~ this.questionList:', this.questionList)
|
||||
},
|
||||
// 跳题
|
||||
async handleJump(item, index) {
|
||||
if (item === 'prev') {
|
||||
this.nowNum -= 1
|
||||
} else if (item === 'next') {
|
||||
this.nowNum += 1
|
||||
} else if (item === 'jump') {
|
||||
this.nowNum = index
|
||||
}
|
||||
|
||||
this.currentIndex = index
|
||||
this.questionList = []
|
||||
const params = {
|
||||
recordId: this.recordId,
|
||||
recordId: this.recordId || '',
|
||||
operate: item || '',
|
||||
sort: index + 1 || ''
|
||||
sort: this.nowNum,
|
||||
isMiss: this.isError ? 1 : ''
|
||||
}
|
||||
const res = await changeQuestion(params)
|
||||
this.questionList.push(res.data)
|
||||
|
|
@ -277,10 +294,13 @@ export default {
|
|||
// 获取题目列表-弹框
|
||||
async getPracticeQuestionList() {
|
||||
const params = {
|
||||
id: this.practiceId
|
||||
recordId: this.recordId,
|
||||
id: this.practiceId,
|
||||
isMiss: this.isError ? 1 : ''
|
||||
}
|
||||
const res = await getPracticeQuestionList(params)
|
||||
console.log('🚀 ~ getPracticeQuestionList ~ res:', res)
|
||||
this.questionListSelect = res.data
|
||||
},
|
||||
// 开始计时 - 实时更新已用时间
|
||||
startTimer() {
|
||||
|
|
@ -326,7 +346,7 @@ export default {
|
|||
// 正确 - 给当前选项添加正确标记
|
||||
this.questionList[0].listOption[index].isCorrect = true
|
||||
// 正确题数+1
|
||||
// this.trueNum++
|
||||
this.trueNum++
|
||||
} else {
|
||||
// 当前选择
|
||||
this.questionList[0].select = option.optionIdent
|
||||
|
|
@ -341,7 +361,7 @@ export default {
|
|||
}
|
||||
})
|
||||
// 错误题数+1
|
||||
// this.falseNum++
|
||||
this.falseNum++
|
||||
}
|
||||
const params = {
|
||||
practiceId: this.practiceId,
|
||||
|
|
@ -378,12 +398,12 @@ export default {
|
|||
// 标记已选择
|
||||
this.questionList[0].isSelect = true
|
||||
const select = this.questionList[0].select
|
||||
const correctGrade = this.questionList[0].correctGrade
|
||||
const correctGrade = this.questionList[0].correctGrade.split('')
|
||||
// 判断是否正确
|
||||
const isCorrect = select.sort().toString() === correctGrade.sort().toString()
|
||||
if (isCorrect) {
|
||||
// 正确题数+1
|
||||
// this.trueNum++
|
||||
this.trueNum++
|
||||
// 给当前题目添加正确标记
|
||||
this.questionList[0].listOption.forEach(item => {
|
||||
if (item.isCheck) {
|
||||
|
|
@ -398,7 +418,7 @@ export default {
|
|||
})
|
||||
} else {
|
||||
// 错误题数+1
|
||||
// this.falseNum++
|
||||
this.falseNum++
|
||||
// 给当前题目添加错误标记
|
||||
this.questionList[0].isError = true
|
||||
// 给错误选项添加标记
|
||||
|
|
@ -410,6 +430,15 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
const params = {
|
||||
practiceId: this.practiceId,
|
||||
recordId: this.recordId,
|
||||
questionId: this.questionList[0].questionId,
|
||||
selectAnswer: select.join(''),
|
||||
isTrue: isCorrect ? 1 : 0
|
||||
}
|
||||
console.log('🚀 ~ handleOk ~ params-多选:', params)
|
||||
insertPracticeAnswerById(params)
|
||||
}
|
||||
},
|
||||
// 提交
|
||||
|
|
|
|||
|
|
@ -102,8 +102,6 @@ export default {
|
|||
const params = {
|
||||
practiceId: item.id,
|
||||
recordId: item.recordId,
|
||||
isNew: 0,
|
||||
isOutOfOrder: 1,
|
||||
isError: true
|
||||
}
|
||||
uni.navigateTo({
|
||||
|
|
|
|||
|
|
@ -141,17 +141,17 @@ export default {
|
|||
isError: false
|
||||
}
|
||||
if (type === 1) {
|
||||
params.isOutOfOrder = 0
|
||||
params.isNew = 0
|
||||
params.isOutOfOrder = '0'
|
||||
params.isNew = '0'
|
||||
} else if (type === 2) {
|
||||
params.isOutOfOrder = 0
|
||||
params.isNew = 1
|
||||
params.isOutOfOrder = '0'
|
||||
params.isNew = '1'
|
||||
} else if (type === 3) {
|
||||
params.isOutOfOrder = 1
|
||||
params.isNew = 0
|
||||
params.isNew = '0'
|
||||
} else if (type === 4) {
|
||||
params.isOutOfOrder = 1
|
||||
params.isNew = 1
|
||||
params.isOutOfOrder = '1'
|
||||
params.isNew = '1'
|
||||
}
|
||||
console.log('params', params)
|
||||
uni.navigateTo({
|
||||
|
|
|
|||
Loading…
Reference in New Issue