浏览代码

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

OnePsycho 3 年之前
父节点
当前提交
5b13dfc172
共有 21 个文件被更改,包括 1123 次插入826 次删除
  1. 2 1
      TEAMModelOS/ClientApp/public/index.html
  2. 31 1
      TEAMModelOS/ClientApp/src/api/studentWeb.js
  3. 12 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/course-content.css
  4. 4 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/course-content.less
  5. 19 2
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/course-list.css
  6. 20 2
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/course-list.less
  7. 14 2
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/home-view.css
  8. 5 1
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/home-view.less
  9. 4 0
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventView.vue
  10. 289 211
      TEAMModelOS/ClientApp/src/components/student-web/HomeView/CourseContent.vue
  11. 439 326
      TEAMModelOS/ClientApp/src/components/student-web/HomeView/CourseList.vue
  12. 37 6
      TEAMModelOS/ClientApp/src/components/student-web/HomeView/CourseListView.vue
  13. 18 20
      TEAMModelOS/ClientApp/src/components/student-web/HomeView/HomeView.vue
  14. 208 212
      TEAMModelOS/ClientApp/src/components/student-web/SettingView/SettingView.vue
  15. 1 1
      TEAMModelOS/ClientApp/src/locale/lang/en-US/studentWeb.js
  16. 2 2
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/studentWeb.js
  17. 2 2
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/studentWeb.js
  18. 1 1
      TEAMModelOS/ClientApp/src/utils/PublicRenderer.js
  19. 1 1
      TEAMModelOS/ClientApp/src/view/classrecord/ClassRecord.less
  20. 12 33
      TEAMModelOS/ClientApp/src/view/classrecord/HtexRender.vue
  21. 2 2
      TEAMModelOS/ClientApp/src/view/student-web/App.vue

+ 2 - 1
TEAMModelOS/ClientApp/public/index.html

@@ -19,7 +19,8 @@
 		  },
 		  svg: {
 		    fontCache: 'local'
-		  }
+			},
+            skipTags: ["script", "noscript", "style", "textarea", "pre", "code", "a"] //避开某些标签
 		};
 		</script>
 		<script type="text/javascript" id="MathJax-script" async

+ 31 - 1
TEAMModelOS/ClientApp/src/api/studentWeb.js

@@ -229,5 +229,35 @@ export default {
     // 删除不存在的投票和问卷
     delActivity: function (data) {
         return post("/common/delete-activity", data)
-    }
+    },
+
+    // 查询课程清单
+    getClassList: function (data) {
+        return post("/student/stu-course", data)
+    },
+
+    // 查询班级和老师
+    getSchoolInfo: function (data) {
+        return post("/student/get-school-info", data)
+    },
+
+    // 获取教室关联的学生(教师端)
+    getClassroomStudent: function (data) {
+        return post('/school/classroom/find-students', data)
+    },
+
+    // 根据stulist ids换取详细信息(教师端)
+    findListSummary: function (data) {
+        return post('/school/course/get-summary-list', data)
+    },
+
+    // 根据学生id换取详细信息(教师端)
+    findStuSummary: function (data) {
+        return post('/student/get-summary-student', data)
+    },
+
+    // 获取教师列表(教师端)
+    getSchoolTeacher: function (data) {
+        return post('/school/teacher/get-teacher-all', data)
+    },
 }

+ 12 - 0
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/course-content.css

@@ -1,3 +1,7 @@
+/*常用色票*/
+/*回傳的狀態文字,標題段落的方框,分頁*/
+/*標題類型的標記,編序教材附件按鈕*/
+/*各類項目的懸停與選中狀態*/
 .course-content {
   position: relative;
   float: right;
@@ -10,6 +14,14 @@
     padding-top: 4% !important;
   }
 }
+.course-content h1,
+.course-content h2,
+.course-content h3,
+.course-content h4,
+.course-content h5,
+.course-content h6 {
+  display: block;
+}
 .course-content .course-subject {
   color: #24b880;
 }

+ 4 - 0
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/course-content.less

@@ -10,6 +10,10 @@
     padding-top: 4% !important;
   }
 
+  h1, h2, h3, h4, h5, h6{
+    display: block;
+  }
+
   .course-subject {
     color: @primary;
   }

+ 19 - 2
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/course-list.css

@@ -1,3 +1,7 @@
+/*常用色票*/
+/*回傳的狀態文字,標題段落的方框,分頁*/
+/*標題類型的標記,編序教材附件按鈕*/
+/*各類項目的懸停與選中狀態*/
 .course-list .tableViewBtn,
 .course-list .listViewBtn {
   display: inline-block;
@@ -38,6 +42,20 @@
 .course-list .list-block {
   margin-top: 10px;
 }
+.course-list .list-block .list-table {
+  margin: 0 10px;
+}
+.course-list .list-block .list-table .table-item {
+  cursor: pointer;
+}
+.course-list .list-block .list-table .list-name {
+  font-weight: bold;
+  font-size: 16px;
+  margin-top: 5px;
+}
+.course-list .list-block .list-item-no {
+  text-align: center;
+}
 .course-list .list-item {
   height: auto;
   padding-left: 3%;
@@ -69,10 +87,9 @@
   border-radius: 10px;
   margin-top: 3px;
 }
-.course-list .table-item-selected.courseName {
+.course-list .table-item-selected {
   font-weight: bolder !important;
   color: #00ad6c;
-  background-color: #d4ede1;
 }
 .course-list .table-item-selected .list-item-typeMark {
   text-align: center;

+ 20 - 2
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/course-list.less

@@ -42,6 +42,24 @@
   }
   .list-block {
     margin-top: 10px;
+
+    .list-table{
+      margin: 0 10px;
+
+      .table-item{
+        cursor: pointer;
+      }
+
+      .list-name{
+        font-weight: bold;
+        font-size: 16px;
+        margin-top: 5px;
+      }
+    }
+
+    .list-item-no{
+      text-align: center;
+    }
   }
   .list-item {
     height: auto;
@@ -74,10 +92,10 @@
       margin-top: 3px;
     }
   }
-  .table-item-selected.courseName {
+  .table-item-selected {
     font-weight: bolder !important;
     color: @secondary;
-    background-color: #d4ede1;
+    // background-color: #d4ede1;
   }
   .table-item-selected {
     .list-item-typeMark {

+ 14 - 2
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/home-view.css

@@ -1,7 +1,11 @@
+/*常用色票*/
+/*回傳的狀態文字,標題段落的方框,分頁*/
+/*標題類型的標記,編序教材附件按鈕*/
+/*各類項目的懸停與選中狀態*/
 .home-view {
   padding: 1.875rem;
   padding-bottom: 56px;
-  min-height: 95.9vh;
+  min-height: 95vh;
 }
 .home-view .title {
   position: relative;
@@ -67,6 +71,9 @@
 .home-view .ivu-col {
   margin-bottom: 20px !important;
 }
+.home-view .barCard {
+  margin-bottom: 30px;
+}
 .home-view .myProgressBar {
   position: relative;
   right: 0%;
@@ -159,6 +166,9 @@
 .home-view .myactivebar .ivu-progress-bg {
   background-color: #ff9100 !important;
 }
+.home-view .calenderCard {
+  margin-bottom: 30px;
+}
 .home-view .calenderCard .ivu-card-body {
   /*background: linear-gradient(270deg, #eeeeee, #ffffff);*/
   padding: 28px;
@@ -175,7 +185,9 @@
 .home-view .calenderCard .title {
   font-weight: bolder;
 }
-
+.home-view .calenderCard .title-rect-name {
+  color: #515a6e;
+}
 .home-view .calenderCard .classtitle {
   font-size: 18px;
   /*font-family: Arial Rounded MT Bold;*/

+ 5 - 1
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/home-view.less

@@ -3,7 +3,7 @@
 .home-view {
   padding: 1.875rem;
   padding-bottom: 56px;
-  min-height: 95.9vh;
+  min-height: 95vh;
 
   .title {
     position: relative;
@@ -72,6 +72,9 @@
   .ivu-col {
     margin-bottom: 20px !important;
   }
+  .barCard {
+    margin-bottom: 30px;
+  }
   .myProgressBar {
     position: relative;
     right: 0%;
@@ -168,6 +171,7 @@
     background-color: #ff9100 !important;
   }
   .calenderCard {
+    margin-bottom: 30px;
     .ivu-card-body {
       /*background: linear-gradient(270deg, #eeeeee, #ffffff);*/
       padding: 28px;

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

@@ -106,6 +106,10 @@
                 "getSidebarisOpen",
                 "getItemTitle"
             ])
+        },
+        beforeRouteLeave: function(to, from, next) {
+            this.$store.commit("ChangeItemName", {})
+            next()
         }
     };
 </script>

+ 289 - 211
TEAMModelOS/ClientApp/src/components/student-web/HomeView/CourseContent.vue

@@ -1,230 +1,308 @@
 <template>
-  <div
-    class="course-content"
-    :class="{ courseContentEn: this.$store.getters.getCurrentLaguage == 'en' }"
-  >
-    <h2>{{ getCourseNow().courseName }}</h2>
-    <!--h3 class="course-subject">國中/二年級/{{getCourseNow().courseSubject}}</h3-->
-    <div
-      @click="changeGroupView()"
-      :class="{ 'group-on': isChangeGroupView == true }"
-      v-if="name == 'tab3'"
-    >
-      <svg-icon icon-class="group" class="group-btn" />
-    </div>
+    <div>
+        <div class="course-content"
+            :class="{ courseContentEn: this.$store.getters.getCurrentLaguage == 'en-us' }"
+            v-if="showInfo"
+        >
+            <h2>{{ courseNow.course.name }}</h2>
+            <!-- <h3 class="course-subject">國中/二年級/{{courseNow.courseSubject}}</h3> -->
+            <div @click="changeGroupView()"
+                :class="{ 'group-on': isChangeGroupView == true }"
+                v-if="name == 'tab3'"
+            >
+                <svg-icon icon-class="group" class="group-btn" />
+            </div>
 
-    <Tabs :value="name" v-model="name">
-      <TabPane :label="$t('studentWeb.courseContent.baseInfo')" name="tab1">
-        <Row :gutter="30">
-          <i-col :xs="24" :sm="24" :md="8" :lg="8">
-            <h4 class="basic-title">{{ $t("studentWeb.courseContent.classID") }}</h4>
-            <h4 class="basic-data">
-              T{{ getCourseNow().courseID.substr(0, 5) }}
-            </h4>
+            <Tabs :value="name" v-model="name">
+                <!-- 基本资讯 -->
+                <TabPane :label="$t('studentWeb.courseContent.baseInfo')" name="tab1">
+                    <Row :gutter="30">
+                        <i-col :xs="24" :sm="24" :md="8" :lg="8">
+                            <h4 class="basic-title">{{ $t("studentWeb.courseContent.classID") }}</h4>
+                            <h4 class="basic-data">{{ courseNow.course.no }}</h4>
 
-            <h4 class="basic-title">
-              {{ $t("studentWeb.courseContent.classTime") }}
-            </h4>
-            <h4 class="basic-data">{{ getCourseNow().attendTime }}</h4>
+                            <h4 class="basic-title">{{ $t("studentWeb.courseContent.classTime") }}</h4>
+                            <h4 class="basic-data">{{ courseNow.classTime }}</h4>
 
-            <h4 class="basic-title">
-              {{ $t("studentWeb.courseContent.classroom") }}
-            </h4>
-            <h4 class="basic-data">{{ getCourseNow().classroom }}</h4>
+                            <h4 class="basic-title">{{ $t("studentWeb.courseContent.classroom") }}</h4>
+                            <h4 class="basic-data">{{ courseNow.roomName }}</h4>
 
-            <h4 class="basic-title">{{ $t("studentWeb.courseContent.teacher") }}</h4>
-            <h4 class="basic-data">{{ getCourseNow().teacher }}</h4>
+                            <h4 class="basic-title">{{ $t("studentWeb.courseContent.teacher") }}</h4>
+                            <h4 class="basic-data">{{ courseNow.course.teaName }}</h4>
 
-            <h4 class="basic-title">
-              {{ $t("studentWeb.courseContent.co-teacher") }}
-            </h4>
-            <span
-              class="basic-data"
-              v-for="(teacher, index) in getCourseNow().assistantTeachers"
-              :key="index"
-            >
-              {{ teacher }}
-              <span v-if="index != 2">、</span>
-            </span>
+                            <h4 class="basic-title">{{ $t("studentWeb.courseContent.co-teacher") }}</h4>
+                            <!-- <span class="basic-data"
+                                v-for="(teacher, index) in courseNow.assistantTeachers"
+                                :key="index"
+                            >
+                                {{ teacher }}
+                                <span v-if="index < courseNow.assistantTeachers.length - 1">、</span>
+                            </span> -->
 
-            <h4 class="basic-title">
-              {{ $t("studentWeb.courseContent.addedTime") }}
-            </h4>
-            <h4 class="basic-data">
-              {{ getCourseNow().courseAddDate }}
-            </h4></i-col
-          > <i-col :xs="24" :sm="24" :md="16" :lg="16">
-             <h4 class="basic-title">課程二維碼</h4>
-           
-            <img src="mockqrcode.jpg" width="30%" style='margin-left:-12px'>
-            </i-col></Row
-        >
-      </TabPane>
-      <TabPane :label="$t('studentWeb.courseContent.description')" name="tab2">
-        {{ getCourseNow().courseDesc }}
-        <br />
-        <br />
-        <h3>{{ $t("studentWeb.courseContent.syllabus") }}</h3>
-        <br />
-        <Collapse simple>
-          <Panel name="1">
-            1. 史蒂夫·乔布斯
-            <div slot="content">
-              史蒂夫·乔布斯(Steve
-              Jobs),1955年2月24日生于美国加利福尼亚州旧金山,美国发明家、企业家、美国苹果公司联合创办人。
-              <br />
-              <br />
-              <Collapse simple>
-                <Panel name="1-1">
-                  iPhone
-                  <p slot="content">
-                    iPhone,是美国苹果公司研发的智能手机,它搭载iOS操作系统。第一代iPhone于2007年1月9日由苹果公司前首席执行官史蒂夫·乔布斯发布,并在2007年6月29日正式发售。
-                  </p>
-                </Panel>
-                <Panel name="1-2">
-                  iPad
-                  <p slot="content">
-                    iPad是由苹果公司于2010年开始发布的平板电脑系列,定位介于苹果的智能手机iPhone和笔记本电脑产品之间,(屏幕中有4个虚拟程序固定栏)与iPhone布局一样,提供浏览网站、收发电子邮件、观看电子书、播放音频或视频、玩游戏等功能。由英国出生的设计主管乔纳森·伊夫(Jonathan
-                    Ive)(有些翻译为
-                    乔纳森·艾维)领导的团队设计的,这个圆滑、超薄的产品反映出了伊夫对德国天才设计师Dieter
-                    Rams的崇敬之情。
-                  </p>
-                </Panel>
-              </Collapse>
-            </div>
-          </Panel>
-          <Panel name="2">
-            2. 斯蒂夫·盖瑞·沃兹尼亚克
-            <p slot="content">
-              斯蒂夫·盖瑞·沃兹尼亚克(Stephen Gary
-              Wozniak),美国电脑工程师,曾与史蒂夫·乔布斯合伙创立苹果电脑(今之苹果公司)。斯蒂夫·盖瑞·沃兹尼亚克曾就读于美国科罗拉多大学,后转学入美国著名高等学府加州大学伯克利分校(UC
-              Berkeley)并获得电机工程及计算机(EECS)本科学位(1987年)。
-            </p>
-          </Panel>
-          <Panel name="3">
-            3. 乔纳森·伊夫
-            <p slot="content">
-              乔纳森·伊夫是一位工业设计师,现任Apple公司设计师兼资深副总裁,英国爵士。他曾参与设计了iPod,iMac,iPhone,iPad等众多苹果产品。除了乔布斯,他是对苹果那些著名的产品最有影响力的人。
-            </p>
-          </Panel>
-        </Collapse>
-      </TabPane>
-      <TabPane :label="$t('studentWeb.courseContent.classmates')" name="tab3">
-        <div v-if="isChangeGroupView == false">
-          <Row :gutter="50">
-            <i-col :xs="24" :sm="24" :md="12" :lg="12">
-              <table>
-                <tr>
-                  <th>{{ $t("studentWeb.courseContent.seatNo") }}</th>
-                  <th>{{ $t("studentWeb.courseContent.name") }}</th>
-                  <th>{{ $t("studentWeb.courseContent.group") }}</th>
-                </tr>
-                <tr
-                  class="mates-list-item"
-                  v-for="(item, index) in getCourseNow().students"
-                  :key="index"
-                  v-show="index < 15"
-                >
-                  <td>{{ index + 1 }}</td>
-                  <td>{{ item.name }}</td>
-                  <td v-if="getCurrentLang() == 'tw'">第{{ item.group }}組</td>
-                  <td v-if="getCurrentLang() == 'en'">{{ item.group }}</td>
-                </tr>
-              </table>
-            </i-col>
-            <i-col :xs="24" :sm="24" :md="12" :lg="12">
-              <table>
-                <tr>
-                  <th>{{ $t("studentWeb.courseContent.seatNo") }}</th>
-                  <th>{{ $t("studentWeb.courseContent.name") }}</th>
-                  <th>{{ $t("studentWeb.courseContent.group") }}</th>
-                </tr>
-                <tr
-                  v-for="(item, index) in getCourseNow().students"
-                  :key="index"
-                  v-show="index >= 15 && index < 28"
-                >
-                  <td :class="{ 'my-name': index == 18 }">{{ index + 1 }}</td>
-                  <td :class="{ 'my-name': index == 18 }">
-                    {{ item.name }}
-                    <span v-if="index == 18">{{ getCurrentLang() == "tw" ? "(我)" : "(me)"}}</span>
-                  </td>
+                            <h4 class="basic-title">{{ $t("studentWeb.courseContent.addedTime") }}</h4>
+                            <h4 class="basic-data">{{ courseNow.courseAddDate }}</h4>
+                        </i-col>
+                        <i-col :xs="24" :sm="24" :md="16" :lg="16">
+                            <h4 class="basic-title">課程二維碼</h4>
+                            <img src="mockqrcode.jpg" width="30%" style='margin-left: -12px'>
+                        </i-col>
+                    </Row>
+                </TabPane>
+                <!-- 课程概述 -->
+                <TabPane :label="$t('studentWeb.courseContent.description')" name="tab2">
+                    {{ courseNow.notice }}
+                    <h3 style="margin-top: 30px; margin-bottom: 10px">{{ $t("studentWeb.courseContent.syllabus") }}</h3>
+                    <Collapse simple>
+                        <Panel name="1">
+                            1. 史蒂夫·乔布斯
+                            <div slot="content">
+                                史蒂夫·乔布斯(Steve
+                                Jobs),1955年2月24日生于美国加利福尼亚州旧金山,美国发明家、企业家、美国苹果公司联合创办人。
+                                <br />
+                                <br />
+                                <Collapse simple>
+                                    <Panel name="1-1">
+                                        iPhone
+                                        <p slot="content">
+                                        iPhone,是美国苹果公司研发的智能手机,它搭载iOS操作系统。第一代iPhone于2007年1月9日由苹果公司前首席执行官史蒂夫·乔布斯发布,并在2007年6月29日正式发售。
+                                        </p>
+                                    </Panel>
+                                    <Panel name="1-2">
+                                        iPad
+                                        <p slot="content">
+                                        iPad是由苹果公司于2010年开始发布的平板电脑系列,定位介于苹果的智能手机iPhone和笔记本电脑产品之间,(屏幕中有4个虚拟程序固定栏)与iPhone布局一样,提供浏览网站、收发电子邮件、观看电子书、播放音频或视频、玩游戏等功能。由英国出生的设计主管乔纳森·伊夫(Jonathan
+                                        Ive)(有些翻译为
+                                        乔纳森·艾维)领导的团队设计的,这个圆滑、超薄的产品反映出了伊夫对德国天才设计师Dieter
+                                        Rams的崇敬之情。
+                                        </p>
+                                    </Panel>
+                                </Collapse>
+                            </div>
+                        </Panel>
+                        <Panel name="2">
+                            2. 斯蒂夫·盖瑞·沃兹尼亚克
+                            <p slot="content">
+                            斯蒂夫·盖瑞·沃兹尼亚克(Stephen Gary
+                            Wozniak),美国电脑工程师,曾与史蒂夫·乔布斯合伙创立苹果电脑(今之苹果公司)。斯蒂夫·盖瑞·沃兹尼亚克曾就读于美国科罗拉多大学,后转学入美国著名高等学府加州大学伯克利分校(UC
+                            Berkeley)并获得电机工程及计算机(EECS)本科学位(1987年)。
+                            </p>
+                        </Panel>
+                        <Panel name="3">
+                            3. 乔纳森·伊夫
+                            <p slot="content">
+                            乔纳森·伊夫是一位工业设计师,现任Apple公司设计师兼资深副总裁,英国爵士。他曾参与设计了iPod,iMac,iPhone,iPad等众多苹果产品。除了乔布斯,他是对苹果那些著名的产品最有影响力的人。
+                            </p>
+                        </Panel>
+                    </Collapse>
+                </TabPane>
+                <!-- 同学名单 -->
+                <TabPane :label="$t('studentWeb.courseContent.classmates')" name="tab3">
+                    <div v-if="isChangeGroupView == false">
+                        <Row :gutter="50">
+                            <i-col :xs="24" :sm="24" :md="12" :lg="12">
+                                <table>
+                                    <tr>
+                                        <th>{{ $t("studentWeb.courseContent.seatNo") }}</th>
+                                        <th>{{ $t("studentWeb.courseContent.name") }}</th>
+                                        <th>{{ $t("studentWeb.courseContent.group") }}</th>
+                                    </tr>
+                                    <tr class="mates-list-item"
+                                        v-for="(item, index) in stuList"
+                                        :key="index"
+                                        v-show="index < 15"
+                                    >
+                                        <td>{{ item.no }}</td>
+                                        <td>{{ item.name }}</td>
+                                        <!-- <td v-if="currentLang == 'zh-cn'">第{{ item.group }}组</td>
+                                        <td v-else-if="currentLang == 'zh-tw'">第{{ item.group }}組</td>
+                                        <td v-else-if="currentLang == 'en-us'">{{ item.group }}</td> -->
+                                    </tr>
+                                </table>
+                            </i-col>
+                            <i-col :xs="24" :sm="24" :md="12" :lg="12">
+                                <table>
+                                    <tr>
+                                        <th>{{ $t("studentWeb.courseContent.seatNo") }}</th>
+                                        <th>{{ $t("studentWeb.courseContent.name") }}</th>
+                                        <th>{{ $t("studentWeb.courseContent.group") }}</th>
+                                    </tr>
+                                    <tr v-for="(item, index) in courseNow.students"
+                                        :key="index"
+                                        v-show="index >= 15 && index < 28"
+                                    >
+                                        <td :class="{ 'my-name': index == 18 }">{{ index + 1 }}</td>
+                                        <td :class="{ 'my-name': index == 18 }">
+                                            {{ item.name }}
+                                            <span v-if="index == 18">{{ currentLang == "en-us" ? "(me)" : "(我)"}}</span>
+                                        </td>
 
-                  <td
-                    :class="{ 'my-name': index == 18 }"
-                    v-if="getCurrentLang() == 'tw'"
-                  >
-                    第{{ item.group }}組
-                  </td>
-                  <td
-                    :class="{ 'my-name': index == 18 }"
-                    v-if="getCurrentLang() == 'en'"
-                  >
-                    {{ item.group }}
-                  </td>
-                </tr>
-              </table>
-            </i-col>
-          </Row>
-        </div>
-        <!--小組模式-->
-        <div v-if="isChangeGroupView == true">
-          <Card
-            class="group-student"
-            v-for="groupNo in 5"
-            :key="groupNo"
-            :class="{ 'group-studentEn': getCurrentLang() == 'en' }"
-          >
-            <h3 class="group-title" v-if="getCurrentLang() == 'tw'">
-              第{{ groupNo }}組
-            </h3>
-            <h3 class="group-title" v-if="getCurrentLang() == 'en'">
-              Group {{ groupNo }}
-            </h3>
-            <table>
-              <tr
-                v-for="(item, index) in getCourseNow().students"
-                :key="index"
-                v-show="item.group == groupNo && index < 28"
-              >
-                <td class="student-no" :class="{ 'my-name': index == 18 }">
-                  {{ index + 1 }}
-                </td>
-                <td class="student-name" :class="{ 'my-name': index == 18 }">
-                  {{ item.name }}
-                  <span v-if="index == 18">{{  getCurrentLang() == "tw" ? "(我)" : "(me)" }}</span>
-                </td>
-              </tr>
-            </table>
-          </Card>
+                                        <td :class="{ 'my-name': index == 18 }" v-if="currentLang == 'zh-cn'">
+                                            第{{ item.group }}组
+                                        </td>
+                                        <td :class="{ 'my-name': index == 18 }" v-else-if="currentLang == 'zh-tw'">
+                                            第{{ item.group }}組
+                                        </td>
+                                        <td :class="{ 'my-name': index == 18 }" v-else-if="currentLang == 'en-us'">
+                                            {{ item.group }}
+                                        </td>
+                                    </tr>
+                                </table>
+                            </i-col>
+                        </Row>
+                    </div>
+                    <!--小組模式-->
+                    <div v-if="isChangeGroupView == true">
+                        <Card class="group-student"
+                            v-for="groupNo in 5"
+                            :key="groupNo"
+                            :class="{ 'group-studentEn': currentLang == 'en-us' }"
+                        >
+                            <h3 class="group-title" v-if="currentLang == 'zh-cn'">
+                                第{{ groupNo }}组
+                            </h3>
+                            <h3 class="group-title" v-if="currentLang == 'zh-tw'">
+                                第{{ groupNo }}組
+                            </h3>
+                            <h3 class="group-title" v-if="currentLang == 'en-us'">
+                                Group {{ groupNo }}
+                            </h3>
+                            <table>
+                                <tr v-for="(item, index) in courseNow.students"
+                                    :key="index"
+                                    v-show="item.group == groupNo && index < 28"
+                                >
+                                    <td class="student-no" :class="{ 'my-name': index == 18 }">
+                                        {{ index + 1 }}
+                                    </td>
+                                    <td class="student-name" :class="{ 'my-name': index == 18 }">
+                                        {{ item.name }}
+                                        <span v-if="index == 18">{{  currentLang == "en-us" ? "(me)" : "(我)" }}</span>
+                                    </td>
+                                </tr>
+                            </table>
+                        </Card>
+                    </div>
+                </TabPane>
+            </Tabs>
         </div>
-      </TabPane>
-    </Tabs>
-  </div>
+    </div>
 </template>
 
 <script>
 export default {
-  name: "courseContent",
-  data() {
-    return {
-      isChangeGroupView: false,
-      name: "tab1",
-      istab3Now: false,
-    };
-  },
-  methods: {
-    changeGroupView() {
-      this.isChangeGroupView = !this.isChangeGroupView;
+    name: "courseContent",
+    data() {
+        return {
+            showInfo: false,
+            isChangeGroupView: false, //控制名单样式
+            name: "tab1",
+            istab3Now: false,
+            currentLang: localStorage.getItem("local"), //语言
+            week: [{
+                name: "MON",
+                cn: "星期一"
+            }, {
+                name: "TUE",
+                cn: "星期二"
+            }, {
+                name: "WED",
+                cn: "星期三"
+            }, {
+                name: "THU",
+                cn: "星期四"
+            }, {
+                name: "FRI",
+                cn: "星期五"
+            }],
+            stuList: [],
+            teacherList: []
+        };
+    },
+    props: {
+        roomList: {
+            type: Array,
+            default: []
+        }
+    },
+    mounted () {
+        // this.courseNow = this.$store.getters.getItemTitle
     },
-    getCurrentLang() {
-      return localStorage.getItem("lang");
+    methods: {
+        changeGroupView() {
+            this.isChangeGroupView = !this.isChangeGroupView
+        },
+        // 查找学生信息(标准)
+        findStuInfor(course) {
+            let req = {
+                school_code: course.school,
+                scope: course.scope,
+                ids: [course.classId]
+            }
+            this.$api.studentWeb.getClassroomStudent(req).then(res => {
+                this.stuList = res.stus[0]
+            })
+        },
+        // 查找学生(个人)
+        findPersonInfo(course) {
+            let reqList = {
+                code: course.scope == 'school' ? course.school : course.creatorId,
+                // code: course.teacherId,
+                ids: [course.stuList],
+                scope: course.scope
+            }
+            this.$api.studentWeb.findListSummary(reqList).then(res => {
+                if(res.stuList.length > 0) {
+                    if(res.stuList[0].students.length > 0) {
+                        this.$api.studentWeb.findStuSummary({students: res.stuList[0].students}).then(res => {
+                            if(res.stus.length > 0) {
+                                console.log(res.stus);
+                                this.stuList = res.stus
+                            }
+                        })
+                    }
+                }
+            })
+        },
     },
-    getCourseNow() {
-      return this.$store.getters.getItemTitle;
+    computed: {
+        // 当前的活动
+        courseNow() {
+            return this.$store.getters.getItemTitle
+        }
     },
-  },
-};
+    watch: {
+        courseNow: {
+            handler(n, o) {
+                if(n != undefined) {
+                    this.showInfo = true
+                    this.week.map(item => {
+                        if(item.name == n.course.timeWeek) {
+                            n.classTime = item.cn + " "+ n.time
+                        }
+                    })
+                    n.roomName = ""
+                    n.teaName = ""
+                    // 获取教室名称
+                    if(this.roomList) {
+                        for (let i = 0; i < this.roomList.length; i++) {
+                            if(this.roomList[i].id == n.course.room) {
+                                n.roomName = this.roomList[i].name
+                                break
+                            }
+                        }
+                    }
+                    // 获取学生名单
+                    if(n.course.classId != "") {
+                        this.findStuInfor(this.courseNow.course)
+                    } else if(n.course.stuList != "") {
+                        this.findPersonInfo(this.courseNow.course)
+                    }
+                }
+                
+            }
+        }
+    }
+}
 </script>
 
 <style scoped>

+ 439 - 326
TEAMModelOS/ClientApp/src/components/student-web/HomeView/CourseList.vue

@@ -1,347 +1,460 @@
 <template>
-  <div
-    class="course-list"
-    :class="{ courselistEn: this.$store.getters.getCurrentLaguage == 'en' }"
-  >
-    <!--課程加入成功-->
-    <div
-      class="warmMessage"
-      v-if=" this.$store.getters.getMycID.coureseMessageOpen == true && this.$store.getters.getMycID.addSuccess == true " >
-      <div class="messageCard animate__animated animate__fadeInDown">
-        <div>
-          <h3>課程加入成功</h3>
-          <svg-icon icon-class="addCourseSuc" class="addCourseIcon" />
-
-          <h3>
-            <span class="typeMark">{{ this.$store.getters.getMycID.myCourseID[  this.$store.getters.getMycID.myCourseID.length - 1 ] }}</span
-            ><span>新加課程名稱</span>
-          </h3>
-          <p>可於左側課程清單檢視課程簡介</p>
-        </div>
-      </div>
-    </div>
+    <div>
+        <loading :active.sync="isLoad"
+                 :is-full-page="fullPage"
+                 background-color="#000"
+                 :opacity="opacity">
+            <template slot="default">
+                <svg-icon icon-class="loader" class="loader-icon" />
+            </template>
+        </loading>
+        <div class="course-list"
+            :class="{ courselistEn: this.$store.getters.getCurrentLaguage == 'en-us' }"
+        >
+            <!--課程加入成功-->
+            <div class="warmMessage"
+                v-if=" this.$store.getters.getMycID.coureseMessageOpen == true &&
+                        this.$store.getters.getMycID.addSuccess == true "
+            >
+                <div class="messageCard animate__animated animate__fadeInDown">
+                    <div>
+                        <h3>課程加入成功</h3>
+                        <svg-icon icon-class="addCourseSuc" class="addCourseIcon" />
 
-    <!--課程已經加入-->
-    <div
-      class="warmMessage"
-      v-if="
-        this.$store.getters.getMycID.coureseMessageOpen == true &&
-        this.$store.getters.getMycID.addSuccess == 'exist'
-      "
-    >
-      <div class="messageCard animate__animated animate__fadeInDown">
-        <div>
-          <h3>課程已經加入</h3>
-          <svg-icon icon-class="addCoursefail" class="addCourseIcon" />
-          <p>可於左側課程清單檢視該課程簡介</p>
-        </div>
-      </div>
-    </div>
+                        <h3>
+                            <span class="typeMark">{{ this.$store.getters.getMycID.myCourseID[  this.$store.getters.getMycID.myCourseID.length - 1 ] }}</span>
+                            <span>新加課程名稱</span>
+                        </h3>
+                        <p>可於左側課程清單檢視課程簡介</p>
+                    </div>
+                </div>
+            </div>
 
-    <!--課程加入失敗-->
-    <div
-      class="warmMessage"
-      v-if=" this.$store.getters.getMycID.coureseMessageOpen == true && this.$store.getters.getMycID.addSuccess == false ">
-      <div class="messageCard animate__animated animate__fadeInDown">
-        <div>
-          <h3>課程加入失敗</h3>
-          <svg-icon icon-class="addCoursefail" class="addCourseIcon" />
-          <p>查無所輸入代碼之課程,或該課程您未獲教師授權參與</p>
-        </div>
-      </div>
-    </div>
-    <!--課程加入失敗-->
+            <!--課程已經加入-->
+            <div class="warmMessage"
+                v-if="this.$store.getters.getMycID.coureseMessageOpen == true &&
+                    this.$store.getters.getMycID.addSuccess == 'exist'"
+            >
+                <div class="messageCard animate__animated animate__fadeInDown">
+                    <div>
+                        <h3>課程已經加入</h3>
+                        <svg-icon icon-class="addCoursefail" class="addCourseIcon" />
+                        <p>可於左側課程清單檢視該課程簡介</p>
+                    </div>
+                </div>
+            </div>
 
-    <div class="list">
-      <ul class="list-block">
-        <Tabs
-          :value="this.$store.getters.getMycID.addSuccess == true ? 'tab2' : 'tab1' "  >
-          <TabPane :label="$t('studentWeb.defaultClass')" name="tab1" :align="currentView=='table'?'center':'left'">
-            <div class="listViewBtn" @click="changeView('list')" :class="{chooseView:currentView=='list'}"><svg-icon icon-class="list-text" /></div>
-            <div class="tableViewBtn" @click="changeView('table')" :class="{chooseView:currentView=='table'}">
-              <svg-icon icon-class="table" />
+            <!--課程加入失敗-->
+            <div class="warmMessage"
+                v-if="this.$store.getters.getMycID.coureseMessageOpen == true &&
+                    this.$store.getters.getMycID.addSuccess == false"
+            >
+                <div class="messageCard animate__animated animate__fadeInDown">
+                    <div>
+                        <h3>課程加入失敗</h3>
+                        <svg-icon icon-class="addCoursefail" class="addCourseIcon" />
+                        <p>查無所輸入代碼之課程,或該課程您未獲教師授權參與</p>
+                    </div>
+                </div>
             </div>
 
-            <table class="courseTable" width="85%" style="table-layout: fixed" v-if="currentView=='table'">
-              <tr>
-                <th v-for="(item, index) in timetitle" :key="index">
-                  {{ item }}
-                </th>
-              </tr>
+            <div class="list">
+                <ul class="list-block">
+                    <Tabs :value="onlyStu ? (this.$store.getters.getMycID.addSuccess == true ? 'tab2' : 'tab1') : 'tab2' ">
+                        <!-- 表定课程 -->
+                        <TabPane :label="$t('studentWeb.defaultClass')"
+                                name="tab1"
+                                :align="currentView=='table'?'center':'left'"
+                                v-if="onlyStu"
+                        >
+                            <!-- <div class="listViewBtn" @click="changeView('list')" :class="{chooseView:currentView=='list'}">
+                                <svg-icon icon-class="list-text" />
+                            </div>
+                            <div class="tableViewBtn" @click="changeView('table')" :class="{chooseView:currentView=='table'}">
+                                <svg-icon icon-class="table" />
+                            </div> -->
 
-              <tr>
-                <td class="table-time">08:00 ~10:00</td>
-                <td
-                  @click="sentSelectedEventTitle(item)"
-                  v-for="(item, index) in courseList"
-                  :key="`a+${index}`"
-                  v-show="item.courseType == '表定' && index <= 4"
-                  class="courseName"
-                  :class="{ 'table-item-selected': selectedCondition(item) }"
-                >
-                  {{ item.courseName }}
-                  <div class="list-item-typeMark">
-                    T{{ item.courseID.substr(0, 5) }}
-                  </div>
-                </td>
-                <td
-                  @click="sentSelectedEventTitle(item)"
-                  v-for="(item, index) in courseList"
-                  :key="`b+${index}`"
-                  v-show="item.courseType == '臨時' && index < 5"
-                  class="courseName"
-                  :class="{ 'table-item-selected': selectedCondition(item) }"
-                >
-                  {{ item.courseName }}
-                  <div class="list-item-typeMark">
-                    T{{ item.courseID.substr(0, 5) }}
-                  </div>
-                </td>
-              </tr>
+                            <div class="list-table">
+                                <Table :columns="courseTime"
+                                        :data="timeTable"
+                                        v-show="currentView == 'table'"
+                                        :disabled-hover="true"
+                                >
+                                    <template slot-scope="{ row }" slot="time">
+                                        <p class="list-name">{{ row.time }}</p>
+                                        <p>{{ row.label }}</p>
+                                    </template>
+                                    <template slot-scope="{ row }" slot="Mon">
+                                        <div v-for="(item, index) in row.fixList" :key="index">
+                                            <div v-if="item.timeWeek == 'MON'"
+                                                class="table-item"
+                                                @click="clickCell(row, index)"
+                                                :class="{'table-item-selected': unique == item.unique }"
+                                            >
+                                                <p class="list-name">{{ item.name}}</p>
+                                                <p>({{ item.teaName}})</p>
+                                            </div>
+                                        </div>
+                                    </template>
+                                    <template slot-scope="{ row }" slot="Tue">
+                                        <div v-for="(item, index) in row.fixList" :key="index">
+                                            <div v-if="item.timeWeek == 'TUE'"
+                                                class="table-item"
+                                                @click="clickCell(row, index)"
+                                                :class="{'table-item-selected': unique == item.unique }"
+                                            >
+                                                <p class="list-name">{{ item.name}}</p>
+                                                <p>({{ item.teaName}})</p>
+                                            </div>
+                                        </div>
+                                    </template>
+                                    <template slot-scope="{ row }" slot="Wed">
+                                        <div v-for="(item, index) in row.fixList" :key="index">
+                                            <div v-if="item.timeWeek == 'WED'"
+                                                class="table-item"
+                                                @click="clickCell(row, index)"
+                                                :class="{'table-item-selected': unique == item.unique }"
+                                            >
+                                                <p class="list-name">{{ item.name}}</p>
+                                                <p>({{ item.teaName}})</p>
+                                            </div>
+                                        </div>
+                                    </template>
+                                    <template slot-scope="{ row }" slot="Thu">
+                                        <div v-for="(item, index) in row.fixList" :key="index">
+                                            <div v-if="item.timeWeek == 'THU'"
+                                                class="table-item"
+                                                @click="clickCell(row, index)"
+                                                :class="{'table-item-selected': unique == item.unique }"
+                                            >
+                                                <p class="list-name">{{ item.name}}</p>
+                                                <p>({{ item.teaName}})</p>
+                                            </div>
+                                        </div>
+                                    </template>
+                                    <template slot-scope="{ row }" slot="Fri">
+                                        <div v-for="(item, index) in row.fixList" :key="index">
+                                            <div v-if="item.timeWeek == 'FRI'"
+                                                class="table-item"
+                                                @click="clickCell(row, index)"
+                                                :class="{'table-item-selected': unique == item.unique }"
+                                            >
+                                                <p class="list-name">{{ item.name}}</p>
+                                                <p>({{ item.teaName}})</p>
+                                            </div>
+                                        </div>
+                                    </template>
+                                </Table>
+                            </div>
 
-              <tr>
-                <td class="table-time">10:00 ~12:00</td>
-                <td
-                  @click="sentSelectedEventTitle(item)"
-                  v-for="(item, index) in courseList"
-                  :key="`c+${index}`"
-                  v-show="item.courseType == '表定' && 5 < index && index <= 10"
-                  class="courseName"
-                  :class="{ 'table-item-selected': selectedCondition(item) }"
-                >
-                  {{ item.courseName }}
-                  <div class="list-item-typeMark">
-                    T{{ item.courseID.substr(0, 5) }}
-                  </div>
-                </td>
-                <td
-                  @click="sentSelectedEventTitle(item)"
-                  v-for="(item, index) in courseList"
-                  :key="`d+${index}`"
-                  v-show="item.courseType == '臨時' && 5 < index && index <= 10"
-                  class="courseName"
-                  :class="{ 'table-item-selected': selectedCondition(item) }"
-                >
-                  {{ item.courseName }}
-                  <div class="list-item-typeMark">
-                    T{{ item.courseID.substr(0, 5) }}
-                  </div>
-                </td>
-              </tr>
-              <tr>
-                <td class="table-time">13:00 ~15:00</td>
-                <td
-                  @click="sentSelectedEventTitle(item)"
-                  v-for="(item, index) in courseList"
-                  :key="index"
-                  v-show=" item.courseType == '表定' && 10 < index && index <= 15 "
-                  class="courseName"
-                  :class="{ 'table-item-selected': selectedCondition(item) }"
-                >
-                  {{ item.courseName }}
-                  <div class="list-item-typeMark">
-                    T{{ item.courseID.substr(0, 5) }}
-                  </div>
-                </td>
-                <td
-                  @click="sentSelectedEventTitle(item)"
-                  v-for="(item, index) in courseList"
-                  :key="`e+${index}`"
-                  v-show=" item.courseType == '臨時' && 10 < index && index <= 15 "
-                  class="courseName"
-                  :class="{ 'table-item-selected': selectedCondition(item) }"
-                >
-                  {{ item.courseName }}
-                  <div class="list-item-typeMark">
-                    T{{ item.courseID.substr(0, 5) }}
-                  </div>
-                </td>
-              </tr>
-              <tr>
-                <td class="table-time">15:00 ~17:00</td>
-                <td
-                  @click="sentSelectedEventTitle(item)"
-                  v-for="(item, index) in courseList"
-                  :key="`f+${index}`"
-                  v-show=" item.courseType == '表定' && 15 < index && index <= 20 "
-                  class="courseName"
-                  :class="{ 'table-item-selected': selectedCondition(item) }"
-                >
-                  {{ item.courseName }}
-                  <div class="list-item-typeMark">
-                    T{{ item.courseID.substr(0, 5) }}
-                  </div>
-                </td>
-                <td
-                  @click="sentSelectedEventTitle(item)"
-                  v-for="(item, index) in courseList"
-                  :key="`g+${index}`"
-                  v-show=" item.courseType == '臨時' && 15 < index && index <= 20 "
-                  class="courseName"
-                  :class="{ 'table-item-selected': selectedCondition(item) }"
-                >
-                  {{ item.courseName }}
-                  <div class="list-item-typeMark">
-                    T{{ item.courseID.substr(0, 5) }}
-                  </div>
-                </td>
-              </tr>
-              <tr>
-                <td class="table-time">17:00 ~18:00</td>
-                <td
-                  @click="sentSelectedEventTitle(item)"
-                  v-for="(item, index) in courseList"
-                  :key="`h+${index}`"
-                  v-show="item.courseType == '表定' && 20 < index && index <= 25 "
-                  class="courseName"
-                  :class="{ 'table-item-selected': selectedCondition(item) }"
-                >
-                  {{ item.courseName }}
-                  <div class="list-item-typeMark">
-                    T{{ item.courseID.substr(0, 5) }}
-                  </div>
-                </td>
-                <td
-                  @click="sentSelectedEventTitle(item)"
-                  v-for="(item, index) in courseList"
-                  :key="`i+${index}`"
-                  v-show=" item.courseType == '臨時' && 20 < index && index <= 25 "
-                  class="courseName"
-                  :class="{ 'table-item-selected': selectedCondition(item) }"
-                >
-                  {{ item.courseName }}
-                  <div class="list-item-typeMark">
-                    T{{ item.courseID.substr(0, 5) }}
-                  </div>
-                </td>
-              </tr>
-            </table>
-            <li
-              class="list-item"
-              v-for="(item, index) in courseList"
-              @click="sentSelectedEventTitle(item)"
-              :class="{ 'list-item-selected': selectedCondition(item) }"
-              :key="index"
-              v-show="item.courseType == '表定'&&currentView=='list'"
-            >
-              <ul>
-                <li class="list-item-info">
-                  <p class="list-item-title">
-                    <span class="list-item-typeMark">T{{item.courseID.substr(0, 5)}}</span>
-                    {{item.courseName}}
-                  </p>
-                </li>
-              </ul>
-            </li>
-          </TabPane>
-          <TabPane :label="$t('studentWeb.tempClass')" name="tab2">
-            <!--剛加入的課程-->
-            <li
-              class="list-item"
-              @click="
-                sentSelectedEventTitle(
-                  courseList[courseList.length - index - 2]
-                )
-              "
-              :class="{
-                'list-item-selected': selectedCondition(
-                  courseList[courseList.length - index - 2]
-                ),
-              }"
-              v-for="(item,
-              index) in this.$store.getters.getMycID.myCourseID
-                .slice()
-                .reverse()"
-              :key="`c+${index}`"
-            >
-              <ul>
-                <li class="list-item-info">
-                  <p class="list-item-title">
-                    <span class="list-item-typeMark">{{ item }}</span>
-                    {{ "新加課程名稱" }}
-                  </p>
-                </li>
-              </ul>
-            </li>
-            <!--剛加入的課程-->
-            <li
-              class="list-item"
-              v-for="(item, index) in courseList"
-              @click="sentSelectedEventTitle(item)"
-              :class="{ 'list-item-selected': selectedCondition(item) }"
-              :key="`j+${index}`"
-              v-show="item.courseType == '臨時'"
-            >
-              <ul>
-                <li class="list-item-info">
-                  <p class="list-item-title">
-                    <span class="list-item-typeMark"
-                      >T{{ item.courseID.substr(0, 5) }}</span
-                    >
-                    {{ item.courseName }}
-                  </p>
-                </li>
-              </ul>
-            </li>
-          </TabPane>
-        </Tabs>
-      </ul>
+                            <!-- 表定 -->
+                            <!-- <li class="list-item"
+                                v-for="(item, index) in fixList"
+                                @click="sentSelectedEventTitle(item)"
+                                :class="{ 'list-item-selected': unique == item.unique }"
+                                :key="index"
+                                v-show="currentView == 'list'"
+                            >
+                                <ul>
+                                    <li class="list-item-info">
+                                        <p class="list-item-title">
+                                            <span class="list-item-typeMark">{{ item.no }}</span>
+                                            {{ item.name }}
+                                        </p>
+                                    </li>
+                                </ul>
+                            </li> -->
+                        </TabPane>
+                        <!-- 临时课程 -->
+                        <TabPane :label="$t('studentWeb.tempClass')" name="tab2">
+                        <!--剛加入的課程-->
+                        <!-- <li
+                            class="list-item"
+                            @click="
+                            sentSelectedEventTitle(
+                                courseList[courseList.length - index - 2]
+                            )
+                            "
+                            :class="{
+                            'list-item-selected': selectedCondition(
+                                courseList[courseList.length - index - 2]
+                            ),
+                            }"
+                            v-for="(item,
+                            index) in this.$store.getters.getMycID.myCourseID
+                            .slice()
+                            .reverse()"
+                            :key="`c+${index}`"
+                        >
+                            <ul>
+                            <li class="list-item-info">
+                                <p class="list-item-title">
+                                <span class="list-item-typeMark">{{ item }}</span>
+                                {{ "新加課程名稱" }}
+                                </p>
+                            </li>
+                            </ul>
+                        </li> -->
+                        <!--剛加入的課程-->
+                            <div  v-if="personList.length > 0">
+                                <div v-for="(item, index) in timeTable" :key="index">
+                                    <li
+                                        class="list-item"
+                                        v-for="(person, num) in item.personList"
+                                        @click="clickCell(item, num, 'list')"
+                                        :class="{ 'list-item-selected': unique == person.unique }"
+                                        :key="`j+${num}`"
+                                    >
+                                        <ul>
+                                            <li class="list-item-info">
+                                                <p class="list-item-title">
+                                                    <span class="list-item-typeMark">{{ person.no }}</span>
+                                                    {{ person.name }}({{ person.teaName }})
+                                                </p>
+                                            </li>
+                                        </ul>
+                                    </li>
+                                </div>
+                            </div>
+                            <div v-else class="list-item-no">
+                                暂无课程
+                            </div>
+                        </TabPane>
+                    </Tabs>
+                </ul>
+            </div>
+        </div>
     </div>
-  </div>
 </template>
 
 <script>
+import Loading from "vue-loading-overlay";
+import "vue-loading-overlay/dist/vue-loading.css";
 export default {
-  name: "CourseList",
-  data() {
-    return {
-      currentView: 'table',
-      messageOpen: false,
-      timetitle:
-        localStorage.getItem("lang") == "tw"
-          ? ["時間", "一", "二", "三", "四", "五"]
-          : ["time", "Mon", "Tue", "Wed", "Thu", "Fri"],
-      courseList: this.$api.studentWeb.courseList //moke数据
-    };
-  },
-  created() {
-    if (this.$store.getters.getIsSelectedNow == false) {
-      this.sentFirstItemActive();
-    }
-  },
-  methods: {
-    changeView(type) {
-      this.currentView=type
+    name: "CourseList",
+    components: {
+        Loading
     },
-    sentFirstItemActive() {
-      let tempArr = [];
-      console.log(this.$api.studentWeb.courseList)
-      for (let i = 0; i < this.courseList.length; i++) {
-        if (this.courseList[i].courseType != "臨時") {
-          tempArr.push(this.courseList[i]);
+    data() {
+        return {
+            isLoad: false,
+            fullPage: true,
+            opacity: 0.6,
+            currentView: 'table',
+            onlyStu: true, //是不是学生
+            courseTime: [
+                {
+                    title: "time",
+                    slot: "time",
+                    width: "150"
+                },
+                {
+                    title: "Mon",
+                    slot: "Mon",
+                },
+                {
+                    title: "Tue",
+                    slot: "Tue"
+                },
+                {
+                    title: "Wed",
+                    slot: "Wed"
+                },
+                {
+                    title: "Thu",
+                    slot: "Thu"
+                },
+                {
+                    title: "Fri",
+                    slot: "Fri"
+                }
+            ],
+            courseList: this.$api.studentWeb.courseList, //moke数据
+            fixList: [],
+            personList: [],
+            nowClassInfor: {},
+            timeTable: [],
+            unique: '',
+        };
+    },
+    props: {
+        period: {
+            type: Array,
+            default: []
+        },
+        teaList: {
+            type: Array,
+            default: []
         }
-      }
-      this.sentSelectedEventTitle(tempArr[0]);
     },
-    // 跳转到当前课程
-    sentSelectedEventTitle: function (item) {
-      this.$router.push("/courseList#" + item.courseID);
-      //改變ItemName的狀態 vuex mutations
-      this.$store.commit("ChangeItemName", item);
-      //螢幕寬度<767px時,直接關掉sidebar
-      if (window.innerWidth <= 991) {
-        this.$store.commit("ToggleSidebar", false);
-      }
+    created() {
+        this.$store.state.userInfo.roles.map(item => {
+            if(item == "teacher") {
+                this.onlyStu = false
+            }
+        })
+        this.getClassList()
+    },
+    mounted () {
+        // console.log(this.timeTable);
     },
-    selectedCondition(item) {
-      if (
-        this.$store.getters.getIsSelectedNow == true &&
-        this.$store.getters.getItemTitle.courseName == item.courseName
-      ) {
-        return true;
-      } else return false;
+    methods: {
+        getClassList() {
+            this.isLoad = true
+            let param = {
+                userid: this.$store.state.userInfo.sub,
+                school: this.$store.state.userInfo.azp
+            }
+            this.$api.studentWeb.getClassList(param).then(res => {
+                if(res.courses.length > 0) {
+                    // 表定课程
+                    var fixList = []
+                    // 临时课程
+                    var personList = []
+                    var list = res.courses
+                    for (let i = 0; i < list.length; i++) {
+                        for (let j = 0; j < list[i].course.schedule.length; j++) {
+                            // 有classId,表定课程
+                            if(list[i].course.schedule[j].classId == list[i].stuCourse.classId[0]) {
+                                if(list[i].course.schedule[j].time.length > 0) {
+                                    for (let m = 0; m < list[i].course.schedule[j].time.length; m++) {
+                                        var data = this._.cloneDeep(list[i].course)
+                                        delete data.schedule
+                                        data.school = list[i].stuCourse.school
+                                        data.scope = list[i].stuCourse.scope
+                                        // 拼接得到一个唯一的标识
+                                        data.unique = 'class' + list[i].course.no + list[i].course.schedule[j].time[m].week + list[i].course.schedule[j].time[m].id
+                                        fixList.push(this.getNewClass(data, list[i].course.schedule[j], m))
+                                    }
+                                }
+                            }
+                            // 有stulist,临时课程
+                            else if (list[i].course.schedule[j].stulist) {
+                                if(list[i].course.schedule[j].time.length > 0) {
+                                    for (let m = 0; m < list[i].course.schedule[j].time.length; m++) {
+                                        var data = this._.cloneDeep(list[i].course)
+                                        delete data.schedule
+                                        data.school = list[i].stuCourse.school
+                                        data.scope = list[i].stuCourse.scope
+                                        data.unique = 'person' + list[i].course.no + list[i].course.schedule[j].time[m].week + list[i].course.schedule[j].time[m].id
+                                        personList.push(this.getNewClass(data, list[i].course.schedule[j], m))
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    console.log(fixList)
+                    console.log(personList)
+                    this.fixList = fixList
+                    this.personList = personList
+                    this.getClassTime()
+                }
+            }).finally(()=>{
+                this.isLoad = false
+            })
+            
+        },
+        /* getNewClass(nowCourse, j) {
+            if(nowCourse.course.schedule[j].time.length > 0) {
+                var list = []
+                for (let m = 0; m < nowCourse.course.schedule[j].time.length; m++) {
+                    var data = this._.cloneDeep(nowCourse.course)
+                    delete data.schedule
+                    data.school = nowCourse.stuCourse.school
+                    data.scope = nowCourse.stuCourse.scope
+                    // 拼接得到一个唯一的标识
+                    data.unique = nowCourse.course.no + nowCourse.course.schedule[j].time[m].week + nowCourse.course.schedule[j].time[m].id
+                    data.classId = nowCourse.course.schedule[j].classId
+                    data.room = nowCourse.course.schedule[j].room
+                    data.teacherId = nowCourse.course.schedule[j].teacherId
+                    data.notice = nowCourse.course.schedule[j].notice
+                    data.stuList = nowCourse.course.schedule[j].stulist
+                    data.timeId = nowCourse.course.schedule[j].time[m].id
+                    data.timeWeek = nowCourse.course.schedule[j].time[m].week
+                    list.push(data)
+                }
+                console.log(list);
+                return list
+            }
+        }, */
+        // 新增数组
+        getNewClass(data, schedule, m) {
+            data.classId = schedule.classId
+            data.room = schedule.room
+            data.teacherId = schedule.teacherId
+            data.notice = schedule.notice
+            data.stuList = schedule.stulist
+            data.timeId = schedule.time[m].id
+            data.timeWeek = schedule.time[m].week
+            data.teaName = ""
+            // 获取老师名单
+            if(this.teaList.length > 0) {
+                this.teaList.map(item => {
+                    if(item.id == schedule.teacherId) {
+                        data.teaName = item.name
+                    }
+                })
+            }
+            return data
+        },
+        // 处理上课时间
+        getClassTime() {
+            if(this.period != undefined) {
+                // 选出该年级的上课时间
+                var grades = this._.cloneDeep(this.period)
+                for (let i = 0; i < grades.length; i++) {
+                    // 所有的period.id 都一样,选定fixList[0]
+                    if(grades[i].id == this.fixList[0].period.id) {
+                        this.timeTable = grades[i].timetable
+                    }
+                }
+                // 在时间中加入对应的课程
+                for (let j = 0; j < this.timeTable.length; j++) {
+                    var newfixLis = []
+                    var newpersonList = []
+                    for (let i = 0; i < this.fixList.length; i++) {
+                        if(this.timeTable[j].id == this.fixList[i].timeId) {
+                            newfixLis.push(this.fixList[i])
+                        }
+                    }
+                    for (let i = 0; i < this.personList.length; i++) {
+                        if(this.timeTable[j].id == this.personList[i].timeId) {
+                            newpersonList.push(this.personList[i])
+                        }
+                    }
+                    this.timeTable[j].fixList = newfixLis
+                    this.timeTable[j].personList = newpersonList
+                }
+            }
+        },
+        // 点击单节课,显示基本信息
+        /* row:timeTable的某一个
+           index:fixList/personList中的当前这一数据的下标
+           type:传'list'就是临时课程,不传就是表定课程
+        */
+        clickCell(row, index, type) {
+            this.nowClassInfor = this._.cloneDeep(row)
+            if(type) {
+                this.nowClassInfor.course = this._.cloneDeep(row.personList[index])
+            } else {
+                this.nowClassInfor.course = this._.cloneDeep(row.fixList[index])
+            }
+            this.unique = this.nowClassInfor.course.unique
+            this.sentSelectedEventTitle(this.nowClassInfor)
+        },
+        changeView(type) {
+            this.currentView = type
+        },
+        // 跳转到当前课程
+        sentSelectedEventTitle: function (item) {
+            // 改變ItemName的狀態 vuex mutations
+            this.$store.commit("ChangeItemName", item);
+            // 螢幕寬度<767px時,直接關掉sidebar
+            if (window.innerWidth <= 991) {
+                this.$store.commit("ToggleSidebar", false);
+            }
+        },
     },
-  },
 };
 </script>
 

+ 37 - 6
TEAMModelOS/ClientApp/src/components/student-web/HomeView/CourseListView.vue

@@ -1,7 +1,14 @@
 <template>
   <div class="courselist-view">
-    <CourseList :class="{ 'hide-sidebar': this.$store.getters.getSidebarisOpen == false}" />
-    <CourseContent :class="{'course-content-span': this.$store.getters.getSidebarisOpen == false}"/>
+    <CourseList :class="{ 'hide-sidebar': this.$store.getters.getSidebarisOpen == false}"
+        :period="period"
+        :teaList="teaList"
+        v-if="isShow"
+    />
+    <CourseContent :class="{'course-content-span': this.$store.getters.getSidebarisOpen == false}"
+        :roomList="roomList"
+        v-if="isShow"
+    />
   </div>
 </template>
 
@@ -14,22 +21,47 @@ export default {
   name: "CourseListView",
   components: {
     CourseList,
-    CourseContent,
+    CourseContent
   },
   data() {
     return {
-      
       MyNo: "",
       MyName: this.$t('studentWeb.courseList-title'),
+      isShow: false,
+      roomList: [], //教室列表
+      period: [], //年级列表
+      teaList: [], //老师列表
     };
   },
 
-  methods: {},
+  methods: {
+    // 查找班级
+    findSchoolInfo() {
+      this.$api.studentWeb.getSchoolInfo({}).then(res => {
+        if(res.status == 200) {
+          this.period = res.school_base.period
+          this.roomList = res.school_rooms
+        }
+      })
+    },
+    // 获取所有老师
+    getSchoolTea() {
+      let req = {school_code: this.$store.state.userInfo.azp}
+      this.$api.studentWeb.getSchoolTeacher(req).then(res => {
+        this.isShow = true
+        if(res.teachers.length > 0) {
+          this.teaList = res.teachers
+        }
+      })
+    },
+  },
 
   created() {
     this.$emit("onNavNo", this.MyNo);
     this.$emit("onNavName", this.MyName);
     this.$store.commit("ToggleSidebar", true);
+    this.findSchoolInfo()
+    this.getSchoolTea()
   },
 };
 </script>
@@ -47,5 +79,4 @@ export default {
   width: 100% !important;
   transition: 0.5s;
 }
-
 </style>

+ 18 - 20
TEAMModelOS/ClientApp/src/components/student-web/HomeView/HomeView.vue

@@ -12,7 +12,7 @@
                     <div>
                         <!-- <div class="title-rect" /> -->
                         <p class="title-rect-name">{{ $t("studentWeb.recentClass") }}</p>
-                        <p class="classtitle">{{ $t("evaluation.noData") }}</p>
+                        <p class="classtitle">{{ $t("studentWeb.public.noData") }}</p>
                         <!-- <p class="classtitle">{{ $t("studentWeb.defaultRecentClass") }}</p>
                         <p class="time">{{ $t("studentWeb.defaultClassTime") }}</p>
                         <p class="place">{{ $t("studentWeb.defaultClassPlace") }}</p> -->
@@ -25,7 +25,7 @@
                                 <Icon type="ios-arrow-forward" />
                             </p>
                             <p class="classtitle">
-                                {{ $t("evaluation.noData") }}
+                                {{ $t("studentWeb.public.noData") }}
                             </p>
                         </div>
                         <div class="todaydaylineList">
@@ -39,20 +39,20 @@
                                 >
                                     <ul>
                                         <li class="list-item-icon">
-                                            <svg-icon v-if="item.eventType == 'homework'"
+                                            <svg-icon v-if="item.eventType == 'Homework'"
                                                       icon-class="doc"/>
-                                            <svg-icon v-if="item.eventType == 'preview'"
+                                            <svg-icon v-if="item.eventType == 'Preview'"
                                                       icon-class="selflearninginTime"/>
-                                            <svg-icon v-if="item.eventType == 'exam'"
+                                            <svg-icon v-if="item.eventType == 'Exam'"
                                                       icon-class="test"
                                                       class="reset-testIcon"/>
-                                            <svg-icon v-if="item.eventType == 'vote'"
+                                            <svg-icon v-if="item.eventType == 'Vote'"
                                                       icon-class="vote"/>
-                                            <svg-icon v-if="item.eventType == 'survey'"
+                                            <svg-icon v-if="item.eventType == 'Survey'"
                                                       icon-class="quesnaire"/>
                                         </li>
                                         <li class="list-item-info">
-                                            <p class="list-item-title" :class="{'list-item-titleEn': getCurrentLang() == 'en',}">
+                                            <p class="list-item-title" :class="{'list-item-titleEn': getCurrentLang() == 'en-us'}">
                                                 <span class="list-item-typeMark">{{ item.eventType }}</span>
                                                 <span>{{ item.eventName }}</span>
                                             </p>
@@ -60,14 +60,13 @@
                                                 {{ $t( "studentWeb.endsTodayTime") }}
                                             </p>
                                         </li>
-                                        <li class="list-item-unDone"></li>
+                                        <!-- <li class="list-item-unDone"></li> -->
                                     </ul>
                                 </li>
                             </div>
                         </div>
                     </div>
                 </Card>
-                <br />
                 <!-- 课程清单 -->
                 <router-link to="/studentWeb/courseList">
                     <Card style="overflow: hidden">
@@ -76,25 +75,26 @@
                             {{ $t("studentWeb.coursesCardTitle") }}
                             <Icon type="ios-arrow-forward" />
                         </h3>
-                        <p class="course-new">{{ $t("evaluation.noData") }}</p>
-                        <!-- <p class="course-new">{{ $t("studentWeb.newAddCourse") }}</p> -->
+                        <!-- <p class="course-new">{{ $t("evaluation.noData") }}</p> -->
+                        <!-- <p class="course-new">{{ $t("evaluation.noData") }}</p> -->
+                        <!-- <p class="course-new">今日课程:英语</p>
+                        <p class="course-new">{{ $t("studentWeb.newAddCourse") }}</p> -->
                     </Card>
                 </router-link>
-                <br />
             </i-col>
             <i-col :xs="24" :sm="24" :md="12" :lg="8">
                 <!-- 活动任务清单 -->
                 <MissionListCard />
             </i-col>
             <i-col :xs="24" :sm="24" :md="12" :lg="7">
-                <Card :bordered="true">
+                <Card :bordered="true" class="barCard">
                     <div class="no-data-text">
                         <img
                             src="@/assets/icon/no_data_evaluation.png"
                             width="120"
                         />
                         <span style="margin-top: 15px; color: #808080">{{
-                            $t("evaluation.noData")
+                            $t("studentWeb.public.noData")
                         }}</span>
                     </div>
                     <!-- <div style="position: relative">
@@ -107,8 +107,7 @@
                         <ChartCarousel />
                     </div> -->
                 </Card>
-                <br />
-                <Card class="bar-card" @click.native="noData">
+                <Card class="barCard" @click.native="noData">
                     <h3 style="color: #575757; font-weight: 700">
                         <svg-icon class="titleIcon" icon-class="target" />
                         {{ $t("studentWeb.myProgressBar.tasksCompletionRate") }}
@@ -121,14 +120,13 @@
                         </span>
                         <div
                             class="myTestProgressContent"
-                            :style="{ width:MyEventData == '--' ? '0' : MyEventData + '%' }"
+                            :style="{width: MyEventData == '--' ? '0' : MyEventData + '%' }"
                             style="background: #00ad6c"
                         ></div>
                         <div class="myTestProgress"></div>
                     </div>
                 </Card>
-                <br />
-                <Card class="bar-card" @click.native="noData">
+                <Card @click.native="noData">
                     <h3 style="color: #575757; font-weight: 700">
                         <svg-icon
                             class="titleIcon studyIcon"

+ 208 - 212
TEAMModelOS/ClientApp/src/components/student-web/SettingView/SettingView.vue

@@ -1,231 +1,227 @@
 <template>
-  <div class="setting-view">
-    <Row :gutter="30">
-      <i-col :xs="24" :sm="24" :md="8" :lg="4" class="menu-bar">
-        <ul class="list-block">
-          <li
-            class="list-item"
-            :class="{ 'list-item-selected': currentTab == 1 }"
-            @click="setTab(1)"
-          >
-            {{ $t("studentWeb.teammodel-account-management.page-title") }}
-          </li>
-          <li
-            class="list-item"
-            :class="{ 'list-item-selected': currentTab == 2 }"
-            @click="setTab(2)"
-          >
-            {{ $t("studentWeb.preference.page-title") }}
-          </li>
-          <li
-            class="list-item"
-            :class="{ 'list-item-selected': currentTab == 3 }"
-            @click="setTab(3)"
-          >
-            {{ $t("studentWeb.change-school.page-title") }}
-          </li>
-        </ul>
-      </i-col>
-      <i-col :xs="24" :sm="24" :md="16" :lg="20" class="menu-content">
-        <div v-if="currentTab == 1">
-          <Row :gutter="30">
-            <i-col :xs="24" :sm="24" :md="6" :lg="3" align="center">
-              <label class="edit">
-                <img
-                  class="user-avatar"
-                  src="https://images.unsplash.com/photo-1520223297779-95bbd1ea79b7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60"
-                />
-                <input type="file" accept="image/*" />
-                <div class="edit-btn">
-                  <Icon type="md-create" />
-                </div>
-              </label>
-              <p class="user-name">Nancy Chen</p>
+    <div class="setting-view">
+        <Row :gutter="30">
+            <i-col :xs="24" :sm="24" :md="8" :lg="4" class="menu-bar">
+                <ul class="list-block">
+                    <li class="list-item"
+                        :class="{ 'list-item-selected': currentTab == 1 }"
+                        @click="setTab(1)"
+                    >
+                        {{ $t("studentWeb.teammodel-account-management.page-title") }}
+                    </li>
+                    <li class="list-item"
+                        :class="{ 'list-item-selected': currentTab == 2 }"
+                        @click="setTab(2)"
+                    >
+                        {{ $t("studentWeb.preference.page-title") }}
+                    </li>
+                    <li class="list-item"
+                        :class="{ 'list-item-selected': currentTab == 3 }"
+                        @click="setTab(3)"
+                    >
+                        {{ $t("studentWeb.change-school.page-title") }}
+                    </li>
+                </ul>
             </i-col>
+            <i-col :xs="24" :sm="24" :md="16" :lg="20" class="menu-content">
+              <div v-if="currentTab == 1">
+                <Row :gutter="30">
+                  <i-col :xs="24" :sm="24" :md="6" :lg="3" align="center">
+                    <label class="edit">
+                      <img
+                        class="user-avatar"
+                        src="https://images.unsplash.com/photo-1520223297779-95bbd1ea79b7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60"
+                      />
+                      <input type="file" accept="image/*" />
+                      <div class="edit-btn">
+                        <Icon type="md-create" />
+                      </div>
+                    </label>
+                    <p class="user-name">Nancy Chen</p>
+                  </i-col>
 
-            <i-col :xs="24" :sm="24" :md="18" :lg="7" class="user-setting">
-              <h4>{{ $t("studentWeb.teammodel-account-management.name") }}</h4>
-              <input
-                type="text"
-                v-model="userAccountData[0]"
-                required
-                minlength="3"
-                maxlength="25"
-                disabled
-              />
-              <Divider />
-              <h4>{{ $t("studentWeb.teammodel-account-management.account") }}</h4>
-              <input
-                type="text"
-                v-model="userAccountData[1]"
-                required
-                minlength="3"
-                maxlength="25"
-              />
-              <Divider />
-              <h4>{{ $t("studentWeb.teammodel-account-management.password") }}</h4>
-              <input
-                type="password"
-                v-model="userAccountData[2]"
-                required
-                minlength="3"
-                maxlength="25"
-              />
-              <Divider />
-              <h4>{{ $t("studentWeb.teammodel-account-management.phone") }}</h4>
-              <input
-                type="tel"
-                v-model="userAccountData[3]"
-                required
-                minlength="3"
-                maxlength="16"
-              />
-              <Divider />
-              <h4>{{ $t("studentWeb.teammodel-account-management.e-mail") }}</h4>
-              <input
-                type="email"
-                v-model="userAccountData[4]"
-                required
-                minlength="3"
-                maxlength="25"
-              />
-              <Divider />
-              <h4>{{ $t("studentWeb.teammodel-account-management.binding") }}</h4>
-              <div class="user-link-group">
-                <li>
-                  <svg-icon icon-class="facebook" class="user-link" />
-                  <p>{{ $t("studentWeb.teammodel-account-management.isbind") }}</p>
-                </li>
-                <li>
-                  <svg-icon icon-class="google" class="user-link" />
-                  <p>{{ $t("studentWeb.teammodel-account-management.unbind") }}</p>
-                </li>
-                <li>
-                  <svg-icon icon-class="wechat" class="user-link" />
-                  <p>{{ $t("studentWeb.teammodel-account-management.unbind") }}</p>
-                </li>
+                  <i-col :xs="24" :sm="24" :md="18" :lg="7" class="user-setting">
+                    <h4>{{ $t("studentWeb.teammodel-account-management.name") }}</h4>
+                    <input
+                      type="text"
+                      v-model="userAccountData[0]"
+                      required
+                      minlength="3"
+                      maxlength="25"
+                      disabled
+                    />
+                    <Divider />
+                    <h4>{{ $t("studentWeb.teammodel-account-management.account") }}</h4>
+                    <input
+                      type="text"
+                      v-model="userAccountData[1]"
+                      required
+                      minlength="3"
+                      maxlength="25"
+                    />
+                    <Divider />
+                    <h4>{{ $t("studentWeb.teammodel-account-management.password") }}</h4>
+                    <input
+                      type="password"
+                      v-model="userAccountData[2]"
+                      required
+                      minlength="3"
+                      maxlength="25"
+                    />
+                    <Divider />
+                    <h4>{{ $t("studentWeb.teammodel-account-management.phone") }}</h4>
+                    <input
+                      type="tel"
+                      v-model="userAccountData[3]"
+                      required
+                      minlength="3"
+                      maxlength="16"
+                    />
+                    <Divider />
+                    <h4>{{ $t("studentWeb.teammodel-account-management.e-mail") }}</h4>
+                    <input
+                      type="email"
+                      v-model="userAccountData[4]"
+                      required
+                      minlength="3"
+                      maxlength="25"
+                    />
+                    <Divider />
+                    <h4>{{ $t("studentWeb.teammodel-account-management.binding") }}</h4>
+                    <div class="user-link-group">
+                      <li>
+                        <svg-icon icon-class="facebook" class="user-link" />
+                        <p>{{ $t("studentWeb.teammodel-account-management.isbind") }}</p>
+                      </li>
+                      <li>
+                        <svg-icon icon-class="google" class="user-link" />
+                        <p>{{ $t("studentWeb.teammodel-account-management.unbind") }}</p>
+                      </li>
+                      <li>
+                        <svg-icon icon-class="wechat" class="user-link" />
+                        <p>{{ $t("studentWeb.teammodel-account-management.unbind") }}</p>
+                      </li>
+                    </div>
+                    <br />
+                    <br />
+                    <label class="uploadBtn">
+                      <span>{{ $t("studentWeb.teammodel-account-management.save") }}</span>
+                    </label>
+                  </i-col>
+                </Row>
               </div>
-              <br />
-              <br />
-              <label class="uploadBtn">
-                <span>{{ $t("studentWeb.teammodel-account-management.save") }}</span>
-              </label>
-            </i-col>
-          </Row>
-        </div>
-        <div v-if="currentTab == 2">
-          <h4>{{ $t("studentWeb.preference.UI-theme") }}</h4>
-          <label class="testBtn yesNoBtn">
-            <input type="radio" value="Light" v-model="uiType" />
-            <div class="lightbg"></div>
-            Light Mode
-          </label>
-          <label class="testBtn yesNoBtn">
-            <input type="radio" value="Dark" v-model="uiType" />
-            <div class="darkbg"></div>
-            Dark Mode
-          </label>
-          <Divider />
-          <h4>{{ $t("studentWeb.preference.language") }}</h4>
-          <Dropdown class="dropdown">
-            <a href="javascript:void(0)">
-              <span v-if="this.$store.getters.getCurrentLaguage == 'zh-TW'"
-                >繁體中文</span
-              >
-              <span v-if="this.$store.getters.getCurrentLaguage == 'en-US'"
-                >English</span
-              >
-              <Icon type="ios-arrow-down"></Icon>
-            </a>
-            <DropdownMenu slot="list">
-              <div @click="changeLanguage('zh-TW')">
-                <DropdownItem>繁體中文</DropdownItem>
-              </div>
-              <div @click="changeLanguage('en-US')">
-                <DropdownItem>English</DropdownItem>
+              <div v-if="currentTab == 2">
+                  <h4>{{ $t("studentWeb.preference.UI-theme") }}</h4>
+                  <label class="testBtn yesNoBtn">
+                      <input type="radio" value="Light" v-model="uiType" />
+                      <div class="lightbg"></div>
+                      Light Mode
+                  </label>
+                  <label class="testBtn yesNoBtn">
+                      <input type="radio" value="Dark" v-model="uiType" />
+                      <div class="darkbg"></div>
+                      Dark Mode
+                  </label>
+                  <Divider />
+                  <h4>{{ $t("studentWeb.preference.language") }}</h4>
+                  <Dropdown class="dropdown">
+                      <a href="javascript:void(0)">
+                          <span v-if="this.$store.getters.getCurrentLaguage == 'zh-cn'">简体中文</span>
+                          <span v-if="this.$store.getters.getCurrentLaguage == 'zh-tw'">繁體中文</span>
+                          <span v-if="this.$store.getters.getCurrentLaguage == 'en-us'">English</span>
+                          <Icon type="ios-arrow-down"></Icon>
+                      </a>
+                      <DropdownMenu slot="list">
+                          <div @click="changeLanguage('zh-cn')">
+                              <DropdownItem>简体中文</DropdownItem>
+                          </div>
+                          <div @click="changeLanguage('zh-tw')">
+                              <DropdownItem>繁體中文</DropdownItem>
+                          </div>
+                          <div @click="changeLanguage('en-us')">
+                              <DropdownItem>English</DropdownItem>
+                          </div>
+                    </DropdownMenu>
+                  </Dropdown>
+                  <Divider />
+                  <h4>提示設定</h4>
+                  <br />
+                  <input type="checkbox" v-model="hintNextItem" name="cb" />
+                  <label> 活動完成時,自動提示前往下一個進行中未完成的活動</label>
               </div>
-            </DropdownMenu>
-          </Dropdown>
-          <Divider />
-          <h4>提示設定</h4>
-          <br />
-          <input type="checkbox" v-model="hintNextItem" name="cb"/>
-          <label> 活動完成時,自動提示前往下一個進行中未完成的活動</label>
-        </div>
-        <div v-if="currentTab == 3">
-          <h4>{{ $t("studentWeb.change-school.current-data-school") }}</h4>
+              <div v-if="currentTab == 3">
+                  <h4>{{ $t("studentWeb.change-school.current-data-school") }}</h4>
 
-          <Dropdown class="dropdown">
-            <a href="javascript:void(0)">
-              {{ $t("studentWeb.change-school.Habook-smart-school") }}
-              <Icon type="ios-arrow-down"></Icon>
-            </a>
-            <DropdownMenu slot="list">
-              <DropdownItem>{{ $t("studentWeb.change-school.Habook-smart-school") }}</DropdownItem>
-            </DropdownMenu>
-          </Dropdown>
-        </div>
-      </i-col>
-    </Row>
-  </div>
+                  <Dropdown class="dropdown">
+                      <a href="javascript:void(0)">
+                          {{ $t("studentWeb.change-school.Habook-smart-school") }}
+                          <Icon type="ios-arrow-down"></Icon>
+                      </a>
+                      <DropdownMenu slot="list">
+                          <DropdownItem>{{ $t("studentWeb.change-school.Habook-smart-school") }}</DropdownItem>
+                      </DropdownMenu>
+                  </Dropdown>
+              </div>
+            </i-col>
+        </Row>
+    </div>
 </template>
 
 <script>
 export default {
-  name: "SettingView",
-  components: {},
-  data() {
-    return {
-      hintNextItem:'',
-      userAccountData: [
-        "Nancy Chen",
-        "ST11096",
-        "221133455566",
-        "+886-123-123-123",
-        "nancy@habook.com",
-        "",
-      ],
-      uiType: "Light",
-      currentTab: 1,
-      MyNo: "X",
-      MyName: "",
-    };
-  },
+    name: "SettingView",
+    components: {},
+    data() {
+        return {
+            hintNextItem:'',
+            userAccountData: [
+              "Nancy Chen",
+              "ST11096",
+              "221133455566",
+              "+886-123-123-123",
+              "nancy@habook.com",
+              "",
+            ],
+            uiType: "Light",
+            currentTab: 1,
+            MyNo: "X",
+            MyName: "",
+        };
+    },
 
-  watch: {
-    hintNextItem(value) {
-      console.log("hintNextItemSetting:" + value);
-      this.$store.commit("sethintNextItem", value);
+    watch: {
+        hintNextItem(value) {
+            console.log("hintNextItemSetting:" + value);
+            this.$store.commit("sethintNextItem", value);
+        },
     },
-  },
-  methods: {
-    setTab(currentTab) {
-      this.currentTab = currentTab;
+    methods: {
+        setTab(currentTab) {
+            this.currentTab = currentTab;
+        },
+        changeLanguage(lang) {
+            this.$store.commit("setLanguage", lang);
+
+            /* if (lang == "tw") {
+                this.MyName = "個人設定";
+                this.$emit("onNavName", this.MyName);
+            } else {
+                this.MyName = "Setting";
+                this.$emit("onNavName", this.MyName);
+            } */
+        },
     },
-    changeLanguage(lang) {
-      this.$store.commit("setLanguage", lang);
 
-      if (lang == "tw") {
-        this.MyName = "個人設定";
+    created() {
+        //發送本頁target 跟名字給App.Vue 的navBar
+        this.MyName = this.$t("studentWeb.settingView-title");
+        console.log(localStorage.getItem('hintNextItem'))
+        if(localStorage.getItem('hintNextItem')=='false') { //留意回傳回來是字串
+          this.hintNextItem = false
+        } else this.hintNextItem = true
+        this.$emit("onNavNo", this.MyNo);
         this.$emit("onNavName", this.MyName);
-      } else {
-        this.MyName = "Setting";
-        this.$emit("onNavName", this.MyName);
-      }
     },
-  },
-
-  created() {
-    //發送本頁target 跟名字給App.Vue 的navBar
-    this.MyName = this.$t("studentWeb.settingView-title");
-    console.log(localStorage.getItem('hintNextItem'))
-    if(localStorage.getItem('hintNextItem')=='false'){ //留意回傳回來是字串
-      this.hintNextItem=false
-    }
-    else this.hintNextItem=true
-    this.$emit("onNavNo", this.MyNo);
-    this.$emit("onNavName", this.MyName);
-  },
 };
 </script>
 

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

@@ -434,7 +434,7 @@ export default {
         link: 'Share link'
     },
     'courseList-title': 'My Course List',
-    defaultClass: 'table set course',
+    defaultClass: 'standard courses',
     tempClass: 'temporary class',
     courseContent: {
         baseInfo: 'Basic Information',

+ 2 - 2
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/studentWeb.js

@@ -434,8 +434,8 @@ export default {
         link: '分享连结'
     },
     'courseList-title': '我的课程清单',
-    defaultClass: '表定课程',
-    tempClass: '临时课程',
+    defaultClass: '标准课程',
+    tempClass: '个人课程',
     courseContent: {
         baseInfo: '基本资讯',
         description: '课程概述',

+ 2 - 2
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/studentWeb.js

@@ -434,8 +434,8 @@ export default {
         link: '分享連結'
     },
     'courseList-title': '我的課程清單',
-    defaultClass: '表定課程',
-    tempClass: '臨時課程',
+    defaultClass: '標準課程',
+    tempClass: '個人課程',
     courseContent: {
         baseInfo: '基本資訊',
         description: '課程概述',

+ 1 - 1
TEAMModelOS/ClientApp/src/utils/PublicRenderer.js

@@ -806,7 +806,7 @@ function drawMath(stage, layer, group, item, url, hierarchy) {
         createMath.style.fontSize = item.pitchFamily + 'px'
         //createMath.style.background ='#CC00FF'
         let svg = window.MathJax.tex2svg(mathtext)
-        let svgHtml = window.MathJax.tex2svg(mathtext, { em: 12, ex: 6 })
+        let svgHtml = MathJax.tex2svg(mathtext, { em: 12, ex: 6 })
         var regex2 = /\<svg .*\>.*\<\/svg\>/;
         var arr2 = svgHtml.outerHTML.match(regex2);
         var mathhtml = arr2[0]

+ 1 - 1
TEAMModelOS/ClientApp/src/view/classrecord/ClassRecord.less

@@ -48,7 +48,7 @@
     display: flex;
     flex-direction: row;
     height: 450px;
-    background: #000;
+    background: #fff;
     margin-top: 15px;
 
     &:hover .page-wrap {

+ 12 - 33
TEAMModelOS/ClientApp/src/view/classrecord/HtexRender.vue

@@ -16,9 +16,9 @@
   //import res from './data/HtexJson/echart.json'
   //import images from './data/HtexJson/background.png'
   //复杂图形组
-   import res from './data/HtexJson/Complexgraphics.json'
+   //import res from './data/HtexJson/Complexgraphics.json'
   //公式渲染
-  //import res from './data/HtexJson/Math.json'
+  import res from './data/HtexJson/Math.json'
 import { drawRect, drawArc, drawEllipse, drawImage, drawPath, drawLine, drawTable, drawEchart,drawMath } from "../../utils/PublicRenderer.js"
 export default {
   name: 'HtexRender',
@@ -34,7 +34,6 @@ export default {
       var scalingYinfo = 450 / 720
       var pagenow = ''
       page === 0 ? pagenow = page : pagenow = page - 1
-      return new Promise(async (r, j) => {
         var scaling = (window.innerHeight / res.height).toFixed(2) && res.height !== '' ? (window.innerHeight / res.height).toFixed(2) : 0;
         var stageX = (window.innerWidth - res.width * scaling) / 2 && res.width !== '' ? (window.innerWidth - res.width * scaling) / 2 : 0;
         var callUrl='https://teammodelstorage.blob.core.chinacloudapi.cn/hiteachcc/1598507732/res/test/';
@@ -67,7 +66,7 @@ export default {
           if (res.fill.type === 3) {
             var imgSrcinfo = images
             console.log(imgSrcinfo,'背景图片3333')
-            imageObj.onload = async function () {
+            imageObj.onload = function () {
               //处理超过尺寸背景图
               var offsetxValue =0
               var offsetyValue =0
@@ -111,7 +110,7 @@ export default {
                     backgroup.zIndex(0);
                     layer.batchDraw();
                   }
-                  promiseArr.push(that.doRender(stage, layer, trx, res.item, callUrl, spacename, initStatus, page));
+                 that.doRender(stage, layer, trx, res.item);
                   //处理超过尺寸背景图END
                 }
               } else if (initStatus !== 'additional'){
@@ -125,13 +124,13 @@ export default {
                 layer.add(backgroup);
                 backgroup.zIndex(0);
                 layer.batchDraw();
-                promiseArr.push(that.doRender(stage, layer, trx, res.item, callUrl, spacename, initStatus,page));
+                that.doRender(stage, layer, trx, res.item);
               }
             }
             imageObj.crossOrigin = 'Anonymous';
             imageObj.src = imgSrcinfo
           } else if (res.fill.type === 4) {
-            imageObj.onload = async function () {
+            imageObj.onload = function () {
               var bgImage = new Konva.Image({
                 fillPatternImage: imageObj,
                 height: res.height,
@@ -141,8 +140,7 @@ export default {
               layer.add(backgroup);
               backgroup.zIndex(0);
               layer.batchDraw();
-              console.log(trx, '图片打印tr')
-              promiseArr.push(that.doRender(stage, layer, trx, res.item, callUrl, spacename, initStatus, page));
+             that.doRender(stage, layer, trx, res.item);
             };
             imageObj.crossOrigin = 'Anonymous';
             imageObj.src = res.fill.pattFill.base64
@@ -156,7 +154,7 @@ export default {
             layer.add(backgroup);
             backgroup.zIndex(0)
             layer.batchDraw();
-            promiseArr.push(that.doRender(stage, layer, trx, res.item, callUrl, spacename, initStatus, page));
+           that.doRender(stage, layer, trx, res.item);
           } else if (res.fill.type === 2) {
             var color0 = ''
             var color5 = ''
@@ -178,24 +176,16 @@ export default {
             layer.add(backgroup);
             backgroup.zIndex(0)
             layer.batchDraw();
-            promiseArr.push(that.doRender(stage, layer, trx, res.item, callUrl, spacename, initStatus, page));
+           that.doRender(stage, layer, trx, res.item);
           } else {
-            promiseArr.push(that.doRender(stage, layer, trx, res.item, callUrl, spacename, initStatus, page));
+           that.doRender(stage, layer, trx, res.item, callUrl, spacename, initStatus, page);
           }
         }
-        // else if (initStatus !== 'additional'){
-        //   promiseArr.push(that.doRender(stage, layer, trx, res.item, callUrl, spacename, initStatus, page));
-        // }
         stage.add(layer);
-        Promise.all(promiseArr).then(res => {
-          r(page)
-        })
-      })
     },
-    async doRender(stage, layer, tr, items, callUrl) {
+    doRender(stage, layer, tr, items, callUrl) {
       let that = this
-      return new Promise((r, j) => {
-        let f = async function () {
+        let f = function () {
           let promiseArr = []
           for (let k = 0; k < items.length; k++) {
             let promise = new Promise(async (r, j) => {
@@ -221,13 +211,10 @@ export default {
                     let renderRect = await drawRect(stage, layer, i, tr, callUrl,k+1);
                   }
                 }
-                r(200)
               } else if (i.type === "CxnSp" && i.svg) {
                 if (i.svg.type === "polyline") {
-                  console.log(i.svg.type, 'type的值')
                   let renderPath = await drawPath(stage, layer, i, tr, callUrl,k+1);
                 } else if (i.svg.type === "polygon" && i.svg.points) {
-                  console.log(i.svg.type, 'type的值')
                   let renderPathinfo = await drawPath(stage, layer, i, tr, callUrl,k+1);
                 } else {
                   let renderPaths = await drawPath(stage, layer, i, tr, callUrl,k+1);
@@ -248,12 +235,10 @@ export default {
                 } else {
                   let renderDraw = await drawPath(stage, layer, i, tr, callUrl,k+1);
                 }
-                r(200)
               }else if(i.type === "Math" && i.formula){
                     let renderMath = await drawMath(stage, layer,tr,i,callUrl,k+1)
               }else if (i.charts && i.charts !== null) {
                 let renderEchart = await drawEchart(stage, layer, tr, i,k+1)
-                //that.iframeValue.push(renderEchart)
               } else if (i.type === "Table") {
                 let renderTable = await drawTable(stage, layer, tr, i,k+1)
               } else if (i.shapeType === "Diagram") {
@@ -279,16 +264,10 @@ export default {
                   }
                 }
               }
-              r(200)
             })
-            promiseArr.push(promise)
           }
-          Promise.all(promiseArr).then(res => {
-            r(200)
-          })
         }
         f()
-      })
     },
   },
   mounted(){

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

@@ -63,7 +63,7 @@
                     <svg-icon icon-class="home" class="tabIcon3" title="首页" />
                 </MenuItem>
                 <!-- 加入课程 -->
-                <button class="addcoursebtn"
+                <!-- <button class="addcoursebtn"
                         @click='sentcourseID()'
                         v-if="MyName == this.$t('studentWeb.courseList-title')">
                     {{$t("studentWeb.home.joinClass")}}
@@ -76,7 +76,7 @@
                        v-if="MyName == this.$t('studentWeb.courseList-title')" />
                 <div class="clearinput">
                     <Icon @click="clearInput()" v-if="isTyping == true" type="md-close" />
-                </div>
+                </div> -->
                 <!-- 加入课程 -->
             </Menu>
         </div>