Ver Fonte

Merge branch 'develop6.0-tmd' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop6.0-tmd

CrazyIter_Bin há 3 anos atrás
pai
commit
8cda31eb04

+ 3 - 1
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseChild.vue

@@ -116,7 +116,9 @@
 		<!-- 添加子题弹窗 -->
 		<Modal v-model="editChildModal" width="1080" class="edit-exercise-modal" :styles="{top: '20px'}" :mask-closable="false">
 			<div class="modal-header" slot="header">{{$t('evaluation.exerciseList.editChild')}}</div>
-			<BaseCreateChild v-if="editChildModal" @addFinish='onEditChildFinish' refId="childListEdit" :editItem="curItem" ref="createChildRef"></BaseCreateChild>
+			<!-- <BaseCreateChild v-if="editChildModal" @addFinish='onEditChildFinish' refId="childListEdit" :editItem="curItem" ref="createChildRef"></BaseCreateChild> -->
+			<BaseEditExercise v-if="editChildModal" :exerciseItem="curItem" @onEditSuccess="onEditChildFinish" refId="paperEdit"
+				ref="createChildRef"  hidePeriod></BaseEditExercise>
 			<div slot="footer">
 				<Button type="success" @click="onSaveChild">{{$t('evaluation.confirm')}}</Button>
 			</div>

+ 2 - 3
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseCreateChild.vue

@@ -62,9 +62,9 @@
 		</div>
 
 		<!-- 补救的富文本部分 -->
-		<div class="exersices-analysis" v-if="exersicesType !== 'compose'">
+		<div class="exersices-analysis" v-show="exersicesType !== 'compose'">
 			<IconText :text="$t('evaluation.newExercise.repair')" :color="'#2892DD'" :icon="'md-link'" style="margin-bottom: 10px"></IconText>
-			<BaseRepair ref="childRepairRef" :repairs="relateFileList || []"></BaseRepair>
+			<BaseRepair ref="childRepairRef" :repairs="relateFileList"></BaseRepair>
 		</div>
 
 		<div class="save-wrap display-flex">
@@ -468,7 +468,6 @@
 				this.analysisEditor.txt.html(editItem.explain);
 				this.editInfo = JSON.parse(JSON.stringify(editItem));
 				this.exerciseField = this.editInfo.field - 1;
-				console.error('xxx',this.relateFileList)
 			},
 		},
 		mounted() {

+ 27 - 25
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseRepair.vue

@@ -89,9 +89,7 @@
 		props: {
 			rapairs: {
 				type: Array,
-				default: function() {
-					return []
-				}
+				default: () => []
 			}
 		},
 		data() {
@@ -342,29 +340,33 @@
 			rapairs: {
 				handler(val) {
 					console.error('接受到的repair', val)
-					/* 转换补救资源格式 根据描述 汇总分组 */
-					let namesArr = [...new Set(val.map(i => i.name))]
-					let result = []
-					namesArr.forEach(name => {
-						let urls = []
-						let type = ''
-						val.forEach(i => {
-							if (i.name === name) {
-								urls.push({
-									url: i.blobUrl
-								})
-								type = i.type
-							}
-						})
-						result.push({
-							name: name,
-							blobUrl: urls,
-							type: type
+					if(val && val.length){
+						/* 转换补救资源格式 根据描述 汇总分组 */
+						let namesArr = [...new Set(val.map(i => i.name))]
+						let result = []
+						namesArr.forEach(name => {
+							let urls = []
+							let type = ''
+							val.forEach(i => {
+								if (i.name === name) {
+									urls.push({
+										url: i.blobUrl
+									})
+									type = i.type
+								}
+							})
+							result.push({
+								name: name,
+								blobUrl: urls,
+								type: type
+							})
 						})
-					})
-					this.datas = result
-					this.siteDragList = this.datas.filter(i => i.type === 'file')
-				}
+						this.datas = result
+					}else{
+						this.datas =  []
+					}
+				},
+				deep:true
 			},
 		}
 	}

+ 3 - 0
TEAMModelOS/ClientApp/src/view/evaluation/index/CommonExercise.less

@@ -621,3 +621,6 @@
   background-color: rgb(0, 160, 220);
   color: rgb(255, 255, 255);
 }
+.hevue-imgpreview-wrap{
+	z-index: 1999;
+}

+ 1 - 1
TEAMModelOS/ClientApp/src/view/train/Create.vue

@@ -35,7 +35,7 @@
                         </Select>
                     </FormItem>
                     <FormItem :label="$t('train.create.hour')" prop="hour" style="margin-top:30px">
-                        <InputNumber :max="10" :min="1" style="width:100%" v-model="baseInfo.hour" :placeholder="$t('train.create.hourHolder')"></InputNumber>
+                        <InputNumber :min="1" style="width:100%" v-model="baseInfo.hour" :placeholder="$t('train.create.hourHolder')"></InputNumber>
                     </FormItem>
                     <FormItem :label="$t('train.create.target')" prop="target" style="margin-top:30px">
                         <Select v-model="baseInfo.target" multiple>

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

@@ -1306,6 +1306,7 @@ namespace TEAMModelOS.Controllers
                                 {
                                     id = account.GetProperty("id").GetString(),
                                     name = account.GetProperty("name").GetString(),
+                                    //schoolId = account.GetProperty("schoolId").GetString(),
                                     type = 2
                                 };
                                 students.Add(fo);
@@ -1531,7 +1532,7 @@ namespace TEAMModelOS.Controllers
                         }
                     }
                 }
-                var queryAnswers = $"select c.id,c.code,c.studentIds,c.subjectId,c.studentAnswers,c.studentScores,c.sum,c.mark,c.krate,c.frate from c where c.examId ='{id}' and array_contains(c.studentIds,'{studentId}') and c.pk = 'ExamClassResult' ";
+                var queryAnswers = $"select c.id,c.code,c.studentIds,c.subjectId,c.studentAnswers,c.studentScores,c.average,c.sum,c.mark,c.krate,c.frate from c where c.examId ='{id}' and array_contains(c.studentIds,'{studentId}') and c.pk = 'ExamClassResult' ";
                 List<ExamClassResult> answers = new List<ExamClassResult>();
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(queryText: queryAnswers,
                     requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"ExamClassResult-{school}") }))
@@ -3206,5 +3207,6 @@ namespace TEAMModelOS.Controllers
         public string id { get; set; }
         public string name { get; set; }
         public int type { get; set; }
+        public string schoolId { get; set; }
     }
 }