Browse Source

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

zhouj1203@hotmail.com 4 years ago
parent
commit
3554f140fa
21 changed files with 1424 additions and 228 deletions
  1. 7 0
      TEAMModelOS/ClientApp/src/api/learnActivity.js
  2. 39 19
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/paper-view.css
  3. 10 11
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContent.vue
  4. 103 96
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReport.vue
  5. 2 2
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperTest.vue
  6. 18 22
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperView.vue
  7. 7 7
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventList.vue
  8. 0 6
      TEAMModelOS/ClientApp/src/components/student-web/HomeView/HomeView.vue
  9. 5 9
      TEAMModelOS/ClientApp/src/components/student-web/HomeView/MissionListCard.vue
  10. 1 1
      TEAMModelOS/ClientApp/src/router/routes.js
  11. 5 19
      TEAMModelOS/ClientApp/src/view/evaluation/components/BaseEditExercise.vue
  12. 27 10
      TEAMModelOS/ClientApp/src/view/joinclass/JoinClass.vue
  13. 10 5
      TEAMModelOS/ClientApp/src/view/learnactivity/MgtPrivEva.less
  14. 35 4
      TEAMModelOS/ClientApp/src/view/learnactivity/MgtPrivEva.vue
  15. 10 6
      TEAMModelOS/ClientApp/src/view/learnactivity/MgtSchoolEva.less
  16. 36 5
      TEAMModelOS/ClientApp/src/view/learnactivity/MgtSchoolEva.vue
  17. 1 1
      TEAMModelOS/ClientApp/src/view/learnactivity/PaperScore.vue
  18. 4 4
      TEAMModelOS/ClientApp/src/view/learnactivity/Scoring.vue
  19. 1 1
      TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue
  20. 134 0
      TEAMModelOS/ClientApp/src/view/newcourse/NewMyCourse.less
  21. 969 0
      TEAMModelOS/ClientApp/src/view/newcourse/NewMyCourse.vue

+ 7 - 0
TEAMModelOS/ClientApp/src/api/learnActivity.js

@@ -255,5 +255,12 @@ export default {
      */
     FindAllStudent: function (data) {
         return post('/common/exam/find-summary-record', data)
+    },
+
+    /*
+     * 结束评测
+     */
+    FinishEva: function (data) {
+        return post('/common/exam/finish', data)
     }
 }

+ 39 - 19
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/paper-view.css

@@ -55,19 +55,17 @@
 }
 
 .paper-choose {
-    background: #00ad6c;
+    background-color: #00ad6c;
     color: white;
     border: none;
 }
 
 .paper-tasks .title {
-    top: 6px;
-    left: 20px;
-    position: absolute;
+    display:flex;
 }
 
 .paper-tasks Icon {
-    padding-right: 20px;
+    padding-right: 10px;
 }
 
 .paper-tasks li {
@@ -88,32 +86,54 @@
     top: 2px;
 }
 
-.paper-tasks .finished {
+.item-box {
+    display: -webkit-flex;
+    display: inline-table;
+    width: 100%;
+}
+
+.paper-item {
+    border: 1px solid #919191;
+    font-weight: bolder;
+    height: 40px;
+    border-radius: 50px;
+    padding: 5px 2px;
+    margin-top: 10px;
+    margin-left: 20px;
+    cursor: pointer;
+    display: inline-flex;
+}
+
+.item-box .title-icon {
+    margin-left: 10px;
+    margin-top: 5px;
+    height: 20px;
+    width: 20px;
+}
+
+.item-box .finished {
     background: #03c203;
     height: 20px;
     width: 20px;
-    position: absolute;
-    right: 18px;
-    top: 10px;
+    margin-left: 10px;
+    margin-top: 5px;
+    margin-right: 10px;
     border-radius: 10px;
     color: #ffffff;
 }
 
-.paper-tasks .unfinished {
+.item-box .unfinished {
+    margin-top: 5px;
+    margin-left: 10px;
+    margin-right: 10px;
     background: #adadad;
     height: 20px;
     width: 20px;
-    position: absolute;
-    right: 18px;
-    top: 10px;
     border-radius: 10px;
     color: #ffffff;
 }
 
-    .paper-tasks .unfinished .doneicon,
-    .paper-tasks .finished .doneicon {
-        position: absolute;
-        top: -9px;
-        right: -10px;
-    }
+
+
+
 

+ 10 - 11
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContent.vue

@@ -47,16 +47,15 @@ export default {
   },
   methods: {
     //回傳所渲染出來第一個進行中的活動項目
-    theFirstActiveEvent() {
-      var k = [];
-      for (var i = 0; i < this.mockdata.length; i++) {
-        if (this.mockdata[i].isClosed == false) {
-          k.push(this.mockdata[i]);
-        }
-      }
-      this.$store.commit("ChangeItemName", k[0]);
-
-    }
+    //theFirstActiveEvent() {
+    //  var k = [];
+    //  for (var i = 0; i < this.mockdata.length; i++) {
+    //    if (this.mockdata[i].isClosed == false) {
+    //      k.push(this.mockdata[i]);
+    //    }
+    //  }
+    //  this.$store.commit("ChangeItemName", k[0]);
+    //}
   },
         mounted() {
             //console.log(this.$store.getters.getItemTitle.eventType)
@@ -64,7 +63,7 @@ export default {
   },
   data() {
     return {
-      mockdata: mockdata.mockdata
+      //mockdata: mockdata.mockdata
     };
   }
 };

+ 103 - 96
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReport.vue

@@ -33,7 +33,7 @@
                             <Card class="score-card">
                                 <p class="card-title">{{$t('studentWeb.exam.average')}}</p>
                                 <div class="card-content">
-                                    <span class="myscore">65.6</span>
+                                    <span class="myscore">--</span>
                                 </div>
                             </Card>
                         </i-col>
@@ -67,102 +67,102 @@
                 </i-col>
             </Row>
         </div>
-        <div class="QAsheet" v-if='testState == 3'>
+        <div class="QAsheet" v-if='testState != 1'>
             <div class='title-rect-group '>
                 <div class="title-rect" />
-                <h2 class="title-rect-name">评测作答回顾</h2>
+                <h2 class="title-rect-name"  @click="checkedAnsFilter">评测作答回顾</h2>
             </div>
-
             <div class="filterBtn">
                 <br />
                 <label class="checkAns">
-                    <input type="checkbox" value="答對" v-model="checkedAns" />
+                    <input type="checkbox" value="right" v-model="checkedAns" />
                     <span>已得分:{{rightAns.right}}</span>
                     <div class="rightBtn"></div>
                 </label>
                 <label class="checkAns">
-                    <input type="checkbox" value="答錯" v-model="checkedAns" />
-                    <span>未得分:{{ examInfo.stuScore.length - rightAns.right}}</span>
+                    <input type="checkbox" value="wrong" v-model="checkedAns" />
+                    <span>未得分:{{ examInfo.stuScore.length - rightAns.right - rightAns.noAns}}</span>
                     <div class="wrongBtn"></div>
+                </label>           
+                <label class="checkAns" v-show=" rightAns.noAns != 0 ">
+                    <input type="checkbox" value="noAns" v-model="checkedAns" />
+                    <span>未打分:{{ rightAns.noAns}}</span>
+                    <div class="noAnsBtn"></div>
                 </label>
-                <!--<label class="checkAns">
-            <input type="checkbox" value="未答" v-model="checkedAns" />
-            <span>未答:{{ 6}}</span>
-            <div class="noAnsBtn"></div>
-        </label>-->
             </div>
             <div @click="closeDetail">
                 <svg-icon icon-class="AnsWerDetail" :class="{ ansDetail: !closeAnsDetail, closeAnsDetail: closeAnsDetail,}" />
             </div>
             <br style="clear:both" />
             <div class="qcontent" v-if="paperData.length">
-                <div class="qcol"
-                     v-for="(question, index) in paperData"
-                     :key="index">
-                    <Row :gutter="10">
-                        <i-col :xs="1" :sm="1" :md="1" :lg="1">
-                            <div class="qAnsCondition">
-                                <svg-icon class="qIcon"
-                                          v-show="examInfo.stuScore[index] != 0"
-                                          icon-class="rightAns" />
-                                <svg-icon class="qIcon"
-                                          v-show="examInfo.stuScore[index] == 0"
-                                          icon-class="wrongAns" />
-                            </div>
-                        </i-col>
-                        <i-col :xs="2" :sm="2" :md="1" :lg="1">
-                            <div class="qtype">{{ question.parent == undefined ? getTestType(question.type) : getTestType(question.parentInfo.type) }}</div>
-                        </i-col>
-                        <i-col :xs="18" :sm="18" :md="21" :lg="21">
-                            <div class="qdesc">
-                                <div v-if="question.parent == undefined" style="display:inline-flex">
-                                    <p style="max-width:75px;font-weight:600">{{question.paperIndex}}.</p>
-                                    <div v-html="question.parent == undefined ? question.question :question.parentInfo.question"></div>
+                    <div class="qcol"
+                         v-for="(question, index) in paperData"
+                         v-show="checkedAnsFilter(index)"
+                         :key="index">
+                        <Row :gutter="10">
+                            <i-col :xs="1" :sm="1" :md="1" :lg="1">
+                                <div class="qAnsCondition">
+                                    <svg-icon class="qIcon"
+                                              v-show="examInfo.stuScore[index] != 0 && examInfo.stuScore[index] != -1"
+                                              icon-class="rightAns" />
+                                    <svg-icon class="qIcon"
+                                              v-show="examInfo.stuScore[index] == 0"
+                                              icon-class="wrongAns" />
+                                    <svg-icon class="qIcon"
+                                              v-show="examInfo.stuScore[index] == -1"
+                                              icon-class="noAns" />
                                 </div>
-                                <div v-if="question.parent != undefined" >
-                                    <div style="display:flex">
-                                        <div style="max-width:80px;font-weight:600;display:block">题目:</div>
-                                        <div v-html="question.parent == undefined ? question.question :question.parentInfo.question"></div>
+                            </i-col>
+                            <i-col :xs="2" :sm="2" :md="1" :lg="1">
+                                <div class="qtype">{{ question.parent == undefined ? getTestType(question.type) : getTestType(question.parentInfo.type) }}</div>
+                            </i-col>
+                            <i-col :xs="18" :sm="18" :md="21" :lg="21">
+                                <div class="qdesc">
+                                    <div v-if="question.parent == undefined" style="display:inline-flex">
+                                        <p style="max-width:75px;font-weight:600">{{question.paperIndex}}.</p>
+                                        <div class="que-item" v-html="question.parent == undefined ? question.question :question.parentInfo.question"></div>
                                     </div>
-                                    <div style="display:flex;margin-top:10px">
-                                        <div style="max-width:75px;font-weight:600">{{question.paperIndex}}.</div>
-                                        <div v-html="question.question"></div>
+                                    <div v-if="question.parent != undefined">
+                                        <div style="display:flex">
+                                            <div style="max-width:80px;font-weight:600;display:block">题目:</div>
+                                            <div class="que-item" v-html="question.parent == undefined ? question.question :question.parentInfo.question"></div>
+                                        </div>
+                                        <div style="display:flex;margin-top:10px">
+                                            <div style="max-width:75px;font-weight:600">{{question.paperIndex}}.</div>
+                                            <div class="que-item" v-html="question.question"></div>
+                                        </div>
                                     </div>
                                 </div>
-                            </div>
-                        </i-col>
-                        <i-col :xs="2" :sm="2" :md="1" :lg="1">
-                            <div class="qScore">
-                                <span v-show="question.rightAns == question.MyAns">{{examInfo.stuScore[index]}}</span>/{{question.score}}
-                            </div>
-                        </i-col>
-                    </Row>
-                    <div class="qAnaly" :class="{ hideqAnaly: closeAnsDetail }">
-                        <div class="rightAns">
-                            <div class="qAnserlist">
-                                <div v-for="(item,index) in question.option" style="display:flex">
-                                    ({{item.code}})<div style="margin-left:10px" v-html="item.value"></div>
+                            </i-col>
+                            <i-col :xs="2" :sm="2" :md="1" :lg="1">
+                                <div class="qScore">
+                                    <span v-if="examInfo.stuScore[index] != -1">{{examInfo.stuScore[index]}}/{{question.score}}</span>
+                                    <span v-if="examInfo.stuScore[index] == -1">未评分</span>
                                 </div>
-                                <div class="TitleRec1"></div>
-                                我的作答:
+                            </i-col>
+                        </Row>
+                        <div class="qAnaly" :class="{ hideqAnaly: closeAnsDetail }">
+                            <div class="rightAns">
+                                <div class="qAnserlist">
+                                    <div v-for="(item,index) in question.option" style="display:flex;margin-top:5px;">
+                                        ({{item.code}})<div style="margin-left:10px" v-html="item.value"></div>
+                                    </div>
+                                    <div class="TitleRec1"><span style="margin:5px;color:#1472c7">作答结果:</span></div>
+                                    <br />
+                                    <div v-if="ansData[index]" style="margin-left:10px" v-html="ansData[index][0]"></div>
+                                </div>
+                            </div>
+                            <!--<br />-->
+                            <div class="rightAnalys">
+                                <div class="TitleRec2"><span style="margin-left:5px">解析:</span></div>
                                 <br />
-                                <div v-html="ansData[index][0]"></div>
+                                <div v-html="question.explain"></div>
                             </div>
                         </div>
-                        <br />
-                        <li class="rightAnalys">
-                            <div class="TitleRec2"></div>
-                            解析:
-                            <div v-html="question.explain"></div>
-                        </li>
                     </div>
-                </div>
             </div>
         </div>
     </div>
-    </div>
-
-    </div>
 </template>
 
 <script>
@@ -202,7 +202,7 @@
                 RandomComment: Random.paragraph(1, 2),
                 RandomKeypoint: Random.paragraph(1, 3),
                 mockQASheet: mockQASheet.mockQASheet,
-                checkedAns: ["答對", "答錯", "未答"],
+                checkedAns: ["right", "wrong", "noAns"],
                 testState: 0,
                 testType: [
                     {
@@ -229,6 +229,14 @@
                         label: "综合",
                         value: "compose"
                     },
+                    {
+                        label: "改错",
+                        value: "correct"
+                    },
+                    {
+                        label: "连线",
+                        value: "connector"
+                    },
                 ],
                 paperData: [],
                 ansData:[]
@@ -246,9 +254,6 @@
             },
             //判断作答情况
             testJudge() {
-                console.log('作答信息')
-                console.log(this.paperInfo)
-                console.log(this.examInfo)
                 if (this.examInfo.subject !== undefined) {
                     this.testState = 0
                     let k = 0
@@ -262,6 +267,7 @@
                             this.testState = 1 //未作答
                         } else {
                             this.testState = 2 //未评分
+                            this.formPaper()
                         }
                     } else if (k == 0) {
                         this.testState = 3 //已评分
@@ -316,11 +322,10 @@
                         }
                     }
                 }
-                this.paperData = [...paper]
+               this.paperData = [...paper]
                if (this.paperData.length) {
                    this.ansData = await this.getItem(this.examInfo.stuAns[0])
                 }
-                console.log(this.ansData)
             },
             getCurrentLang() {
                 return localStorage.getItem('lang');
@@ -370,18 +375,17 @@
                 }
                 return ansRightSum;
             },
-            checkedAnsFilter: function (checkedAns, RightAns, MyAns) {
-                if (checkedAns.includes("答對") == true && RightAns == MyAns) {
+            checkedAnsFilter(index) {
+                if (this.checkedAns.includes("right") == true && this.examInfo.stuScore[index] != 0 && this.examInfo.stuScore[index] != -1 ) {
                     return true;
-                } else if (
-                    checkedAns.includes("答錯") == true &&
-                    RightAns != MyAns &&
-                    MyAns != ""
-                ) {
+                } else if (this.checkedAns.includes("wrong") == true && this.examInfo.stuScore[index] == 0 )
+                {
                     return true;
-                } else if (checkedAns.includes("未答") == true && MyAns == "") {
+                } else if (this.checkedAns.includes("noAns") == true && this.examInfo.stuScore[index] == -1) {
                     return true;
-                } else return false;
+                }
+                else return false;
+
             },
             transQtypetoEn(Qtype) {
                 if (localStorage.getItem('lang') == 'en') {
@@ -423,16 +427,21 @@
             rightAns() {
                 let info = {
                     all: 0,
-                    right: 0
+                    right: 0,
+                    noAns:0
                 }
                 if (this.examInfo.subject !== undefined) {
                     info = {
                         all: this.examInfo.stuScore.length,
-                        right: 0
+                        right: 0,
+                        noAns:0
                     }
                     for (let item of this.examInfo.stuScore) {
-                        if (item !== 0 && item !== -1)
+                        if (item !== 0 && item == -1) {
+                            info.noAns++
+                        } else if (item !== 0 && item !== -1) {
                             info.right++
+                        }
                     }
                 }
                 return info
@@ -465,7 +474,10 @@
     .lesson-test-report {
         min-height: 600px;
     }
-
+    .que-item{
+        max-height:300px;
+        overflow-y:scroll;
+    }
     .scoreboard {
         width: 100%;
         /*height: 638px;*/
@@ -613,6 +625,7 @@
 
     .qAnaly .rightAnalys {
         color: gray;
+        margin-top:10px;
     }
 
     .rightAnsItem {
@@ -625,22 +638,16 @@
 
     .TitleRec1 {
         position: relative;
-        top: 2px;
-        width: 10px;
-        height: 16px;
-        margin-right: 5px;
-        background-color: rgb(20, 114, 199);
+        height:15px;
+        border-left: 10px solid #1472c7;
         float: left;
     }
 
     .TitleRec2 {
         position: relative;
-        top: 2px;
-        width: 10px;
-        height: 16px;
-        margin-right: 5px;
+        height: 15px;
+        border-left: 10px solid gray;
         float: left;
-        background-color: gray;
     }
 
     .TitleRec3 {

+ 2 - 2
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperTest.vue

@@ -167,11 +167,11 @@
                 </div>
                 <!--切換頁-->
                 <div class="pageCtl2">
-                    <button @click="preQ()" v-if="queNo != 0">
+                    <button @click="preQ()" v-show="queNo != 0">
                         <Icon type="ios-arrow-back" />上一题
                     </button>
                     <button @click="nextQ()"
-                            v-if="queNo != (examInfo.length-1)"
+                           v-show="queNo != (examInfo.length-1)"
                             :class="{ hintClick:queNo != (examInfo.length-1) && checkers[queNo] != ''}">
                         下一题
                         <Icon type="ios-arrow-forward" />

+ 18 - 22
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperView.vue

@@ -10,27 +10,25 @@
                 </div>
                 <!--多學科試卷-->
                 <div v-if="paperData.length > 0 ">
-                    <ul v-for="(item, index) in paperData"
+                    <div class="item-box">
+                        <div v-for="(item, index) in paperData" 
                         :key="index"
-                        :class="['paper-tasks',item.paperId == chooseData.paperId ? 'paper-choose' : '']"
-                        @click="opentestWithSubject(item)">
-                        <li class="title">
-                            <span style="position: relative; top: 1px">
-                                <svg-icon icon-class="test" class="title-icon" />
-                            </span>
-                            {{ item.subject.name }}科试卷
-                        </li>
-                        <!--试卷是否已作答-->
-                        <li :class="{ unfinished: item.stuAns.length == 0 ,finished:item.stuAns.length != 0 }">
-                            <Icon class="doneicon" type="ios-checkmark" size="36" />
-                        </li>
-                    </ul>
+                        :class="['paper-item',item.paperId == chooseData.paperId ? 'paper-choose' : '']"
+                        @click="opentestWithSubject(item)"
+                             >
+                            <svg-icon icon-class="test" class="title-icon" />
+                            <span style="margin-top:5px">{{ item.subject.name }}{{$store.getters.getItemTitle.scope == 'school' ? '科试卷':''}}</span>
+                            <div :class="{ unfinished: item.stuAns.length == 0 ,finished:item.stuAns.length != 0 }">
+                                <Icon style="margin-top:-10px;margin-left:-8px;" type="ios-checkmark" size="36" />
+                            </div>
+                        </div>
+                    </div>         
                 </div>
                 <div class="title-rect-group">
                     <div v-if="chooseData.subject !== undefined">
                         <div class="title-rect" />
                         <h2 class="title-rect-name">当前科目:{{chooseData.subject.name}}</h2>
-                        <span v-show="isExamDown" @click="showTest" style="margin-left: 25px;color: #03966a;cursor:pointer">试卷详情</span>
+                        <!--<span v-show="isExamDown" @click="showTest" style="margin-left: 25px;color: #03966a;cursor:pointer">--><!--试卷详情--><!--</span>-->
                         <LessonTestReport :paperInfo="selectData" :examInfo="chooseData" />
                     </div>
                     <div class="load-box">
@@ -127,7 +125,6 @@
                 this.$store.commit("ToggleLessonTestPop");
             },
             opentestWithSubject(item) {
-                console.log(item)
                 if (item !== undefined) {
                     this.getPaper(item)
                 }
@@ -138,7 +135,6 @@
                 this.selectData = {}
                 this.chooseData = {}
                 if (data.blob !== undefined && data.blob !== "") {
-                    console.log('试卷数据',data)
                     let key = data.code.split('-')
                     let code = {
                         scope: data.scope,
@@ -168,11 +164,11 @@
                     }
                 }
             },
-            showTest() {
-                if (this.chooseData.subject !== undefined) {
-                    this.$store.commit("ToggleLessonTestPopWithSubject", this.chooseData)
-                }
-            },
+            //showTest() {
+            //    if (this.chooseData.subject !== undefined) {
+            //        this.$store.commit("ToggleLessonTestPopWithSubject", this.chooseData)
+            //    }
+            //},
         },
         computed: {
             listData() {

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

@@ -104,17 +104,14 @@
                                       v-if="getCurrentLang() == 'en'">{{ transTypetoEn(item.eventType) }}</span>
                                 <span>{{ item.name }}</span>
                             </p>
-                            <!--{{ item.endTime }} 已完成</p>
-                            <p class="list-item-time">
-                                {{ item.endTime }} 已結束
-                            </p>-->
                             <p class="list-item-time">
                                 {{ dateFormat(item.startTime) }} ~ {{ dateFormat(item.endTime) }}
                             </p>
                         </li>
+                            <!--<div>已交卷</div>-->
                         <li class="list-item-unDone" v-show="item.progress == 'going'">
                             <div class="isAllowRetry">进行中</div>
-                        </li>            
+                        </li>
                         <li class="list-item-unDone" v-show="item.progress == 'finish'">
                             <div class="isOvertime">已结束</div>
                         </li>
@@ -232,8 +229,11 @@
                     this.eventList = []
                     this.$api.studentWeb.FindExamPaper(params).then(res => {
                         for (let item of res.props) {
-                            item.eventType = 'exam'
-                            this.eventList.push(item)
+                            let code = item.code.split('-')
+                            if (code[0] == 'Exam') {
+                                item.eventType = 'exam'
+                                this.eventList.push(item)
+                            }
                         }
                         this.isListNoItem = false
                     })

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

@@ -16,19 +16,13 @@
                         <p class="time">{{ $t("studentWeb.defaultClassTime") }}</p>
                         <p class="place">{{ $t("studentWeb.defaultClassPlace") }}</p>
                     </div>
-                    <!--<router-link to="/SchoolCalender">
-                    </router-link>-->
-
                     <div class="todaydayline">
                         <div class="todaydaylinewraptitle">
                             <div class="title-rect" />
-
                             <p class="title-rect-name">
                                 {{ $t("studentWeb.todaydeadlineList") }}
                                 <Icon type="ios-arrow-forward" />
                             </p>
-                            <!--<router-link to="/SchoolCalender">
-                            </router-link>-->
                         </div>
                         <div class="todaydaylineList">
                             <div class="list-block"

+ 5 - 9
TEAMModelOS/ClientApp/src/components/student-web/HomeView/MissionListCard.vue

@@ -40,7 +40,6 @@
                                     </div>
                                 </div>
                             </p>
-
                             <p class="list-item-time">
                                 {{ dateFormat(item.startTime) }} ~ {{ dateFormat(item.endTime) }}
                             </p>
@@ -78,8 +77,6 @@
         },
         created() {
             this.getPaperData()
-            //this.createMockdataOriginal();
-            //this.createMockdata();
         },
         mounted() {
             //初始化抓取卡牌頭兩項項目高度,回傳給清單顯示範圍高度,解決原本寫死高度造成清單顯示範圍截斷在項目中間
@@ -96,7 +93,6 @@
                     else {
                         listblockHeight += document.querySelectorAll(".mission-list-card .list-item")[i].offsetHeight;
                     }
-
                 }
                 this.getPaperData()
                 this.listblockHeight = listblockHeight;
@@ -111,10 +107,11 @@
                     }
                     this.$api.studentWeb.FindExamPaper(params).then(res => {
                         for (let item of res.props) {
-                            item.eventType = 'exam'
-                            this.testData.push(item)
-                            console.log('989898989898989')
-                            console.log(this.testData)
+                            let code = item.code.split('-')
+                            if (code[0] == 'Exam') {
+                                item.eventType = 'exam'
+                                this.testData.push(item)
+                            }
                         }
                     })
                 }
@@ -169,7 +166,6 @@
 
                             this.mockdata.push(this.mockdataOriginal[this.mockdata.length + 1]);
                         }
-
                         resolve();
                     }, 6000);
                 });

+ 1 - 1
TEAMModelOS/ClientApp/src/router/routes.js

@@ -265,7 +265,7 @@ export const routes = [
 			{
 				path: 'myCourse',
 				name: 'myCourse',
-				component: resolve => require(['@/view/newcourse/MyCourse.vue'], resolve)
+				component: resolve => require(['@/view/newcourse/NewMyCourse.vue'], resolve)
 			},
 			{
 				path: 'CourseTable',

+ 5 - 19
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseEditExercise.vue

@@ -196,7 +196,8 @@
 				analysisEditor: null,
 				repairEditor: null,
 				videoHtml: "",
-				deleteChildrens:[]
+				deleteChildrens:[],
+				curId:null
 			};
 		},
 		created() {
@@ -498,12 +499,7 @@
 					
 					
 					Promise.all(promiseArr).then(result => {
-						console.log(result)
-						if(result.length){
-							resolve(childrens.map(i => i.id))
-						}else{
-							resolve([])
-						}
+						resolve(childrens.map(i => i.id))
 					})
 				})
 			},
@@ -725,19 +721,16 @@
 					case "complete":
 						return ["question", "answer"];
 						break;
-					case "compose":
-						return ["question"];
-						break;
 					default:
-						return ["question", "answer"];
+						return ["question"];
 						break;
 				}
 			},
 
 			// 渲染编辑习题内容回显
 			async renderExercise(editItem) {
-				console.log(editItem);
 				this.editInfo = editItem;
+				this.curId = editItem.id
 				
 				let schoolProfile = await this.$store.dispatch('user/getSchoolProfile')
 				let schoolInfo = schoolProfile.school_base;
@@ -754,15 +747,8 @@
 					this.exerciseSubject = this.subjectList
 						.map((item) => item.id)
 						.indexOf(editItem.subjectId);
-					console.log(schoolInfo)
-					console.log(this.exercisePeriod)
-					console.log(this.exerciseSubject)	
 				}
 				
-				console.log(schoolInfo)
-				console.log(this.exercisePeriod)
-				console.log(this.exerciseSubject)
-				
 				this.isEdit = true;
 				this.exersicesDiff = editItem.level.toString() || "0";
 				this.exerciseScope = editItem.scope === "private" ? 0 : 1;

+ 27 - 10
TEAMModelOS/ClientApp/src/view/joinclass/JoinClass.vue

@@ -1,20 +1,37 @@
 <template>
-    <div>
-        <h1 style="text-align:center;margin-top:100px;font-size:22px;">学生扫码加入名单功能即将上线!</h1>
+    <div style="text-align:center;">
+        <h1 style="text-align:center;margin-top:100px;font-size:22px;">学生扫码加入名单需要学生端APP对接,学生端APP扫码可以直接读取学生账号信息加入到班级。</h1>
+        <!-- <p>{{tId}}</p> -->
+        <p>教师姓名:{{tName}}</p>
+        <p>教室编码:{{cId}}</p>
+        <p>教室名称:{{cName}}</p>
+
     </div>
 </template>
 <script>
-    export default {
-        data() {
-            return {
-
-            }
-        },
-        methods: {
-
+export default {
+    data() {
+        return {
+            tId:'',
+            tName:'',
+            cId:'',
+            cName:''
         }
+    },
+    methods: {
+
+    },
+    created(){
+        this.tId = this.$route.query.tId
+        this.tName = this.$route.query.tName
+        this.cId = this.$route.query.cId
+        this.cName = this.$route.query.cName
     }
+}
 </script>
 <style scoped>
+div p{
+    margin: 10px;
 
+}
 </style>

+ 10 - 5
TEAMModelOS/ClientApp/src/view/learnactivity/MgtPrivEva.less

@@ -210,12 +210,10 @@
     color: white;
 }
 .evaluation-status-tag {
-    padding: 0 5px;
-    background: @status-pending;
-    color: #fff;
-    display: inline-block;
+    padding: 1px 2px;
+    border: 1px solid #1CC0F3;
     margin-left: 2px;
-    border-radius: 5px;
+    border-radius: 2px;
     font-size:12px;
 }
 .overview-box{
@@ -252,4 +250,11 @@
         }
     }
     
+}
+.handle-end-tag{
+    background:#ed4014;
+    padding: 1px 2px;
+    padding: 2px 4px;
+    color: white;
+    border-radius: 2px;
 }

+ 35 - 4
TEAMModelOS/ClientApp/src/view/learnactivity/MgtPrivEva.vue

@@ -19,7 +19,16 @@
                             <p class="evaluation-type">
                                 <Icon type="md-time" style="margin-right:5px;" size="16" />
                                 <span>施测时间:{{dateFormat(item.startTime)}}</span>
-                                <span class="evaluation-status-tag" :style="{ background: (item.progress == 'pending' ? '#0BADD4' : item.progress == 'going' ? '#1CC0F3' : '#949594')}">{{ item.progress == 'pending' ? '待发布' : item.progress == 'going' ? '进行中' : '已结束' }}</span>
+                                <span class="evaluation-status-tag" :style="{ borderColor: item.progress == 'pending' ? '#0BADD4' : item.progress == 'going' ? '#1CC0F3' : '#949594', color: (item.progress == 'pending' ? '#0BADD4' : item.progress == 'going' ? '#1CC0F3' : '#949594')}">
+                                    {{ item.progress == 'pending' ? '待发布' : item.progress == 'going' ? '进行中' : '已结束' }}
+                                </span>
+                            </p>
+                            <p class="evaluation-type">
+                                <Icon type="md-time" style="margin-right:5px;" size="16" />
+                                <span>结束时间:{{dateFormat(item.endTime)}}</span>
+                                <span v-if="item.progress == 'going'" class="handle-end-tag" @click="handleEnd(index)">
+                                    立即结束
+                                </span>
                             </p>
                             <div style="display:inline-flex">
                                 <p class="evaluation-type">
@@ -41,7 +50,6 @@
                 <div class="evaluation-detail-bar">
                     <span :class="curBarIndex == 0 ? 'evalustion-bar-item line-bottom-active line-bottom':'evalustion-bar-item line-bottom'" @click="selectBar(0)">评测数据</span>
                     <span :class="curBarIndex == 1 ? 'evalustion-bar-item line-bottom-active line-bottom':'evalustion-bar-item line-bottom'" @click="selectBar(1)">评测试卷</span>
-                    <Button type="error" style="float:right;margin-top:6px;margin-right:30px" v-show="evaListShow[curEvaIndex].progress == 'going'">结束评测</Button>
                 </div>
                 <!--试卷信息-->
                 <div :class="curBarIndex == 1 ? 'animated fadeIn evaluation-base-info':'evaluation-base-info animated fadeOutRight'" v-show="curBarIndex == 1">
@@ -50,7 +58,6 @@
                             <!--试卷题目信息-->
                             <TestPaper v-if="evaListShow[curEvaIndex] && evaListShow[curEvaIndex].papers && evaListShow[curEvaIndex].papers[curSubIndex] && evaListShow[curEvaIndex].papers[curSubIndex].item" :paper="evaListShow[curEvaIndex].papers[curSubIndex]" style="color:#515a6e;margin-top:-30px;" :isShowTools="false" isExamPaper></TestPaper>
                             <EmptyData v-else style="margin-top:60px;"></EmptyData>
-
                             <!--返回顶部-->
                             <div class="back-to-top fl-col-center" title="返回顶部" v-if="showBack" @click="handleBackToTop">
                                 <Icon type="ios-arrow-up" />
@@ -62,7 +69,7 @@
                 <div :class="curBarIndex == 0 ? 'animated fadeIn evaluation-base-info':'evaluation-base-info animated fadeOutRight'" v-show="curBarIndex == 0">
                     <Scoring :examInfo="examDetaiInfo" ref="score-box"></Scoring>
                 </div>
-                
+
             </div>
         </Split>
         <Modal v-model="editEvaluationStatus" title="编辑评测" @on-ok="confirmEdit">
@@ -113,6 +120,30 @@ export default {
         }
     },
     methods: {
+        handleEnd(index) {
+            this.$Modal.confirm({
+                title: '结束评测',
+                content: `结束后学生将不能继续作答,确认立即结束${this.evaListShow[index].name}吗?`,
+                onOk: () => {
+                    this.$api.learnActivity.FinishEva({
+                        id: this.evaListShow[index].id,
+                        code: this.evaListShow[index].code.replace('Exam-', '')
+                    }).then(
+                        res => {
+                            if (!res.error) {
+                                this.$Message.success('评测已结束!')
+                                this.evaListShow[index].progress = 'finish'
+                            } else {
+                                this.$Message.error('API ERROR!')
+                            }
+                        },
+                        err => {
+                            this.$Message.error('API ERROR!')
+                        }
+                    )
+                }
+            })
+        },
         dropdownStates(flag) {
             if (!flag) this.filterByPeriod()
         },

+ 10 - 6
TEAMModelOS/ClientApp/src/view/learnactivity/MgtSchoolEva.less

@@ -4,7 +4,6 @@
 @second-textColor: #a5a5a5; //文本副级颜色
 @primary-fontSize: 14px;
 @second-fontSize: 16px;
-@status-pending: #1CC0F3;
 
 .manage-evaluation-container {
     width: 100%;
@@ -210,12 +209,10 @@
     color: white;
 }
 .evaluation-status-tag {
-    padding: 0 5px;
-    background: @status-pending;
-    color: #fff;
-    display: inline-block;
+    padding: 1px 2px;
+    border: 1px solid #1CC0F3;
     margin-left: 2px;
-    border-radius: 5px;
+    border-radius: 2px;
     font-size:12px;
 }
 .overview-box{
@@ -252,4 +249,11 @@
         }
     }
     
+}
+.handle-end-tag{
+    background:#ed4014;
+    padding: 1px 2px;
+    padding: 2px 4px;
+    color: white;
+    border-radius: 2px;
 }

+ 36 - 5
TEAMModelOS/ClientApp/src/view/learnactivity/MgtSchoolEva.vue

@@ -29,7 +29,16 @@
                             <p class="evaluation-type">
                                 <Icon type="md-time" style="margin-right:5px;" size="16" />
                                 <span>施测时间:{{dateFormat(item.startTime)}}</span>
-                                <span class="evaluation-status-tag" :style="{ background: (item.progress == 'pending' ? '#0BADD4' : item.progress == 'going' ? '#1CC0F3' : '#949594')}">{{ item.progress == 'pending' ? '待发布' : item.progress == 'going' ? '进行中' : '已结束' }}</span>
+                                <span class="evaluation-status-tag" :style="{ borderColor: item.progress == 'pending' ? '#0BADD4' : item.progress == 'going' ? '#1CC0F3' : '#949594', color: (item.progress == 'pending' ? '#0BADD4' : item.progress == 'going' ? '#1CC0F3' : '#949594')}">
+                                    {{ item.progress == 'pending' ? '待发布' : item.progress == 'going' ? '进行中' : '已结束' }}
+                                </span>
+                            </p>
+                            <p class="evaluation-type">
+                                <Icon type="md-time" style="margin-right:5px;" size="16" />
+                                <span>结束时间:{{dateFormat(item.endTime)}}</span>
+                                <span v-if="item.progress == 'going'" class="handle-end-tag" @click="handleEnd(index)">
+                                    立即结束
+                                </span>
                             </p>
                             <div style="display:inline-flex">
                                 <p class="evaluation-type">
@@ -51,7 +60,6 @@
                 <div class="evaluation-detail-bar">
                     <span :class="curBarIndex == 0 ? 'evalustion-bar-item line-bottom-active line-bottom':'evalustion-bar-item line-bottom'" @click="selectBar(0)">评测数据</span>
                     <span :class="curBarIndex == 1 ? 'evalustion-bar-item line-bottom-active line-bottom':'evalustion-bar-item line-bottom'" @click="selectBar(1)">评测试卷</span>
-                    <Button type="error" style="float:right;margin-top:6px;margin-right:30px" v-show="evaListShow[curEvaIndex].progress == 'going'">结束评测</Button>
                 </div>
                 <!--试卷信息-->
                 <div :class="curBarIndex == 1 ? 'animated fadeIn evaluation-base-info':'evaluation-base-info animated fadeOutRight'" v-show="curBarIndex == 1">
@@ -78,7 +86,6 @@
                 <div :class="curBarIndex == 0 ? 'animated fadeIn evaluation-base-info':'evaluation-base-info animated fadeOutRight'" v-show="curBarIndex == 0">
                     <Scoring :examInfo="examDetaiInfo" ref="score-box"></Scoring>
                 </div>
-                
             </div>
         </Split>
         <Modal v-model="editEvaluationStatus" title="编辑评测" @on-ok="confirmEdit">
@@ -129,6 +136,30 @@ export default {
         }
     },
     methods: {
+        handleEnd(index) {
+            this.$Modal.confirm({
+                title: '结束评测',
+                content: `结束后学生将不能继续作答,确认立即结束${this.evaListShow[index].name}吗?`,
+                onOk: () => {
+                    this.$api.learnActivity.FinishEva({
+                        id: this.evaListShow[index].id,
+                        code: this.evaListShow[index].code.replace('Exam-', '')
+                    }).then(
+                        res => {
+                            if (!res.error) {
+                                this.$Message.success('评测已结束!')
+                                this.evaListShow[index].progress = 'finish'
+                            } else {
+                                this.$Message.error('API ERROR!')
+                            }
+                        },
+                        err => {
+                            this.$Message.error('API ERROR!')
+                        }
+                    )
+                }
+            })
+        },
         dropdownStates(flag) {
             if (!flag) this.filterByPeriod()
         },
@@ -281,8 +312,8 @@ export default {
                                     this.filterByPeriod()
                                 }
                             }
-                        }else{
-                            if(res.examInfo.length) this.selectEvaluation(0)
+                        } else {
+                            if (res.examInfo.length) this.selectEvaluation(0)
                         }
 
                     } else {

+ 1 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/PaperScore.vue

@@ -196,7 +196,7 @@
                                         <span class="fast-score-tag" title="满分" @click="fastSetScore((typeIndex + index + childIndex),childItem.score)">
                                             <!-- 题目分数 -->{{childItem.score}}
                                         </span>
-                                        <span class="fast-score-tag" title="零分" @click="fastSetScore((typeIndex + index + childIndex),0)">
+                                        <span class="fast-score-tag" title="零分" @click="fastSetScore((typeIndex + index + childIndex),0)"  style="background:#ed4014">
                                             0
                                         </span>
                                     </div>

+ 4 - 4
TEAMModelOS/ClientApp/src/view/learnactivity/Scoring.vue

@@ -28,10 +28,10 @@
         <div class="scoring-main-wrap dark-iview-table">
             <Table v-show="!showTest" class="score-box" border :columns="tableColumn" :data="studentScore" :loading="tableLoading" :max-height="tableHeight" no-data-text="班级暂无学生">
                 <template slot-scope="{ row,index }" :slot="'qu'+qIndex" v-for="(item,qIndex) in quCount">
-                    <div :key="'qu'+qIndex" @click="getStuScore(row,qIndex)">
-                        <span style="cursor:pointer;" @click="noAnswer" v-if="row.data[qIndex] == -1 && row.status == 1">- -</span>
-                        <Icon size="20" style="cursor:pointer;" type="ios-create-outline" v-else-if="row.data[qIndex] == -1 && row.status !== 1" />
-                        <span style="cursor:pointer;" v-else>{{row.data[qIndex]}}</span>
+                    <div :key="'qu'+qIndex" @click="getStuScore(row,qIndex)" style="cursor:pointer;">
+                        <span @click="noAnswer" v-if="row.data[qIndex] == -1 && row.status == 1">- -</span>
+                        <Icon size="20" type="ios-create-outline" v-else-if="row.data[qIndex] == -1 && row.status !== 1" />
+                        <span style="color:#2db7f5;" v-else>{{row.data[qIndex]}}</span>
                     </div>
                 </template>
                 <template slot-scope="{ row,index }" slot="total">

+ 1 - 1
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue

@@ -394,7 +394,7 @@ export default {
                         }).then(
                             (res) => {
                                 if (!res.error) {
-                                    this.selections.length = 0
+                                    this.selections = []
                                     this.$Message.success('删除成功!')
                                 } else {
                                     this.$Message.error('删除失败!')

+ 134 - 0
TEAMModelOS/ClientApp/src/view/newcourse/NewMyCourse.less

@@ -0,0 +1,134 @@
+@first-bgColor: #141414;
+@second-bgColor: #1b1b1b;
+@third-bgColor: #222222;
+@borderColor: #424242;
+@primary-textColor: #fff; //文本主颜色
+@second-textColor: #a5a5a5; //文本副级颜色
+@primary-fontSize: 14px;
+@second-fontSize: 16px;
+
+.my-course-container {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    flex-direction: row;
+
+    .course-list {
+        width: 400px;
+        height: 100%;
+        border-right: 1px solid @borderColor;
+        padding-left: 10px;
+    }
+
+    .course-info-wrap {
+        width: ~"calc(100% - 400px)";
+        height: 100%;
+        padding-left: 15px;
+        display: flex;
+        flex-direction: row;
+    }
+}
+.course-list-header {
+    width: 100%;
+    height: 45px;
+    position: relative;
+    border-bottom: 1px solid @borderColor;
+    line-height: 45px;
+
+    .list-label {
+        font-size: 16px;
+        color: @second-textColor;
+    }
+
+    .search-course {
+        display: inline-block;
+        position: absolute;
+        left: 10px;
+        right: 10px;
+        top: 16px;
+    }
+    
+}
+.add-icon {
+    float: right;
+    margin-right: 20px;
+    margin-top: 8px;
+    cursor: pointer;
+    color:white;
+    font-size:18px;
+}
+.course-list {
+    /*width: 100%;*/
+    /*height: ~"calc(100% - 45px)";*/
+    /*height:100%;*/
+
+    .show-course-label {
+        font-size: 10px;
+        color: @second-textColor;
+        display: block;
+        padding: 4px 0px 4px 15px;
+        border-bottom: 1px solid @borderColor;
+        font-weight: 800;
+    }
+
+    .course-list-item {
+        width: 100%;
+        padding: 12px 0px 12px 15px;
+        color: @second-textColor;
+        border-bottom: 1px solid @borderColor;
+        position: relative;
+        cursor: pointer;
+
+        .course-code {
+        }
+
+        .course-name {
+            font-size: 20px;
+            color: white;
+            font-weight: 600;
+            margin: 5px 0px;
+        }
+
+        .course-item-tool {
+            position: absolute;
+            right: 50px;
+            top: 35px;
+            display: none;
+        }
+    }
+
+    .course-list-item-active {
+        background-image: -webkit-linear-gradient(90deg, rgba(30,30,30,0) 0%, rgba(110,110,110,.2) 50%, rgba(110,110,110,.4) 100%);
+        background-image: -o-linear-gradient(90deg, rgba(30,30,30,0) 0%, rgba(110,110,110,.2) 50%, rgba(110,110,110,.4) 100%);
+        background-image: -moz-linear-gradient(90deg, rgba(30,30,30,0) 0%, rgba(110,110,110,.2) 50%, rgba(110,110,110,.4) 100%);
+        background-image: linear-gradient(90deg, rgba(30,30,30,0) 0%, rgba(110,110,110,.2) 50%, rgba(110,110,110,.4) 100%);
+
+        .course-item-tool {
+            display: inline-block;
+        }
+    }
+}
+.course-detail-header {
+    width: 100%;
+    height: 45px;
+    line-height: 45px;
+    border-bottom: 1px solid @borderColor;
+
+    .setting-label {
+        color: @second-textColor;
+        margin-right: 50px;
+        cursor: pointer;
+        height: 45px;
+        display: inline-block;
+    }
+
+    .setting-label-active {
+        color: white;
+        font-weight: 600;
+        border-bottom: 2px solid white;
+    }
+}
+.action-btn-wrap {
+    margin-left:20px;
+    cursor:pointer;
+}

+ 969 - 0
TEAMModelOS/ClientApp/src/view/newcourse/NewMyCourse.vue

@@ -0,0 +1,969 @@
+<template>
+    <div class="my-course-container">
+        <Loading v-if="listLoading" bgColor="rgba(103, 103, 103, 0.27)"></Loading>
+        <!--课程列表-->
+        <div class="course-list">
+            <!--列表内容-->
+            <vuescroll>
+                <div class="dark-iview-tabs-line cus-list-tab">
+                    <Tabs v-model="listType" @on-click="tabClick">
+                        <div slot="extra">
+                            <transition name="fade">
+                                <div style="margin-top:5px;">
+                                    <Icon type="md-create" v-show="(listType == 'school' && courseListS.length) || (listType == 'private' && courseListP.length) " class="add-icon" title="编辑课程" @click="editCus()" />
+                                    <Icon type="md-add" v-show="listType == 'private'" class="add-icon" title="新增课程" @click="showAddCourse()" />
+                                    <Icon type="md-trash" v-show="listType == 'private'" class="add-icon" title="删除课程" @click="delCourse" />
+                                </div>
+                            </transition>
+                        </div>
+                        <TabPane label="标准课程" name="school">
+                            <div v-for="(item,index) in courseListS" :key="index" @click="selectCourse(index)" :class="index === curCusIndex ? 'course-list-item block-bg block-bg-active':'course-list-item block-bg'">
+                                <p class="course-name">
+                                    {{item[0].courseName}}
+                                    <Icon type="ios-information-circle-outline" @click="toggleCusInfo" title="课程信息" />
+                                </p>
+                                <p class="course-code">
+                                    <Icon type="md-pricetags" />
+                                    {{item[0].courseId}}
+                                </p>
+                            </div>
+                            <div v-if="courseListS.length == 0">
+                                <EmptyData :top="150" textContent="暂无学校课程"></EmptyData>
+                            </div>
+                        </TabPane>
+                        <TabPane label="个人课程" name="private">
+                            <div v-for="(item,index) in courseListP" :key="index" @click="selectCourse(index)" :class="index === curCusIndex ? 'course-list-item block-bg block-bg-active':'course-list-item block-bg'">
+                                <p class="course-name">
+                                    {{item.name}}
+                                    <Icon type="ios-information-circle-outline" @click="toggleCusInfo" title="课程信息" />
+                                </p>
+                                <p class="course-code">
+                                    <Icon type="md-pricetags" />
+                                    {{item.id}}
+                                </p>
+                            </div>
+                            <div v-if="courseListP.length == 0">
+                                <EmptyData :top="150" textContent="暂未创建课程"></EmptyData>
+                            </div>
+                        </TabPane>
+                    </Tabs>
+                </div>
+            </vuescroll>
+        </div>
+        <div class="course-info-wrap">
+            <!--课程班级列表-->
+            <div class="course-classroom-list">
+                <div class="course-classroom-list-header">
+                    <span class="course-classroom-label">{{$t('courseManage.classroom.classroomList')}}</span>
+                    <Icon type="md-add" class="add-icon" style="margin-top:12px;" @click="addClassroom()" />
+                    <Icon type="md-create" v-show="listType == 'private'" class="add-icon" style="margin-top:12px;" @click="editClassStatus = true" />
+                    <Icon type="md-trash" v-show="listType == 'private'" class="add-icon" style="margin-top:12px;" @click="deleteClass()" />
+                </div>
+                <div class="course-classroom-list-content">
+                    <div v-for="(item,index) in classList" :key="index" @click="changeClassroom(index)" :class="curClassIndex === index ? 'course-classroom-item block-bg block-bg-active':'course-classroom-item block-bg'">
+                        <p class="classroom-code">
+                            <span :class="listType === 'private' ? 'class-type-dym': item.openType == 1 ? 'class-type-sys':'class-type-custom'">
+                                {{getClassType(item.scope,item.openType).text}}
+                            </span>
+                            <!--{{item.no}}-->
+                        </p>
+                        <p class="classroom-name">{{item.name}}</p>
+                        <p class="classroom-info " v-if="item.openType == 1 || item.scope == 'private'">
+                            <!--<span class="classroom-info-label">{{$t('courseManage.classroom.studentCount')}}</span>
+                            <span class="classroom-info-value">{{item.studentCount}}</span>-->
+                            <span class="classroom-info-label">{{$t('courseManage.classroom.headmaster')}}</span>
+                            <span class="classroom-info-value">{{item.teacher.name}}</span>
+                        </p>
+                        <Icon size="20" custom="iconfont icon-qr-code" class="qr-code-icon" @click="showQrCode" v-if="'private' == listType" />
+                    </div>
+                    <div v-if="classList.length == 0">
+                        <EmptyData :top="160" textContent="暂无上课班级"></EmptyData>
+                    </div>
+                </div>
+            </div>
+            <div class="course-classroom-info" id="table-height">
+                <div class="course-classroom-info-header" style="padding-right:50px;">
+                    <span @click="tabName = 'record'" :class="tabName == 'record' ? 'course-classroom-label line-bottom line-bottom-active':'course-classroom-label line-bottom'">课堂记录</span>
+                    <span @click="tabName = 'stus'" :class="tabName == 'stus' ? 'course-classroom-label line-bottom line-bottom-active':'course-classroom-label line-bottom'">{{$t('courseManage.classroom.studentList')}}</span>
+                    <div style="float:right;color:white;" v-if="(listType == 'private' && tabName == 'stus') || (listType == 'school' && tabName == 'stus' && classList[curClassIndex].openType == 2)">
+                        <span class="action-btn-wrap" @click="delStudents">
+                            <Icon type="md-trash" size="16" />
+                            删除学生
+                        </span>
+                        <span class="action-btn-wrap" @click="addStuStatus = true" v-if="classList[curClassIndex] && listType == 'private'">
+                            <Icon type="md-add" size="16" />
+                            添加学生
+                        </span>
+                        <!--<span class="disable-text-icon action-btn-wrap">
+                            <Icon type="md-shuffle" size="16" />
+                            自动分组
+                        </span>
+                        <span class="disable-text-icon action-btn-wrap">
+                            <Icon :type="viewType ? 'md-card':'md-list'" size="16" />
+                            分组视图
+                        </span>-->
+                    </div>
+                </div>
+                <div class="course-classroom-info-content dark-iview-table animated fadeIn" v-show="tabName == 'stus'">
+                    <vuescroll style="height:100%;">
+                        <Table :columns="studentColumn" :data="students" @on-selection-change="(selections)=>{delSelection = selections}" :height="tableHeight" class="system-classroom-table" :loading="stuLoading" no-data-text="暂无学生">
+                            <Loading slot="loading" bgColor="rgba(103, 103, 103, 0.27)"></Loading>
+                            <template slot-scope="{ row ,index}" slot="action">
+                                <strong></strong>
+                            </template>
+                            <template slot-scope="{ row, index }" slot="groupId">
+                                <span>{{(row.groupId && listType == 'school') ? row.groupId : '- -'}}</span>
+                            </template>
+                            <template slot-scope="{ row, index }" slot="groupName">
+                                <span>{{(row.groupName && listType == 'school') ? row.groupName : '未分组'}}</span>
+                            </template>
+                        </Table>
+                    </vuescroll>
+                </div>
+                <div v-show="tabName == 'record'" class="animated fadeIn class-record-wrap">
+                    <vuescroll>
+                        <List>
+                            <ListItem v-for="(item,index) in itemNum" :key="index" style="border-color:#505050;">
+                                <ListItemMeta @click.native="toClassRecoerd">
+                                    <p slot="title" class="record-name">力的组成</p>
+                                    <span slot="avatar" style="margin-top:4px;display: inline-block;margin-left:10px;">
+                                        <Icon custom="iconfont icon-whiteboard" size="30" color="white" />
+                                    </span>
+                                    <div slot="description" style="color:white;">
+                                        <span class="hiteacher-version">
+                                            系统版本:3.0.32
+                                        </span>
+                                        <Time class="record-time" :time="((new Date()).getTime() - 60 * 3 * 1000)" />
+                                        <div class="record-action-wrap">
+                                            <Icon class="action-icon" type="md-analytics" title="课程记录" @click="toClassRecoerd" />
+                                            <Icon class="action-icon" type="ios-stats" title="苏格拉底报告" @click="toClassRecoerd" />
+                                            <Icon class="action-icon" custom="iconfont icon-video" title="苏格拉底影片/桌面" @click="toClassRecoerd" />
+                                            <Icon class="action-icon" custom="iconfont icon-hi" title="电子笔记" @click="toClassRecoerd" />
+                                            <Icon class="action-icon" custom="iconfont icon-textbook" title="课例教材" @click="toClassRecoerd" />
+                                            <Icon class="action-icon" type="md-share" title="分享到频道" @click="toClassRecoerd" />
+                                        </div>
+                                    </div>
+                                </ListItemMeta>
+                            </ListItem>
+                        </List>
+                        <p style="width:100%;text-align:center;color:#808080;margin-top:20px;">暂未对接HiTeach上传数据</p>
+                    </vuescroll>
+                </div>
+            </div>
+        </div>
+        <Drawer title="课程信息" class-name="dark-iview-drawer" width="450" :closable="false" v-model="showCusInfo" @on-close="baseEditStatus = true">
+            <!--基础信息-->
+            <div class="course-base-info-content dark-iview-form disabled-iview-select dark-wang-editor">
+                <Form ref="courseBaseInfo" label-position="top">
+                    <FormItem label="课程名称" prop="name" class="disabled-iview-select">
+                        <Input v-if="listType == 'school' && courseListS[curCusIndex]" v-model="courseListS[curCusIndex][0].courseName" :disabled="true" style="width:100%" placeholder="课程名称" :clearable="true"></Input>
+                        <Input v-else-if="listType == 'private' && courseListP[curCusIndex]" v-model="courseListP[curCusIndex].name" :disabled="baseEditStatus" style="width:100%" placeholder="课程名称" :clearable="true"></Input>
+                    </FormItem>
+                    <FormItem label="课程编码" prop="id" class="disabled-iview-select">
+                        <Input v-if="listType == 'school' && courseListS[curCusIndex]" v-model="courseListS[curCusIndex][0].courseId" :disabled="true" style="width:100%" placeholder="课程编码" :clearable="true"></Input>
+                        <Input v-else-if="listType == 'private' && courseListP[curCusIndex]" v-model="courseListP[curCusIndex].id" :disabled="true" style="width:100%" placeholder="课程编码" :clearable="true"></Input>
+                    </FormItem>
+                    <FormItem :label="$t('courseManage.base.courseNotice')">
+                        <div ref="courseNotice" v-show="!baseEditStatus"></div>
+                        <div v-show="baseEditStatus" style="height:fit-content;color:white;font-size:16px;padding-left:10px;width:100%;">
+                            <vuescroll>
+                                <div v-if="listType == 'school' && courseListS[curCusIndex] && checkNotice(courseListS[curCusIndex][0].notice)" v-html="courseListS[curCusIndex][0].notice" style=""></div>
+                                <div v-else-if="listType == 'private' && courseListP[curCusIndex] && checkNotice(courseListP[curCusIndex].notice)" v-html="courseListP[curCusIndex].notice" style=""></div>
+                                <div v-else style="">暂无公告!</div>
+                            </vuescroll>
+                        </div>
+                    </FormItem>
+                    <FormItem label="">
+                        <Button style="width:100%;margin-top:10px;" @click="edNotice">{{baseEditStatus ? '编辑':'保存'}}</Button>
+                    </FormItem>
+                </Form>
+            </div>
+        </Drawer>
+        <Modal v-model="newPrivateStatus" :title="$t('courseManage.classroom.personalClassroomTitle')" @on-ok="confirmNewClass" class-name="dark-iview-modal dark-iview-form">
+            <Form ref="personalClassroom" :model="privateClass" label-position="top" label-colon>
+                <FormItem label="班级名称" prop="name">
+                    <Input v-model="privateClass.name" :placeholder="$t('courseManage.classroom.classroomName')">
+                    </Input>
+                </FormItem>
+                <FormItem :label="$t('courseManage.classroom.invitationCode')" prop="id">
+                    <span style="font-size:18px;color:white;">{{privateClass.id}}</span>
+                </FormItem>
+            </Form>
+        </Modal>
+        <Modal v-model="editClassStatus" title="修改班级信息" @on-ok="confirmUpdClass" class-name="dark-iview-modal dark-iview-form">
+            <Form v-if="editClassStatus" ref="personalClassroom" :model="courseListP[curCusIndex].classes[curClassIndex]" label-position="top" label-colon>
+                <FormItem label="班级名称" prop="name">
+                    <Input v-model="courseListP[curCusIndex].classes[curClassIndex].name" :placeholder="$t('courseManage.classroom.classroomName')">
+                    </Input>
+                </FormItem>
+                <FormItem :label="$t('courseManage.classroom.invitationCode')" prop="id">
+                    <span style="font-size:18px;color:white;">{{courseListP[curCusIndex].classes[curClassIndex].id}}</span>
+                </FormItem>
+            </Form>
+        </Modal>
+        <Modal v-model="addCusStatus" title="新增课程" @on-ok="confirmAddCus" class-name="dark-iview-modal dark-iview-form">
+            <Form ref="addCusInfo" :model="addCusInfo" :rules="ruleAddCus">
+                <FormItem prop="courseName" label="课程名称">
+                    <Input type="text" v-model="addCusInfo.courseName" placeholder="课程名称..."></Input>
+                </FormItem>
+            </Form>
+            <Form ref="addCusInfo" :model="addCusInfo" :rules="ruleAddCus">
+                <FormItem prop="courseCode" label="课程编码">
+                    <Input type="text" v-model="addCusInfo.courseCode" placeholder="课程编码..."></Input>
+                </FormItem>
+            </Form>
+        </Modal>
+        <Modal v-model="addStuStatus" title="添加学生" width="1200" @on-ok="confirmAddStu" class-name="dark-iview-modal">
+            <StudentList @getSelectInfo="(selction)=>{selections = selction}"></StudentList>
+        </Modal>
+        <div class="qr-code-wrap" v-show="showQrStatus" @click="showQrStatus = false">
+            <div id="qrcode" :class="showQrStatus ? 'animated fadeIn':'animated fadeOut'" ref="qrcode" style="padding:20px;background-color:white;width:320px;margin:auto;"></div>
+        </div>
+    </div>
+</template>
+<script>
+import QRCode from 'qrcodejs2'
+import E from '@/utils/wangEditor.js'
+import StudentList from '@/components/coursemgt/StudentList.vue'
+export default {
+    components: {
+        StudentList
+    },
+    data() {
+        // 验证只能是字母和数字
+        const validateCode = (rule, value, callback) => {
+            if (!value) {
+                return callback(new Error('课程编码不能为空!'))
+            }
+            let zg = /^[0-9a-zA-Z]+$/
+            if (zg.test(value)) {
+                callback()
+            } else {
+                callback(new Error('课程编码只能由字母和数字组成!'))
+            }
+        }
+        return {
+            delSelection: [],
+            selections: [],
+            schoolClassList: [],
+            tableHeight: 100,
+            studentColumn: [
+                {
+                    title: ' ',
+                    type: 'selection',
+                    width: 80,
+                    align: 'center'
+                },
+                {
+                    title: this.$t('courseManage.classroom.studentTableC2'),
+                    key: 'name',
+                    align: 'left '
+                },
+                {
+                    title: '账号',
+                    key: 'id',
+                    align: 'center',
+                    sortable: true
+                },
+                {
+                    title: this.$t('courseManage.classroom.studentTableC1'),
+                    key: 'no',
+                    align: 'center',
+                    sortable: true
+                },
+                {
+                    title: this.$t('courseManage.classroom.studentTableC5'),
+                    slot: 'groupId',
+                    align: 'center',
+                    sortable: true
+                },
+                {
+                    title: this.$t('courseManage.classroom.studentTableC6'),
+                    slot: 'groupName',
+                    align: 'center'
+                }
+            ],
+            itemNum: 5,
+            editClassStatus: false,
+            baseEditStatus: true,
+            showQrStatus: false,
+            showCusInfo: false,
+            listLoading: false,
+            newPrivateStatus: false,
+            stuLoading: false,
+            selectClassStatus: false,
+            listType: 'school',
+            tabName: 'record',
+            addCusStatus: false,
+            addStuStatus: false,
+            joinQRcode: undefined,
+            curCusIndex: 0,
+            curClassIndex: 0,
+            courseListS: [],
+            courseListP: [],
+            addCusInfo: {
+                courseName: '',
+                courseCode: ''
+            },
+            ruleAddCus: {
+                courseName: [
+                    { required: true, message: '课程名称不能为空', trigger: 'change' }
+                ],
+                courseCode: [
+                    { required: true, validator: validateCode, trigger: 'change' }
+                ]
+            },
+            privateClass: {
+                id: '',
+                name: '',
+                notice: ''
+            },
+            sysClass: {
+                id: '',
+                name: ''
+            },
+        }
+    },
+    methods: {
+        getClassType(scope, openType) {
+            if (this.listType == 'private') {
+                return {
+                    text: '动态名单',
+                    class: ''
+                }
+            } else if (openType == 1) {
+                return {
+                    text: '常规教室',
+                    class: ''
+                }
+            } else {
+                return {
+                    text: '专科教室',
+                    class: ''
+                }
+            }
+        },
+        //删除学生
+        delStudents() {
+            if (this.delSelection.length > 0) {
+                let names = this.delSelection.map(item => {
+                    return item.name
+                })
+                this.$Modal.confirm({
+                    title: '删除学生',
+                    content: `确认删除${names.join(', ')}共${names.length}名学生吗?`,
+                    onOk: () => {
+                        this.listLoading = true
+                        this.delSelection.forEach(item => {
+                            let index = this.courseListP[this.curCusIndex].classes[this.curClassIndex].students.findIndex(stu => {
+                                return stu.id == item.id
+                            })
+                            this.courseListP[this.curCusIndex].classes[this.curClassIndex].students.splice(index, 1)
+                        })
+                        this.$api.schoolSetting.classUpsert({
+                            classroom: this.courseListP[this.curCusIndex].classes[this.curClassIndex],
+                            option: 'update',
+                            school_code: this.$store.state.userInfo.TEAMModelId
+                        }).then(
+                            (res) => {
+                                if (!res.error) {
+                                    this.selections = []
+                                    this.$Message.success('删除成功!')
+                                } else {
+                                    this.$Message.error('删除失败!')
+                                }
+                            },
+                            (err) => {
+                                this.$Message.error('删除失败!')
+                            }
+                        ).finally(() => {
+                            this.listLoading = false
+                            this.baseEditStatus = !this.baseEditStatus
+                        })
+                    }
+                })
+            } else {
+                this.$Message.warning('请先选择需要删除的学生!')
+            }
+
+        },
+        //确认添加学生
+        confirmAddStu() {
+            if (this.selections.length > 0) {
+                if (!this.courseListP[this.curCusIndex].classes[this.curClassIndex].students) {
+                    this.$set(this.courseListP[this.curCusIndex].classes[this.curClassIndex], 'students', [])
+                }
+                let stuIds = this.courseListP[this.curCusIndex].classes[this.curClassIndex].students.map(item => {
+                    return item.id
+                })
+                if (stuIds.length > 0) {
+                    //如果已经有学生,根据账号去重
+                    let hasRepeat = false
+                    this.selections.forEach(item => {
+                        if (stuIds.indexOf(item.id) == -1) {
+                            this.courseListP[this.curCusIndex].classes[this.curClassIndex].students.push({
+                                id: item.id,
+                                name: item.name,
+                                no: item.no
+                            })
+                        } else {
+                            hasRepeat = true
+                        }
+                    })
+                    if (hasRepeat) {
+                        //this.$Message.warning('已经自动帮您去掉账号重复的学生!')
+                    }
+                } else {
+                    let stus = this.selections.map(item => {
+                        return {
+                            id: item.id,
+                            name: item.name,
+                            no: item.no
+                        }
+                    })
+                    this.courseListP[this.curCusIndex].classes[this.curClassIndex].students.push(...stus)
+                }
+                //保存操作
+                this.listLoading = true
+                this.courseListP[this.curCusIndex].code = this.$store.state.userInfo.TEAMModelId
+                //调整为更新个人班级
+                //this.$api.courseMgmt.upsertPrivateCus({
+                //    course: this.courseListP[this.curCusIndex],
+                //    option: 'update'
+                //}).then(
+                //    (res) => {
+                //        if (!res.error) {
+                //            this.selections.length = 0
+                //            this.$Message.success('添加成功!')
+                //        } else {
+                //            this.$Message.error('添加失败!')
+                //        }
+                //    },
+                //    (err) => {
+                //        this.$Message.error('添加失败!')
+                //    }
+                //).finally(() => {
+                //    this.listLoading = false
+                //    this.baseEditStatus = !this.baseEditStatus
+                //})
+                this.$api.schoolSetting.classUpsert({
+                    classroom: this.courseListP[this.curCusIndex].classes[this.curClassIndex],
+                    option: 'update',
+                    'school_code': this.$store.state.userInfo.TEAMModelId
+                }).then(
+                    (res) => {
+                        if (!res.error) {
+                            this.selections.length = 0
+                            this.$Message.success('添加成功!')
+                        } else {
+                            this.$Message.error('添加失败!')
+                        }
+                    },
+                    (err) => {
+                        this.$Message.error('添加失败!')
+                    }
+                ).finally(() => {
+                    this.listLoading = false
+                    this.baseEditStatus = !this.baseEditStatus
+                })
+            }
+        },
+        //查询班级学生名单
+        findClassStu() {
+            this.stuLoading = true
+            let params = {
+                'school_code': this.listType == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
+                'id': this.classList[this.curClassIndex].id,
+                //school:校本班级 teacher:私人课程校本名单 private:私人课程动态名单
+                'scope': this.listType == 'school' ? 'school' : this.classList[this.curClassIndex].scope == 'school' ? 'teacher' : 'private'
+            }
+            this.$api.schoolSetting.getClassroomStudent(params).then(
+                (res) => {
+                    if (!res.error) {
+                        if (res.classrooms.length > 0) {
+                            if (this.listType == 'school') {
+                                this.$set(this.courseListS[this.curCusIndex][this.curClassIndex], 'students', res.classrooms[0].students)
+                            }
+                            else {
+                                this.$set(this.courseListP[this.curCusIndex].classes[this.curClassIndex], 'students', res.classrooms[0].students)
+                            }
+                        }
+                    } else {
+                        this.$Message.error('API error!')
+                    }
+                },
+                (err) => {
+                    this.$Message.error('API error!')
+                }
+            ).finally(() => {
+                setTimeout(() => {
+                    this.stuLoading = false
+                }, 500)
+            })
+        },
+        //检查课程是否为“空”
+        checkNotice(content) {
+            if (!content || content == '' || content == '<p><br></p>') {
+                return false
+            } else {
+                return true
+            }
+        },
+        //确认修改班级信息
+        confirmUpdClass() {
+            this.listLoading = true
+            this.courseListP[this.curCusIndex].code = this.$store.state.userInfo.TEAMModelId
+            this.$api.courseMgmt.upsertPrivateCus({
+                course: this.courseListP[this.curCusIndex],
+                option: 'update'
+            }).then(
+                (res) => {
+                    if (!res.error) {
+                        this.$Message.success('修改成功!')
+                    } else {
+                        this.$Message.error('修改失败!')
+                    }
+                },
+                (err) => {
+                    this.$Message.error('修改失败!')
+                }
+            ).finally(() => {
+                this.listLoading = false
+                this.editClassStatus = false
+            })
+        },
+        //删除上课班级
+        deleteClass() {
+            let _this = this
+            let delClass = this._.cloneDeep(this.classList[this.curClassIndex])
+            this.$Modal.confirm({
+                title: '删除班级',
+                content: `确认删除${this.classList[this.curClassIndex].name}吗?`,
+                onOk: function () {
+                    _this.listLoading = true
+                    let index = _this.curClassIndex
+                    _this.curClassIndex = 0
+                    _this.courseListP[_this.curCusIndex].classes.splice(index, 1)
+                    _this.courseListP[_this.curCusIndex].code = _this.$store.state.userInfo.TEAMModelId
+                    _this.$api.courseMgmt.upsertPrivateCus({
+                        course: _this.courseListP[_this.curCusIndex],
+                        option: 'update'
+                    }).then(
+                        (res) => {
+                            if (!res.error) {
+                                //删除个人班级数据
+                                _this.$api.schoolSetting.delClassroom({
+                                    id: delClass.id,
+                                    scope: delClass.scope,
+                                    school_code: _this.$store.state.userInfo.TEAMModelId
+                                }).then(
+                                    res => {
+                                        _this.$Message.success('删除成功!')
+                                    },
+                                    err => {
+                                        _this.$Message.error('删除失败!')
+                                    }
+                                )
+                            } else {
+                                _this.$Message.error('删除失败!')
+                            }
+                        },
+                        (err) => {
+                            _this.$Message.error('删除失败!')
+                        }
+                    ).finally(() => {
+                        _this.listLoading = false
+                    })
+                }
+            })
+        },
+        editCus() {
+            this.toggleCusInfo()
+            this.edNotice()
+        },
+        //保存个人课程
+        saveNotice() {
+            this.listLoading = true
+            this.courseListP[this.curCusIndex].code = this.$store.state.userInfo.TEAMModelId
+            this.$api.courseMgmt.upsertPrivateCus({
+                course: this.courseListP[this.curCusIndex],
+                option: 'update'
+            }).then(
+                (res) => {
+                    if (!res.error) {
+                        this.$Message.success('修改成功!')
+                    } else {
+                        this.$Message.error('修改失败!')
+                    }
+                },
+                (err) => {
+                    this.$Message.error('修改失败!')
+                }
+            ).finally(() => {
+                this.listLoading = false
+                this.baseEditStatus = !this.baseEditStatus
+            })
+        },
+        edNotice() {
+            if (this.baseEditStatus) {
+                this.baseEditStatus = !this.baseEditStatus
+                this.initEditor()
+            } else {
+                if (this.listType == 'private') {
+                    this.saveNotice()
+                } else {
+                    this.baseEditStatus = !this.baseEditStatus
+                    this.courseListS[this.curCusIndex][this.curClassIndex].code = this.$store.state.userInfo.schoolCode
+                    this.$api.courseMgmt.upsertNotice(this.courseListS[this.curCusIndex][this.curClassIndex]).then(
+                        res => {
+                            if (!res.error) {
+                                this.$Message.success('保存成功')
+                            } else {
+                                this.$Message.error('保存失败')
+                            }
+                        },
+                        err => {
+                            this.$Message.error('保存失败')
+                        }
+                    )
+                }
+            }
+        },
+        toggleCusInfo() {
+            this.showCusInfo = !this.showCusInfo
+        },
+        //初始化富文本编辑器
+        initEditor() {
+            if (!this.noticeEditor) {
+                let noticeEditor = new E(this.$refs.courseNotice)
+                noticeEditor.customConfig.onchange = (html) => {
+                    if (this.listType == 'school') {
+                        this.courseListS[this.curCusIndex][0].notice = html
+                    } else if (this.listType == 'private') {
+                        this.courseListP[this.curCusIndex].notice = html
+                    }
+                }
+                noticeEditor.customConfig.menus = [
+                    'bold', // 粗体
+                    'italic', // 斜体
+                    'underline', // 下划线
+                    'list', // 列表
+                    'link', // 插入链接
+                    'image' // 插入图片
+                ],
+                    noticeEditor.customConfig.showLinkImg = false
+                noticeEditor.customConfig.uploadFileName = 'files'
+                noticeEditor.create()
+                noticeEditor.txt.html(this.listType == 'school' ? this.courseListS[this.curCusIndex][0].notice : this.courseListP[this.curCusIndex].notice)
+                this.noticeEditor = noticeEditor
+            } else {
+                console.log(this.courseListS[this.curCusIndex][0].notice)
+                let schoolNotice = this.courseListS[this.curCusIndex][0].notice ? this.courseListS[this.curCusIndex][0].notice : ''
+                this.noticeEditor.txt.html(this.listType == 'school' ? schoolNotice : this.courseListP[this.curCusIndex].notice)
+                console.log(this.courseListS)
+            }
+
+        },
+        //创建二维码
+        createQRCode(url) {
+            this.$nextTick(() => {
+                // 此时已经渲染完成
+                if (this.joinQRcode == undefined) {
+                    let qrcode = new QRCode('qrcode', {
+                        width: 280, // 设置宽度,单位像素
+                        height: 280, // 设置高度,单位像素
+                        text: url // 设置二维码内容或跳转地址
+                    })
+                    this.joinQRcode = qrcode
+                } else {
+                    this.joinQRcode.clear()
+                    this.joinQRcode.makeCode(url)
+                }
+            })
+        },
+        showQrCode() {
+            this.showQrStatus = true
+            let tId = this.$store.state.userInfo.TEAMModelId
+            let tName = this.$store.state.userInfo.name
+            let cId = this.classList[this.curClassIndex].id
+            let cName = this.classList[this.curClassIndex].name
+            this.createQRCode(`http://teammodelos-test.chinacloudsites.cn/joinclass?tId=${tId}&cId=${cId}&tName=${tName}&cName=${cName}`)
+        },
+
+        //添加上课班级
+        addClassroom() {
+            let randomCode = 'P'
+            for (let i = 0; i < 8; i++) {
+                randomCode += this.$jsFn.getBtwRandom(0, 9)
+            }
+            this.privateClass.id = randomCode
+            this.newPrivateStatus = true
+        },
+        //确认添加上课班级
+        confirmNewClass() {
+            this.privateClass['scope'] = 'private'
+            this.privateClass['code'] = this.$store.state.userInfo.TEAMModelId
+            this.privateClass['teacher'] = {
+                id: this.$store.state.userInfo.TEAMModelId,
+                name: this.$store.state.userInfo.name
+            }
+            this.courseListP[this.curCusIndex].classes.push(this._.cloneDeep(this.privateClass))
+            this.courseListP[this.curCusIndex].code = this.$store.state.userInfo.TEAMModelId
+            this.$api.courseMgmt.upsertPrivateCus({
+                course: this.courseListP[this.curCusIndex],
+                option: 'update'
+            }).then(
+                (res) => {
+                    if (!res.error) {
+                        this.$Message.success('动态名单创建成功!')
+                    } else {
+                        this.$Message.error('动态名单创建失败!')
+                    }
+                },
+                (err) => {
+                    this.$Message.error('动态名单创建失败!')
+                }
+            )
+        },
+        //课程选项卡点击事件
+        tabClick(name) {
+            this.curCusIndex = 0
+            if (name == 'school' && this.courseListS.length == 0) {
+                this.getCourseList()
+            } else if (name == 'private' && this.courseListP.length == 0) {
+                this.getPrivateCus()
+            } else {
+                this.changeClassroom(0)
+            }
+        },
+        changeClassroom(index) {
+            this.curClassIndex = index
+            if (this.listType == 'school' && !this.courseListS[this.curCusIndex][this.curClassIndex].students) {
+                this.findClassStu()
+            } else if (this.listType == 'private' && !this.courseListP[this.curCusIndex].classes[this.curClassIndex].students) {
+                this.findClassStu()
+            }
+        },
+        toClassRecoerd() {
+            this.listLoading = true
+            setTimeout(() => {
+                this.$router.push({ path: '/home/classRecord' })
+            }, 500)
+        },
+        //删除个人课程
+        delCourse() {
+            this.$Modal.confirm({
+                title: '删除课程',
+                content: `确认删除${this.courseListP[this.curCusIndex].name}吗?`,
+                onOk: () => {
+                    this.$api.courseMgmt.deleteCourse({
+                        id: this.courseListP[this.curCusIndex].id,
+                        code: this.$store.state.userInfo.TEAMModelId,
+                        scope: this.courseListP[this.curCusIndex].scope
+                    }).then(
+                        res => {
+                            if (!res.error) {
+                                let index = this.curCusIndex
+                                this.curCusIndex = 0
+                                this.courseListP.splice(index, 1)
+                                this.$Message.success('删除成功!')
+                            } else {
+                                this.$Message.error('删除失败!')
+                            }
+                        },
+                        err => {
+                            this.$Message.error('删除失败!')
+                        }
+                    )
+                }
+            })
+        },
+        selectCourse(index) {
+            this.curClassIndex = 0
+            this.curCusIndex = index
+            if (this.classList.length > 0) {
+                this.changeClassroom(0)
+            }
+        },
+        //添加个人课程
+        showAddCourse() {
+            this.addCusStatus = true
+        },
+        confirmAddCus() {
+            this.$refs['addCusInfo'].validate((valid) => {
+                if (valid) {
+                    let requestData = {
+                        option: 'insert',
+                        course: {
+                            name: this.addCusInfo.courseName,
+                            id: this.addCusInfo.courseCode,
+                            code: this.$store.state.userInfo.TEAMModelId,
+                            classes: [],
+                            scope: 'private'
+                        }
+                    }
+                    this.$api.courseMgmt.upsertPrivateCus(requestData).then(
+                        (res) => {
+                            if (res.error == null) {
+                                this.$Message.success('保存成功!')
+                                this.courseListP.push(requestData.course)
+                            } else {
+                                this.$Message.success('保存失败!')
+                            }
+                        },
+                        (err) => {
+
+                        }
+                    )
+                } else {
+                    this.$Message.error('请完善信息再保存!');
+                }
+            })
+        },
+        //获取个人课程列表
+        getPrivateCus() {
+            this.listLoading = true
+            let requestData = {
+                id: this.$store.state.userInfo.TEAMModelId
+            }
+            this.$api.courseMgmt.getPrivateCusMgt(requestData).then(
+                (res) => {
+                    if (res.error == null) {
+                        res.courses.forEach(curItem => {
+                            curItem.classes.forEach(claItem => {
+                                let c = this.schoolClassList.find((classItem) => {
+                                    return claItem.id == classItem.id
+                                })
+                                if (c) {
+                                    claItem.no = c.no
+                                    claItem.openType = c.openType
+                                }
+                            })
+                        })
+                        this.courseListP = res.courses
+
+                        this.selectCourse(0)
+                    } else {
+                        this.$Message.error('API error!')
+                    }
+                },
+                (err) => {
+                    this.$Message.error('API error!')
+                }
+            ).finally(() => {
+                this.listLoading = false
+            })
+        },
+        //获取标准课程列表
+        getCourseList() {
+            this.listLoading = true
+            let requestData = {
+                'code': this.$store.state.userInfo.schoolCode,
+                'id': this.$store.state.userInfo.TEAMModelId
+            }
+            this.$api.courseMgmt.getSchoolCusMgt(requestData).then(
+                (res) => {
+                    if (res.error == null) {
+                        res.courses.forEach((item, index) => {
+                            let c = this.schoolClassList.find((classItem) => {
+                                return item.id == classItem.id
+                            })
+                            if (c) {
+                                item.no = c.no
+                                item.openType = c.openType
+                            }
+                        })
+                        console.log('res', res)
+                        this.courseListS = this.$jsFn.groupBy(res.courses, 'courseId')
+                        this.selectCourse(0)
+                    } else {
+                        this.$Message.error('API ERROR!')
+                    }
+                },
+                (err) => {
+                    this.$Message.error('API ERROR!')
+                }
+            ).finally(() => {
+                this.listLoading = false
+            })
+        }
+    },
+    created() {
+        //直接读取登录成功拿到得学校基础信息
+        this.$store.dispatch('user/getSchoolProfile').then(res => {
+            this.schoolClassList = res.school_classes
+            this.getCourseList()
+        })
+
+        this.$nextTick(() => {
+            let dom = document.getElementById('table-height')
+            console.log(dom)
+            console.log(dom.offsetHeight)
+            this.tableHeight = dom.offsetHeight - 60
+        })
+    },
+    computed: {
+        classList() {
+            if (this.listType == 'school') {
+                if (this.courseListS.length > 0) {
+                    return this.courseListS[this.curCusIndex]
+                } else {
+                    return []
+                }
+            } else if (this.listType == 'private') {
+                if (this.courseListP.length > 0) {
+                    return this.courseListP[this.curCusIndex].classes
+                } else {
+                    return []
+                }
+            }
+        },
+        students() {
+            if (this.listType == 'school') {
+                if (this.courseListS[this.curCusIndex] && this.courseListS[this.curCusIndex][this.curClassIndex]) {
+                    return this.courseListS[this.curCusIndex][this.curClassIndex].students
+                } else {
+                    return []
+                }
+            } else if (this.listType == 'private') {
+                if (this.courseListP[this.curCusIndex] && this.courseListP[this.curCusIndex].classes && this.courseListP[this.curCusIndex].classes[this.curClassIndex]) {
+                    return this.courseListP[this.curCusIndex].classes[this.curClassIndex].students
+                } else {
+                    return []
+                }
+            } else {
+                return []
+            }
+        }
+    }
+}
+</script>
+<style scoped lang="less">
+@import "./NewMyCourse.less";
+@import "./CourseClassroom.less";
+</style>
+<style>
+.cus-list-tab .ivu-tabs-bar {
+    height: 45px;
+}
+.cus-list-tab .ivu-tabs-nav {
+    height: 45px;
+    line-height: 30px;
+}
+.course-classroom-list-header .ivu-poptip-inner {
+    background-color: #404040;
+    color: white;
+}
+
+.course-classroom-list-header .ivu-poptip-arrow::after {
+    display: none;
+}
+
+.course-classroom-list-header .ivu-poptip-title:after,
+.course-classroom-list-header .ivu-poptip-title {
+    display: none;
+}
+.course-classroom-info-content #loadingBox {
+    margin-top: 0px !important;
+}
+</style>