Commit 96e8f48e authored by 罗超's avatar 罗超

修改部分内容

parent 2a168bcb
<template>
<view class="charts-box">
<qiun-data-charts type="radar" :opts="opts" :chartData="chartData" :canvas2d="true"
canvasId="XLAUeMWrMjRnxVcbmxKOcXWEcyGYvjAY" />
:canvasId="canId" />
</view>
</template>
......@@ -48,6 +48,15 @@
},
})
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() {
//模拟从服务器获取数据时的延时
setTimeout(() => {
......@@ -88,6 +97,7 @@
}, 500);
}
}
data.canId=methods.randomCoding()
onMounted(()=>{
methods.getServerData()
})
......
......@@ -10,13 +10,18 @@
<th
v-for="(item, index) in TitleList"
:key="index"
width="200"><text style="width: 100%;text-align: center;">{{item}}</text></th>
width="200" :style="{'height':t==1?'10.325%':'11.8%'}"><text style="width: 100%;text-align: center;">{{item}}</text></th>
</tr>
<tr class="analysisTest-content-right">
<scroll-view scroll-x="true" class="flex" style="width:100%;height: 561.6rpx;">
<scroll-view scroll-x="true" class="flex" style="width:100%;" :style="{'height':t==1?'627.6rpx':'561.6rpx'}">
<view style="height: 100%;display: flex;flex-direction: row;flex-wrap: nowrap;" >
<td class="analysisTest-td" style="min-width: 56rpx;" :style="{'min-width':(item.KnowledgePoint.length*20+20)+'rpx'}" v-for="(item,index) in ScoreList" :key="index">
<view class="analysisTest-number">{{item.Sort}}</view>
<template v-for="x in groups">
<td class="analysisTest-td" :class="{'groups':t==1}" style="min-width: 56rpx;" :style="{'min-width':(item.KnowledgePoint.length*20+20)+'rpx'}" v-for="(item,index) in x.data" :key="index">
<view v-if="t==1" style="position: relative;">
<view v-if="index==0" style="position: absolute;left: 0px;z-index: 2;" :style="{'width':`${x.w}rpx`}">{{x.key}}</view>
</view>
<view class="analysisTest-number">{{item.Sort}}</view>
<view class="analysisTest-difficulty">
<template v-if="item.Difficulty == '易'"><van-icon name="star" v-for="(s,i) in 1" :key="i"/></template>
<template v-else-if="item.Difficulty == '中'"><van-icon name="star" v-for="(s,i) in 2" :key="i"/></template>
......@@ -29,6 +34,7 @@
<view class="analysisTest-TheAverageAcore">{{item.AvgScore.toFixed(1)}}</view>
<view class="analysisTest-averageScoringRate">{{(item.AvgScoreRate * 100).toFixed(0)}}%</view>
</td>
</template>
</view>
</scroll-view>
</tr>
......@@ -52,17 +58,53 @@
export default {
props: ["ScoreList"],
components: {},
setup() {
setup(props) {
let data = reactive({
obj: {
Name: '',
Photo: '',
},
t:1,//t0为普通的考试信息,1为AB卷
showPhone: false,
scores:[],
groups:[],
showLogin: true, //多次点击
TitleList:['题号','难度','知识点','分值','得分','得分率','平均分','平均得分率']
TitleList:['分组','题号','难度','知识点','分值','得分','得分率','平均分','平均得分率']
});
//伪装数据
data.scores=props.ScoreList
data.t=data.scores[0].GroupName==""?0:1
const groupBy=(array, f)=>{
const groups = {};
array.forEach(function (o) { //注意这里必须是forEach 大写
const group = JSON.stringify(f(o));
groups[group] = groups[group] || [];
groups[group].push(o);
});
let result=[]
Object.keys(groups).map(x=>{
let tempReuslt={}
tempReuslt.key=JSON.parse(x)[0]
tempReuslt.data=groups[x]
result.push(tempReuslt)
})
return result
}
if(data.t!=1){
data.TitleList.splice(0,1)
}
data.groups=groupBy(data.scores, (item)=>{
return [item.GroupName];
});
data.groups.forEach(x=>{
let w=0
x.data.forEach(y=>{
w+=y.KnowledgePoint.length*20+20
})
x.w=w
})
return {
...toRefs(data),
};
......@@ -78,8 +120,12 @@
background: #FCEEEF;
}
.analysisTest-td view:last-child{
height: 17.4%;
height: 17.4% !important;
}
.analysisTest-td.groups view{
height: 10.325%;
line-height: 10.325%;
}
.analysisTest-td view{
background: #F7D8DA;
border-right: 1px solid #F6DDDF;
......@@ -115,7 +161,7 @@
text-align: center;
}
.analysisTest-content-left th:last-child{
height: 17.4%;
height: 17.4% !important;
}
.analysisTest-content-left{
width: 120rpx;
......
<template>
<view class="examList-box">
<view class="examList-import" @click="goUrlWebview">
<van-icon name="plus" />
<text>导入考试信息</text>
</view>
<view style="display: flex;">
<view class="examList-import" @click="goUrlWebview">
<van-icon name="plus" />
<text>导入考试信息</text>
</view>
<view class="examList-import" @click="setCensus">
<text>生成分析统计表</text>
</view>
</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">
......@@ -163,6 +169,16 @@
break;
}
},
setCensus(){
//1、调用后台生成接口
uni.showLoading({
title:'正在生成中...'
})
setTimeout(()=>{
uni.hideLoading()
},3000)
//2、重新调用列表接口请求
},
// 跳web上传
goUrlWebview(){
if(data.platform=='windows'||data.platform=='mac'){
......@@ -290,7 +306,7 @@
}
let host = ''
if (process.env.NODE_ENV === "development") {
host = 'https://jjswapi.oytour.com/api'
host = 'http://192.168.10.11:8082/api'
} else {
host = 'https://jjswapi.oytour.com/api'
}
......@@ -581,7 +597,7 @@
margin-left: 15rpx;
}
.examList-import{
width: 247rpx;
width: 200rpx;
border: 1rpx solid #F2A1A8;
background: #FFFFFF;
line-height: 54rpx;
......
......@@ -14,8 +14,9 @@
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_713.png" />
</view>
<view class="scoreDetails-header-tetx">
<view class="scoreDetails-header-name">
{{ExamScore.StuName}}
<view class="scoreDetails-header-name" style="display: flex;align-items: center;">
<text>{{ExamScore.StuName}}</text>
<view class="score-shenqing" @click="queryScore">查分申请</view>
</view>
<view class="scoreDetails-header-title">{{ExamScore.ExamName}}</view>
</view>
......@@ -58,13 +59,26 @@
<view>(共{{ExamScore.ScoreList.length}}小题)</view>
</view>
<analysisTest :ScoreList="ExamScore.ScoreList"></analysisTest>
<view class="scoreDetails-title flex">
<text>各板块掌握情况</text>
</view>
<view class="index-student-information">
<penta :ModuleList="ExamScore.ModuleList" v-if="!Loading"></penta>
<allGraspTheSituation :ModuleList="ExamScore.ModuleList"></allGraspTheSituation>
</view>
<template v-if="!ExamScore.GroupModuleList">
<view class="scoreDetails-title flex">
<text>各板块掌握情况</text>
</view>
<view class="index-student-information">
<penta :ModuleList="ExamScore.ModuleList" v-if="!Loading"></penta>
<allGraspTheSituation :ModuleList="ExamScore.ModuleList"></allGraspTheSituation>
</view>
</template>
<template v-else>
<template v-for="x in ExamScore.GroupModuleList">
<view class="scoreDetails-title flex">
<text>{{x.GroupName.GroupName}}掌握情况</text>
</view>
<view class="index-student-information">
<penta :ModuleList="x.GroupList" v-if="!Loading"></penta>
<allGraspTheSituation :ModuleList="x.GroupList"></allGraspTheSituation>
</view>
</template>
</template>
<view class="scoreDetails-title flex">
<text>试卷难度分析</text>
</view>
......@@ -151,6 +165,27 @@
delta:1
});
},
queryScore(){
// uni.navigateTo({
// url:"/pages/webview/upload?url="+encodeURIComponent('https://doc.weixin.qq.com/forms/AJEAPAfgABUAaEAeAaUAAcP3Sbh3adRUf')
// })
wx.navigateToMiniProgram({
appId: 'wxd45c635d754dbf59',
path: 'pages/detail/detail.html?url=https%3A%2F%2Fdoc.weixin.qq.com%2Fforms%2FAJEAPAfgABUAaEAeAaUAAcP3Sbh3adRUf',
envVersion: 'release',
success(res) {
console.log('跳转了')
// 跳转成功
},
fail: function (e) {
wx.showModal({
title: '提示',
content: '跳转失败',
showCancel: false,
})
}
})
}
};
onMounted(() => {
......@@ -188,6 +223,18 @@
</script>
<style scoped>
.score-shenqing{
width: 120rpx;
height: 27rpx;
background: linear-gradient(90deg, #E53F4E, #EE7F82);
box-shadow: 0px 0px 10rpx 0px rgba(247,167,174,0.63);
border-radius: 10rpx;
margin-left: 20rpx;
font-size: 24rpx;
color: #FFFFFF;
line-height: 27rpx;
text-align: center;
}
.index-student-information{
min-height: 500rpx;
background: rgba(255,255,255,.7);
......
......@@ -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.46:8900/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