فهرست منبع

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

OnePsycho 3 سال پیش
والد
کامیت
ba5b884dbd
22فایلهای تغییر یافته به همراه1099 افزوده شده و 792 حذف شده
  1. 3 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/quesnaire.css
  2. 10 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/vote.css
  3. 57 4
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/QuesNaire.vue
  4. 61 4
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/Vote.vue
  5. 9 2
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventList.vue
  6. 4 7
      TEAMModelOS/ClientApp/src/components/student-web/HomeView/CourseList.vue
  7. 289 287
      TEAMModelOS/ClientApp/src/locale/lang/en-US/learnActivity.js
  8. 3 1
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/learnActivity.js
  9. 93 91
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/learnActivity.js
  10. 293 293
      TEAMModelOS/ClientApp/src/view/classrecord/HtexRender.vue
  11. 11 8
      TEAMModelOS/ClientApp/src/view/learnactivity/PaperScore.vue
  12. 26 2
      TEAMModelOS/ClientApp/src/view/learnactivity/Scoring.vue
  13. 4 6
      TEAMModelOS/ClientApp/src/view/newcourse/NewCusMgt.vue
  14. 1 1
      TEAMModelOS/ClientApp/src/view/task/arb/ArbView.vue
  15. 1 1
      TEAMModelOS/ClientApp/src/view/task/err/ErrPaper.vue
  16. 12 0
      TEAMModelOS/ClientApp/src/view/task/index.less
  17. 57 20
      TEAMModelOS/ClientApp/src/view/task/index.vue
  18. 1 1
      TEAMModelOS/ClientApp/src/view/task/mark/ByQu.vue
  19. 13 3
      TEAMModelOS/ClientApp/src/view/task/mark/ByStu.vue
  20. 31 27
      TEAMModelOS/ClientApp/src/view/task/mark/MarkCanvas.vue
  21. 14 0
      TEAMModelOS/ClientApp/src/view/task/mark/StuProg.vue
  22. 106 34
      TEAMModelOS/Controllers/Common/ExamController.cs

+ 3 - 0
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/quesnaire.css

@@ -16,6 +16,9 @@
 	margin: 0 10px;
 }
 
+.quesnaire .survey-item img {
+  width: 200px;
+}
 .quesnaire .survey-item .ivu-input{
 	margin: 10px 0;
 	border-color: #9c9c9c;

+ 10 - 0
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/vote.css

@@ -150,4 +150,14 @@
 .vote .ivu-radio,
 .vote .ivu-checkbox{
   display: none;
+}
+
+.vote .ivu-radio-border,
+.vote .ivu-checkbox-border{
+  height: auto;
+}
+
+.vote label.option-wrapper img,
+.vote .option-repeat img{
+  width: 200px !important;
 }

+ 57 - 4
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/QuesNaire.vue

@@ -70,7 +70,7 @@
 					<!-- <br /> -->
 					<div style="display: flex; font-weight: bold;">
 						<span>{{ index + 1 }}. </span>
-						<span v-html="item.question"></span>({{ typeList[item.type] }})<span></span>
+						<span v-html="item.question" @click="showImg($event)"></span>({{ typeList[item.type] }})<span></span>
 					</div>
 					<!-- 非问答 -->
 					<div v-if="item.type !== 'subjective'">
@@ -78,7 +78,7 @@
 							<div class="unitTestbg" @click="onOptionClick(item, index, option.code)"
 								:style="{ backgroundColor: submitArr[index].includes(option.code) ? '#24b880' : 'transparent'}"
 							>
-								{{ option.code }}. <span v-html="option.value" style="margin-left: 10px;"></span>
+								{{ option.code }}. <span v-html="option.value" style="margin-left: 10px;" @click="showImg($event)"></span>
 							</div>
 						</div>
 					</div>
@@ -96,6 +96,15 @@
 				</button>
 			</div>
 		</div>
+		<!--图片放大显示-->
+        <div class="imgDolg"
+             v-show="imgPreview.show"
+             @click.stop="imgPreview.show = false">
+            <i class="el-icon-close"
+               id="imgDolgClose"
+               @click.stop="imgPreview.show = false"></i>
+            <img @click.stop="imgPreview.show = true" :src="imgPreview.img" />
+        </div>
 
 		<!-- {{ createdSaveCheckers() }} -->
 	</div>
@@ -135,8 +144,11 @@
 					'subjective': vm.$t('survey.questionaire.subjective')
 				},
 				submitArr: [], //填写的数据
-
 				checkers: [],
+				imgPreview: {
+                    img: "",
+                    show: false
+                },
 			};
 		},
 		created() {
@@ -181,7 +193,6 @@
 						"userid": this.$store.state.userInfo.sub,
 						"record": this.submitArr
 					}
-					console.log(params, k);
 					//檢查使用者是否有漏題,有漏題進行提示
 					this.$api.studentWeb.answerSurvey(params).then(async res => {
 						switch (res.msgid) {
@@ -264,6 +275,17 @@
 					}
 				}
 			},
+			//放大图片
+            showImg(e) {
+                this.imgPreview = {
+                    img: "",
+                    show: false
+                }
+                if (e.target.tagName == 'IMG') {
+                    this.imgPreview.img = e.target.src
+                    this.imgPreview.show = true
+                }
+            },
 			// 删除不存在的问卷
             delActivity() {
                 let roles = ""
@@ -419,3 +441,34 @@
 <style scoped>
 	@import "~@/assets/student-web/component_styles/quesnaire.css";
 </style>
+<style lang="less" scoped>
+.quesnaire {
+	.imgDolg {
+        width: 100vw;
+        height: 100vh;
+        position: fixed;
+        z-index: 9999;
+        background-color: rgba(140, 134, 134, 0.6);
+        top: 0;
+        left: 0;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+    }
+
+    .imgDolg img {
+        width: 60%;
+        border: 1px solid #eee;
+        // height: 95%;
+    }
+
+    .imgDolg #imgDolgClose {
+        position: fixed;
+        top: 35px;
+        cursor: pointer;
+        right: 17%;
+        font-size: 50px;
+        color: white;
+    }
+}
+</style>

+ 61 - 4
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/Vote.vue

@@ -61,7 +61,7 @@
                                 class="option-wrapper"
                                 :disabled="!isVote"
                             >
-                                <span v-html="item.value"></span>
+                                <span v-html="item.value" @click="showImg($event)"></span>
                             </Radio>
                         </RadioGroup>
                         <!-- 多票 -->
@@ -73,7 +73,7 @@
                                 class="option-wrapper"
                                 :disabled="!isVote"
                             >
-                                <span v-html="item.value"></span>
+                                <span v-html="item.value" @click="showImg($event)"></span>
                             </Checkbox>
                         </CheckboxGroup>
                         <!-- 重复 -->
@@ -89,7 +89,7 @@
                                             :formatter="value => `${value}` +$t('studentWeb.vote.tickets')"
                                             :disabled="!isVote"
                                 ></InputNumber>
-                                <span v-html="item.value"></span>
+                                <span v-html="item.value" @click="showImg($event)"></span>
                             </div>
                         </div>
                         <!-- <div class="checkAnswer" v-for="(item, index) in voteInfo.options" :key="index">  
@@ -146,6 +146,15 @@
                 </div>
             </div>
         </div>
+        <!--图片放大显示-->
+        <div class="imgDolg"
+             v-show="imgPreview.show"
+             @click.stop="imgPreview.show = false">
+            <i class="el-icon-close"
+               id="imgDolgClose"
+               @click.stop="imgPreview.show = false"></i>
+            <img @click.stop="imgPreview.show = true" :src="imgPreview.img" />
+        </div>
     </div>
 </template>
 
@@ -190,7 +199,11 @@
                 isResult: false,
                 isOverCount: false,
                 voteData: [],
-                voteList: []
+                voteList: [],
+                imgPreview: {
+                    img: "",
+                    show: false
+                },
             };
         },
         methods: {
@@ -251,6 +264,8 @@
                                 }
                                 this.votesNum = res.vote.voteNum
                                 this.voteInfo = res.vote
+                                this.radioCheck = ""
+                                this.voteChecked = []
                                 if (res.vote.progress == "finish") {
                                     this.getVoteRecord()
                                     this.getVoteRes()
@@ -272,6 +287,17 @@
                 //     this.setData(data[0])
                 // }
             },
+            //放大图片
+            showImg(e) {
+                this.imgPreview = {
+                    img: "",
+                    show: false
+                }
+                if (e.target.tagName == 'IMG') {
+                    this.imgPreview.img = e.target.src
+                    this.imgPreview.show = true
+                }
+            },
             // 删除不存在的投票
             delActivity() {
                 let roles = ""
@@ -601,3 +627,34 @@
 <style scoped>
     @import "~@/assets/student-web/component_styles/vote.css";
 </style>
+<style lang="less" scoped>
+.vote {
+    .imgDolg {
+        width: 100vw;
+        height: 100vh;
+        position: fixed;
+        z-index: 9999;
+        background-color: rgba(140, 134, 134, 0.6);
+        top: 0;
+        left: 0;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+    }
+
+    .imgDolg img {
+        width: 60%;
+        border: 1px solid #eee;
+        // height: 95%;
+    }
+
+    .imgDolg #imgDolgClose {
+        position: fixed;
+        top: 35px;
+        cursor: pointer;
+        right: 17%;
+        font-size: 50px;
+        color: white;
+    }
+}
+</style>

+ 9 - 2
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventList.vue

@@ -221,8 +221,15 @@ import { mapGetters, mapState } from 'vuex';
         },
         components: { PreviewProgressPie },
         watch: {
+            // 根据活动名称来搜索关键字
             search: function (value) {
-                let countfit = 0;
+                this.predealMockdatafirstItem()
+                let list = this.eventShow.filter(item => item.name.indexOf(value) >= 0)
+                if (!list.length) {
+                    this.isListNoItem = true;
+                }
+                this.eventShow = list
+                /* let countfit = 0;
                 for (let i = 0; i < this.eventList.length; i++) {
                     if (
                         this.eventPageType.includes(this.eventList[i].eventType) &&
@@ -246,7 +253,7 @@ import { mapGetters, mapState } from 'vuex';
                 }
                 if (countfit == 0 && value != "") {
                     this.isListNoItem = true;
-                } else this.isListNoItem = false;
+                } else this.isListNoItem = false; */
             },
         },
         computed: {

+ 4 - 7
TEAMModelOS/ClientApp/src/components/student-web/HomeView/CourseList.vue

@@ -363,7 +363,7 @@ export default {
                                                 delete data.schedule
                                                 data.school = item.stuCourse.school
                                                 data.scope = item.stuCourse.scope
-                                                data.unique = 'person' + item.course.no + sch.time[m].week + sch.time[m].id + sI + m
+                                                data.unique = 'person' + item.course.no + sch.time[m].week + sch.time[m].id + sI + m + Math.floor(Math.random() * 10000)
                                                 personList.push(this.getNewClass(data, sch, m))
                                             }
                                         }
@@ -373,7 +373,7 @@ export default {
                                             delete datas.schedule
                                             datas.school = item.stuCourse.school
                                             datas.scope = item.stuCourse.scope
-                                            datas.unique = 'person' + item.course.no + "008" + "000" + sI + "-1"
+                                            datas.unique = 'person' + item.course.no + Math.floor(Math.random() * 100000000)
                                             datas.classId = sch.classId
                                             datas.room = sch.room
                                             datas.teacherId = sch.teacherId
@@ -411,7 +411,7 @@ export default {
                                                     delete data.schedule
                                                     data.school = item.stuCourse.school
                                                     data.scope = item.stuCourse.scope
-                                                    data.unique = 'person' + item.course.no + sch.time[m].week + sch.time[m].id + j + m
+                                                    data.unique = 'person' + item.course.no + sch.time[m].week + sch.time[m].id + j + m + Math.floor(Math.random() * 10000)
                                                     personList.push(this.getNewClass(data, sch, m))
                                                 }
                                             }
@@ -421,7 +421,7 @@ export default {
                                                 delete datas.schedule
                                                 datas.school = item.stuCourse.school
                                                 datas.scope = item.stuCourse.scope
-                                                datas.unique = 'person' + item.course.no + "008" + "000" + Math.round(Math.random()*10) + "-1"
+                                                datas.unique = 'person' + item.course.no + Math.floor(Math.random() * 100000000)
                                                 datas.classId = sch.classId
                                                 datas.room = sch.room
                                                 datas.teacherId = sch.teacherId
@@ -448,9 +448,6 @@ export default {
                             }
                         })
                     }
-                    
-                    console.log(fixList)
-                    console.log(personList)
                     this.fixList = fixList
                     this.personList = personList
                     this.getClassTime()

+ 289 - 287
TEAMModelOS/ClientApp/src/locale/lang/en-US/learnActivity.js

@@ -1,222 +1,224 @@
-export default{
+export default {
     //MgtSchoolEva.vue
-    mgtScEv:{
-        listLabel:'Assessment List',
-        period:'School System:',
-        create:'Create',
-        delete:'Delete',
-        edit:'Edit',
-        createTime:'Test Time:',
-        pending:'Scheduled',
-        going:'In progress',
-        finish:'Has ended',
-        endTime:'Ending time:',
-        stop:'End immediately',
-        evType:'Assessment Type:',
-        evMode:'Assessment Method:',
-        stuCount:'Number of participants:',
-        nodata:'No assessment yet',
-        tab1:'Assessment Data',
-        tab2:'Assessment Files',
-        autoTips1:'This function is only used to show the scenario and quickly simulate student response data. Student responses are randomly generated for reference only!',
-        autoTips2:'This function is only used to show the scenario and quickly simulate teacher grading data. Teacher grading are randomly generated for reference only!',
-        autoScore:'One Click Grading',
-        autoAnswer:'One Click Answering',
-        evSubject:'Assessing Subject:',
-        returnTop:'Back to the top',
-        mockOk:'Simulate successfully',
-        mockErr:'Failed to simulate',
-        stopTitle:'End Assessment',
-        stopContent:'Are you sure to end? Students will not be able to continue answering.',
-        stopOk:'The assessment has ended!',
-        deleteTitle:'Delete Assessment',
-        deleteContent:'Are you sure to delete',
-        deleteOk:'Delete successfully',
-        deleteErr:'Failed to delete',
-        noJoin:'This account has not joined any schools yet!',
-        myEv:'Assessment I started',
-        teaEv:'Assessments started by the instructor',
-        markSetting:'Marking Assistant',
-        markData:'Marking Data',
-        ftStatus:'Status:',
-        ftType:'Type:',
-        ftMode:'Method:',
-        search:'Search'
+    mgtScEv: {
+        listLabel: 'Assessment List',
+        period: 'School System:',
+        create: 'Create',
+        delete: 'Delete',
+        edit: 'Edit',
+        createTime: 'Test Time:',
+        pending: 'Scheduled',
+        going: 'In progress',
+        finish: 'Has ended',
+        endTime: 'Ending time:',
+        stop: 'End immediately',
+        evType: 'Assessment Type:',
+        evMode: 'Assessment Method:',
+        stuCount: 'Number of participants:',
+        nodata: 'No assessment yet',
+        tab1: 'Assessment Data',
+        tab2: 'Assessment Files',
+        autoTips1: 'This function is only used to show the scenario and quickly simulate student response data. Student responses are randomly generated for reference only!',
+        autoTips2: 'This function is only used to show the scenario and quickly simulate teacher grading data. Teacher grading are randomly generated for reference only!',
+        autoScore: 'One Click Grading',
+        autoAnswer: 'One Click Answering',
+        evSubject: 'Assessing Subject:',
+        returnTop: 'Back to the top',
+        mockOk: 'Simulate successfully',
+        mockErr: 'Failed to simulate',
+        stopTitle: 'End Assessment',
+        stopContent: 'Are you sure to end? Students will not be able to continue answering.',
+        stopOk: 'The assessment has ended!',
+        deleteTitle: 'Delete Assessment',
+        deleteContent: 'Are you sure to delete',
+        deleteOk: 'Delete successfully',
+        deleteErr: 'Failed to delete',
+        noJoin: 'This account has not joined any schools yet!',
+        myEv: 'Assessment I started',
+        teaEv: 'Assessments started by the instructor',
+        markSetting: 'Marking Assistant',
+        markData: 'Marking Data',
+        ftStatus: 'Status:',
+        ftType: 'Type:',
+        ftMode: 'Method:',
+        search: 'Search'
     },
 
     //CreateEv
-    createEv:{
-        createLabel:'Create Assessment',
-        publishEv:'Start Assessment',
-        return:'Click to go back',
-        baseInfo:'Basic Information',
-        evName:'Assessment Name',
-        evPeriod:'School System',
-        evMode:'Method',
-        evType:'Type',
-        examType:'Type (for analysis)',
-        courseType:'Course Type',
-        cusLabel1:'School Course',
-        cusLabel2:'Personal Course',
-        evTarget:'Participant',
-        publishType:'Starting Time',
-        startTime:'Start time',
-        sTimeHolder:'Please select a start time',
-        endTime:'End Time',
-        eTimeHolder:'Please select a end time',
-        addSubject:'Add Subject',
-        noSubject:'No subject yet, please add a subject',
-        noSubject1:'* Please select the school system',
-        papersLabel:'Exam Files Bank',
-        perviewLabel:'Exam Files Preview',
-        importLabel:'Import Instruction',
-        answerPreview:'Answering Preview',
-        errTips1:'Cannot be empty!',
-        errTips2:'Please select type!',
-        errTips3:'Please select type!',
-        errTips4:'Please select type!',
-        errTips5:'Please select type!',
-        errTips6:'Please select participant!',
-        errTips7:'Please select starting time!',
-        errTips8:'Please select start time!',
-        errTips9:'Please select end time!',
-        errTips10:'Please select school system!',
-        stPaperTitle:'Select exam file',
-        stPaperContent:'Confirm select ',
-        inDev:'Features are under development, stay tuned!',
-        formWarning:'Please complete the basic information first!',
-        paperWarning:'Please pick or import exam files!',
-        paperWarning1:'No exam files yet, please pick or import them!',
-        pdWarning:'Please add assessment subject!',
-        publishOk:'The assessment was created successfully!',
-        togglePeriod:'Switch academic system',
-        togglePdTip1:'You have added',
-        togglePdTip2:'subject. Switching the school system now will clear the selected subjects. Do you confirm the switch?',
-        toggleOkText:'Switch',
-        delPdTitle:'Delete Subject',
-        delPdContent:'Are you sure to delete?',
-        delOk:'Delete successfully',
-        pdTips:'Please select the school system!',
-        defaultPaper:'(Please pick or import exam files)',
+    createEv: {
+        createLabel: 'Create Assessment',
+        publishEv: 'Start Assessment',
+        return: 'Click to go back',
+        baseInfo: 'Basic Information',
+        evName: 'Assessment Name',
+        evPeriod: 'School System',
+        evMode: 'Method',
+        evType: 'Type',
+        examType: 'Type (for analysis)',
+        courseType: 'Course Type',
+        cusLabel1: 'School Course',
+        cusLabel2: 'Personal Course',
+        evTarget: 'Participant',
+        publishType: 'Starting Time',
+        startTime: 'Start time',
+        sTimeHolder: 'Please select a start time',
+        endTime: 'End Time',
+        eTimeHolder: 'Please select a end time',
+        addSubject: 'Add Subject',
+        noSubject: 'No subject yet, please add a subject',
+        noSubject1: '* Please select the school system',
+        papersLabel: 'Exam Files Bank',
+        perviewLabel: 'Exam Files Preview',
+        importLabel: 'Import Instruction',
+        answerPreview: 'Answering Preview',
+        errTips1: 'Cannot be empty!',
+        errTips2: 'Please select type!',
+        errTips3: 'Please select type!',
+        errTips4: 'Please select type!',
+        errTips5: 'Please select type!',
+        errTips6: 'Please select participant!',
+        errTips7: 'Please select starting time!',
+        errTips8: 'Please select start time!',
+        errTips9: 'Please select end time!',
+        errTips10: 'Please select school system!',
+        stPaperTitle: 'Select exam file',
+        stPaperContent: 'Confirm select ',
+        inDev: 'Features are under development, stay tuned!',
+        formWarning: 'Please complete the basic information first!',
+        paperWarning: 'Please pick or import exam files!',
+        paperWarning1: 'No exam files yet, please pick or import them!',
+        pdWarning: 'Please add assessment subject!',
+        publishOk: 'The assessment was created successfully!',
+        togglePeriod: 'Switch academic system',
+        togglePdTip1: 'You have added',
+        togglePdTip2: 'subject. Switching the school system now will clear the selected subjects. Do you confirm the switch?',
+        toggleOkText: 'Switch',
+        delPdTitle: 'Delete Subject',
+        delPdContent: 'Are you sure to delete?',
+        delOk: 'Delete successfully',
+        pdTips: 'Please select the school system!',
+        defaultPaper: '(Please pick or import exam files)',
     },
     // ManualPaper.vue
-    manual:{
-        source:'Source:',
-        sourceP:'Personal Exam Files Bank',
-        sourceS:'School Exam Files Bank',
-        pdLabel:'School System:',
-        subjectLabel:'Subject:',
-        gradeLabel:'Grade:',
-        fitPd:'Applicable School System',
-        fitSubject:'Applicable Subjects:',
-        quCount:'Question Number:',
-        useCount:'Number of Uses:',
-        stdPaper:'Selected Exam Files',
-        stPaper:'Select Exam Files',
-        previewPaper:'Preview Exam Files',
-        noPaper:'No corresponding exam files yet',
-        noPaper1:'No exam files yet'
+    manual: {
+        source: 'Source:',
+        sourceP: 'Personal Exam Files Bank',
+        sourceS: 'School Exam Files Bank',
+        pdLabel: 'School System:',
+        subjectLabel: 'Subject:',
+        gradeLabel: 'Grade:',
+        fitPd: 'Applicable School System',
+        fitSubject: 'Applicable Subjects:',
+        quCount: 'Question Number:',
+        useCount: 'Number of Uses:',
+        stdPaper: 'Selected Exam Files',
+        stPaper: 'Select Exam Files',
+        previewPaper: 'Preview Exam Files',
+        noPaper: 'No corresponding exam files yet',
+        noPaper1: 'No exam files yet'
     },
     // PaperScore.vue、Scoring.vue
-    score:{
-        stuName:'Student Name:',
-        score:'Total Score:',
-        scoreUnit:'Point',
-        saveScore:'Save Given Points',
-        showAns:'Show Answer',
-        hideAns:'Hide Answer',
-        showQu:'Show Question',
-        hideQu:'Hide Question',
-        quIndex:'Question Number:',
-        quIndex1:'Question Number',
-        fullScore:'Perfect Score',
-        zeroScore:'0 point',
-        zeroScore1:'0 point',
-        stuAns:'【Student Responses】',
-        mark:'Annotate',
-        quAns:'【Answer】',
-        noAnswer:'No answer set',
-        anaLabel:'【Explanation】',
-        noAna:'No explanation yet',
-        kdLabel:'【Key Concept】',
-        noKd:'No Key Concept bound yet',
-        sQuLabel1:'【Question',
-        sQuLabel2:'】',
-        quIndexLabel:'【Question Number',
-        nextStu:'Next Student>>>',
-        markOk:'Annotate successfully!',
-        markErr:'Failed to annotate!',
-        isFullTips:'Already full score for the question',
-        isZeroTips:'It is already zero points',
-        saveScoreOk:'Results saved successfully!',
-        saveSocreErr:'Failed to save results!',
-        zero:'Zero',
-        one:'One',
-        two:'Two',
-        three:'Three',
-        four:'Four',
-        five:'Five',
-        six:'Six',
-        seven:'Seven',
-        eight:'Eight',
-        nine:'Nine',
-        ten:'Ten',
-        hundred:'Hundred',
-        thousand:'Thousand',
-        tenThd:'Ten thousand',
-        hMillion:'One hundred million',
-        noStuAns:'Not answered',
-        noStuAns1:'Not answered yet',
-        trueAns:'Correct',
-        falseAns:'Incorrect',
+    score: {
+        stuName: 'Student Name:',
+        score: 'Total Score:',
+        scoreUnit: 'Point',
+        saveScore: 'Save Given Points',
+        showAns: 'Show Answer',
+        hideAns: 'Hide Answer',
+        showQu: 'Show Question',
+        hideQu: 'Hide Question',
+        quIndex: 'Question Number:',
+        quIndex1: 'Question Number',
+        fullScore: 'Perfect Score',
+        zeroScore: '0 point',
+        zeroScore1: '0 point',
+        stuAns: '【Student Responses】',
+        mark: 'Annotate',
+        quAns: '【Answer】',
+        noAnswer: 'No answer set',
+        anaLabel: '【Explanation】',
+        noAna: 'No explanation yet',
+        kdLabel: '【Key Concept】',
+        noKd: 'No Key Concept bound yet',
+        sQuLabel1: '【Question',
+        sQuLabel2: '】',
+        quIndexLabel: '【Question Number',
+        nextStu: 'Next Student>>>',
+        markOk: 'Annotate successfully!',
+        markErr: 'Failed to annotate!',
+        isFullTips: 'Already full score for the question',
+        isZeroTips: 'It is already zero points',
+        saveScoreOk: 'Results saved successfully!',
+        saveSocreErr: 'Failed to save results!',
+        zero: 'Zero',
+        one: 'One',
+        two: 'Two',
+        three: 'Three',
+        four: 'Four',
+        five: 'Five',
+        six: 'Six',
+        seven: 'Seven',
+        eight: 'Eight',
+        nine: 'Nine',
+        ten: 'Ten',
+        hundred: 'Hundred',
+        thousand: 'Thousand',
+        tenThd: 'Ten thousand',
+        hMillion: 'One hundred million',
+        noStuAns: 'Not answered',
+        noStuAns1: 'Not answered yet',
+        trueAns: 'Correct',
+        falseAns: 'Incorrect',
         //Scoring.vue
-        subjectLabel:'Subject:',
-        gradeLabel:'Grade:',
-        classLabel:'Class:',
-        stuLabel:'Student:',
-        scoreView:'Score Overview',
-        scoring:'Exam File Grading',
-        classNoStu:'No students in the class yet',
-        status1:'Not answered yet',
-        status2:'Go to grading',
-        status3:'View Score',
-        column1:'Name',
-        column2:'Total Score',
-        column3:'Status',
-        finishScore:'Grading of all student responses was completed!',
-        unableScore:'Students have not answered, cannot be graded',
+        subjectLabel: 'Subject:',
+        gradeLabel: 'Grade:',
+        classLabel: 'Class:',
+        stuLabel: 'Student:',
+        scoreView: 'Score Overview',
+        scoring: 'Exam File Grading',
+        classNoStu: 'No students in the class yet',
+        status1: 'Not answered yet',
+        status2: 'Go to grading',
+        status3: 'View Score',
+        column1: 'Name',
+        column2: 'Total Score',
+        column3: 'Status',
+        finishScore: 'Grading of all student responses was completed!',
+        unableScore: 'Students have not answered, cannot be graded',
         stStuWarning: 'Please select a student first!',
         lastQu: 'Previous Question',
         nextQu: 'Next Question',
+        requesting: '數據請求中,請稍後……',
+        dataError: '數據請求异常,請刷新頁面再試'
     },
 
     //SimpleAnalysis.vue
-    simple:{
-        totalPeople:'Total number of people',
-        missExam:'Number of absentee',
-        classLabel:'Class',
-        sjLabel:'Subject',
-        avgScore:'Average Statistics',
-        classStuCount:'Number of student in class',
-        answered:'Answered',
-        unanswer:'Not answered',
-        scored:'Graded',
-        unscore:'Not Graded',
-        noPublish:'Assessment not yet started, no statistics yet',
-        calcing:'Result data are being processed now.,',
-        clickFresh:'Click here to refresh',
-        inCalc:'The data is being processed, please check later',
-        total:'Total Score',
-        avgScore:'Average Statistics',
-        totalLabel:'Total Quantity',
-        scoreMat:'Score Segment Statistics'
+    simple: {
+        totalPeople: 'Total number of people',
+        missExam: 'Number of absentee',
+        classLabel: 'Class',
+        sjLabel: 'Subject',
+        avgScore: 'Average Statistics',
+        classStuCount: 'Number of student in class',
+        answered: 'Answered',
+        unanswer: 'Not answered',
+        scored: 'Graded',
+        unscore: 'Not Graded',
+        noPublish: 'Assessment not yet started, no statistics yet',
+        calcing: 'Result data are being processed now.,',
+        clickFresh: 'Click here to refresh',
+        inCalc: 'The data is being processed, please check later',
+        total: 'Total Score',
+        avgScore: 'Average Statistics',
+        totalLabel: 'Total Quantity',
+        scoreMat: 'Score Segment Statistics'
     },
 
     mark: {
         markTimes: 'Marking Times',
-        markNum1:'Single Rating System',
-        markNum2:'Dual Rating System',
-        markNum3:'Tri-Rating System',
+        markNum1: 'Single Rating System',
+        markNum2: 'Dual Rating System',
+        markNum3: 'Tri-Rating System',
         markRole: '閱卷職務',
         errRole: 'Abnormality Handling',
         arb: 'Arbitration Teacher',
@@ -255,98 +257,98 @@ export default{
         arbDeclare: 'Arbitration Report',
         markProg: 'Marking Progress',
         name: 'Name',
-        markTea:'Marking Teacher',
+        markTea: 'Marking Teacher',
         progress: 'Progress',
         action: 'Operate',
         addTeaTitle: 'Add Marking Teacher',
         markNum: 'Marking Quantity',
-        noPublish:'No marking task yet',
-        publish:'Start Task',
-        startTime:'Start Time',
-        endTime:'End Time',
-        allocation:'Distribution Method',
-        allocationByStu:'By People',
-        allocationByQu:'By Question',
-        openArb:'Enable Arbitration',
-        yes:'Yes',
-        no:'No',
-        allQu:'All Question',
-        noSet:'Not set yet',
-        quNoSet:'題號設置',
-        startErr:'Please set the start time',
-        endErr:'Please set the end time',
-        typeErr:'Please set the distribution method',
-        numErr:'請設置閱卷次數',
-        markerErr:'請設置閱卷老師',
-        markQuNo:'Marking Question No.',
-        rmvTitle:'Remove Teacher',
-        rmvContent:'Are you sure to remove ',
-        baseErr:'請完成閱卷基礎設置',
-        teacherErr:'閱捲和相關老師設置',
-        saveOk:'Save successfully!',
-        saveErr:'Failed to save!',
-        byStuTips:'批閱整份試卷',
-        byQuTips:'批閱指定題目',
-        quBlock:'題目劃塊',
-        addBlock:'添加分塊',
-        quLabel:'題目',
-        objcTips:'溫馨提示:客觀題已由系統自動評分,無需指定教師批閱。',
-        teaLabel:'教師',
-        isArbTips:'請設置是否需要仲裁',
-        arbTeaTips:'請設置仲裁老師',
-        errTeaTips:'Please set the abnormality handling teacher',
-        orderIndex:'序號',
-        quNo:'題號',
-        teaCount:'教師人數',
-        markCount:'閱卷量',
-        delBlockTitle:'刪除題塊',
-        delBlockCont:'確認刪除當前題塊設置嗎?',
-        selectQuTips:'請選擇題目進行劃塊',
-        selectTeaTips:'請設置當前題塊的閱卷老師',
-        lastQu:'題目尚未完全分配',
-        reapQu:'題目劃塊設置存在重復題目',
+        noPublish: 'No marking task yet',
+        publish: 'Start Task',
+        startTime: 'Start Time',
+        endTime: 'End Time',
+        allocation: 'Distribution Method',
+        allocationByStu: 'By People',
+        allocationByQu: 'By Question',
+        openArb: 'Enable Arbitration',
+        yes: 'Yes',
+        no: 'No',
+        allQu: 'All Question',
+        noSet: 'Not set yet',
+        quNoSet: '題號設置',
+        startErr: 'Please set the start time',
+        endErr: 'Please set the end time',
+        typeErr: 'Please set the distribution method',
+        numErr: '請設置閱卷次數',
+        markerErr: '請設置閱卷老師',
+        markQuNo: 'Marking Question No.',
+        rmvTitle: 'Remove Teacher',
+        rmvContent: 'Are you sure to remove ',
+        baseErr: '請完成閱卷基礎設置',
+        teacherErr: '閱捲和相關老師設置',
+        saveOk: 'Save successfully!',
+        saveErr: 'Failed to save!',
+        byStuTips: '批閱整份試卷',
+        byQuTips: '批閱指定題目',
+        quBlock: '題目劃塊',
+        addBlock: '添加分塊',
+        quLabel: '題目',
+        objcTips: '溫馨提示:客觀題已由系統自動評分,無需指定教師批閱。',
+        teaLabel: '教師',
+        isArbTips: '請設置是否需要仲裁',
+        arbTeaTips: '請設置仲裁老師',
+        errTeaTips: 'Please set the abnormality handling teacher',
+        orderIndex: '序號',
+        quNo: '題號',
+        teaCount: '教師人數',
+        markCount: '閱卷量',
+        delBlockTitle: '刪除題塊',
+        delBlockCont: '確認刪除當前題塊設置嗎?',
+        selectQuTips: '請選擇題目進行劃塊',
+        selectTeaTips: '請設置當前題塊的閱卷老師',
+        lastQu: '題目尚未完全分配',
+        reapQu: '題目劃塊設置存在重復題目',
         //ByqU.vue & ByStu.vue
-        quit:'退出閱卷',
-        examName:'考試名稱:',
-        reviewType:'閱卷方式:',
-        byQu:'按題閱卷',
-        byStu:'按人閱卷',
-        stuId:'學生Id',
-        score:'分數:',
-        curQu:'當前題號:',
-        quProg:'題目進度',
-        exception:'異常申報',
-        move:'移動',
-        text:'文字',
-        brush:'畫筆',
-        arrow:'箭頭',
-        oval:'橢圓',
-        rect:'方框',
-        seal:'印章',
-        clear:'清除批註',
-        marked:'已閱',
-        unmark:'未閱',
-        fullScore:'滿分',
-        zeroScore:'零分',
-        submit:'提交分數/批註',
-        setting1:'打分自動切換學生',
-        setting2:'完成批閱自動彈出切換',
-        setting3:'打分自動切換題目',
-        setting4:'完成閱卷自動獲取新學生',
-        toggleQu:'切換題目',
-        toggleStu:'切換學生',
-        saveErr:'保存失敗',
-        noSocreErr:'請先打分',
-        completeQu:'當前題目已閱完,請切換題目',
-        completeStu:'當前完成當前學生評分,如果繼續評分,請切換學生',
-        noAnswer:'未作答',
-        stuInfoErr:'學生信息異常',
-        ummarkQu:'未閱題目',
-        unmarkContent:'題目尚未評分,是否跳轉到對應題目繼續評分? ',
-        finished:'已閱完',
-        noUnMarkStu:'已無未閱學生,請挑選進行中的學生繼續閱卷。 ',
-        completeTask:'您已完成閱卷任務',
+        quit: '退出閱卷',
+        examName: '考試名稱:',
+        reviewType: '閱卷方式:',
+        byQu: '按題閱卷',
+        byStu: '按人閱卷',
+        stuId: '學生Id',
+        score: '分數:',
+        curQu: '當前題號:',
+        quProg: '題目進度',
+        exception: '異常申報',
+        move: '移動',
+        text: '文字',
+        brush: '畫筆',
+        arrow: '箭頭',
+        oval: '橢圓',
+        rect: '方框',
+        seal: '印章',
+        clear: '清除批註',
+        marked: '已閱',
+        unmark: '未閱',
+        fullScore: '滿分',
+        zeroScore: '零分',
+        submit: '提交分數/批註',
+        setting1: '打分自動切換學生',
+        setting2: '完成批閱自動彈出切換',
+        setting3: '打分自動切換題目',
+        setting4: '完成閱卷自動獲取新學生',
+        toggleQu: '切換題目',
+        toggleStu: '切換學生',
+        saveErr: '保存失敗',
+        noSocreErr: '請先打分',
+        completeQu: '當前題目已閱完,請切換題目',
+        completeStu: '當前完成當前學生評分,如果繼續評分,請切換學生',
+        noAnswer: '未作答',
+        stuInfoErr: '學生信息異常',
+        ummarkQu: '未閱題目',
+        unmarkContent: '題目尚未評分,是否跳轉到對應題目繼續評分? ',
+        finished: '已閱完',
+        noUnMarkStu: '已無未閱學生,請挑選進行中的學生繼續閱卷。 ',
+        completeTask: '您已完成閱卷任務',
         // ProgPie.vue
-        marking:'進行中'
+        marking: '進行中'
     }
 }

+ 3 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/learnActivity.js

@@ -188,7 +188,9 @@ export default{
         stStuWarning: '请先选择学生!',
         lastQu: '上一题',
         nextQu: '下一题',
-        view:'查看'
+        view:'查看',
+        requesting:'数据请求中,请稍后......',
+        dataError:'数据请求异常,请刷新页面再试'
     },
 
     //SimpleAnalysis.vue

+ 93 - 91
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/learnActivity.js

@@ -13,7 +13,7 @@ export default {
         endTime: '結束時間:',
         stop: '立即結束',
         evType: '評測類型:',
-        evMode:'評測模式:',
+        evMode: '評測模式:',
         stuCount: '施測人數:',
         nodata: '暫無評量',
         tab1: '評量數據',
@@ -188,6 +188,8 @@ export default {
         stStuWarning: '請先選擇學生!',
         lastQu: '上一題',
         nextQu: '下一題',
+        requesting: '數據請求中,請稍後……',
+        dataError: '數據請求异常,請刷新頁面再試'
     },
 
     //SimpleAnalysis.vue
@@ -214,9 +216,9 @@ export default {
 
     mark: {
         markTimes: '閱卷次數',
-        markNum1:'單評制',
-        markNum2:'雙評制',
-        markNum3:'三評制',
+        markNum1: '單評制',
+        markNum2: '雙評制',
+        markNum3: '三評制',
         markRole: '閱卷職務',
         errRole: '異常處理:',
         arb: '仲裁教師:',
@@ -255,98 +257,98 @@ export default {
         arbDeclare: '仲裁提報',
         markProg: '閱卷進度',
         name: '姓名',
-        markTea:'閱卷老師',
+        markTea: '閱卷老師',
         progress: '進度',
         action: '操作',
         addTeaTitle: '增加閱卷老師',
         markNum: '閱卷量',
-        noPublish:'暫未發布閱卷任務',
-        publish:'發布任務',
-        startTime:'開始時間',
-        endTime:'結束時間',
-        allocation:'分配方式',
-        allocationByStu:'按人分配',
-        allocationByQu:'按題分配',
-        openArb:'啟用仲裁',
-        yes:'是',
-        no:'否',
-        allQu:'所有題目',
-        noSet:'暫未設置',
-        quNoSet:'題號設置',
-        startErr:'請設置閱卷開始時間',
-        endErr:'請設置閱卷結束時間',
-        typeErr:'請設置分配方式',
-        numErr:'請設置閱卷次數',
-        markerErr:'請設置閱卷老師',
-        markQuNo:'批閱題號',
-        rmvTitle:'移除老師',
-        rmvContent:'是否確認移除',
-        baseErr:'請完成閱卷基礎設置',
-        teacherErr:'閱捲和相關老師設置',
-        saveOk:'保存成功! ',
-        saveErr:'保存失敗! ',
-        byStuTips:'批閱整份試卷',
-        byQuTips:'批閱指定題目',
-        quBlock:'題目劃塊',
-        addBlock:'新增分塊',
-        quLabel:'題目',
-        objcTips:'溫馨提示:客觀題已由系統自動評分,無需指定教師批閱。',
-        teaLabel:'教師',
-        isArbTips:'請設置是否需要仲裁',
-        arbTeaTips:'請設置仲裁老師',
-        errTeaTips:'請設置異常處理老師',
-        orderIndex:'序號',
-        quNo:'題號',
-        teaCount:'教師人數',
-        markCount:'閱卷量',
-        delBlockTitle:'刪除題塊',
-        delBlockCont:'確認刪除當前題塊設置嗎?',
-        selectQuTips:'請選擇題目進行劃塊',
-        selectTeaTips:'請設置當前題塊的閱卷老師',
-        lastQu:'題目尚未完全分配',
-        reapQu:'題目劃塊設置存在重復題目',
+        noPublish: '暫未發布閱卷任務',
+        publish: '發布任務',
+        startTime: '開始時間',
+        endTime: '結束時間',
+        allocation: '分配方式',
+        allocationByStu: '按人分配',
+        allocationByQu: '按題分配',
+        openArb: '啟用仲裁',
+        yes: '是',
+        no: '否',
+        allQu: '所有題目',
+        noSet: '暫未設置',
+        quNoSet: '題號設置',
+        startErr: '請設置閱卷開始時間',
+        endErr: '請設置閱卷結束時間',
+        typeErr: '請設置分配方式',
+        numErr: '請設置閱卷次數',
+        markerErr: '請設置閱卷老師',
+        markQuNo: '批閱題號',
+        rmvTitle: '移除老師',
+        rmvContent: '是否確認移除',
+        baseErr: '請完成閱卷基礎設置',
+        teacherErr: '閱捲和相關老師設置',
+        saveOk: '保存成功! ',
+        saveErr: '保存失敗! ',
+        byStuTips: '批閱整份試卷',
+        byQuTips: '批閱指定題目',
+        quBlock: '題目劃塊',
+        addBlock: '新增分塊',
+        quLabel: '題目',
+        objcTips: '溫馨提示:客觀題已由系統自動評分,無需指定教師批閱。',
+        teaLabel: '教師',
+        isArbTips: '請設置是否需要仲裁',
+        arbTeaTips: '請設置仲裁老師',
+        errTeaTips: '請設置異常處理老師',
+        orderIndex: '序號',
+        quNo: '題號',
+        teaCount: '教師人數',
+        markCount: '閱卷量',
+        delBlockTitle: '刪除題塊',
+        delBlockCont: '確認刪除當前題塊設置嗎?',
+        selectQuTips: '請選擇題目進行劃塊',
+        selectTeaTips: '請設置當前題塊的閱卷老師',
+        lastQu: '題目尚未完全分配',
+        reapQu: '題目劃塊設置存在重復題目',
         //ByqU.vue & ByStu.vue
-        quit:'退出閱卷',
-        examName:'考試名稱:',
-        reviewType:'閱卷方式:',
-        byQu:'按題閱卷',
-        byStu:'按人閱卷',
-        stuId:'學生Id',
-        score:'分數:',
-        curQu:'當前題號:',
-        quProg:'題目進度',
-        exception:'異常申報',
-        move:'移動',
-        text:'文字',
-        brush:'畫筆',
-        arrow:'箭頭',
-        oval:'橢圓',
-        rect:'方框',
-        seal:'印章',
-        clear:'清除批註',
-        marked:'已閱',
-        unmark:'未閱',
-        fullScore:'滿分',
-        zeroScore:'零分',
-        submit:'提交分數/批註',
-        setting1:'打分自動切換學生',
-        setting2:'完成批閱自動彈出切換',
-        setting3:'打分自動切換題目',
-        setting4:'完成閱卷自動獲取新學生',
-        toggleQu:'切換題目',
-        toggleStu:'切換學生',
-        saveErr:'保存失敗',
-        noSocreErr:'請先打分',
-        completeQu:'當前題目已閱完,請切換題目',
-        completeStu:'當前完成當前學生評分,如果繼續評分,請切換學生',
-        noAnswer:'未作答',
-        stuInfoErr:'學生信息異常',
-        ummarkQu:'未閱題目',
-        unmarkContent:'題目尚未評分,是否跳轉到對應題目繼續評分? ',
-        finished:'已閱完',
-        noUnMarkStu:'已無未閱學生,請挑選進行中的學生繼續閱卷。 ',
-        completeTask:'您已完成閱卷任務',
+        quit: '退出閱卷',
+        examName: '考試名稱:',
+        reviewType: '閱卷方式:',
+        byQu: '按題閱卷',
+        byStu: '按人閱卷',
+        stuId: '學生Id',
+        score: '分數:',
+        curQu: '當前題號:',
+        quProg: '題目進度',
+        exception: '異常申報',
+        move: '移動',
+        text: '文字',
+        brush: '畫筆',
+        arrow: '箭頭',
+        oval: '橢圓',
+        rect: '方框',
+        seal: '印章',
+        clear: '清除批註',
+        marked: '已閱',
+        unmark: '未閱',
+        fullScore: '滿分',
+        zeroScore: '零分',
+        submit: '提交分數/批註',
+        setting1: '打分自動切換學生',
+        setting2: '完成批閱自動彈出切換',
+        setting3: '打分自動切換題目',
+        setting4: '完成閱卷自動獲取新學生',
+        toggleQu: '切換題目',
+        toggleStu: '切換學生',
+        saveErr: '保存失敗',
+        noSocreErr: '請先打分',
+        completeQu: '當前題目已閱完,請切換題目',
+        completeStu: '當前完成當前學生評分,如果繼續評分,請切換學生',
+        noAnswer: '未作答',
+        stuInfoErr: '學生信息異常',
+        ummarkQu: '未閱題目',
+        unmarkContent: '題目尚未評分,是否跳轉到對應題目繼續評分? ',
+        finished: '已閱完',
+        noUnMarkStu: '已無未閱學生,請挑選進行中的學生繼續閱卷。 ',
+        completeTask: '您已完成閱卷任務',
         // ProgPie.vue
-        marking:'進行中'
+        marking: '進行中'
     }
 }

+ 293 - 293
TEAMModelOS/ClientApp/src/view/classrecord/HtexRender.vue

@@ -1,8 +1,8 @@
 <template>
-    <div class="home">
-        <Loading v-if ="isLoading"></Loading>
-            <div id="container"></div>
-</div>
+    <div class="htex-render-home">
+        <Loading v-if="isLoading"></Loading>
+        <div id="container"></div>
+    </div>
 </template>
 <script>
 //普通渲染组
@@ -22,308 +22,308 @@
 //import res from './data/HtexJson/Math.json'
 import { drawRect, drawArc, drawEllipse, drawImage, drawPath, drawLine, drawTable, drawEchart, drawMath } from "../../utils/PublicRenderer.js"
 export default {
-  name: 'HtexRender',
-        props: {
-            renderJson: {
-                type: Object,
-                default:null,
-            }
-        },
-  data(){
-    return{
-      stage:'',
-        layersinfo: '',
-        renderData: {
-            "page": 0,
-            "jsonUrl": {},
-            "blobinfo": {
-                "url": '',
-                "sas":''
-            },
-            isLoading:false,
+    name: 'HtexRender',
+    props: {
+        renderJson: {
+            type: Object,
+            default: null,
         }
-    }
-  },
-  methods:{
-      initCanvas(jsonUrl, page, spacename, initStatus,urlHost,sasInfo) {
-      var res = jsonUrl
-          console.log(res, '值!!!!!!!!!!!!!!')
-      var scalingXinfo = 810 / 1280
-      var scalingYinfo = 450 / 720
-      var pagenow = ''
-          page === 0 ? pagenow = page : pagenow = page - 1
-          var callUrl=''
-        //var scaling = (window.innerHeight / res.height).toFixed(2) && res.height !== '' ? (window.innerHeight / res.height).toFixed(2) : 0;
-        //  var stageX = (window.innerWidth - res.width * scaling) / 2 && res.width !== '' ? (window.innerWidth - res.width * scaling) / 2 : 0;
-          if (jsonUrl.fill.type != -1) {
-              callUrl = urlHost + res.fill.blipFill.url + sasInfo;
-          }
-        var stage = new Konva.Stage({
-          container: 'container',
-          width: res.width,
-          height:res.height,
-          x: scalingXinfo,
-          //scaleX: scalingXinfo,
-          //scaleY: scalingYinfo,
-          y: 0,
-        });
-        var layer = new Konva.Layer();
-        this.layersinfo = layer
-        this.stage = stage
-        layer.listening(false)
-        var trx = new Konva.Transformer();
-        trx.nodes([])
-        var that = this;
-        let promiseArr = []
-        if (res.fill) {
-          var imageObj = new Image();
-          var backgroundGroup = {
-            width: res.width,
-            height: res.height,
-            draggable: false,
-            rotation: 0,
-          };
-          var backgroup = new Konva.Group(backgroundGroup);
-          if (res.fill.type === 3) {
-              var imgSrcinfo = callUrl
-            console.log(imgSrcinfo,'背景图片3333')
-            imageObj.onload = function () {
-              //处理超过尺寸背景图
-              var offsetxValue =0
-              var offsetyValue =0
-              if (res.fill.blipFill && res.fill.blipFill.fillRect) {
-                //if (res.fill.blipFill.fillRect.b !== 0 || res.fill.blipFill.fillRect.t !== 0) {
-                //  offsetyValue = (res.height * scaling * (Math.abs(res.fill.blipFill.fillRect.b) / 100)).toFixed(2)
-                //}
-                //if (res.fill.blipFill.fillRect.l !== 0 || res.fill.blipFill.fillRect.r !== 0) {
-                //  offsetxValue = (res.width * scaling * (Math.abs(res.fill.blipFill.fillRect.l) / 100)).toFixed(2)
-                //}
-              }
-               //let screenshotW = res.width * scaling + offsetxValue
-               //let screenshotH = res.height * scaling + offsetyValue
-              //if (imageObj.width > screenshotW || imageObj.height > screenshotH) {
-              //   var img = new Image()
-              //  img.setAttribute('crossOrigin', 'anonymous');
-              //  img.src = imgSrcinfo
-              //  img.onload = () => {
-              //    let renderWidth = img.width > screenshotW ? screenshotW : img.width
-              //    let renderHeight = img.height > screenshotH ? screenshotH : img.height
-              //    var canvas = document.createElement("canvas")
-              //    canvas.width = renderWidth
-              //    canvas.height = renderHeight
-              //    var context = canvas.getContext("2d")
-              //    context.drawImage(img, 0, 0, renderWidth, renderHeight)
-              //    var newImage = canvas.toDataURL()
-              //    that.newBackgroundima = newImage
-              //    var img2 = new Image()
-              //    img2.setAttribute('crossOrigin', 'anonymous');
-              //    img2.src = newImage
-              //    img2.onload = () => {
-              //      var bgImage = new Konva.Image({
-              //        fillPatternImage: img2,
-              //        width: img2.width,
-              //        height: img2.height,
-              //        offsetX: offsetxValue,
-              //        offsetY: offsetyValue,
-              //      });
-              //      backgroup.add(bgImage);
-              //      layer.add(backgroup);
-              //      backgroup.zIndex(0);
-              //      layer.batchDraw();
-              //    }
-              //   that.doRender(stage, layer, trx, res.item);
-              //    //处理超过尺寸背景图END
-              //  }
-              //} else if (initStatus !== 'additional'){
-                imageObj.setAttribute('crossOrigin', 'anonymous');
-                var bgImage = new Konva.Image({
-                  fillPatternImage: imageObj,
-                  height: res.height,
-                  width: res.width,
-                });
-                backgroup.add(bgImage);
-                layer.add(backgroup);
-                backgroup.zIndex(0);
-                layer.batchDraw();
-                that.doRender(stage, layer, trx, res.item, urlHost, sasInfo);
-              //}
-            }
-            imageObj.crossOrigin = 'Anonymous';
-            imageObj.src = imgSrcinfo
-          } else if (res.fill.type === 4) {
-            imageObj.onload = function () {
-              var bgImage = new Konva.Image({
-                fillPatternImage: imageObj,
-                height: res.height,
-                width: res.width,
-              });
-              backgroup.add(bgImage);
-              layer.add(backgroup);
-              backgroup.zIndex(0);
-              layer.batchDraw();
-                that.doRender(stage, layer, trx, res.item, urlHost, sasInfo);
-            };
-            imageObj.crossOrigin = 'Anonymous';
-            imageObj.src = res.fill.pattFill.base64
-          } else if (res.fill.type === 1 ) {
-            var backgrounds = new Konva.Rect({
-              width: res.width,
-              height: res.height,
-              fill: res.fill.solidFill,
-            })
-            backgroup.add(backgrounds);
-            layer.add(backgroup);
-            backgroup.zIndex(0)
-            layer.batchDraw();
-              that.doRender(stage, layer, trx, res.item,urlHost, sasInfo);
-          } else if (res.fill.type === 2) {
-            var color0 = ''
-            var color5 = ''
-            var color1 = ''
-            if (res.fill.gradientFill.colors) {
-              color0 = res.fill.gradientFill.colors[0].color
-              color5 = res.fill.gradientFill.colors[1].color
-              color1 = res.fill.gradientFill.colors[2].color
+    },
+    data() {
+        return {
+            stage: '',
+            layersinfo: '',
+            renderData: {
+                "page": 0,
+                "jsonUrl": {},
+                "blobinfo": {
+                    "url": '',
+                    "sas": ''
+                },
+                isLoading: false,
             }
-            var backgrounds = new Konva.Rect({
-              width: res.width,
-              height: res.height,
-              fill: res.fill.solidFill,
-              fillLinearGradientStartPoint: res.fill !== null && res.fill.gradientFill == null ? { x: 0, y: 0 } : { x: 0, y: 0 },
-              fillLinearGradientEndPoint: res.fill !== null && res.fill.gradientFill == null ? { x: 0, y: 0 } : { x: 500, y: 500 },
-              fillLinearGradientColorStops: res.fill !== null && res.fill.gradientFill == null ? null : [0, color0, 0.5, color5, 1, color1],
-            })
-            backgroup.add(backgrounds);
-            layer.add(backgroup);
-            backgroup.zIndex(0)
-            layer.batchDraw();
-              that.doRender(stage, layer, trx, res.item, urlHost, sasInfo);
-          } else {
-              that.doRender(stage, layer, trx, res.item, urlHost, sasInfo);
-          }
         }
-          stage.add(layer);
-          that.isLoading=false
     },
-      doRender(stage, layer, tr, items, callUrl, sasInfo) {
-          console.log(callUrl, sasInfo,'传输进来的')
-      let that = this
-        let f = function () {
-          let promiseArr = []
-          for (let k = 0; k < items.length; k++) {
-            let promise = new Promise(async (r, j) => {
-              let i = items[k]
-              if (i.shapeType === "Media" || i.mediaType === 'image') {
-                switch (i.mediaType) {
-                  case "image":
-                        let result = await drawImage(stage, layer, i, tr, callUrl,sasInfo,k+1);
-                    r(200)
-                    break;
-                  default:
-                    break;
-                }
-              } else if (i.type === "Group") {
-                //drawRect(stage, layer, i, tr);
-                //Group处理逻辑按照单个控件来处理
-                if (i.shapes) {
-                  that.doRender(stage, layer, tr, i.shapesm);
-                } else {
-                  if (i.svg.d) {
-                    let renderPathGroup = await drawPath(stage, layer, i, tr, callUrl,k+1);
-                  } else {
-                    let renderRect = await drawRect(stage, layer, i, tr, callUrl,k+1);
-                  }
-                }
-              } else if (i.type === "CxnSp" && i.svg) {
-                if (i.svg.type === "polyline") {
-                  let renderPath = await drawPath(stage, layer, i, tr, callUrl,k+1);
-                } else if (i.svg.type === "polygon" && i.svg.points) {
-                  let renderPathinfo = await drawPath(stage, layer, i, tr, callUrl,k+1);
+    methods: {
+        initCanvas(jsonUrl, page, spacename, initStatus, urlHost, sasInfo) {
+            var res = jsonUrl
+            console.log(res, '值!!!!!!!!!!!!!!')
+            var scalingXinfo = 810 / 1280
+            var scalingYinfo = 450 / 720
+            var pagenow = ''
+            page === 0 ? pagenow = page : pagenow = page - 1
+            var callUrl = ''
+            //var scaling = (window.innerHeight / res.height).toFixed(2) && res.height !== '' ? (window.innerHeight / res.height).toFixed(2) : 0;
+            //  var stageX = (window.innerWidth - res.width * scaling) / 2 && res.width !== '' ? (window.innerWidth - res.width * scaling) / 2 : 0;
+            if (jsonUrl.fill.type != -1) {
+                callUrl = urlHost + res.fill.blipFill.url + sasInfo;
+            }
+            var stage = new Konva.Stage({
+                container: 'container',
+                width: res.width,
+                height: res.height,
+                x: scalingXinfo,
+                //scaleX: scalingXinfo,
+                //scaleY: scalingYinfo,
+                y: 0,
+            });
+            var layer = new Konva.Layer();
+            this.layersinfo = layer
+            this.stage = stage
+            layer.listening(false)
+            var trx = new Konva.Transformer();
+            trx.nodes([])
+            var that = this;
+            let promiseArr = []
+            if (res.fill) {
+                var imageObj = new Image();
+                var backgroundGroup = {
+                    width: res.width,
+                    height: res.height,
+                    draggable: false,
+                    rotation: 0,
+                };
+                var backgroup = new Konva.Group(backgroundGroup);
+                if (res.fill.type === 3) {
+                    var imgSrcinfo = callUrl
+                    console.log(imgSrcinfo, '背景图片3333')
+                    imageObj.onload = function () {
+                        //处理超过尺寸背景图
+                        var offsetxValue = 0
+                        var offsetyValue = 0
+                        if (res.fill.blipFill && res.fill.blipFill.fillRect) {
+                            //if (res.fill.blipFill.fillRect.b !== 0 || res.fill.blipFill.fillRect.t !== 0) {
+                            //  offsetyValue = (res.height * scaling * (Math.abs(res.fill.blipFill.fillRect.b) / 100)).toFixed(2)
+                            //}
+                            //if (res.fill.blipFill.fillRect.l !== 0 || res.fill.blipFill.fillRect.r !== 0) {
+                            //  offsetxValue = (res.width * scaling * (Math.abs(res.fill.blipFill.fillRect.l) / 100)).toFixed(2)
+                            //}
+                        }
+                        //let screenshotW = res.width * scaling + offsetxValue
+                        //let screenshotH = res.height * scaling + offsetyValue
+                        //if (imageObj.width > screenshotW || imageObj.height > screenshotH) {
+                        //   var img = new Image()
+                        //  img.setAttribute('crossOrigin', 'anonymous');
+                        //  img.src = imgSrcinfo
+                        //  img.onload = () => {
+                        //    let renderWidth = img.width > screenshotW ? screenshotW : img.width
+                        //    let renderHeight = img.height > screenshotH ? screenshotH : img.height
+                        //    var canvas = document.createElement("canvas")
+                        //    canvas.width = renderWidth
+                        //    canvas.height = renderHeight
+                        //    var context = canvas.getContext("2d")
+                        //    context.drawImage(img, 0, 0, renderWidth, renderHeight)
+                        //    var newImage = canvas.toDataURL()
+                        //    that.newBackgroundima = newImage
+                        //    var img2 = new Image()
+                        //    img2.setAttribute('crossOrigin', 'anonymous');
+                        //    img2.src = newImage
+                        //    img2.onload = () => {
+                        //      var bgImage = new Konva.Image({
+                        //        fillPatternImage: img2,
+                        //        width: img2.width,
+                        //        height: img2.height,
+                        //        offsetX: offsetxValue,
+                        //        offsetY: offsetyValue,
+                        //      });
+                        //      backgroup.add(bgImage);
+                        //      layer.add(backgroup);
+                        //      backgroup.zIndex(0);
+                        //      layer.batchDraw();
+                        //    }
+                        //   that.doRender(stage, layer, trx, res.item);
+                        //    //处理超过尺寸背景图END
+                        //  }
+                        //} else if (initStatus !== 'additional'){
+                        imageObj.setAttribute('crossOrigin', 'anonymous');
+                        var bgImage = new Konva.Image({
+                            fillPatternImage: imageObj,
+                            height: res.height,
+                            width: res.width,
+                        });
+                        backgroup.add(bgImage);
+                        layer.add(backgroup);
+                        backgroup.zIndex(0);
+                        layer.batchDraw();
+                        that.doRender(stage, layer, trx, res.item, urlHost, sasInfo);
+                        //}
+                    }
+                    imageObj.crossOrigin = 'Anonymous';
+                    imageObj.src = imgSrcinfo
+                } else if (res.fill.type === 4) {
+                    imageObj.onload = function () {
+                        var bgImage = new Konva.Image({
+                            fillPatternImage: imageObj,
+                            height: res.height,
+                            width: res.width,
+                        });
+                        backgroup.add(bgImage);
+                        layer.add(backgroup);
+                        backgroup.zIndex(0);
+                        layer.batchDraw();
+                        that.doRender(stage, layer, trx, res.item, urlHost, sasInfo);
+                    };
+                    imageObj.crossOrigin = 'Anonymous';
+                    imageObj.src = res.fill.pattFill.base64
+                } else if (res.fill.type === 1) {
+                    var backgrounds = new Konva.Rect({
+                        width: res.width,
+                        height: res.height,
+                        fill: res.fill.solidFill,
+                    })
+                    backgroup.add(backgrounds);
+                    layer.add(backgroup);
+                    backgroup.zIndex(0)
+                    layer.batchDraw();
+                    that.doRender(stage, layer, trx, res.item, urlHost, sasInfo);
+                } else if (res.fill.type === 2) {
+                    var color0 = ''
+                    var color5 = ''
+                    var color1 = ''
+                    if (res.fill.gradientFill.colors) {
+                        color0 = res.fill.gradientFill.colors[0].color
+                        color5 = res.fill.gradientFill.colors[1].color
+                        color1 = res.fill.gradientFill.colors[2].color
+                    }
+                    var backgrounds = new Konva.Rect({
+                        width: res.width,
+                        height: res.height,
+                        fill: res.fill.solidFill,
+                        fillLinearGradientStartPoint: res.fill !== null && res.fill.gradientFill == null ? { x: 0, y: 0 } : { x: 0, y: 0 },
+                        fillLinearGradientEndPoint: res.fill !== null && res.fill.gradientFill == null ? { x: 0, y: 0 } : { x: 500, y: 500 },
+                        fillLinearGradientColorStops: res.fill !== null && res.fill.gradientFill == null ? null : [0, color0, 0.5, color5, 1, color1],
+                    })
+                    backgroup.add(backgrounds);
+                    layer.add(backgroup);
+                    backgroup.zIndex(0)
+                    layer.batchDraw();
+                    that.doRender(stage, layer, trx, res.item, urlHost, sasInfo);
                 } else {
-                  let renderPaths = await drawPath(stage, layer, i, tr, callUrl,k+1);
+                    that.doRender(stage, layer, trx, res.item, urlHost, sasInfo);
                 }
-              } else if (i.type === "Sp" && i.svg) {
-                if (i.svg.type === "polyline") {
-                  let renderPathz = await drawPath(stage, layer, i, tr, callUrl,k+1);
-                } else if (i.svg.type === "polygon" && i.svg.points) {
-                  let renderPathinfos = await drawPath(stage, layer, i, tr, callUrl,k+1);
-                } else if (i.svg.type ==="path"){
-                  let renderPatharray = await drawPath(stage, layer, i, tr, callUrl,k+1);
-                }else if (i.svg.d) {
-                  let renderPathdata = await drawPath(stage, layer, i, tr, callUrl,k+1);
-                } else if (i.shapeType === "ellipse") {
-                  let renderEllipse = await drawEllipse(stage, layer, i);
-                } else if (i.shapeType === "rect" || i.shapeType === "roundRect") {
-                  let renderRect = await drawRect(stage, layer, i, tr, callUrl,k+1);
-                } else {
-                  let renderDraw = await drawPath(stage, layer, i, tr, callUrl,k+1);
+            }
+            stage.add(layer);
+            that.isLoading = false
+        },
+        doRender(stage, layer, tr, items, callUrl, sasInfo) {
+            console.log(callUrl, sasInfo, '传输进来的')
+            let that = this
+            let f = function () {
+                let promiseArr = []
+                for (let k = 0; k < items.length; k++) {
+                    let promise = new Promise(async (r, j) => {
+                        let i = items[k]
+                        if (i.shapeType === "Media" || i.mediaType === 'image') {
+                            switch (i.mediaType) {
+                                case "image":
+                                    let result = await drawImage(stage, layer, i, tr, callUrl, sasInfo, k + 1);
+                                    r(200)
+                                    break;
+                                default:
+                                    break;
+                            }
+                        } else if (i.type === "Group") {
+                            //drawRect(stage, layer, i, tr);
+                            //Group处理逻辑按照单个控件来处理
+                            if (i.shapes) {
+                                that.doRender(stage, layer, tr, i.shapesm);
+                            } else {
+                                if (i.svg.d) {
+                                    let renderPathGroup = await drawPath(stage, layer, i, tr, callUrl, k + 1);
+                                } else {
+                                    let renderRect = await drawRect(stage, layer, i, tr, callUrl, k + 1);
+                                }
+                            }
+                        } else if (i.type === "CxnSp" && i.svg) {
+                            if (i.svg.type === "polyline") {
+                                let renderPath = await drawPath(stage, layer, i, tr, callUrl, k + 1);
+                            } else if (i.svg.type === "polygon" && i.svg.points) {
+                                let renderPathinfo = await drawPath(stage, layer, i, tr, callUrl, k + 1);
+                            } else {
+                                let renderPaths = await drawPath(stage, layer, i, tr, callUrl, k + 1);
+                            }
+                        } else if (i.type === "Sp" && i.svg) {
+                            if (i.svg.type === "polyline") {
+                                let renderPathz = await drawPath(stage, layer, i, tr, callUrl, k + 1);
+                            } else if (i.svg.type === "polygon" && i.svg.points) {
+                                let renderPathinfos = await drawPath(stage, layer, i, tr, callUrl, k + 1);
+                            } else if (i.svg.type === "path") {
+                                let renderPatharray = await drawPath(stage, layer, i, tr, callUrl, k + 1);
+                            } else if (i.svg.d) {
+                                let renderPathdata = await drawPath(stage, layer, i, tr, callUrl, k + 1);
+                            } else if (i.shapeType === "ellipse") {
+                                let renderEllipse = await drawEllipse(stage, layer, i);
+                            } else if (i.shapeType === "rect" || i.shapeType === "roundRect") {
+                                let renderRect = await drawRect(stage, layer, i, tr, callUrl, k + 1);
+                            } else {
+                                let renderDraw = await drawPath(stage, layer, i, tr, callUrl, k + 1);
+                            }
+                        } else if (i.type === "Math" && i.formula) {
+                            let renderMath = await drawMath(stage, layer, tr, i, callUrl, k + 1)
+                        } else if (i.charts && i.charts !== null) {
+                            let renderEchart = await drawEchart(stage, layer, tr, i, k + 1)
+                        } else if (i.type === "Table") {
+                            let renderTable = await drawTable(stage, layer, tr, i, k + 1)
+                        } else if (i.shapeType === "Diagram") {
+                            let renderRectinfo = await drawRect(stage, layer, i, tr, callUrl, k + 1);
+                            this.doRender(stage, layer, tr, i.shapes, callUrl, k + 1);
+                        } else if (i.shapeType !== "audio") {
+                            if (i.shapeType) {
+                                switch (i.shapeType) {
+                                    case "arc":
+                                        let renderArc = await drawArc(stage, layer, i, callUrl, k + 1);
+                                        break;
+                                    case "rect":
+                                        let renderRectinfo = await drawRect(stage, layer, i, tr, callUrl, k + 1);
+                                        break;
+                                    case "ellipse":
+                                        let renderEllipseinfo = await drawEllipse(stage, layer, i, k + 1);
+                                        break;
+                                    case "roundRect":
+                                        let renderRound = await drawRect(stage, layer, i, tr, callUrl, k + 1);
+                                        break;
+                                    default:
+                                        break;
+                                }
+                            }
+                        }
+                    })
                 }
-              }else if(i.type === "Math" && i.formula){
-                    let renderMath = await drawMath(stage, layer,tr,i,callUrl,k+1)
-              }else if (i.charts && i.charts !== null) {
-                let renderEchart = await drawEchart(stage, layer, tr, i,k+1)
-              } else if (i.type === "Table") {
-                let renderTable = await drawTable(stage, layer, tr, i,k+1)
-              } else if (i.shapeType === "Diagram") {
-                let renderRectinfo = await drawRect(stage, layer, i, tr, callUrl,k+1);
-                this.doRender(stage, layer, tr, i.shapes,callUrl,k+1);
-              } else if (i.shapeType !== "audio") {
-                if (i.shapeType) {
-                  switch (i.shapeType) {
-                    case "arc":
-                      let renderArc = await drawArc(stage, layer, i,callUrl,k+1);
-                      break;
-                    case "rect":
-                      let renderRectinfo = await drawRect(stage, layer, i, tr, callUrl,k+1);
-                      break;
-                    case "ellipse":
-                      let renderEllipseinfo = await drawEllipse(stage, layer, i,k+1);
-                      break;
-                    case "roundRect":
-                      let renderRound = await drawRect(stage, layer, i, tr, callUrl,k+1);
-                      break;
-                    default:
-                      break;
-                  }
+            }
+            f()
+        },
+    },
+    mounted() {
+
+        console.log(this.renderData, '查看')
+    },
+    watch: {
+        renderJson: {
+            handler(val) {
+                this.renderData = this.renderJson
+                if (val.jsonUrl) {
+                    console.log(val, '传过来的值')
+                    console.log(val.sas, '222222222222222222222222')
+                    this.initCanvas(val.jsonUrl, val.page, 'container', 'init', val.url, val.sas)
+                    this.isLoading = true
                 }
-              }
-            })
-          }
+            },
+            deep: true
         }
-        f()
     },
-  },
-  mounted(){
-      
-      console.log(this.renderData,'查看')
-  },
-        watch: {
-            renderJson: {
-                handler(val) {
-                    this.renderData = this.renderJson
-                    if (val.jsonUrl) {
-                        console.log(val, '传过来的值')
-                        console.log(val.sas, '222222222222222222222222')
-                        this.initCanvas(val.jsonUrl, val.page, 'container', 'init', val.url, val.sas)
-                        this.isLoading = true
-                    }
-                },
-                deep: true
-            }
-        },
 }
 </script>
-<style>
-.konvajs-content {
-    height: 100% !important;
-    width: 100% !important;
-    background: rgba(255, 255, 255, 0);
-    /*background: red;*/
-    /*position: relative !important;*/
-    top: 0;
-    left: 0;
-}
+<style lang="less">
+.htex-render-home {
+    .konvajs-content {
+        height: 100% !important;
+        width: 100% !important;
+        background: rgba(255, 255, 255, 0);
+        top: 0;
+        left: 0;
+    }
     .konvajs-content canvas {
         position: static !important;
     }
+}
 </style>

+ 11 - 8
TEAMModelOS/ClientApp/src/view/learnactivity/PaperScore.vue

@@ -99,13 +99,13 @@
                                     <!-- <Icon type="md-checkmark" v-show="studentAnswer.scores[item.index] == item.score" />
                                     <Icon type="md-close" color="#ed4014" v-show="studentAnswer.scores[item.index] == 0" />
                                     <Icon custom="iconfont icon-half-right" color="#ff9900" v-show="studentAnswer.scores[item.index] > 0 && studentAnswer.scores[item.index] < item.score" /> -->
-                                    <Icon custom="iconfont icon-mark" color="#1cc0f3" @click="viewMark(item.index)" v-show="studentAnswer.mark && studentAnswer.mark[item.index].length" style="margin-left:10px" />
+                                    <Icon custom="iconfont icon-mark" color="#1cc0f3" @click="viewMark(item.index)" v-if="studentAnswer.mark && studentAnswer.mark[item.index] && studentAnswer.mark[item.index].length" style="margin-left:10px" />
                                 </p>
                                 <!--学生作答答案显示区域-->
                                 <div class="stu-answer-box item-explain-details" v-if="studentAnswer.answers && studentAnswer.answers.length">
                                     <!-- 批注 主观题才会有批注功能 -->
                                     <div class="mark-btn-box" v-if="item.type !== 'single' && item.type !== 'multiple' && item.type !== 'judge'">
-                                        <span class="mark-action-item" v-show="studentAnswer.mark && studentAnswer.mark[item.index].length" style="background:#19be6b" @click="viewMark(item.index)">
+                                        <span class="mark-action-item" v-if="studentAnswer.mark && studentAnswer.mark[item.index] && studentAnswer.mark[item.index].length" style="background:#19be6b" @click="viewMark(item.index)">
                                             <Icon type="md-eye" />
                                             <span style="margin-left:5px;">{{$t('learnActivity.score.view')}}</span>
                                         </span>
@@ -222,13 +222,13 @@
                                         <!-- <Icon type="md-checkmark" v-show="studentAnswer.scores[childItem.index] == childItem.score" />
                                         <Icon type="md-close" color="#ed4014" v-show="studentAnswer.scores[childItem.index] == 0" />
                                         <Icon custom="iconfont icon-half-right" color="#ff9900" v-show="studentAnswer.scores[childItem.index] > 0 && studentAnswer.scores[childItem.index] < childItem.score" /> -->
-                                        <Icon custom="iconfont icon-mark" color="#1cc0f3" @click="viewMark(childItem.index)" v-show="studentAnswer.mark && studentAnswer.mark[childItem.index].length" style="margin-left:10px" />
+                                        <Icon custom="iconfont icon-mark" color="#1cc0f3" @click="viewMark(childItem.index)" v-if="studentAnswer.mark && studentAnswer.mark[childItem.index] && studentAnswer.mark[childItem.index].length" style="margin-left:10px" />
                                     </p>
                                     <!--学生作答答案显示区域-->
                                     <div class="stu-answer-box item-explain-details" v-if="studentAnswer.answers && studentAnswer.answers.length">
                                         <!-- 批注 主观题才会有批注功能 -->
                                         <div class="mark-btn-box" v-if="childItem.type !== 'single' && childItem.type !== 'multiple' && childItem.type !== 'judge'">
-                                            <span v-show="studentAnswer.mark && studentAnswer.mark[childItem.index].length" class="mark-action-item" style="background:#19be6b" @click="viewMark(childItem.index)">
+                                            <span v-if="studentAnswer.mark && studentAnswer.mark[childItem.index] && studentAnswer.mark[childItem.index].length" class="mark-action-item" style="background:#19be6b" @click="viewMark(childItem.index)">
                                                 <Icon type="md-eye" />
                                                 <span style="margin-left:5px;">{{$t('learnActivity.score.view')}}</span>
                                             </span>
@@ -519,10 +519,13 @@ export default {
         //快速定位题目
         goToQuestion(index) {
             this.activeIndex = index
-            this.$el.querySelector('#qustion' + index).scrollIntoView({
-                behavior: "smooth",  // 平滑过渡
-                block: "center"  // 上边框与视窗顶部平齐。默认值
-            })
+            let dom = this.$el.querySelector('#qustion' + index)
+            if (dom) {
+                dom.scrollIntoView({
+                    behavior: "smooth",  // 平滑过渡
+                    block: "center"  // 上边框与视窗顶部平齐。默认值
+                })
+            }
         },
         //快速打分
         fastSetScore(index, score) {

+ 26 - 2
TEAMModelOS/ClientApp/src/view/learnactivity/Scoring.vue

@@ -82,6 +82,8 @@ export default {
     },
     data() {
         return {
+            timer: null,
+            requestCount: 0,
             schoolClassList: [],
             originData: [],
             studentScore: [],
@@ -376,13 +378,34 @@ export default {
             };
             this.$api.learnActivity.FindAllStudent(requestData).then(
                 (res) => {
-                    if (res.examClassResults) {
+                    if (res.examClassResults && res.examClassResults.length) {
+                        if(this.timer) clearInterval(this.timer)
                         this.paperInfo[this.chooseClass]["studentAns"] = res.examClassResults[0];
                         this.setTableData()
                         if (res.examClassResults[0]) {
                             this.calcOverView(res.examClassResults[0])
                         }
                     }
+                    //如果首次没有获取到有效数据(数据暂未生成),则尝试重复活动5次
+                    else {
+                        if (this.requestCount <=5) {
+                            if (!this.timer) {
+                                this.timer = setInterval(() => {
+                                    this.$Message.warning(this.$t('learnActivity.score.requesting'))
+                                    this.getStudentAnswer()
+                                    this.requestCount++
+                                }, 3000)
+                            } else {
+                                this.requestCount++
+                            }
+                        } else {
+                            clearInterval(this.timer)
+                            this.$Message.error({
+                                content: this.$t('learnActivity.score.dataError'),
+                                duration: 3
+                            })
+                        }
+                    }
                 },
                 (err) => {
                     this.$Message.error("API ERROR!");
@@ -535,10 +558,11 @@ export default {
             handler(n, o) {
                 if (n && n.length) {
                     this.chooseClass = n[0].id;
-                    this.getClassStudent();
+                    this.getClassStudent()
                 } else {
                     this.chooseClass = undefined
                 }
+                if (this.timer) clearInterval(this.timer)
             },
             deep: true,
         },

+ 4 - 6
TEAMModelOS/ClientApp/src/view/newcourse/NewCusMgt.vue

@@ -1564,12 +1564,10 @@ export default {
     height: 26px;
     line-height: 26px;
 }
-.add-tea-header
-    .ivu-radio-group-button-solid
-    .ivu-radio-wrapper-checked:not(.ivu-radio-wrapper-disabled) {
-    background: white;
-    border-color: white;
-    color: #515a6e;
+.add-tea-header .ivu-radio-wrapper-checked{
+    background: white !important;
+    border-color: white !important;
+    color: #515a6e !important;
 }
 .add-tea-header .ivu-radio-group-button .ivu-radio-wrapper {
     background: #606060;

+ 1 - 1
TEAMModelOS/ClientApp/src/view/task/arb/ArbView.vue

@@ -164,7 +164,7 @@ export default {
                     this.markImg = undefined
                 }
                 let requstData = {
-                    id: this.taskInfo.id,
+                    id: this.taskInfo.cid,
                     stuId: this.stuId,
                     subjectId: this.taskInfo.subject,
                     tmdId: this.$store.state.userInfo.TEAMModelId,

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

@@ -86,7 +86,7 @@ export default {
         findErrData() {
             let requestData = {
                 code: this.taskInfo.ecode.replace('Exam-', ''),
-                id: this.taskInfo.id,
+                id: this.taskInfo.cid,
                 subjectId: this.taskInfo.subject,
             }
             this.$api.mark.findErr(requestData).then(

+ 12 - 0
TEAMModelOS/ClientApp/src/view/task/index.less

@@ -11,6 +11,18 @@
     height: 100%;
     padding-left: 10px;
     color: #a5a5a5;
+    .success-color{
+        color:#19be6b;
+        border-color:#19be6b
+    }
+    .warning-color{
+        color:#ff9900;
+        border-color:#ff9900
+    }
+    .err-color{
+        color:#ed4014;
+        border-color:#ed4014
+    }
 }
 .task-header{
     width: 100%;

+ 57 - 20
TEAMModelOS/ClientApp/src/view/task/index.vue

@@ -14,7 +14,7 @@
                             <p class="ev-name">
                                 <span>{{item.name}}</span>
                                 <span class="mark-status-tag">{{item.type == 3 ? '未开始' : $t('task.markStatus1')}}</span>
-                                <span class="mark-status-tag" style="color:#ff9900;border-color:#ff9900">
+                                <span class="mark-status-tag" :class="item.type === 1 ? 'success-color' : item.type == 2 ? 'err-color' : 'warning-color'">
                                     {{item.type === 1 ? '阅卷任务' : item.type == 2 ? '异常卷处理' : '仲裁卷处理'}}
                                 </span>
                             </p>
@@ -46,7 +46,7 @@
                     </div>
                     <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 :quNoList="quNoList" v-show="curBarIndex == 1" @getStuId="toByStuView" :stusData="markData ? markData.objs : []" :total="markList[curTaskIndex] ? markList[curTaskIndex].count : 1" :qus="markList[curTaskIndex] ? markList[curTaskIndex].qu : []"></StuProg>
                         <!-- 按题 批阅进度 -->
                         <div class="setting-block" v-show="curBarIndex == 0" style="margin-top:15px">
                             <p class="block-title">
@@ -66,7 +66,7 @@
                         <!-- 数据统计 平均分、最高分、最低分、标准差 -->
                         <div class="setting-block">
                             <p class="block-title">数据统计</p>
-                            <div class="setting-content  data-content dark-iview-table">
+                            <div class="setting-content data-content dark-iview-table">
                                 <DataCompare></DataCompare>
                                 <ProgPie :count="[marked.length,marking.length,unmarked]"></ProgPie>
                             </div>
@@ -74,7 +74,7 @@
                         <!-- 异常申报统计 -->
                         <div class="setting-block" v-show="errData.length">
                             <p class="block-title">异常统计</p>
-                            <div class="setting-content  data-content dark-iview-table">
+                            <div class="setting-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>
@@ -217,6 +217,7 @@ export default {
          * 按人阅卷
          */
         async toByStuView(stuId) {
+            console.log('学生id', stuId)
             sessionStorage.setItem('markFrom', this.$route.name)
             let sas = this.$store.state.user.schoolProfile.blob_sas //目前只有校本评测安排阅卷任务
             let blobUrl = JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri //目前只有校本评测安排阅卷任务
@@ -243,18 +244,25 @@ export default {
             // 获取新学生
             else {
                 let resData = await this.getNextStu()
-                let index = resData.tIds.indexOf(this.$store.state.userInfo.TEAMModelId)
-                let ansBlob = index > -1 ? resData.marks[index] || resData.blob : resData.blob
-                answer = ansBlob ? JSON.parse(await this.$tools.getFile(`${blobUrl}/exam/${ansBlob}?${sas}`)) : []
-                resData.answer = answer
-                score = resData.item.map(item => {
-                    return item.sc
-                })
-                quScore = resData.item.map(item => {
-                    return item.ssc
-                })
-                sId = resData.stuId
-                stuData = resData
+                console.log('数据', resData)
+                if (resData.blob && !resData.msg) {
+                    let index = resData.tIds.indexOf(this.$store.state.userInfo.TEAMModelId)
+                    // let ansBlob = index > -1 ? resData.marks[index] || resData.blob : resData.blob //批注数据结构调整,不是完整的作答数据了
+                    let ansBlob = resData.blob
+                    answer = ansBlob ? JSON.parse(await this.$tools.getFile(`${blobUrl}/exam/${ansBlob}?${sas}`)) : []
+                    resData.answer = answer
+                    score = resData.item.map(item => {
+                        return item.sc
+                    })
+                    quScore = resData.item.map(item => {
+                        return item.ssc
+                    })
+                    sId = resData.stuId
+                    stuData = resData
+
+                } else {
+                    this.$Message.warning('暂无可选学生')
+                }
             }
             this.$router.push({
                 name: 'ByStu',
@@ -305,7 +313,7 @@ export default {
         getNextStu(stuId) {
             let requestData = {
                 code: this.markList[this.curTaskIndex].ecode.replace('Exam-', ''),
-                id: this.markList[this.curTaskIndex].id,
+                id: this.markList[this.curTaskIndex].cid,
                 subjectId: this.markList[this.curTaskIndex].subject,
                 count: this.markList[this.curTaskIndex].count,
                 tmdId: this.$store.state.userInfo.TEAMModelId,
@@ -346,7 +354,7 @@ export default {
                         ch = ch > this.markList.length - 1 ? 0 : ch
                         this.curTaskIndex = ch || 0
                         if (this.markList.length > 0) {
-                            let type = this.markList[0].type
+                            let type = this.markList[this.curTaskIndex].type
                             console.log('type', type)
                             switch (type) {
                                 case 1:
@@ -375,7 +383,7 @@ export default {
         findTaskData() {
             let requestData = {
                 code: this.markList[this.curTaskIndex].ecode.replace('Exam-', ''),
-                id: this.markList[this.curTaskIndex].id,
+                id: this.markList[this.curTaskIndex].cid,
                 subjectId: this.markList[this.curTaskIndex].subject,
                 tmdId: this.$store.state.userInfo.TEAMModelId,
                 type: this.markList[this.curTaskIndex].type
@@ -411,7 +419,7 @@ export default {
             this.curTaskIndex = index
             sessionStorage.setItem('markIndex', index)
             if (this.markList.length > 0) {
-                let type = this.markList[0].type
+                let type = this.markList[this.curTaskIndex].type
                 console.log('type', type)
                 switch (type) {
                     case 1:
@@ -436,6 +444,35 @@ export default {
         this.curBarIndex = sessionStorage.getItem('markMode') || 1
     },
     computed: {
+        //试卷题号列表
+        quNoList() {
+            if (this.fullPaper.item.length) {
+                let objectiveQu = ['single', 'multiple', 'judge']
+                let data = []
+                let realIndex = 0
+                this.fullPaper.item.forEach((item, index) => {
+                    if (item.children.length) {
+                        item.children.forEach((childItem, childIndex) => {
+                            let i = realIndex++
+                            data.push({
+                                label: (index + 1) + '-' + (childIndex + 1),
+                                value: i,
+                                disabled: objectiveQu.includes(childItem.type)
+                            })
+                        })
+                    } else {
+                        let i = realIndex++
+                        data.push({
+                            label: (index + 1) + '',
+                            value: i,
+                            disabled: objectiveQu.includes(item.type)
+                        })
+                    }
+                })
+                return data
+            }
+            return []
+        },
         //异常数据
         errData() {
             let data = []

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

@@ -243,7 +243,7 @@ export default {
                     this.markImg = undefined
                 }
                 let requstData = {
-                    id: this.taskInfo.id,
+                    id: this.taskInfo.cid,
                     stuId: this.stusInfo[this.stuIndex].stuId,
                     subjectId: this.taskInfo.subject,
                     tmdId: this.$store.state.userInfo.TEAMModelId,

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

@@ -9,7 +9,7 @@
             <span class="info-value">{{taskInfo.name}}</span>
             <span class="info-label">{{$t('learnActivity.mark.reviewType')}}</span>
             <span class="info-value">{{$t('learnActivity.mark.byStu')}}</span>
-            <span class="info-label">{{$t('learnActivity.mark.stuId')}}</span>
+            <span class="info-label">{{$t('learnActivity.mark.stuId')}}</span>
             <span class="info-value stu-id-info">{{stuId}}</span>
             <span class="info-label">{{$t('learnActivity.mark.curQu')}}</span>
             <span class="info-value cur-qu-index">{{quNoList[quIndex] ? quNoList[quIndex].label : '--'}}</span>
@@ -122,7 +122,7 @@
         <!-- 用来单独渲染学生作答数据,提高tocanvas 的效率 -->
         <iframe id="markIframe" :srcdoc="curAnswer"></iframe>
         <Modal v-model="toggleStatus" :title="$t('learnActivity.mark.toggleStu')" :width="800" footer-hide>
-            <StuProg @getStuId="toByStuView" class="light-stu-prog" :total="taskInfo.count" :stusData="stusData" :qus="taskInfo ? taskInfo.qu : []"></StuProg>
+            <StuProg @getStuId="toByStuView" class="light-stu-prog" :total="taskInfo.count" :stusData="stusData" :quNoList="quNoList" :qus="taskInfo ? taskInfo.qu : []"></StuProg>
         </Modal>
         <Modal v-model="errStatus" title="异常原因" :width="600" @on-ok="exception" :loading="loading">
             <RadioGroup v-model="errReason">
@@ -285,7 +285,7 @@ export default {
                     this.markImg = undefined
                 }
                 let requstData = {
-                    id: this.taskInfo.id,
+                    id: this.taskInfo.cid,
                     stuId: this.stuId,
                     subjectId: this.taskInfo.subject,
                     tmdId: this.$store.state.userInfo.TEAMModelId,
@@ -364,11 +364,21 @@ export default {
         nextQuestion() {
             //首先判断是否都已评分
             let s = this._.cloneDeep(this.stuScore)
+
+            //筛选按题分配模式需要批阅的题目
             if (this.taskInfo.qu.length) {
                 s = s.filter((item, index) => {
                     return this.taskInfo.qu.includes(index)
                 })
             }
+            //筛选客观题(自动评分)
+            else{
+                s = s.filter((item,index)=>{
+                    return !this.quNoList[index].disabled
+                })
+            }
+
+            console.log('ssss', s)
             if (!s.includes(-1)) {
                 if (this.autoStu) {
                     this.isComplete = true

+ 31 - 27
TEAMModelOS/ClientApp/src/view/task/mark/MarkCanvas.vue

@@ -3,7 +3,7 @@
         <vuescroll ref="canvasScroll">
             <!-- canvas部分 -->
             <div class="container-box">
-                <div id="container" @mousemove="canvasMouseMove" @mousedown="canvasMouseDown" @mouseup="canvasMouseUp"></div>
+                <div id="container-mark" @mousemove="canvasMouseMove" @mousedown="canvasMouseDown" @mouseup="canvasMouseUp"></div>
             </div>
         </vuescroll>
     </div>
@@ -441,7 +441,7 @@ export default {
         },
         //绑定鼠标滚轮事件,操作缩放功能
         bundleScoll() {
-            let stage = document.getElementById('container')
+            let stage = document.getElementById('container-mark')
             let _this = this
             stage.addEventListener('mousewheel', function (e) {
                 if (e.preventDefault) {
@@ -583,35 +583,36 @@ export default {
                     height: this.stage.attrs.height
                 })
             })
-        }
-    },
-    mounted() {
-        let _this = this
-        _this.$nextTick(() => {
+        },
+        initStage() {
             //创建画布
-            _this.stage = new Konva.Stage({
-                container: 'container',
-                id: 'canvas',
+            console.log('xxxxxxx')
+            this.stage = new Konva.Stage({
+                container: 'container-mark',
                 width: this.options.width,
                 height: this.options.height
             })
-            _this.orgLayer = new Konva.Layer()
-            _this.markLayer = new Konva.Layer()
-            _this.stage.add(_this.orgLayer)
-            _this.stage.add(_this.markLayer)
-            _this.orgLayer.batchDraw()
-            _this.bundleScoll()
-            _this.stage.on('click', (evt) => {
-                _this.tr.nodes([])
+            this.orgLayer = new Konva.Layer()
+            this.markLayer = new Konva.Layer()
+            this.stage.add(this.orgLayer)
+            this.stage.add(this.markLayer)
+            this.orgLayer.batchDraw()
+            this.bundleScoll()
+            this.stage.on('click', (evt) => {
+                this.tr.nodes([])
             })
-            _this.stage.on('mouseover', (evt) => {
-                let nodes = _this.tr.nodes()
-                if (_this.mouseStatus == 'resize' && nodes.length == 0) _this.mouseStatus = _this.resizeBefore
+            this.stage.on('mouseover', (evt) => {
+                let nodes = this.tr.nodes()
+                if (this.mouseStatus == 'resize' && nodes.length == 0) this.mouseStatus = this.resizeBefore
 
             })
-        })
-
-
+        }
+    },
+    mounted() {
+        if (!this.stage) {
+            console.log(222)
+            this.initStage()
+        }
         this.tr = new Konva.Transformer({
             rotateEnabled: false,
             anchorStroke: 'red',
@@ -639,7 +640,11 @@ export default {
         bgImg: {
             handler(n, o) {
                 this.$nextTick(() => {
-                    if (this.stage) this.restore()
+                    if (this.stage) {
+                        this.restore()
+                    } else {
+                        this.initStage()
+                    }
                     this.orgLayer.removeChildren()
                     this.markLayer.removeChildren()
                     let imageObj = new Image()
@@ -664,7 +669,6 @@ export default {
                     this.stage.add(this.orgLayer)
                 })
             },
-            // immediate: true,
             deep: true
         },
         drawImgData: {
@@ -697,7 +701,7 @@ export default {
     width: 100%;
     padding: 10px;
 }
-#container {
+#container-mark {
     max-width: 100%;
 }
 </style>

+ 14 - 0
TEAMModelOS/ClientApp/src/view/task/mark/StuProg.vue

@@ -70,6 +70,14 @@ export default {
             default: () => {
                 return []
             }
+        },
+        // 试卷题号和题目简要信息
+        quNoList: {
+            required: true,
+            type: Array,
+            default: () => {
+                return []
+            }
         }
     },
     data() {
@@ -108,6 +116,12 @@ export default {
                             return this.qus.includes(sIndex)
                         })
                     }
+                    //如果是按人分配,则需要排除客观题(自动评分)
+                    else {
+                        scores = scores.filter((sItem, sIndex) => {
+                            return !this.quNoList[sIndex].disabled
+                        })
+                    }
                     return !scores.includes(-1)
                 })
             } else {

+ 106 - 34
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -26,6 +26,7 @@ using Azure.Messaging.ServiceBus;
 using Microsoft.Extensions.Configuration;
 using TEAMModelOS.Filter;
 using TEAMModelOS.SDK.Models.Service;
+using TEAMModelOS.SDK.Models.Cosmos;
 
 namespace TEAMModelOS.Controllers
 {
@@ -100,7 +101,7 @@ namespace TEAMModelOS.Controllers
                     }
                 }
                 int stuCount = 0;
-                List<string> classes = ExamService.getClasses(request.classes,request.stuLists);
+                List<string> classes = ExamService.getClasses(request.classes, request.stuLists);
                 for (int i = 0; i < classes.Count; i++)
                 {
                     List<string> ids = new List<string>();
@@ -147,7 +148,8 @@ namespace TEAMModelOS.Controllers
                                     }
                                     index++;
                                 }*/
-                                for (int j = 0; j < stuList.students.Count; j++) {
+                                for (int j = 0; j < stuList.students.Count; j++)
+                                {
 
                                     if (sids.Contains(stuList.students[j].id))
                                     {
@@ -238,7 +240,7 @@ namespace TEAMModelOS.Controllers
                     List<string> sheetIds = new List<string>();
                     foreach (PaperSimple simple in request.papers)
                     {
-                        simple.blob =$"/exam/{request.id}/paper/{request.subjects[n].id}";
+                        simple.blob = $"/exam/{request.id}/paper/{request.subjects[n].id}";
                         n++;
                         simple.sheet = null;
                     }
@@ -315,6 +317,43 @@ namespace TEAMModelOS.Controllers
                 messageBlob.ApplicationProperties.Add("name", "BlobRoot");
                 var ActiveTask = _configuration.GetValue<string>("Azure:ServiceBus:ActiveTask");
                 await _serviceBus.GetServiceBusClient().SendMessageAsync(ActiveTask, messageBlob);
+                //删除阅卷配置
+                var cresponse = await client.GetContainer("TEAMModelOS", "Common").ReadItemStreamAsync(id.ToString(), new PartitionKey($"Correct-{code}"));
+                if (cresponse.Status == 200)
+                {
+                    using var json = await JsonDocument.ParseAsync(response.ContentStream);
+                    Correct correct = json.ToObject<Correct>();
+                    if (correct.subs.IsNotEmpty())
+                    {
+                        foreach (var sub in correct.subs)
+                        {
+                            //List<string> correctIds = new List<string>();
+                            if (sub.markers.IsNotEmpty())
+                            {
+                                foreach (var marker in sub.markers)
+                                {
+                                    await deleteAsync(client, id.GetString(), marker.id);
+                                }
+                            }
+                            if (sub.err.Count > 0)
+                            {
+                                foreach (var tId in sub.err)
+                                {
+                                    await deleteAsync(client, id.GetString(), tId);
+                                }
+                            }
+                            if (sub.arb.Count > 0)
+                            {
+                                foreach (var tId in sub.arb)
+                                {
+                                    await deleteAsync(client, id.GetString(), tId);
+                                }
+                            }
+                        }
+                    }
+                    await client.GetContainer("TEAMModelOS", "Common").DeleteItemStreamAsync(id.GetString(), new PartitionKey($"Correct-{code}"));
+                }
+
                 List<ExamClassResult> examClassResults = new List<ExamClassResult>();
                 await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryIterator<ExamClassResult>(queryText: $"select c.id from c where c.examId = '{id}'", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"ExamClassResult-{code}") }))
                 {
@@ -1202,11 +1241,7 @@ namespace TEAMModelOS.Controllers
                         }
                         stuAns.Add(result.studentAnswers[index]);
                         stuScore.Add(result.studentScores[index]);
-                        if (result.mark.Count > 0)
-                        {
-                            mark = result.mark;
-                            //mark.Add(result.mark[index]);
-                        }
+                        mark.Add(result.mark[index]);
                         total.Add(result.sum.Where(s => s <= 59).Count());
                         total.Add(result.sum.Where(s => s > 59 && s <= 70).Count());
                         total.Add(result.sum.Where(s => s > 70 && s <= 80).Count());
@@ -1613,40 +1648,51 @@ namespace TEAMModelOS.Controllers
                 if (!requert.TryGetProperty("subjectId", out JsonElement subjectId)) return BadRequest();
                 //if (!requert.TryGetProperty("tmdId", out JsonElement tId)) return BadRequest();
                 var client = _azureCosmos.GetCosmosClient();
-                ExamInfo info = await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<ExamInfo>(id.ToString(), new PartitionKey($"Exam-{code}"));
-                List<ExamClassResult> classResults = new();
-                List<SDK.Models.Cosmos.Common.Scoring> attr = new List<SDK.Models.Cosmos.Common.Scoring>();
-                await foreach (var item in client.GetContainer("TEAMModelOS", "Teacher").GetItemQueryIterator<SDK.Models.Cosmos.Common.Scoring>(
-                                    queryText: $"select value(c) from c where c.examId = '{id}' and c.subjectId = '{subjectId}'",
-                                    requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Scoring-{code}") }))
-                {
-                    attr.Add(item);
-                }
-                int index = 0;
-                foreach (ExamSubject subject in info.subjects)
-                {
-                    if (!subject.id.Equals(subjectId.ToString()))
+                var response = await client.GetContainer("TEAMModelOS", "Common").ReadItemStreamAsync(id.ToString(), new PartitionKey($"Exam-{code}"));
+                if (response.Status == 200)
+                {
+                    using var json = await JsonDocument.ParseAsync(response.ContentStream);
+                    ExamInfo info = json.ToObject<ExamInfo>();
+                    //ExamInfo info = await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<ExamInfo>(id.ToString(), new PartitionKey($"Exam-{code}"));
+                    List<ExamClassResult> classResults = new();
+                    List<SDK.Models.Cosmos.Common.Scoring> attr = new List<SDK.Models.Cosmos.Common.Scoring>();
+                    await foreach (var item in client.GetContainer("TEAMModelOS", "Teacher").GetItemQueryIterator<SDK.Models.Cosmos.Common.Scoring>(
+                                        queryText: $"select value(c) from c where c.examId = '{id}' and c.subjectId = '{subjectId}'",
+                                        requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Scoring-{code}") }))
                     {
-                        index++;
+                        attr.Add(item);
                     }
-                    else
+                    int index = 0;
+                    foreach (ExamSubject subject in info.subjects)
                     {
-                        break;
+                        if (!subject.id.Equals(subjectId.ToString()))
+                        {
+                            index++;
+                        }
+                        else
+                        {
+                            break;
+                        }
                     }
-                }
-                List<dynamic> objs = new List<dynamic>();
+                    List<dynamic> objs = new List<dynamic>();
 
-                List<SDK.Models.Cosmos.Common.Scoring> errs = new();
-                foreach (SDK.Models.Cosmos.Common.Scoring ss in attr)
-                {
-                    List<Qs> qs = ss.qs.Where(s => !string.IsNullOrEmpty(s.err)).ToList();
-                    if (qs.Count > 0)
+                    List<SDK.Models.Cosmos.Common.Scoring> errs = new();
+                    foreach (SDK.Models.Cosmos.Common.Scoring ss in attr)
                     {
-                        ss.qs = qs;
-                        errs.Add(ss);
+                        List<Qs> qs = ss.qs.Where(s => !string.IsNullOrEmpty(s.err)).ToList();
+                        if (qs.Count > 0)
+                        {
+                            ss.qs = qs;
+                            errs.Add(ss);
+                        }
                     }
+                    return Ok(new { errs, paper = info.papers[index].blob });
                 }
-                return Ok(new { errs, paper = info.papers[index].blob });
+                else
+                {
+                    return BadRequest();
+                }
+
             }
             catch (Exception ex)
             {
@@ -2145,6 +2191,10 @@ namespace TEAMModelOS.Controllers
 
                     }
                 }
+                else
+                {
+                    return BadRequest();
+                }
                 //判定阅卷结算的条件
                 if (attr.Count == count.GetInt32())
                 {
@@ -2377,5 +2427,27 @@ namespace TEAMModelOS.Controllers
         {
             return null;
         }
+
+        private async Task deleteAsync(CosmosClient client, string id, string tId)
+        {
+            List<string> correctIds = new List<string>();
+            await foreach (var item in client.GetContainer("TEAMModelOS", "Teacher").GetItemQueryStreamIterator(queryText: $"select c.id from c where c.cid = '{id}' ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"CorrectTask-{tId}") }))
+            {
+                using var jsonTask = await JsonDocument.ParseAsync(item.ContentStream);
+                if (jsonTask.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
+                {
+                    var accounts = jsonTask.RootElement.GetProperty("Documents").EnumerateArray();
+                    while (accounts.MoveNext())
+                    {
+                        JsonElement account = accounts.Current;
+                        correctIds.Add(account.GetProperty("id").GetString());
+                    }
+                }
+            }
+            if (correctIds.Count > 0)
+            {
+                await client.GetContainer("TEAMModelOS", "Teacher").DeleteItemsStreamAsync(correctIds, $"CorrectTask-{tId}");
+            }
+        }
     }
 }