|
@@ -12,7 +12,8 @@
|
|
|
<i class="iconfont iconyuejuan"></i> <span>阅卷任务</span>
|
|
|
</li>
|
|
|
<li @click="jump('/work_analysis')">
|
|
|
- <i class="iconfont iconzuoye1"></i><span>{{navKey==2?'作业分析':'成绩分析'}}</span>
|
|
|
+ <i class="iconfont iconzuoye1"></i
|
|
|
+ ><span>{{ navKey == 2 ? "作业分析" : "成绩分析" }}</span>
|
|
|
</li>
|
|
|
<!-- <li @click="jump()">
|
|
|
<i class="iconfont iconcuoti1"></i><span>错题分析</span>
|
|
@@ -20,25 +21,32 @@
|
|
|
</div>
|
|
|
<div class="rightContent">
|
|
|
<div class="recordTitle">
|
|
|
- <span>{{navKey==2?'作业中心':'考试中心'}} > </span>
|
|
|
+ <span>{{ navKey == 2 ? "作业中心" : "考试中心" }} > </span>
|
|
|
<span @click="jump('/task')" class="black">阅卷任务 ></span>
|
|
|
<span>{{ title }}</span>
|
|
|
</div>
|
|
|
<div class="d-f j-s screen">
|
|
|
<div>
|
|
|
- <span :class="i==nav_id?'active':''" v-for="(item,i) in nav_list" :key='i+"k"' @click="navChange(i)">{{item}}</span>
|
|
|
+ <span
|
|
|
+ :class="i == nav_id ? 'active' : ''"
|
|
|
+ v-for="(item, i) in nav_list"
|
|
|
+ :key="i + 'k'"
|
|
|
+ @click="navChange(i)"
|
|
|
+ >{{ item }}</span
|
|
|
+ >
|
|
|
</div>
|
|
|
- <div @click="sure_submit(tk_list[selectId].id,score)">确认提交</div>
|
|
|
+ <div @click="sure_submit(tk_list[selectId].id, score)">确认提交</div>
|
|
|
</div>
|
|
|
<div class="d-f">
|
|
|
- <div class="tk_box" v-if="nav_id!=1">
|
|
|
- <div class="d-f j-s title" v-if="tk_list.length>0">
|
|
|
+ <div class="tk_box" v-if="nav_id != 1">
|
|
|
+ <div class="d-f j-s title" v-if="tk_list.length > 0">
|
|
|
<span
|
|
|
- >第 <span class="blue">{{tk_list[0].qno }}</span> 题</span
|
|
|
+ >第 <span class="blue">{{ tk_list[0].qno }}</span> 题</span
|
|
|
>
|
|
|
<span
|
|
|
><span class="blue">{{ selectId + 1 }}</span>
|
|
|
- <span class="gray">/{{ student_total}}</span></span>
|
|
|
+ <span class="gray">/ {{ student_total }}人</span></span
|
|
|
+ >
|
|
|
</div>
|
|
|
<div class="tk_list">
|
|
|
<li
|
|
@@ -50,15 +58,8 @@
|
|
|
>
|
|
|
<div class="d-f j-s tk_name">
|
|
|
<span>{{ i + 1 }}.{{ item.student_name }}</span>
|
|
|
- <span
|
|
|
- :class="
|
|
|
- item.status ? 'reds' : ''
|
|
|
- "
|
|
|
- >{{
|
|
|
- item.status
|
|
|
- ? item.marked_score
|
|
|
- : "--"
|
|
|
- }}分</span
|
|
|
+ <span :class="item.status ? 'reds' : ''"
|
|
|
+ >{{ item.status ? item.marked_score : "--" }}分</span
|
|
|
>
|
|
|
</div>
|
|
|
<div class="img_box">
|
|
@@ -79,14 +80,7 @@
|
|
|
<div class="d-f j-s tk_name">
|
|
|
<span>{{ i + 1 }}.{{ item.student_name }}</span>
|
|
|
<span
|
|
|
- :class="
|
|
|
- item.status? 'reds' : ''
|
|
|
- "
|
|
|
- >{{
|
|
|
- item.status
|
|
|
- ? item.marked_score
|
|
|
- : "--"
|
|
|
- }}分</span
|
|
|
+ >{{ item.marked_amount}} / {{ item.question_amount}}题</span
|
|
|
>
|
|
|
</div>
|
|
|
</li>
|
|
@@ -146,39 +140,89 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="d-f j-s tk-foot">
|
|
|
- <div class="py_jd" v-if="nav_id!=1">
|
|
|
+ <div class="py_jd" v-if="nav_id != 1">
|
|
|
<div class="tk_tit">批阅进度</div>
|
|
|
<div class="tk_num">
|
|
|
<li
|
|
|
v-for="(item, i) in tk_num"
|
|
|
:key="i + '批阅'"
|
|
|
class="d-f j-s"
|
|
|
- :class="i == (tk_list[0].qno-1) ? 'active' : ''"
|
|
|
- @click="pnoChange(i,item.marked_amount,item.question_amount)"
|
|
|
+ :class="i == num_index ? 'active' : ''"
|
|
|
+ @click="
|
|
|
+ pnoChange(
|
|
|
+ i,
|
|
|
+ item.qno,
|
|
|
+ item.marked_amount,
|
|
|
+ item.question_amount
|
|
|
+ )
|
|
|
+ "
|
|
|
>
|
|
|
<span>第{{ item.qno }}题</span>
|
|
|
<el-progress
|
|
|
- :percentage="item.marked_amount == 0 ? 0 : (item.marked_amount / item.question_amount) * 100"
|
|
|
+ :percentage="
|
|
|
+ item.marked_amount == 0
|
|
|
+ ? 0
|
|
|
+ : (item.marked_amount / item.question_amount) * 100
|
|
|
+ "
|
|
|
:stroke-width="10"
|
|
|
- :color="item.marked_amount == item.question_amount ? '#0A9DFF' : '#FA0A2F'"
|
|
|
+ :color="
|
|
|
+ item.marked_amount == item.question_amount
|
|
|
+ ? '#0A9DFF'
|
|
|
+ : '#FA0A2F'
|
|
|
+ "
|
|
|
></el-progress>
|
|
|
- <span>{{ item.marked_amount }}/{{ item.question_amount}}</span>
|
|
|
+ <span
|
|
|
+ >{{ item.marked_amount }} / {{ item.question_amount }}人</span
|
|
|
+ >
|
|
|
</li>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="py_jd" v-else>
|
|
|
- <div class="tk_tit">试题</div>
|
|
|
+ <div class="d-f j-s ">
|
|
|
+ <div class="tk_tit">试题</div>
|
|
|
+ <li class="d-f task_num">
|
|
|
+ <span>第{{ tk_num[num_index].qno }}题</span>
|
|
|
+ <el-progress
|
|
|
+ :percentage="
|
|
|
+ tk_list[selectId].marked_amount == 0
|
|
|
+ ? 0
|
|
|
+ : (tk_list[selectId].marked_amount / tk_list[selectId].question_amount) * 100
|
|
|
+ "
|
|
|
+ :stroke-width="10"
|
|
|
+ :color="
|
|
|
+ tk_list[selectId].marked_amount == tk_list[selectId].question_amount
|
|
|
+ ? '#0A9DFF'
|
|
|
+ : '#FA0A2F'
|
|
|
+ "
|
|
|
+ ></el-progress>
|
|
|
+ <span
|
|
|
+ >{{ tk_list[selectId].marked_amount }} / {{tk_list[selectId].question_amount }}题</span
|
|
|
+ >
|
|
|
+ </li>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div class="d-f st_tk_num">
|
|
|
<li
|
|
|
v-for="(item, i) in tk_num"
|
|
|
:key="i + '批阅'"
|
|
|
- :class="i == (tk_list[0].qno-1) ? 'active' : ''"
|
|
|
- @click="pnoChange(i,item.marked_amount,item.question_amount)"
|
|
|
+ :class="i == num_index ? 'active' : ''"
|
|
|
+ @click="
|
|
|
+ pnoChange(
|
|
|
+ i,
|
|
|
+ item.qno,
|
|
|
+ item.marked_amount,
|
|
|
+ item.question_amount
|
|
|
+ )
|
|
|
+ "
|
|
|
>
|
|
|
<div class="img_box">
|
|
|
- <img src="../../assets/tk_img.png" alt="" />
|
|
|
- </div>
|
|
|
- <span>第{{ item.qno}}题</span>
|
|
|
+ <img src="../../assets/tk_img.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>第{{ item.qno }}题</span>
|
|
|
+ <span v-if="tk_list[selectId].qno == item.qno">({{tk_list[selectId].marked_score}})分</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
</li>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -187,11 +231,15 @@
|
|
|
<div>
|
|
|
<span class="df">智能阅卷打分版</span>
|
|
|
<div class="ts_num">
|
|
|
- <span>第{{ num_id + 1}}题</span>
|
|
|
- <span v-if="tk_list&&tk_list.length>0">满分:{{tk_list[selectId].score}}分</span>
|
|
|
+ <span>第{{ num_id + 1 }}题</span>
|
|
|
+ <span v-if="tk_list && tk_list.length > 0"
|
|
|
+ >满分:{{ tk_list[selectId].score }}分</span
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="tk_fs"><el-input type="text" v-model="score"/></div>
|
|
|
+ <div class="tk_fs">
|
|
|
+ <el-input type="text" v-model="score" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="d-f j-s dfp_box">
|
|
|
<div class="tk_dfp">
|
|
@@ -199,7 +247,7 @@
|
|
|
<span
|
|
|
v-for="(item, i) in 3"
|
|
|
:key="i + '1-3'"
|
|
|
- @click="scoreChnage(i + 1) "
|
|
|
+ @click="scoreChnage(i + 1)"
|
|
|
>{{ i + 1 }}</span
|
|
|
>
|
|
|
</li>
|
|
@@ -220,14 +268,18 @@
|
|
|
>
|
|
|
</li>
|
|
|
<li>
|
|
|
- <span @click="score=tk_list[selectId].score">满分</span>
|
|
|
+ <span @click="score = tk_list[selectId].score">满分</span>
|
|
|
<span @click="scoreChnage(0)">0</span>
|
|
|
<span @click="score = ''">X</span>
|
|
|
</li>
|
|
|
</div>
|
|
|
<div class="tk_qh">
|
|
|
- <span @click="per_tk">上一题</span>
|
|
|
- <span @click="next_tk">下一题</span>
|
|
|
+ <span @click="per_tk">{{
|
|
|
+ nav_id == 1 ? "上一题" : "上一位"
|
|
|
+ }}</span>
|
|
|
+ <span @click="next_tk">{{
|
|
|
+ nav_id == 1 ? "下一题" : "下一位"
|
|
|
+ }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -240,13 +292,26 @@
|
|
|
<!--查看答案 -->
|
|
|
<div class="bg_box" v-if="is_answer">
|
|
|
<div class="answers">
|
|
|
- <span class="el-icon-circle-close" @click="is_answer=false"></span>
|
|
|
- <!-- <img :src="answer.full_img" alt=""> -->
|
|
|
- <div> <span>答案:</span> <span class="option">{{answer.answer}}</span></div>
|
|
|
- <div> <span>解析:</span> <span v-html="answer.analysis"></span></div>
|
|
|
+ <span class="el-icon-circle-close" @click="is_answer = false"></span>
|
|
|
+ <!-- <img :src="answer.full_img" alt=""> -->
|
|
|
+ <div>
|
|
|
+ <span>答案:</span> <span class="option">{{ answer.answer }}</span>
|
|
|
+ </div>
|
|
|
+ <div><span>解析:</span> <span v-html="answer.analysis"></span></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <full v-if="full" @sign="sign" @fatherMethod='review_succ' :tk_lists='tk_list' :tk_nums='tk_num' :selectIds='selectId' :num_ids='num_id' :navIds='nav_id' @pnoChange='pnoChange'></full>
|
|
|
+ <full
|
|
|
+ v-if="full"
|
|
|
+ @sign="sign"
|
|
|
+ @fatherMethod="review_succ"
|
|
|
+ :tk_lists="tk_list"
|
|
|
+ :tk_nums="tk_num"
|
|
|
+ :selectIds="selectId"
|
|
|
+ :num_ids="num_id"
|
|
|
+ :navIds="nav_id"
|
|
|
+ :processs ='process'
|
|
|
+ @pnoChange="pnoChange"
|
|
|
+ ></full>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -255,28 +320,29 @@ import topHead from "@/components/assembly/head";
|
|
|
import foot from "@/components/assembly/foot";
|
|
|
import full from "@/components/assembly/tk_st_qp";
|
|
|
import { fabric } from "fabric";
|
|
|
-import {base64 } from "@/util/api";
|
|
|
-import { get, put } from "@/util/common.js";
|
|
|
+import { base64 ,taskshg} from "@/util/api";
|
|
|
+import { get, put} from "@/util/common.js";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- is_answer:false,
|
|
|
+ is_answer: false,
|
|
|
base64s: "",
|
|
|
params: {
|
|
|
region: "全部",
|
|
|
},
|
|
|
- nav_list:['按试题批阅','按学生批阅'],
|
|
|
- nav_id:0,
|
|
|
+ nav_list: ["按试题批阅", "按学生批阅"],
|
|
|
+ nav_id: 0,
|
|
|
listP: {
|
|
|
page: 1,
|
|
|
size: 100,
|
|
|
- qno:0,
|
|
|
+ qno: "",
|
|
|
},
|
|
|
title: "",
|
|
|
full: false,
|
|
|
score: "",
|
|
|
selectId: 0,
|
|
|
num_id: 0,
|
|
|
+ num_index: 0,
|
|
|
mouseFrom: {},
|
|
|
mouseTo: {},
|
|
|
moveCount: 1,
|
|
@@ -350,20 +416,26 @@ export default {
|
|
|
tk_list: [],
|
|
|
id: "",
|
|
|
student_total: 0,
|
|
|
- pid:'',
|
|
|
- answer:{},
|
|
|
- navKey:'',
|
|
|
- lock:true,
|
|
|
+ pid: "",
|
|
|
+ answer: {},
|
|
|
+ navKey: "",
|
|
|
+ lock: true,
|
|
|
+ is_df_success: false,
|
|
|
+ process:[],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.navKey = localStorage.getItem('navKey');
|
|
|
+ this.navKey = localStorage.getItem("navKey");
|
|
|
this.title = this.$route.query.title;
|
|
|
this.id = this.$route.query.id;
|
|
|
this.pid = this.$route.query.tid;
|
|
|
-
|
|
|
- this.getquestions(this.listP);
|
|
|
- this.getpaperjd();
|
|
|
+ this.getpaperjd();
|
|
|
+ var obj = this.id+'/stu-process'
|
|
|
+ taskshg(obj).then(res=>{
|
|
|
+ if(res.errcode==0){
|
|
|
+ this.process = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
mounted() {
|
|
|
//初始化canvas
|
|
@@ -376,84 +448,103 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
//查看答案
|
|
|
- seeAnswer(){
|
|
|
+ seeAnswer() {
|
|
|
var that = this;
|
|
|
- get('v1/api/papers/'+this.tk_list[this.selectId].pid+'/questions/'+this.tk_list[this.selectId].qno+'-'+this.tk_list[this.selectId].sqno+'/answer').then(res=>{
|
|
|
- if(res.errcode==0){
|
|
|
+ get(
|
|
|
+ "v1/api/papers/" +
|
|
|
+ this.tk_list[this.selectId].pid +
|
|
|
+ "/questions/" +
|
|
|
+ this.tk_list[this.selectId].qno +
|
|
|
+ "-" +
|
|
|
+ this.tk_list[this.selectId].sqno +
|
|
|
+ "/answer"
|
|
|
+ ).then((res) => {
|
|
|
+ if (res.errcode == 0) {
|
|
|
that.answer = res.data;
|
|
|
- that.is_answer=true;
|
|
|
+ that.is_answer = true;
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
- //打分板
|
|
|
- scoreChnage(i){
|
|
|
- this.score = this.score.length<2? this.score+i.toString():i.toString()
|
|
|
+ //打分板
|
|
|
+ scoreChnage(i) {
|
|
|
+ this.score =
|
|
|
+ this.score.length < 2 ? this.score + i.toString() : i.toString();
|
|
|
},
|
|
|
//切换nav
|
|
|
- navChange(i){
|
|
|
- this.nav_id = i
|
|
|
+ navChange(i) {
|
|
|
+ this.nav_id = i;
|
|
|
// if(i==1){
|
|
|
// this.getpaper();
|
|
|
// }else{
|
|
|
- // this.getpaperjd();
|
|
|
+ // this.getpaperjd();
|
|
|
// }
|
|
|
},
|
|
|
//切换试题
|
|
|
- pnoChange(i,num,py_num){
|
|
|
- console.log(num,py_num)
|
|
|
- if(num==py_num){
|
|
|
- this.$message.warning('第'+(i+1)+'题已经批阅完成~')
|
|
|
- return
|
|
|
- }
|
|
|
- this.num_id = i;
|
|
|
+ pnoChange(i, qmo, num, py_num) {
|
|
|
+ this.num_id = qmo;
|
|
|
+ this.num_index = i;
|
|
|
var p = this.listP;
|
|
|
- p.qno= i+1
|
|
|
- this.getquestions(p)
|
|
|
+ p.qno = qmo;
|
|
|
+ if (this.nav_id != 1) {
|
|
|
+ this.selectId = 0;
|
|
|
+ }
|
|
|
+ this.getquestions(p);
|
|
|
},
|
|
|
//试题进度
|
|
|
- getpaperjd(){
|
|
|
- var that = this;
|
|
|
- get("/v1/api/tasks/"+ this.id +"/process").then((res) => {
|
|
|
- if (res.errcode == 0) {
|
|
|
- that.tk_num = res.data;
|
|
|
- }
|
|
|
- });
|
|
|
+ getpaperjd() {
|
|
|
+ var that = this;
|
|
|
+ console.log(that.listP.qno);
|
|
|
+ get("/v1/api/tasks/" + this.id + "/process").then((res) => {
|
|
|
+ if (res.errcode == 0) {
|
|
|
+ that.tk_num = res.data;
|
|
|
+ if (!this.is_df_success) {
|
|
|
+ that.listP.qno = res.data[0].qno;
|
|
|
+ }
|
|
|
+ that.num_id = res.data[0].qno;
|
|
|
+ that.getquestions(this.listP);
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
//确认提交
|
|
|
- sure_submit(id,score) {
|
|
|
- if(!this.lock){
|
|
|
+ sure_submit(id, score) {
|
|
|
+ if (!this.lock) {
|
|
|
this.$message.warning("正在打分中~");
|
|
|
- return;
|
|
|
+ return;
|
|
|
}
|
|
|
this.lock = false;
|
|
|
- var pattern=/^([1-9]\d*|0)$/;
|
|
|
+ var that = this;
|
|
|
+ setTimeout(() => {
|
|
|
+ that.lock = true;
|
|
|
+ }, 2000);
|
|
|
+ var pattern = /^([1-9]\d*|0)$/;
|
|
|
if (!score) {
|
|
|
this.$message.warning("还没打分哦~");
|
|
|
return;
|
|
|
- }else if(!pattern.test(this.score)){
|
|
|
- this.$message.warning('分数输入不正确');
|
|
|
- return
|
|
|
- }else if(Number(this.score) > this.tk_list[this.selectId].score){
|
|
|
- this.$message.warning('批阅得分大于试题满分,本题满分为:'+this.tk_list[this.selectId].score+'分');
|
|
|
- return
|
|
|
+ } else if (!pattern.test(this.score)) {
|
|
|
+ this.$message.warning("分数输入不正确");
|
|
|
+ return;
|
|
|
+ } else if (Number(this.score) > this.tk_list[this.selectId].score) {
|
|
|
+ this.$message.warning(
|
|
|
+ "批阅得分大于试题满分,本题满分为:" +
|
|
|
+ this.tk_list[this.selectId].score +
|
|
|
+ "分"
|
|
|
+ );
|
|
|
+ return;
|
|
|
}
|
|
|
- setTimeout(()=>{
|
|
|
- that.lock = true;
|
|
|
- },2000)
|
|
|
- this.downLoadImage(id,score);
|
|
|
+
|
|
|
+ this.downLoadImage(id, score);
|
|
|
},
|
|
|
- downLoadImage(topic_id,score) {
|
|
|
+ downLoadImage(topic_id, score) {
|
|
|
this.done = true;
|
|
|
- var text = new fabric.Textbox('2', {
|
|
|
- left: 500,
|
|
|
- top: 500,
|
|
|
- width: 220,
|
|
|
- fontSize: 18,
|
|
|
+ var text = new fabric.Textbox(score + "分", {
|
|
|
+ left: 690,
|
|
|
+ top: 30,
|
|
|
+ width: 20,
|
|
|
+ fontSize: 32,
|
|
|
fill: this.drawColor,
|
|
|
hasControls: true,
|
|
|
});
|
|
|
this.fabricObj.add(text);
|
|
|
- return
|
|
|
//生成双倍像素比的图片
|
|
|
let base64URl = this.fabricObj.toDataURL({
|
|
|
formart: "jpg",
|
|
@@ -465,26 +556,31 @@ export default {
|
|
|
var that = this;
|
|
|
base64({
|
|
|
content: base64URl,
|
|
|
- filename: this.tk_list[this.selectId].student_sno+this.tk_list[this.selectId].id+this.tk_list[this.selectId].student_id+Date.parse(new Date()),
|
|
|
+ filename:
|
|
|
+ this.tk_list[this.selectId].student_sno +
|
|
|
+ this.tk_list[this.selectId].id +
|
|
|
+ this.tk_list[this.selectId].student_id +
|
|
|
+ Date.parse(new Date()),
|
|
|
}).then((res) => {
|
|
|
if (res.errcode == 0) {
|
|
|
that.tk_list[that.selectId].qimg = res.data;
|
|
|
- that.review_succ(res.data, topic_id,score);
|
|
|
+ that.review_succ(res.data, topic_id, score);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
//提交
|
|
|
- review_succ(img_url, topic_id,score) {
|
|
|
+ review_succ(img_url, topic_id, score) {
|
|
|
var that = this;
|
|
|
- put("/v1/api/tasks/"+this.id+"/questions/" + topic_id, {
|
|
|
+ put("/v1/api/tasks/" + this.id + "/questions/" + topic_id, {
|
|
|
score: score,
|
|
|
img: img_url,
|
|
|
}).then((res) => {
|
|
|
if (res.errcode == 0) {
|
|
|
// console.log( that.tk_list,that.selectId)
|
|
|
- that.tk_list[that.selectId].marked_score = score;
|
|
|
- that.tk_list[that.selectId].status = true;
|
|
|
- that.$message.success('批阅成功')
|
|
|
+ that.tk_list[that.selectId].marked_score = score;
|
|
|
+ that.tk_list[that.selectId].status = true;
|
|
|
+ that.is_df_success = true;
|
|
|
+ that.$message.success("批阅成功");
|
|
|
that.getpaperjd();
|
|
|
}
|
|
|
});
|
|
@@ -495,7 +591,7 @@ export default {
|
|
|
this.fabricObj.clear();
|
|
|
// this.initCanvas(img);
|
|
|
var that = this;
|
|
|
- this.getUrlBase64(img, function (base64,tmpimg) {
|
|
|
+ this.getUrlBase64(img, function (base64, tmpimg) {
|
|
|
that.base64s = base64;
|
|
|
// console.log('base64编码值',base64);//base64编码值
|
|
|
var imgElement = that.$refs.imgElement;
|
|
@@ -517,13 +613,25 @@ export default {
|
|
|
//获取试题批阅列表
|
|
|
getquestions(p) {
|
|
|
var that = this;
|
|
|
- get("/v1/api/tasks/"+this.id+"/questions", p).then((res) => {
|
|
|
+ get("/v1/api/tasks/" + this.id + "/questions", p).then((res) => {
|
|
|
console.log(res);
|
|
|
if (res.errcode == 0) {
|
|
|
+ res.data.forEach(item=>{
|
|
|
+ this.process.forEach(ite=>{
|
|
|
+ if(item.student_id == ite.student_id){
|
|
|
+ item.question_amount = ite.question_amount
|
|
|
+ item.marked_amount = ite.marked_amount
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ })
|
|
|
that.tk_list = res.data;
|
|
|
that.student_total = res.total;
|
|
|
- if(that.listP.page ==1){
|
|
|
- that.choice_student(that.selectId, that.tk_list[that.selectId].qimg)
|
|
|
+ if (that.listP.page == 1) {
|
|
|
+ that.choice_student(
|
|
|
+ that.selectId,
|
|
|
+ that.tk_list[that.selectId].qimg
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -544,33 +652,85 @@ export default {
|
|
|
// }
|
|
|
// });
|
|
|
// },
|
|
|
- sign(id,selectid) {
|
|
|
+ sign(id, selectid) {
|
|
|
this.full = id == 1 ? false : true;
|
|
|
- this.selectId = selectid
|
|
|
+ this.selectId = selectid;
|
|
|
},
|
|
|
//下一题
|
|
|
next_tk() {
|
|
|
- if (this.num_id == this.tk_num.length - 1) {
|
|
|
- this.$message({
|
|
|
- message: "已经是最后一题了哦",
|
|
|
- type: "warning",
|
|
|
- });
|
|
|
+ if (this.nav_id == 1) {
|
|
|
+ if (this.num_index == this.tk_num.length - 1) {
|
|
|
+ this.sure_submit(this.tk_list[this.selectId].id, this.score);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$message(
|
|
|
+ {
|
|
|
+ message: "已经是最后一题了哦,可选择下一个学生进行批阅",
|
|
|
+ type: "warning",
|
|
|
+ },
|
|
|
+ 1000
|
|
|
+ );
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.is_df_success = false;
|
|
|
+ this.sure_submit(this.tk_list[this.selectId].id, this.score);
|
|
|
+ setTimeout(() => {
|
|
|
+ if (this.is_df_success) {
|
|
|
+ this.num_index = this.num_index + 1;
|
|
|
+ this.pnoChange(this.num_index, this.tk_num[this.num_index].qno);
|
|
|
+ this.choice_student(
|
|
|
+ this.selectId,
|
|
|
+ this.tk_list[this.selectId].qimg
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }, 2000);
|
|
|
+ }
|
|
|
} else {
|
|
|
- this.num_id = this.num_id + 1;
|
|
|
- this.pnoChange(this.num_id)
|
|
|
+ if (this.selectId == this.tk_list.length - 1) {
|
|
|
+ this.sure_submit(this.tk_list[this.selectId].id, this.score);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$message({
|
|
|
+ message: "已经是最后一位了哦,请选择下一题",
|
|
|
+ type: "warning",
|
|
|
+ });
|
|
|
+ }, 1000);
|
|
|
+ } else {
|
|
|
+ this.is_df_success = false;
|
|
|
+ this.sure_submit(this.tk_list[this.selectId].id, this.score);
|
|
|
+ setTimeout(() => {
|
|
|
+ if (this.is_df_success) {
|
|
|
+ this.selectId = this.selectId + 1;
|
|
|
+ this.choice_student(
|
|
|
+ this.selectId,
|
|
|
+ this.tk_list[this.selectId].qimg
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }, 2000);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
//上一题
|
|
|
per_tk() {
|
|
|
- if (this.num_id + 1 == 1) {
|
|
|
- this.$message({
|
|
|
- message: "已经是第一题了哦",
|
|
|
- type: "warning",
|
|
|
- });
|
|
|
+ if (this.nav_id == 1) {
|
|
|
+ if (this.num_index + 1 == 1) {
|
|
|
+ this.$message({
|
|
|
+ message: "已经是第一题了哦",
|
|
|
+ type: "warning",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.num_index = this.num_index - 1;
|
|
|
+ this.pnoChange(this.num_index, this.tk_num[this.num_index].qno);
|
|
|
+ }
|
|
|
} else {
|
|
|
- this.num_id = this.num_id - 1;
|
|
|
- this.pnoChange(this.num_id)
|
|
|
+ if (this.selectId + 1 == 1) {
|
|
|
+ this.$message({
|
|
|
+ message: "已经是第一位了哦",
|
|
|
+ type: "warning",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.selectId = this.selectId - 1;
|
|
|
+ this.choice_student(this.selectId, this.tk_list[this.selectId].qimg);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
jump(url) {
|
|
@@ -584,14 +744,14 @@ export default {
|
|
|
var img = new Image();
|
|
|
img.crossOrigin = "Anonymous";
|
|
|
img.src = url;
|
|
|
-
|
|
|
+
|
|
|
img.onload = function () {
|
|
|
// console.log(img.width,img.height)
|
|
|
canvas.height = 370; //指定画板的高度,自定义
|
|
|
canvas.width = 750; //指定画板的宽度,自定义
|
|
|
ctx.drawImage(img, 0, 0, 750, 370); //参数可自定义
|
|
|
var dataURL = canvas.toDataURL("image/");
|
|
|
- callback.call(this, dataURL,img); //回掉函数获取Base64编码
|
|
|
+ callback.call(this, dataURL, img); //回掉函数获取Base64编码
|
|
|
canvas = null;
|
|
|
};
|
|
|
},
|
|
@@ -920,25 +1080,29 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
-.bg_box{
|
|
|
+.task_num{
|
|
|
+ margin-left: 20px;
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
+.bg_box {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
position: fixed;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
- background:rgba(0, 0, 0, 0.6);
|
|
|
+ background: rgba(0, 0, 0, 0.6);
|
|
|
z-index: 99;
|
|
|
-}
|
|
|
-.answers>span{
|
|
|
+}
|
|
|
+.answers > span {
|
|
|
position: absolute;
|
|
|
color: #fff;
|
|
|
font-size: 40px;
|
|
|
- top:-50px;
|
|
|
+ top: -50px;
|
|
|
right: -50px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
-.bg_box>div{
|
|
|
- width:650px;
|
|
|
+.bg_box > div {
|
|
|
+ width: 650px;
|
|
|
padding: 20px;
|
|
|
box-sizing: border-box;
|
|
|
border-radius: 4px;
|
|
@@ -946,15 +1110,14 @@ export default {
|
|
|
position: absolute;
|
|
|
top: 50%;
|
|
|
left: 50%;
|
|
|
- transform: translate(-50%,-50%);
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
}
|
|
|
-.answers>div{
|
|
|
+.answers > div {
|
|
|
margin: 20px 0;
|
|
|
font-size: 14px;
|
|
|
-
|
|
|
}
|
|
|
-.answers .option{
|
|
|
- color: #57c77c;
|
|
|
+.answers .option {
|
|
|
+ color: #57c77c;
|
|
|
}
|
|
|
.oper_i {
|
|
|
position: relative;
|
|
@@ -1091,8 +1254,8 @@ export default {
|
|
|
line-height: 36px;
|
|
|
margin: auto 0;
|
|
|
}
|
|
|
-.tk_df .tk_fs input{
|
|
|
- width:100%;
|
|
|
+.tk_df .tk_fs input {
|
|
|
+ width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
.tk_df .ts_num {
|
|
@@ -1115,6 +1278,10 @@ export default {
|
|
|
.tk_cont .el-progress.el-progress--line {
|
|
|
width: 370px;
|
|
|
}
|
|
|
+.tk_cont .task_num .el-progress.el-progress--line{
|
|
|
+ width: 150px;
|
|
|
+ margin: 0 10px;
|
|
|
+}
|
|
|
.tk_num li {
|
|
|
padding: 11px 5px;
|
|
|
box-sizing: border-box;
|
|
@@ -1148,18 +1315,19 @@ export default {
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.py_jd .tk_tit {
|
|
|
- font-size: 13px;
|
|
|
+ font-size: 14px;
|
|
|
font-family: Microsoft YaHei;
|
|
|
font-weight: bold;
|
|
|
color: #333333;
|
|
|
+ line-height: 22px;
|
|
|
margin-bottom: 5px;
|
|
|
}
|
|
|
.tk_cont .tk_num {
|
|
|
height: 195px;
|
|
|
overflow-y: scroll;
|
|
|
}
|
|
|
-.tk_cont .st_tk_num{
|
|
|
- height: 175px;
|
|
|
+.tk_cont .st_tk_num {
|
|
|
+ height: 175px;
|
|
|
display: -webkit-box;
|
|
|
overflow-x: scroll;
|
|
|
overflow-y: hidden;
|
|
@@ -1351,10 +1519,10 @@ export default {
|
|
|
}
|
|
|
</style>
|
|
|
<style>
|
|
|
-.tk_num .el-progress-bar {
|
|
|
+.tk_num .el-progress-bar ,.task_num .el-progress-bar{
|
|
|
padding-right: 0;
|
|
|
}
|
|
|
-.tk_num .el-progress__text {
|
|
|
+.tk_num .el-progress__text ,.task_num .el-progress__text{
|
|
|
display: none;
|
|
|
}
|
|
|
|
|
@@ -1416,42 +1584,50 @@ export default {
|
|
|
padding: 9px;
|
|
|
box-sizing: border-box;
|
|
|
width: 130px;
|
|
|
- height: 152px;
|
|
|
- /* background: #FFE8EC; */
|
|
|
- border-radius: 4px;
|
|
|
- margin: 0 5px;
|
|
|
- cursor: pointer;
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
-.st_tk_num li>div.img_box{
|
|
|
- width: 112px;
|
|
|
-height: 90px;
|
|
|
-background: #F7F7F7;
|
|
|
-}
|
|
|
-.st_tk_num li>div.img_box img{
|
|
|
- width: 112px;
|
|
|
-height: 18px;
|
|
|
-margin-top: 35px;
|
|
|
+ height: 152px;
|
|
|
+ /* background: #FFE8EC; */
|
|
|
+ border-radius: 4px;
|
|
|
+ margin: 0 5px;
|
|
|
+ cursor: pointer;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.st_tk_num li{
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+.st_tk_num li > div.img_box {
|
|
|
+ width: 112px;
|
|
|
+ height: 90px;
|
|
|
+ background: #f7f7f7;
|
|
|
+}
|
|
|
+.st_tk_num li > div.img_box img {
|
|
|
+ width: 112px;
|
|
|
+ height: 18px;
|
|
|
+ margin-top: 35px;
|
|
|
}
|
|
|
.st_tk_num li.active {
|
|
|
background: #ffe8ec;
|
|
|
border-radius: 4px;
|
|
|
}
|
|
|
-.st_tk_num li.active>div.img_box{
|
|
|
- background: #fff;
|
|
|
- border-radius: 4px;
|
|
|
+.st_tk_num li.active > div.img_box {
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 4px;
|
|
|
}
|
|
|
-.st_tk_num li.active span{
|
|
|
- color: #FA0A2F;
|
|
|
+.st_tk_num li.active span {
|
|
|
+ color: #fa0a2f;
|
|
|
}
|
|
|
.st_tk_num span {
|
|
|
- display: inline-block;
|
|
|
+ display: inline-block;
|
|
|
width: 100%;
|
|
|
font-size: 13px;
|
|
|
-font-family: Microsoft YaHei;
|
|
|
-font-weight: 400;
|
|
|
-color: #333333;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #333333;
|
|
|
text-align: center;
|
|
|
line-height: 50px;
|
|
|
}
|
|
|
+.st_tk_num span:nth-child(2){
|
|
|
+ position: absolute;
|
|
|
+ right: -40px;
|
|
|
+ bottom: 4px;
|
|
|
+}
|
|
|
</style>
|