فهرست منبع

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

CrazyIter 4 سال پیش
والد
کامیت
09d84b279f

+ 8 - 4
TEAMModelOS/ClientApp/src/api/courseMgmt.js

@@ -13,10 +13,14 @@ export default {
     deleteCourseAll: function (data) {
     deleteCourseAll: function (data) {
         return post('/api/Course/DeleteAll', data)
         return post('/api/Course/DeleteAll', data)
     },
     },
-    //保存课程安排数据
-    upsertPlan: function (data) {
+    //管理员保存课数据
+    upsertAllPlan: function (data) {
         return post('/api/Course/upsertAllPlan', data)
         return post('/api/Course/upsertAllPlan', data)
     },
     },
+    //任课教师保存课程附属信息
+    upsertPlan: function (data) {
+        return post('/api/Course/upsertPlan', data)
+    },
     //查询课程安排数据
     //查询课程安排数据
     findPlan: function (data) {
     findPlan: function (data) {
         return post('/api/Course/findPlan', data)
         return post('/api/Course/findPlan', data)
@@ -27,7 +31,7 @@ export default {
     },
     },
     //获取教室关联的学生
     //获取教室关联的学生
     getClassroomStudent: function (data) {
     getClassroomStudent: function (data) {
-        return post('/api/ClassroomStudent/OnTime', data)
+        return post('/api/ClassStudent/find', data)
     },
     },
     //虚拟教室添加学生
     //虚拟教室添加学生
     addClassroom: function (data) {
     addClassroom: function (data) {
@@ -35,6 +39,6 @@ export default {
     },
     },
     //获取教师列表
     //获取教师列表
     getSchoolTeacher: function (data) {
     getSchoolTeacher: function (data) {
-        return post('/api/Teacher/GetSchoolUser', data)
+        return post('/api/SchoolUser/GetSchoolUser', data)
     }
     }
 }
 }

+ 9 - 9
TEAMModelOS/ClientApp/src/api/learnActivity.js

@@ -119,40 +119,40 @@ export default {
     /*
     /*
     * 查询作业下的所有学生数据
     * 查询作业下的所有学生数据
     */
     */
-    FindStudentByHwId: function (data) {
-        return post('/api/HomeWork/findStudent', data)
+    FindRecordByHwId: function (data) {
+        return post('/api/HomeWork/findRecord', data)
     },
     },
 
 
     /*
     /*
      * 查询老师的评语罐头
      * 查询老师的评语罐头
      */
      */
     FindTeacherComments: function (data) {
     FindTeacherComments: function (data) {
-        return post('/api/HomeWork/findComments', data)
+        return post('/api/Comment/findComment', data)
     },
     },
     /*
     /*
      * 新增老师的评语罐头
      * 新增老师的评语罐头
      */
      */
     SaveOrUpdateTeacherComments: function (data) {
     SaveOrUpdateTeacherComments: function (data) {
-        return post('/api/HomeWork/upsertComments', data)
+        return post('/api/Comment/addComment', data)
     },
     },
     /*
     /*
-     * 删除老师的评语罐头
+     * 删除或者更新老师的评语罐头
      */
      */
-    DeleteTeacherComments: function (data) {
-        return post('/api/HomeWork/deleteComments', data)
+    UpsertTeacherComments: function (data) {
+        return post('/api/Comment/upsertComment', data)
     },
     },
 
 
     /*
     /*
     * 老师评分
     * 老师评分
     */
     */
     TeacherScoring: function (data) {
     TeacherScoring: function (data) {
-        return post('/api/HomeWork/TeacherScoring', data)
+        return post('/api/HomeWork/tchScore', data)
     },
     },
     /*
     /*
     * 打评语
     * 打评语
     */
     */
     SetComment: function (data) {
     SetComment: function (data) {
-        return post('/api/HomeWork/Comment', data)
+        return post('/api/HomeWork/tchScore', data)
     },
     },
     /*
     /*
     *新增或者编辑自主学子活动
     *新增或者编辑自主学子活动

+ 1 - 1
TEAMModelOS/ClientApp/src/components/learnactivity/BaseHwTable.vue

@@ -355,7 +355,7 @@
              */
              */
             findTeacherComments(teacherId) {
             findTeacherComments(teacherId) {
                 return new Promise((r, j) => {
                 return new Promise((r, j) => {
-                    this.$api.learnActivity.FindTeacherComments({ TEAMModelId: teacherId }).then(res => {
+                    this.$api.learnActivity.FindTeacherComments({ code: teacherId }).then(res => {
                         if (!res.error && res.result.data) {
                         if (!res.error && res.result.data) {
                             r(res.result.data)
                             r(res.result.data)
                         } else {
                         } else {

+ 23 - 20
TEAMModelOS/ClientApp/src/components/questionnaire/BaseAddItem.vue

@@ -55,18 +55,14 @@
 		},
 		},
 		methods: {
 		methods: {
 			initEditors() {
 			initEditors() {
-				console.log(this.options)
+				this.optionEditors = []
 				// Editor默认配置
 				// Editor默认配置
 				if (this.options.length > 0) {
 				if (this.options.length > 0) {
 					this.$nextTick(() => {
 					this.$nextTick(() => {
 						this.options.forEach((item, i) => {
 						this.options.forEach((item, i) => {
-							
-							if(this.existEditors.indexOf(item) > -1) return
 							let that = this
 							let that = this
 							let editor = new E(that.$refs['singleOption' + i][0])
 							let editor = new E(that.$refs['singleOption' + i][0])
 							editor.customConfig = this.defaultConfig
 							editor.customConfig = this.defaultConfig
-							
-							this.existEditors.push(item)
 
 
 							// 选项编辑器失焦隐藏工具栏
 							// 选项编辑器失焦隐藏工具栏
 							editor.customConfig.onblur = function() {
 							editor.customConfig.onblur = function() {
@@ -81,25 +77,24 @@
 							// 选项编辑器内容发生变化时
 							// 选项编辑器内容发生变化时
 							editor.customConfig.onchange = (html) => {
 							editor.customConfig.onchange = (html) => {
 								let key = String.fromCharCode(64 + parseInt(i + 1))
 								let key = String.fromCharCode(64 + parseInt(i + 1))
-								let codeArr = this.optionsContent.map(item => item.code)
+								let codeArr = this.optionsContent.map((item,index) => String.fromCharCode(64 + parseInt(index + 1)))
 								// 如果已经编辑过则 修改选项内容
 								// 如果已经编辑过则 修改选项内容
 								if (codeArr.indexOf(key) !== -1) {
 								if (codeArr.indexOf(key) !== -1) {
 									this.optionsContent[codeArr.indexOf(key)].value = html
 									this.optionsContent[codeArr.indexOf(key)].value = html
 								} else { // 否则创建新选项
 								} else { // 否则创建新选项
-									let option = {
+									this.optionsContent.push({
 										code: key,
 										code: key,
 										value: html
 										value: html
-									}
-									this.optionsContent.push(option)
+									})
 								}
 								}
 							}
 							}
 							editor.create()
 							editor.create()
 							
 							
 							this.optionEditors.push(editor)
 							this.optionEditors.push(editor)
 							
 							
-							console.log(this.editItem)
 							// 如果是编辑状态 则将选项内容回显
 							// 如果是编辑状态 则将选项内容回显
 							if (this.editItem && Object.keys(this.editItem).length > 0) {
 							if (this.editItem && Object.keys(this.editItem).length > 0) {
+								console.log(this.editItem.options)
 								editor.txt.html(this.editItem.options[i].value)
 								editor.txt.html(this.editItem.options[i].value)
 							}
 							}
 						})
 						})
@@ -119,7 +114,7 @@
 
 
 						editor.customConfig.onchange = (html) => {
 						editor.customConfig.onchange = (html) => {
 							let key = String.fromCharCode(64 + parseInt(newIndex + 1))
 							let key = String.fromCharCode(64 + parseInt(newIndex + 1))
-							let codeArr = this.optionsContent.map(item => item.code)
+							let codeArr = this.optionsContent.map((item,index) => String.fromCharCode(64 + parseInt(index + 1)))
 							// 如果已经编辑过则 修改选项内容
 							// 如果已经编辑过则 修改选项内容
 							if (codeArr.indexOf(key) !== -1) {
 							if (codeArr.indexOf(key) !== -1) {
 								this.optionsContent[codeArr.indexOf(key)].value = html
 								this.optionsContent[codeArr.indexOf(key)].value = html
@@ -130,6 +125,7 @@
 								}
 								}
 								this.optionsContent.push(option)
 								this.optionsContent.push(option)
 							}
 							}
+							console.log(this.optionsContent)
 						}
 						}
 						editor.create()
 						editor.create()
 					})
 					})
@@ -161,12 +157,24 @@
 			},
 			},
 			// 置空内容
 			// 置空内容
 			resetContent(){
 			resetContent(){
-				console.log("reset")
+				this.options = [0,1,2,3]
 				this.stemEditor.txt.clear()
 				this.stemEditor.txt.clear()
 				this.optionEditors.forEach(i => {
 				this.optionEditors.forEach(i => {
 					i.txt.clear()
 					i.txt.clear()
 				})
 				})
 				
 				
+			},
+			
+			// 渲染编辑试题的内容
+			doRender(item){
+				let newValue = JSON.parse(JSON.stringify(item))
+				this.stemEditor.txt.html(newValue.stem)
+				this.stemContent = newValue.stem
+				this.optionsContent = newValue.options
+				this.options = newValue.options.map((item, index) => index)
+				this.$nextTick(() => {
+				    this.initEditors()
+				})
 			}
 			}
 		},
 		},
 		mounted() {
 		mounted() {
@@ -190,14 +198,9 @@
 			editItem: {
 			editItem: {
 				handler(newValue) {
 				handler(newValue) {
 					if (!newValue) return
 					if (!newValue) return
-					console.log(newValue)
-					this.stemEditor.txt.html(newValue.stem)
-					this.optionsContent = newValue.options
-					this.options = newValue.options.map((item, index) => index)
-					this.$nextTick(() => {
-					    this.initEditors()
-					})
-				}
+					this.doRender(newValue)
+				},
+				
 			}
 			}
 
 
 		}
 		}

+ 6 - 9
TEAMModelOS/ClientApp/src/components/questionnaire/BaseQuestionnaire.less

@@ -75,27 +75,24 @@
 			}
 			}
 			
 			
             .ivu-radio-wrapper{
             .ivu-radio-wrapper{
-                margin: 20px 40px;
+                margin: 20px 40px 20px 10px;
 				
 				
 				.ivu-radio{
 				.ivu-radio{
 					margin-right: 5px;
 					margin-right: 5px;
 				}
 				}
-				
-				&:first-child{
-					margin-left: 10px;
-				}
             }
             }
 			
 			
 			.ivu-checkbox-wrapper{
 			.ivu-checkbox-wrapper{
-			    margin: 20px 40px;
+			     margin: 20px 40px 20px 10px;
 				
 				
 				.ivu-checkbox{
 				.ivu-checkbox{
 					margin-right: 5px;
 					margin-right: 5px;
 				}
 				}
 				
 				
-				&:first-child{
-					margin-left: 10px;
-				}
+			}
+			
+			.ivu-checkbox-disabled+span{
+				color:inherit !important;
 			}
 			}
 			
 			
 			.qn-tools{
 			.qn-tools{

+ 24 - 11
TEAMModelOS/ClientApp/src/components/questionnaire/BaseQuestionnaire.vue

@@ -40,11 +40,11 @@
 						</p>
 						</p>
 						<!-- 单选题-选项 -->
 						<!-- 单选题-选项 -->
 						<RadioGroup v-model="radioModel" v-if="item.type === 'Single' || item.type === 'Judge'">
 						<RadioGroup v-model="radioModel" v-if="item.type === 'Single' || item.type === 'Judge'">
-							<Radio v-for="(option,optionIndex) in item.options" :key="optionIndex" :label="getSimpleText(option.value)"></Radio>
+							<Radio v-for="(option,optionIndex) in item.options" :key="optionIndex" :label="getSimpleText(option.value)" disabled></Radio>
 						</RadioGroup>
 						</RadioGroup>
 						<!-- 多选题-选项 -->
 						<!-- 多选题-选项 -->
 						<CheckboxGroup v-model="multipleModel" v-if="item.type === 'Multiple'">
 						<CheckboxGroup v-model="multipleModel" v-if="item.type === 'Multiple'">
-							<Checkbox v-for="(option,optionIndex) in item.options" :key="optionIndex" :label="getSimpleText(option.value)">
+							<Checkbox v-for="(option,optionIndex) in item.options" :key="optionIndex" :label="getSimpleText(option.value)" disabled>
 							</Checkbox>
 							</Checkbox>
 						</CheckboxGroup>
 						</CheckboxGroup>
 						<!-- 数据分析 -->
 						<!-- 数据分析 -->
@@ -100,6 +100,7 @@
 				curIndexList:[],
 				curIndexList:[],
 				curItem:null,
 				curItem:null,
 				barData:[],
 				barData:[],
+				editIndex:null,
 				isShowAnalysis:false,
 				isShowAnalysis:false,
 				isShowAllAnalysis:false,
 				isShowAllAnalysis:false,
 				addModal: false,
 				addModal: false,
@@ -128,9 +129,12 @@
 			// 添加题目
 			// 添加题目
 			onMenuClick(name) {
 			onMenuClick(name) {
 				this.curType = name
 				this.curType = name
+				this.curItem = null
+				this.editIndex = null
 				this.addModal = true
 				this.addModal = true
 			},
 			},
 			
 			
+			// 重置所有富文本编辑器内容 初始化
 			onModalChange(val){
 			onModalChange(val){
 				if(!val) this.$refs.addItem.resetContent()
 				if(!val) this.$refs.addItem.resetContent()
 			},
 			},
@@ -138,21 +142,24 @@
 			// 确认添加题目
 			// 确认添加题目
 			onConfirmAdd() {
 			onConfirmAdd() {
 				let addItem = this.$refs.addItem
 				let addItem = this.$refs.addItem
-				console.log(addItem.optionsContent)
-				console.log(addItem.options)
+				console.log('新增Ref的内容')
+				console.log(addItem)
 				// 判断获取到的新题是否规范
 				// 判断获取到的新题是否规范
-				if (this.getSimpleText(addItem.stemContent) && 
-					addItem.options.length === this.curType === 'Judge' ? 2 : addItem.optionsContent.length && 
-					this.checkOptionNull(addItem.optionsContent)){
+				if ( this.getSimpleText(addItem.stemContent) && (addItem.options.length === this.curType === 'Judge' ? 2 : addItem.optionsContent.length) && this.checkOptionNull(addItem.optionsContent)){
 					let newItem = {
 					let newItem = {
 						stem: addItem.stemContent,
 						stem: addItem.stemContent,
 						options: addItem.optionsContent,
 						options: addItem.optionsContent,
-						type: this.curType,
-						description: '',
+						type: this.editIndex === null ? this.curType : this.curItem.type,
+						description:this.editIndex === null ? '' : this.curItem.description,
 						required: true,
 						required: true,
 					}
 					}
 					console.log(newItem)
 					console.log(newItem)
-					this.items.push(newItem)
+					if(this.editIndex === null){
+						this.items.push(newItem)
+						console.log(this.items)
+					}else{
+						this.$set(this.items, this.editIndex, newItem)
+					}
 					this.addModal = false
 					this.addModal = false
 				}else{
 				}else{
 					this.$Message.warning('请填写完整!')
 					this.$Message.warning('请填写完整!')
@@ -185,7 +192,13 @@
 
 
 			/* 编辑单个题目 */
 			/* 编辑单个题目 */
 			onItemEdit(item, index) {
 			onItemEdit(item, index) {
-				this.curItem = item
+				if(this.editIndex === index){
+					this.$refs.addItem.doRender(item)
+				}else{
+					this.curItem = item
+					this.editIndex = index
+				}
+				this.curType = item.type
 				this.addModal = true
 				this.addModal = true
 			},
 			},
 
 

+ 1 - 1
TEAMModelOS/ClientApp/src/filters/http.js

@@ -99,7 +99,7 @@ function checkToken() {
 /**刷新token */
 /**刷新token */
 async function refreshToken() {
 async function refreshToken() {
     refreshing = true
     refreshing = true
-    await axios.post('https://api2.teammodel.cn/oauth2/v2.1/token', {
+    await axios.post('https://api2.teammodel.cn/oauth2/token', {
         "grant_type": "driver",
         "grant_type": "driver",
         "client_id": "c7317f88-7cea-4e48-ac57-a16071f7b884",
         "client_id": "c7317f88-7cea-4e48-ac57-a16071f7b884",
         "refresh_token": localStorage.getItem('access_token')
         "refresh_token": localStorage.getItem('access_token')

+ 1 - 1
TEAMModelOS/ClientApp/src/store/module/teachers.js

@@ -19,7 +19,7 @@ export default {
                 (resolve, reject) => {
                 (resolve, reject) => {
                     if (context.state.teacherList.length == 0) {
                     if (context.state.teacherList.length == 0) {
                         apiTools.courseMgmt.getSchoolTeacher({
                         apiTools.courseMgmt.getSchoolTeacher({
-                            code: context.rootState.userInfo.schoolCode
+                            code: context.rootState.userInfo.schoolCode +'-SchoolUser'
                         }).then(
                         }).then(
                             (res) => {
                             (res) => {
                                 if (res.error == null) {
                                 if (res.error == null) {

+ 72 - 7
TEAMModelOS/ClientApp/src/view/newcourse/CoursePlan.vue

@@ -60,6 +60,8 @@
                                 <Button v-if="row.weeklies.MON.status == 1" class="toggle-status-btn" @click="showSetCus(row,'MON')" ghost type="default">
                                 <Button v-if="row.weeklies.MON.status == 1" class="toggle-status-btn" @click="showSetCus(row,'MON')" ghost type="default">
                                     {{row.weeklies.MON.status == 1 ? '设置课程':'设置课程'}}
                                     {{row.weeklies.MON.status == 1 ? '设置课程':'设置课程'}}
                                 </Button>
                                 </Button>
+                                <p>{{row.weeklies.MON.courseName}}</p>
+                                <p>{{row.weeklies.MON.teacher}}</p>
                             </div>
                             </div>
                         </template>
                         </template>
                         <!--星期二-->
                         <!--星期二-->
@@ -68,6 +70,8 @@
                                 <Button v-if="row.weeklies.TUE.status == 1" class="toggle-status-btn" @click="showSetCus(row,'TUE')" ghost type="default">
                                 <Button v-if="row.weeklies.TUE.status == 1" class="toggle-status-btn" @click="showSetCus(row,'TUE')" ghost type="default">
                                     {{row.weeklies.TUE.status == 1 ? '设置课程':'设置课程'}}
                                     {{row.weeklies.TUE.status == 1 ? '设置课程':'设置课程'}}
                                 </Button>
                                 </Button>
+                                <p>{{row.weeklies.TUE.courseName}}</p>
+                                <p>{{row.weeklies.TUE.teacher}}</p>
                             </div>
                             </div>
                         </template>
                         </template>
                         <!--星期三-->
                         <!--星期三-->
@@ -76,6 +80,8 @@
                                 <Button v-if="row.weeklies.WED.status == 1" class="toggle-status-btn" @click="showSetCus(row,'WED')" ghost type="default">
                                 <Button v-if="row.weeklies.WED.status == 1" class="toggle-status-btn" @click="showSetCus(row,'WED')" ghost type="default">
                                     {{row.weeklies.WED.status == 1 ? '设置课程':'设置课程'}}
                                     {{row.weeklies.WED.status == 1 ? '设置课程':'设置课程'}}
                                 </Button>
                                 </Button>
+                                <p>{{row.weeklies.WED.courseName}}</p>
+                                <p>{{row.weeklies.WED.teacher}}</p>
                             </div>
                             </div>
                         </template>
                         </template>
                         <!--星期四-->
                         <!--星期四-->
@@ -84,6 +90,8 @@
                                 <Button v-if="row.weeklies.THU.status == 1" class="toggle-status-btn" @click="showSetCus(row,'THU')" ghost type="default">
                                 <Button v-if="row.weeklies.THU.status == 1" class="toggle-status-btn" @click="showSetCus(row,'THU')" ghost type="default">
                                     {{row.weeklies.THU.status == 1 ? '设置课程':'设置课程'}}
                                     {{row.weeklies.THU.status == 1 ? '设置课程':'设置课程'}}
                                 </Button>
                                 </Button>
+                                <p>{{row.weeklies.THU.courseName}}</p>
+                                <p>{{row.weeklies.THU.teacher}}</p>
                             </div>
                             </div>
                         </template>
                         </template>
                         <!--星期五-->
                         <!--星期五-->
@@ -92,6 +100,8 @@
                                 <Button v-if="row.weeklies.FRI.status == 1" class="toggle-status-btn" @click="showSetCus(row,'FRI')" ghost type="default">
                                 <Button v-if="row.weeklies.FRI.status == 1" class="toggle-status-btn" @click="showSetCus(row,'FRI')" ghost type="default">
                                     {{row.weeklies.FRI.status == 1 ? '设置课程':'设置课程'}}
                                     {{row.weeklies.FRI.status == 1 ? '设置课程':'设置课程'}}
                                 </Button>
                                 </Button>
+                                <p>{{row.weeklies.FRI.courseName}}</p>
+                                <p>{{row.weeklies.FRI.teacher}}</p>
                             </div>
                             </div>
                         </template>
                         </template>
                         <!--星期六-->
                         <!--星期六-->
@@ -100,6 +110,8 @@
                                 <Button v-if="row.weeklies.SAT.status == 1" class="toggle-status-btn" @click="showSetCus(row,'SAT')" ghost type="default">
                                 <Button v-if="row.weeklies.SAT.status == 1" class="toggle-status-btn" @click="showSetCus(row,'SAT')" ghost type="default">
                                     {{row.weeklies.SAT.status == 1 ? '设置课程':'设置课程'}}
                                     {{row.weeklies.SAT.status == 1 ? '设置课程':'设置课程'}}
                                 </Button>
                                 </Button>
+                                <p>{{row.weeklies.SAT.courseName}}</p>
+                                <p>{{row.weeklies.SAT.teacher}}</p>
                             </div>
                             </div>
                         </template>
                         </template>
                         <!--星期日-->
                         <!--星期日-->
@@ -108,6 +120,8 @@
                                 <Button v-if="row.weeklies.SUN.status == 1" class="toggle-status-btn" @click="showSetCus(row,'SUN')" ghost type="default">
                                 <Button v-if="row.weeklies.SUN.status == 1" class="toggle-status-btn" @click="showSetCus(row,'SUN')" ghost type="default">
                                     {{row.weeklies.SUN.status == 1 ? '设置课程':'设置课程'}}
                                     {{row.weeklies.SUN.status == 1 ? '设置课程':'设置课程'}}
                                 </Button>
                                 </Button>
+                                <p>{{row.weeklies.SUN.courseName}}</p>
+                                <p>{{row.weeklies.SUN.teacher}}</p>
                             </div>
                             </div>
                         </template>
                         </template>
                     </Table>
                     </Table>
@@ -128,13 +142,13 @@
                @on-ok="confirmSetCus">
                @on-ok="confirmSetCus">
             <Form :model="cusItem" :label-width="90">
             <Form :model="cusItem" :label-width="90">
                 <FormItem label="课程名称">
                 <FormItem label="课程名称">
-                    <Select v-model="cusItem.courseCode">
-                        <Option v-for="(item,index) in courseList" :value="item.courseCode">{{item.courseName}}</Option>
+                    <Select v-model="cusItem.courseId">
+                        <Option v-for="(item,index) in courseList" :value="item.id">{{item.courseName}}</Option>
                     </Select>
                     </Select>
                 </FormItem>
                 </FormItem>
                 <FormItem label="授课老师">
                 <FormItem label="授课老师">
                     <Select v-model="cusItem.teacher">
                     <Select v-model="cusItem.teacher">
-                        <Option v-for="(item,index) in $store.state.teachers.teacherList" :value="item.code">{{item.name}}</Option>
+                        <Option v-for="(item,index) in cusTeaList" :value="item.id">{{item.name}}</Option>
                     </Select>
                     </Select>
                 </FormItem>
                 </FormItem>
             </Form>
             </Form>
@@ -151,10 +165,13 @@
         },
         },
         data() {
         data() {
             return {
             return {
+                coursePlan: {},
                 courseList:[],
                 courseList:[],
                 cusItem: {
                 cusItem: {
-                    courseCode: '',
-                    teacher:'孔子'
+                    courseId: '',
+                    teacher: '',
+                    row: {},
+                    day:''
                 },
                 },
                 excelData:[],
                 excelData:[],
                 headerKeys:['classroomCode','courseName','courseCode','MON','TUE','WED','THU','FRI','SAT','SUN'],
                 headerKeys:['classroomCode','courseName','courseCode','MON','TUE','WED','THU','FRI','SAT','SUN'],
@@ -268,10 +285,39 @@
             },
             },
             //确认设置课程
             //确认设置课程
             confirmSetCus() {
             confirmSetCus() {
+                let requestData = {
+                    courseId: this.cusItem.courseId,
+                    classroomCode: this.classListShow[this.curClassIndex].classroomCode,
+                    code: this.cusItem.teacher,
+                    courseTime: {
+                        label:  this.cusItem.row.label,
+                        time: this.cusItem.row.time,
+                        day: this.cusItem.day,
+                        //type:0
+                    }
+                }
+                this.$api.courseMgmt.upsertAllPlan([requestData]).then(
+                    (res) => {
+                        this.tableData[this.cusItem.row._index].weeklies[this.cusItem.day].courseName = this.courseList.filter((item) => {
+                            return item.id == this.cusItem.courseId
+                        })[0].courseName
 
 
+                        this.tableData[this.cusItem.row._index].weeklies[this.cusItem.day].teacher = this.cusTeaList.filter((item) => {
+                            return item.id == this.cusItem.teacher
+                        })[0].name
+                        console.log('-----')
+                        console.log(this.tableData)
+                    },
+                    (err) => {
+                        console.log('error')
+                    }
+                )
             },
             },
             //显示设置课程对话框
             //显示设置课程对话框
-            showSetCus() {
+            showSetCus(row, day) {
+                console.log(row, day)
+                this.cusItem.row = row
+                this.cusItem.day = day
                 this.setCusStatus = true
                 this.setCusStatus = true
             },
             },
             //处理表格导入的数据
             //处理表格导入的数据
@@ -317,6 +363,9 @@
         },
         },
         created() {
         created() {
             this.getCourseList()
             this.getCourseList()
+            this.$store.dispatch('teachers/getTeacherList').then(res => {
+                console.log(res)
+            })
             this.$store.dispatch('schoolBaseInfo/getClassroom').then(res => {
             this.$store.dispatch('schoolBaseInfo/getClassroom').then(res => {
                 this.classList = this.$store.state.schoolBaseInfo.classroomList
                 this.classList = this.$store.state.schoolBaseInfo.classroomList
                 this.classListShow = [...this.classList]
                 this.classListShow = [...this.classList]
@@ -324,7 +373,8 @@
                 this.tableData = this.$store.state.schoolBaseInfo.schoolBaseInfo.timetable.filter((item, index) => {
                 this.tableData = this.$store.state.schoolBaseInfo.schoolBaseInfo.timetable.filter((item, index) => {
                     return item.type == 1
                     return item.type == 1
                 })
                 })
-                console.log(this.$store.state.schoolBaseInfo.schoolBaseInfo)
+                console.log('tabledata')
+                console.log(this.tableData)
                 for (let item of this.$store.state.schoolBaseInfo.schoolBaseInfo.period) {
                 for (let item of this.$store.state.schoolBaseInfo.schoolBaseInfo.period) {
                     let root = {
                     let root = {
                         value: item.periodCode,
                         value: item.periodCode,
@@ -348,6 +398,21 @@
         },
         },
         mounted() {
         mounted() {
             console.log(this.$refs['impXls'])
             console.log(this.$refs['impXls'])
+        },
+        computed: {
+            cusTeaList() {
+                let curCourse = this.courseList.filter((item) => {
+                    return item.id == this.cusItem.courseId
+                })
+                if (curCourse.length > 0) {
+                    return this.$store.state.teachers.teacherList.filter((item) => {
+                        return curCourse[0].teachers.indexOf(item.id) !== -1
+                    })
+                } else {
+                    return []
+                }
+                
+            }
         }
         }
     }
     }
 </script>
 </script>

+ 2 - 2
TEAMModelOS/ClientApp/src/view/newcourse/ManageCourse.vue

@@ -76,7 +76,7 @@
                 </FormItem>
                 </FormItem>
                 <FormItem label="授课教师" prop="teachers">
                 <FormItem label="授课教师" prop="teachers">
                     <Select v-model="courseBaseInfo.teachers" multiple placeholder="请选择教师" :max-tag-count="3" filterable>
                     <Select v-model="courseBaseInfo.teachers" multiple placeholder="请选择教师" :max-tag-count="3" filterable>
-                        <Option v-for="(item,index) in $store.state.teachers.teacherList" :value="item.code" :key="index">{{ item.name }}</Option>
+                        <Option v-for="(item,index) in $store.state.teachers.teacherList" :value="item.id" :key="index">{{ item.name }}</Option>
                     </Select>
                     </Select>
                 </FormItem>
                 </FormItem>
             </Form>
             </Form>
@@ -196,7 +196,7 @@
             //id换名字
             //id换名字
             getTeacherName(ids) {
             getTeacherName(ids) {
                 let result = this.$store.state.teachers.teacherList.filter((item) => {
                 let result = this.$store.state.teachers.teacherList.filter((item) => {
-                    return ids.indexOf(item.code) != -1
+                    return ids.indexOf(item.id) != -1
                 })
                 })
                 console.log(result)
                 console.log(result)
                 let name = result.map((item) => {
                 let name = result.map((item) => {

+ 41 - 8
TEAMModelOS/ClientApp/src/view/selflearning/ManageHomeWork.vue

@@ -204,15 +204,48 @@
              * 获取作业关联的学生清单
              * 获取作业关联的学生清单
              * @param hwId 作业ID
              * @param hwId 作业ID
              */
              */
-            getHwStudents(hwId) {
-                this.$api.learnActivity.FindStudentByHwId({ homeWorkId: hwId }).then(res => {
-                    if (!res.error && res.result.data) {
-                        this.studentsList = res.result.data
-                    } else {
-                        this.$Message.error('获取数据失败')
-                    }
-                })
+            async getHwStudents(hwId) {
+				let records  = await this.getHwRecord(hwId)
+				console.log(records)
+				//  先查找 作业发布对象关联的学生清单 然后再去判断学生的作答情况
+				this.$api.courseMgmt.getClassroomStudent({ classroomCode: 'HBCN0102' , schoolCode:'HBCN' }).then(res => {
+				    if (!res.error && res.result.data) {
+					    let list = res.result.extend.students
+						if(records.length){
+							records.forEach(item => {
+								list.forEach(i => {
+									if(i.studentId === item.code){
+										i.submissionBool = true
+										i.submissionTime = item.submitTime
+										return
+									}
+								})
+							})
+						}
+				        this.studentsList = list
+				    } else {
+				        this.$Message.error('获取数据失败')
+				    }
+				})
             },
             },
+			
+			/**
+			 * 老师评分请求接口
+			 * @param params
+			 */
+			getHwRecord(hwId) {
+			    return new Promise((r, j) => {
+			        this.$api.learnActivity.FindRecordByHwId({ homeWorkId: hwId }).then(res => {
+			            if (!res.error && res.result.data) {
+			                r(res.result.data)
+			            } else {
+			                j(500)
+			            }
+			        })
+			    })
+			},
+			
+			
 
 
             /** 作业编辑事件 */
             /** 作业编辑事件 */
             onEditHw() {
             onEditHw() {

+ 2 - 2
TEAMModelOS/Controllers/Analysis/AchievementController.cs

@@ -980,13 +980,13 @@ namespace TEAMModelOS.Controllers.Analysis
             Dictionary<string, object> sub = new Dictionary<string, object>
             Dictionary<string, object> sub = new Dictionary<string, object>
             {
             {
                 { "subjectCode",  subjectCode.ToString()},
                 { "subjectCode",  subjectCode.ToString()},
-                { "scopeCode",code.ToString()}
+                { "code",code.ToString()}
 
 
             };
             };
             Dictionary<string, object> examMap = new Dictionary<string, object>
             Dictionary<string, object> examMap = new Dictionary<string, object>
             {
             {
                 { "schoolCode", schoolCode.ToString()},
                 { "schoolCode", schoolCode.ToString()},
-                { "examCode", code.ToString()},
+                { "code", code.ToString()},
                 { "subjectCode",  subjectCode.ToString()}
                 { "subjectCode",  subjectCode.ToString()}