Browse Source

Merge branch 'develop5.0-tmd' of http://106.12.23.251:10000/TEAMMODEL/TEAMModelOS into develop5.0-tmd

CrazyIter_Bin 3 years ago
parent
commit
3fc90aa2ea

+ 1 - 1
TEAMModelFunction/TriggerCorrect.cs

@@ -275,7 +275,7 @@ namespace TEAMModelFunction
                                                 marks = marks,
                                                 marks = marks,
                                                 items = items,
                                                 items = items,
                                                 qs = qss,
                                                 qs = qss,
-                                                endTime = correct.endTime,
+                                                //endTime = correct.endTime,
                                                 model = sub.model
                                                 model = sub.model
 
 
                                             };
                                             };

+ 19 - 7
TEAMModelOS/ClientApp/src/api/mark.js

@@ -9,37 +9,49 @@ export default {
     /*
     /*
      *根据评测id查询评测阅卷配置信息
      *根据评测id查询评测阅卷配置信息
      */
      */
-     FindById: function (data) {
+    FindById: function (data) {
         return post('/school/correct/find-id', data)
         return post('/school/correct/find-id', data)
     },
     },
     /*
     /*
      *根据评测id查询评测阅卷配置信息
      *根据评测id查询评测阅卷配置信息
      */
      */
-     FindTask: function (data) {
+    FindTask: function (data) {
         return post('/school/correct/find-task', data)
         return post('/school/correct/find-task', data)
     },
     },
     /*
     /*
      *查询老师阅卷数据(可以计算出阅卷进度、平均分等数据)
      *查询老师阅卷数据(可以计算出阅卷进度、平均分等数据)
      */
      */
-     FindTeaData: function (data) {
+    FindTeaData: function (data) {
         return post('/common/exam/scoring', data)
         return post('/common/exam/scoring', data)
     },
     },
     /*
     /*
      *批阅下一个学生,如果传了学生id就返回当前学生
      *批阅下一个学生,如果传了学生id就返回当前学生
      */
      */
-     FindNextStu: function (data) {
+    FindNextStu: function (data) {
         return post('/common/exam/review', data)
         return post('/common/exam/review', data)
     },
     },
     /**
     /**
      * 阅卷打分
      * 阅卷打分
      */
      */
-    saveScore: function(data){
+    saveScore: function (data) {
         return post('/common/exam/sub-result', data)
         return post('/common/exam/sub-result', data)
     },
     },
     /**
     /**
-     * 提交异常卷
+     * 阅卷老师提交异常卷
      */
      */
-     saveErr: function(data){
+    saveErr: function (data) {
         return post('/common/exam/save-err', data)
         return post('/common/exam/save-err', data)
+    },
+    /**
+     * 异常处理老师查看所有异常试卷
+     * */
+    findErr: function (data) {
+        return post('/common/exam/find-err', data)
+    },
+    /**
+     * 处理异常卷
+     * */
+     feedbackErr: function (data) {
+        return post('/common/exam/fd-err', data)
     }
     }
 }
 }

+ 1 - 1
TEAMModelOS/ClientApp/src/router/routes.js

@@ -593,7 +593,7 @@ export const routes = [
 			name: 'privateEvaluation',
 			name: 'privateEvaluation',
 			component: resolve => require(['@/view/learnactivity/MgtPrivEva.vue'], resolve),
 			component: resolve => require(['@/view/learnactivity/MgtPrivEva.vue'], resolve),
 			meta: {
 			meta: {
-				isKeep: true,
+				// isKeep: true,
 				activeName: 'privateEvaluation'
 				activeName: 'privateEvaluation'
 			}
 			}
 		},
 		},

+ 0 - 9
TEAMModelOS/ClientApp/src/view/learnactivity/CreatePrivEva.vue

@@ -66,7 +66,6 @@
                             <ManualPaper @selectPaper="selectPaper" :selectedId="evaluationInfo.paperInfo[0] ? evaluationInfo.paperInfo[0].id : ''"></ManualPaper>
                             <ManualPaper @selectPaper="selectPaper" :selectedId="evaluationInfo.paperInfo[0] ? evaluationInfo.paperInfo[0].id : ''"></ManualPaper>
                         </TabPane>
                         </TabPane>
                         <TabPane :label="$t('learnActivity.createEv.perviewLabel')" name="preview" :index="2" tab="createTest">
                         <TabPane :label="$t('learnActivity.createEv.perviewLabel')" name="preview" :index="2" tab="createTest">
-                            <!-- <TeacherPreview :testPaper="evaluationInfo.paperInfo[0]"></TeacherPreview> -->
                             <div class="teacher-preview-container">
                             <div class="teacher-preview-container">
                                 <!--返回顶部-->
                                 <!--返回顶部-->
                                 <div class="back-to-top" :title="$t('learnActivity.mgtScEv.returnTop')" v-show="showBack" @click="handleBackToTop">
                                 <div class="back-to-top" :title="$t('learnActivity.mgtScEv.returnTop')" v-show="showBack" @click="handleBackToTop">
@@ -77,9 +76,6 @@
                                 </vuescroll>
                                 </vuescroll>
                             </div>
                             </div>
                         </TabPane>
                         </TabPane>
-                        <!-- <TabPane :label="$t('learnActivity.createEv.answerPreview')" name="student" :index="6" tab="createTest">
-                            <StudentPreview></StudentPreview>
-                        </TabPane> -->
                     </Tabs>
                     </Tabs>
                 </div>
                 </div>
             </div>
             </div>
@@ -91,14 +87,9 @@
 import BlobTool from '@/utils/blobTool.js'
 import BlobTool from '@/utils/blobTool.js'
 import TestPaper from '@/view/evaluation/index/TestPaper.vue'
 import TestPaper from '@/view/evaluation/index/TestPaper.vue'
 import ManualPaper from './ManualPaper.vue'
 import ManualPaper from './ManualPaper.vue'
-import TeacherPreview from './TeacherPreview.vue'
-import StudentPreview from './StudentPreview.vue'
-
 export default {
 export default {
     components: {
     components: {
         TestPaper,
         TestPaper,
-        TeacherPreview,
-        StudentPreview,
         ManualPaper
         ManualPaper
     },
     },
     data() {
     data() {

+ 0 - 7
TEAMModelOS/ClientApp/src/view/learnactivity/CreateSchoolEva.vue

@@ -74,7 +74,6 @@
                             <ManualPaper :periodId="evaluationInfo.period.id" :gradesObj="evaluationInfo.grades" :subjectId="evaluationInfo.paperInfo[curSubIndex].subjectId" @selectPaper="selectPaper" :selectedId="evaluationInfo.paperInfo[curSubIndex].id" :source="$store.state.userInfo.schoolCode"></ManualPaper>
                             <ManualPaper :periodId="evaluationInfo.period.id" :gradesObj="evaluationInfo.grades" :subjectId="evaluationInfo.paperInfo[curSubIndex].subjectId" @selectPaper="selectPaper" :selectedId="evaluationInfo.paperInfo[curSubIndex].id" :source="$store.state.userInfo.schoolCode"></ManualPaper>
                         </TabPane>
                         </TabPane>
                         <TabPane :label="$t('learnActivity.createEv.perviewLabel')" name="preview" :index="2" tab="createTest">
                         <TabPane :label="$t('learnActivity.createEv.perviewLabel')" name="preview" :index="2" tab="createTest">
-                            <!-- <TeacherPreview :testPaper="evaluationInfo.paperInfo[curSubIndex]" :examAnalysisStatus="examAnalysisStatus"></TeacherPreview> -->
                             <div class="teacher-preview-container">
                             <div class="teacher-preview-container">
                                 <!--返回顶部-->
                                 <!--返回顶部-->
                                 <div class="back-to-top" :title="$t('learnActivity.mgtScEv.returnTop')" v-show="showBack" @click="handleBackToTop">
                                 <div class="back-to-top" :title="$t('learnActivity.mgtScEv.returnTop')" v-show="showBack" @click="handleBackToTop">
@@ -88,10 +87,6 @@
                         <TabPane :label="$t('learnActivity.createEv.importLabel')" name="import" v-if="evaluationInfo.paperInfo[curSubIndex].createType == 'import'" :index="4" tab="createTest">
                         <TabPane :label="$t('learnActivity.createEv.importLabel')" name="import" v-if="evaluationInfo.paperInfo[curSubIndex].createType == 'import'" :index="4" tab="createTest">
                             <BaseImport @importedQuestions="getImportQuestions" @goToPreview="goToPreview"></BaseImport>
                             <BaseImport @importedQuestions="getImportQuestions" @goToPreview="goToPreview"></BaseImport>
                         </TabPane>
                         </TabPane>
-                        <!-- 去掉作答预览功能 -->
-                        <!-- <TabPane :label="$t('learnActivity.createEv.answerPreview')" name="student" :index="6" tab="createTest">
-                            <StudentPreview></StudentPreview>
-                        </TabPane> -->
                     </Tabs>
                     </Tabs>
                 </div>
                 </div>
             </div>
             </div>
@@ -113,10 +108,8 @@ import BlobTool from '@/utils/blobTool.js'
 import TestPaper from '@/view/evaluation/index/TestPaper.vue'
 import TestPaper from '@/view/evaluation/index/TestPaper.vue'
 import ManualPaper from './ManualPaper.vue'
 import ManualPaper from './ManualPaper.vue'
 import BaseImport from '@/view/evaluation/components/BaseImport.vue'
 import BaseImport from '@/view/evaluation/components/BaseImport.vue'
-import StudentPreview from './StudentPreview.vue'
 export default {
 export default {
     components: {
     components: {
-        StudentPreview,
         BaseImport,
         BaseImport,
         ManualPaper,
         ManualPaper,
         TestPaper
         TestPaper

+ 0 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/MgtPrivEva.vue

@@ -94,7 +94,6 @@
 </template>
 </template>
 <script>
 <script>
 import TestPaper from '@/view/evaluation/index/TestPaper.vue'
 import TestPaper from '@/view/evaluation/index/TestPaper.vue'
-// import PrivScoring from './PrivScoring.vue'
 import Scoring from './Scoring.vue'
 import Scoring from './Scoring.vue'
 export default {
 export default {
     components: {
     components: {

+ 1 - 4
TEAMModelOS/ClientApp/src/view/learnactivity/MgtSchoolEva.vue

@@ -151,7 +151,6 @@
                             <!--试卷题目信息-->
                             <!--试卷题目信息-->
                             <TestPaper v-if="evaListShow[curEvaIndex] && evaListShow[curEvaIndex].papers && evaListShow[curEvaIndex].papers[curSubIndex] && evaListShow[curEvaIndex].papers[curSubIndex].item" :paper="evaListShow[curEvaIndex].papers[curSubIndex]" style="color:#515a6e;margin-top:-30px;" :isShowTools="false" isExamPaper></TestPaper>
                             <TestPaper v-if="evaListShow[curEvaIndex] && evaListShow[curEvaIndex].papers && evaListShow[curEvaIndex].papers[curSubIndex] && evaListShow[curEvaIndex].papers[curSubIndex].item" :paper="evaListShow[curEvaIndex].papers[curSubIndex]" style="color:#515a6e;margin-top:-30px;" :isShowTools="false" isExamPaper></TestPaper>
                             <EmptyData v-else style="margin-top:60px;"></EmptyData>
                             <EmptyData v-else style="margin-top:60px;"></EmptyData>
-
                             <!--返回顶部-->
                             <!--返回顶部-->
                             <div class="back-to-top fl-col-center" :title="$t('learnActivity.mgtScEv.returnTop')" v-if="showBack" @click="handleBackToTop">
                             <div class="back-to-top fl-col-center" :title="$t('learnActivity.mgtScEv.returnTop')" v-if="showBack" @click="handleBackToTop">
                                 <Icon type="ios-arrow-up" />
                                 <Icon type="ios-arrow-up" />
@@ -463,8 +462,7 @@ export default {
         findEvaluation() {
         findEvaluation() {
             let requestData = {
             let requestData = {
                 code: this.scope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
                 code: this.scope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
-                // classIds: this.$access.hasRole('admin') ? undefined : this.$store.state.userInfo.teachClasses.concat(this.$store.state.userInfo.mgtClasses) //查询老师相关班级的评测,现在在课程那里进行查询
-                classIds: undefined
+                // classIds: undefined
             }
             }
             this.$api.learnActivity.FindExamInfo(requestData).then(
             this.$api.learnActivity.FindExamInfo(requestData).then(
                 res => {
                 res => {
@@ -519,7 +517,6 @@ export default {
                         for (let index in resData.papers) {
                         for (let index in resData.papers) {
                             let blob = resData.papers[index].blob
                             let blob = resData.papers[index].blob
                             resData.papers[index].examScope = resData.scope
                             resData.papers[index].examScope = resData.scope
-                            // resData.papers[index].examId = resData.id
                             resData.papers[index].examId = resData.scope === 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId //试卷容器名字
                             resData.papers[index].examId = resData.scope === 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId //试卷容器名字
                             resData.papers[index] = await this.$evTools.getFullPaper(resData.papers[index])
                             resData.papers[index] = await this.$evTools.getFullPaper(resData.papers[index])
                             if (!resData.papers[index].subjectId) {
                             if (!resData.papers[index].subjectId) {

+ 5 - 6
TEAMModelOS/ClientApp/src/view/learnactivity/PaperScore.vue

@@ -27,10 +27,6 @@
                     <Icon :type="showQu ? 'md-eye-off':'md-eye'" />
                     <Icon :type="showQu ? 'md-eye-off':'md-eye'" />
                     {{ showQu ? $t('learnActivity.score.hideQu') : $t('learnActivity.score.showQu')}}
                     {{ showQu ? $t('learnActivity.score.hideQu') : $t('learnActivity.score.showQu')}}
                 </span>
                 </span>
-                <!-- <span class="base-info-btn" @click="isDefOrder = !isDefOrder">
-                    <Icon :type="isDefOrder ? 'md-reorder':'ios-keypad'" />
-                    {{isDefOrder ? '默认顺序' : '题型排序'}}
-                </span> -->
             </div>
             </div>
             <!-- 题号 -->
             <!-- 题号 -->
             <div class="question-index-box" v-if="studentAnswer.scores">
             <div class="question-index-box" v-if="studentAnswer.scores">
@@ -400,7 +396,7 @@ export default {
                 "subjectId": this.subjectId,
                 "subjectId": this.subjectId,
                 "classId": this.studentAnswer.classId,
                 "classId": this.studentAnswer.classId,
                 // "code": this.paperInfo.code,//这种方式paper code规则调整了,会多Paper-"
                 // "code": this.paperInfo.code,//这种方式paper code规则调整了,会多Paper-"
-                "code": this.owner == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,//暂时取代上面的方式
+                "code": this.examScope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,//暂时取代上面的方式
             }).then(
             }).then(
                 res => {
                 res => {
                     this.$Message.success(this.$t('learnActivity.score.markOk'))
                     this.$Message.success(this.$t('learnActivity.score.markOk'))
@@ -641,6 +637,7 @@ export default {
         },
         },
         studentAnswer: {
         studentAnswer: {
             async handler(newValue, oldValue) {
             async handler(newValue, oldValue) {
+                console.log('学生作答数据',newValue)
                 if (!this.studentAnswer.status) {
                 if (!this.studentAnswer.status) {
                     if (newValue.answers.length) {
                     if (newValue.answers.length) {
                         try {
                         try {
@@ -649,7 +646,9 @@ export default {
                             let blobUrl = this.examScope == 'school' ? JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri : JSON.parse(decodeURIComponent(localStorage.user_profile, "utf-8")).blob_uri
                             let blobUrl = this.examScope == 'school' ? JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri : JSON.parse(decodeURIComponent(localStorage.user_profile, "utf-8")).blob_uri
                             let a = null
                             let a = null
                             // 如果有批注则渲染批注,没有则渲染元数据
                             // 如果有批注则渲染批注,没有则渲染元数据
-                            if (newValue.mark) {
+                            //批注数据结构调整 string ——>>> string数组
+                            //这里是看哪个批注呢?
+                            if (newValue.mark && newValue.mark.length) {
                                 a = await await this.$tools.getFile(`${blobUrl}/exam/${newValue.mark}?${sas}`)
                                 a = await await this.$tools.getFile(`${blobUrl}/exam/${newValue.mark}?${sas}`)
                             } else {
                             } else {
                                 //为了兼容原来完整的路径,这里做判断
                                 //为了兼容原来完整的路径,这里做判断

+ 0 - 97
TEAMModelOS/ClientApp/src/view/learnactivity/PrivScoring.less

@@ -1,97 +0,0 @@
-@main-bgColor: rgb(40,40,40); //主背景颜色
-@borderColor: #424242;
-@primary-textColor: #fff; //文本主颜色
-@second-textColor: #a5a5a5; //文本副级颜色
-@primary-fontSize: 14px;
-@second-fontSize: 16px;
-
-.ev-scoring {
-    width: 100%;
-    height: 100%;
-    padding: 0px 0px 20px 0px;
-}
-.ev-scoring {
-    .ev-scoring-header {
-        width: 100%;
-        height: 36px;
-        line-height: 36px;
-        color: @second-textColor;
-        border-bottom: 1px solid @borderColor;
-    }
-
-    .subject-item {
-        display: inline-block;
-        margin-right: 15px;
-        color: @second-textColor;
-        cursor: pointer;
-        line-height: 30px;
-        padding:0px 5px;
-        font-size: 15px;
-        text-align: center;
-        margin-left: 10px;
-    }
-
-    .subject-item-active {
-        color: @primary-textColor;
-        border-bottom: 2px solid white;
-        font-weight: 500;
-    }
-}
-.common-icon-text {
-    color: white;
-    cursor: pointer;
-    user-select: none;
-}
-.scoring-main-wrap {
-    width: ~"calc(100% - 10px)";
-    // width: 100%;
-    height: ~"calc(100% - 45px)";
-}
-
-.ev-target-box {
-    // margin-top: 20px;
-    width: ~"calc(100% - 10px)";
-    color: #ffffff;
-    background: rgba(50, 50, 50, 1);
-    padding: 10px 10px 10px 5px;
-    position: sticky;
-    top: 0px;
-    z-index: 9999;
-    .filter-select {
-        display: inline-block;
-        width: 120px;
-        margin-right: 25px;
-    }
-}
-
-.scoring-handle-box {
-    height: 100%;
-    background:white;
-    padding-bottom:15px;
-}
-
-.stu-status-tag{
-    background: #ed4014;
-    font-size: 12px;
-    padding: 3px 8px;
-    font-weight: 800;
-    border-radius: 4px;
-    color: white;
-}
-.select-status-tag{
-    display: inline-block;
-    width: 7px;
-    height: 7px;
-    border-radius: 50%;
-    margin-right: 5px;
-}
-.simple-analysis-box{
-    width: 100%;
-    height: 200px;
-    // background: white;
-}
-.page-wrap{
-    float: right;
-    margin-top: 15px;
-    color: white;
-}

+ 0 - 694
TEAMModelOS/ClientApp/src/view/learnactivity/PrivScoring.vue

@@ -1,694 +0,0 @@
-<template>
-    <div class="ev-scoring dark-iview-table">
-        <vuescroll ref="score-main-warp">
-            <SimpleAnalysis :examInfo="examInfo" v-show="!showTest" :overviewInfo="overviewInfo"></SimpleAnalysis>
-            <div class="ev-target-box dark-iview-select">
-                <!-- 筛选班级 -->
-                <span>{{$t('learnActivity.score.classLabel')}}</span>
-                <Select filterable v-model="chooseClass" class="filter-select" style="width:140px;" @on-change="getClassStudent" size="small" transfer>
-                    <Option v-for="(item,index) in classList" :value="item.id" :key="index">{{ item.name }}</Option>
-                </Select>
-                <!-- 筛选学生 -->
-                <span style="margin-left:5px" v-show="showTest">{{$t('learnActivity.score.stuLabel')}}</span>
-                <Select filterable v-model="chooseStudent.id" label-in-value class="filter-select" style="width:140px;" size="small" clearable @on-change="setStuInfo" v-show="showTest" transfer>
-                    <Option v-for="(item,index) in students" :value="item.id" :key="index">
-                        <span class="select-status-tag" :style="{'background':item.status == 1 ? '#ed4014' : item.status == 2 ? '#ff9900' : '#19be6b'}"></span>
-                        {{ item.name }}
-                    </Option>
-                </Select>
-                <span v-show="showTest" class="common-icon-text" style=" float: right; margin-right: 25px;" @click="toggleScoreStatus" icon="md-apps">
-                    <Icon :custom="showTest ? 'iconfont icon-table':'iconfont icon-scoring'" style="margin-right:5px;" />
-                    {{showTest ? $t('learnActivity.score.scoreView'):$t('learnActivity.score.scoring')}}
-                </span>
-            </div>
-            <div class="scoring-main-wrap">
-                <Table v-show="!showTest" class="score-box" border :columns="tableColumn" :data="tableData" :loading="tableLoading" @on-sort-change="onSortChange" :no-data-text="$t('learnActivity.score.classNoStu')">
-                    <template slot-scope="{ row,index }" :slot="'qu'+qIndex" v-for="(item,qIndex) in quCount">
-                        <div :key="'qu'+qIndex" @click="getStuScore(row,qIndex)" style="cursor:pointer;">
-                            <span @click="noAnswer" v-if="row.data[qIndex] == -1 && row.status == 1">- -</span>
-                            <Icon size="20" type="ios-create-outline" color="#2db7f5" v-else-if="row.data[qIndex] == -1 && row.status !== 1" />
-                            <span style="color:#2db7f5;" v-else>{{row.data[qIndex]}}</span>
-                        </div>
-                    </template>
-                    <!-- 1: 未作答 2:未评分 3:已评分 -->
-                    <template slot-scope="{ row,index }" slot="status">
-                        <span class="stu-status-tag" @click="getStuScore(row,0)" :style="{'background':row.status == 1 ? '#c5c8ce' : row.status == 2 ? '#ff9900' : '#19be6b', 'cursor':row.status == 1 ? 'text':'pointer'}">
-                            {{row.status == 1 ? $t('learnActivity.score.status1') : row.status == 2 ? $t('learnActivity.score.status2') : $t('learnActivity.score.status3')}}
-                        </span>
-                    </template>
-                    <Loading slot="loading" :top="-50"></Loading>
-                </Table>
-                <!-- 分页 -->
-                <div class="page-wrap dark-ivew-select" v-show="!showTest">
-                    <Page show-total size="small" :current="currentPage" :total="studentScore.length" :page-size="pageSize" :page-size-opts="pageSizeOpts" @on-change="pageChange" @on-page-size-change="pageSizeChange" show-sizer />
-                </div>
-                <div class="dark-iview-table scoring-handle-box" v-show="showTest">
-                    <PaperScore ref="paperScore" :defaultIndex="defaultIndex" :examId="examInfo.id" :examScope="examInfo.scope" :paper="paperInfo" :studentAnswer="chooseStudent" :subjectId="chooseSubject" @nextStu="getNextStu" style="color:#515a6e;"></PaperScore>
-                    <Loading :top="200" type="1" style="text-align:center" v-show="dataLoading"></Loading>
-                </div>
-            </div>
-        </vuescroll>
-    </div>
-</template>
-<script>
-import PaperScore from "./PaperScore.vue";
-import SimpleAnalysis from "./SimpleAnalysis.vue";
-export default {
-    props: {
-        examInfo: {
-            type: Object,
-            default: () => {
-                return {}
-            }
-        }
-    },
-    components: {
-        PaperScore, SimpleAnalysis
-    },
-    data() {
-        return {
-            schoolClassList: [],
-            originData: [],
-            studentScore: [],
-            tableData: [],
-            currentPage: 1,
-            pageSize: 10,
-            pageSizeOpts: [5, 10, 20, 30, 40],
-            overviewInfo: {
-                total: 0,
-                answered: 0,
-                noAnswer: 0,
-                scored: 0,
-                noScore: 0
-            },
-            defaultIndex: 0,
-            tableLoading: false,
-            showTest: false, //是否评分
-            studentData: [],
-            dataLoading: false,
-            chooseGrade: "",
-            chooseClass: "",
-            chooseSubject: "",
-            chooseStudent: {
-                id: "",
-                name: "",
-                scores: [],
-                answers: []
-            },
-            classStudents:[], //校本名单学生列表,可以从这里面获取班级信息
-            scoreList: [
-                {
-                    title: this.$t('learnActivity.score.column1'),
-                    key: "name",
-                    fixed: "left",
-                    align: "center",
-                    width: 150,
-                },
-                {
-                    title: this.$t('learnActivity.score.column2'),
-                    key: "total",
-                    align: "center",
-                    sortable: true,
-                    fixed: "right",
-                    width: 100
-                },
-                {
-                    title: this.$t('learnActivity.score.column3'),
-                    slot: "status",
-                    align: "center",
-                    fixed: "right",
-                    width: 100,
-                }
-            ],
-            tableColumn: [],
-            quCount: [],
-            paperInfo: {},
-            students: [],
-            privStuList: undefined,
-            routerScope: ''
-        }
-    },
-    methods: {
-        // 排序操作
-        onSortChange(data) {
-            let order = data.order // 当前排序方式 升序、降序、正常
-            let key = data.key // 当前排序依据
-            switch (order) {
-                case 'asc':
-                    this.studentScore = this.originData.sort((a, b) => { return Number(a[key]) - Number(b[key]) })
-                    break
-                case 'desc':
-                    this.studentScore = this.originData.sort((a, b) => { return Number(b[key]) - Number(a[key]) })
-                    break
-                case 'normal':
-                    this.studentScore = this.students
-                    break
-                default:
-                    break
-            }
-            this.pageChange(1)
-        },
-        // 页面size变化
-        pageSizeChange(val) {
-            this.pageSize = val
-            this.pageChange(1)
-        },
-        // 分页页面变化
-        pageChange(page) {
-            let start = this.pageSize * (page - 1)
-            let end = this.pageSize * page
-            this.currentPage = page
-            this.tableData = this.studentScore.slice(start, end)
-        },
-        toggleScoreStatus() {
-            this.$refs['paperScore'].isComplete = false
-            this.showTest = !this.showTest
-        },
-        getNextStu() {
-            let flag = false
-            for (let index in this.paperInfo[this.chooseClass].studentAns.studentScores) {
-                if (this.paperInfo[this.chooseClass].studentAns.studentScores[index].indexOf(-1) >= 0) {
-                    if (this.paperInfo[this.chooseClass].studentAns.studentAnswers[index].length) {
-                        flag = true
-                        this.chooseStudent.id = this.paperInfo[this.chooseClass].studentAns.studentIds[index]
-                        let curStu = this.students.find(item => {
-                            return item.id == this.chooseStudent.id
-                        })
-                        if (curStu) this.chooseStudent.name = curStu.name
-                        this.chooseStudent.answers = this.paperInfo[this.chooseClass].studentAns.studentAnswers[index]
-                        this.chooseStudent.scores = this.paperInfo[this.chooseClass].studentAns.studentScores[index]
-                        this.chooseStudent.classId = this.chooseClass
-                        this.chooseStudent.status = false
-                        this.$refs['paperScore'].isComplete = false
-                        break
-                    }
-                }
-            }
-            if (!flag) {
-                this.showTest = false
-                this.$Message.warning(this.$t('learnActivity.score.finishScore'))
-            }
-        },
-        //学生未作答提示
-        noAnswer() {
-            this.$Message.warning(this.$t('learnActivity.score.unableScore'))
-        },
-        //点击学生题号前往评分页面
-        getStuScore(data, qIndex) {
-            if (data.status == 2 || data.status == 3) {
-                this.$refs['paperScore'].isComplete = false
-                this.showTest = true
-                this.defaultIndex = qIndex
-                this.chooseStudent.id = data.id
-                this.chooseStudent.name = data.name
-                this.chooseStudent.classId = this.chooseClass
-                let answerIndex = this.paperInfo[this.chooseClass].studentAns.studentIds.indexOf(data.id)
-                if (answerIndex >= 0) {
-                    this.chooseStudent["scores"] = this.paperInfo[this.chooseClass].studentAns.studentScores[answerIndex]
-                    this.chooseStudent["answers"] = this.paperInfo[this.chooseClass].studentAns.studentAnswers[answerIndex]
-                    this.chooseStudent["status"] = false
-                }
-            }
-        },
-        //获取当前学生信息
-        setStuInfo(data) {
-            if (data) {
-                this.chooseStudent.name = data.label;
-                this.chooseStudent.classId = this.chooseClass
-                let answerIndex = this.paperInfo[this.chooseClass].studentAns.studentIds.indexOf(data.value);
-                if (answerIndex >= 0) {
-                    this.chooseStudent["scores"] = this.paperInfo[this.chooseClass].studentAns.studentScores[answerIndex];
-                    this.chooseStudent["answers"] = this.paperInfo[this.chooseClass].studentAns.studentAnswers[answerIndex];
-                    this.chooseStudent["status"] = false;
-                }
-            }
-        },
-        //分数求和
-        getcount(arr) {
-            return arr.reduce((total, item) => {
-                if (item !== -1) {
-                    return total + item;
-                } else {
-                    return total;
-                }
-            }, 0);
-        },
-        // 获取班级名单
-        async getClassStudent() {
-            this.tableData = []
-            if (!this.chooseClass) return
-            this.showTest = false
-            this.tableLoading = true
-            let stuRes = undefined
-            try {
-                //个人自定义名单则直接根据学生id换name
-                if (this.examInfo.scope == 'private') {
-                    let stuListInfo = this.privStuList.find(item => {
-                        return item.id == this.chooseClass
-                    })
-                    if (stuListInfo) {
-                        stuRes = await this.$api.courseMgmt.findStuSummary({
-                            students: stuListInfo.students
-                        })
-                    }
-                }
-                //校本名单或教室则根据班级id或学生
-                else {
-                    let requestData = {
-                        ids: [this.chooseClass],
-                        scope: this.examInfo.scope,
-                        // school_code: this.examInfo.scope == 'private' ? this.$store.state.userInfo.TEAMModelId : this.$store.state.userInfo.schoolCode,
-                        school_code: this.$store.state.userInfo.schoolCode
-                    }
-                    stuRes = await this.$api.schoolSetting.getClassroomStudent(requestData)
-                }
-            } catch (e) {
-                this.$Message.error('API ERROR')
-                this.tableLoading = false
-            }
-            if (!stuRes.error) {
-                if (!this.paperInfo[this.chooseClass]) {
-                    this.paperInfo[this.chooseClass] = {}
-                }
-                let classStu = {
-                    students: this.examInfo.scope == 'private' ? stuRes.stus || [] : stuRes.stus ? stuRes.stus[0] : [],
-                    id: this.chooseClass
-                }
-                this.$set(this.paperInfo[this.chooseClass], "students", classStu)
-                this.students = []
-                this.studentScore = []
-                this.tableColumn = [...this.scoreList]
-                let defSocre = []
-                if (this.examInfo.progress == 'pending') {//如果评测未发布,没有学生数据,则直接渲染表格
-                    this.quCount = this.paperInfo.item ? this.paperInfo.item.length : 0
-                    for (let i = 0; i < this.quCount; i++) {
-                        let data = {
-                            title: "Q" + (i + 1),
-                            slot: "qu" + i,
-                            align: "center",
-                            minWidth: 65,
-                        }
-                        this.tableColumn.push(data)
-                        defSocre.push(-1)
-                    }
-                    let classStu = this.paperInfo[this.chooseClass].students.students
-                    for (let k = 0; k < classStu.length; k++) {
-                        let score = {}
-                        score.name = classStu[k].name
-                        score.id = classStu[k].id
-                        score.data = defSocre
-                        score.total = 0
-                        score.status = 1
-                        this.studentScore.push(score)
-                    }
-                    this.pageChange(1)
-                    this.tableLoading = false
-                } else {//如果获取进行中或已结束则需要拉取学生数据
-                    this.getStudentAnswer()
-                }
-            } else {
-                this.$Message.error("API ERROR!");
-            }
-        },
-        //计算总览数据
-        calcOverView(data) {
-            //计算已作答未作答
-            this.overviewInfo.noAnswer = 0
-            data.studentAnswers.forEach(item => {
-                if (item.length == 0) {
-                    this.overviewInfo.noAnswer++
-                }
-            })
-            this.overviewInfo.answered = data.studentAnswers.length - this.overviewInfo.noAnswer
-            // 计算已评分未评分
-            this.overviewInfo.noScore = 0
-            data.studentScores.forEach(item => {
-                let flag = item.find(item => {
-                    return item == -1
-                })
-                if (flag) {
-                    this.overviewInfo.noScore++
-                }
-            })
-            this.overviewInfo.scored = data.studentScores.length - this.overviewInfo.noScore
-            // 班级总人数
-            this.overviewInfo.total = data.studentIds.length
-        },
-        getStudentAnswer() {
-            this.dataLoading = true
-            let requestData = {
-                id: this.examInfo.id,
-                code: this.examInfo.scope == 'school' ? this.$store.state.user.schoolCode : this.$store.state.userInfo.TEAMModelId,
-                subjectId: this.chooseSubject,
-                classId: this.chooseClass,
-            };
-            this.$api.learnActivity.FindAllStudent(requestData).then(
-                (res) => {
-                    if (res.examClassResults) {
-                        this.paperInfo[this.chooseClass]["studentAns"] = res.examClassResults[0];
-                        this.setTableData();
-                        if (res.examClassResults[0]) {
-                            this.calcOverView(res.examClassResults[0])
-                        }
-                    }
-                },
-                (err) => {
-                    this.$Message.error("API ERROR!");
-                }
-            ).finally(() => {
-                setTimeout(() => {
-                    this.dataLoading = false
-                    this.tableLoading = false
-                }, 500);
-            });
-        },
-        //初始化表单数据
-        setTableData() {
-            if (this.paperInfo[this.chooseClass] && this.paperInfo[this.chooseClass]["students"] && this.paperInfo[this.chooseClass]["studentAns"]) {
-                let studentData = this.paperInfo[this.chooseClass]["students"]
-                let studentAns = this.paperInfo[this.chooseClass]["studentAns"]
-                this.studentScore = []
-                this.tableColumn = [...this.scoreList]
-                this.quCount = studentAns.studentScores[0] ? studentAns.studentScores[0].length : 0
-                // this.quCount = this.paperInfo.item ? this.paperInfo.item.length : 0 //不用试卷信息计算题目
-                for (let i = 0; i < this.quCount; i++) {
-                    let data = {
-                        title: "Q" + (i + 1),
-                        slot: "qu" + i,
-                        align: "center",
-                        minWidth: 65,
-                    }
-                    this.tableColumn.push(data);
-                }
-                let ans = []
-                for (let i = 0; i < studentAns.studentIds.length; i++) {
-                    for (let k = 0; k < studentData.students.length; k++) {
-                        let score = {}
-                        if (studentAns.studentIds[i] == studentData.students[k].id) {
-                            score.name = studentData.students[k].name
-                            score.id = studentAns.studentIds[i]
-                            score.data = studentAns.studentScores[i]
-                            score.total = this.getcount(score.data)
-                            if (studentAns.studentAnswers[i].length == 0) {//学生未作答
-                                score.status = 1
-                            } else if (studentAns.studentScores[i].indexOf(-1) >= 0) {//已作答,未评分
-                                score.status = 2
-                            } else {//已批改
-                                score.status = 3
-                            }
-                            this.studentScore.push(score)
-                        }
-                    }
-                }
-                this.originData = this._.cloneDeep(this.studentScore)
-                this.students = this._.cloneDeep(this.studentScore)
-                this.pageChange(1)
-                if (ans.length) {
-                    for (let k = 0; k < this.paperInfo.papers.item.length; k++) {
-                        this.$set(
-                            this.paperInfo.papers.item[k],
-                            "answerData",
-                            ans[k]
-                        );
-                        this.$set(
-                            this.paperInfo.papers.item[k],
-                            "stuScore",
-                            score[k]
-                        );
-                    }
-                }
-            }
-
-        },
-        getBack(data) {
-            if (data == "1") {
-                this.getClassStudent();
-            }
-            this.showTest = false;
-        },
-        //获取单个学生作答数据
-        getStudentInfo(data, index) {
-            this.dataLoading = true;
-            if (this.studentInfo !== undefined) {
-                let filData = "";
-                filData = this.studentInfo.id;
-                let ans = [];
-                let score = [];
-                for (let i = 0; i < this.classDatas.studentIds.length; i++) {
-                    if (this.classDatas.studentIds[i] == filData) {
-                        ans = this.classDatas.studentAnswers[i];
-                        score = this.classDatas.studentScores[i];
-                    }
-                }
-                if (ans.length) {
-                    for (let k = 0; k < this.paperInfo.papers.item.length; k++) {
-                        this.$set(this.paperInfo.papers.item[k], "answerData", ans[k]);
-                        this.$set(this.paperInfo.papers.item[k], "stuScore", score[k]);
-                    }
-                }
-                this.dataLoading = false;
-            } else {
-                this.dataLoading = false;
-                this.$Message.warning(this.$t('learnActivity.score.stStuWarning'));
-            }
-            this.selectIndex = index;
-        },
-        getAnswer(data) {
-            //处理学生作答信息
-            let listArr = [];
-            data.forEach(function (el, index) {
-                for (var i = 0; i < listArr.length; i++) {
-                    if (listArr[i].group == el.group) {
-                        listArr[i].listInfo.push(el);
-                        return;
-                    }
-                }
-                listArr.push({
-                    group: el.group,
-                    listInfo: [el],
-                });
-            });
-            return listArr;
-        },
-    },
-    watch: {
-        examInfo: {
-            handler(n, o) {
-                this.privStuList = undefined
-                if (n.subjects && n.subjects.length) {
-                    this.chooseSubject = n.subjects[0].id;
-                }
-                if (n.grades && n.grades.length) {
-                    this.chooseGrade = n.grades[0].id;
-                }
-                if (n.papers && n.papers.length) {
-                    this.paperInfo = n.papers[0] //个人评测只有单科
-                } else {
-                    this.paperInfo = {};
-                }
-                if (n.scope == 'school') {
-                    let requestData = {
-                        ids: this.examInfo.classes,
-                        scope: this.examInfo.scope,
-                        school_code: this.$store.state.userInfo.schoolCode
-                    }
-                    this.$api.schoolSetting.getClassroomStudent(requestData).then(
-                        res => {
-                            if (res && res.stus) {
-                                this.classStudents = res.stus
-                            }
-                        },
-                        err => {
-                            console.log('获取发布对象失败')
-                        }
-                    )
-                }
-            },
-            deep: true,
-        },
-        classList: {
-            handler(n, o) {
-                if (n && n.length) {
-                    this.chooseClass = n[0].id;
-                    this.getClassStudent();
-                } else {
-                    this.chooseClass = undefined
-                }
-            },
-            deep: true,
-        },
-        chooseStudent: {
-            handler(n, o) {
-                if (n.id) {
-                    let curStu = this.studentScore.find(item => {
-                        return item.id == n.id
-                    })
-                    if (curStu.status == 2) {
-                        let flag = n.scores.find(item => {
-                            return item == -1
-                        })
-                        if (!flag) {
-                            curStu.status = 3
-                            this.overviewInfo.noScore--
-                            this.overviewInfo.scored++
-                        }
-                    }
-                }
-            },
-            deep: true
-        }
-    },
-    computed: {
-        classList() {
-            if (this.examInfo && this.examInfo.classes) {
-                //发布对象为校本名单
-                if (this.examInfo.scope == 'school') {
-                    this.showTest = false
-                    let classes = this.classStudents.map(item=>{
-                        return {
-                            id: item[0].classId,
-                            name: item[0].className
-                        }
-                    })
-                    return classes
-                }
-                // 发布对象为个人创建的自定义名单
-                else {
-                    if (!this.privStuList) {
-                        //查询当前老师所有stulist
-                        let params = {
-                            code: this.$store.state.userInfo.TEAMModelId,
-                            scope: 'private'
-                        }
-                        this.$api.courseMgmt.findStulist(params).then(
-                            res => {
-                                this.privStuList = res.stuList
-                            },
-                            err => {
-                                this.$Message.error('API error')
-                            }
-                        )
-                        return this.privStuList
-                    } else {
-                        //过滤当前评测对象
-                        let list = this.privStuList.filter(item => {
-                            return this.examInfo.classes.indexOf(item.id) >= 0
-                        })
-                        return list
-                    }
-                }
-            } else {
-                return []
-            }
-        },
-    },
-    created() {
-        this.$store.dispatch('user/getSchoolProfile').then(
-            res => {
-                this.schoolBase = res.school_base
-                this.schoolClassList = res.school_classes
-            }
-        )
-        if (this.$route.name == 'privateEvaluation') {
-            this.routerScope = 'private'
-        } else {
-            this.routerScope = 'school'
-        }
-    }
-};
-</script>
-
-<style scoped lang="less">
-@import "./Scoring.less";
-</style>
-<style lang="less">
-.scoring-main-wrap .ivu-table-fixed-body {
-    background: #353535;
-    // background: #2b2b2e;
-    // max-height: 653px;
-}
-.scoring-main-wrap .ivu-table-tip {
-    position: relative;
-    z-index: 9999;
-}
-.scoring-main-wrap .ivu-table-fixed-right::before,
-.scoring-main-wrap .ivu-table-fixed::before {
-    display: none;
-}
-.scoring-main-wrap .ivu-table-fixed-header thead tr th {
-    background: #353535;
-    // background: #2b2b2e;
-    border-color: #606060;
-    color: white;
-}
-.scoring-main-wrap {
-    .ivu-table-header thead tr th {
-        // background: #353535;
-        background: rgba(53, 53, 53, 0.5);
-    }
-    .ivu-table td {
-        // background: #353535;
-        background: rgba(53, 53, 53, 0.5);
-    }
-}
-.page-wrap .ivu-page-item {
-    background: rgba(40, 40, 40, 0.5);
-}
-
-.page-wrap .ivu-page-item:hover {
-    border-color: #e4eadb;
-}
-
-.page-wrap .ivu-page-item-active {
-    background: #bfbfb9;
-}
-
-.page-wrap .ivu-page-item a {
-    color: #f1f1f1;
-}
-
-.page-wrap .ivu-page-next,
-.page-wrap .ivu-page-prev {
-    background: rgba(0, 0, 0, 0);
-}
-
-.page-wrap .ivu-page-next a,
-.page-wrap .ivu-page-prev a {
-    color: #e4eadb;
-}
-
-.page-wrap .ivu-page-next:hover,
-.page-wrap .ivu-page-prev:hover {
-    border-color: #e4eadb;
-}
-
-.page-wrap .ivu-page-item-active,
-.page-wrap .ivu-page-item:hover a {
-    border-color: #e4eadb;
-}
-
-.page-wrap .ivu-page-item-active a {
-    color: #595959;
-}
-.page-wrap
-    .ivu-select-small.ivu-select-single
-    .ivu-select-selection
-    .ivu-select-selected-value {
-    height: 27px;
-    line-height: 27px;
-    font-size: 12px;
-}
-.page-wrap .ivu-select-single .ivu-select-selection {
-    height: 30px;
-    background: transparent;
-    border: 1px solid #595959;
-    box-shadow: none;
-    color: #cecece;
-}
-
-.page-wrap .ivu-select-single .ivu-select-placeholder {
-    height: 30px;
-    line-height: 30px;
-    font-size: 16px;
-}
-</style>

+ 3 - 69
TEAMModelOS/ClientApp/src/view/learnactivity/Scoring.vue

@@ -223,21 +223,13 @@ export default {
                 this.chooseStudent.name = data.name
                 this.chooseStudent.name = data.name
                 this.chooseStudent.classId = this.chooseClass
                 this.chooseStudent.classId = this.chooseClass
                 let answerIndex = this.paperInfo[this.chooseClass].studentAns.studentIds.indexOf(data.id)
                 let answerIndex = this.paperInfo[this.chooseClass].studentAns.studentIds.indexOf(data.id)
+                console.log('呵呵呵', this.paperInfo)
                 if (answerIndex >= 0) {
                 if (answerIndex >= 0) {
                     this.chooseStudent["scores"] = this.paperInfo[this.chooseClass].studentAns.studentScores[answerIndex]
                     this.chooseStudent["scores"] = this.paperInfo[this.chooseClass].studentAns.studentScores[answerIndex]
                     this.chooseStudent["answers"] = this.paperInfo[this.chooseClass].studentAns.studentAnswers[answerIndex]
                     this.chooseStudent["answers"] = this.paperInfo[this.chooseClass].studentAns.studentAnswers[answerIndex]
                     this.chooseStudent["mark"] = this.paperInfo[this.chooseClass].studentAns.mark ? this.paperInfo[this.chooseClass].studentAns.mark[answerIndex] || '' : '' //批注
                     this.chooseStudent["mark"] = this.paperInfo[this.chooseClass].studentAns.mark ? this.paperInfo[this.chooseClass].studentAns.mark[answerIndex] || '' : '' //批注
                     this.chooseStudent["status"] = false
                     this.chooseStudent["status"] = false
                 }
                 }
-
-                // 前往新的阅卷页面
-                // this.$router.push({
-                //     name: 'MarkView',
-                //     params: {
-                //         type: 1,
-                //         from: this.$route.name
-                //     }
-                // })
             }
             }
         },
         },
         //获取当前学生信息
         //获取当前学生信息
@@ -264,65 +256,6 @@ export default {
                 }
                 }
             }, 0);
             }, 0);
         },
         },
-        // 获取班级名单 使用PrivScoring.vue方法,兼容班级和自定义名单功能
-        // getClassStudent() {
-        //     this.tableData = []
-        //     if (!this.chooseClass) return
-        //     this.showTest = false
-        //     this.tableLoading = true
-        //     let requestData = {
-        //         ids: [this.chooseClass],
-        //         scope: this.examInfo.scope == 'private' ? 'private' : 'school',
-        //         // school_code: this.examInfo.scope == 'private' ? this.$store.state.userInfo.TEAMModelId : this.$store.state.userInfo.schoolCode,
-        //         school_code: this.$store.state.userInfo.schoolCode
-        //     };
-        //     this.$api.schoolSetting.getClassroomStudent(requestData).then((res) => {
-        //         if (!res.error) {
-        //             if (!this.paperInfo[this.chooseClass]) {
-        //                 this.paperInfo[this.chooseClass] = {}
-        //             }
-        //             let classStu = {
-        //                 students: res.stus.length ? res.stus[0] : [],
-        //                 id: this.chooseClass
-        //             }
-        //             this.$set(this.paperInfo[this.chooseClass], "students", classStu)
-        //             this.students = []
-        //             this.studentScore = []
-        //             this.tableColumn = [...this.scoreList]
-        //             let defSocre = []
-        //             if (this.examInfo.progress == 'pending') {//如果评测未发布,没有学生数据,则直接渲染表格
-        //                 this.quCount = this.paperInfo.item ? this.paperInfo.item.length : 0
-        //                 for (let i = 0; i < this.quCount; i++) {
-        //                     let data = {
-        //                         title: "Q" + (i + 1),
-        //                         slot: "qu" + i,
-        //                         align: "center",
-        //                         minWidth: 65,
-        //                     }
-        //                     this.tableColumn.push(data)
-        //                     defSocre.push(-1)
-        //                 }
-        //                 let classStu = this.paperInfo[this.chooseClass].students.students
-        //                 for (let k = 0; k < classStu.length; k++) {
-        //                     let score = {}
-        //                     score.name = classStu[k].name
-        //                     score.id = classStu[k].id
-        //                     score.data = defSocre
-        //                     score.total = 0
-        //                     score.status = 1
-        //                     this.studentScore.push(score)
-        //                 }
-        //                 this.pageChange(1)
-        //                 this.tableLoading = false
-        //             } else {//如果获取进行中或已结束则需要拉取学生数据
-        //                 this.getStudentAnswer()
-        //             }
-
-        //         } else {
-        //             this.$Message.error("API ERROR!");
-        //         }
-        //     })
-        // },
         async getClassStudent() {
         async getClassStudent() {
             this.tableData = []
             this.tableData = []
             if (!this.chooseClass) return
             if (!this.chooseClass) return
@@ -563,6 +496,7 @@ export default {
     watch: {
     watch: {
         examInfo: {
         examInfo: {
             handler(n, o) {
             handler(n, o) {
+                console.log('评测数据', this.examInfo)
                 this.privStuList = undefined
                 this.privStuList = undefined
                 if (n.subjects && n.subjects.length) {
                 if (n.subjects && n.subjects.length) {
                     this.chooseSubject = n.subjects[0].id;
                     this.chooseSubject = n.subjects[0].id;
@@ -585,7 +519,7 @@ export default {
                 }
                 }
                 // 这里与PrivScoring.vue还少一段代码,不确定是否需要,暂时没有复制过来
                 // 这里与PrivScoring.vue还少一段代码,不确定是否需要,暂时没有复制过来
             },
             },
-            deep: true,
+            deep: true
         },
         },
         classList: {
         classList: {
             handler(n, o) {
             handler(n, o) {

+ 0 - 63
TEAMModelOS/ClientApp/src/view/learnactivity/TeacherPreview.less

@@ -1,63 +0,0 @@
-
-.teacher-preview-container {
-    height: 100%;
-    background: #404040;
-    padding: 10px;
-    padding-bottom: 30px;
-    position:relative;
-}
-
-.test-paper-info {
-    width: 100%;
-    padding: 20px 0px;
-    color: white;
-}
-.test-paper-points{
-  width:100%;
-  margin-top:15px;
-}
-.question-type-scope {
-  width: 100%;
-  margin-bottom:15px;
-  .question-type-count{
-    color:white;
-    font-size:16px;
-    display:inline-block;
-  }
-}
-.test-paper-analysis{
-  color:aqua;
-  cursor:pointer;
-}
-.set-score-icon {
-  margin-left: 15px;
-  vertical-align: middle;
-  color:aqua;
-  cursor:pointer;
-}
-.set-score-table{
-  margin-bottom:15px;
-}
-.teacher-preview-container .back-to-top {
-    position: fixed;
-    right: ~"calc(50px - 100%)";
-    bottom: 40px;
-    height: 48px;
-    width: 50px;
-    background: #595959;
-    z-index: 99999;
-    cursor: pointer;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-}
-
-.teacher-preview-container .back-to-top:hover {
-    background: rgb(128,128,128);
-}
-
-.teacher-preview-container .back-to-top .ivu-icon {
-    font-size: 26px;
-    color: white;
-}

+ 0 - 75
TEAMModelOS/ClientApp/src/view/learnactivity/TeacherPreview.vue

@@ -1,75 +0,0 @@
-<template>
-    <div style="" class="teacher-preview-container">
-        <!--返回顶部-->
-        <div class="back-to-top" :title="$t('learnActivity.mgtScEv.returnTop')" v-show="showBack" @click="handleBackToTop">
-            <Icon type="ios-arrow-up" />
-        </div>
-        <vuescroll ref="paper-preview" @handle-scroll="checkBackTop">
-            <TestPaper :paper="testPaper" isExamPaper></TestPaper>
-        </vuescroll>
-    </div>
-</template>
-<script>
-    import TestPaper from '@/view/evaluation/index/TestPaper.vue'
-    export default {
-        components: {
-            TestPaper
-        },
-        props: {
-            testPaper: {
-                type: Object,
-                default: () => {
-                    return {
-                        item: []
-                    }
-                }
-            }
-        },
-        data() {
-            return {
-                showBack:false
-            }
-        },
-        methods: {
-           /**vuescroll回到顶部 */
-            handleBackToTop() {
-                this.$refs['paper-preview'].scrollTo(
-                    {
-                        y: '0'
-                    },
-                    300
-                )
-            },
-            /**
-             * 判断是否显示回到顶部按钮
-             * @param vertical
-             * @param horizontal
-             * @param nativeEvent
-             */
-            checkBackTop(vertical, horizontal, nativeEvent) {
-                if (vertical.scrollTop > 100) {
-                    this.showBack = true
-                } else {
-                    this.showBack = false
-                }
-            },
-        },
-        watch: {
-        },
-        mounted() {
-        }
-
-    }
-</script>
-<style lang="less">
-    @import "./TeacherPreview.less";
-</style>
-<style>
-    .set-score-table .ivu-input-number, .set-score-table .ivu-input-number-default input {
-        text-align: center;
-    }
-    .teacher-preview-container .paper-main-wrap {
-        padding:0px;
-        margin-top:0px;
-    }
-</style>

+ 19 - 34
TEAMModelOS/ClientApp/src/view/student-account/stuMgt/StuMgt.vue

@@ -554,19 +554,23 @@ export default {
         /**根据学段、年级、班级搜索 */
         /**根据学段、年级、班级搜索 */
         filterData() {
         filterData() {
             let data = this.students
             let data = this.students
-            // 优先帳號資訊搜尋
-            if (this.searchText) {
-                let text = this.searchText
-                data = data.filter((item) => {
-                    return (item.name.indexOf(text) >= 0 || item.id.indexOf(text) >= 0) && item.periodId == this.searchPeriod
+            // 學制篩選
+            if (this.searchPeriod) {
+                let id = this.searchPeriod
+                data = data.filter(function (item) {
+                    return item.periodId == id
                 })
                 })
-                this.tableFilterData = data
-                this.pointNum = this.basicCount
-                this.tableShowData = data.slice(0, this.basicCount)
-                return
             }
             }
 
 
-            // 其次班级筛选条件
+            // 年級篩選
+            if (this.searchGrade) {
+                let id = this.searchGrade
+                data = data.filter(function (item) {
+                    return item.classYear == id
+                })
+            }
+
+            // 班级筛选条件
             if (this.searchClass == 'noclass') {
             if (this.searchClass == 'noclass') {
                 if (this.searchClass) {
                 if (this.searchClass) {
                     let id = this.searchClass
                     let id = this.searchClass
@@ -574,37 +578,18 @@ export default {
                         return !item.classId
                         return !item.classId
                     })
                     })
                 }
                 }
-
-                this.tableFilterData = data
-                this.pointNum = this.basicCount
-                this.tableShowData = data.slice(0, this.basicCount)
-                return
             } else if (this.searchClass) {
             } else if (this.searchClass) {
                 let id = this.searchClass
                 let id = this.searchClass
                 data = data.filter(function (item) {
                 data = data.filter(function (item) {
                     return item.classId == id
                     return item.classId == id
                 })
                 })
-                this.tableFilterData = data
-                this.pointNum = this.basicCount
-                this.tableShowData = data.slice(0, this.basicCount)
-                return
             }
             }
 
 
-            // 其他筛选条件
-
-            // 學制篩選
-            if (this.searchPeriod) {
-                let id = this.searchPeriod
-                data = data.filter(function (item) {
-                    return item.periodId == id
-                })
-            }
-
-            // 年級篩選
-            if (this.searchGrade) {
-                let id = this.searchGrade
-                data = data.filter(function (item) {
-                    return item.classYear == id
+            // 帳號資訊搜尋
+            if (this.searchText) {
+                let text = this.searchText
+                data = data.filter((item) => {
+                    return (item.name.indexOf(text) >= 0 || item.id.indexOf(text) >= 0) && item.periodId == this.searchPeriod
                 })
                 })
             }
             }
 
 

+ 109 - 19
TEAMModelOS/ClientApp/src/view/task/err/ErrPaper.vue

@@ -10,28 +10,32 @@
         </div>
         </div>
         <div class="arb-content">
         <div class="arb-content">
             <vuescroll>
             <vuescroll>
-                <div class="arb-paper-item" v-for="(item,index) in arr" :key="index">
+                <div class="arb-paper-item" v-for="(item,index) in errListShow" :key="index">
                     <p class="qu-info-wrap">
                     <p class="qu-info-wrap">
                         <span class="qu-info-label">题目:</span>
                         <span class="qu-info-label">题目:</span>
-                        <span class="qu-info-value">5-5</span>
+                        <span class="qu-info-value">{{item.quNo + 1}}</span>
                     </p>
                     </p>
                     <div style="flex:1">
                     <div style="flex:1">
                         <p>
                         <p>
                             <span class="score-info-label">原因:</span>
                             <span class="score-info-label">原因:</span>
-                            <span class="score-info-value">答案看不清,无法评分</span>
-                            <span class="score-info-label">
+                            <span class="score-info-value">{{item.err}}</span>
+                            <!-- <span class="score-info-label">
                                 <Icon type="md-time" />
                                 <Icon type="md-time" />
                                 2021-09-01
                                 2021-09-01
-                            </span>
+                            </span> -->
                         </p>
                         </p>
+                        <span>{{item.stuId}}</span>
                     </div>
                     </div>
                     <div style="width:100px">
                     <div style="width:100px">
-                        <Button type="primary" shape="circle" size="small" long @click="handleErr">处理</Button>
+                        <Button :type="item.improve ? 'success' : 'primary'" shape="circle" size="small" long @click="handleErr(index,item)">
+                            {{item.improve ? '已处理' : '处理'}}
+                        </Button>
                     </div>
                     </div>
                 </div>
                 </div>
+                <EmptyData v-if="!errListShow.length" textContent="暂无异常申报" :top="150"></EmptyData>
             </vuescroll>
             </vuescroll>
         </div>
         </div>
-        <Modal v-model="errStatus" title="异常处理" @on-ok="feedback" width="1000">
+        <Modal v-model="errStatus" title="异常处理" @on-ok="feedback" width="1000" :loading="loading">
             <div class="err-info-item" style="margin-top:10px">
             <div class="err-info-item" style="margin-top:10px">
                 <p>
                 <p>
                     <span class="err-info-label">学生答案:</span>
                     <span class="err-info-label">学生答案:</span>
@@ -45,7 +49,7 @@
             </div>
             </div>
             <div class="err-info-item">
             <div class="err-info-item">
                 <p class="err-info-label">异常描述:</p>
                 <p class="err-info-label">异常描述:</p>
-                <p>小题分网上阅卷比传统阅卷具有的优势:能够提高工作效率、保证公平公正、方便信息查询、利于答卷保密、便于数据统计分析</p>
+                <p v-if="errListShow[handleIndex]">{{errListShow[handleIndex].err}}</p>
             </div>
             </div>
             <div class="err-info-item">
             <div class="err-info-item">
                 <p>
                 <p>
@@ -53,39 +57,124 @@
                 </p>
                 </p>
                 <Input v-model="advice" maxlength="50" show-word-limit type="textarea" placeholder="反馈建议..." style="width: 800px" />
                 <Input v-model="advice" maxlength="50" show-word-limit type="textarea" placeholder="反馈建议..." style="width: 800px" />
             </div>
             </div>
-
         </Modal>
         </Modal>
     </div>
     </div>
 </template>
 </template>
 <script>
 <script>
 export default {
 export default {
+    props: {
+        taskInfo: {
+            type: Object,
+            default: () => {
+                return {}
+            }
+        }
+    },
     data() {
     data() {
         return {
         return {
+            loading: true,
+            handleIndex: 0,
             advice: '',
             advice: '',
-            curBarIndex: 0,
-            arr: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
-            errStatus: false
+            curBarIndex: 1,
+            errStatus: false,
+            errList: [],
+            errListShow:[]
         }
         }
-    },
-    created() {
-
     },
     },
     methods: {
     methods: {
+        //异常处理老师查看所有申报的异常试卷
+        findErrData() {
+            let requestData = {
+                code: this.taskInfo.ecode.replace('Exam-', ''),
+                id: this.taskInfo.id,
+                subjectId: this.taskInfo.subject,
+            }
+            this.$api.mark.findErr(requestData).then(
+                async res => {
+                    if (!res.error && res.errs) {
+                        this.errList = []
+                        res.errs.forEach(sItem => {
+                            sItem.qs.forEach(eItem => {
+                                this.errList.push({
+                                    stuId: sItem.stuId,
+                                    quNo: eItem.index,
+                                    err: eItem.err,
+                                    improve: eItem.improve,
+                                    id: sItem.id
+                                })
+                            })
+                        })
+                        this.selectBar(1)
+                    }
+                },
+                err => {
+                    this.$Message.error('API error')
+                }
+            )
+        },
         //反馈建议
         //反馈建议
         feedback() {
         feedback() {
-
+            if (this.advice) {
+                let requestData = {
+                    id: this.errListShow[this.handleIndex].id,
+                    code: this.taskInfo.ecode.replace('Exam-', ''),
+                    improve: this.advice,
+                    index: this.errListShow[this.handleIndex].quNo
+                }
+                this.$api.mark.feedbackErr(requestData).then(
+                    async res => {
+                        this.$Message.success('处理成功')
+                        this.errStatus = false
+                        let errInfo = this.errListShow.find(item=>{
+                            return item.id == this.errListShow[this.handleIndex].id
+                        })
+                        errInfo.improve = this.advice
+                    },
+                    err => {
+                        this.$Message.error('API error')
+                    }
+                )
+            } else {
+                this.$Message.warning('请输入反馈建议')
+                this.loading = false
+                setTimeout(()=>{
+                    this.loading = true
+                })
+            }
         },
         },
-        handleErr() {
+        handleErr(index, data) {
+            this.handleIndex = index
             this.errStatus = true
             this.errStatus = true
+            this.advice = data.improve
         },
         },
         selectBar(index) {
         selectBar(index) {
             this.curBarIndex = index
             this.curBarIndex = index
+            if(index == 1){
+                this.errListShow = this.errList.filter(item=>{
+                    return !item.improve
+                })
+            }else{
+                this.errListShow = this.errList.filter(item=>{
+                    return item.improve
+                })
+            }
+        }
+    },
+    watch: {
+        taskInfo: {
+            handler(n, o) {
+                if (this.taskInfo && this.taskInfo.id) {
+                    this.findErrData()
+                }
+            },
+            deep: true,
+            immediate: true
         }
         }
     }
     }
 }
 }
 </script>
 </script>
 <style scoped lang="less">
 <style scoped lang="less">
-.err-info-label{
+.err-info-label {
     color: #a5a5a5;
     color: #a5a5a5;
 }
 }
 .view-origin-paper {
 .view-origin-paper {
@@ -107,7 +196,8 @@ export default {
 }
 }
 .qu-info-wrap {
 .qu-info-wrap {
     width: 150px;
     width: 150px;
-    text-align: center;
+    margin-left: 20px;
+    // text-align: center;
 }
 }
 .score-info-label {
 .score-info-label {
     color: #a5a5a5;
     color: #a5a5a5;

+ 89 - 28
TEAMModelOS/ClientApp/src/view/task/index.vue

@@ -44,7 +44,7 @@
                             {{$t('task.markMode1')}}
                             {{$t('task.markMode1')}}
                         </span>
                         </span>
                     </div>
                     </div>
-                    <vuescroll class="mark-info-content" v-if="markList.length > 0">
+                    <vuescroll class="mark-info-content" v-if="markList.length > 0" style="padding-bottom:10px">
                         <!-- 按人阅卷学生信息 -->
                         <!-- 按人阅卷学生信息 -->
                         <StuProg v-show="curBarIndex == 1" @getStuId="toByStuView" :stusData="markData ? markData.objs : []" :total="markList[curTaskIndex] ? markList[curTaskIndex].count : 1" :qus="markList[curTaskIndex] ? markList[curTaskIndex].qu : []"></StuProg>
                         <StuProg v-show="curBarIndex == 1" @getStuId="toByStuView" :stusData="markData ? markData.objs : []" :total="markList[curTaskIndex] ? markList[curTaskIndex].count : 1" :qus="markList[curTaskIndex] ? markList[curTaskIndex].qu : []"></StuProg>
                         <!-- 按题 批阅进度 -->
                         <!-- 按题 批阅进度 -->
@@ -71,11 +71,22 @@
                                 <ProgPie :count="[marked.length,marking.length,unmarked]"></ProgPie>
                                 <ProgPie :count="[marked.length,marking.length,unmarked]"></ProgPie>
                             </div>
                             </div>
                         </div>
                         </div>
+                        <!-- 异常申报统计 -->
+                        <div class="setting-block" v-show="errData.length">
+                            <p class="block-title">异常统计</p>
+                            <div class="setting-content  data-content dark-iview-table">
+                                <Table :columns="errCol" :data="errData">
+                                    <template slot-scope="{ row }" slot="status">
+                                        <strong :style="{color: row.status ? '#19be6b' : '#ed4014'}">{{ row.status ? '已处理' : '处理中'}}</strong>
+                                    </template>
+                                </Table>
+                            </div>
+                        </div>
                     </vuescroll>
                     </vuescroll>
                     <EmptyData textContent="暂无阅卷任务" :top="90" style="height:fit-content"></EmptyData>
                     <EmptyData textContent="暂无阅卷任务" :top="90" style="height:fit-content"></EmptyData>
                 </div>
                 </div>
                 <!-- 异常卷任务 -->
                 <!-- 异常卷任务 -->
-                <ErrPaper slot="right" v-else-if="markList[curTaskIndex].type == 2"></ErrPaper>
+                <ErrPaper slot="right" :taskInfo="markList[curTaskIndex]" v-else-if="markList[curTaskIndex].type == 2"></ErrPaper>
                 <!-- 仲裁卷任务 -->
                 <!-- 仲裁卷任务 -->
                 <Arbitration slot="right" v-else-if="markList[curTaskIndex].type == 3"></Arbitration>
                 <Arbitration slot="right" v-else-if="markList[curTaskIndex].type == 3"></Arbitration>
             </Split>
             </Split>
@@ -96,7 +107,7 @@ export default {
     data() {
     data() {
         return {
         return {
             objectiveQu: ['single', 'multiple', 'judge'],
             objectiveQu: ['single', 'multiple', 'judge'],
-            columns1: [
+            errCol: [
                 {
                 {
                     title: '学号',
                     title: '学号',
                     key: 'id',
                     key: 'id',
@@ -105,29 +116,26 @@ export default {
                 },
                 },
                 {
                 {
                     title: '题号',
                     title: '题号',
-                    key: 'quNo',
+                    key: 'index',
                     align: 'center'
                     align: 'center'
                 },
                 },
                 {
                 {
-                    title: '异常说明',
-                    key: 'desc',
+                    title: '异常原因',
+                    key: 'err',
+                    align: 'center'
+                },
+                {
+                    title: '反馈建议',
+                    key: 'feedback',
                     align: 'center'
                     align: 'center'
                 },
                 },
                 {
                 {
                     title: '状态',
                     title: '状态',
-                    key: 'status',
+                    slot: 'status',
                     align: 'center',
                     align: 'center',
                     width: 120
                     width: 120
                 }
                 }
             ],
             ],
-            data1: [
-                {
-                    id: '001',
-                    quNo: 5,
-                    desc: '模糊,看不清楚',
-                    status: '未处理'
-                }
-            ],
             columns2: [
             columns2: [
                 {
                 {
                     title: '学号',
                     title: '学号',
@@ -160,15 +168,6 @@ export default {
                     width: 120
                     width: 120
                 }
                 }
             ],
             ],
-            data2: [
-                {
-                    id: '001',
-                    quNo: 5,
-                    myScore: 5,
-                    otScore: 10,
-                    status: '未处理'
-                }
-            ],
             tabIndex: 0,
             tabIndex: 0,
             split1: 0.2,
             split1: 0.2,
             curBarIndex: 1,
             curBarIndex: 1,
@@ -345,7 +344,23 @@ export default {
                         ch = ch || 0
                         ch = ch || 0
                         ch = ch > this.markList.length - 1 ? 0 : ch
                         ch = ch > this.markList.length - 1 ? 0 : ch
                         this.curTaskIndex = ch || 0
                         this.curTaskIndex = ch || 0
-                        if (this.markList.length > 0) this.findTaskData()
+                        if (this.markList.length > 0) {
+                            let type = this.markList[0].type
+                            console.log('type', type)
+                            switch (type) {
+                                case 1:
+                                    this.findTaskData()
+                                    break
+                                // case 2:
+                                //     this.findErrData()
+                                //     break
+                                // case 3:
+                                //     this.findArbData()
+                                //     break
+                                default:
+                                    break
+                            }
+                        }
                     } else {
                     } else {
                         this.$Message.error('API error!')
                         this.$Message.error('API error!')
                     }
                     }
@@ -371,6 +386,14 @@ export default {
                         this.fullPaper = await this.$evTools.getFullPaper({
                         this.fullPaper = await this.$evTools.getFullPaper({
                             blob: res.paper
                             blob: res.paper
                         }, 'school')
                         }, 'school')
+
+                        //处理异常题目数据
+                        res.objs.forEach(sItem => {
+                            sItem.qs.forEach(eItem => {
+                                sItem.item[eItem.index].err = eItem.err
+                                sItem.item[eItem.index].improve = eItem.improve
+                            })
+                        })
                         this.markData = res
                         this.markData = res
                     }
                     }
                 },
                 },
@@ -379,19 +402,57 @@ export default {
                 }
                 }
             )
             )
         },
         },
+
+        findArbData() {
+
+        },
         selectTask(index) {
         selectTask(index) {
             this.curTaskIndex = index
             this.curTaskIndex = index
             sessionStorage.setItem('markIndex', index)
             sessionStorage.setItem('markIndex', index)
-            this.findTaskData()
+            if (this.markList.length > 0) {
+                let type = this.markList[0].type
+                console.log('type', type)
+                switch (type) {
+                    case 1:
+                        console.log('task')
+                        this.findTaskData()
+                        break
+                    // case 2:
+                    //     this.findErrData()
+                    //     break
+                    // case 3:
+                    //     this.findArbData()
+                    //     break
+                    default:
+                        break
+                }
+            }
         },
         },
 
 
     },
     },
     created() {
     created() {
         this.findTask()
         this.findTask()
         this.curBarIndex = sessionStorage.getItem('markMode') || 1
         this.curBarIndex = sessionStorage.getItem('markMode') || 1
-
     },
     },
     computed: {
     computed: {
+        //异常数据
+        errData() {
+            let data = []
+            if (this.markData && this.markData.objs) {
+                this.markData.objs.forEach(item => {
+                    item.qs.forEach(errItem => {
+                        data.push({
+                            id: item.stuId,
+                            index: errItem.index,
+                            feedback: errItem.improve || '--',
+                            err: errItem.err,
+                            status: !!errItem.improve
+                        })
+                    })
+                })
+            }
+            return data
+        },
         //当前阅卷任务未阅数量
         //当前阅卷任务未阅数量
         unmarked() {
         unmarked() {
             if (this.markList.length > 0) {
             if (this.markList.length > 0) {
@@ -440,7 +501,7 @@ export default {
             } else {
             } else {
                 return []
                 return []
             }
             }
-        },
+        }
     }
     }
 }
 }
 </script>
 </script>

+ 34 - 8
TEAMModelOS/ClientApp/src/view/task/mark/ByStu.vue

@@ -18,7 +18,7 @@
                     <Icon type="md-shuffle" class="action-btn-icon" />
                     <Icon type="md-shuffle" class="action-btn-icon" />
                     {{$t('learnActivity.mark.toggleStu')}}
                     {{$t('learnActivity.mark.toggleStu')}}
                 </span>
                 </span>
-                <span class="action-btn" @click="errStatus = true">
+                <span class="action-btn" @click="errStatus = true" v-show="!quNoList[quIndex].err">
                     <Icon custom="iconfont icon-exception" class="action-btn-icon" />
                     <Icon custom="iconfont icon-exception" class="action-btn-icon" />
                     {{$t('learnActivity.mark.exception')}}
                     {{$t('learnActivity.mark.exception')}}
                 </span>
                 </span>
@@ -52,13 +52,28 @@
                         <span class="qu-tips-tag">
                         <span class="qu-tips-tag">
                             {{$t('learnActivity.mark.unmark')}}
                             {{$t('learnActivity.mark.unmark')}}
                         </span>
                         </span>
+                        <span class="qu-tips-tag">
+                            异常
+                        </span>
                         <span class="objective-tips">
                         <span class="objective-tips">
                             温馨提示:客观题已由系统自动评分,下面只显示了需要人工评分的主观题题号。
                             温馨提示:客观题已由系统自动评分,下面只显示了需要人工评分的主观题题号。
                         </span>
                         </span>
                     </div>
                     </div>
                     <div>
                     <div>
-                        <span v-show="(!taskInfo.qu.length || taskInfo.qu.includes(index)) && !item.disabled" v-for="(item,index) in quNoList" :key="index" :class="['qu-index',stuScore[index] > -1 ? 'right-qu' : '']" @click="toQu(index)">
-                            {{item.label}}
+                        <span v-show="(!taskInfo.qu.length || taskInfo.qu.includes(index)) && !item.disabled" v-for="(item,index) in quNoList" :key="index">
+                            <Tooltip v-if="item.err" :content="item.err" transfer>
+                                <span class="qu-index err-qu" @click="toQu(index)">
+                                    {{item.label}}
+                                </span>
+                                <div slot="content">
+                                    <p>异常:{{item.err}}</p>
+                                    <p v-if="item.improve">反馈:{{item.improve}}</p>
+                                    <p v-else>状态:未处理</p>
+                                </div>
+                            </Tooltip>
+                            <span v-else :class="['qu-index',stuScore[index] > -1 ? 'right-qu' : '']" @click="toQu(index)">
+                                {{item.label}}
+                            </span>
                         </span>
                         </span>
                     </div>
                     </div>
                 </div>
                 </div>
@@ -461,7 +476,7 @@ export default {
                 this.imgs.push(require('@/assets/mark/' + i + '.svg'))
                 this.imgs.push(require('@/assets/mark/' + i + '.svg'))
             }
             }
         } else {
         } else {
-            this.$Message.error('数据错误')
+            // this.$Message.error('数据错误')
             this.quit()
             this.quit()
         }
         }
     },
     },
@@ -491,17 +506,23 @@ export default {
                 this.paperData.item.forEach((item, index) => {
                 this.paperData.item.forEach((item, index) => {
                     if (item.children.length) {
                     if (item.children.length) {
                         item.children.forEach((childItem, childIndex) => {
                         item.children.forEach((childItem, childIndex) => {
+                            let i = realIndex++
                             data.push({
                             data.push({
                                 label: (index + 1) + '-' + (childIndex + 1),
                                 label: (index + 1) + '-' + (childIndex + 1),
-                                value: realIndex++,
-                                disabled: objectiveQu.includes(childItem.type)
+                                value: i,
+                                disabled: objectiveQu.includes(childItem.type),
+                                err: this.stuData.item ? this.stuData.item[i].err : undefined,
+                                improve: this.stuData.item ? this.stuData.item[i].improve : undefined
                             })
                             })
                         })
                         })
                     } else {
                     } else {
+                        let i = realIndex++
                         data.push({
                         data.push({
                             label: (index + 1) + '',
                             label: (index + 1) + '',
-                            value: realIndex++,
-                            disabled: objectiveQu.includes(item.type)
+                            value: i,
+                            disabled: objectiveQu.includes(item.type),
+                            err: this.stuData.item ? this.stuData.item[i].err : undefined,
+                            improve: this.stuData.item ? this.stuData.item[i].improve : undefined
                         })
                         })
                     }
                     }
                 })
                 })
@@ -672,6 +693,11 @@ export default {
     border-color: #19be6b;
     border-color: #19be6b;
     background: #19be6b;
     background: #19be6b;
 }
 }
+.err-qu {
+    color: #fff;
+    border-color: #ed4014;
+    background: #ed4014;
+}
 .submit-score {
 .submit-score {
     width: 236px;
     width: 236px;
     margin-left: 2px;
     margin-left: 2px;

+ 24 - 0
TEAMModelOS/ClientApp/src/view/task/mark/Mark.vue

@@ -0,0 +1,24 @@
+<template>
+    <!-- 阅卷代码结构待优化 -->
+    <div>
+        
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return {
+
+        }
+    },
+    methods:{
+
+    },
+    created(){
+
+    }
+}
+</script>
+<style scoped lang="less">
+
+</style>

+ 99 - 1
TEAMModelOS/Controllers/Analysis/AchievementController.cs

@@ -3870,7 +3870,7 @@ namespace TEAMModelOS.Controllers.Analysis
                                             {
                                             {
                                                 sc.ForEach(s =>
                                                 sc.ForEach(s =>
                                                 {
                                                 {
-                                                    scores.Add(double.Parse(s));
+                                                    scores.Add(s);
                                                 });
                                                 });
                                             }
                                             }
                                             newScores.Add(scores);
                                             newScores.Add(scores);
@@ -4181,6 +4181,104 @@ namespace TEAMModelOS.Controllers.Analysis
                 return BadRequest();
                 return BadRequest();
             }
             }
         }
         }
+
+
+        [HttpPost("import-exam")]
+        public async Task<IActionResult> importExam(JsonElement request)
+        {
+            //获取评测的ID
+            if (!request.TryGetProperty("exam", out JsonElement exam)) return BadRequest();
+            if (!request.TryGetProperty("code", out JsonElement code)) return BadRequest();
+            try
+            {
+                var client = _azureCosmos.GetCosmosClient();
+                ExamInfo info = exam.ToObject<ExamInfo>();
+                info.progress = "going";
+                await client.GetContainer("TEAMModelOS", "Common").UpsertItemAsync(info, new PartitionKey($"Exam-{code}"));
+                return Ok(new { info });
+            }
+            catch (Exception e)
+            {
+                await _dingDing.SendBotMsg($"OS,{_option.Location},analysis/import-exam()\n{e.Message}", GroupNames.醍摩豆服務運維群組);
+                return BadRequest();
+            }
+        }
+
+
+        [HttpPost("import-result")]
+        public async Task<IActionResult> importResult(JsonElement request)
+        {
+            //获取评测的ID
+            if (!request.TryGetProperty("classResult", out JsonElement classResult)) return BadRequest();
+            if (!request.TryGetProperty("id", out JsonElement id)) return BadRequest();
+            if (!request.TryGetProperty("code", out JsonElement code)) return BadRequest();
+            try
+            {
+                var client = _azureCosmos.GetCosmosClient();
+                List<ExamClassResultDto> examClassResultDto = new();
+                examClassResultDto = classResult.ToObject<List<ExamClassResultDto>>();
+                //获取本次评测所有班级作答结果
+                List<ExamClassResult> examClassResults = new();
+                var queryClass = $"select value(c) from c where c.examId =  '{id}'";
+                await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryIterator<ExamClassResult>(queryText: queryClass, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"ExamClassResult-{code}") }))
+                {
+                    examClassResults.Add(item);
+
+                }
+                ExamInfo info = await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<ExamInfo>(id.ToString(), new PartitionKey($"Exam-{code}"));
+                List<Task<ItemResponse<ExamClassResult>>> tasks = new();
+                if (info == null)
+                {
+                    return Ok(new { code = 404, msg = "请先录入评测数据" });
+                }
+                else
+                {
+                    foreach (ExamClassResultDto e in examClassResultDto)
+                    {
+                        int no = 0;
+                        foreach (ExamSubject sub in info.subjects)
+                        {
+                            if (!sub.id.Equals(e.subject))
+                            {
+                                no++;
+                            }
+                        }
+                        //获取标准答案
+                        List<List<string>> standard = new();
+                        standard = info.papers[no].answers;
+
+                        foreach (ExamClassResult ex in examClassResults)
+                        {
+                            if (e.subject.Equals(ex.subjectId))
+                            {
+                                foreach (ClassResults examClass in e.examClassResult)
+                                {
+                                    if (examClass.classInfo.id.Equals(ex.info.id))
+                                    {
+                                        ex.studentIds = examClass.studentIds;
+                                        ex.studentScores = examClass.studentScores;
+                                        //ex.studentAnswers = examClass.studentAnswers;
+                                        ex.ans = examClass.ans;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+                foreach (ExamClassResult result in examClassResults)
+                {
+                    result.progress = true;
+                    tasks.Add(client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync(result, result.id, new PartitionKey($"{result.code}")));
+                }
+                await Task.WhenAll(tasks);
+                return Ok(new { examClassResults });
+            }
+            catch (Exception e)
+            {
+                await _dingDing.SendBotMsg($"OS,{_option.Location},analysis/import-result()\n{e.StackTrace}", GroupNames.醍摩豆服務運維群組);
+                return BadRequest();
+            }
+        }
     }
     }
 }
 }
 //private List<Dictionary<string, dynamic>> getKnowledgePoint(List<ExamResult> examResults, ExamInfo info)
 //private List<Dictionary<string, dynamic>> getKnowledgePoint(List<ExamResult> examResults, ExamInfo info)

+ 1 - 0
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -2023,6 +2023,7 @@ namespace TEAMModelOS.Controllers
                     builder.Append(id).Append('/');
                     builder.Append(id).Append('/');
                     builder.Append(subjectId).Append('/');
                     builder.Append(subjectId).Append('/');
                     builder.Append(sId).Append("mark").Append('/');
                     builder.Append(sId).Append("mark").Append('/');
+                    //builder.Append(tId).Append('/');
                     builder.Append("ans.json");
                     builder.Append("ans.json");
                     await _azureStorage.UploadFileByContainer(code.ToString(), mark.ToJsonString(), "exam", builder.ToString(), false);
                     await _azureStorage.UploadFileByContainer(code.ToString(), mark.ToJsonString(), "exam", builder.ToString(), false);
                     if (attr.Count > 0)
                     if (attr.Count > 0)

+ 2 - 0
TEAMModelOS/Controllers/Teacher/CommentController.cs

@@ -148,6 +148,7 @@ namespace TEAMModelOS.Controllers
             if (!request.TryGetProperty("id", out JsonElement id)) return BadRequest();
             if (!request.TryGetProperty("id", out JsonElement id)) return BadRequest();
             if (!request.TryGetProperty("answer", out JsonElement answer)) return BadRequest();
             if (!request.TryGetProperty("answer", out JsonElement answer)) return BadRequest();
             if (!request.TryGetProperty("studentId", out JsonElement studentId)) return BadRequest();
             if (!request.TryGetProperty("studentId", out JsonElement studentId)) return BadRequest();
+            if (!request.TryGetProperty("tmdId", out JsonElement tId)) return BadRequest();
             if (!request.TryGetProperty("subjectId", out JsonElement subjectId)) return BadRequest();
             if (!request.TryGetProperty("subjectId", out JsonElement subjectId)) return BadRequest();
             if (!request.TryGetProperty("classId", out JsonElement classId)) return BadRequest();
             if (!request.TryGetProperty("classId", out JsonElement classId)) return BadRequest();
             //根据不同评测的类型返回对应的编码
             //根据不同评测的类型返回对应的编码
@@ -181,6 +182,7 @@ namespace TEAMModelOS.Controllers
                     builder.Append(result.examId).Append("/");
                     builder.Append(result.examId).Append("/");
                     builder.Append(result.subjectId).Append("/");
                     builder.Append(result.subjectId).Append("/");
                     builder.Append(studentId).Append("mark").Append("/");
                     builder.Append(studentId).Append("mark").Append("/");
+                    //builder.Append(tId).Append('/');
                     builder.Append("ans.json");
                     builder.Append("ans.json");
                     /*string FileName = result.examId + "/" + result.subjectId + "/" + studentId;
                     /*string FileName = result.examId + "/" + result.subjectId + "/" + studentId;
                     string blob = FileName + "/" + "ans.json";*/
                     string blob = FileName + "/" + "ans.json";*/

+ 2 - 1
TEAMModelOS/Models/Dto/ExamClassResultDto.cs

@@ -15,7 +15,8 @@ namespace TEAMModelOS.Models.Dto
         public ClassInfo classInfo { get; set; } = new ClassInfo();
         public ClassInfo classInfo { get; set; } = new ClassInfo();
         public List<string> studentIds { get; set; } = new List<string>();
         public List<string> studentIds { get; set; } = new List<string>();
         public List<List<string>> studentAnswers { get; set; } = new List<List<string>>();
         public List<List<string>> studentAnswers { get; set; } = new List<List<string>>();
-        public List<List<string>> studentScores { get; set; } = new List<List<string>>();
+        public List<List<double>> studentScores { get; set; } = new List<List<double>>();
+        public List<List<List<string>>> ans { get; set; } = new List<List<List<string>>>();
     }
     }
     public class ClassInfo { 
     public class ClassInfo { 
         public string id { get; set; }
         public string id { get; set; }