|
@@ -4,7 +4,6 @@
|
|
|
class="pb_content_body"
|
|
|
style="
|
|
|
background: #fff;
|
|
|
- padding: 25px 0 0;
|
|
|
box-sizing: border-box;
|
|
|
border-radius: 5px;
|
|
|
"
|
|
@@ -67,6 +66,7 @@
|
|
|
v-model="chooseDy"
|
|
|
placeholder="请选择阶段"
|
|
|
@change="searchWork1"
|
|
|
+ v-if="DState == 1"
|
|
|
>
|
|
|
<el-option label="所有阶段" value></el-option>
|
|
|
<el-option
|
|
@@ -80,6 +80,7 @@
|
|
|
v-model="chooseTask"
|
|
|
placeholder="请选择任务"
|
|
|
@change="searchWork2"
|
|
|
+ v-if="DState == 1"
|
|
|
>
|
|
|
<el-option label="所有任务" value></el-option>
|
|
|
<el-option
|
|
@@ -91,6 +92,26 @@
|
|
|
:value="item.id"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
+
|
|
|
+ <el-select
|
|
|
+ v-model="chooseTask"
|
|
|
+ placeholder="请选择任务"
|
|
|
+ @change="searchWork2"
|
|
|
+ v-else
|
|
|
+ >
|
|
|
+ <el-option label="所有任务" value></el-option>
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in dyList[0]
|
|
|
+ ? dyList[0].taskList
|
|
|
+ : []"
|
|
|
+ :key="index+'a'"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+
|
|
|
<div class="typeCheck">
|
|
|
<el-switch v-model="typeCheck"></el-switch
|
|
|
><span>查看所有学生</span>
|
|
@@ -99,7 +120,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- {{ dyList[0] }} -->
|
|
|
<div class="pb_content_body">
|
|
|
+ <div class="cutTab">
|
|
|
+ <div :class="[cutTabNum == 0 ? 'ctrlBtn2' : 'ctrlBtn']" @click="cutTabData(0)">按学生查看</div>
|
|
|
+ <div v-if="DState == 1" :class="[cutTabNum ==1 ? 'ctrlBtn2' : 'ctrlBtn']" @click="cutTabData(1)">按阶段查看</div>
|
|
|
+ <div :class="[cutTabNum == 2 ? 'ctrlBtn2' : 'ctrlBtn']" @click="cutTabData(2)">按任务查看</div>
|
|
|
+
|
|
|
+ </div>
|
|
|
<div class="student_table">
|
|
|
<el-table
|
|
|
ref="table"
|
|
@@ -112,6 +140,7 @@
|
|
|
:header-cell-style="{ background: '#f1f1f1' }"
|
|
|
:row-class-name="tableRowClassName"
|
|
|
stripe
|
|
|
+ v-if="cutTabNum ==0"
|
|
|
>
|
|
|
<el-table-column
|
|
|
prop="sName"
|
|
@@ -143,10 +172,14 @@
|
|
|
min-width="20"
|
|
|
align="center"
|
|
|
show-overflow-tooltip
|
|
|
+ v-if="DState == 1"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{ dyList.length > 0 ? dyList[!scope.row.stage ? 0 : scope.row.stage ].name : "" }}
|
|
|
+ {{ dyList[scope.row.stage].name ? dyList[scope.row.stage].name : scope.row.stage }}
|
|
|
+
|
|
|
+ <!-- {{ dyList.length > 0 ? dyList[!scope.row.stage ? 0 : scope.row.stage ].name : "" }} -->
|
|
|
+ <!-- {{ scope.row.stage,dyList }} -->
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -208,6 +241,196 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+
|
|
|
+ <el-table
|
|
|
+ ref="table"
|
|
|
+ :data="tableData"
|
|
|
+ border
|
|
|
+ :height="tableHeight"
|
|
|
+ :fit="true"
|
|
|
+ v-loading="isLoading"
|
|
|
+ style="width: 100%"
|
|
|
+ :header-cell-style="{ background: '#f1f1f1' }"
|
|
|
+ :row-class-name="tableRowClassName"
|
|
|
+ stripe
|
|
|
+ v-if="cutTabNum == 1"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ prop="sName"
|
|
|
+ label="姓名"
|
|
|
+ min-width="15"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="class"
|
|
|
+ label="班级"
|
|
|
+ min-width="20"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.class ? scope.row.class : "暂无班级" }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ prop="course"
|
|
|
+ label="阶段"
|
|
|
+ min-width="20"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ v-if="DState == 1"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ dyList[scope.row.stage].name ? dyList[scope.row.stage].name : scope.row.stage }}
|
|
|
+
|
|
|
+ <!-- {{ dyList.length > 0 ? dyList[!scope.row.stage ? 0 : scope.row.stage ].name : "" }} -->
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="course"
|
|
|
+ label="任务"
|
|
|
+ min-width="20"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{
|
|
|
+ dyList.length > 0
|
|
|
+ ? dyList[!scope.row.stage ? 0 : scope.row.stage].taskList[!scope.row.task ? 0 : scope.row.task]
|
|
|
+ ? dyList[!scope.row.stage ? 0 : scope.row.stage].taskList[!scope.row.task ? 0 : scope.row.task].name
|
|
|
+ : ""
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="time"
|
|
|
+ label="时间"
|
|
|
+ width="100px"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column align="center" label="操作" width="260px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="
|
|
|
+ lookWork(scope.row.id, scope.row.userid, 0, scope.$index)
|
|
|
+ "
|
|
|
+ >查看&批改</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="
|
|
|
+ lookWork2(scope.row.id, scope.row.userid, scope.row.courseid)
|
|
|
+ "
|
|
|
+ >导出作业</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <el-table
|
|
|
+ ref="table"
|
|
|
+ :data="tableData"
|
|
|
+ border
|
|
|
+ :height="tableHeight"
|
|
|
+ :fit="true"
|
|
|
+ v-loading="isLoading"
|
|
|
+ style="width: 100%"
|
|
|
+ :header-cell-style="{ background: '#f1f1f1' }"
|
|
|
+ :row-class-name="tableRowClassName"
|
|
|
+ stripe
|
|
|
+ v-if="cutTabNum == 2"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ prop="sName"
|
|
|
+ label="阶段"
|
|
|
+ min-width="15"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="class"
|
|
|
+ label="班级"
|
|
|
+ min-width="20"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.class ? scope.row.class : "暂无班级" }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ prop="course"
|
|
|
+ label="阶段"
|
|
|
+ min-width="20"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ v-if="DState == 1"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ dyList[scope.row.stage].name ? dyList[scope.row.stage].name : scope.row.stage }}
|
|
|
+
|
|
|
+ <!-- {{ dyList.length > 0 ? dyList[!scope.row.stage ? 0 : scope.row.stage ].name : "" }} -->
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="course"
|
|
|
+ label="任务"
|
|
|
+ min-width="20"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{
|
|
|
+ dyList.length > 0
|
|
|
+ ? dyList[!scope.row.stage ? 0 : scope.row.stage].taskList[!scope.row.task ? 0 : scope.row.task]
|
|
|
+ ? dyList[!scope.row.stage ? 0 : scope.row.stage].taskList[!scope.row.task ? 0 : scope.row.task].name
|
|
|
+ : ""
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="time"
|
|
|
+ label="时间"
|
|
|
+ width="100px"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column align="center" label="操作" width="260px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="
|
|
|
+ lookWork(scope.row.id, scope.row.userid, 0, scope.$index)
|
|
|
+ "
|
|
|
+ >查看&批改</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="
|
|
|
+ lookWork2(scope.row.id, scope.row.userid, scope.row.courseid)
|
|
|
+ "
|
|
|
+ >导出作业</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<el-dialog
|
|
|
title="查看作业"
|
|
|
:visible.sync="dialogVisible3"
|
|
@@ -219,7 +442,7 @@
|
|
|
v-loading="worksLoading"
|
|
|
>
|
|
|
<div slot="title" class="header-title">
|
|
|
- <div style="color: #fff">查看作业</div>
|
|
|
+ <div style="color: #fff">查看&批改</div>
|
|
|
<!-- <div style="position: absolute; top: 14px; right: 50px">
|
|
|
<img
|
|
|
src="../../../assets/full.png"
|
|
@@ -521,12 +744,14 @@
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
align-items: center;
|
|
|
- justify-content: center;
|
|
|
+ /* justify-content: center; */
|
|
|
flex-wrap: wrap;
|
|
|
+ margin-top: 10px;
|
|
|
+ font-size: 16px;
|
|
|
"
|
|
|
>
|
|
|
- <div style="margin-right: 20px">标题:</div>
|
|
|
- <div style="font-size: 20px">
|
|
|
+ <div style="margin-right: 10px">标题:</div>
|
|
|
+ <div>
|
|
|
{{
|
|
|
worksDetail[sIndex].askInfo[0].askInfo.askJson
|
|
|
.askTitle
|
|
@@ -1478,6 +1703,7 @@
|
|
|
layout="prev, pager, next"
|
|
|
:page-size="10"
|
|
|
:total="total"
|
|
|
+ :current-page.sync="page"
|
|
|
v-if="page"
|
|
|
@current-change="handleCurrentChange"
|
|
|
></el-pagination>
|
|
@@ -1598,7 +1824,7 @@ export default {
|
|
|
StudentData,
|
|
|
pdf,
|
|
|
},
|
|
|
- props: ["cid", "uid", "ooid"],
|
|
|
+ props: ["cid", "uid", "ooid","DState"],
|
|
|
data() {
|
|
|
return {
|
|
|
tableHeight: "500px",
|
|
@@ -1828,7 +2054,8 @@ export default {
|
|
|
checkJson: [],
|
|
|
typeCheck: false,
|
|
|
word2: require("../../../assets/icon/word2.png"),
|
|
|
- worksLoading:false
|
|
|
+ worksLoading:false,
|
|
|
+ cutTabNum:0
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -1853,10 +2080,28 @@ export default {
|
|
|
this.isLoading = true;
|
|
|
this.tableData = [];
|
|
|
if (newValue) {
|
|
|
- this.getWorks1();
|
|
|
+ if (this.cutTabNum==0) {
|
|
|
+ this.getWorks1();
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==1) {
|
|
|
+ this.getStageWorks2()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==2) {
|
|
|
+ this.getTaskWorks2()
|
|
|
+ }
|
|
|
} else {
|
|
|
this.page = 1;
|
|
|
- this.getWorks();
|
|
|
+
|
|
|
+ if (this.cutTabNum==0) {
|
|
|
+ this.getWorks()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==1) {
|
|
|
+ this.getStageWorks()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==2) {
|
|
|
+ this.getTaskWorks()
|
|
|
+ }
|
|
|
+ // this.getWorks();
|
|
|
}
|
|
|
},
|
|
|
},
|
|
@@ -1879,6 +2124,122 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ cutTabData(val){
|
|
|
+ this.cutTabNum = val;
|
|
|
+ this.page = 1;
|
|
|
+
|
|
|
+ if (this.typeCheck) {
|
|
|
+ if (val==0) {
|
|
|
+ this.getWorks1()
|
|
|
+ }
|
|
|
+ if (val==1) {
|
|
|
+ this.getStageWorks2()
|
|
|
+ }
|
|
|
+ if (val==2) {
|
|
|
+ this.getTaskWorks2()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if (val==0) {
|
|
|
+ this.getWorks()
|
|
|
+ }
|
|
|
+ if (val==1) {
|
|
|
+ this.getStageWorks()
|
|
|
+ }
|
|
|
+ if (val==2) {
|
|
|
+ this.getTaskWorks()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ getStageWorks(){
|
|
|
+ this.isLoading = true;
|
|
|
+ let params = {
|
|
|
+ cid: this.id,
|
|
|
+ uname: this.uname,
|
|
|
+ choseClass:this.choseClass,
|
|
|
+ stage: this.chooseDy,
|
|
|
+ task: this.chooseTask,
|
|
|
+ page: this.page,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "getCourseStageWorks", params) //getCourseWorks3
|
|
|
+ .then((res) => {
|
|
|
+ this.isLoading = false;
|
|
|
+ this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
|
|
|
+ this.tableData = res.data[0];
|
|
|
+ this.classArray = res.data[1]
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.isLoading = false;
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getStageWorks2(){
|
|
|
+ this.isLoading = true;
|
|
|
+ let params = {
|
|
|
+ cid: this.id,
|
|
|
+ uname: this.uname,
|
|
|
+ choseClass:this.choseClass,
|
|
|
+ stage: this.chooseDy,
|
|
|
+ task: this.chooseTask
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "getCourseStageWorks2", params) //getCourseWorks3
|
|
|
+ .then((res) => {
|
|
|
+ this.isLoading = false;
|
|
|
+ this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
|
|
|
+ this.tableData = res.data[0];
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.isLoading = false;
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getTaskWorks(){
|
|
|
+ this.isLoading = true;
|
|
|
+ let params = {
|
|
|
+ cid: this.id,
|
|
|
+ uname: this.uname,
|
|
|
+ choseClass:this.choseClass,
|
|
|
+ stage:this.DState!=1 ? 0 : this.chooseDy,
|
|
|
+ task: this.chooseTask,
|
|
|
+ page: this.page,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "getCourseTaskWorks", params) //getCourseWorks3
|
|
|
+ .then((res) => {
|
|
|
+ this.isLoading = false;
|
|
|
+ this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
|
|
|
+ this.tableData = res.data[0];
|
|
|
+ this.classArray = res.data[1]
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.isLoading = false;
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getTaskWorks2(){
|
|
|
+ this.isLoading = true;
|
|
|
+ let params = {
|
|
|
+ cid: this.id,
|
|
|
+ uname: this.uname,
|
|
|
+ choseClass:this.choseClass,
|
|
|
+ stage:this.DState!=1 ? 0 : this.chooseDy,
|
|
|
+ task: this.chooseTask
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "getCourseTaskWorks2", params) //getCourseWorks3
|
|
|
+ .then((res) => {
|
|
|
+ this.isLoading = false;
|
|
|
+ this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
|
|
|
+ this.tableData = res.data[0];
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.isLoading = false;
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
getPdf(){
|
|
|
this.worksLoading = true
|
|
|
let domHeight = this.$refs.reportPdf.offsetHeight;
|
|
@@ -1958,7 +2319,16 @@ export default {
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
this.page = val;
|
|
|
- this.getWorks();
|
|
|
+ if (this.cutTabNum==0) {
|
|
|
+ this.getWorks()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==1) {
|
|
|
+ this.getStageWorks()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==2) {
|
|
|
+ this.getTaskWorks()
|
|
|
+ }
|
|
|
+ // this.getWorks();
|
|
|
},
|
|
|
lookWork(id, uid, type, index) {
|
|
|
this.scopeId1 = id;
|
|
@@ -2076,107 +2446,107 @@ export default {
|
|
|
};
|
|
|
}
|
|
|
workJson[stagetask].time = res.data[0][k].time;
|
|
|
- // for (var i = 0; i < askInfo.length; i++) {
|
|
|
- // if (
|
|
|
- // res.data[0][k].stage == askInfo[i].stage &&
|
|
|
- // res.data[0][k].task == askInfo[i].task &&
|
|
|
- // res.data[0][k].tool == askInfo[i].tool
|
|
|
- // ) {
|
|
|
- // const element = askInfo[i];
|
|
|
- // let a = JSON.parse(element.content)[0];
|
|
|
- // let e = [];
|
|
|
- // for (var y = 0; y < a.askJson.length; y++) {
|
|
|
- // if (a.askJson[y].type == "2") {
|
|
|
- // e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
|
|
|
- // } else {
|
|
|
- // e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // a.radio = e;
|
|
|
- // workJson[stagetask].askInfo.push({
|
|
|
- // askInfo: a,
|
|
|
- // score: askInfo[i].score
|
|
|
- // ? JSON.parse(askInfo[i].score).wScore
|
|
|
- // : askInfo[i].score,
|
|
|
- // });
|
|
|
- // // checkJson[stagetask].allRight = 0;
|
|
|
- // checkJson[stagetask].allRight = 0
|
|
|
- // var isCount = 0;
|
|
|
- // for (var p = 0; p < a.radio.length; p++) {
|
|
|
- // if (!checkJson[stagetask][p]) {
|
|
|
- // checkJson[stagetask][p] = {
|
|
|
- // checkCount: [],
|
|
|
- // checkPerson: [],
|
|
|
- // };
|
|
|
- // }
|
|
|
- // if (!checkJson[stagetask][p].checkCount.length) {
|
|
|
- // checkJson[stagetask][p].checkCount = [];
|
|
|
- // let _askItemCount = a.askJson[p].askCount;
|
|
|
- // for (var aic = 0; aic < _askItemCount; aic++) {
|
|
|
- // checkJson[stagetask][p].checkCount.push(0);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (a.radio[p] instanceof Array) {
|
|
|
- // if (
|
|
|
- // workJson[stagetask].askInfo[0].askInfo.askJson[p].answer
|
|
|
- // .sort()
|
|
|
- // .join(",") == a.radio[p].sort().join(",")
|
|
|
- // ) {
|
|
|
- // checkJson[stagetask][p].right = 100;
|
|
|
- // isCount += checkJson[stagetask][p].right;
|
|
|
- // } else {
|
|
|
- // checkJson[stagetask][p].right = 0;
|
|
|
- // isCount += 0;
|
|
|
- // }
|
|
|
- // for (var q = 0; q < a.radio[p].length; q++) {
|
|
|
- // checkJson[stagetask][p].checkPerson[parseInt(a.radio[p][q])]
|
|
|
- // ? checkJson[stagetask][p].checkPerson[
|
|
|
- // parseInt(a.radio[p][q])
|
|
|
- // ].push(res.data[0][k].sName)
|
|
|
- // : (checkJson[stagetask][p].checkPerson[
|
|
|
- // parseInt(a.radio[p][q])
|
|
|
- // ] = [res.data[0][k].sName]);
|
|
|
- // checkJson[stagetask][p].checkCount[parseInt(a.radio[p][q])]
|
|
|
- // ? checkJson[stagetask][p].checkCount[
|
|
|
- // parseInt(a.radio[p][q])
|
|
|
- // ]++
|
|
|
- // : (checkJson[stagetask][p].checkCount[
|
|
|
- // parseInt(a.radio[p][q])
|
|
|
- // ] = 1);
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // if (
|
|
|
- // workJson[stagetask].askInfo[0].askInfo.askJson[p]
|
|
|
- // .answer == a.radio[p]
|
|
|
- // ) {
|
|
|
- // checkJson[stagetask][p].right = 100;
|
|
|
- // isCount += checkJson[stagetask][p].right;
|
|
|
- // } else {
|
|
|
- // checkJson[stagetask][p].right = 0;
|
|
|
- // isCount += 0;
|
|
|
- // }
|
|
|
- // if (parseInt(a.radio[p]) || parseInt(a.radio[p]) == 0) {
|
|
|
- // checkJson[stagetask][p].checkPerson[parseInt(a.radio[p])]
|
|
|
- // ? checkJson[stagetask][p].checkPerson[
|
|
|
- // parseInt(a.radio[p])
|
|
|
- // ].push(res.data[0][k].sName)
|
|
|
- // : (checkJson[stagetask][p].checkPerson[
|
|
|
- // parseInt(a.radio[p])
|
|
|
- // ] = [res.data[0][k].sName]);
|
|
|
- // checkJson[stagetask][p].checkCount[parseInt(a.radio[p])]
|
|
|
- // ? checkJson[stagetask][p].checkCount[
|
|
|
- // parseInt(a.radio[p])
|
|
|
- // ]++
|
|
|
- // : (checkJson[stagetask][p].checkCount[
|
|
|
- // parseInt(a.radio[p])
|
|
|
- // ] = 1);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // checkJson[stagetask].allRight = isCount / a.radio.length;
|
|
|
- // }
|
|
|
- // }
|
|
|
- console.log(checkJson);
|
|
|
+ for (var i = 0; i < askInfo.length; i++) {
|
|
|
+ if (
|
|
|
+ res.data[0][k].stage == askInfo[i].stage &&
|
|
|
+ res.data[0][k].task == askInfo[i].task &&
|
|
|
+ res.data[0][k].tool == askInfo[i].tool
|
|
|
+ ) {
|
|
|
+ const element = askInfo[i];
|
|
|
+ let a = JSON.parse(element.content)[0];
|
|
|
+ let e = [];
|
|
|
+ for (var y = 0; y < a.askJson.length; y++) {
|
|
|
+ if (a.askJson[y].type == "2") {
|
|
|
+ e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
|
|
|
+ } else {
|
|
|
+ e.push(JSON.parse(askInfo[i].content)[0].anwer[y]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ a.radio = e;
|
|
|
+ workJson[stagetask].askInfo.push({
|
|
|
+ askInfo: a,
|
|
|
+ score: askInfo[i].score
|
|
|
+ ? JSON.parse(askInfo[i].score).wScore
|
|
|
+ : askInfo[i].score,
|
|
|
+ });
|
|
|
+ // checkJson[stagetask].allRight = 0;
|
|
|
+ checkJson[stagetask].allRight = 0
|
|
|
+ var isCount = 0;
|
|
|
+ for (var p = 0; p < a.radio.length; p++) {
|
|
|
+ if (!checkJson[stagetask][p]) {
|
|
|
+ checkJson[stagetask][p] = {
|
|
|
+ checkCount: [],
|
|
|
+ checkPerson: [],
|
|
|
+ };
|
|
|
+ }
|
|
|
+ if (!checkJson[stagetask][p].checkCount.length) {
|
|
|
+ checkJson[stagetask][p].checkCount = [];
|
|
|
+ let _askItemCount = a.askJson[p].askCount;
|
|
|
+ for (var aic = 0; aic < _askItemCount; aic++) {
|
|
|
+ checkJson[stagetask][p].checkCount.push(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (a.radio[p] instanceof Array) {
|
|
|
+ if (
|
|
|
+ workJson[stagetask].askInfo[0].askInfo.askJson[p].answer
|
|
|
+ .sort()
|
|
|
+ .join(",") == a.radio[p].sort().join(",")
|
|
|
+ ) {
|
|
|
+ checkJson[stagetask][p].right = 100;
|
|
|
+ isCount += checkJson[stagetask][p].right;
|
|
|
+ } else {
|
|
|
+ checkJson[stagetask][p].right = 0;
|
|
|
+ isCount += 0;
|
|
|
+ }
|
|
|
+ for (var q = 0; q < a.radio[p].length; q++) {
|
|
|
+ checkJson[stagetask][p].checkPerson[parseInt(a.radio[p][q])]
|
|
|
+ ? checkJson[stagetask][p].checkPerson[
|
|
|
+ parseInt(a.radio[p][q])
|
|
|
+ ].push(res.data[0][k].sName)
|
|
|
+ : (checkJson[stagetask][p].checkPerson[
|
|
|
+ parseInt(a.radio[p][q])
|
|
|
+ ] = [res.data[0][k].sName]);
|
|
|
+ checkJson[stagetask][p].checkCount[parseInt(a.radio[p][q])]
|
|
|
+ ? checkJson[stagetask][p].checkCount[
|
|
|
+ parseInt(a.radio[p][q])
|
|
|
+ ]++
|
|
|
+ : (checkJson[stagetask][p].checkCount[
|
|
|
+ parseInt(a.radio[p][q])
|
|
|
+ ] = 1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (
|
|
|
+ workJson[stagetask].askInfo[0].askInfo.askJson[p]
|
|
|
+ .answer == a.radio[p]
|
|
|
+ ) {
|
|
|
+ checkJson[stagetask][p].right = 100;
|
|
|
+ isCount += checkJson[stagetask][p].right;
|
|
|
+ } else {
|
|
|
+ checkJson[stagetask][p].right = 0;
|
|
|
+ isCount += 0;
|
|
|
+ }
|
|
|
+ if (parseInt(a.radio[p]) || parseInt(a.radio[p]) == 0) {
|
|
|
+ checkJson[stagetask][p].checkPerson[parseInt(a.radio[p])]
|
|
|
+ ? checkJson[stagetask][p].checkPerson[
|
|
|
+ parseInt(a.radio[p])
|
|
|
+ ].push(res.data[0][k].sName)
|
|
|
+ : (checkJson[stagetask][p].checkPerson[
|
|
|
+ parseInt(a.radio[p])
|
|
|
+ ] = [res.data[0][k].sName]);
|
|
|
+ checkJson[stagetask][p].checkCount[parseInt(a.radio[p])]
|
|
|
+ ? checkJson[stagetask][p].checkCount[
|
|
|
+ parseInt(a.radio[p])
|
|
|
+ ]++
|
|
|
+ : (checkJson[stagetask][p].checkCount[
|
|
|
+ parseInt(a.radio[p])
|
|
|
+ ] = 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ checkJson[stagetask].allRight = isCount / a.radio.length;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // console.log(checkJson);
|
|
|
for (var i = 0; i < chooseInfo.length; i++) {
|
|
|
if (
|
|
|
res.data[0][k].stage == chooseInfo[i].stage &&
|
|
@@ -2638,10 +3008,11 @@ export default {
|
|
|
}
|
|
|
|
|
|
this.worksDetail = result;
|
|
|
- console.log('this.worksDetail',this.worksDetail);
|
|
|
+ // console.log('this.worksDetail',this.worksDetail);
|
|
|
|
|
|
|
|
|
this.courseDetail = res.data[0][0];
|
|
|
+// console.log('this.courseDetail',);
|
|
|
|
|
|
this.$forceUpdate;
|
|
|
this.dialogVisible3 = true;
|
|
@@ -2836,11 +3207,66 @@ export default {
|
|
|
searchWork1() {
|
|
|
this.page = 1;
|
|
|
this.chooseTask = "";
|
|
|
- this.getWorks();
|
|
|
+ if (this.typeCheck) {
|
|
|
+ if (this.cutTabNum==0) {
|
|
|
+ this.getWorks1()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==1) {
|
|
|
+ this.getStageWorks2()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==2) {
|
|
|
+ this.getTaskWorks2()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if (this.cutTabNum==0) {
|
|
|
+ this.getWorks()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==1) {
|
|
|
+ this.getStageWorks()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==2) {
|
|
|
+ this.getTaskWorks()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // if (this.cutTabNum==0) {
|
|
|
+ // this.getWorks()
|
|
|
+ // }
|
|
|
+ // if (this.cutTabNum==1) {
|
|
|
+ // this.getStageWorks()
|
|
|
+ // }
|
|
|
+ // if (this.cutTabNum==2) {
|
|
|
+ // this.getTaskWorks()
|
|
|
+ // }
|
|
|
+ // this.getWorks();
|
|
|
},
|
|
|
searchWork2() {
|
|
|
this.page = 1;
|
|
|
- this.getWorks();
|
|
|
+ // console.log(this.typeCheck);
|
|
|
+
|
|
|
+ if (this.typeCheck) {
|
|
|
+ if (this.cutTabNum==0) {
|
|
|
+ this.getWorks1()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==1) {
|
|
|
+ this.getStageWorks2()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==2) {
|
|
|
+ this.getTaskWorks2()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if (this.cutTabNum==0) {
|
|
|
+ this.getWorks()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==1) {
|
|
|
+ this.getStageWorks()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==2) {
|
|
|
+ this.getTaskWorks()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // this.getWorks();
|
|
|
},
|
|
|
// fullTools() {
|
|
|
// this.full = !this.full;
|
|
@@ -2913,7 +3339,16 @@ export default {
|
|
|
this.studentLoading = false;
|
|
|
this.dyList = dyList;
|
|
|
this.userAarray = res.data[1];
|
|
|
- this.getWorks();
|
|
|
+ if (this.cutTabNum==0) {
|
|
|
+ this.getWorks()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==1) {
|
|
|
+ this.getStageWorks()
|
|
|
+ }
|
|
|
+ if (this.cutTabNum==2) {
|
|
|
+ this.getTaskWorks()
|
|
|
+ }
|
|
|
+ // this.getWorks();
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.error(err);
|
|
@@ -3773,8 +4208,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
.student_head {
|
|
|
- margin-top: 10px;
|
|
|
- padding-bottom: 15px;
|
|
|
+ /* margin-top: 10px;
|
|
|
+ padding-bottom: 15px; */
|
|
|
+ padding: 20px 0;
|
|
|
}
|
|
|
|
|
|
.student_search {
|
|
@@ -4497,7 +4933,7 @@ export default {
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
margin: 10px 0;
|
|
|
- font-size: 18px;
|
|
|
+ /* font-size: 18px; */
|
|
|
}
|
|
|
|
|
|
.a_add_head .a_add_head_input {
|
|
@@ -4514,6 +4950,9 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
+.a_add_body >>> .el-radio__label{
|
|
|
+font-size: 14px !important;
|
|
|
+}
|
|
|
|
|
|
.a_add_input {
|
|
|
display: flex;
|
|
@@ -5438,4 +5877,21 @@ ol {
|
|
|
object-fit: contain;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
+.cutTab {
|
|
|
+ display: flex;
|
|
|
+ margin: 10px 0;
|
|
|
+}
|
|
|
+.cutTab > .ctrlBtn {
|
|
|
+ margin-right: 15px;
|
|
|
+ padding: 5px 0;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.cutTab > .ctrlBtn2 {
|
|
|
+ cursor: pointer;
|
|
|
+ margin-right: 15px;
|
|
|
+ border-bottom: 3px #409EFF solid;
|
|
|
+ font-weight: 600;
|
|
|
+ padding: 5px 0;
|
|
|
+ color: #409EFF;
|
|
|
+}
|
|
|
</style>
|