Selaa lähdekoodia

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

zhouj1203@hotmail.com 1 vuosi sitten
vanhempi
commit
94b685673b

+ 1 - 1
TEAMModelOS.FunctionV4/HttpTrigger/IESHttpTrigger.cs

@@ -327,7 +327,7 @@ namespace TEAMModelOS.FunctionV4
                         var bindIds = period.subjects.Where(s => !string.IsNullOrWhiteSpace(s.bindId)).Select(x => x.bindId);
                         //该学段未同步学科的。
                         var unBindIds = dimension.Where(z => !string.IsNullOrWhiteSpace(z.subjectBind)).Select(x => x.subjectBind).ToHashSet().Except(bindIds);
-                        if (unBindIds.Any())
+                        if (unBindIds.Any()  && unBindIds.Count()>0)
                         {
                             //尝试寻找同名学科且没有设置bindId的
                             foreach (var unBindId in unBindIds)

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/zh-CN.js

@@ -4749,6 +4749,7 @@ const LANG_ZH_CN = {
             expire: '该状态码已过期!',
             basicCourses: '基本课程',
             system: '系统',
+            semester: '切换学期后会刷新课程,需回到首页重新选择课程,请问是否切换到:',
         },
         coursesCardTitle: '我的课程清单',
         newAddCourse: '最新加入课程',

+ 16 - 1
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/PaperTest.vue

@@ -99,7 +99,9 @@
                     <h3>{{$t("studentWeb.exam.testpop.submitQuizhint")}}</h3>
                     <svg-icon icon-class="unfinishedTest" class="handOnImg" />
                     <p>{{$t("studentWeb.exam.testpop.submitQuizhint1")}}</p>
-                    <button class="messageCardBtn" @click="closetest()">{{$t("studentWeb.exam.testpop.okSubmit")}}</button>
+                    <button class="messageCardBtn" @click="closetest()">
+                        {{$t("studentWeb.exam.testpop.okSubmit")}}({{ modalSecond }}s)
+                    </button>
                 </div>
             </div>
         </div>
@@ -565,7 +567,9 @@
                 setTime: false, //评测是否设置时间
                 surplus: "", //倒计时的字符
                 diffSeconds: 0, //秒数
+                modalSecond: 10, //弹出框秒数
                 interval: undefined, //计时器
+                modalInterval: undefined, //弹出框的倒计时(10s)
                 showExam: [],
                 totalScore: 0, //练习总分
                 showEnd: false, //结束练习
@@ -961,6 +965,9 @@
             },
             //提交作答记录
             closetest() {
+                if(this.modalInterval) {
+                    clearInterval(this.modalInterval)
+                }
                 this.WarmMessageisOpen = false
                 if (this.checkers.length) {
                     this.isLoading = true;
@@ -1258,6 +1265,14 @@
                         clearInterval(this.interval)
                         this.WarmMessageisOpen = true
                         this.showMessageNum = 6
+                        // 弹出框倒计时10s,到时间直接交卷
+                        this.modalInterval = setInterval(() => {
+                            if(this.modalSecond > 1) {
+                                this.modalSecond -= 1
+                            } else {
+                                this.closetest()
+                            }
+                        }, 1000)
                         this.$forceUpdate()
                     } else {
                         // 小时

+ 24 - 2
TEAMModelOS/ClientApp/src/view/student-web/AppNew.vue

@@ -12,8 +12,9 @@
                 <span :class="['mytitle', {'no-show-title': MyNo === '1' || windowWidth < 852}]">{{ MyName }}</span>
             </div>
             <div class="selectClass" v-if="MyNo != '11'">
-                <template v-if="userInfo.scope === 'student' && semesterLists.length && showSemester">
-                    <Select v-model="selectSemester" style="width: 150px; margin-right: 10px;" filterable :placeholder="$t('cusMgt.sltCusTips')" @on-change="getClassList">
+                <!-- 调整为所有页面显示学年期,除首页外,其他页面切换时需弹出框提示会刷新课程列表,回到首页重新选择课程 -->
+                <template v-if="userInfo.scope === 'student' && semesterLists.length">
+                    <Select v-model="selectSemester" style="width: 150px; margin-right: 10px;" filterable :placeholder="$t('cusMgt.sltCusTips')" @on-change="semesterChange">
                         <Option v-for="(item, cIndex) in semesterLists" :style="{'color': item.color}" :value="cIndex" :label="item.showName" :key="cIndex">
                         </Option>
                     </Select>
@@ -352,6 +353,7 @@ export default {
             fontChange: 'Hm',
             semesterLists: [],
             selectSemester: null,
+            selectSemesterOld: null,
         };
     },
     computed: {
@@ -562,6 +564,25 @@ export default {
                 this.$router.push(isMobile ? path + '2' : path)
             }
         },
+        semesterChange(key, keyWord) {
+            if(this.$route.path != '/studentWeb/homeView') {
+                this.$Modal.confirm({
+                    content: `${this.$t('studentWeb.courseType.semester')}${this.semesterLists[key].showName}?`,
+                    onOk: () => {
+                        this.selectSemesterOld = this.selectSemester
+                        this.$router.push('/studentWeb/homeView')
+                        this.getClassList()
+                    },
+                    onCancel: () => {
+                        this.selectSemester = this.selectSemesterOld
+                    }
+                })
+            } else {
+                this.selectSemesterOld = this.selectSemester
+                console.log(this.selectSemesterOld, this.selectSemester);
+                this.getClassList()
+            }
+        },
         getClassList() {
             this.selectClass = 0
             let Semester = {...this.semesterLists[this.selectSemester]}
@@ -811,6 +832,7 @@ export default {
             }
             this.semesterLists = arr
             this.selectSemester = this.semesterLists.length - 1
+            this.selectSemesterOld = this.selectSemester
             this.getClassList()
         },
     },