|
|
@@ -95,51 +95,62 @@
|
|
|
<th>分值</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
- <tbody>
|
|
|
+ <tbody v-if="isShow_jspf">
|
|
|
<tr>
|
|
|
<th>原理认知</th>
|
|
|
<th>{{model.Score_ylrz>0?'是':'否'}}</th>
|
|
|
<th>{{model.Score_ylrz>=10?'是':'否'}}</th>
|
|
|
- <th>{{model.Score_ylrz>0?model.Score_ylrz:'0'}}</th>
|
|
|
+ <th>{{model.Score_ylrz}}</th>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>实景勘察</th>
|
|
|
<th>{{model.Score_sjkc>0?'是':'否'}}</th>
|
|
|
<th>{{model.Score_sjkc>=10?'是':'否'}}</th>
|
|
|
- <th>{{model.Score_sjkc>0?model.Score_sjkc:'0'}}</th>
|
|
|
+ <th>{{model.Score_sjkc}}</th>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>虚拟技术搭建</th>
|
|
|
<th>{{model.Score_xnjsdj>0?'是':'否'}}</th>
|
|
|
<th>{{model.Score_xnjsdj>=10?'是':'否'}}</th>
|
|
|
- <th>{{model.Score_xnjsdj>0?model.Score_xnjsdj:'0'}}</th>
|
|
|
+ <th>{{model.Score_xnjsdj}}</th>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>虚拟艺术创作</th>
|
|
|
<th>{{model.Score_xnyscz>0?'是':'否'}}</th>
|
|
|
<th>{{model.Score_xnyscz>=10?'是':'否'}}</th>
|
|
|
- <th>{{model.Score_xnyscz>0?model.Score_xnyscz:'0'}}</th>
|
|
|
+ <th>{{model.Score_xnyscz}}</th>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<!-- <th>教师评分</th> -->
|
|
|
<th>总成绩</th>
|
|
|
<th></th>
|
|
|
<th></th>
|
|
|
- <!-- <th v-show="isShow_jspf">{{model.Score_jspf>0?model.Score_jspf:'0'}}</th> -->
|
|
|
+ <th>{{totalScore}}</th>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ <tbody v-if="!isShow_jspf">
|
|
|
+ <tr v-for="(item,index) in scores" :key="index">
|
|
|
+ <th>{{item.Title}}</th>
|
|
|
+ <th>{{item.Score>0?'是':'否'}}</th>
|
|
|
+ <th></th>
|
|
|
<th class=" df aic jcc">
|
|
|
- <view>
|
|
|
- <view v-show="isShow_jspf" class=" input-jspf">{{model.Score_jspf>0?model.Score_jspf:'0'}}</view>
|
|
|
- <input v-show="!isShow_jspf" class=" input-jspf" v-model="model.Score_jspf" placeholder="请输入分数" />
|
|
|
- </view>
|
|
|
+ <input class="input-jspf" v-model="item.Score" placeholder="请输入分数" />
|
|
|
</th>
|
|
|
</tr>
|
|
|
+ <tr>
|
|
|
+ <!-- <th>教师评分</th> -->
|
|
|
+ <th>总成绩</th>
|
|
|
+ <th></th>
|
|
|
+ <th></th>
|
|
|
+ <th>{{totalScore}}</th>
|
|
|
+ </tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="btn-box df fdr aic jcc">
|
|
|
- <view class="btn-submit df aic jcc" @click="onClick_jspf(0)" v-show="isShow_jspf">成绩添加与修改</view>
|
|
|
- <view class="btn-submit df aic jcc" @click="onClick_jspf(1)" v-show="!isShow_jspf">确定</view>
|
|
|
+ <view class="btn-submit df aic jcc" @click="onClick_jspf(0)" v-show="isShow_jspf">修改成绩</view>
|
|
|
+ <view class="btn-submit df aic jcc" @click="onClick_jspf(1)" v-show="!isShow_jspf">保存</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -169,7 +180,9 @@
|
|
|
SJKC_P: 0,
|
|
|
XNSY_P: 0,
|
|
|
isShow_jspf: true,
|
|
|
-
|
|
|
+
|
|
|
+ scores:[],
|
|
|
+ totalScore:0,
|
|
|
model: {
|
|
|
"Name": "", //姓名
|
|
|
"Class": "", //班级
|
|
|
@@ -219,42 +232,48 @@
|
|
|
this.mzIndex = e.target.value
|
|
|
},
|
|
|
updateInfo(data) {
|
|
|
- // console.log('学生管理data=',data)
|
|
|
+ console.log('学生管理data=',data)
|
|
|
this.model.Name = data.Name;
|
|
|
this.model.Class = data.Class;
|
|
|
this.model.StudentID = data.StudentID;
|
|
|
+ this.model.Id = data.Id;
|
|
|
|
|
|
- // console.log('data.UserScore',data.UserScore)
|
|
|
- // console.log('typeof(data.UserScore)=',typeof(data.UserScore))
|
|
|
if(typeof(data.UserScore) == 'string')
|
|
|
{
|
|
|
- data.UserScore = JSON.parse(data.UserScore);
|
|
|
+ this.scores = JSON.parse(data.UserScore);
|
|
|
}
|
|
|
- userController.data_scores = data.UserScore;
|
|
|
+ // console.log('this.scores=',this.scores);
|
|
|
+
|
|
|
+ userController.data_scores = this.scores;
|
|
|
this.model.Score_ylrz = userController.getScore_ylrz();
|
|
|
this.model.Score_sjkc = userController.getScore_sjck();
|
|
|
this.model.Score_xnjsdj = userController.getScore_xnjsdj();
|
|
|
this.model.Score_xnyscz = userController.getScore_xnyscz();
|
|
|
this.model.Score_jspf = userController.getScore_jspf();
|
|
|
+
|
|
|
+ this.totalScore = this.model.Score_ylrz+this.model.Score_sjkc+this.model.Score_xnjsdj+this.model.Score_xnyscz;
|
|
|
},
|
|
|
updateLearnProgress(data) {
|
|
|
-
|
|
|
+
|
|
|
+ // 进度表
|
|
|
+ // 原理认知
|
|
|
if (data[0].Score != -1) {
|
|
|
this.YLRZ_P = parseInt(data[0].Score / 10 * 100);
|
|
|
}
|
|
|
+ //实景勘察
|
|
|
if (data[1].Score != -1) {
|
|
|
this.SJKC_P = parseInt(data[1].Score / 5 * 100);
|
|
|
}
|
|
|
-
|
|
|
- let totalScore = 0;
|
|
|
+ // 虚拟实验
|
|
|
+ let aTotalScore = 0;
|
|
|
for (let i = 2; i < 16; i++) {
|
|
|
if (data[i].Score != -1) {
|
|
|
- totalScore++;
|
|
|
+ aTotalScore+=data[i].Score;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- this.XNSY_P = parseInt(totalScore / 14 * 100);
|
|
|
-
|
|
|
+
|
|
|
+ this.XNSY_P = parseInt(aTotalScore / 14 * 100);
|
|
|
+
|
|
|
//五维图
|
|
|
let aData = [];
|
|
|
let miniPoint = 0;
|
|
|
@@ -271,6 +290,7 @@
|
|
|
} else {
|
|
|
aData.push(parseInt(data[1].Score));
|
|
|
}
|
|
|
+
|
|
|
//虚拟技术搭建
|
|
|
let XNJSDJ_score = 0;
|
|
|
for (let i = 2; i < 5; i++) {
|
|
|
@@ -308,7 +328,7 @@
|
|
|
// let data = {"categories":["维度1","维度2","维度3"],"series":[{"name":"成交量1","data":[90,110,165,195,187,172]}]}
|
|
|
|
|
|
for(let i=0;i<aData.length;i++){
|
|
|
- aData[i]=aData[i]*20;
|
|
|
+ aData[i]=aData[i]*10;
|
|
|
}
|
|
|
let data = {
|
|
|
"categories": ["原理认知", "实景考察", "虚拟技术搭建", "虚拟艺术创作", "教师评分(加分项目)"],
|
|
|
@@ -355,13 +375,53 @@
|
|
|
this.isShow_jspf = false;
|
|
|
}
|
|
|
//点击"确定"
|
|
|
- else {
|
|
|
+ else
|
|
|
+ {
|
|
|
this.isShow_jspf = true;
|
|
|
- userController.setupScore_jspf(this.model.Score_jspf,function(res){
|
|
|
- // console.log("请求分数成功",res);
|
|
|
- alert("修改成功");
|
|
|
- },function(res){
|
|
|
- // console.log("请求分数失败",res);
|
|
|
+
|
|
|
+ for(let i=0;i<this.scores.length;i++)
|
|
|
+ {
|
|
|
+ this.scores[i].Score=Number(this.scores[i].Score);
|
|
|
+ }
|
|
|
+
|
|
|
+ let data = {
|
|
|
+ "UserID": this.model.Id,
|
|
|
+ "Scores": this.scores
|
|
|
+ };
|
|
|
+ // console.log('data=',data)
|
|
|
+ // console.log('url=',mydata_api + '/score/setupscore')
|
|
|
+ uni.request({
|
|
|
+ header: {
|
|
|
+ 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
+ },
|
|
|
+ url: mydata_api + '/score/setupscore',
|
|
|
+ method: 'POST',
|
|
|
+ data: data,
|
|
|
+ dataType: 'json',
|
|
|
+ success: (res) => {
|
|
|
+ //100成功
|
|
|
+ if (res.data.Code == 100) {
|
|
|
+ // console.log('suc100', res);
|
|
|
+ userController.data_scores = _self.scores;
|
|
|
+ _self.model.Score_ylrz = userController.getScore_ylrz();
|
|
|
+ _self.model.Score_sjkc = userController.getScore_sjck();
|
|
|
+ _self.model.Score_xnjsdj = userController.getScore_xnjsdj();
|
|
|
+ _self.model.Score_xnyscz = userController.getScore_xnyscz();
|
|
|
+ _self.model.Score_jspf = userController.getScore_jspf();
|
|
|
+
|
|
|
+ _self.totalScore = _self.model.Score_ylrz+_self.model.Score_sjkc+_self.model.Score_xnjsdj+_self.model.Score_xnyscz;
|
|
|
+
|
|
|
+ _self.updateLearnProgress(_self.scores)
|
|
|
+ console.log("请求分数成功",res);
|
|
|
+ }
|
|
|
+ //200失败
|
|
|
+ else {
|
|
|
+ console.log('请求分数失败200', res);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: (res) => {
|
|
|
+ console.log('请求分数失败', res);
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
@@ -577,11 +637,11 @@
|
|
|
line-height: 140rpx;
|
|
|
}
|
|
|
|
|
|
- tbody tr:hover {
|
|
|
- // color: #fff;
|
|
|
- background: #FDEBEC;
|
|
|
- // opacity: 0.08;
|
|
|
- }
|
|
|
+ // tbody tr:hover {
|
|
|
+ // // color: #fff;
|
|
|
+ // background: #FDEBEC;
|
|
|
+ // // opacity: 0.08;
|
|
|
+ // }
|
|
|
|
|
|
.m-table-hander {
|
|
|
background-color: #FFF8F7;
|
|
|
@@ -668,7 +728,18 @@
|
|
|
margin-left: px2vw(40);
|
|
|
}
|
|
|
|
|
|
- .input-jspf {
|
|
|
+ .score-jspf{
|
|
|
width: px2vw(110);
|
|
|
}
|
|
|
+
|
|
|
+ .input-jspf {
|
|
|
+ width: px2vw(110);
|
|
|
+ border: 1px solid #DDDDDD;
|
|
|
+
|
|
|
+ // display: flex;
|
|
|
+ // justify-content: center;
|
|
|
+ // // justify-content: space-around;
|
|
|
+ // align-items:center;
|
|
|
+ // flex-direction:row;
|
|
|
+ }
|
|
|
</style>
|