liqk 4 éve
szülő
commit
06c8615c8a

+ 4 - 4
TEAMModelOS/ClientApp/src/view/learnactivity/markpaper/MarkSetting.vue

@@ -49,14 +49,14 @@
                             </FormItem>
                             </Col>
                             <!-- 启用异常处理 -->
-                            <Col :md="24" :lg="24" :xl="12" :xxl="8">
+                            <!-- <Col :md="24" :lg="24" :xl="12" :xxl="8">
                             <FormItem label="异常申报" class="setting-item-wrap" prop="isErr">
                                 <RadioGroup v-model="setting.isErr" style="color:white">
                                     <Radio :label="1">是</Radio>
                                     <Radio :label="0" style="margin-left:20px">否</Radio>
                                 </RadioGroup>
                             </FormItem>
-                            </Col>
+                            </Col> -->
                             <!-- 启用仲裁 -->
                             <Col :md="24" :lg="24" :xl="12" :xxl="8" v-show="setting.num > 1">
                             <FormItem label="启用仲裁" class="setting-item-wrap" prop="isArb">
@@ -86,11 +86,11 @@
                         <Row>
                             <Col :md="24" :lg="24" :xl="24" :xxl="24" v-if="setting.isErr">
                             <!-- 异常处理老师 -->
-                            <FormItem :label="$t('learnActivity.mark.errRole')" class="setting-item-wrap" prop="err">
+                            <!-- <FormItem :label="$t('learnActivity.mark.errRole')" class="setting-item-wrap" prop="err">
                                 <Select v-model="subsInfo.err" style="width:400px" multiple>
                                     <Option v-for="(item,index) in teacherList" :value="item.id" :key="index">{{item.name}}</Option>
                                 </Select>
-                            </FormItem>
+                            </FormItem> -->
                             </Col>
                             <Col :md="24" :lg="24" :xl="24" :xxl="24" v-if="setting.isArb">
                             <!-- 仲裁老师 -->

+ 1 - 1
TEAMModelOS/ClientApp/src/view/task/index.vue

@@ -371,7 +371,7 @@ export default {
             if (this.markList.length > 0) {
                 let total = this.markList[this.curTaskIndex].count
                 let marked = this.markData ? this.markData.attr.length : 0
-                return total - marked
+                
             } else {
                 return 0
             }

+ 3 - 3
TEAMModelOS/ClientApp/src/view/task/mark/ByQu.vue

@@ -20,12 +20,12 @@
             <div class="btn-wrap">
                 <span class="action-btn" @click="toggleStatus = !toggleStatus">
                     <Icon type="md-shuffle" class="action-btn-icon" />
-                    切换
+                    切换题目
                 </span>
-                <span class="action-btn">
+                <!-- <span class="action-btn">
                     <Icon type="md-refresh" class="action-btn-icon" />
                     回评
-                </span>
+                </span> -->
                 <span class="action-btn">
                     <Icon custom="iconfont icon-exception" class="action-btn-icon" />
                     异常申报

+ 104 - 30
TEAMModelOS/ClientApp/src/view/task/mark/ByStu.vue

@@ -20,12 +20,12 @@
             <div class="btn-wrap">
                 <span class="action-btn" @click="toggleStatus = !toggleStatus">
                     <Icon type="md-shuffle" class="action-btn-icon" />
-                    切换
+                    切换学生
                 </span>
-                <span class="action-btn">
+                <!-- <span class="action-btn">
                     <Icon type="md-refresh" class="action-btn-icon" />
                     回评
-                </span>
+                </span> -->
                 <span class="action-btn">
                     <Icon custom="iconfont icon-exception" class="action-btn-icon" />
                     异常申报
@@ -112,7 +112,7 @@
         <!-- 用来单独渲染学生作答数据,提高tocanvas 的效率 -->
         <iframe id="markIframe" :srcdoc="curAnswer"></iframe>
         <Modal v-model="toggleStatus" title="切换学生" :width="800" footer-hide>
-            <StuProg  @getStuId="toByStuView" class="light-stu-prog" :total="taskInfo.count" :stusData="stusData"></StuProg>
+            <StuProg @getStuId="toByStuView" class="light-stu-prog" :total="taskInfo.count" :stusData="stusData"></StuProg>
         </Modal>
     </div>
 </template>
@@ -155,12 +155,6 @@ export default {
         }
     },
     methods: {
-        /**
-         * 按人阅卷
-         */
-        toByStuView(stuId) {
-            this.$Message.warning('这里切换学生逻辑暂未处理!')    
-        },
         drawImg(imgIndex) {
             // this.activeIcon = imgIndex
             // this.curImg = new Image()
@@ -197,10 +191,6 @@ export default {
                 })
             }
         },
-        //将图片(答案)绘制到canvas
-        imgToCanvas(img) {
-            console.log('将图片(答案)绘制到canvas', img)
-        },
         /** 打分 */
         setScore(score) {
             this.score = score
@@ -237,7 +227,6 @@ export default {
                     }
                 }
             })
-            console.log('输出', realIndex)
             return --realIndex
         },
         //提交分数
@@ -269,6 +258,16 @@ export default {
             }
         },
         nextQuestion() {
+            //首先判断是都已阅完
+            if (!this.stuScore.includes(-1)) {
+                if (this.autoStu) {
+                    this.toggleStatus = true
+                } else {
+                    this.$Message.warning('当前完成当前学生评分,如果继续评分,请切换学生')
+                }
+                return
+            }
+
             // 当前不是最后一题
             if (this.quIndex < this.paperData.item.length - 1) {
                 //当前题目是综合题
@@ -352,6 +351,7 @@ export default {
                         this.$Message.success('已阅完')
                         if (this.autoStu) {
                             //TODE 随机获取下一位学生
+                            this.toggleStatus = true
                         }
                     }
 
@@ -366,11 +366,85 @@ export default {
                 name: sessionStorage.getItem('markFrom')
             })
         },
-        uuid() {
-            function S4() {
-                return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1)
+        /**
+         * 按人阅卷
+         */
+        async toByStuView(stuId) {
+            this.toggleStatus = false
+            // 如果挑选的是当前的学生
+            if (stuId) {
+                let stuInfo = this.stusData.find(item => {
+                    return item.stuId == stuId
+                })
+                if (stuInfo && !stuInfo.info.answer) {
+                    let sas = this.$store.state.user.schoolProfile.blob_sas //目前只有校本评测安排阅卷任务
+                    let blobUrl = JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri //目前只有校本评测安排阅卷任务
+                    stuInfo.info.answer = stuInfo.info.ans ? JSON.parse(await this.$tools.getFile(`${blobUrl}/exam/${stuInfo.info.ans}?${sas}`)) : []
+                }
+                this.stuAnswer = stuInfo.info.answer
+                this.stuScore = stuInfo.info.score
+                this.stuId = stuId
             }
-            return (S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4())
+            // 随机获取一名学生
+            else {
+                if (this.taskInfo.count == this.stusData.length) {
+                    let res = this.stusData.filter(item => {
+                        return item.info.score.includes(-1)
+                    })
+                    if (res.length) {
+                        this.$Message.warning('已无未阅学生,请挑选进行中的学生继续阅卷。')
+                        this.toggleStatus = true
+                    } else {
+                        this.$Message.success('您已完成阅卷任务')
+                    }
+
+                } else {
+                    this.getNextStu()
+                }
+
+            }
+        },
+        /**
+         * 批阅下个学生
+         * @param stuId 如果传了stuid则会获取对应学生的数据,否则随机获取一个学生
+         */
+        getNextStu(stuId) {
+            let requestData = {
+                code: this.markList[this.curTaskIndex].ecode.replace('Exam-', ''),
+                id: this.markList[this.curTaskIndex].id,
+                subjectId: this.markList[this.curTaskIndex].subject,
+                count: this.markList[this.curTaskIndex].count,
+                tmdId: this.$store.state.userInfo.TEAMModelId,
+                stuId
+            }
+            this.$api.mark.FindNextStu(requestData).then(
+                async res => {
+                    if (res) {
+                        let obj = {
+                            stuId: res.stuId,
+                            info: {
+                                ans: res.ans.ans,
+                                score: res.ans.score,
+                                mark: res.ans.mark
+                            }
+                        }
+                        let sas = this.$store.state.user.schoolProfile.blob_sas //目前只有校本评测安排阅卷任务
+                        let blobUrl = JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri //目前只有校本评测安排阅卷任务
+                        obj.info.answer = JSON.parse(await this.$tools.getFile(`${blobUrl}/exam/${obj.info.ans}?${sas}`))
+                        this.stusData.push(obj)
+
+                        this.stuId = res.stuId
+                        this.stuAnswer = obj.info.answer
+                        this.stuScore = obj.info.score
+                        this.toggleStatus = false
+                    } else {
+                        this.$Message.error('API ERROR')
+                    }
+                },
+                err => {
+                    this.$Message.error('API ERROR')
+                }
+            )
         },
     },
     mounted() {
@@ -429,7 +503,7 @@ export default {
 }
 </script>
 <style scoped lang="less">
-.light-stu-prog{
+.light-stu-prog {
     margin-bottom: 15px;
 }
 .score-setting-wrap {
@@ -736,29 +810,29 @@ export default {
     color: red;
     font-weight: 800;
 }
-.light-stu-prog .setting-content{
-    background: #FFF;
+.light-stu-prog .setting-content {
+    background: #fff;
     box-shadow: none;
     border-color: #e8eaec;
 }
-.light-stu-prog .filter-tab-item{
+.light-stu-prog .filter-tab-item {
     border-color: #e8eaec;
 }
-.light-stu-prog .filter-tab-item-active{
-    background: #FFF !important;
+.light-stu-prog .filter-tab-item-active {
+    background: #fff !important;
     color: black;
 }
-.light-stu-prog .filter-tab-item{
-    background: #EEE;
+.light-stu-prog .filter-tab-item {
+    background: #eee;
 }
-.light-stu-prog .no-mark-text .no-mark-count{
+.light-stu-prog .no-mark-text .no-mark-count {
     color: #515a6e;
 }
-.light-stu-prog .stu-name{
+.light-stu-prog .stu-name {
     background: #eee;
     color: #515a6e;
 }
-.light-stu-prog .stu-name:hover{
+.light-stu-prog .stu-name:hover {
     color: #515a6e;
     box-shadow: 0px 0px 5px 2px #ccc;
 }

+ 7 - 3
TEAMModelOS/ClientApp/src/view/task/mark/ProgPie.vue

@@ -100,13 +100,17 @@ export default {
         count: {
             handler(n, o) {
                 this.count.forEach((item, index) => {
-                    console.log(item,index)
+                    console.log(item, index)
                     this.option.series[0].data[index].value = item
                 })
                 if (!this.techScoreGau) {
-                    this.techScoreGau = this.$echarts.init(document.getElementById('mark-prog-pie'))
+                    this.$nextTick(() => {
+                        this.techScoreGau = this.$echarts.init(document.getElementById('mark-prog-pie'))
+                        this.techScoreGau.setOption(this.option)
+                    })
+                } else {
+                    this.techScoreGau.setOption(this.option)
                 }
-                this.techScoreGau.setOption(this.option)
             },
             immediate: true,
             deep: true

+ 11 - 3
TEAMModelOS/ClientApp/src/view/task/mark/StuProg.vue

@@ -66,14 +66,22 @@ export default {
         }
     },
     methods: {
-        toByStuView(stuId){
-            this.$emit('getStuId',stuId)
+        toByStuView(stuId) {
+            this.$emit('getStuId', stuId)
         }
     },
     computed: {
         //当前阅卷任务未阅数量
         unmarked() {
-            return this.total - this.marked.length - this.marking.length
+            let res = this.total - this.marked.length - this.marking.length
+            if (res == 0) {
+                if (this.marking.length == 0) {
+                    this.tabIndex = 2
+                } else {
+                    this.tabIndex = 1
+                }
+            }
+            return res
         },
         //当前阅卷任务已阅学生信息
         marked() {