ソースを参照

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

liqk 4 年 前
コミット
af2d60e27f

+ 1 - 0
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseMyTable.vue

@@ -129,6 +129,7 @@
 
 			// 排序操作
 			onSortChange(data) {
+				console.log(JSON.stringify(this.tableDatas[0]))
 				console.log(data)
 				let order = data.order // 当前排序方式 升序、降序、正常
 				let key = data.key // 当前排序依据

+ 17 - 46
TEAMModelOS/ClientApp/src/view/knowledge-point/index/Index.vue

@@ -193,11 +193,9 @@ import { json } from 'd3'
 					code: ''
 				},
 				currentParams: {
-					//code: '',
 					subjectId: '',
 					school_code: '',
 					periodId: '',
-					//type: 0
 				},
 				drag: false,
 				isDragging: false,
@@ -252,7 +250,8 @@ import { json } from 'd3'
 				curDragPoint: null,
 				pointIndex: null,
 				pointDatas: {},
-                updated:false
+				updated: false,
+				setCount: false
 			}
 		},
 		components: {
@@ -264,13 +263,11 @@ import { json } from 'd3'
 		},
 		created() {
 			this.initSchoolData()
-			this.initBlockCount()
 		},
 		methods: {
 
 			/* 知识点拖动开始 */
 			onDragStart(item) {
-				console.log(item)
 				this.curDragPoint = item
 				this.isDragging = true
 			},
@@ -339,28 +336,6 @@ import { json } from 'd3'
 				this.isComposeBlock = true
 			},
 
-			/* 保存最新知识块内容 */
-			savePointAndBlock(pointItem) {
-				return new Promise((r, j) => {
-					pointItem.code = pointItem.code.replace('Knowledge-', '')
-					this.$api.knowledge.SaveOrUpdateKnowledge([pointItem]).then(res => {
-						if (!res.error && res.knowledges) {
-							this.curDragPoint = null
-							this.isLoading = false
-							this.checkedPointList = []
-							this.initBlockCount()
-                            this.$Message.success(this.$t('knowledge.success'))
-							r(200)
-						} else {
-                            this.isLoading = false
-						}
-					}).catch(err => {
-						j(err)
-                        this.$Message.warning(this.$t('knowledge.fail'))
-					})
-				})
-			},
-
 			// 获取当前学校学段学科等基本信息
 			initSchoolData() {
 				this.$store.dispatch('user/getSchoolProfile').then(res => {
@@ -371,7 +346,6 @@ import { json } from 'd3'
 						this.originData = schoolBaseInfo // 默认选择第一个
 						if (schoolBaseInfo.period.length) {
 							this.periodList = schoolBaseInfo.period
-							//this.currentParams.code = schoolBaseInfo.id
 							this.currentParams.school_code = schoolBaseInfo.id
 							this.currentParams.periodId = schoolBaseInfo.period[0].id
 							this.currentPeriodIndex = 0 // 默认选择第一个学段
@@ -383,6 +357,7 @@ import { json } from 'd3'
 
 			// 获取当前册别数量(每次都获取最新的数据)
 			initBlockCount() {
+				this.setCount = false
 				let params = {}
 					for (let data of this.subjectList) {
                         params[this.$store.state.userInfo.schoolCode + "-" + data.id] = this.periodList[this.currentPeriodIndex].id
@@ -390,6 +365,7 @@ import { json } from 'd3'
 					this.$api.syllabus.FindBlockCount(params).then(res => {
 						if (res.datas.length) {
 							this.$nextTick(() => {
+								this.setCount = true  //开始监听数据
 								this.blockCounts = res.datas
                                 this.schoolBlockCount = res.datas.map(i => i.countBlock)
 								this.privateBlockCount = res.datas.map(i => i.countBlock)
@@ -405,13 +381,11 @@ import { json } from 'd3'
                 let params = JSON.parse(JSON.stringify(this.currentParams))
                 params.type = 0
 				this.$api.knowledge.GetSchoolPoints(params).then(res => {
-					console.log(res.length)
                     if (res.length > 0) {
                         that.pointDatas = res
                         let list = res[0].blocks
                         this.blockList = list
                         this.originBlockList = JSON.parse(JSON.stringify(list))
-                        // this.handleBlockTap(0, list.length ? list[0] : null)
                         setTimeout(function () {
                             that.isLoadBlocks = false
                         }, 400)
@@ -442,15 +416,14 @@ import { json } from 'd3'
 			// 根据学科获取学科下所有知识点数据
 			getPointsData() {
 				let that = this
-				//this.currentParams.type = 1
 				this.$api.knowledge.GetSchoolPoints(this.currentParams).then(res => {
 					if (res.length) {
-						console.log(res)
 						this.pointList = res[0].points
 						this.originPointList = JSON.parse(JSON.stringify(res[0].points))
 						setTimeout(function () {
 							that.isLoadPoints = false
 						}, 800)
+                        this.updated = false
 					}
 				})
 			},
@@ -573,7 +546,6 @@ import { json } from 'd3'
 				this.editBlock = {}
 				this.isAddBlock = false // 关闭窗口
 				this.blockCounts = []
-				//this.initBlockCount()
 			},
 
 			// 添加知识点完成
@@ -593,7 +565,6 @@ import { json } from 'd3'
 				this.isEditPoint = false
 				setTimeout(function () {
 					that.isLoadPoints = false
-					//that.initBlockCount()
 				}, 400)
 			},
 			//查询当前关联的知识块数据
@@ -642,7 +613,6 @@ import { json } from 'd3'
 							this.handleBlockTap(0, this.blockList.length ? this.blockList[0] : null)
 							setTimeout(() => {
 								that.blockCounts = []
-								//that.initBlockCount()
 								that.isLoading = false
                                 that.$Message.success(this.$t('knowledge.delSuccess'))
 							}, 1000)
@@ -756,7 +726,6 @@ import { json } from 'd3'
 					this.activeBlockIndex = null
 					this.curBlockPoints = []
                     this.$Message.success(this.$t('knowledge.success'))
-					//this.initBlockCount()
 				}
 			},
 
@@ -811,21 +780,21 @@ import { json } from 'd3'
 				}
 			},
 			//保存修改后的数据
-			saveData() {
-                if (this.updated) {
+             saveData() {
+				 if (this.updated) {
+					this.setCount = false
                     let params = {}
                     params = this.pointDatas[0]
                     params.points = [...this.originPointList]
 					params.blocks = [...this.originBlockList]
-                    console.log(params)
                     this.$api.knowledge.SaveOrUpdateKnowledge(params).then(res => {
-                        if (res) {
+						if (res) {
                             this.$Message.success(this.$t('knowledge.saveSuccess'))
 							this.getPointsData()
-							this.initBlockCount()
+							//this.initBlockCount()
                         } else {
                             this.$Message.warning(this.$t('knowledge.saveFail'))
-                        }
+						}
                     }).catch(err => {
                         this.$Message.error(this.$t('knowledge.saveFail'))
                         this.isLoadBlocks = false
@@ -845,14 +814,16 @@ import { json } from 'd3'
 		watch: {
             originBlockList: {
 				handler(newValue, oldValue) {
-					//console.log(newValue)
-					this.updated = true
+					if (this.setCount) {
+						this.updated = true
+                    }
                 }
 			},
             originPointList: {
 				handler(newValue, oldValue) {
-					//console.log(newValue)
-					this.updated = true
+					if (this.setCount) {
+						this.updated = true
+                    }
                 }
             },
 		},

+ 2 - 15
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/AchievementAnalysis/EarlyWarning.vue

@@ -1,15 +1,5 @@
 <template>
 	<div class="achievement-container">
-		<!--        <Row>
-            <span class="class-info">
-                <Icon type="ios-ribbon" />{{$t('totalAnalysis.ach_text10')}}: <span style="color:#0bdfc4;font-size:16px;margin-right:20px"> {{className}} </span> {{$t('totalAnalysis.ach_text11')}}  <span style="color:#0bdfc4;font-size:20px"> {{ tableData.length }} </span>
-                <span class="class-info-back">
-                    <Button type="primary" @click="goBack">
-                        {{$t('totalAnalysis.ach_text12')}}
-                    </Button>
-                </span>
-            </span>
-        </Row> -->
 		<Row>
 			<span class="component-title" style="margin-top:40px">{{ this.$t('totalAnalysis.classBaseInfo') }}</span>
 		</Row>
@@ -239,16 +229,13 @@
 						itemsColumns.push({
 							title: '题目' + (index + 1),
 							key: 's' + (index + 1),
-							render:null,
-							sortable: "custom",
 							minWidth:100
 						})
 					})
 					this.earlyPercentColumns.splice(5,this.earlyPercentColumns.length - 5,...itemsColumns)
+				}else{
+					this.earlyPercentColumns.splice(5,this.earlyPercentColumns.length - 5)
 				}
-				console.log(this.earlyPercentColumns)
-				
-				
 				return result
 			},
 			

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

@@ -9,7 +9,7 @@
 						<Icon type="ios-arrow-up" />
 					</div>
 					<!--<Spin fix v-show="contentLoading"></Spin>-->
-					<Loading :top="400" :borderWidth="4" :borderTopWidth="8" v-show="contentLoading" type="2"></Loading>
+					<Loading :top="400" :borderWidth="4" :borderTopWidth="8" v-show="contentLoading"></Loading>
 
 					<div class="basic-info" v-if="!isShowEvaluations && currentExamItem.name">
 						<p style="display: flex;align-items: center;">

+ 1 - 1
TEAMModelOS/Controllers/Analysis/AnalysisController.cs

@@ -139,7 +139,7 @@ namespace TEAMModelOS.Controllers.Analysis
                 //获取本次评测所有科目结算结果
                 info = await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<ExamInfo>(id.ToString(), new PartitionKey($"Exam-{code}"));
                 School school = await client.GetContainer("TEAMModelOS", "School").ReadItemAsync<School>(code.ToString(), new PartitionKey($"Base"));
-                var query = $"select c.id,c.name,c.subjectId,c.studentScores,c.studentIds,c.paper,c.classes,c.sRate,c.average,c.standard,c.lostStus from c where c.examId =  '{id}' ";
+                var query = $"select c.id,c.name,c.subjectId,c.studentScores,c.studentIds,c.paper,c.classes,c.sRate,c.average,c.standard,c.lostStus,c.record from c where c.examId =  '{id}' ";
                 await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryIterator<ExamResult>(queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"ExamResult-{id}") }))
                 {
                     examResults.Add(item);