Ver Fonte

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

Li há 3 anos atrás
pai
commit
25f463d52c
26 ficheiros alterados com 326 adições e 187 exclusões
  1. 6 2
      TEAMModeBI/ClientApp/src/api/index.js
  2. 0 2
      TEAMModeBI/ClientApp/src/router/index.js
  3. 21 15
      TEAMModeBI/ClientApp/src/view/bindPhone.vue
  4. 4 4
      TEAMModeBI/ClientApp/src/view/login.vue
  5. 1 0
      TEAMModelOS/ClientApp/src/api/login.js
  6. 28 0
      TEAMModelOS/ClientApp/src/boot-app.js
  7. 1 1
      TEAMModelOS/ClientApp/src/common/BaseLayout.vue
  8. 101 38
      TEAMModelOS/ClientApp/src/common/BaseNotification.vue
  9. 13 12
      TEAMModelOS/ClientApp/src/common/BaseSelectArea.vue
  10. 33 26
      TEAMModelOS/ClientApp/src/common/BaseSelectSchool.vue
  11. 12 4
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventList.vue
  12. 6 1
      TEAMModelOS/ClientApp/src/components/student-web/HomeView/newHomeView.vue
  13. 5 1
      TEAMModelOS/ClientApp/src/locale/lang/en-US/notice.js
  14. 1 0
      TEAMModelOS/ClientApp/src/locale/lang/en-US/settings.js
  15. 5 1
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/notice.js
  16. 1 0
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/settings.js
  17. 5 1
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/notice.js
  18. 1 0
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/settings.js
  19. 7 0
      TEAMModelOS/ClientApp/src/store/module/studentWeb.js
  20. 0 2
      TEAMModelOS/ClientApp/src/store/module/user.js
  21. 38 50
      TEAMModelOS/ClientApp/src/view/Home.vue
  22. 3 2
      TEAMModelOS/ClientApp/src/view/homepage/HomePage.vue
  23. 8 8
      TEAMModelOS/ClientApp/src/view/homepage/MinTable.vue
  24. 23 14
      TEAMModelOS/ClientApp/src/view/homepage/NewHomePage.vue
  25. 2 2
      TEAMModelOS/Controllers/Common/ExamController.cs
  26. 1 1
      TEAMModelOS/Controllers/School/CorrectController.cs

+ 6 - 2
TEAMModeBI/ClientApp/src/api/index.js

@@ -11,6 +11,10 @@ function Dinglogin(data) {
 }
 //发送短信验证码
 function Phonepin(data) {
-    return post('https://api2.teammodel.net/service/sandsms/pin', data)
+    return post('/common/login/send-sms', data)
 }
-export { Dinglogin, Phonepin }
+//验证手机号和验证
+function verifyCode(data) {
+    return post('/common/login/verfiypin', data)
+}
+export { Dinglogin, Phonepin, verifyCode }

+ 0 - 2
TEAMModeBI/ClientApp/src/router/index.js

@@ -1,7 +1,5 @@
 import { createWebHistory, createRouter } from "vue-router";
 import Login from "@/view/login.vue";
-
-
 const routes = [{
     path: "/",
     name: "Login",

+ 21 - 15
TEAMModeBI/ClientApp/src/view/bindPhone.vue

@@ -20,7 +20,7 @@
         </div>
         <template #footer>
             <span class="dialog-footer">
-                <el-button type="primary" @click="centerDialogVisible = false">绑定</el-button>
+                <el-button type="primary" @click="bindUser">绑定</el-button>
                 <el-button @click="centerDialogVisible = false">取消</el-button>
             </span>
         </template>
@@ -28,13 +28,10 @@
 </template>
 <script>
 import { reactive, ref } from "vue";
-import { Phonepin } from "@/api/index.js";
+import { Phonepin, verifyCode } from "@/api/index.js";
 import { ElMessage } from "element-plus";
 export default {
-    props: ["callbackStatus"],
-    setup(props, content) {
-        console.log(props.callbackStatus, "99999999"); //msg数据
-        console.log(content.attrs.callbackStatus); //msg2数据
+    setup() {
         let centerDialogVisible = ref(true);
         let phonenum = reactive({
             phone: "",
@@ -52,7 +49,6 @@ export default {
             HasUser: true,
             country: "86",
         };
-        // centerDialogVisible = props.callbackStatus;
         var { phoneCode } = pin();
         //验证码冷却及发送验证码
         function getCode() {
@@ -72,9 +68,21 @@ export default {
                 }, 1000);
             }
             //请求接口
-
             phoneCode(phoneData);
         }
+        //手机号码绑定流程
+        function bindUser() {
+            //先获取到手机号和验证码
+            let codeNum = {
+                mobile: phonenum.phone,
+                Authorization_Pin: phonenum.code,
+            };
+            console.log(codeNum, "手机号和验证码");
+            //验证手机号和验证码
+            verifyCode(codeNum).then((res) => {
+                console.log(res, "验证接口成功");
+            });
+        }
         return {
             centerDialogVisible,
             phonenum,
@@ -82,12 +90,13 @@ export default {
             getCode,
             phoneCode,
             phoneData,
+            bindUser,
         };
     },
 };
+//发送验证码API
 function pin() {
     let phoneCode = (datas) => {
-        console.log(datas, "进入验证码接口调用!!!!!!!!");
         let parameter = {
             to: datas.to,
             lang: datas.lang,
@@ -95,12 +104,9 @@ function pin() {
             country: datas.country,
         };
         let { codesInfo } = Phonepin(parameter).then((res) => {
-            console.log(res, "接口访问成功");
-            ElMessage({
-                showClose: true,
-                message: "验证码发送成功",
-                type: "success",
-            });
+            res.status === 200
+                ? ElMessage.success("验证码发送成功")
+                : ElMessage.error("验证码发送失败");
         });
         console.log("codesInfo", codesInfo);
     };

+ 4 - 4
TEAMModeBI/ClientApp/src/view/login.vue

@@ -37,7 +37,7 @@
             </div>
         </div>
         <!-- <div id="login_container" style="transform: scale(.8);">123456</div> -->
-        <bind :callbackStatus=callbackStatus v-if="callbackStatus ==='0'"></bind>
+        <bind :callbackStatus=callbackStatus v-if="callbackStatus ===1"></bind>
     </div>
 </template>
 <script>
@@ -84,11 +84,11 @@ export default {
                 Dinglogin(datas).then((res) => {
                     console.log(res, "接口访问成功");
                     callbackStatus.value = res.status;
-                    res.status === "0"
+                    res.status === 1
                         ? ElMessage("请进行绑定醍摩豆账号操作")
-                        : res.status === "-1"
+                        : res.status === 0
                         ? ElMessage.error("登录错误,非架构内人员禁止使用")
-                        : res.status === "200"
+                        : res.status === 200
                         ? ElMessage.success("登录成功")
                         : ElMessage.error("登录异常");
                 });

+ 1 - 0
TEAMModelOS/ClientApp/src/api/login.js

@@ -99,6 +99,7 @@ export default {
 			info.toArea = areas.length && !joinSchools.length
 
 			if (defaultschool) {
+				console.error(defaultschool)
 				// 取得使用者的在該學校的設定檔
 				await this.getTeacherSchoolInfo({
 					id_token: id_token,

+ 28 - 0
TEAMModelOS/ClientApp/src/boot-app.js

@@ -109,6 +109,34 @@ Vue.prototype._ = _
 // Registration of global components
 Vue.component('icon', FontAwesomeIcon)
 
+store.dispatch('user/checkSchoolCode');// 設定登入成功的學校簡碼
+store.dispatch('user/checkUserProfile');// 檢查使用者個人詳細資訊
+store.dispatch('user/checkStudentProfile');// 檢查學生的詳細資訊
+store.dispatch('config/checkSrvAdr');// 檢查現在站的位置
+// console.error('selectArea222')
+// store.dispatch('user/checkSchoolProfile').then(res => {
+// 	console.error(res)
+//     if (res) {
+//         User.freshLogin()
+//     }
+// });// 檢查使用者在學校的詳細資訊
+
+// 检查超时操作页面,清空缓存数据
+let webEndTime = localStorage.getItem('webEndTime')
+let time_now = new Date().getTime()
+if (webEndTime && time_now > webEndTime) {
+    console.log('长时间未操作,清空storage,重新登录')
+    loginOut()
+}
+function loginOut() {
+    let login_schoolCode = localStorage.getItem('login_schoolCode')
+    let srvAdr = localStorage.getItem('srvAdr')
+    localStorage.clear()
+    localStorage.setItem('srvAdr', srvAdr)
+    localStorage.setItem('login_schoolCode', login_schoolCode)
+    window.location.href = window.location.origin + '/login'
+}
+
 router.beforeEach((to, from, next) => {
     document.body.scrollTop = 0
     next()

+ 1 - 1
TEAMModelOS/ClientApp/src/common/BaseLayout.vue

@@ -891,7 +891,7 @@ export default {
 html,
 body {
 	 // font-family:"Microsoft YaHei",'微軟正黑體','Microsoft JhengHei UI','Microsoft JhengHei';
-	// font-family:'微軟正黑體','Microsoft JhengHei UI','Microsoft JhengHei';
+	font-family:'微軟正黑體','Microsoft JhengHei UI','Microsoft JhengHei';
 }
 
 .biz-menu .ivu-menu-vertical .ivu-menu-item-group-title {

+ 101 - 38
TEAMModelOS/ClientApp/src/common/BaseNotification.vue

@@ -31,14 +31,17 @@
 			return {
 				msgArr: [],
 				msgTypes: {
-					'request_school': vm.$t('notice.type1'),
-					'invite_school': vm.$t('notice.type2'),
-					'remove_school':vm.$t('notice.type3'),
-					'request-join_school':vm.$t('notice.type1'),
-					'invite-join_school':vm.$t('notice.type2'),
-					'coedit_syllabus':vm.$t('notice.type4'),
-					'share_syllabus':vm.$t('notice.type4'),
-					'transfer-admin_school':vm.$t('notice.type5'),
+					'request_school': vm.$t('notice.type1'), // 管理员收到他人申请加入的通知
+					'invite_school': vm.$t('notice.type2'), // 你收到学校邀请你的通知
+					'remove_school': vm.$t('notice.type3'), // 学校将你移除的通知
+					'request-join_school': vm.$t('notice.type1'), // 学校同意你的加入请求
+					'invite-join_school': vm.$t('notice.type2'), // 某人已同意你对他的邀请
+					'coedit_syllabus': vm.$t('notice.type4'), // 邀请课纲共编的通知
+					'share_syllabus': vm.$t('notice.type4'), // 个人课纲分享的通知
+					'transfer-admin_school': vm.$t('notice.type5'), // 管理员转移的通知
+					'scoring-arb_school':vm.$t('notice.type6'), // 仲裁卷阅卷任务分配通知
+					'scoring-err_school':vm.$t('notice.type6'), // 异常卷阅卷任务分配通知
+					'scoring-mark_school':vm.$t('notice.type6'), // 普通阅卷任务分配通知
 				}
 			}
 		},
@@ -82,44 +85,105 @@
 						break;
 					case 'transfer-admin_school':
 						return `${body.schoolname}-${body.tmdname} ${this.$t('notice.tip9')}`
-						break;				
+						break;
+					case 'scoring-arb_school':
+						return `${body.schoolname}-${body.tmdname} ${this.$t('notice.tip10')}【${body.examname}】 `
+						break;
+					case 'scoring-err_school':
+						return `${body.schoolname}-${body.tmdname} ${this.$t('notice.tip11')}【${body.examname}】 `
+						break;
+					case 'scoring-mark_school':
+						return `${body.schoolname}-${body.tmdname} ${this.$t('notice.tip12')}【${body.examname}】 `
+						break;	
 					default:
 						break;
 				}
 			},
-			doClickMsg(msg,index) {
-				console.log(msg)
+			doClickMsg(msg, index) {
+				let body = JSON.parse(this.getBodyJson(msg.body))
+				let routerInfo = null
 				switch (msg.label) {
 					case 'request_school':
-						this.$router.push({
-							name: "teachermgmt",
-						})
+						routerInfo = { name: "teachermgmt"	}
 						break;
 					case 'invite-join_school':
-						this.$router.push({
-							name: "teachermgmt",
-						})
-						break;	
+						routerInfo = { name: "teachermgmt"	}
+						break;
 					case 'invite_school':
-						this.$router.push({
-							name: "settings",
-						})
+						routerInfo = { name: "settings"	}
 						break;
 					case 'coedit_syllabus':
-						this.$router.push({
-							name: "syllabus",
-						})
+						routerInfo = { name: "syllabus"	}
+						break;
+					case 'scoring-arb_school':
+						routerInfo = { name: "taskList"	}
+						break;
+					case 'scoring-err_school':
+						routerInfo = { name: "taskList"	}
+						break;
+					case 'scoring-mark_school':
+						routerInfo = { name: "taskList"	}
 						break;
 					case 'share_syllabus':
-						this.$router.push({
+						routerInfo = {
 							name: "personalSyllabus",
-							tabName:'fromShare'
-						})
-						break;		
+							tabName: 'fromShare'
+						}
+						break;
 					default:
 						break;
 				}
-				this.msgArr.splice(index,1)
+				this.changeSchool(body.schoolcode,routerInfo)
+				this.msgArr.splice(index, 1)
+			},
+			changeSchool(schoolCode,routerInfo) {
+				return new Promise((r,j) => {
+					if(!routerInfo) return
+					// 如果是同一学校则不做处理
+					if (schoolCode === this.$store.state.userInfo.schoolCode || !schoolCode) {
+						this.$router.push(routerInfo)
+						return
+					}
+					// 需要切换学校
+					let user = this.$store.state.user.userProfile || JSON.parse(decodeURIComponent(localStorage.user_profile, "utf-8"));
+					let joinSchools = user.schools && user.schools.length ? user.schools.filter(i => i.status === 'join') : null
+					if (joinSchools && joinSchools.length) {
+						joinSchools.forEach(i => {
+							if (!i.area) {
+								i.area = {
+									name: this.$t('ability.otherSch')
+								}
+							}
+						})
+						let areaName = joinSchools.find(i => i.schoolId === schoolCode).area.name
+						if(areaName !== sessionStorage.getItem('areaName')){
+							this.$Modal.confirm({
+								title: this.$t('settings.modalTip4'),
+								content: this.$t('settings.modalTip9'),
+								onOk: () => {
+									this.$EventBus.$emit('resetAreaIndex', {
+										areaName: areaName,
+										schoolCode: schoolCode,
+										routerInfo:routerInfo
+									})
+									r(200)
+								},
+								onCancel: () => {
+									r(500)
+								}
+							})
+						}else{
+							this.$EventBus.$emit('resetAreaIndex', {
+								areaName: areaName,
+								schoolCode: schoolCode,
+								routerInfo:routerInfo
+							})
+							r(200)
+						}
+					}else{
+						r(500)
+					}
+				})
 			}
 		},
 		watch: {
@@ -136,7 +200,6 @@
 						console.log(curLocation)
 						console.log(this.msgArr)
 					}
-					
 				}
 			}
 		}
@@ -158,8 +221,8 @@
 			top: 65px !important;
 			z-index: 9999;
 			width: 450px !important;
-			
-			.ivu-poptip-body{
+
+			.ivu-poptip-body {
 				max-height: 320px;
 				overflow: auto;
 			}
@@ -180,16 +243,16 @@
 			box-shadow: none;
 			padding: 0;
 		}
-		
-		.notice-empty{
+
+		.notice-empty {
 			display: flex;
 			flex-direction: column;
 			justify-content: center;
 			align-items: center;
 			margin: 20px 0;
 			color: #b3b3b3;
-			
-			.ivu-icon{
+
+			.ivu-icon {
 				font-size: 44px;
 				margin-bottom: 20px;
 				color: #6c6c6c;
@@ -217,8 +280,8 @@
 					// color: #fff;
 					margin: 10px 0;
 				}
-				
-				.item-content{
+
+				.item-content {
 					word-break: break-all;
 					white-space: break-spaces;
 					color: var(--second-text-color);

+ 13 - 12
TEAMModelOS/ClientApp/src/common/BaseSelectArea.vue

@@ -94,14 +94,15 @@
 		},
 		methods: {
 			/* 区级切换时,如果时因为切换学校导致切换区域,则需要把切换的学校编码带进来 否则默认第一个学校 */
-			onAreaSelect(val,defaultSchoolCode){
+			onAreaSelect(val,defaultSchoolCode,routerInfo){
 				this.curAreaIndex = val
 				let areaSchs = this.joinSchools.filter(i => i.area.name === this.areaList[this.curAreaIndex])
 				let curSchIndex = defaultSchoolCode ? areaSchs.map(i => i.schoolId).indexOf(defaultSchoolCode) : 0
 				this.onSchoolSelect(areaSchs[curSchIndex])
 				this.$EventBus.$emit('onChangeArea', {
 					areaName:this.areaList[this.curAreaIndex],
-					schoolCode:defaultSchoolCode
+					schoolCode:defaultSchoolCode,
+					routerInfo:routerInfo || null
 				})
 				sessionStorage.setItem('areaId',areaSchs[curSchIndex].areaId)
 				sessionStorage.setItem('areaName',areaSchs[curSchIndex].area.name)
@@ -112,12 +113,11 @@
 				console.log(this.user.schools)
 				console.log(this.joinSchools)
 				this.joinSchools = this.user.schools.filter(i => i.status === 'join')
-				this.$EventBus.$emit('onGlobalLoading', true)
 				this.curSchool = val
 				let schoolCode = val.schoolId
-				this.$EventBus.$emit('onChangeSchool', {
-					schoolCode: schoolCode,
-				})
+				// this.$EventBus.$emit('onChangeSchool', {
+				// 	schoolCode: schoolCode,
+				// })
 				// 更新当前school_code
 				this.$store.dispatch('user/setSchoolCode', schoolCode)
 				// 更新当前school_profile以及access
@@ -126,13 +126,14 @@
 						this.$User.freshLogin()
 					}
 				});
-				setTimeout(() => {
-					this.$EventBus.$emit('onGlobalLoading', false)
-				}, 500)
-				// this.$router.push({
-				// 	name: 'home'
-				// })
 			},
+		},
+		mounted() {
+			// 切换到某个区的某个学校
+			this.$EventBus.$off('resetAreaIndex')
+			this.$EventBus.$on('resetAreaIndex', params => {
+				this.onAreaSelect(this.areaList.indexOf(params.areaName),params.schoolCode,params.routerInfo)
+			})
 		}
 	}
 </script>

+ 33 - 26
TEAMModelOS/ClientApp/src/common/BaseSelectSchool.vue

@@ -47,6 +47,7 @@
 	import { mapGetters } from 'vuex'
 	import User from '@/service/User.js'
 	export default {
+		inject:['reload'],
 		data() {
 			return {
 				curSchool: {
@@ -131,7 +132,7 @@
 				let curAreaName = sessionStorage.getItem('areaName') || this.areaList[0]
 				this.joinSchools = this.user.schools.filter(i => i.status === 'join')
 				this.areaSchs = this.joinSchools.filter(i => i.area.name === curAreaName)
-				this.$EventBus.$emit('onGlobalLoading', true)
+				// this.$EventBus.$emit('onGlobalLoading', true)
 				this.curSchool = this.areaSchs[val]
 				let schoolCode = this.areaSchs[val].schoolId
 				this.changeCurSchool(schoolCode)
@@ -149,10 +150,11 @@
 			},
 			
 			/* 学校切换后针对当前学校CODE进行操作 */
-			changeCurSchool(schoolCode){
-				this.$EventBus.$emit('onChangeSchool', {
-					schoolCode: schoolCode
-				})
+			changeCurSchool(schoolCode,routerInfo){
+				// this.$EventBus.$emit('onChangeSchool', {
+				// 	schoolCode: schoolCode
+				// })
+				this.$EventBus.$emit('onGlobalLoading', true)
 				// 更新当前school_code
 				this.$store.dispatch('user/setSchoolCode', schoolCode)
 				// 更新当前school_profile以及access
@@ -160,33 +162,38 @@
 					if (res) {
 						this.$User.freshLogin()
 					}
+					console.log(localStorage.getItem('auth_token'))
+					console.log('切换学校了',this.curSchool,schoolCode)
+					console.log('当前学校的学段信息',this.$store.state.user.schoolProfile.school_base.id)
+					console.log('当前学校的学段信息',this.$store.state.user.schoolProfile.school_base.period)
+					this.periods = this.$store.state.user.schoolProfile.school_base.period
+					this.periods && (this.curPeriod = this.periods[0])
+					this.onPeriodSelect(0)
 					setTimeout(() => {
 						this.$EventBus.$emit('onGlobalLoading', false)
-						console.log('切换学校了',this.curSchool,schoolCode)
-						console.log('当前学校的学段信息',this.$store.state.user.schoolProfile.school_base.id)
-						console.log('当前学校的学段信息',this.$store.state.user.schoolProfile.school_base.period)
-						this.periods = this.$store.state.user.schoolProfile.school_base.period
-						this.periods && (this.curPeriod = this.periods[0])
-						this.onPeriodSelect(0)
-					}, 500)
-					this.$router.push({
-						name: 'home'
-					})
+					}, 1500)
+					routerInfo = routerInfo || { name: 'homePage' }
+					console.error(routerInfo.name);
+					console.error(this.$route);
+					this.$router.push(routerInfo)
+					if(routerInfo.name === this.$route.name){
+						this.reload()
+					}
 				});
 			}
 		},
 		mounted() {
 			// 解绑之前的事件 防止多次触发
-			this.$EventBus.$off('onChangeSchool')
-			this.$EventBus.$on('onChangeSchool', params => {
-				if (this.curSchool && params.schoolCode !== this.curSchool.schoolId && params.user) {
-					console.log('检测到切换学校')
-					console.log(params)
-					this.user = params.user
-					let joinSchools = params.user.schools.filter(i => i.status === 'join')
-					this.onSchoolSelect(params.isFirst ? 0 : joinSchools.map(j => j.schoolId).indexOf(params.schoolCode))
-				}
-			})
+			// this.$EventBus.$off('onChangeSchool')
+			// this.$EventBus.$on('onChangeSchool', params => {
+			// 	if (this.curSchool && params.schoolCode !== this.curSchool.schoolId && params.user) {
+			// 		console.log('检测到切换学校')
+			// 		console.log(params)
+			// 		this.user = params.user
+			// 		let joinSchools = params.user.schools.filter(i => i.status === 'join')
+			// 		this.onSchoolSelect(params.isFirst ? 0 : joinSchools.map(j => j.schoolId).indexOf(params.schoolCode))
+			// 	}
+			// })
 			
 			// 监听区的切换
 			this.$EventBus.$off('onChangeArea')
@@ -198,7 +205,7 @@
 					console.log(this.areaSchs);
 					this.curSchool = params.schoolCode ? this.areaSchs.find(i => i.schoolId === params.schoolCode) : this.areaSchs[0]
 					let schoolCode = this.curSchool.schoolId
-					this.changeCurSchool(schoolCode)
+					this.changeCurSchool(schoolCode,params.routerInfo)
 				}
 			})
 		},

+ 12 - 4
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventList.vue

@@ -59,7 +59,7 @@
                 </div>
                 <!---按鈕搜尋區(多選)--->
                 <span>{{ $t("studentWeb.choiceTime") }}:</span>
-                <DatePicker type="date" :options="options" @on-change="dateChange" :placeholder="$t('studentWeb.missionListCardPlace')" />
+                <DatePicker type="date" :value="choDate" :options="options" @on-change="dateChange" :placeholder="$t('studentWeb.missionListCardPlace')" />
             </div>
             <!--活動清單分頁-->
             <div class="list-block"
@@ -160,7 +160,11 @@ import { mapGetters, mapState } from 'vuex';
                 console.log(id);
                 this.delListData(id)
             })
-            this.getActivityInfo()
+            if(this.getChoseDate) {
+                this.dateChange(this.getChoseDate)
+            } else {
+                this.getActivityInfo()
+            }
             this.selectedCondition(this.getItemTitle);
             if (this.getIsSelectedNow == false) {
                 this.predealMockdatafirstItem();
@@ -219,7 +223,8 @@ import { mapGetters, mapState } from 'vuex';
                     disabledDate (date) {
                         return date && date.valueOf() > Date.now() - 86400000;
                     }
-                }
+                },
+                choDate: "",
             };
         },
         components: { PreviewProgressPie },
@@ -271,7 +276,8 @@ import { mapGetters, mapState } from 'vuex';
                 "getisFromInfoPoptoScroll",
                 "getFilterType",
                 "getFinishedItem",
-                "getFinishedItemTime"
+                "getFinishedItemTime",
+                "getChoseDate"
             ])
         },
         methods: {
@@ -617,6 +623,8 @@ import { mapGetters, mapState } from 'vuex';
             },
 
             dateChange(date) {
+                this.choDate = date
+                this.$store.commit("setChoseDate", date)
                 let time = (new Date(new Date(new Date(date).toLocaleDateString()).getTime())).getTime()
                 this.getActivityInfo(time)
             },

+ 6 - 1
TEAMModelOS/ClientApp/src/components/student-web/HomeView/newHomeView.vue

@@ -535,6 +535,7 @@ export default {
         choiceDate(date) {
             this.choDate = date
             let time = (new Date(new Date(new Date(date).toLocaleDateString()).getTime())).getTime()
+            this.$store.commit("setChoseDate", date)
             this.getActivityInfo(time)
         },
     },
@@ -543,7 +544,11 @@ export default {
         (this.MyName = this.$t("studentWeb.homeView-title")),
         this.$emit("onNavNo", this.MyNo)
         this.$emit("onNavName", this.MyName)
-        this.getActivityInfo()
+        if(this.$store.getters.getChoseDate) {
+            this.choiceDate(this.$store.getters.getChoseDate)
+        } else {
+            this.getActivityInfo()
+        }
         this.getClassList()
     },
     mounted() {

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

@@ -5,6 +5,7 @@ export default {
 	type3:'Removal Notification',
 	type4:'Syllabus Notification',
 	type5:'Administrator transfer Notification',
+	type6:'阅卷任务分配通知',
 	tip1:'applies to join',
 	tip2:'has invited you to join',
 	tip3:'has granted your request to join',
@@ -13,5 +14,8 @@ export default {
 	tip6:'has removed you',
 	tip7:'You are invited to co-edit the school syllabus',
 	tip8:'shared a syllabus with you',
-	tip9:'老師將管理員轉讓給您'
+	tip9:'老師將管理員轉讓給您',
+	tip10:'给您分配了阅卷任务',
+	tip11:'给您分配了异常卷阅卷任务',
+	tip12:'给您分配了仲裁卷阅卷任务',
 }

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

@@ -36,6 +36,7 @@ export default {
 	modalTip3: 'Any unsaved information on this page will be lost, do you agree to continue?',
 	modalTip7:'Confirm to set',
 	modalTip8:'as your default school?',
+	modalTip9:'Are you sure you want to switch schools?',
 	columnName: 'School Name',
 	columnArea: 'Areal',
 	columnId: 'School Short Code',

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

@@ -5,6 +5,7 @@ export default {
 	type3:'移除通知',
 	type4:'课纲通知',
 	type5:'管理员转让通知',
+	type6:'阅卷任务分配通知',
 	tip1:'申请加入',
 	tip2:'邀请您加入',
 	tip3:'已同意您的加入请求',
@@ -13,5 +14,8 @@ export default {
 	tip6:'已将您移除',
 	tip7:'邀请您共编校本课纲',
 	tip8:'给您分享了课纲',
-	tip9:'老师将管理员转让给您'
+	tip9:'老师将管理员转让给您',
+	tip10:'给您分配了阅卷任务',
+	tip11:'给您分配了异常卷阅卷任务',
+	tip12:'给您分配了仲裁卷阅卷任务',
 }

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

@@ -36,6 +36,7 @@ export default {
 	modalTip3:'当前页面未保存的资料将会丢失,是否同意此操作?',
 	modalTip7:'确认将',
 	modalTip8:'设置为您的默认学校?',
+	modalTip9:'确定要切换学校吗?',
 	columnName:'学校名称',
 	columnArea:'地区',
 	columnId:'校代码',

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

@@ -5,6 +5,7 @@ export default {
 	type3: '移除通知',
 	type4: '課綱通知',
 	type5:'管理員轉讓通知',
+	type6:'閱卷任務分配通知',
 	tip1: '申請加入',
 	tip2: '邀請您加入',
 	tip3: '已同意您的加入請求',
@@ -13,5 +14,8 @@ export default {
 	tip6: '已將您移除',
 	tip7: '邀請您共編校本課綱',
 	tip8: '給您分享了課綱',
-	tip9:'老師將管理員轉讓給您'
+	tip9:'老師將管理員轉讓給您',
+	tip10:'給您分配了閱卷任務',
+	tip11:'給您分配了異常卷閱卷任務',
+	tip12:'給您分配了仲裁卷閱卷任務',
 }

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

@@ -36,6 +36,7 @@ export default {
     modalTip3: '當前頁面未儲存的資料將會遺失,是否同意此操作?',
 	modalTip7:'確認將',
 	modalTip8:'設定為您的默認學校?',
+	modalTip9:'確定要切換學校嗎?',
     columnName: '學校名稱',
     columnArea: '地區',
     columnId: '學校簡碼',

+ 7 - 0
TEAMModelOS/ClientApp/src/store/module/studentWeb.js

@@ -88,6 +88,7 @@ export default {
         myCourseID: [],
         addSuccess: false,
         coureseMessageOpen: false, //是否打開加入課程的提示訊息
+        choseDate: "",
     },
 
     //定義方法
@@ -307,6 +308,9 @@ export default {
         OpenCommentList(state, open) {
             state.isOpenCommentList = open;
         },
+        setChoseDate(state, time) {
+            state.choseDate = time
+        }
     },
     getters: {
         getStuUserInfo: (state) => {
@@ -432,5 +436,8 @@ export default {
                 coureseMessageOpen: state.coureseMessageOpen,
             };
         },
+        getChoseDate: (state) => {
+            return state.choseDate
+        }
     },
 }

+ 0 - 2
TEAMModelOS/ClientApp/src/store/module/user.js

@@ -748,7 +748,6 @@ export default {
             if (school_profile) {
                 context.dispatch('setSchoolProfile', JSON.parse(decodeURIComponent(school_profile, "utf-8")))
             }
-
             let login_schoolCode = localStorage.getItem('login_schoolCode')
             let id_token = localStorage.getItem('id_token')
 
@@ -760,7 +759,6 @@ export default {
                     roles: '',
                     permissions: ''
                 }
-
                 await apiTools.login.getTeacherSchoolInfo({
                     id_token: id_token,
                     school_code: login_schoolCode

+ 38 - 50
TEAMModelOS/ClientApp/src/view/Home.vue

@@ -4,8 +4,8 @@
         <BaseLayout>
             <!-- 头部右侧个人中心部分 -->
             <div class="header-right-box fl-around" slot="header-content">
-                <Icon style="display:block" custom="iconfont icon-home" :color="routerName == 'homePage' ? '#1CC0F3':'#d0d0d0'" @click="toHome" :title="$t('system.goHome')" />
-                <Icon type="md-open" @click="changePlatform" :title="$t('system.changePlat')" v-if="hasArea" />
+                <Icon style="display:block" custom="iconfont icon-home" :color="routerName == 'homePage' ? '#1CC0F3':'#d0d0d0'" @click="toHome" :title="$t('system.goHome')"/>
+                <Icon type="md-open" @click="changePlatform" :title="$t('system.changePlat')" v-if="hasArea"/>
                 <BaseNotification :msgs="msgs"></BaseNotification>
                 <span class="header-split"></span>
                 <!-- <Icon type="ios-settings" :color="routerName == 'settings' ? '#1CC0F3':'#d0d0d0'" @click="toSettings" /> -->
@@ -14,9 +14,9 @@
                 <BaseUserPoptip @logout="basicMenu('quit')"></BaseUserPoptip>
             </div>
             <div id="content" class="custom-scroll-bar" slot="content">
-                <router-view v-if="!$route.meta.isKeep" :key="this.$route.name"></router-view>
+                <router-view v-if="!$route.meta.isKeep && isRouterAlive" :key="this.$route.name"></router-view>
                 <keep-alive>
-                    <router-view v-if="$route.meta.isKeep" :key="this.$route.name"></router-view>
+                    <router-view v-if="$route.meta.isKeep && isRouterAlive" :key="this.$route.name"></router-view>
                 </keep-alive>
             </div>
         </BaseLayout>
@@ -28,39 +28,27 @@ export default {
     name: 'headers',
     props: ['parentToChild', 'identityselect'],
     components: {},
+	provide(){
+		return {
+			reload:this.reload
+		}
+	},
     data() {
         return {
+			isRouterAlive:true,
             msgs: [],
             isShowMock: false,
             isOpenDrawer: false,
             routerName: '',
             isLoading: false,
-            curPlatform: '',
-            location: ''
+			curPlatform:'',
+			location:''
         }
     },
     created() {
-        console.log('刷新页面')
-        // 检查超时操作页面,清空缓存数据
-        let webEndTime = localStorage.getItem('webEndTime')
-        let time_now = new Date().getTime()
-        if (webEndTime && time_now > webEndTime) {
-            console.log('长时间未操作,清空storage,重新登录')
-            loginOut()
-        }
-        this.$store.dispatch('user/checkSchoolCode');// 設定登入成功的學校簡碼
-        this.$store.dispatch('user/checkUserProfile');// 檢查使用者個人詳細資訊
-        this.$store.dispatch('user/checkStudentProfile');// 檢查學生的詳細資訊
-        this.$store.dispatch('config/checkSrvAdr');// 檢查現在站的位置
-        this.$store.dispatch('user/checkSchoolProfile').then(res => {
-            if (res) {
-                this.$User.freshLogin()
-            }
-        });// 檢查使用者在學校的詳細資訊
-
         let user = JSON.parse(decodeURIComponent(localStorage.userInfo, "utf-8"))
         let user_profile = JSON.parse(decodeURIComponent(localStorage.user_profile, "utf-8"))
-        this.location = user_profile.location
+		this.location = user_profile.location
         console.log(user_profile)
         if (user_profile.schools) {
             user_profile.schools = user_profile.schools.filter((item) => {
@@ -84,26 +72,25 @@ export default {
         }
         this.$store.commit('setPrivateSpace', user_profile.total || 0)
         this.getAllNotice(user_profile, user.id)
-        this.curPlatform = localStorage.getItem('platform') || 'school'
+		this.curPlatform = localStorage.getItem('platform') || 'school'
 
     },
     methods: {
-        loginOut() {
-            let login_schoolCode = localStorage.getItem('login_schoolCode')
-            let srvAdr = localStorage.getItem('srvAdr')
-            localStorage.clear()
-            localStorage.setItem('srvAdr', srvAdr)
-            localStorage.setItem('login_schoolCode', login_schoolCode)
-            window.location.href = window.location.origin + '/login'
-        },
-        changePlatform() {
-            let goPlatform = this.curPlatform === 'area' ? 'school' : 'area'
-            this.$router.push({
-                name: goPlatform === 'area' ? 'area' : 'home'
-            })
-            localStorage.setItem('platform', this.curPlatform === 'area' ? 'school' : 'area')
-            this.curPlatform = goPlatform
-        },
+		reload(){
+			console.error('reload==============================')
+			this.isRouterAlive = false
+			this.$nextTick(() => {
+				this.isRouterAlive = true
+			})
+		},
+		changePlatform(){
+			let goPlatform = this.curPlatform === 'area' ? 'school' : 'area'
+			this.$router.push({
+			    name: goPlatform === 'area' ? 'area' : 'home'
+			})
+			localStorage.setItem('platform',this.curPlatform === 'area' ? 'school' : 'area')
+			this.curPlatform = goPlatform
+		},
         async getAllNotice(user_profile, userId) {
             let schoolNotice = await this.getSchoolNotice(user_profile, userId)
             let privateNotice = await this.getPrivateNotice(userId)
@@ -127,7 +114,7 @@ export default {
         getPrivateNotice(userId) {
             return new Promise((r, j) => {
                 this.$api.service.getNotification({
-                    "from": "ies5:" + this.location + ":private",
+                    "from": "ies5:"  + this.location + ":private",
                     "receiver": userId
                 }).then(res => {
                     r(res.msgs)
@@ -164,10 +151,11 @@ export default {
             localStorage.setItem('noSave', '[]')
         }
 
-        this.$EventBus.$off('onGlobalLoading')
-        this.$EventBus.$on('onGlobalLoading', val => {
-            this.isLoading = val
-        })
+   //      this.$EventBus.$off('onGlobalLoading')
+   //      this.$EventBus.$on('onGlobalLoading', val => {
+			// console.error('HOMT',val)
+			// this.isLoading = val
+   //      })
 
         this.$EventBus.$off('noSave')
         this.$EventBus.$on('noSave', val => {
@@ -181,9 +169,9 @@ export default {
         hasSchool() {
             return this.$store.state.userInfo.hasSchool;
         },
-        hasArea() {
-            return this.$store.state.user.userProfile.areas.length > 0
-        }
+		hasArea(){
+			return this.$store.state.user.userProfile.areas.length > 0
+		}
     },
     watch: {
         $route: {

+ 3 - 2
TEAMModelOS/ClientApp/src/view/homepage/HomePage.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
     <!-- 验证提示调整为提示框 -->
     <!-- <div v-if="!isComplete" class="uncomplete-wrap">
         <p class="verify-info-text" v-if="!$store.state.userInfo.hasSchool">
@@ -413,7 +413,8 @@ export default {
     mounted() {
         this.$EventBus.$off('onGlobalLoading')
         this.$EventBus.$on('onGlobalLoading', (data) => {
-            if (data) this.getAcCount()
+			console.error('Home',data);
+            if (!data) this.getAcCount()
         })
     },
     computed: {

+ 8 - 8
TEAMModelOS/ClientApp/src/view/homepage/MinTable.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
     <div class="home-cus-plan">
         <Table :columns="columns" :data="cusData" border :loading="tabalLoading">
             <!--星期一-->
@@ -119,13 +119,13 @@ export default {
         }),
     },
     watch: {
-        '$store.state.userInfo.schoolCode': {
-            handler(n, o) {
-                this.getCourseList()
-            },
-            deep: true,
-            immediate: true
-        }
+        // '$store.state.userInfo.schoolCode': {
+        //     handler(n, o) {
+        //         this.getCourseList()
+        //     },
+        //     deep: true,
+        //     immediate: true
+        // }
     },
     methods: {
         toDetail() {

+ 23 - 14
TEAMModelOS/ClientApp/src/view/homepage/NewHomePage.vue

@@ -1,5 +1,6 @@
-<template>
+<template>
     <div class="home-page-container">
+		<Loading v-if="isLoading" :top="300"></Loading>
         <vuescroll>
             <div class="chart-box">
                 <div class="chart-box-column1">
@@ -165,6 +166,7 @@ export default {
     inject: ['reload'],
     data() {
         return {
+			isLoading:false,
             //总学时数据
             allTimeInfo: {
                 complete: 0,
@@ -329,7 +331,7 @@ export default {
                     this.trainCountList[8].complete = res.voteDoneCount
                 }
             }).finally(() => {
-                this.isLoading = false
+                // this.isLoading = false
             })
         },
         viewNotice(index) {
@@ -399,6 +401,7 @@ export default {
 
         //获取活动统计数据已经进行中的活动
         getAcCount() {
+			this.isLoading = true
             this.$api.learnActivity.ActivityCount({}).then(
                 res => {
                     if (res.totalCount && res.totalCount.length) {
@@ -433,21 +436,27 @@ export default {
                 err => {
                     this.$Message.error('API error!')
                 }
-            )
+            ).finally(() => {
+				this.isLoading = false
+			})
         }
     },
     created() {
-        this.getAcCount()
-        this.getStudyTime()
+		this.getAcCount()
+		this.getStudyTime()
         if (this.$store.state.userInfo.hasSchool) {
             this.findNotice()
         }
     },
     mounted() {
-        this.$EventBus.$off('onChangeSchool')
-        this.$EventBus.$on('onChangeSchool', (data) => {
-            this.getAcCount()
-        })
+   //      this.$EventBus.$off('onGlobalLoading')
+   //      this.$EventBus.$on('onGlobalLoading', (data) => {
+			// if(!data){
+			// 	this.getAcCount()	
+			// }else{
+			// 	this.isLoading = data
+			// }
+   //      })
     },
     computed: {
         //暂时只验证加入学校, 手机号需要对接API
@@ -456,11 +465,11 @@ export default {
         }
     },
     watch: {
-        '$store.state.userInfo.schoolCode': {
-            handler(n, o) {
-                this.getAcCount()
-            }
-        }
+        // '$store.state.userInfo.schoolCode': {
+        //     handler(n, o) {
+        //         this.getAcCount()
+        //     }
+        // }
     }
 }
 </script>

+ 2 - 2
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -2418,7 +2418,7 @@ namespace TEAMModelOS.Controllers
                                             from = $"ies5:{_option.Location}:private",
                                             to = ids,
                                             label = $"{bizcode}_school",
-                                            body = new { location = _option.Location, biz = bizcode, tmdid = userid, tmdname = name.ToString(), schoolcode = school, schoolname = $"{schname}", status = 1, time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() }.ToJsonString(),
+                                            body = new { location = _option.Location, biz = bizcode, tmdid = userid, tmdname = name.ToString(), schoolcode = school, schoolname = $"{schname}",examname = correct.name, status = 1, time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() }.ToJsonString(),
                                             expires = DateTimeOffset.UtcNow.AddDays(7).ToUnixTimeSeconds()
                                         };
                                         var url = _configuration.GetValue<string>("HaBookAuth:CoreService:sendnotification");
@@ -2571,7 +2571,7 @@ namespace TEAMModelOS.Controllers
                     from = $"ies5:{_option.Location}:private",
                     to = ids,
                     label = $"{bizcode}_school",
-                    body = new { location = _option.Location, biz = bizcode, tmdid = userid, tmdname = name.ToString(), schoolcode = school, schoolname = $"{schname}", status = 1, time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() }.ToJsonString(),
+                    body = new { location = _option.Location, biz = bizcode, tmdid = userid, tmdname = name.ToString(), schoolcode = school, schoolname = $"{schname}",examname = correct.name, status = 1, time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() }.ToJsonString(),
                     expires = DateTimeOffset.UtcNow.AddDays(7).ToUnixTimeSeconds()
                 };
                 var url = _configuration.GetValue<string>("HaBookAuth:CoreService:sendnotification");

+ 1 - 1
TEAMModelOS/Controllers/School/CorrectController.cs

@@ -224,7 +224,7 @@ namespace TEAMModelOS.Controllers
                     from = $"ies5:{_option.Location}:private",
                     to = ids,
                     label = $"{bizcode}_school",
-                    body = new { location = _option.Location, biz = bizcode, tmdid = userid, tmdname = name.ToString(), schoolcode = school, schoolname = $"{schname}", status = 1, time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() }.ToJsonString(),
+                    body = new { location = _option.Location, biz = bizcode, tmdid = userid, tmdname = name.ToString(), schoolcode = school, schoolname = $"{schname}", examname = request.name, status = 1, time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() }.ToJsonString(),
                     expires = DateTimeOffset.UtcNow.AddDays(7).ToUnixTimeSeconds()
                 };
                 var url = _configuration.GetValue<string>("HaBookAuth:CoreService:sendnotification");