Browse Source

Merge branch 'develop3.0-tmd' of http://106.12.23.251:10080/TEAMMODEL/TEAMModelOS into develop3.0-tmd

CrazyIter_Bin 4 years ago
parent
commit
d8d8195505

+ 2 - 2
TEAMModelOS/ClientApp/src/common/BaseCanvas.vue

@@ -112,9 +112,9 @@
 				})
 				})
 
 
 			},
 			},
-
+			
+			/* 绘制输入的文本 */
 			doAddText(val) {
 			doAddText(val) {
-				console.log('要绘制的文本', val)
 				let context = this.context
 				let context = this.context
 				context.fillStyle = "red";
 				context.fillStyle = "red";
 				context.textAlign = 'left';
 				context.textAlign = 'left';

+ 1 - 1
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReport.vue

@@ -148,7 +148,7 @@
                                 </div>
                                 </div>
                                 <div class="TitleRec1"><span style="margin:5px;color:#1472c7">{{$t("studentWeb.exam.report.ansRes")}}:</span></div>
                                 <div class="TitleRec1"><span style="margin:5px;color:#1472c7">{{$t("studentWeb.exam.report.ansRes")}}:</span></div>
                                 <br />
                                 <br />
-                                <div v-if="ansData[index]" style="margin-left:10px" v-html="ansData[index].length > 0 ? ansData[index][0] : $t('studentWeb.exam.report.noScore')"></div>
+                                <div v-if="ansData[index]" style="margin-left:10px" v-html="ansData[index].length > 0 ? ansData[index][0] : '未作答'"></div>
                             </div>
                             </div>
                         </div>
                         </div>
                         <!--<br />-->
                         <!--<br />-->

+ 2 - 2
TEAMModelOS/ClientApp/src/utils/public.js

@@ -618,7 +618,7 @@ export default {
 		let result = []
 		let result = []
 		val.students.forEach(stu => {
 		val.students.forEach(stu => {
 			result.push([
 			result.push([
-				stu.id,
+				stu.name,
 				stu.className,
 				stu.className,
 				stu.no || '-',
 				stu.no || '-',
 				val.fScores[subjectIndex].Value[index],
 				val.fScores[subjectIndex].Value[index],
@@ -660,7 +660,7 @@ export default {
 		let result = []
 		let result = []
 		val.students.forEach(stu => {
 		val.students.forEach(stu => {
 			result.push([
 			result.push([
-				stu.id,
+				stu.name,
 				stu.className,
 				stu.className,
 				stu.no || '-',
 				stu.no || '-',
 				val.kScores[subjectIndex].Value[index],
 				val.kScores[subjectIndex].Value[index],

+ 1 - 1
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/AchievementAnalysis/AchievementAnalysis.vue

@@ -162,7 +162,7 @@
         },
         },
 
 
         created() {
         created() {
-            
+            this.$parent.$parent.$parent.isShowQuestions = false
         },
         },
         methods: {
         methods: {
 			/* 获取成绩分析模块 -- 及格率统计数据 */
 			/* 获取成绩分析模块 -- 及格率统计数据 */

+ 1 - 0
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/KnowledgeAnalysis/KnowledgeAnalysis.vue

@@ -80,6 +80,7 @@
         },
         },
         created() {
         created() {
             this.isShowPie = !(this.knowledgeData.length > 10)
             this.isShowPie = !(this.knowledgeData.length > 10)
+			this.$parent.$parent.$parent.isShowQuestions = false
         },
         },
 
 
         methods: {
         methods: {

+ 1 - 0
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/LevelAnalysis/LevelAnalysis.vue

@@ -65,6 +65,7 @@
         },
         },
         created() {
         created() {
             this.isShowPie = !(this.levelData.length > 10)
             this.isShowPie = !(this.levelData.length > 10)
+			this.$parent.$parent.$parent.isShowQuestions = false
         },
         },
 
 
         methods: {
         methods: {

+ 2 - 0
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/ScatterAnalysis/ScatterAnalysis.vue

@@ -151,6 +151,7 @@
                     this.$refs.scatterTable.exportData(3)
                     this.$refs.scatterTable.exportData(3)
                 }
                 }
             })
             })
+			this.$parent.$parent.$parent.isShowQuestions = false
         },
         },
 
 
         methods: {
         methods: {
@@ -184,6 +185,7 @@
 				analysisJson.students.forEach(stu => {
 				analysisJson.students.forEach(stu => {
 					let obj = {}
 					let obj = {}
 					analysisJson.scatterKey.forEach((key, index) => {
 					analysisJson.scatterKey.forEach((key, index) => {
+						stu.subjects[subjectIndex].scatter[0] = stu.name
 						obj[key] = stu.subjects[subjectIndex].scatter[index]
 						obj[key] = stu.subjects[subjectIndex].scatter[index]
 					})
 					})
 					result.push(obj)
 					result.push(obj)

+ 1 - 1
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/TestAnalysis/QuestionList.css

@@ -186,7 +186,7 @@
             display:flex;
             display:flex;
             flex-direction:row;
             flex-direction:row;
             flex-wrap:wrap;
             flex-wrap:wrap;
-            margin-top:10px;
+            /* margin-top:10px; */
 			color: #fff;
 			color: #fff;
         }
         }
         .ql-right-box .ql-right-list .ql-right-item {
         .ql-right-box .ql-right-list .ql-right-item {

+ 25 - 11
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/TestAnalysis/QuestionList.vue

@@ -24,49 +24,52 @@
                         <div class="ql-right-part" v-if="SingleList.length">
                         <div class="ql-right-part" v-if="SingleList.length">
                             <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text2')}}({{sumArr(SingleList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                             <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text2')}}({{sumArr(SingleList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                             <div class="ql-right-items">
                             <div class="ql-right-items">
-                                <span class="ql-right-item" v-for="(item,index) in SingleList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</span>
+                                <span class="ql-right-item" v-for="(item,index) in SingleList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + flatList.indexOf(item)"  :data-order="flatList.indexOf(item)">{{getIndexOrder(item)}}</span>
                             </div>
                             </div>
                         </div>
                         </div>
                         <div class="ql-right-part" v-if="MultipleList.length">
                         <div class="ql-right-part" v-if="MultipleList.length">
                             <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text3')}}({{sumArr(MultipleList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                             <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text3')}}({{sumArr(MultipleList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                             <div class="ql-right-items">
                             <div class="ql-right-items">
-                                <span class="ql-right-item" v-for="(item,index) in MultipleList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</span>
+                                <span class="ql-right-item" v-for="(item,index) in MultipleList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + flatList.indexOf(item)"  :data-order="flatList.indexOf(item)">{{getIndexOrder(item)}}</span>
                             </div>
                             </div>
                         </div>
                         </div>
                         <div class="ql-right-part" v-if="JudgeList.length">
                         <div class="ql-right-part" v-if="JudgeList.length">
                             <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text4')}}({{sumArr(JudgeList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                             <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text4')}}({{sumArr(JudgeList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                             <div class="ql-right-items">
                             <div class="ql-right-items">
-                                <span class="ql-right-item" v-for="(item,index) in JudgeList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</span>
+                                <span class="ql-right-item" v-for="(item,index) in JudgeList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + flatList.indexOf(item)"  :data-order="flatList.indexOf(item)">{{getIndexOrder(item)}}</span>
                             </div>
                             </div>
                         </div>
                         </div>
                         <div class="ql-right-part" v-if="CompleteList.length">
                         <div class="ql-right-part" v-if="CompleteList.length">
                             <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text5')}}({{sumArr(CompleteList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                             <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text5')}}({{sumArr(CompleteList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                             <div class="ql-right-items">
                             <div class="ql-right-items">
-                                <span class="ql-right-item" v-for="(item,index) in CompleteList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</span>
+                                <span class="ql-right-item" v-for="(item,index) in CompleteList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + flatList.indexOf(item)"  :data-order="flatList.indexOf(item)">{{getIndexOrder(item)}}</span>
                             </div>
                             </div>
                         </div>
                         </div>
                         <div class="ql-right-part" v-if="SubjectiveList.length">
                         <div class="ql-right-part" v-if="SubjectiveList.length">
                             <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text6')}}({{sumArr(SubjectiveList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                             <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text6')}}({{sumArr(SubjectiveList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                             <div class="ql-right-items">
                             <div class="ql-right-items">
-                                <span class="ql-right-item" v-for="(item,index) in SubjectiveList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</span>
+                                <span class="ql-right-item" v-for="(item,index) in SubjectiveList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + flatList.indexOf(item)"  :data-order="flatList.indexOf(item)">{{getIndexOrder(item)}}</span>
                             </div>
                             </div>
                         </div>
                         </div>
 						<div class="ql-right-part" v-if="ConnectorList.length">
 						<div class="ql-right-part" v-if="ConnectorList.length">
 						    <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text14')}}({{sumArr(ConnectorList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
 						    <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text14')}}({{sumArr(ConnectorList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
 						    <div class="ql-right-items">
 						    <div class="ql-right-items">
-						        <span class="ql-right-item" v-for="(item,index) in ConnectorList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</span>
+						        <span class="ql-right-item" v-for="(item,index) in ConnectorList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + flatList.indexOf(item)"  :data-order="flatList.indexOf(item)">{{getIndexOrder(item)}}</span>
 						    </div>
 						    </div>
 						</div>
 						</div>
 						<div class="ql-right-part" v-if="CorrectList.length">
 						<div class="ql-right-part" v-if="CorrectList.length">
 						    <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text15')}}({{sumArr(CorrectList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
 						    <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text15')}}({{sumArr(CorrectList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
 						    <div class="ql-right-items">
 						    <div class="ql-right-items">
-						        <span class="ql-right-item" v-for="(item,index) in CorrectList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</span>
+						        <span class="ql-right-item" v-for="(item,index) in CorrectList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + flatList.indexOf(item)"  :data-order="flatList.indexOf(item)">{{getIndexOrder(item)}}</span>
 						    </div>
 						    </div>
 						</div>
 						</div>
                         <div class="ql-right-part" v-if="ComposeList.length">
                         <div class="ql-right-part" v-if="ComposeList.length">
                             <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text7')}}({{sumArr(ComposeList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                             <span class="ql-right-part-title"><span class="ql-line"></span>{{$t('totalAnalysis.ql_text7')}}({{sumArr(ComposeList.map(item => item.score))}}{{$t('totalAnalysis.ql_text8')}})</span>
                             <div class="ql-right-items">
                             <div class="ql-right-items">
-                                <span class="ql-right-item" v-for="(item,index) in ComposeList" :key="index" @click="handleItemClick(item,$event)" :ref="'indexRef' + questionList.indexOf(item)">{{getIndexOrder(item)}}</span>
+								<!-- 如果是综合题 则需要把小题题序放出来 -->
+								<span v-for="(item,index) in ComposeList" :key="index" style="background-color: none;" class="ql-right-items">
+									<span class="ql-right-item" v-for="(child,childIndex) in item.children" :key="childIndex" @click="handleItemClick(item,$event)" :ref="'indexRef' + (flatList.indexOf(child))"  :data-order="flatList.indexOf(child)">{{getIndexOrder(item)}} - {{ childIndex + 1 }}</span>
+								</span>
                             </div>
                             </div>
                         </div>
                         </div>
                     </div>
                     </div>
@@ -95,6 +98,7 @@
                 optionsData: [],
                 optionsData: [],
                 collapseList: [],
                 collapseList: [],
                 questionList: [],
                 questionList: [],
+				flatList:[],
                 SingleList: [],
                 SingleList: [],
                 MultipleList: [],
                 MultipleList: [],
                 JudgeList: [],
                 JudgeList: [],
@@ -332,11 +336,16 @@
 				// 如果是试题页面过来带有题序 则获取指定题目并进行滚动
 				// 如果是试题页面过来带有题序 则获取指定题目并进行滚动
 				let qIndex = this.$route.query.QIndex
 				let qIndex = this.$route.query.QIndex
 				if (qIndex) {
 				if (qIndex) {
+					let paperItems = fullPaperJson.item
+					let allItems = []
+					paperItems.forEach(i => {
+						allItems = allItems.concat(i.type === 'compose' ? i.children : [i])
+					})
+					this.flatList = allItems
+					console.log('拉平后的题目',allItems)
 					this.$nextTick(() => {
 					this.$nextTick(() => {
-						let listLength = this.questionList.length
-						let index = qIndex > listLength ? (+listLength - 1) :  (+qIndex - 1)
 						setTimeout(() => {
 						setTimeout(() => {
-							this.$refs['indexRef' + index][0].click() // 根据路由携带的题序 来触发对应题序的点击事件 完成滚动
+							this.$refs['indexRef' + (qIndex - 1)][0].click() // 根据路由携带的题序 来触发对应题序的点击事件 完成滚动
 						}, 1000)
 						}, 1000)
 					})
 					})
 				} else {
 				} else {
@@ -373,6 +382,7 @@
 
 
             // 点击右边题序 获取到题目DOM 进行滚动操作
             // 点击右边题序 获取到题目DOM 进行滚动操作
             handleItemClick(item, e) {
             handleItemClick(item, e) {
+				console.log(e)
 				this.$nextTick(() => {
 				this.$nextTick(() => {
 					let parentVm = this.$parent.$parent.$parent
 					let parentVm = this.$parent.$parent.$parent
 					let currentSpan = e.target || e
 					let currentSpan = e.target || e
@@ -387,6 +397,10 @@
 					})
 					})
 					// 将当前选中项修改选中色
 					// 将当前选中项修改选中色
 					currentSpan.style.background = '#139c51'
 					currentSpan.style.background = '#139c51'
+					
+					console.log(itemIndex)
+					console.log(this.$refs.exList)
+					this.$refs.exList.collapseList = [itemIndex]
 				})
 				})
                 
                 
             },
             },

+ 1 - 1
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/TestAnalysis/TestAnalysis.vue

@@ -278,7 +278,7 @@
             }
             }
         },
         },
         created() {
         created() {
-
+				this.$parent.$parent.$parent.isShowQuestions = false
         },
         },
 
 
         methods: {
         methods: {

+ 1 - 6
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/index.vue

@@ -153,12 +153,6 @@
                 switch (Number(index)) {
                 switch (Number(index)) {
                     case 0:
                     case 0:
                         path = '/total'
                         path = '/total'
-                        // 往Vuex获取模块数据
-						console.log(this.currentExamItem)
-						let vuexAchievement = this.$store.state.totalAnalysis.achievementData
-						if(!vuexAchievement){
-							this.$store.commit('updateCurExam', this.currentExamItem)
-						}
                         this.$store.commit('updateExportTable', [{
                         this.$store.commit('updateExportTable', [{
                             tableRef: 'entryTable',
                             tableRef: 'entryTable',
                             tableName:'进线情况统计'
                             tableName:'进线情况统计'
@@ -300,6 +294,7 @@
 				}
 				}
 			})
 			})
 			this.getTotalAverage()
 			this.getTotalAverage()
+			this.handleDataSelect(0)
 			this.currentExamItem = JSON.parse(localStorage.getItem('curExam'))
 			this.currentExamItem = JSON.parse(localStorage.getItem('curExam'))
 			console.log(this.currentExamItem)
 			console.log(this.currentExamItem)
         },
         },