Selaa lähdekoodia

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

zhouj1203@hotmail.com 3 vuotta sitten
vanhempi
commit
3db402383f

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/SheetConfig.cs

@@ -66,6 +66,7 @@ namespace TEAMModelOS.SDK.Models.Cosmos.Common
     }
     public class ConfigContent
     {
+        public string index { get; set; }
         public int count { get; set; }
         public int type { get; set; }
         public int x { get; set; }

+ 4 - 1
TEAMModelOS/ClientApp/src/common/BaseClassSelect.vue

@@ -84,7 +84,10 @@
 			}
 		},
 		mounted() {
-			console.log(this.classes);
+			this.$EventBus.$off('onCreateVote')
+			this.$EventBus.$on('onCreateVote',() => {
+				this.defaultArr = []
+			})
 		},
 		computed: {
 			csOptions() {

+ 220 - 210
TEAMModelOS/ClientApp/src/common/BaseClassSelectPri.vue

@@ -1,218 +1,228 @@
 <template>
-	<div class="base-class-select dark-el-cascader">
-		<RadioGroup v-model="evaluationInfo.scope" @on-change="onClassTypeChange" style="margin-bottom: 10px;">
-			<Radio label="private">{{ $t('survey.form.privateClass') }}</Radio>
-			<Radio label="school">{{ $t('survey.form.schoolClass') }}</Radio>
-		</RadioGroup>
-		<el-cascader :props="props" :options="curCusList" @change="treeChange" :show-all-levels="false" clearable
-			filterable></el-cascader>
-	</div>
+    <div class="base-class-select dark-el-cascader">
+        <RadioGroup v-model="evaluationInfo.scope" @on-change="onClassTypeChange" style="margin-bottom: 10px;">
+            <Radio label="private">{{ $t('survey.form.privateClass') }}</Radio>
+            <Radio label="school">{{ $t('survey.form.schoolClass') }}</Radio>
+        </RadioGroup>
+        <el-cascader :props="props" :options="curCusList" @change="treeChange" :show-all-levels="false" clearable filterable></el-cascader>
+    </div>
 </template>
 
 <script>
-	export default {
-		props:{
-			scope:{
-				type:String,
-				default:'school'
-			}
-		},
-		data() {
-			const _this = this
-			return {
-				schoolBase: {
-				    period: []
-				},
-				courseList:[],
-				stuList:[],
-				schoolClassList:[],
-				classes: [],
-				evaluationInfo:{
-					scope:'school'
-				},
-				props: {
-				    multiple: true,
-				    lazy: true,
-				    lazyLoad(node, resolve) {
-				        const { level } = node
-				        let scope = _this.evaluationInfo.scope
-				        // 一级菜单首次加载
-				        if (level == 0 && _this.courseList.length == 0) {
-				            let requestData = {
-				                'code': _this.$store.state.userInfo.TEAMModelId,
-				                'schoolId': _this.$store.state.userInfo.schoolCode,
-				                'scope': 'private'
-				            }
-				            _this.$api.courseMgmt.findCourse(requestData).then(
-				                (res) => {
-				                    if (res.error) {
-				                        _this.$Message.error('API ERROR!')
-				                        return
-				                    }
-				                    _this.courseList = res.courses
-				                    let scope = _this.evaluationInfo.scope
-				                    let curCus = _this.courseList.filter(item => {
-				                        return item.scope == scope
-				                    })
-				                    let nodes = curCus.map(item => {
-				                        return {
-				                            value: item.id,
-				                            label: item.name,
-				                            leaf: level >= 1
-				                        }
-				                    })
-				                    resolve(nodes)
-				                },
-				                (err) => {
-				                    _this.$Message.error('API ERROR!')
-				                }
-				            )
-				        }
-				        // 一级菜单非首次加载
-				        else if (level == 0 && _this.courseList.length > 0) {
-				            let curCus = _this.courseList.filter(item => {
-				                return item.scope == scope
-				            })
-				            let nodes = curCus.map(item => {
-				                return {
-				                    value: item.id,
-				                    label: item.name,
-				                    leaf: true
-				                }
-				            })
-				            resolve(nodes)
-				        }
-				        // 加载二级菜单
-				        else if (level == 1) {
-				            console.log(node)
-				            let course = node.data
-				            let requestData = {
-				                'code': scope == 'school' ? _this.$store.state.userInfo.schoolCode : _this.$store.state.userInfo.TEAMModelId,
-				                'scope': scope,
-				                'id': course.value
-				            }
-				            _this.$api.courseMgmt.findCusInfo(requestData).then(
-				                async (res) => {
-				                    if (res.error) {
-				                        resolve([])
-				                        return
-				                    }
-				                    // 获取自定义名单信息
-				                    let ids = res.courses[0].schedule.map(item => {
-				                        return item.stulist
-				                    })
-				                    for (let i = 0; i < ids.length; i++) {
-				                        if (!ids[i]) {
-				                            ids.splice(i, 1)
-				                            i--
-				                        }
-				                    }
-				                    if (ids.length) {
-				                        try {
-				                            let listRes = await _this.getListInfo([...ids])
-				                            if (listRes) _this.stuList.push(...listRes.stuList)
-				                        } catch (e) {
-											console.log(e)
-				                            _this.$Message.error('API error')
-				                        }
-				                    }
-				
-				                    if (res.courses && res.courses.length > 0) {
-				                        res.courses[0].schedule = res.courses[0].schedule ? res.courses[0].schedule : []
-				                        res.courses[0].schedule.forEach(item => {
-				                            // 补充教室信息
-				                            if (item.classId) {
-				                                let classInfo = _this.schoolClassList.find(classItem => {
-				                                    return classItem.id == item.classId
-				                                })
-				                                item.classInfo = {
-				                                    id: item.classId,
-				                                    name: classInfo ? `${classInfo.name}` : ' - -'
-				                                }
-				                            }
-				                            // 补充名单信息
-				                            if (item.stulist) {
-				                                let listInfo = _this.stuList.find(listItem => {
-				                                    return listItem.id == item.stulist
-				                                })
-				                                item.listName = listInfo ? `${listInfo.name}` : ' - -'
-				                            }
-				                        })
-				                    }
-				                    let schedule = res.courses[0].schedule.filter(item => {
-				                        return item.teacherId == _this.$store.state.userInfo.TEAMModelId && (item.stulist || item.classId)
-				                    })
-				                    let nodes = schedule.map(item => {
-				                        return {
-				                            value: item.stulist || item.classId,
-				                            label: item.listName || item.classInfo.name,
-				                            leaf: level >= 1
-				                        }
-				                    })
-				                    resolve(nodes)
-				                }
-				            )
-				        } else {
-				            resolve([])
-				        }
-				    }
-				},
-			};
-		},
-		methods: {
-			treeChange(data) {
-				let classIds = data.map(i => i[i.length - 1])
-				this.classes = classIds
-				this.$emit('onChange', classIds)
-			},
-			onClassTypeChange(val){
-				this.evaluationInfo.scope = val
-			},
-			//根据id获取stulist信息
-			getListInfo(ids) {
-			    let requestData = {
-			        'code': this.evaluationInfo.scope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
-			        'scope': this.evaluationInfo.scope,
-			        'ids': ids
-			    }
-			    return this.$api.courseMgmt.findListSummary(requestData)
-			},
-		},
-		mounted() {
-			this.$store.dispatch('user/getSchoolProfile').then(
-			    res => {
-			        this.schoolBase = res.school_base
-			        this.schoolClassList = res.school_classes
-			    }
-			)
-		},
-		computed: {
-			curCusList() {
-			    let cus = this.courseList.filter(item => {
-			        return item.scope == this.evaluationInfo.scope
-			    })
-			    let nodes = cus.map(item => {
-			        return {
-			            value: item.id,
-			            label: item.name,
-			            leaf: false
-			        }
-			    })
-			    return nodes
-			},
-		}
-	};
+export default {
+    props: {
+        scope: {
+            type: String,
+            default: 'school'
+        }
+    },
+    data() {
+        const _this = this
+        return {
+            schoolBase: {
+                period: []
+            },
+            courseList: [],
+            stuList: [],
+            schoolClassList: [],
+            classes: [],
+            evaluationInfo: {
+                scope: 'school'
+            },
+            props: {
+                multiple: true,
+                lazy: true,
+                lazyLoad(node, resolve) {
+                    const { level } = node
+                    let scope = _this.evaluationInfo.scope
+                    // 一级菜单首次加载
+                    if (level == 0 && _this.courseList.length == 0) {
+                        let requestData = {
+                            'code': _this.$store.state.userInfo.TEAMModelId,
+                            'schoolId': _this.$store.state.userInfo.schoolCode,
+                            'scope': 'private'
+                        }
+                        _this.$api.courseMgmt.findCourse(requestData).then(
+                            (res) => {
+                                if (res.error) {
+                                    _this.$Message.error('API ERROR!')
+                                    return
+                                }
+                                _this.courseList = res.courses
+                                let scope = _this.evaluationInfo.scope
+                                let curCus = _this.courseList.filter(item => {
+                                    return item.scope == scope
+                                })
+                                let nodes = curCus.map(item => {
+                                    return {
+                                        value: item.id,
+                                        label: item.name,
+                                        leaf: level >= 1
+                                    }
+                                })
+                                resolve(nodes)
+                            },
+                            (err) => {
+                                _this.$Message.error('API ERROR!')
+                            }
+                        )
+                    }
+                    // 一级菜单非首次加载
+                    else if (level == 0 && _this.courseList.length > 0) {
+                        let curCus = _this.courseList.filter(item => {
+                            return item.scope == scope
+                        })
+                        let nodes = curCus.map(item => {
+                            return {
+                                value: item.id,
+                                label: item.name,
+                                leaf: true
+                            }
+                        })
+                        resolve(nodes)
+                    }
+                    // 加载二级菜单
+                    else if (level == 1) {
+                        console.log(node)
+                        let course = node.data
+                        let requestData = {
+                            'code': scope == 'school' ? _this.$store.state.userInfo.schoolCode : _this.$store.state.userInfo.TEAMModelId,
+                            'scope': scope,
+                            'id': course.value
+                        }
+                        _this.$api.courseMgmt.findCusInfo(requestData).then(
+                            async (res) => {
+                                if (res.error) {
+                                    resolve([])
+                                    return
+                                }
+                                // 获取自定义名单信息
+                                let ids = res.courses[0].schedule.map(item => {
+                                    return item.stulist
+                                })
+                                for (let i = 0; i < ids.length; i++) {
+                                    if (!ids[i]) {
+                                        ids.splice(i, 1)
+                                        i--
+                                    }
+                                }
+                                if (ids.length) {
+                                    try {
+                                        let listRes = await _this.getListInfo([...ids])
+                                        if (listRes) _this.stuList.push(...listRes.stuList)
+                                    } catch (e) {
+                                        console.log(e)
+                                        _this.$Message.error('API error')
+                                    }
+                                }
+                                //一个名单被安排到不同教室上课会出现重复数据,这里需要去重
+                                let list = []
+                                if (res.courses && res.courses.length > 0) {
+                                    res.courses[0].schedule = res.courses[0].schedule ? res.courses[0].schedule : []
+                                    res.courses[0].schedule.forEach(item => {
+                                        // 补充教室信息
+                                        if (item.classId) {
+                                            let classInfo = _this.schoolClassList.find(classItem => {
+                                                return classItem.id == item.classId
+                                            })
+                                            item.classInfo = {
+                                                id: item.classId,
+                                                name: classInfo ? `${classInfo.name}` : ' - -'
+                                            }
+                                        }
+                                        // 补充名单信息
+                                        if (item.stulist) {
+                                            let listInfo = _this.stuList.find(listItem => {
+                                                return listItem.id == item.stulist
+                                            })
+                                            item.listName = listInfo ? `${listInfo.name}` : ' - -'
+                                        }
+                                        //统一数据格式
+                                        item.classId = item.classId || undefined
+                                        item.stulist = item.stulist || undefined
+                                        // 一个名单被安排到不同教室上课会出现重复数据,这里做去重操作
+                                        let has = list.find(listItem => {
+                                            return listItem.classId == item.classId && item.stulist == listItem.stulist
+                                        })
+                                        if (!has) {
+                                            list.push(item)
+                                        }
+                                    })
+                                    res.courses[0].teaClasses = list.filter(item => {
+                                        return item.classId || item.stulist
+                                    })
+                                }
+
+                                let nodes = res.courses[0].teaClasses.map(item => {
+                                    return {
+                                        value: item.stulist || item.classId,
+                                        label: item.listName || item.classInfo.name,
+                                        leaf: level >= 1
+                                    }
+                                })
+                                resolve(nodes)
+                            }
+                        )
+                    } else {
+                        resolve([])
+                    }
+                }
+            },
+        };
+    },
+    methods: {
+        treeChange(data) {
+            let classIds = data.map(i => i[i.length - 1])
+            this.classes = classIds
+            this.$emit('onChange', classIds)
+        },
+        onClassTypeChange(val) {
+            this.evaluationInfo.scope = val
+        },
+        //根据id获取stulist信息
+        getListInfo(ids) {
+            let requestData = {
+                'code': this.evaluationInfo.scope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
+                'scope': this.evaluationInfo.scope,
+                'ids': ids
+            }
+            return this.$api.courseMgmt.findListSummary(requestData)
+        },
+    },
+    mounted() {
+        this.$store.dispatch('user/getSchoolProfile').then(
+            res => {
+                this.schoolBase = res.school_base
+                this.schoolClassList = res.school_classes
+            }
+        )
+    },
+    computed: {
+        curCusList() {
+            let cus = this.courseList.filter(item => {
+                return item.scope == this.evaluationInfo.scope
+            })
+            let nodes = cus.map(item => {
+                return {
+                    value: item.id,
+                    label: item.name,
+                    leaf: false
+                }
+            })
+            return nodes
+        },
+    }
+};
 </script>
 <style lang="less">
-	.base-class-select {
-		.el-cascader {
-			width: 100%;
-
-			.el-input__inner {
-				background-color: #353535;
-				border: none;
-			}
-		}
+.base-class-select {
+    .el-cascader {
+        width: 100%;
 
-	}
+        .el-input__inner {
+            background-color: #353535;
+            border: none;
+        }
+    }
+}
 </style>

+ 5 - 5
TEAMModelOS/ClientApp/src/components/questionnaire/BaseQnForm.vue

@@ -20,7 +20,7 @@
 						:key="index">{{ item.name }}</Option>
 				</Select> -->
 				<div v-else>
-					<BaseClassSelect :classes="qnForm.classes" @onChange="onTargetChange" v-if="getCurScope === 'school'"></BaseClassSelect>
+					<BaseClassSelect :classes="classNameArr" @onChange="onTargetChange" v-if="getCurScope === 'school'"></BaseClassSelect>
 					<BaseClassSelectPri @onChange="onTargetChange" v-else></BaseClassSelectPri>
 				</div>
 			</FormItem>
@@ -326,10 +326,10 @@
 				this.currentState = item.state
 				this.$nextTick(() => {
 					this.curQnItem = JSON.parse(JSON.stringify(item))
-					if (item.classes.length) {
-						let isExist = this.classRooms.filter(i => i.id === item.classes[0])
-						this.classType = isExist ? isExist[0].scope : 'private'
-					}
+					// if (item.classes.length) {
+					// 	let isExist = this.classRooms.filter(i => i.id === item.classes[0])
+					// 	this.classType = isExist ? isExist[0].scope : 'private'
+					// }
 				})
 				this.descriptionEditor.txt.html(item.description)
 			},

+ 1 - 1
TEAMModelOS/ClientApp/src/locale/lang/en-US/cusMgt.js

@@ -7,7 +7,7 @@ export default {
     editCus:'编辑课程',
     noTeacher:'暂无',
     cusName:'课程名称',
-    nameHolder:'请输入课程名称',
+    cNameHolder:'请输入课程名称',
     cusCode:'课程编码',
     codeHolder:'请输入课程编码',
     cusPd:'课程学段',

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

@@ -7,7 +7,7 @@ export default {
     editCus:'编辑课程',
     noTeacher:'暂无',
     cusName:'课程名称',
-    nameHolder:'请输入课程名称',
+    cNameHolder:'请输入课程名称',
     cusCode:'课程编码',
     codeHolder:'请输入课程编码',
     cusPd:'课程学段',

+ 1 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/cusMgt.js

@@ -7,7 +7,7 @@ export default {
     editCus: '編輯課程',
     noTeacher: '暫無',
     cusName: '課程名稱',
-    nameHolder: '請輸入課程名稱',
+    cNameHolder: '請輸入課程名稱',
     cusCode: '課程編碼',
     codeHolder: '請輸入課程編碼',
     cusPd: '課程學制',

+ 24 - 0
TEAMModelOS/ClientApp/src/store/module/answerSheet.js

@@ -68,6 +68,7 @@ export default {
 		config: {
 			"id":null,
 			"columns": null, //列数
+			"pageCount": 1,
 
 			"pageWidth": PAPER_W - (ANCHORPROP.gapX - 5) * 2, //页面大小(回字组成的)
 			"pageHeight": PAPER_H - (ANCHORPROP.gapY - 5) * 2 , //页面大小(回字组成的)
@@ -104,6 +105,12 @@ export default {
 		},
 		// 设置信息填写区域的配置数据
 		setInfoConfig(state, val) {
+			val.index = state.config.contents.filter(i => i.pageNum === val.pageNum && !i.isFix).length + ''
+			val.x = Number(val.x.toFixed())
+			val.y = Number(val.y.toFixed())
+			val.width = Number(val.width.toFixed())
+			val.height = Number(val.height.toFixed())
+			val.count = 0
 			if(state.config.contents.length){
 				let infoItem = state.config.contents.find(i => i.type === 0)
 				if(infoItem){
@@ -117,6 +124,11 @@ export default {
 		},
 		// 设置客观题区域的配置数据
 		setObjectiveConfig(state,val){
+			val.index = state.config.contents.filter(i => i.pageNum === val.pageNum && !i.isFix).length + ''
+			val.x = Number(val.x.toFixed())
+			val.y = Number(val.y.toFixed())
+			val.width = Number(val.width.toFixed())
+			val.height = Number(val.height.toFixed())
 			if(state.config.contents.length){
 				let infoItem = state.config.contents.find(i => i.type === 1)
 				if(infoItem){
@@ -130,11 +142,23 @@ export default {
 			}
 		},
 		setSubjectiveConfig(state,val){
+			console.log(val.id,val.pageNum)
+			if(val.isFix){
+				val.index = null
+			}else{
+				val.index = state.config.contents.filter(i => i.pageNum === val.pageNum && !i.isFix).length + ''
+			}
+			val.x = Number(val.x.toFixed())
+			val.y = Number(val.y.toFixed())
+			val.width = Number(val.width.toFixed())
+			val.height = Number(val.height.toFixed())
+			val.count = 0
 			if(state.config.contents.length){
 				let infoItem = state.config.contents.find(i => i.id === val.id)
 				if(infoItem && !val.isFix){
 					infoItem.height= val.height
 					infoItem.y= val.y
+					infoItem.pageNum = val.pageNum
 				}else{
 					state.config.contents.push(val)
 				}

+ 3 - 1
TEAMModelOS/ClientApp/src/view/answersheet/BaseEditor.vue

@@ -363,6 +363,7 @@
 						newContent = addStr + allHtml
 						this.myEditor.txt.html(newContent);
 					}
+					// this.myEditor.txt.append(this.curItemId);
 					this.pArr = Array.from(editorDom.getElementsByTagName('p'))
 					let scrollHeight = editorDom.scrollHeight
 					setTimeout(() => {
@@ -376,7 +377,8 @@
 						let leftHeight = paperH - curEditorY - lastBottomGap - SVG_BORDER_MB;
 						let fixHeight = curEditorH - leftHeight + 20
 						let curItemWhichPage = this.$store.state.answerSheet.pages
-						// console.log(itemOrder, '距离第一页顶点的Y', Y);
+						if(rectTop === 0) return
+						// console.log(itemOrder, '在第几页', curItemWhichPage,rectTop);
 						// if(itemOrder === 6){
 							// console.log(itemOrder, 'rectTop', rectTop);
 							// console.log(itemOrder, 'scrollDis', scrollDis);

+ 2 - 1
TEAMModelOS/ClientApp/src/view/answersheet/SheetObjective.vue

@@ -88,7 +88,8 @@
 					"height": this.anchorRectY + 20,
 					"pageNum": 1,
 					"vblockCount": this.objectiveItems.length > this.number ? this.number * this.blockList.length : this.objectiveItems.length,
-					"hblockCount": 28
+					"hblockCount": 28,
+					"count": this.objectiveItems.length
 				}
 				console.log(objectiveConfig);
 				this.$store.commit('setObjectiveConfig', objectiveConfig)

+ 6 - 3
TEAMModelOS/ClientApp/src/view/answersheet/index.vue

@@ -1,9 +1,9 @@
 <template>
 	<div class="sheet-wrap animated fadeIn">
-		<Spin v-if="isLoading" fix>
+		<!-- <Spin v-if="isLoading" fix>
 			 <Icon type="ios-loading" size=18 class="demo-spin-icon-load"></Icon>
 			 <div>{{ $t('answerSheet.loading') }}</div>
-		</Spin>
+		</Spin> -->
 		<div class="sheet-left">
 			<div class="sheet-container" id="pdfDom" v-if="isRender">
 				<!-- <router-view  v-if="isRouterAlive"/> -->
@@ -37,7 +37,7 @@
 		</div>
 		<div class="sheet-right">
 			<Button @click="goBack">{{ $t('answerSheet.back') }}</Button>
-			<Button @click="doDownload" class="btn-download" v-if="curPaper.id">{{ $t('answerSheet.print') }}</Button>
+			<Button @click="doDownload" class="btn-download" v-if="curPaper.id" :loading="isLoading">{{ !isLoading ? $t('answerSheet.print') : $t('answerSheet.loading') }}</Button>
 			<div>
 				<!-- <p class="sheet-right-title">基础设置</p>
 				<div>
@@ -332,6 +332,9 @@
 					if(paperInfo.sheet){
 						configParams.id = paperInfo.sheet
 					}
+					configParams.pageHeight = Number(configParams.pageHeight.toFixed())
+					configParams.pageWidth = Number(configParams.pageWidth.toFixed())
+					configParams.pageCount = this.$store.state.answerSheet.pages
 					configParams.code = curCode.replace('Paper-','')
 					configParams.school = curScope === 'school' ? this.$store.state.userInfo.schoolCode : ''
 					configParams.scope = curScope

+ 20 - 7
TEAMModelOS/ClientApp/src/view/learnactivity/CreatePrivEva.vue

@@ -184,6 +184,8 @@ export default {
 
                                 if (res.courses && res.courses.length > 0) {
                                     res.courses[0].schedule = res.courses[0].schedule ? res.courses[0].schedule : []
+                                    //一个名单被安排到不同教室上课会出现重复数据,这里需要去重
+                                    let list = []
                                     res.courses[0].schedule.forEach(item => {
                                         // 补充教室信息
                                         if (item.classId) {
@@ -192,7 +194,7 @@ export default {
                                             })
                                             item.classInfo = {
                                                 id: item.classId,
-                                                name: classInfo ? `${classInfo.name}` : ' - -'
+                                                name: classInfo ? classInfo.name : '(此班已被删除)'
                                             }
                                         }
                                         // 补充名单信息
@@ -200,14 +202,25 @@ export default {
                                             let listInfo = _this.stuList.find(listItem => {
                                                 return listItem.id == item.stulist
                                             })
-                                            item.listName = listInfo ? `${listInfo.name}` : ' - -'
+                                            item.listName = listInfo ? listInfo.name : '(名单已被删除)'
+                                        }
+                                        //统一数据格式
+                                        item.classId = item.classId || undefined
+                                        item.stulist = item.stulist || undefined
+                                        // 一个名单被安排到不同教室上课会出现重复数据,这里做去重操作
+                                        let has = list.find(listItem => {
+                                            return listItem.classId == item.classId && item.stulist == listItem.stulist
+                                        })
+                                        if (!has) {
+                                            list.push(item)
                                         }
                                     })
+
+                                    res.courses[0].teaClasses = list.filter(item => {
+                                        return item.classId || item.stulist
+                                    })
                                 }
-                                let schedule = res.courses[0].schedule.filter(item => {
-                                    return item.teacherId == _this.$store.state.userInfo.TEAMModelId && (item.stulist || item.classId)
-                                })
-                                let nodes = schedule.map(item => {
+                                let nodes = res.courses[0].teaClasses.map(item => {
                                     return {
                                         value: item.stulist || item.classId,
                                         label: item.listName || item.classInfo.name,
@@ -294,7 +307,7 @@ export default {
             mode: '',
             selectBefore: [],
             stuList: [],
-			showBack:false
+            showBack: false
         }
     },
     methods: {

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

@@ -41,6 +41,9 @@
                             <span style="color:#2db7f5;" v-else>{{row.data[qIndex]}}</span>
                         </div>
                     </template>
+                    <template slot-scope="{ row }" slot="total">
+                        <span style="color:#2db7f5;">{{ getTotalScore(row.data)}}</span>
+                    </template>
                     <!-- 1: 未作答 2:未评分 3:已评分 -->
                     <template slot-scope="{ row,index }" slot="status">
                         <span class="stu-status-tag" @click="getStuScore(row,0)" :style="{'background':row.status == 1 ? '#c5c8ce' : row.status == 2 ? '#ff9900' : '#19be6b', 'cursor':row.status == 1 ? 'text':'pointer'}">
@@ -117,7 +120,7 @@ export default {
                 },
                 {
                     title: this.$t('learnActivity.score.column2'),
-                    key: "total",
+                    slot: "total",
                     align: "center",
                     sortable: true,
                     fixed: "right",
@@ -140,6 +143,13 @@ export default {
         }
     },
     methods: {
+        getTotalScore(data) {
+            return data.reduce((prev, curr, idx, arr) => {
+                prev = prev < 0 ? 0 : prev
+                curr = curr < 0 ? 0 : curr
+                return prev + curr
+            })
+        },
         // 排序操作
         onSortChange(data) {
             let order = data.order // 当前排序方式 升序、降序、正常
@@ -170,6 +180,7 @@ export default {
             let end = this.pageSize * page
             this.currentPage = page
             this.tableData = this.studentScore.slice(start, end)
+            console.log('表格数据', this.tableData)
         },
         toggleScoreStatus() {
             this.$refs['paperScore'].isComplete = false
@@ -368,7 +379,7 @@ export default {
                 (res) => {
                     if (res.examClassResults) {
                         this.paperInfo[this.chooseClass]["studentAns"] = res.examClassResults[0];
-                        this.setTableData();
+                        this.setTableData()
                         if (res.examClassResults[0]) {
                             this.calcOverView(res.examClassResults[0])
                         }

+ 23 - 15
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue

@@ -1024,7 +1024,7 @@ export default {
                 }
                 clientId = this.$store.state.config.China.clientID
             }
-            let state = this.$jsFn.getBtwRandom(1000,9999)
+            let state = this.$jsFn.getBtwRandom(1000, 9999)
             let idToken = localStorage.getItem('id_token')
             let tokenData = jwtDecode(idToken)
             let nonce = tokenData ? tokenData.nonce : ''
@@ -1309,7 +1309,7 @@ export default {
                     if (!res.error) {
                         if (res.courses && res.courses.length > 0) {
                             res.courses[0].schedule = res.courses[0].schedule ? res.courses[0].schedule : []
-                            //过滤当前教师的schedule 因为一个名单被安排到不同教室上课会出现重复数据,这里需要去重
+                            //过滤当前教师的schedule 
                             res.courses[0].schedule = res.courses[0].schedule.filter(item => {
                                 return item.teacherId == this.$store.state.userInfo.TEAMModelId
                             })
@@ -1350,6 +1350,8 @@ export default {
                                     this.$Message.error('API ERROR')
                                 }
                             }
+                            //一个名单被安排到不同教室上课会出现重复数据,这里需要去重
+                            let list = []
 
                             res.courses[0].schedule.forEach(item => {
                                 //补充教室信息
@@ -1359,12 +1361,11 @@ export default {
                                     })
                                     item.classInfo = {
                                         id: item.classId,
-                                        name: classInfo ? classInfo.name : '--'
+                                        name: classInfo ? classInfo.name : '(此班已被删除)'
                                     }
                                     //根据上面查看班级学生的返回结果补充学生名单
                                     if (classStus && classStus.stus) {
                                         classStus.stus.forEach(stuItem => {
-                                            console.log('填充学生数据')
                                             if (stuItem.length > 0 && stuItem[0].classId == item.classId) {
                                                 item.students = stuItem
                                                 item.fullStu = true
@@ -1378,18 +1379,25 @@ export default {
                                     let listInfo = this.stuList.find(listItem => {
                                         return listItem.id == item.stulist
                                     })
-                                    item.listName = listInfo ? listInfo.name : '--'
+                                    item.listName = listInfo ? listInfo.name : '(名单已被删除)'
                                     item.students = listInfo ? listInfo.students : []
                                     item.fullStu = false
                                 }
+                                //统一数据格式
+                                item.classId = item.classId || undefined
+                                item.stulist = item.stulist || undefined
+                                // 一个名单被安排到不同教室上课会出现重复数据,这里做去重操作
+                                let has = list.find(listItem => {
+                                    return listItem.classId == item.classId && item.stulist == listItem.stulist
+                                })
+                                if (!has) {
+                                    list.push(item)
+                                }
                             })
+                            res.courses[0].teaClasses = list
                         }
                         this.$set(this.courseListShow, this.curCusIndex, res.courses[0])
-                        console.log(this.courseListShow[this.curCusIndex])
                         this.changeClassroom(0)
-                        // if (sessionStorage.getItem('myCusTabName') && sessionStorage.getItem('myCusTabName') != 'record') {
-                        //     this.selectTab(sessionStorage.getItem('myCusTabName'))
-                        // }
                     }
                 }
             ).finally(() => {
@@ -1476,13 +1484,13 @@ export default {
                 return true
             }
         },
-        //课程名单 —— schedule
+        //课程名单 —— 去重处理后的数据
         teaClassList() {
-            if (this.courseListShow.length > 0 && this.courseListShow[this.curCusIndex] && this.courseListShow[this.curCusIndex].schedule) {
-                let list = this.courseListShow[this.curCusIndex].schedule.filter(item => {
-                    return item.teacherId == this.$store.state.userInfo.TEAMModelId && (item.classId || item.stulist)
-                })
-                return list
+            if (this.courseListShow.length > 0 && this.courseListShow[this.curCusIndex]) {
+                // let list = this.courseListShow[this.curCusIndex].schedule.filter(item => {
+                //     return item.teacherId == this.$store.state.userInfo.TEAMModelId && (item.classId || item.stulist)
+                // })
+                return this.courseListShow[this.curCusIndex].teaClasses || []
             } else {
                 return []
             }

+ 55 - 26
TEAMModelOS/ClientApp/src/view/newcourse/NewCusMgt.vue

@@ -216,12 +216,12 @@
             </div>
         </Split>
         <!-- 添加课程表单 -->
-        <Modal v-model="addCourseStatus" :title="actionType == 0 ? $t('cusMgt.addCus'):$t('cusMgt.editCus')" class-name="dark-iview-form dark-iview-modal" @on-ok="addCourse">
+        <Modal v-model="addCourseStatus" :title="actionType == 0 ? $t('cusMgt.addCus'):$t('cusMgt.editCus')" class-name="dark-iview-form dark-iview-modal" @on-ok="addCourse" :loading="modalLoading">
             <Form ref="courseBaseInfo" :model="courseBaseInfo" :rules="courseBaseValidate" label-position="right" label-colon :label-width="100">
                 <FormItem :label="$t('cusMgt.cusName')" prop="name">
-                    <Input v-model="courseBaseInfo.name" :placeholder="$t('cusMgt.nameHolder')"></Input>
+                    <Input v-model="courseBaseInfo.name" :placeholder="$t('cusMgt.cNameHolder')"></Input>
                 </FormItem>
-                <FormItem :label="$t('cusMgt.cusCode')">
+                <FormItem :label="$t('cusMgt.cusCode')" prop="no">
                     <Input v-model="courseBaseInfo.no" :placeholder="$t('cusMgt.codeHolder')"></Input>
                 </FormItem>
                 <FormItem :label="$t('cusMgt.cusPd')" prop="period.id">
@@ -260,17 +260,47 @@ export default {
         PersonalPhoto, TimeSetting, TeaTable, StudentList
     },
     data() {
-        // 验证只能是字母和数字
+        let _this = this
+        // 验证课程编码
         const validateCode = (rule, value, callback) => {
-            if (!value) {
-                return callback(new Error(this.$t('cusMgt.codeErr1')))
-            }
+            //验证编码不能为空(调整为非必填,去掉)
+            // if (!value) {
+            //     callback(new Error(this.$t('cusMgt.codeErr1')))
+            // }
+            //验证编码只能包括数字
             let zg = /^[0-9a-zA-Z]+$/
-            if (zg.test(value)) {
-                callback()
-            } else {
+            if (!zg.test(value)) {
                 callback(new Error(this.$t('cusMgt.codeErr2')))
             }
+            // 验证编码在当前学校不能重复
+            let data = _this.courseList.filter(item=>{
+                return item.id !== _this.courseBaseInfo.id
+            })
+            let allNo = data.map(item => {
+                return item.no
+            })
+            if (allNo.includes(value)) {
+                callback(new Error('课程编码重复'))
+            }
+            callback()
+        }
+        // 验证课程名称
+        const vName = (rule, value, callback) => {
+            //验证名称不能为空
+            if (!value) {
+                callback(new Error(this.$t('cusMgt.cNameHolder')))
+            }
+            //验证名称在当前学段不能重复
+            let data = _this.courseList.filter(item=>{
+                return item.id !== _this.courseBaseInfo.id
+            })
+            let names = data.map(item => {
+                return item.name
+            })
+            if (names.includes(value)) {
+                callback(new Error('课程名称重复'))
+            }
+            callback()
         }
         return {
             tableLoading: false,
@@ -444,10 +474,10 @@ export default {
             },
             courseBaseValidate: {
                 no: [
-                    { required: true, validator: validateCode, trigger: 'change' }
+                    { validator: validateCode, trigger: 'change' }
                 ],
                 name: [
-                    { required: true, message: this.$t('cusMgt.codeHolder'), trigger: 'change' }
+                    { required: true, validator: vName, trigger: 'change' }
                 ],
                 'period.id': [
                     { required: true, message: this.$t('cusMgt.pdHolder'), trigger: 'change' }
@@ -825,7 +855,7 @@ export default {
                             name: item.name
                         }
                         //添加学生信息
-                        this.schedule.students = stusInfo.stus.find(sItem=>{
+                        this.schedule.students = stusInfo.stus.find(sItem => {
                             return sItem[0].classId == item.id
                         })
                         if (emptyIndex > -1) {
@@ -1244,17 +1274,8 @@ export default {
         //编辑课程
         editCus(index) {
             this.actionType = 1
-            if (index == -1) {//‘批量编辑’
-                if (this.selections.length == 0) {
-                    this.$Message.warning(this.$t('cusMgt.sltCusTips'))
-                } else {
-                    this.courseBaseInfo = this.selections[0]
-                    this.addCourseStatus = true
-                }
-            } else {
-                this.courseBaseInfo = this.courseListShow[index]
-                this.addCourseStatus = true
-            }
+            this.courseBaseInfo = this._.cloneDeep(this.courseListShow[index])
+            this.addCourseStatus = true
         },
         /**新增/修改课程 */
         addCourse() {
@@ -1276,11 +1297,18 @@ export default {
                     }).then(
                         (res) => {
                             if (res.error == null) {
+                                this.addCourseStatus = false
                                 if (this.actionType == 0) {
                                     this.courseList.push(this.courseBaseInfo)
                                     this.$Message.success(this.$t('cusMgt.addOk'))
                                 } else {
                                     this.$Message.success(this.$t('cusMgt.editOk'))
+                                    let index = this.courseList.findIndex(item=>{
+                                        return item.id == this.courseBaseInfo.id
+                                    })
+                                    if(index > -1){
+                                        this.courseList.splice(index,1,JSON.parse(JSON.stringify(this.courseBaseInfo)))
+                                    }
                                 }
                                 this.keyWord = ''
                                 this.searchCourse()
@@ -1295,9 +1323,10 @@ export default {
                     )
                 } else {
                     this.$Message.error(this.$t('cusMgt.formTips'))
+                    this.modalLoading = false
                     setTimeout(() => {
-                        this.addCourseStatus = true
-                    }, 100)
+                        this.modalLoading = true
+                    }, 0)
                 }
             })
         },

+ 2 - 0
TEAMModelOS/ClientApp/src/view/questionnaire/ManageQuestionnaire.vue

@@ -231,6 +231,8 @@
 					this.isEmptyData = false;
 					this.$refs.qnForm.qnFormEdit = true;
 					this.onChangeResultTab('result')
+					this.$refs.qnForm.classNameArr = []
+					this.$EventBus.$emit('onCreateVote')
 				}
 			},
 

+ 8 - 3
TEAMModelOS/ClientApp/src/view/schoolmgmt/RoomMgt/RoomMgt.vue

@@ -165,7 +165,7 @@ export default {
                 no: '',
                 openType: ''
             },
-            curPdIndex:0,
+            curPdIndex: 0,
             addRoomStatus: false,
             orderBy: 'id',
             updateBefore: '',
@@ -228,10 +228,15 @@ export default {
         //当前教室课程对应的学段
         cusPds() {
             if (this.roomCus && this.roomCus.length) {
-                console.log('课程数据', this.roomCus)
                 let data = this.roomCus.map(item => {
                     return item.period
                 })
+                //对象数组根据某个属性进行去重
+                var obj = {}
+                data = data.reduce((item, next) => {
+                    obj[next.id] ? '' : obj[next.id] = true && item.push(next)
+                    return item
+                }, [])
                 if (data.length) {
                     this.curPd = data[0].id
                 }
@@ -243,7 +248,7 @@ export default {
         }
     },
     methods: {
-        selectSub(index){
+        selectSub(index) {
             this.curPdIndex = index
             this.curPd = this.cusPds[index].id
         },

+ 2 - 0
TEAMModelOS/ClientApp/src/view/vote/ManageVote.vue

@@ -198,6 +198,8 @@
 					this.editable = true
 					this.hasNewAdd = true
 					this.$refs.voteForm.voteFormEdit = true
+					this.$refs.voteForm.classNameArr = []
+					this.$EventBus.$emit('onCreateVote')
 				}
 
 				this.$nextTick(() => {

+ 143 - 55
TEAMModelOS/Controllers/Client/HiScanController.cs

@@ -133,13 +133,14 @@ namespace TEAMModelOS.Controllers.Core
         [ProducesDefaultResponseType]
         [HttpPost("get-examinfo")]
         // [AuthToken(Roles = "teacher,admin")]
-        public async Task<IActionResult> VerifyQrcode(JsonElement request)
+        public async Task<IActionResult> GetExaminfo(JsonElement request)
         {
             try
             {
                 List<SheetConfig> configs = new List<SheetConfig>();
                 HashSet<string> classesSet = new HashSet<string>();
-                ScanSchool  scanSchool = new   ScanSchool ();
+                ScanExam  scanSchool = null;
+                List<ExamRcd> sexamRcds   = new List<ExamRcd>()  ;
                 if (!request.TryGetProperty("id", out JsonElement id)) return BadRequest();
                 if (!request.TryGetProperty("schoolId", out JsonElement _schoolId)) return BadRequest();
                 var client = _azureCosmos.GetCosmosClient();
@@ -157,40 +158,112 @@ namespace TEAMModelOS.Controllers.Core
                 if (count > 0)
                 {
                     //获取学校线下阅卷评测
-                    var sexams = await GetExam($"{schoolId}", client, configs, classesSet);
+                    sexamRcds = await GetExam("school",$"{schoolId}",$"{schoolId}", client, configs, classesSet);
                     var (sblob_uri, sblob_sas) = _azureStorage.GetBlobContainerSAS($"{schoolId}", BlobContainerSasPermissions.Read | BlobContainerSasPermissions.List | BlobContainerSasPermissions.Write);
-                    (List<TmdInfo> tmdids, List<StuInfo> students, List<ClassListInfo> classInfo)= await TriggerStuActivity.GetStuList(client, _dingDing, classesSet.ToList(), $"{schoolId}");
-                    List<SheetConfig> configsN = new List<SheetConfig>();
-                    foreach (var config in configs) {
-                        if (config.scope == "school") {
-                            try {
-                                SheetConfig con = await client.GetContainer("TEAMModelOS", "School").ReadItemAsync<SheetConfig>(config.id, new PartitionKey(config.code));
-                                configsN.Add(con);
-                            } catch (CosmosException ex) { }
+                   
+                   scanSchool = new ScanExam { name = $"{schoolName}", picture = $"{schoolPicture}", id = $"{schoolId}", /*exams = sexams.schools.ToList(),*/ bloburl = sblob_uri, blobsas = sblob_sas };
+                }
+                //获取scope=school
+                var psexamRcds = await GetExam("school", schoolId, $"{id}", client, configs, classesSet);
+
+                //获取scope=private
+                var pexamRcds = await GetExam("private", null, $"{id}", client, configs, classesSet);
+
+                (List<TmdInfo> tmdids, List<StuInfo> students, List<ClassListInfo> classInfo) = await TriggerStuActivity.GetStuList(client, _dingDing, classesSet.ToList(), $"{schoolId}");
+                List<SheetConfig> configsN = new List<SheetConfig>();
+                foreach (var config in configs)
+                {
+                    if (config.scope == "school")
+                    {
+                        try
+                        {
+                            SheetConfig con = await client.GetContainer("TEAMModelOS", "School").ReadItemAsync<SheetConfig>(config.id, new PartitionKey(config.code));
+                            configsN.Add(con);
+                        }
+                        catch (CosmosException ex) { }
+                    }
+                    else {
+                        try
+                        {
+                            SheetConfig con = await client.GetContainer("TEAMModelOS", "Teacher").ReadItemAsync<SheetConfig>(config.id, new PartitionKey(config.code));
+                            configsN.Add(con);
+                        }
+                        catch (CosmosException ex) { }
+                    }
+                }
+                sexamRcds.SelectMany(y => y.classes).ToList().ForEach(z => {
+                    var a = classInfo.Where(m => m.id == z.id).FirstOrDefault();
+                    if (a != null)
+                    {
+                        z.name = a.name;
+                        z.stuInfos = a.stuInfos;
+                        z.tmdInfos = a.tmdInfos;
+                    }
+                });
+                sexamRcds.SelectMany(y => y.papers).ToList().ForEach(z => {
+                    if (z.sheet != null)
+                    {
+                        var a = configsN.Where(m => m.id == z.sheet.id).FirstOrDefault();
+                        if (a != null)
+                        {
+                            z.sheet = a;
                         }
                     }
-                    sexams.schools.SelectMany(y => y.classes).ToList().ForEach(z => {
+                });
+                scanSchool.exams = sexamRcds;
+                if (psexamRcds.IsNotEmpty()) {
+                    psexamRcds.SelectMany(y => y.classes).ToList().ForEach(z => {
                         var a = classInfo.Where(m => m.id == z.id).FirstOrDefault();
-                        if (a != null) {
+                        if (a != null)
+                        {
                             z.name = a.name;
                             z.stuInfos = a.stuInfos;
                             z.tmdInfos = a.tmdInfos;
                         }
                     });
-                    sexams.schools.SelectMany(y => y.papers).ToList().ForEach(z => {
+                    psexamRcds.SelectMany(y => y.papers).ToList().ForEach(z => {
                         if (z.sheet != null)
                         {
                             var a = configsN.Where(m => m.id == z.sheet.id).FirstOrDefault();
-                            if (a != null) {
+                            if (a != null)
+                            {
                                 z.sheet = a;
                             }
                         }
                     });
-                   scanSchool = new ScanSchool { name = $"{schoolName}", picture = $"{schoolPicture}", id = $"{schoolId}", exams = sexams.schools.ToList(), bloburl = sblob_uri, blobsas = sblob_sas };
+                    scanSchool.exams.AddRange(psexamRcds);
                 }
-                
-                var pexams = await GetExam($"{id}", client, configs, classesSet);
-                return Ok(new { school=scanSchool });
+               
+                var (tblob_uri, tblob_sas) = _azureStorage.GetBlobContainerSAS($"{id}", BlobContainerSasPermissions.Write | BlobContainerSasPermissions.Read | BlobContainerSasPermissions.List | BlobContainerSasPermissions.Delete);
+                var response = await client.GetContainer("TEAMModelOS", "Teacher").ReadItemStreamAsync($"{id}", new PartitionKey("Base"));
+                var json = await JsonDocument.ParseAsync(response.ContentStream);
+                string name = $"{json.RootElement.GetProperty("name")}";
+                string picture = $"{json.RootElement.GetProperty("picture")}";
+                ScanExam scanTeacher = new ScanExam { name= name, picture= picture, id=$"{id}", bloburl = tblob_uri, blobsas = tblob_sas };
+                if (pexamRcds.IsNotEmpty())
+                {
+                    pexamRcds.SelectMany(y => y.classes).ToList().ForEach(z => {
+                        var a = classInfo.Where(m => m.id == z.id).FirstOrDefault();
+                        if (a != null)
+                        {
+                            z.name = a.name;
+                            z.stuInfos = a.stuInfos;
+                            z.tmdInfos = a.tmdInfos;
+                        }
+                    });
+                    pexamRcds.SelectMany(y => y.papers).ToList().ForEach(z => {
+                        if (z.sheet != null)
+                        {
+                            var a = configsN.Where(m => m.id == z.sheet.id).FirstOrDefault();
+                            if (a != null)
+                            {
+                                z.sheet = a;
+                            }
+                        }
+                    });
+                    scanTeacher.exams.AddRange(psexamRcds);
+                }
+                return Ok(new { school=scanSchool, teacher= scanTeacher });
  
             }
             catch (Exception ex)
@@ -199,15 +272,18 @@ namespace TEAMModelOS.Controllers.Core
                 return BadRequest();
             }
         }
-        private async Task<(List< ExamRcd> schools, List<ExamRcd> personal)> GetExam(string code, CosmosClient client, List<SheetConfig> sheet, HashSet<string> classesSet)
+        private async Task<List<ExamRcd>> GetExam(string  scope,string  school,string code, CosmosClient client, List<SheetConfig> sheet, HashSet<string> classesSet)
         {
-            List<ExamRcd> schools = new List<ExamRcd>();
-            List<ExamRcd> personal = new List<ExamRcd>();
+            List<ExamRcd> examRcds = new List<ExamRcd>();
+            //List<ExamRcd> personal = new List<ExamRcd>();
             int i= 1;
+            StringBuilder sql = new StringBuilder($"SELECT  * FROM c  where   c.progress='going' and c.scope='{scope}' ");
+            if (!string.IsNullOrEmpty(school)) {
+                sql.Append($"  and c.school='{school}' ");
+            }
             //await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryIterator<Correct>(queryText: "SELECT  * FROM c where c.source='2' and c.progress='going' order by c.createTime  ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Correct-{code}") }))
-            await foreach (var exam in client.GetContainer("TEAMModelOS", "Common").GetItemQueryIterator<ExamInfo>(queryText: "SELECT  * FROM c  where   c.progress='going'  ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Exam-{code}") }))
+            await foreach (var exam in client.GetContainer("TEAMModelOS", "Common").GetItemQueryIterator<ExamInfo>(queryText: sql.ToString(), requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Exam-{code}") }))
             {
-                Console.WriteLine(i++);
                 List<ClassListInfo> classes = new List<ClassListInfo>();
                 exam.classes.ForEach(x => { classes.Add(new ClassListInfo { id = x }); classesSet.Add(x); } );
                 List<PaperRcd> dys = new List<PaperRcd>();
@@ -233,38 +309,50 @@ namespace TEAMModelOS.Controllers.Core
                         dys.Add(new PaperRcd { name = pap.name, answers = pap.answers, point = pap.point, sheet = null });
                     }
                 }
-                if (exam.scope == "school")
+                examRcds.Add(new ExamRcd
                 {
-                    schools.Add(new ExamRcd
-                    {
-                        id = exam.id,
-                        name = exam.name,
-                        startTime = exam.startTime,
-                        endTime = exam.endTime,
-                        period = exam.period,
-                        grades = exam.grades,
-                        subjects = exam.subjects,
-                        papers = dys,
-                        classes = classes
-                    });
-                }
-                else
-                {
-                    personal.Add(new ExamRcd
-                    {
-                        id = exam.id,
-                        name = exam.name,
-                        startTime = exam.startTime,
-                        endTime = exam.endTime,
-                        period = exam.period,
-                        grades = exam.grades,
-                        subjects = exam.subjects,
-                        papers = dys,
-                        classes = classes
-                    });
-                }
+                    id = exam.id,
+                    name = exam.name,
+                    startTime = exam.startTime,
+                    endTime = exam.endTime,
+                    period = exam.period,
+                    grades = exam.grades,
+                    subjects = exam.subjects,
+                    papers = dys,
+                    classes = classes
+                });
+                //if (exam.scope == "school")
+                //{
+                //    schools.Add(new ExamRcd
+                //    {
+                //        id = exam.id,
+                //        name = exam.name,
+                //        startTime = exam.startTime,
+                //        endTime = exam.endTime,
+                //        period = exam.period,
+                //        grades = exam.grades,
+                //        subjects = exam.subjects,
+                //        papers = dys,
+                //        classes = classes
+                //    });
+                //}
+                //else
+                //{
+                //    personal.Add(new ExamRcd
+                //    {
+                //        id = exam.id,
+                //        name = exam.name,
+                //        startTime = exam.startTime,
+                //        endTime = exam.endTime,
+                //        period = exam.period,
+                //        grades = exam.grades,
+                //        subjects = exam.subjects,
+                //        papers = dys,
+                //        classes = classes
+                //    });
+                //}
             }
-            return (schools, personal);
+            return examRcds;
         }
     }
     public record PaperRcd { 
@@ -287,7 +375,7 @@ namespace TEAMModelOS.Controllers.Core
         public List<ClassListInfo> classes { get; set; }
     }
 
-    public class ScanSchool
+    public class ScanExam
     {
         public string blobsas { get; set; }
         public string bloburl { get; set; }