瀏覽代碼

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

jeff 4 年之前
父節點
當前提交
79ff44fca9

+ 4 - 3
TEAMModelOS/ClientApp/src/common/CollapseMenuLayout.less

@@ -125,7 +125,7 @@
     margin-left: -4px;
 }
 .menu-item {
-    height: ~"calc(100% - 30px)";
+    height: ~"calc(100% - 35px)";
     user-select:none;
 }
 .collapse-icon-box {
@@ -133,7 +133,8 @@
     text-align: right;
     cursor: pointer;
     transition: background 1s;
-    padding-right:5px;
+    padding-right: 5px;
+    margin-top: 5px;
 
     &:hover {
         background: #404040;
@@ -142,7 +143,7 @@
     }
 
     &:hover .collapse-icon {
-        color: aqua;
+        color: #1CC0F3;
         transition: color 1s;
     }
 }

+ 7 - 10
TEAMModelOS/ClientApp/src/common/CollapseMenuLayout.vue

@@ -5,10 +5,9 @@
             <div class="logo-wrap">
                 <img src="../assets/ies5.png"
                      :class="isCollapsed ? 'collapsed-logo-width unit-logo':'collapsed-logo-width  unit-logo'" />
-                <!-- <span class="unit-name">醍摩豆云平台</span> -->
             </div>
 			<div class="school-wrap">
-				<img src="../assets/icon/logo.png" />
+				<img src="http://sokrates.teammodel.cn/images/app/cn/teammodel/original-black-small.png" />
 				<span>成都青城山学校</span>
 			</div>
             <slot name="header-content"></slot>
@@ -79,14 +78,6 @@
                 },
                 isCollapsed: false,
                 menuTree: [
-                    //{
-                    //    icon: 'iconfont icon-home',
-                    //    name: '个人主页',
-                    //    router: '/home/HomePage',
-                    //    role: 'teacher|admin',
-                    //    permission: 'analysis',
-                    //    child:[]
-                    //},
                     {
                         icon: 'iconfont icon-smart-campus',
                         name: '智慧校园',
@@ -502,4 +493,10 @@
     .biz-menu .ivu-menu-vertical .ivu-menu-item,.biz-menu .ivu-menu-vertical .ivu-menu-submenu-title {
         padding:8px 24px;
     }
+    .biz-menu .ivu-menu-light.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu) {
+        color:#1CC0F3;
+    }
+        .biz-menu .ivu-menu-light.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu):after {
+            background: #1CC0F3;
+        }
 </style>

+ 5 - 1
TEAMModelOS/ClientApp/src/css/custom-animate.less

@@ -33,6 +33,9 @@
 */
 .line-bottom{
     position:relative;
+    height:45px;
+    line-height:45px !important;
+    padding: 0px 15px;
 }
 .line-bottom::before {
     content: '';
@@ -40,7 +43,8 @@
     bottom: 0px;
     width: 0px;
     height: 2px;
-    background-color: white;
+    left:0px;
+    background-color: #1CC0F3;
 }
 
 .line-bottom-active::before {

+ 2 - 2
TEAMModelOS/ClientApp/src/css/dark-iview-tabs.less

@@ -30,12 +30,12 @@
     }
 
     .ivu-tabs-ink-bar {
-        background: white;
+        background: #1CC0F3;
     }
 
     .ivu-tabs-bar {
         border-color: #424242;
         color: #a5a5a5;
-        margin-bottom:2px;
+        margin-bottom: 2px;
     }
 }

+ 13 - 6
TEAMModelOS/ClientApp/src/view/newcourse/CourseClassroom.less

@@ -9,7 +9,7 @@
 
 .course-classroom-box {
     width: 100%;
-    height: ~"calc(100% - 45px)";
+    height: 100%;
     display: flex;
     flex-direction: row;
 
@@ -20,8 +20,8 @@
 
         .course-classroom-list-header {
             width: 100%;
-            height: 40px;
-            line-height: 40px;
+            height: 45px;
+            line-height: 45px;
             border-bottom: 1px solid @borderColor;
 
             .add-classroom-icon {
@@ -77,13 +77,20 @@
 
         .course-classroom-info-header {
             width: 100%;
-            height: 40px;
-            line-height: 40px;
+            height: 45px;
+            line-height: 45px;
             border-bottom: 1px solid @borderColor;
 
             .course-classroom-label {
-                margin-left: 10px;
+                margin-right: 20px;
+                height:45px;
+                display:inline-block;
+                padding:0px 15px;
                 color: @second-textColor;
+                cursor:pointer;
+                &::before{
+                    left:0px;
+                }
             }
         }
 

+ 10 - 218
TEAMModelOS/ClientApp/src/view/newcourse/CourseClassroom.vue

@@ -31,29 +31,13 @@
         </div>
         <div class="course-classroom-info" v-if="JSON.stringify(courseInfo) !== '{}'">
             <div class="course-classroom-info-header" style="padding-right:50px;">
-                <span class="course-classroom-label">{{$t('courseManage.classroom.studentList')}}</span>
-                <div v-if="courseInfo.classes" style="float:right;color:white;">
-                    <Button v-show="updated" type="primary" size="small" style="float:right;margin-left:30px;margin-top:8px;" @click="saveGroup">保存分组</Button>
-                    <Button size="small" style="float:right;margin-top:8px;" @click="customGroup">{{$t('courseManage.classroom.autoGroupBtn')}}</Button>
-                    <div style="float:right;margin-right:30px;" v-show="courseInfo.classes[curClassIndex].code == $store.state.userInfo.TEAMModelId">
-                        <Button type="info" size="small" style="">{{$t('courseManage.classroom.deleteStuBtn')}}</Button>
-                    </div>
-                    <div style="float:right;margin-right:30px;" v-show="courseInfo.classes[curClassIndex].code == $store.state.userInfo.TEAMModelId" @click="showStudentList">
-                        <Button type="info" size="small" style="">{{$t('courseManage.classroom.addStuBtn')}}</Button>
-                    </div>
-                    <div style="float:right;margin-right:40px;">
-                        <span style="margin-right:5px;">{{$t('courseManage.classroom.removeStudent1')}}</span>
-                        <Select v-model="currentGroup" style="width:80px" size="small">
-                            <Option v-for="(item,index) in groupList" :value="index" :key="index" @click.native="setGroup">{{ item.groupCode+ '('+item.groupName+')' }}</Option>
-                        </Select>
-                        <span style="margin-right:10px;margin-left:5px;">{{$t('courseManage.classroom.removeStudent2')}}</span>
-                    </div>
-                </div>
+                <span @click="tabName = 'stus'" :class="tabName == 'stus' ? 'course-classroom-label line-bottom line-bottom-active':'course-classroom-label'">{{$t('courseManage.classroom.studentList')}}</span>
+                <span @click="tabName = 'record'" :class="tabName == 'record' ? 'course-classroom-label line-bottom line-bottom-active':'course-classroom-label'">课堂记录</span>
             </div>
-            <div class="course-classroom-info-content dark-iview-table">
-                <!--学生名单-->
+            <!--学生名单-->
+            <div class="course-classroom-info-content dark-iview-table animated fadeIn" v-show="tabName == 'stus'">
                 <vuescroll style="height:100%;">
-                    <Table v-if="courseInfo.classes" :columns="studentColumn" :data="courseInfo.classes[curClassIndex].students" max-height="750" class="system-classroom-table" :loading="studentTabelLoading" @on-selection-change="getSelections" no-data-text="暂无学生">
+                    <Table v-if="courseInfo.classes" :columns="studentColumn" :data="courseInfo.classes[curClassIndex].students" max-height="800" class="system-classroom-table" :loading="studentTabelLoading" @on-selection-change="getSelections" no-data-text="暂无学生">
                         <Loading slot="loading" bgColor="rgba(103, 103, 103, 0.27)"></Loading>
                         <template slot-scope="{ row ,index}" slot="action">
                             <strong></strong>
@@ -62,37 +46,12 @@
                     <EmptyData v-else :top="0" textContent="暂无学生" style="padding-top:100px;"></EmptyData>
                 </vuescroll>
             </div>
+            <!--课堂记录-->
+            <div v-show="tabName == 'record'" class="animated fadeIn">
+                <!--<EmptyData style="margin: auto;margin-top: 200px;"></EmptyData>-->
+            </div>
         </div>
-
         <EmptyData v-if="JSON.stringify(courseInfo) == '{}'" style="margin: auto;margin-top: 200px;"></EmptyData>
-
-        <Modal v-model="customGroupStatus"
-               :title="$t('courseManage.classroom.autoGroupBtn')"
-               @on-ok="comfirmCustomRules" class="custom-group"
-               class-name="dark-iview-modal dark-iview-form"
-               v-if="JSON.stringify(courseInfo) !== '{}'">
-            <Form :label-width="80" :label-colon="true" style="color:white;" v-if="courseInfo.classes">
-                <FormItem :label="$t('courseManage.classroom.studentCountLabel')">
-                    <span v-if="courseInfo.classes[curClassIndex].students">{{courseInfo.classes[curClassIndex].students.length}}人</span>
-                </FormItem>
-                <FormItem :label="$t('courseManage.classroom.groupCountLabel')">
-                    <InputNumber :max="10" :min="1" v-model="groupNum"></InputNumber>
-                </FormItem>
-                <FormItem :label="$t('courseManage.classroom.groupTypeLabel')">
-                    <RadioGroup v-model="groupType">
-                        <Radio label="1">
-                            <span>{{$t('courseManage.classroom.groupType1')}}</span>
-                        </Radio>
-                        <Radio label="2">
-                            <span>{{$t('courseManage.classroom.groupType2')}}</span>
-                        </Radio>
-                        <Radio label="3">
-                            <span>{{$t('courseManage.classroom.groupType3')}}</span>
-                        </Radio>
-                    </RadioGroup>
-                </FormItem>
-            </Form>
-        </Modal>
         <Modal v-model="newPersonalStatus"
                :title="$t('courseManage.classroom.personalClassroomTitle')"
                @on-ok="confirmNewClassroom"
@@ -142,7 +101,6 @@
     import E from 'wangeditor'
     import StudentList from '@/components/coursemgmt/StudentList.vue'
     import '@/utils/Math.uuid'
-    import { setTimeout } from 'core-js'
     export default {
         components: {
             StudentList
@@ -161,6 +119,7 @@
         },
         data() {
             return {
+                tabName:'stus',
                 sysClass: {
                     classroomCode: '',
                     classroomName:''
@@ -168,39 +127,12 @@
                 selectClassStatus: false,
                 showQrStatus: false,
                 joinQRcode: undefined,
-                updated: false,
-                groupNum: 2,
-                groupType: '1',
-                customGroupStatus: false,
                 newPersonalStatus: false,
                 addStudentStatus: false,
-                currentGroup: '',
                 curClassIndex: 0,
                 studentColumn: [],
                 studentTabelLoading: false,
                 selections: [],
-                groupList: [
-                    {
-                        groupCode: 'A',
-                        groupName: '组别别名A'
-                    },
-                    {
-                        groupCode: 'B',
-                        groupName: '组别别名B'
-                    },
-                    {
-                        groupCode: 'C',
-                        groupName: '组别别名C'
-                    },
-                    {
-                        groupCode: 'D',
-                        groupName: '组别别名D'
-                    },
-                    {
-                        groupCode: 'E',
-                        groupName: '组别别名E'
-                    }
-                ],
                 addStudentStatus: false,
                 personalClassroom: {
                     classroomCode: '',
@@ -244,28 +176,6 @@
                     this.newPersonalStatus = true
                 }
             },
-            //保存分组数据
-            saveGroup() {
-                this.studentTabelLoading = true
-                let groups = this.courseInfo.classes[this.curClassIndex].students.map((item) => {
-                    return {
-                        seatNo: item.seatNo,
-                        groupCode: item.groupCode + '',
-                        groupName: item.groupName,
-                        studentId: item.studentId
-                    }
-                })
-                this.courseInfo.classes[this.curClassIndex].groups = groups
-                this.$api.courseMgmt.upsertPlan(this.courseInfo).then(
-                    (res) => {
-                        this.$Message.success('保存成功')
-                        this.studentTabelLoading = false
-                    },
-                    (err) => {
-                        this.studentTabelLoading = false
-                    }
-                )
-            },
             //手动设置组别
             setGroup() {
                 if (this.currentGroup == '') {
@@ -288,103 +198,6 @@
                 }
                 this.updated = true
             },
-            comfirmCustomRules() {
-                if (this.groupNum === 0) {
-                    this.$Message.warning('分组数量不能为0')
-                } else if (this.groupType == 0) {
-                    this.$Message.warning('请设置分组方式')
-                } else {
-                    switch (this.groupType) {
-                        case '1':
-                            this.randomGroup()
-                            break
-                        case '2':
-                            this.orderGroup()
-                            break
-                        case '3':
-                            this.orderGroupS()
-                            break
-                        default:
-                            break
-                    }
-                    this.updated = true
-                }
-            },
-            orderGroupS() {
-                let surplus = this.courseInfo.classes[this.curClassIndex].students.length % this.groupNum// 余数
-                let maxCount = surplus == 0 ? this.courseInfo.classes[this.curClassIndex].students.length / this.groupNum : Math.ceil(this.courseInfo.classes[this.curClassIndex].students.length / this.groupNum)// 每组最大人数
-                this.courseInfo.classes[this.curClassIndex].students = this.courseInfo.classes[this.curClassIndex].students.sort((a, b) => {
-                    a.seatNo > b.seatNo
-                })
-                for (let i = 0; i < maxCount; i++) {
-                    for (let j = 0; j < this.groupNum; j++) {
-                        let startIndex = this.groupNum * i
-                        if (startIndex + j < this.courseInfo.classes[this.curClassIndex].students.length) {
-                            this.courseInfo.classes[this.curClassIndex].students[startIndex + j].groupCode = j + 1
-                            this.courseInfo.classes[this.curClassIndex].students[startIndex + j].groupName = '组别别名' + (j + 1)
-                        } else {
-                            break
-                        }
-                    }
-                }
-            },
-            orderGroup() {
-                let surplus = this.courseInfo.classes[this.curClassIndex].students.length % this.groupNum// 余数
-                let maxCount = surplus == 0 ? this.courseInfo.classes[this.curClassIndex].students.length / this.groupNum : Math.ceil(this.courseInfo.classes[this.curClassIndex].students.length / this.groupNum)// 每组最大人数
-                this.courseInfo.classes[this.curClassIndex].students = this.courseInfo.classes[this.curClassIndex].students.sort((a, b) => {
-                    a.seatNo > b.seatNo
-                })
-                let flag = 0
-                let startIndex = 0
-                for (let i = 0; i < this.groupNum; i++) {
-                    for (let j = 0; j < maxCount; j++) {
-                        if (startIndex + j < this.courseInfo.classes[this.curClassIndex].students.length) {
-                            this.courseInfo.classes[this.curClassIndex].students[startIndex + j].groupCode = i + 1
-                            this.courseInfo.classes[this.curClassIndex].students[startIndex + j].groupName = '组别别名' + (i + 1)
-                        } else {
-                            break
-                        }
-                    }
-                    startIndex += maxCount
-                    flag++
-                    if (flag == surplus) {
-                        maxCount--
-                    }
-                }
-            },
-            randomGroup() {
-                let surplus = this.courseInfo.classes[this.curClassIndex].students.length % this.groupNum// 余数
-                let surplusCount = surplus// 余数
-                let maxCount = surplus == 0 ? this.courseInfo.classes[this.curClassIndex].students.length / this.groupNum : Math.ceil(this.courseInfo.classes[this.curClassIndex].students.length / this.groupNum)// 每组最大人数
-                let record = {}// 记录每个组已经分配的人数
-                for (let i = 1; i <= this.groupNum; i++) {
-                    record[i] = 0
-                }
-                let flag = true
-                for (let index in this.courseInfo.classes[this.curClassIndex].students) {
-                    let groupIndex = this.$jsFn.getBtwRandom(1, this.groupNum)
-                    if (record[groupIndex] < maxCount) {
-                        record[groupIndex] = record[groupIndex] + 1
-                    } else {
-                        for (let key in record) {
-                            if (record[key] < maxCount) {
-                                record[key] = record[key] + 1
-                                groupIndex = key
-                                break
-                            }
-                        }
-                    }
-                    this.courseInfo.classes[this.curClassIndex].students[index].groupCode = groupIndex
-                    this.courseInfo.classes[this.curClassIndex].students[index].groupName = '组别别名' + groupIndex
-                    if (record[groupIndex] == maxCount) {
-                        surplusCount--
-                    }
-                    if (surplusCount <= 0 && surplus > 0 && flag) {
-                        maxCount--
-                        flag = false
-                    }
-                }
-            },
             confirmNewClassroom() {
                 this.personalClassroom['scope'] = 'personal'
                 this.personalClassroom['code'] = this.$store.state.userInfo.TEAMModelId
@@ -487,9 +300,6 @@
             getSelections(selection) {
                 this.selections = selection
             },
-            customGroup() {
-                this.customGroupStatus = true
-            },
             changeClassroom(index) {
                 this.curClassIndex = index
                 if (!this.courseInfo.classes[this.curClassIndex].getStatus) {
@@ -516,19 +326,6 @@
                         key: 'name',
                         align: 'left '
                     },
-                    //{
-                    //    title: this.$t('courseManage.classroom.studentTableC3'),
-                    //    key: 'periodName',
-                    //    width: 150,
-                    //    align: 'center'
-                    //},
-                    //{
-                    //    title: this.$t('courseManage.classroom.studentTableC4'),
-                    //    key: 'gradeName',
-                    //    width: 150,
-                    //    align: 'center',
-                    //    sortable: true
-                    //},
                     {
                         title: this.$t('courseManage.classroom.studentTableC5'),
                         key: 'groupCode',
@@ -546,11 +343,6 @@
             }
         },
         mounted() {
-            //setTimeout(() => {
-            //    if (this.courseInfo.classes.length > 0) {
-            //        this.getClassroomStudent()
-            //    }
-            //}, 1500)
         },
         created() {
             this.initData()

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

@@ -54,15 +54,7 @@
             </div>
         </div>
         <div class="course-info-wrap">
-            <div class="course-detail-header">
-                <span :class="compts === 'CusClass' ? 'setting-label line-bottom line-bottom-active':'setting-label line-bottom'" @click="selectSetting('CusClass')">班级资讯</span>
-                <!--<span :class="compts === 'CusTable' ? 'setting-label line-bottom line-bottom-active':'setting-label line-bottom'" @click="selectSetting('CusTable')">课程表</span>-->
-            </div>
-            <transition name="fade" mode="out-in">
-                <CusInfo ref="cusInfo" v-if="compts === 'CusInfo'" :listType="listType" :coursePlan="planInfo"></CusInfo>
-                <CusClass v-else-if="compts === 'CusClass'" :listType="listType" :courseInfo="planInfo"></CusClass>
-                <CusTable v-else :courseInfo="planInfo"></CusTable>
-            </transition>
+            <CusClass :listType="listType" :courseInfo="planInfo"></CusClass>
         </div>
         <Drawer title="课程信息" class-name="dark-iview-drawer" width="450" :closable="false" v-model="showCusInfo">
             <CusInfo ref="cusInfo" :listType="listType" :coursePlan="planInfo"></CusInfo>