Commit 08e25095 authored by 罗超's avatar 罗超

新增统计分析

parent 96e8f48e
......@@ -24,6 +24,14 @@ export function login(data) {
})
}
export function setExamStatAnalysis(data) {
return request({
url: '/Exam/SetExamStatAnalysis',
method: 'post',
data
})
}
export function setCourseComment(data) {
return request({
url: '/Teacher/SetCourseComment',
......
<template>
<view class="charts-box-line">
<qiun-data-charts
type="column"
:opts="opts"
:canvasId="canId"
:canvas2d="true"
:ontouch='true'
:chartData="chartData"
/>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
export default {
props: {
ScoreList:[]
},
setup(props) {
let data = reactive({
chartData: {},
//您可以通过修改 config-ucharts.js 文件中下标为 ['line'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
opts: {
enableScroll:true,
color: ["#F0F0F0","#E53F4E","#FCE3D4"],
ppadding: [15,10,0,15],
legend: {
show: true,
position: "top",
lineHeight: 25,
fontColor:"#282828",
itemGap:30
},
dataLabel:false,
dataPointShape:false,
xAxis: {
disableGrid: true,
scrollShow:true,
itemCount:4
},
yAxis: {
gridType:'dash',
gridColor:'#F0F0F0',
dashLength:2,
data: [
{
min: 0
}
]
},
extra: {
column: {
type: "group",
width: 8,
activeBgColor: "#000000",
activeBgOpacity: 0.08,
//linearType: "custom",
seriesGap: 5,
//linearOpacity: 0.5,
barBorderCircle: true
}
}
}
})
let methods = {
randomCoding(){
var arr = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
var idvalue ='';
let n = 8;
for(let i=0; i<n; i++){
idvalue+=arr[Math.floor(Math.random()*26)];
}
return idvalue;
},
getServerData() {
let myscore=[]
let avgScore=[]
let sumScore=[]
let xlable=[]
props.ScoreList.forEach((x,i)=>{
myscore.push(x.Score)
avgScore.push(x.AvgScore)
sumScore.push(x.TScore)
xlable.push(x.KnowledgePoint)
})
let res = {
categories: xlable,
series: [
{
name: "总分",
data: sumScore,
legendShape:'circle'
},
{
name: "个人得分",
data: myscore,
legendShape:'circle'
},
{
name: "平均得分",
data: avgScore,
legendShape:'circle'
}
]
};
data.chartData = JSON.parse(JSON.stringify(res));
},
}
data.canId=methods.randomCoding()
onMounted(() => {
//methods.getServerData()
})
return {
...toRefs(data),
...methods
};
},
onReady() {
this.getServerData();
},
};
</script>
<style scoped>
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
/* .charts-box-line {
width: 100%;
height: 555rpx;
background-image: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653559819000_509.png');
background-position: 0px -57rpx;
background-repeat: no-repeat;
background-size: 100% auto;
} */
</style>
<template>
<view class="charts-box-line">
<qiun-data-charts
type="line"
:opts="opts"
:canvasId="canId"
:canvas2d="true"
:ontouch='true'
:chartData="chartData"
/>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
export default {
props: ['ScoreList'],
setup(props) {
let data = reactive({
chartData: {},
//您可以通过修改 config-ucharts.js 文件中下标为 ['line'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
opts: {
enableScroll:true,
color: ["#E53F4E","#FCE3D4"],
padding: [15,10,0,15],
legend: {
show: true,
position: "top",
lineHeight: 25,
fontColor:"#282828",
itemGap:30
},
dataLabel:false,
dataPointShape:false,
xAxis: {
disableGrid: false,
gridType:'dash',
gridColor:'#F0F0F0',
scrollShow:true,
itemCount:6
},
yAxis: {
gridType: "dash",
dashLength: 2,
disableGrid: true
},
extra: {
line: {
type: "curve",
width: 2
}
}
}
})
let methods = {
randomCoding(){
var arr = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
var idvalue ='';
let n = 8;
for(let i=0; i<n; i++){
idvalue+=arr[Math.floor(Math.random()*26)];
}
return idvalue;
},
getServerData() {
//模拟从服务器获取数据时的延时
let myscore=[]
let avgScore=[]
let xlable=[]
props.ScoreList.forEach((x,i)=>{
myscore.push(x.Score)
avgScore.push(x.AvgScore)
xlable.push('第'+(i+1)+'次')
})
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
let res = {
categories: xlable,
series: [
{
name: "个人得分",
data: myscore,
legendShape:'circle'
},
{
name: "平均得分",
data: avgScore,
legendShape:'circle'
}
]
};
this.chartData = JSON.parse(JSON.stringify(res));
},
}
data.canId=methods.randomCoding()
onMounted(() => {
methods.getServerData()
})
return {
...toRefs(data),
...methods
};
},
onReady() {
this.getServerData();
},
};
</script>
<style scoped>
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
/* .charts-box-line {
width: 100%;
height: 555rpx;
background-image: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653559819000_509.png');
background-position: 0px -57rpx;
background-repeat: no-repeat;
background-size: 100% auto;
} */
</style>
......@@ -50,7 +50,7 @@
fontColor:'#CE8086'
},{
min: 0,
max:100,
//max:100,
title:"",
position:'right',
axisLine:false,
......
<template>
<view class="charts-box-line">
<qiun-data-charts
type="tarea"
:opts="opts"
:canvasId="canId"
:canvas2d="true"
:ontouch='true'
:chartData="chartData"
/>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
export default {
props: ["ScoreList"],
setup(props) {
let data = reactive({
chartData: {},
//您可以通过修改 config-ucharts.js 文件中下标为 ['line'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
opts: {
enableScroll:true,
color: ["#E53F4E"],
padding: [15,10,0,15],
legend: {
show: true,
position: "top",
lineHeight: 25,
fontColor:"#282828",
itemGap:30
},
// dataLabel:false,
// dataPointShape:false,
xAxis: {
disableGrid: false,
gridType:'dash',
gridColor:'#F0F0F0',
scrollShow:true,
itemCount:6
},
yAxis: {
gridType: "dash",
dashLength: 2,
disableGrid: true,
data:[{
min:1
}]
},
extra: {
line: {
type: "curve",
width: 2
}
}
}
})
let methods = {
randomCoding(){
var arr = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
var idvalue ='';
let n = 8;
for(let i=0; i<n; i++){
idvalue+=arr[Math.floor(Math.random()*26)];
}
return idvalue;
},
getServerData() {
let myscore=[]
let xlable=[]
props.ScoreList.forEach((x,i)=>{
myscore.push(x.Rank)
xlable.push('第'+(i+1)+'次')
})
let res = {
categories: xlable,
series: [
{
name: "学员排名",
data: myscore,
min:1,
legendShape:'circle',
textOffset:-20
}
]
};
this.chartData = JSON.parse(JSON.stringify(res));
},
}
data.canId=methods.randomCoding()
onMounted(() => {
methods.getServerData()
})
return {
...toRefs(data),
...methods
};
},
onReady() {
this.getServerData();
},
};
</script>
<style scoped>
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
/* .charts-box-line {
width: 100%;
height: 555rpx;
background-image: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653559819000_509.png');
background-position: 0px -57rpx;
background-repeat: no-repeat;
background-size: 100% auto;
} */
</style>
<template>
<view class="examComponents-box">
<view class="examComponents activeOne flex">
<view class="examComponents activeOne flex" :class="{'activeFour':jobData.DataObj.ExamType==3}">
<view class="examComponents-time-box flex">
<view class="examComponents-time">
<view>{{jobData.CreateTime}}</view>
......@@ -29,7 +29,7 @@
<view class="homework-score">
<view class="homework-score-title">得分率</view>
<view class="homework-score-num flex">
<view>{{jobData.DataObj.Score_p}}</view>
<view>{{jobData.DataObj.Score_p.toFixed(0)}}</view>
<view>%</view>
</view>
</view>
......@@ -76,9 +76,13 @@
scoreDetails() {
data.userData = uni.getStorageSync('userInfo');
let url='/pages/index/scoreDetails?examId=' + data.jobData.DataObj.ExamId + '&stuId=' + data.userData.Id
let domainStr='/pages/index/scoreDetails'
if(data.jobData.DataObj.ExamType==3){
domainStr='/pages/index/scoreDetailsFenxi'
}
let url=domainStr+'?examId=' + data.jobData.DataObj.ExamId + '&stuId=' + data.userData.Id
if(props.stuId){
url='/pages/index/scoreDetails?examId=' + data.jobData.DataObj.ExamId + '&stuUId=' + props.stuId
url=domainStr+'?examId=' + data.jobData.DataObj.ExamId + '&stuUId=' + props.stuId
}
console.log(url)
uni.navigateTo({
......@@ -183,6 +187,11 @@
.examComponents.activeOne .examComponents-center-box {
background: #1E7BF5;
}
.examComponents.activeFour .examComponents-center-box {
background: #3ec283;
}
.examComponents-center-box {
position: relative;
......@@ -221,6 +230,10 @@
background: #1E7BF5;
box-shadow: 0px 0px 12px 0px rgba(30, 123, 245, 0.46);
}
.examComponents.activeFour .examComponents-point {
background: #3ec283;
box-shadow: 0px 0px 12px 0px rgba(30, 123, 245, 0.46);
}
.examComponents-point {
width: 19rpx;
......
......@@ -63,7 +63,8 @@
export default {
props: {
ExamStu:[],
checkUnKnow:false
checkUnKnow:false,
type:0
},
components: {},
setup(props) {
......@@ -85,9 +86,16 @@
let methods = {
goStuScoreDetail(item){
if(item.StuId >0){
uni.navigateTo({
url: '/pages/index/scoreDetails?examId='+item.ExamId+"&stuId="+item.StuId+"&stuUId="+item.StuUId
});
if(props.type!=3){
uni.navigateTo({
url: '/pages/index/scoreDetails?examId='+item.ExamId+"&stuId="+item.StuId+"&stuUId="+item.StuUId
});
}else{
console.log('/pages/index/scoreDetailsFenxi?examId='+item.ExamId+"&stuId="+item.StuId+"&stuUId="+item.StuUId)
uni.navigateTo({
url: '/pages/index/scoreDetailsFenxi?examId='+item.ExamId+"&stuId="+item.StuId+"&stuUId="+item.StuUId
});
}
}
}
}
......
......@@ -11,8 +11,8 @@
</view>
<block v-if="dataList && dataList.length>0">
<view style="border-radius: 50rpx;background: #ffffff;overflow: hidden;box-shadow: 0px 6px 29px 0px rgba(76, 76, 76, 0.09);margin-bottom: 40rpx;"
class="examList activeOne" v-for="(item,index) in dataList" :key="index">
<view style="border-radius: 50rpx;overflow: hidden;box-shadow: 0px 6px 29px 0px rgba(76, 76, 76, 0.09);margin-bottom: 40rpx;"
class="examList activeOne" :class="{'fenxi':item.Type==3}" v-for="(item,index) in dataList" :key="index">
<van-swipe-cell
id="swipe-cell"
:right-width="116"
......@@ -106,6 +106,7 @@
watch
} from "vue";
import { uploadFile } from "@/utils/index";
import { setExamStatAnalysis } from '@/api/index'
export default {
props: {
dataList:[],
......@@ -174,9 +175,13 @@
uni.showLoading({
title:'正在生成中...'
})
setTimeout(()=>{
uni.hideLoading()
},3000)
setExamStatAnalysis({'CourseId':props.CourseId}).then(r=>{
setTimeout(()=>{
uni.hideLoading()
},3000)
ctx.emit('change')
})
//2、重新调用列表接口请求
},
// 跳web上传
......@@ -306,7 +311,7 @@
}
let host = ''
if (process.env.NODE_ENV === "development") {
host = 'http://192.168.10.11:8082/api'
host = 'https://jjswapi.oytour.com/api'//'http://192.168.10.11:8082/api'
} else {
host = 'https://jjswapi.oytour.com/api'
}
......@@ -533,9 +538,16 @@
flex: 1;
margin-left: 62rpx;
}
.fenxi .examList-right{
color:#282828;
background: rgba(255,255,255,.6);
}
.examList.activeOne .examList-state-text{
color: #BEBEBE;
}
.fenxi .examList-state-text{
color: #282828 !important;
}
.examList-state-text{
font-size: 20rpx;
letter-spacing: 2px;
......@@ -544,6 +556,9 @@
color: #DADADA;
font-size: 24rpx;
margin-right: 10rpx;
}
.fenxi .examList-state van-icon{
color: #282828 !important;
}
.examList-state{
margin-top: 35rpx;
......@@ -575,14 +590,24 @@
.examList-center-line{
width: 4rpx;
height: 23rpx;
background: #282828;
background: #E64150;
position: absolute;
left: 0;
top: 46rpx;
}
.fenxi .examList-center-line{
background: #282828 !important;
}
.examList.activeOne .examList-center-box{
/* background: #FFFFFF; */
/* background: #FFFFFF; */
}
.examList{
background: #FFFFFF;
}
.examList.fenxi{
background: #F9E0E2;
box-shadow: 0px 6px 29px 0px rgba(76,76,76,0.09);
}
.examList-center-box{
flex-grow: 1;
position: relative;
......
{
"name" : "jjsw",
"appid" : "",
"name" : "成长树",
"appid" : "__UNI__C97C820",
"description" : "甲鹤小程序学生端",
"versionName" : "1.0.0",
"versionCode" : "100",
......
......@@ -15,6 +15,12 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/index/scoreDetailsFenxi",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/index/jobDetails",
"style": {
......
<template>
<view class="jobDetails-box flex" style="flex-direction: column;">
<view class="jobDetails-box flex" :class="{'fenxi':type==3}" style="flex-direction: column;">
<view class="jobDetails-box-bj"></view>
<navbar class="navbarSticky" bg="#FCEEEF">
<navbar class="navbarSticky" bg="rgba(255,255,255,0)">
<view class="jobDetails-header-box">
<van-icon class="jobDetails-header-left" name="arrow-left" @click="back"/>
<text class="jobDetails-header-title">考试详情</text>
......@@ -14,7 +14,7 @@
<text>{{CreateTime}}</text>
<view>{{ExamName}}</view>
</view>
<view class="conten-title-right">
<view class="conten-title-right" v-if="type!=3">
<text>仅看未匹配</text>
<van-switch :checked="unSelectCheck" size="18px" active-color="#07c160" @change="changeUnSelect"/>
</view>
......@@ -32,7 +32,7 @@
</view>
<view class="index-student-information" style="flex:1;height:1px">
<van-empty description="暂无数据" v-if="ExamStu.length === 0" />
<examDetailsComponents v-if="ExamStu.length>0" :ExamStu="ExamStu" :checkUnKnow='unSelectCheck'></examDetailsComponents>
<examDetailsComponents v-if="ExamStu.length>0" :ExamStu="ExamStu" :type="type" :checkUnKnow='unSelectCheck'></examDetailsComponents>
</view>
</view>
</view>
......@@ -69,7 +69,8 @@
ExamNum:0,
AvgScore:0,
ExamStu:[],
unSelectCheck:false
unSelectCheck:false,
type:1
});
let methods = {
changeUnSelect({ detail }){
......@@ -101,6 +102,7 @@
this.ExamName = json.ExamName;
this.ExamNum = json.StuNum;
this.AvgScore = json.AvgScore;
this.type = json.Type
},
onShow() {
this.userData = uni.getStorageSync('userInfo');
......@@ -205,6 +207,15 @@
right: 0;
z-index: 0;
}
.jobDetails-box.fenxi{
background: linear-gradient(0deg, #E53F4E, #EE7F82);
background-size: 100% 570rpx;
}
.fenxi .jobDetails-num,
.fenxi .conten-title-left view,
.fenxi .conten-title-left text{
color:#FFFFFF !important;
}
.jobDetails-header-title{
position: absolute;
left: 0;
......
......@@ -74,6 +74,16 @@
<text>{{x.GroupName.GroupName}}掌握情况</text>
</view>
<view class="index-student-information">
<view style="display: flex;justify-content: center;margin-bottom: 40rpx;zoom: .7;">
<view class="scoreDetails-header-num flex">
<view>总分</view>
<text>{{x.TScore}}</text>
</view>
<view class="scoreDetails-header-num flex" style="margin-left: 80rpx;background-color: #3ec283;">
<view>排名</view>
<text>{{x.Rank}}</text>
</view>
</view>
<penta :ModuleList="x.GroupList" v-if="!Loading"></penta>
<allGraspTheSituation :ModuleList="x.GroupList"></allGraspTheSituation>
</view>
......
This diff is collapsed.
......@@ -3,7 +3,7 @@ let host = ''
if (process.env.NODE_ENV === "development") {
//host = 'http://localhost:5004/api'
host = 'https://jjswapi.oytour.com/api'
host = 'http://192.168.10.11:8082/api'
//host = 'http://192.168.10.11:8082/api'
// host = 'http://192.168.10.36:8082/api'
} else {
host = 'https://jjswapi.oytour.com/api'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment