Sfoglia il codice sorgente

优化完善之前的模块

liqk 5 anni fa
parent
commit
0564444634

+ 3 - 2
TEAMModelOS.Service/Models/Core/Classroom.cs

@@ -27,8 +27,9 @@ namespace TEAMModelOS.Service.Models.Core
         public int studentCount { get; set; }
         public string classroomType { get; set; }
         public int status { get; set; } = 1;
-        public string scope { get; set; } 
-    }
+        public string scope { get; set; }
+        public string TEAMModelId { get; set; }
+  }
 }
 public class Point
 {

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

@@ -5,7 +5,7 @@ export default {
   stuName: 'Name',
   classroomCode: 'Classroom code',
   classroomName: 'Classroom name',
-  period: 'School section (Campus)',
+  period: 'Period',
   grade: 'Grade',
   authStatus: 'Authorization status',
   password: 'Password',

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

@@ -5,7 +5,7 @@ export default {
   stuName: '姓名',
   classroomCode: '教室编码',
   classroomName: '教室名称',
-  period: '学段(校区)',
+  period: '学段',
   grade: '年级',
   authStatus: '授权状态',
   password: '密码',

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

@@ -5,7 +5,7 @@ export default {
   stuName: '姓名',
   classroomCode: '教室編碼',
   classroomName: '教室名稱',
-  period: '學段(校區)',
+  period: '學段',
   grade: '學級',
   authStatus: '授權狀態',
   password: '密碼',

+ 180 - 176
TEAMModelOS/ClientApp/src/router/routes.js

@@ -5,185 +5,189 @@ import Main from '@/components/public/main'
 // import { resolve } from 'url'
 
 export const routes = [
-    { path: '*', redirect: '/404' },
-    { name: '404', path: '/404', component: resolve => require(['@/view/404'], resolve) },
-    { name: 'index', path: '', redirect: '/home' },
-    { name: 'selectModule', path: '/selectModule', redirect: '/home' },
-    { name: 'login', path: '/login', component: Login },
-    { name: 'ServerSideLogin', path: '/serverside/login', component: ServerSideLogin },
-    { name: 'smartschooldashboard', path: '/smartschooldashboard', component: resolve => require(['@/view/smartschooldashboard/Index.vue'], resolve) },
-    { name: 'smartclassdashboard', path: '/smartclassdashboard', component: resolve => require(['@/view/smartclassdashboard/Index.vue'], resolve) },
-    { name: 'embedschooldashboard', path: '/embedclassdashboard/:schoolshortcode', component: resolve => require(['@/view/smartclassdashboard/Index.vue'], resolve) }, // IES 呼叫專用
-    { // 共用組件試用
-        path: '/teachermgmt',
-        component: Main,
+  { path: '*', redirect: '/404' },
+  { name: '404', path: '/404', component: resolve => require(['@/view/404'], resolve) },
+  { name: 'index', path: '', redirect: '/home' },
+  { name: 'selectModule', path: '/selectModule', redirect: '/home' },
+  { name: 'login', path: '/login', component: Login },
+  { name: 'ServerSideLogin', path: '/serverside/login', component: ServerSideLogin },
+  { name: 'smartschooldashboard', path: '/smartschooldashboard', component: resolve => require(['@/view/smartschooldashboard/Index.vue'], resolve) },
+  { name: 'smartclassdashboard', path: '/smartclassdashboard', component: resolve => require(['@/view/smartclassdashboard/Index.vue'], resolve) },
+  { name: 'embedschooldashboard', path: '/embedclassdashboard/:schoolshortcode', component: resolve => require(['@/view/smartclassdashboard/Index.vue'], resolve) }, // IES 呼叫專用
+  { // 共用組件試用
+    path: '/teachermgmt',
+    component: Main,
+    children: [
+      {
+        path: '/',
+        component: () => import('@/view/teachermgmt/Index.vue')
+      }
+    ]
+  },
+
+  // 整合功能
+  {
+    name: 'home',
+    path: '/home',
+    redirect: 'totalIndex',
+    component: resolve => require(['@/view/Home'], resolve),
+    children: [
+
+      {
+        name: 'totalIndex',
+        path: '/home',
+        component: resolve => require(['@/view/student-analysis/total-analysis/EvaluationList/EvaluationList.vue'], resolve),
+      },
+      {
+        name: 'total',
+        path: 'total',
+        component: resolve => require(['@/view/student-analysis/total-analysis/index.vue'], resolve),
         children: [
-            {
-                path: '/',
-                component: () => import('@/view/teachermgmt/Index.vue')
-            }
+          {
+            path: '/total',
+            component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/AchievementAnalysis.vue'], resolve)
+          },
+          {
+            path: '/total/evaluationList',
+            component: resolve => require(['@/view/student-analysis/total-analysis/EvaluationList/EvaluationList.vue'], resolve)
+          },
+          {
+            path: '/total/achievement',
+            component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/AchievementAnalysis.vue'], resolve)
+          },
+          {
+            path: '/total/achievement/entryTables',
+            component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/EntryTables.vue'], resolve)
+          },
+          {
+            name: 'earlyWarning',
+            path: '/total/achievement/earlyWarning',
+            component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/EarlyWarning.vue'], resolve)
+          },
+          {
+            path: '/total/scatter',
+            component: resolve => require(['@/view/student-analysis/total-analysis/ScatterAnalysis/ScatterAnalysis.vue'], resolve)
+          },
+          {
+            path: '/total/knowledge',
+            component: resolve => require(['@/view/student-analysis/total-analysis/KnowledgeAnalysis/KnowledgeAnalysis.vue'], resolve)
+          },
+          {
+            path: '/total/knowledge/details',
+            component: resolve => require(['@/view/student-analysis/total-analysis/KnowledgeAnalysis/ScoreDetails.vue'], resolve)
+          },
+          {
+            path: '/total/test',
+            component: resolve => require(['@/view/student-analysis/total-analysis/TestAnalysis/TestAnalysis.vue'], resolve)
+          },
+          {
+            path: '/total/questionList',
+            component: resolve => require(['@/view/student-analysis/total-analysis/TestAnalysis/QuestionList.vue'], resolve)
+          }
         ]
-    },
-    
-    // 学生账号管理
-    {
-        path: '/studentAccount',
+      },
+      //{
+      //  name: 'schoolIndex',
+      //  path: 'school',
+      //  component: resolve => require(['@/view/school-mgmt/Index.vue'], resolve),
+      //  children: [
+      //    {
+      //      name: 'school',
+      //      path: 'school',
+      //      redirect: 'system'
+      //    },
+      //    {
+      //      name: 'system',
+      //      path: 'system',
+      //      component: resolve => require(['@/view/school-mgmt/SystemSetting/SystemSetting.vue'], resolve)
+      //    },
+      //    {
+      //      name: 'classroom',
+      //      path: 'classroom',
+      //      component: resolve => require(['@/view/school-mgmt/ClassroomSetting/ClassroomSetting.vue'], resolve)
+      //    }
+      //  ]
+      //},
+      {
+        name: 'system',
+        path: 'system',
+        component: resolve => require(['@/view/school-mgmt/SystemSetting/SystemSetting.vue'], resolve)
+      },
+      {
+        name: 'classroom',
+        path: 'classroom',
+        component: resolve => require(['@/view/school-mgmt/ClassroomSetting/ClassroomSetting.vue'], resolve)
+      },
+      {
+        name: 'studentAccount',
+        path: 'studentAccount',
         component: resolve => require(['@/view/student-account/Index.vue'], resolve)
-    },
-
-    // 整合功能
-    {
-        name: 'home',
-        path: '/home',
-        redirect: 'totalIndex',
-        component: resolve => require(['@/view/Home'], resolve),
+      },
+      {
+        path: 'evaluation',
+        name: 'evaluation',
+        redirect: '/home/evaluation/createTest',
+        component: resolve => require(['@/view/evaluation/index/index.vue'], resolve),
         children: [
-
-            {
-                name: 'totalIndex',
-                path: '/home',
-                component: resolve => require(['@/view/student-analysis/total-analysis/EvaluationList/EvaluationList.vue'], resolve),
-            },
-            {
-                name: 'total',
-                path: 'total',
-                component: resolve => require(['@/view/student-analysis/total-analysis/index.vue'], resolve),
-                children: [
-                    {
-                        path: '/total',
-                        component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/AchievementAnalysis.vue'], resolve)
-                    },
-                    {
-                        path: '/total/evaluationList',
-                        component: resolve => require(['@/view/student-analysis/total-analysis/EvaluationList/EvaluationList.vue'], resolve)
-                    },
-                    {
-                        path: '/total/achievement',
-                        component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/AchievementAnalysis.vue'], resolve)
-                    },
-                    {
-                        path: '/total/achievement/entryTables',
-                        component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/EntryTables.vue'], resolve)
-                    },
-                    {
-                        name: 'earlyWarning',
-                        path: '/total/achievement/earlyWarning',
-                        component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/EarlyWarning.vue'], resolve)
-                    },
-                    {
-                        path: '/total/scatter',
-                        component: resolve => require(['@/view/student-analysis/total-analysis/ScatterAnalysis/ScatterAnalysis.vue'], resolve)
-                    },
-                    {
-                        path: '/total/knowledge',
-                        component: resolve => require(['@/view/student-analysis/total-analysis/KnowledgeAnalysis/KnowledgeAnalysis.vue'], resolve)
-                    },
-                    {
-                        path: '/total/knowledge/details',
-                        component: resolve => require(['@/view/student-analysis/total-analysis/KnowledgeAnalysis/ScoreDetails.vue'], resolve)
-                    },
-                    {
-                        path: '/total/test',
-                        component: resolve => require(['@/view/student-analysis/total-analysis/TestAnalysis/TestAnalysis.vue'], resolve)
-                    },
-                    {
-                        path: '/total/questionList',
-                        component: resolve => require(['@/view/student-analysis/total-analysis/TestAnalysis/QuestionList.vue'], resolve)
-                    }
-                ]
-            },
-            {
-                name: 'schoolIndex',
-                path: 'school',
-                component: resolve => require(['@/view/school-mgmt/Index.vue'], resolve),
-                children: [
-                    {
-                        name: 'school',
-                        path: 'school',
-                        redirect: 'system'
-                    },
-                    {
-                        name: 'system',
-                        path: 'system',
-                        component: resolve => require(['@/view/school-mgmt/SystemSetting/SystemSetting.vue'], resolve)
-                    },
-                    {
-                        name: 'classroom',
-                        path: 'classroom',
-                        component: resolve => require(['@/view/school-mgmt/ClassroomSetting/ClassroomSetting.vue'], resolve)
-                    }
-                ]
-            },
-            {
-                name: 'studentAccount',
-                path: 'studentAccount',
-                component: resolve => require(['@/view/student-account/Index.vue'], resolve)
-            },
-            {
-                path: 'evaluation',
-                name: 'evaluation',
-                redirect: '/home/evaluation/createTest',
-                component: resolve => require(['@/view/evaluation/index/index.vue'], resolve),
-                children: [
-                    {
-                        path: 'createExercises',
-                        name: 'createExercises',
-                        component: resolve => require(['@/view/evaluation/index/CreateExercises.vue'], resolve)
-                    },
-                    {
-                        path: 'exercisesList',
-                        name: 'exercisesList',
-                        component: resolve => require(['@/view/evaluation/index/ExercisesList.vue'], resolve)
-                    },
-                    {
-                        path: 'testPaper',
-                        name: 'testPaper',
-                        component: resolve => require(['@/view/evaluation/index/TestPaper.vue'], resolve)
-                    },
-                    {
-                        path: 'createTest',
-                        name: 'createTest',
-                        component: resolve => require(['@/view/evaluation/index/CreateTest.vue'], resolve)
-                    },
-                    {
-                        path: 'testPaperList',
-                        name: 'testPaperList',
-                        component: resolve => require(['@/view/evaluation/index/TestPaperList.vue'], resolve)
-                    },
-                    {
-                        path: 'createCompose',
-                        name: 'createCompose',
-                        component: resolve => require(['@/view/evaluation/index/CreateCompose.vue'], resolve)
-                    },
-                    {
-                        path: 'editChild',
-                        name: 'editChild',
-                        component: resolve => require(['@/view/evaluation/index/EditChild.vue'], resolve)
-                    }
-                ]
-            },
-            {
-                path: 'courseManage',
-                name: 'courseManage',
-                component: resolve => require(['@/view/coursemgmt/CourseManage.vue'], resolve)
-            },
-            // 新课纲管理
-            {
-                path: 'syllabus',
-                name: 'syllabus',
-                component: resolve => require(['@/view/syllabus/newSyllabus/Index.vue'], resolve)
-            },
-            {
-                path: 'teachcontent',
-                name: 'teachcontent',
-                component: resolve => require(['@/view/teachcontent/index.vue'], resolve)
-            },
-            // 知识点管理
-            {
-                path: 'knowledge',
-                name: 'knowledge',
-                component: resolve => require(['@/view/knowledge-point/index/Index.vue'], resolve)
-            }
+          {
+            path: 'createExercises',
+            name: 'createExercises',
+            component: resolve => require(['@/view/evaluation/index/CreateExercises.vue'], resolve)
+          },
+          {
+            path: 'exercisesList',
+            name: 'exercisesList',
+            component: resolve => require(['@/view/evaluation/index/ExercisesList.vue'], resolve)
+          },
+          {
+            path: 'testPaper',
+            name: 'testPaper',
+            component: resolve => require(['@/view/evaluation/index/TestPaper.vue'], resolve)
+          },
+          {
+            path: 'createTest',
+            name: 'createTest',
+            component: resolve => require(['@/view/evaluation/index/CreateTest.vue'], resolve)
+          },
+          {
+            path: 'testPaperList',
+            name: 'testPaperList',
+            component: resolve => require(['@/view/evaluation/index/TestPaperList.vue'], resolve)
+          },
+          {
+            path: 'createCompose',
+            name: 'createCompose',
+            component: resolve => require(['@/view/evaluation/index/CreateCompose.vue'], resolve)
+          },
+          {
+            path: 'editChild',
+            name: 'editChild',
+            component: resolve => require(['@/view/evaluation/index/EditChild.vue'], resolve)
+          }
         ]
-    }
+      },
+      {
+        path: 'courseManage',
+        name: 'courseManage',
+        component: resolve => require(['@/view/coursemgmt/CourseManage.vue'], resolve)
+      },
+      // 新课纲管理
+      {
+        path: 'syllabus',
+        name: 'syllabus',
+        component: resolve => require(['@/view/syllabus/newSyllabus/Index.vue'], resolve)
+      },
+      {
+        path: 'teachcontent',
+        name: 'teachcontent',
+        component: resolve => require(['@/view/teachcontent/index.vue'], resolve)
+      },
+      // 知识点管理
+      {
+        path: 'knowledge',
+        name: 'knowledge',
+        component: resolve => require(['@/view/knowledge-point/index/Index.vue'], resolve)
+      }
+    ]
+  }
 ]

+ 2 - 1
TEAMModelOS/ClientApp/src/store/module/schoolBaseInfo.js

@@ -74,7 +74,8 @@ export default {
           if (context.state.classroomList == undefined) {
             apiTools.schoolSetting.findClassInfo({
               schoolCode: context.state.demoLoginInfo.schoolCode,
-              status: 1
+              status: 1,
+              scope: 'school'
             }).then(
               res => {
                 if (res.error == null) {

+ 16 - 4
TEAMModelOS/ClientApp/src/utils/js-fn.js

@@ -52,12 +52,24 @@ function getBtwRandom(start, end) {
  * 根据学段编码获取对应Name
  */
 function getPeriod(data, periodCode) {
-  let result = JSONPath.query(data, "$..[?(@.periodCode=='" + periodCode + "')]")
-  if (result.length == 0) {
-    return {}
+  if (data == undefined) {
+    return {
+      periodName: '暂无数据',
+      periodCode: '00',
+      grades: [],
+      subjects:[]
+    }
   } else {
-    return result[0]
+    let result = JSONPath.query(data, "$..[?(@.periodCode=='" + periodCode + "')]")
+    if (result.length == 0) {
+      return {
+        periodName: '暂无数据'
+      }
+    } else {
+      return result[0]
+    }
   }
+  
 }
 /*
  * 根据年级编码获取对应Name

+ 9 - 9
TEAMModelOS/ClientApp/src/view/Home.vue

@@ -42,15 +42,15 @@
                 <MenuItem name="0-1" to="/home">学情分析仪表盘<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
             </Submenu>
             <Submenu name="1">
-                <template slot="title">
-                    <Icon type="ios-paper" size="18" />
-                    <span class="first-menu">智慧校园管理</span>
-                </template>
-                <MenuItem name="1-1" to="/home/school/system">智慧校园基础数据<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
-                <MenuItem name="1-2" to="/home/studentAccount">学生账号管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
-                <MenuItem name="1-3" to="/home/404">教师账号管理</MenuItem>
-                <MenuItem name="1-4" to="/home/school/classroom">班级管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
-                <MenuItem name="1-5" to="/home/404">软件及授权项目管理</MenuItem>
+              <template slot="title">
+                <Icon type="ios-paper" size="18" />
+                <span class="first-menu">智慧校园管理</span>
+              </template>
+              <MenuItem name="1-1" to="/home/system">校园基础数据<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
+              <MenuItem name="1-4" to="/home/classroom">班级教室管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
+              <MenuItem name="1-2" to="/home/studentAccount">学生账号管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
+              <MenuItem name="1-3" to="/home/404">教师账号管理</MenuItem>
+              <MenuItem name="1-5" to="/home/404">软件及授权管理</MenuItem>
             </Submenu>
             <Submenu name="2">
                 <template slot="title">

+ 39 - 44
TEAMModelOS/ClientApp/src/view/coursemgmt/CourseClassroom.vue

@@ -44,7 +44,7 @@
               <Option v-for="(item,index) in periodList" :value="item.periodCode" :key="index" @click.native="getGradeList(index)">{{ item.periodName }}</Option>
             </Select>
             <Select v-model="searchGrade" style="width:20%;margin-left:1%;" :placeholder="$t('stuAccount.gradeHolder')" clearable>
-              <Option v-for="(item,index) in gradeList" :value="item.gradeCode" :key="index" @click.native="getClassroomList(index)">{{ item.gradeName }}</Option>
+              <Option v-for="(item,index) in gradeList" :value="item.gradeCode" :key="index">{{ item.gradeName }}</Option>
             </Select>
           </div>
           <Table :columns="systemColumns" :data="systemClassroomList" class="system-classroom-table">
@@ -75,7 +75,9 @@
                 </div>
                 <div class="classroom-info-item" v-show="courseClassroomList[currentClassroomIndex].scope == 'school'">
                   <p class="classroom-attr-label">教室属性</p>
-                  <p class="classroom-attr-value">{{courseClassroomList[currentClassroomIndex].periodName}} / {{courseClassroomList[currentClassroomIndex].gradeName}}</p>
+                  <p class="classroom-attr-value">
+                    {{fn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo,courseClassroomList[currentClassroomIndex].periodCode).periodName }} / {{fn.getGradeName($store.state.schoolBaseInfo.schoolBaseInfo,courseClassroomList[currentClassroomIndex].gradeCode)}}
+                  </p>
                 </div>
                 <div class="classroom-info-item">
                   <p class="classroom-attr-label" v-show="courseClassroomList[currentClassroomIndex].scope == 'school'">教室类型</p>
@@ -182,6 +184,7 @@
     },
     data() {
       return {
+        fn,
         joinQRcode: undefined,
         personalClassroom: {
           classroomCode:'',
@@ -452,6 +455,7 @@
         } else {
           this.joinQRcode = undefined
         }
+        this.initEditor()
       },
       selectClassroom(index) {
         this.selectSystemStatus = 0
@@ -475,6 +479,7 @@
       },
       confirmNewClassroom() {
         this.personalClassroom['scope'] = 'personal'
+        this.personalClassroom['TEAMModelId'] = 'habook#0001'
         this.personalClassroom['schoolCode'] = 'HBCN'
         this.personalClassroom['headMaster'] = 'HABOOK(测试名字)'
         this.$api.schoolSetting.classroomSettingSaveOrUpdate(this.personalClassroom).then(
@@ -634,23 +639,37 @@
         this.customGroupStatus = true
       },
       getClassroomList() {
-        if (this.$store.state.schoolBaseInfo.classroomList == undefined) {
-          this.$store.dispatch('schoolBaseInfo/getClassroom').then(
-            (res) => {
-              console.log(res)
-              if (res.code == 1 || res.code == 3) {
-                this.systemClassroomList = this.$store.state.schoolBaseInfo.classroomList
-              }
-              console.log(this.$store.state.schoolBaseInfo.classroomList)
-            },
-            (err) => {
-              console.log(err)
+        this.$store.dispatch('schoolBaseInfo/getClassroom').then(
+          (res) => {
+            console.log(res)
+            if (res.code == 1 || res.code == 3) {
+              this.systemClassroomList.push(...this.$store.state.schoolBaseInfo.classroomList)
             }
-          )
-        } else {
-          this.systemClassroomList = this.$store.state.schoolBaseInfo.classroomList
+          },
+          (err) => {
+            console.log(err)
+          }
+        )  
+
+      },
+      getPersonalClassroom() {
+        let requestData = {
+          scope: 'personal',
+          schoolCode: 'HBCN',
+          TEAMModelId:'habook#0001'
         }
-        console.log(this.classroomList)
+        this.$api.schoolSetting.findClassInfo(requestData).then(
+          res => {
+            if (res.error == null) {
+              this.systemClassroomList.push(...res.result.data)
+            } else {
+              alert('API error!')
+            }
+          },
+          err => {
+            alert('API error!')
+          }
+        )
       },
       addClassroom(value) {
         if (value == 1) {
@@ -709,41 +728,17 @@
             text: url   // 设置二维码内容或跳转地址
           })
           this.joinQRcode = qrcode
-        });
-        //setTimeout(() => {
-        //  let qrcode = new QRCode('qrcode', {
-        //    width: 200, // 设置宽度,单位像素
-        //    height: 200, // 设置高度,单位像素
-        //    text: url   // 设置二维码内容或跳转地址
-        //  })
-        //  this.joinQRcode = qrcode
-        //}, 100)
+        })
       }
     },
     mounted() {
+      this.initEditor()
     },
     created() {
       this.getClassroomList()
+      this.getPersonalClassroom()
     },
     watch: {
-      courseClassroomList: {
-        handler(val, oldVal) {
-          if (val.length > 0) {
-            this.initEditor()
-            if (this.courseClassroomList[this.currentClassroomIndex].scope == 'personal') {
-              if (this.joinQRcode == undefined) {
-                this.createQRCode('https://account.habookaclass.biz/')
-              } else {
-                this.joinQRcode.clear()
-                this.joinQRcode.makeCode('http://www.baidu.com')
-              }
-            } else {
-              this.joinQRcode = undefined
-            }
-          }
-        },
-        deep: true
-      }
     },
     computed: {
       courseInfo: {

+ 4 - 0
TEAMModelOS/ClientApp/src/view/coursemgmt/CourseManage.vue

@@ -60,6 +60,7 @@
     data() {
       return {
         fn,
+        courseListShow:[],
         currentSettingIndex: 0,
         addCourseStatus: false,
         demoLoginInfo: {
@@ -329,4 +330,7 @@
   .add-course-modal .ivu-modal-body {
     padding: 16px 30px;
   }
+  .course-list-header .ivu-input {
+    color: white;
+  }
 </style>

+ 1 - 1
TEAMModelOS/ClientApp/src/view/school-mgmt/ClassroomSetting/ClassroomSetting.less

@@ -10,7 +10,7 @@
 .container-box{
     height:100%;
 }
-.position-full-height(@top:80px) {
+.position-full-height(@top:0px) {
     position: absolute;
     top: @top;
     bottom: 0px;

+ 20 - 35
TEAMModelOS/ClientApp/src/view/school-mgmt/ClassroomSetting/ClassroomSetting.vue

@@ -112,7 +112,6 @@
                 </p>
               </div>
               <div class="class-list-item-tool">
-                <!--<Icon type="ios-copy" title="复制" />-->
                 <Icon type="md-trash" :title="$t('schoolBaseInfo.delete')" @click.stop="delClassroom(index)" />
               </div>
             </div>
@@ -132,11 +131,11 @@
             <Input v-model="classroomList[currentClassroomIndex].headMaster" clearable :placeholder="$t('schoolBaseInfo.headmasterHolder')" />
             <span class="class-attr-wrap-label">{{$t('schoolBaseInfo.setPeriod')}}</span>
             <Select v-model="classroomList[currentClassroomIndex].periodCode" clearable>
-              <Option v-for="(item,index) in periodList" :value="item.periodCode" :key="index" @click.native="currentPIndex = index">{{ item.periodName }}</Option>
+              <Option v-for="(item,index) in periodList" :value="item.periodCode" :key="index">{{ item.periodName }}</Option>
             </Select>
             <span class="class-attr-wrap-label">{{$t('schoolBaseInfo.setGrade')}}</span>
             <Select v-model="classroomList[currentClassroomIndex].gradeCode" clearable>
-              <Option v-for="(item,index) in periodList[currentPIndex].grades" :value="item.gradeCode" :key="index">{{ item.gradeName }}</Option>
+              <Option v-for="(item,index) in fn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo,classroomList[currentClassroomIndex].periodCode).grades" :value="item.gradeCode" :key="index">{{ item.gradeName }}</Option>
             </Select>
             <span class="class-attr-wrap-label">{{$t('schoolBaseInfo.setHiteachCode')}}</span>
             <Input v-model="classroomList[currentClassroomIndex].hiteach" disabled :placeholder="$t('schoolBaseInfo.hiTeachHolder')" clearable />
@@ -148,7 +147,7 @@
                 {{$t('schoolBaseInfo.hiteachList')}}
                 <Icon style="float:right;margin-right:12px;margin-top:2px;cursor:pointer;" class="label-icon" color="white" type="md-add" @click="addHiTeachCode" />
               </p>
-              <Input v-model="serchCode" :placeholder="$t('schoolBaseInfo.codeHolder')" style="width: 100%;height:30px;" @on-change="filterCode">
+              <Input clearable v-model="serchCode" :placeholder="$t('schoolBaseInfo.codeHolder')" style="width: 100%;height:30px;" @on-change="filterCode">
               <Icon style="margin-top:0px;" type="ios-search" slot="suffix" />
               </Input>
             </div>
@@ -181,7 +180,7 @@
         </div>
         <!--<h1>未上传平面图</h1>-->
         <div class="school-plan-box" id="school-plan-box">
-          <canvas id="school-plan" style="" @mousedown="canvasMouseDown" @mousemove="canvasMouseMove" @mouseup="canvasMouseUp" @mouseout="canvasMouseOut">
+          <canvas id="school-plan" style="cursor:move;" @mousedown="canvasMouseDown" @mousemove="canvasMouseMove" @mouseup="canvasMouseUp" @mouseout="canvasMouseOut">
             {{$t('schoolBaseInfo.suportCanvas')}}
           </canvas>
         </div>
@@ -207,10 +206,11 @@
 </template>
 
 <script>
+  import fn from '@/utils/js-fn.js'
   export default {
     data() {
       return {
-        currentPIndex: 0,
+        fn,
         demoLoginInfo: {
           user: 'admin',
           TEAMModelId: 'habook#0001',
@@ -437,11 +437,10 @@
         this.initIcon()
       },
       filterCode() {
-        let _this = this
         if (this.serchCode == '') {
           this.hiTeachsShow = [...this.hiTeachs]
         } else {
-          this.hiTeachsShow = this.hiTeachs.filter(item => item.code.indexOf(_this.serchCode) != -1)
+          this.hiTeachsShow = this.hiTeachs.filter(item => item.code.indexOf(this.serchCode) != -1)
         }
       },
       filterClassname() {
@@ -558,10 +557,9 @@
         let _this = this
         if (_this.isFirstDraw <= 0) {
           let image = new Image()
-          // image.src = require('../../../assets/image/school_plan.jpg');
-          image.src = 'https://teammodelstorage.blob.core.chinacloudapi.cn/teammodelos/test/school_plan.jpg'
-          // image.src = imgUrl;
           image.crossOrigin = 'anonymous'
+           //image.src = require('../../../assets/image/school_plan.jpg');
+          image.src = 'https://teammodelstorage.blob.core.chinacloudapi.cn/teammodelos/test/school_plan.jpg'
           image.onload = function () {
             _this.schoolPlan.width = image.width
             _this.schoolPlan.height = image.height
@@ -580,16 +578,6 @@
                 imgData.data[i + 2] = 255
                 imgData.data[i + 3] = 255
               }
-              // if (r == 255 && g == 255 && b == 255) {
-              //  imgData.data[i + 3] = 0;
-              //  imgData.data[i + 1] = 0;
-              //  imgData.data[i + 2] = 0;
-              // } else {
-              //  imgData.data[i] = 255 - r;
-              //  imgData.data[i + 1] = 255 - g;
-              //  imgData.data[i + 2] = 255 - b;
-              //  imgData.data[i + 3] = 255;
-              // }
             }
             context.putImageData(imgData, 0, 0)
             let PNGImg = new Image()
@@ -617,6 +605,7 @@
       },
       saveClassroom() {
         this.classroomList[this.currentClassroomIndex]['schoolCode'] = this.demoLoginInfo.schoolCode
+        this.classroomList[this.currentClassroomIndex]['scope'] = 'school'
         this.$api.schoolSetting.classroomSettingSaveOrUpdate(this.classroomList[this.currentClassroomIndex]).then(res => {
           if (res.error == null) {
             this.$Message.success(this.$t('schoolBaseInfo.csTips3'))
@@ -641,19 +630,19 @@
         )
         //将访问API的操作封装到vuex的action
         //this.$api.schoolSetting.findClassInfo({
-        //    schoolCode: this.demoLoginInfo.schoolCode,
-        //    status: 1
+        //  schoolCode: this.demoLoginInfo.schoolCode,
+        //  status: 1,
+        //  scope: 'school'
         //}).then(res => {
-        //    if (res.error == null) {
-        //        if (res.result.data.length > 0) {
-        //            this.classroomList = res.result.data
-        //            this.filterClassname()
-        //        }
+        //  if (res.error == null) {
+        //    if (res.result.data.length > 0) {
+        //      this.classroomList = res.result.data
+        //      this.filterClassname()
         //    }
+        //  }
         //})
       },
       delClassroom(index) {
-        // if (this.classroomList.length > 1) {
         this.classroomListShow[this.currentClassroomIndex].status = 0
         this.$api.schoolSetting.classroomSettingSaveOrUpdate(this.classroomListShow[this.currentClassroomIndex]).then(res => {
           if (res.error == null) {
@@ -666,10 +655,6 @@
             }
           }
         })
-
-        // } else {
-        //    this.$Message.warning(this.$t('schoolBaseInfo.csTips4'))
-        // }
       },
       uploadSchoolPlan(res, file) {
         this.$Message.success(this.$t('schoolBaseInfo.csTips5'))
@@ -756,7 +741,6 @@
           _this.whiteImageData = white
           _this.drawSchoolPlan()
           _this.bundleScoll()
-          // _this.initIcon()
         }
         pink.onload = function () {
           _this.pinImageData = pink
@@ -797,6 +781,7 @@
     mounted() {
       this.filterClassname()
       this.filterCode()
+      this.initData()
     },
     beforeRouteLeave(to, from, next) {
       if (this.updated) {
@@ -837,7 +822,7 @@
     },
     created() {
       this.getClassroom()
-      this.initData()
+
     }
   }
 </script>

+ 1 - 1
TEAMModelOS/ClientApp/src/view/school-mgmt/SystemSetting/SystemSetting.less

@@ -46,7 +46,7 @@
     &-body {
         .fl-row-center;
         position: absolute;
-        top: 140px;
+        top: 60px;
         bottom: 0;
         width: 100%;
         user-select: none !important;

+ 39 - 16
TEAMModelOS/ClientApp/src/view/student-account/Index.vue

@@ -9,15 +9,16 @@
   <div class="sc-container">
     <div class="sc-menu">
       <div class="sc-menu-left">
-        <Input v-model="searchText" clearable :placeholder="$t('stuAccount.searchHolder')" style="width: 28%;margin-left:20px;" :search="true" @on-enter="searchData" @on-search="searchData" @on-clear="searchData">
+        <Input v-model="searchText" clearable :placeholder="$t('stuAccount.searchHolder')" style="width: 28%;margin-left:20px;" :search="true" @on-enter="searchData" @on-change="searchData" @on-clear="searchData">
         </Input>
-        <Select v-model="searchPeriod" style="width:20%;margin-left:5%;" :placeholder="$t('stuAccount.periodHolder')" clearable>
+        <Select v-model="searchPeriod" style="width:20%;margin-left:5%;" :placeholder="$t('stuAccount.periodHolder')" clearable @on-change="filterStudentInfo">
           <Option v-for="(item,index) in schoolData.period" :value="item.periodCode" :key="index" @click.native="getGradeList(index)">{{ item.periodName }}</Option>
         </Select>
-        <Select v-model="searchGrade" style="width:20%;margin-left:1%;" :placeholder="$t('stuAccount.gradeHolder')" clearable>
-          <Option v-for="(item,index) in gradeList" :value="item.gradeCode" :key="index" @click.native="getClassroomList(index)">{{ item.gradeName }}</Option>
+        <Select v-model="searchGrade" style="width:20%;margin-left:1%;" :placeholder="$t('stuAccount.gradeHolder')" clearable @on-change="filterStudentInfo">
+          <!--<Option v-for="(item,index) in gradeList" :value="item.gradeCode" :key="index" @click.native="getClassroomList(index)">{{ item.gradeName }}</Option>-->
+          <Option v-for="(item,index) in fn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo,searchPeriod).grades" :value="item.gradeCode" :key="index">{{ item.gradeName }}</Option>
         </Select>
-        <Select v-model="searchClassroom" ref="classroom" style="width:20%;margin-left:1%;" :placeholder="$t('stuAccount.classroomHolder')" clearable>
+        <Select v-model="searchClassroom" ref="classroom" style="width:20%;margin-left:1%;" :placeholder="$t('stuAccount.classroomHolder')" clearable @on-change="filterStudentInfo">
           <Option v-for="(item,index) in classroomShowList" :value="item.classroomCode" :key="index">{{ item.classroomName }}</Option>
         </Select>
       </div>
@@ -47,7 +48,7 @@
       </div>
     </div>
     <div class="sc-content" style="position:relative">
-        <Table ref="selection" :columns="tableColumns" :data="tablePageData" height="750" :loading="tableLoading" @on-select="getSelectInfo" @on-select-cancel="getSelectInfo" @on-select-all="getSelectInfo" @on-select-all-cancel="cancelAll">
+        <Table ref="selection" :columns="tableColumns" :data="tablePageData" height="730" :loading="tableLoading" @on-select="getSelectInfo" @on-select-cancel="getSelectInfo" @on-select-all="getSelectInfo" @on-select-all-cancel="cancelAll">
             <template slot-scope="{ row,index }" slot="status">
                 <Icon v-if="index%3 == 1" type="md-checkmark-circle-outline" size="18" color="#1CD0A1" />
                 <span v-else>—</span>
@@ -71,7 +72,7 @@
                 </div>
             </template>
         </Table>
-      <Page :total="tableShowData.length" size="small" :page-size="pageSize" show-total style="margin-top:15px;" :current.sync="currentPage" @on-change="getPageData" />
+      <Page :total="tableShowData.length" size="small" :page-size="pageSize" show-total style="margin-top:15px;float:right;color:white;margin-right:20px;" :current.sync="currentPage" @on-change="getPageData" />
       <authorization :isShow="authorizationStatus" @closeAuth="closeAuth"></authorization>
     </div>
 
@@ -92,6 +93,7 @@
 </template>
 
 <script>
+  import fn from '@/utils/js-fn.js'
   import AddStudent from './add-student/AddStudent'
   import ImportStudent from './add-student/ImportStudent'
   import Authorization from './add-student/Authorization'
@@ -103,6 +105,7 @@
     },
     data() {
       return {
+        fn,
         classroomList: [],
         classroomShowList: [],
         gradeList: [],
@@ -114,7 +117,7 @@
         searchText: '',
         currentPage: 1,
         pageSize: 30,
-        bizType: 0,
+        bizType: 0,//0:新增 1:修改
         editStudentInfo: [],
         selections: [],
         selectRow: {},
@@ -127,8 +130,6 @@
           school: '醍摩豆书院',
           schoolCode: 'HBCN'
         },
-        model: '',
-        list: [],
         tableData: [],
         tableShowData: [],
         tablePageData: [],
@@ -164,7 +165,31 @@
       },
       searchData() {
         this.tableLoading = true
-        this.tableShowData = this.tableData.filter(item => item.studentId.indexOf(this.searchText) != -1)
+        this.tableShowData = this.tableData.filter(item => JSON.stringify(item).indexOf(this.searchText) != -1)
+        this.currentPage = 1
+        this.getPageData()
+        this.tableLoading = false
+      },
+      filterStudentInfo() {
+        let grade = ''
+        if (this.searchPeriod == undefined) {
+          this.searchPeriod = ''
+        }
+        if (this.searchGrade == undefined || this.searchGrade == '') {
+          this.grade = ''
+        } else {
+          grade = '"gradeCode":' + '"'+this.searchGrade+'"'
+        }
+        console.log(JSON.stringify(this.tableData[0]))
+        if (this.searchClassroom == undefined) {
+          this.searchClassroom = ''
+        }
+        this.tableLoading = true
+        this.tableShowData = this.tableData.filter(
+          item => {
+            return JSON.stringify(item).indexOf(this.searchPeriod) !== -1 && JSON.stringify(item).indexOf(grade) !== -1 && JSON.stringify(item).indexOf(this.searchClassroom) !== -1
+          }
+        )
         this.currentPage = 1
         this.getPageData()
         this.tableLoading = false
@@ -212,8 +237,6 @@
         this.addStudentStatus = false
       },
       closeImportStudent(data) {
-        // this.tableData.push(...(data.data));
-        // [...this.tableShowData] = this.tableData;
         this.findStudentInfo()
         this.importStudentStatus = false
       },
@@ -300,7 +323,8 @@
       },
       getClassroom() {
         this.$api.schoolSetting.findClassInfo({
-          schoolCode: this.demoLoginInfo.schoolCode
+          schoolCode: this.demoLoginInfo.schoolCode,
+          scope:'school'
         }).then(res => {
           if (res.error == null) {
             if (res.result.data.length > 0) {
@@ -389,8 +413,7 @@
               }
               [...this.tableShowData] = this.tableData
               this.getPageData()
-                this.$forceUpdate()
-                console.log(this.tableData)
+              this.$forceUpdate()
               this.tableLoading = false
             } else {
               alert('API error!')

+ 35 - 31
TEAMModelOS/ClientApp/src/view/student-account/add-student/AddStudent.vue

@@ -90,10 +90,12 @@
         <span style="float:right;color:#6DE2C4;cursor:pointer;text-decoration:underline;" @click="createClassroom">{{$t('stuAccount.newClassroom')}}</span>
       </FormItem>
       <FormItem :label="$t('stuAccount.periodInfo')" prop="periodCode">
-          <span style="color:white;margin-left:15px;">{{studentInfo.classroom.periodName == "" ? "— —" : studentInfo.classroom.periodName}}</span>
+          <!--<span style="color:white;margin-left:15px;">{{studentInfo.classroom.periodName == "" ? "— —" : studentInfo.classroom.periodName}}</span>-->
+        <span style="color:white;margin-left:15px;">{{fn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo,studentInfo.classroom.periodCode).periodName}}</span>
       </FormItem>
       <FormItem :label="$t('stuAccount.gradeInfo')" prop="gradeCode">
-          <span style="color:white;margin-left:15px;">{{studentInfo.classroom.gradeName == "" ? "— —" : studentInfo.classroom.gradeName}}</span>
+          <!--<span style="color:white;margin-left:15px;">{{studentInfo.classroom.gradeName == "" ? "— —" : studentInfo.classroom.gradeName}}</span>-->
+        <span style="color:white;margin-left:15px;">{{fn.getGradeName($store.state.schoolBaseInfo.schoolBaseInfo,studentInfo.classroom.gradeCode)}}</span>
       </FormItem>
     </Form>
     <!--修改信息表单-->
@@ -140,6 +142,7 @@
   </div>
 </template>
 <script>
+  import fn from '@/utils/js-fn.js'
   export default {
     props: {
       isShow: {
@@ -161,28 +164,29 @@
     },
     data() {
       return {
-          test: true,
-          showError: false,
-          isFull: false,
-          classroomList: [],
-          same: '',
-          list: [],
-          studentInfo: {
-              name: '',
-              studentId: '',
-              seatNo: null,
-              classroom: {
-                  classroomName: '',
-                  classroomCode: '',
-                  periodCode: '',
-                  periodName: '',
-                  gradeName: '',
-                  gradeCode: ''
-              },
-              password: {
-                  value: ''
-              }
+        fn,
+        test: true,
+        showError: false,
+        isFull: false,
+        classroomList: [],
+        same: '',
+        list: [],
+        studentInfo: {
+          name: '',
+          studentId: '',
+          seatNo: null,
+          classroom: {
+            classroomName: '',
+            classroomCode: '',
+            periodCode: '',
+            periodName: '',
+            gradeName: '',
+            gradeCode: ''
           },
+          password: {
+            value: ''
+          }
+        },
         ruleValidate: {
           studentId: [
             { required: true, message: '账号不能为空', trigger: 'blur' }
@@ -190,8 +194,8 @@
           'password.value': [
             { required: true, message: '密码不能为空', trigger: 'blur' }
           ],
-            classroom: [
-                { required: true, message: '教室资讯不能为空', trigger: 'blur', type: 'object' }
+          classroom: [
+            { required: true, message: '教室资讯不能为空', trigger: 'blur', type: 'object' }
           ],
           name: [
             { required: true, message: '学生姓名不能为空', trigger: 'blur' }
@@ -247,8 +251,8 @@
         }
       },
       getCurrentClassroom(index) {
-          if (this.bizType == 1) {
-            this.studentInfo.classroom = this.classroomList[index]
+        if (this.bizType == 1) {
+          this.studentInfo.classroom = this.classroomList[index]
           // this.studentInfo.periodCode = this.classroomList[index].period;
           // this.studentInfo.gradeCode = this.classroomList[index].grade;
           // this.studentInfo.classroomCode = this.classroomList[index].classroomCode;
@@ -256,11 +260,11 @@
           if (currentInfo.length > 0) {
             this.studentInfo.classroom.periodName = currentInfo[0].periodName
             this.studentInfo.classroom.gradeName = this.$JSONPath.query(currentInfo, "$..grades[?(@.gradeCode=='" + this.studentInfo.classroom.gradeCode + "')]")[0].gradeName
-            }
+          }
 
           console.log(this.studentInfo)
-          } else {
-              let currentInfo = this.$JSONPath.query(this.$store.state.schoolBaseInfo.schoolInfo, "$..period[?(@.periodCode=='" + this.classroomList[index].periodCode + "')]")
+        } else {
+          let currentInfo = this.$JSONPath.query(this.$store.state.schoolBaseInfo.schoolInfo, "$..period[?(@.periodCode=='" + this.classroomList[index].periodCode + "')]")
           let periodName = '数据错误'
           let gradeName = '数据错误'
           if (currentInfo.length > 0) {
@@ -299,7 +303,7 @@
             if (this.editStudentInfo.length == 1) {
               this.editStudentInfo[0].studentId = this.schoolCode + '#' + this.editStudentInfo[0].studentId
             }
-            this.$api.stuAccount.updateAllStudent(this.editStudentInfo).then(
+            this.$api.stuAccount.saveAllStudent(this.editStudentInfo).then(
               (res) => {
                 if (res.error == null) {
                   this.show = false

+ 135 - 118
TEAMModelOS/ClientApp/src/view/student-account/add-student/Authorization.less

@@ -1,147 +1,164 @@
 @borderColor: #626262;
-.model-title{
-    color:#7F7F7F;
-    font-size:18px;
-    font-weight:800;
-    display:inline-block;
-    width:100%;
-    text-align:center;
+
+.model-title {
+  color: #7F7F7F;
+  font-size: 18px;
+  font-weight: 800;
+  display: inline-block;
+  width: 100%;
+  text-align: center;
 }
+
 .import-tips {
-    color: #707070;
-    font-size: 18px;
-    line-height: 30px;
-    font-weight: 600;
+  color: #707070;
+  font-size: 18px;
+  line-height: 30px;
+  font-weight: 600;
 }
+
 .my-btn {
-    width: 100%;
-    height: 40px;
-    line-height: 40px;
-    text-align: center;
-    background-color: #4f4f4f;
-    margin: auto;
-    color: #A1A1A1;
-    font-size: 18px;
-    font-weight: 600;
-    letter-spacing: 2px;
-    cursor: pointer;
-    margin-bottom:15px;
+  width: 97%;
+  height: 35px;
+  line-height: 35px;
+  text-align: center;
+  background-color: #4f4f4f;
+  margin: auto;
+  color: #A1A1A1;
+  font-size: 16px;
+  font-weight: 600;
+  letter-spacing: 2px;
+  cursor: pointer;
+  border-radius: 4px;
+  margin-bottom: 15px;
 }
+
 .my-btn-active {
-    background-color: #6DE2C4;
-    color: white;
+  background-color: #6DE2C4;
+  color: white;
 }
-.drawer-footer{
-    position:absolute;
+
+.drawer-footer {
+  /*position:absolute;
     left:20px;
-    bottom:40px;
-    width:380px;
+    bottom:40px;*/
+  width: 380px;
+  margin-top: 15px;
 }
+
 .auth-info {
+  width: 100%;
+  /*border-bottom: 1px solid @borderColor;
+    padding-bottom: 30px;*/
+  margin-bottom: 10px;
+
+  &-title {
+    color: white;
+    font-size: 18px;
+  }
+
+  &-discreption {
+    color: #8E8E8E;
+    margin-top: 5px;
+    margin-bottom: 25px;
+  }
+
+  &-count-item {
     width: 100%;
-    border-bottom: 1px solid @borderColor;
-    padding-bottom: 30px;
-    margin-bottom:25px;
-    &-title {
-        color: white;
-        font-size: 18px;
-    }
+    margin-top: 5px;
+    color: #8E8E8E;
+    font-size: 14px;
+    font-weight: 600;
 
-    &-discreption {
-        color: #8E8E8E;
-        margin-top: 5px;
-        margin-bottom: 25px;
+    & span {
+      display: inline-block;
     }
+  }
 
-    &-count-item {
-        width: 100%;
-        margin-top: 5px;
-        color: #8E8E8E;
-        font-size:14px;
-        font-weight:600;
-        & span{
-            display:inline-block;
-        }
-    }
-    &-label{
-        width:60%;
-    }
-    &-num{
-        color:#DDDDDD;
-    }
+  &-label {
+    width: 60%;
+  }
+
+  &-num {
+    color: #DDDDDD;
+  }
 }
+
 .auth-rule {
-    margin-top:15px;
-    &-item {
-        margin-top: 25px;
-        width: 100%;
-        display: flex;
-        flex-direction: row;
-        align-items: center;
-        justify-content: space-between;
-    }
+  margin-top: 15px;
 
-    &-label {
-        color: #aaaaaa;
-        font-size: 14px;
-    }
+  &-item {
+    margin-bottom: 25px;
+    width: 100%;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    justify-content: space-between;
+  }
+
+  &-label {
+    color: #aaaaaa;
+    font-size: 14px;
+  }
+
+  &-btn {
+    padding: 2px 12px;
+    background: #808080;
+    margin-right: 50px;
+    color: #DDDDDD;
+    border-radius: 5px;
+    width: -webkit-fit-content;
+    width: -moz-fit-content;
+    width: -o-fit-content;
+    width: fit-content;
+    cursor: pointer;
+    user-select: none;
 
-    &-btn {
-        padding: 2px 12px; 
-        background: #808080;
-        margin-right: 50px;
-        color: #DDDDDD; 
-        border-radius: 5px;
-        width: -webkit-fit-content;
-        width: -moz-fit-content;
-        width: -o-fit-content;
-        width: fit-content;
-        cursor:pointer;
-        user-select:none;
-        &-active{
-            background-color:#6de2c4;
-        }
+    &-active {
+      background-color: #6de2c4;
     }
+  }
 }
+
 .collapse-header {
-    &-box {
-        width: 100%;
-        display:inline-block;
-    }
+  &-box {
+    width: 100%;
+    display: inline-block;
+  }
 
-    &-label {
-        padding-left: 10px;
-        height: 18px;
-        line-height:18px;
-        font-size: 15px;
-        font-weight: 600;
-        color: #9E9E9E;
-        width: 60%;
-        box-sizing:border-box;
-        display: inline-block;
-    }
+  &-label {
+    padding-left: 10px;
+    height: 18px;
+    line-height: 18px;
+    font-size: 15px;
+    font-weight: 600;
+    color: #9E9E9E;
+    width: 60%;
+    box-sizing: border-box;
+    display: inline-block;
+  }
 
-    &-num {
-        padding-left: 10px;
-        height: 18px;
-        font-size: 15px;
-        font-weight: 600;
-        color: #9F9F9F;
-    }
+  &-num {
+    padding-left: 10px;
+    height: 18px;
+    font-size: 15px;
+    font-weight: 600;
+    color: #9F9F9F;
+  }
 }
+
 .auth-num-item ul {
-    list-style: none;
-    color: #9F9F9F;
-    font-size: 14px;
-    width: 100%;
+  list-style: none;
+  color: #9F9F9F;
+  font-size: 14px;
+  width: 100%;
 
-    & li {
-        margin-top: 5px;
-        width: 100%;
-    }
+  & li {
+    margin-top: 5px;
+    width: 100%;
+  }
 
-    & li span:nth-child(1) {
-        display: inline-block;
-        width: 63%;
-    }
+  & li span:nth-child(1) {
+    display: inline-block;
+    width: 63%;
+  }
 }

+ 143 - 128
TEAMModelOS/ClientApp/src/view/student-account/add-student/Authorization.vue

@@ -2,6 +2,13 @@
   @import './Authorization.less';
 </style>
 <style lang="less">
+  .auth-box .ivu-tabs-nav .ivu-tabs-tab {
+    color: white;
+  }
+
+  .auth-box .ivu-tabs-nav .ivu-tabs-tab-active {
+    color: #2d8cf0;
+  }
   .auth-box .ivu-drawer-content {
     border-left:1px solid #383838;
     background-color:#404040;
@@ -72,140 +79,148 @@
         </div>
       </div>
       <div class="auth-rule">
-        <p class="auth-info-discreption">{{$t('stuAccount.authNum')}}</p>
-        <!--<div class="auth-rule-item">
-    <div class="auth-rule-label">套用至所有当前节选项目</div>
-    <div class="auth-rule-btn">套用</div>
-  </div>
-  <div class="auth-rule-item">
-    <div class="auth-rule-label">
-      <span>套用至所有当前节选目标</span>
-      <Input size="small" placeholder="—" style="width: 50px;border-color:#AAAAAA;" />
-      <span>至</span>
-      <Input size="small" placeholder="—" style="width: 50px" />
-      <span>项</span>
-    </div>
-    <div class="auth-rule-btn">套用</div>
-  </div>
-  <div class="auth-rule-item">
-    <div class="auth-rule-label">
-      <span>套用至</span>
-      <Select size="small" v-model="list" style="width:140px" placeholder="请选择学制">
-        <Option v-for="item in list" :value="item.value" :key="item.value">{{ item.label }}</Option>
-      </Select>
-      <span>所有项目</span>
-    </div>
-    <div class="auth-rule-btn">套用</div>
-  </div>
-  <div class="auth-rule-item">
-    <div class="auth-rule-label">
-      <span>套用至</span>
-      <Select size="small" v-model="list" style="width:140px" placeholder="请选择学级">
-        <Option v-for="item in list" :value="item.value" :key="item.value">{{ item.label }}</Option>
-      </Select>
-      <span>所有项目</span>
-    </div>
-    <div class="auth-rule-btn">套用</div>
-  </div>
-  <div class="auth-rule-item">
-    <div class="auth-rule-label">
-      <span>套用至</span>
-      <Select size="small" v-model="list" style="width:140px" placeholder="请选择班级">
-        <Option v-for="item in list" :value="item.value" :key="item.value">{{ item.label }}</Option>
-      </Select>
-      <span>所有项目</span>
-    </div>
-    <div class="auth-rule-btn">套用</div>
-  </div>
-  <div class="auth-rule-item">
-    <div class="auth-rule-label">套用至全校所有项目</div>
-    <div class="auth-rule-btn">套用</div>
-  </div>-->
-        <!--<div class="drawer-footer">
-    <div class="my-btn" @click="confirm()">
-      收回所有授权
-    </div>
-    <div class="my-btn my-btn-active" @click="confirm()" >
-      保存所有变更
-    </div>
-  </div>-->
-        <Collapse accordion v-model="activePanel">
-          <Panel name="1">
-            <div class="collapse-header-box">
-              <span class="collapse-header-label">小学使用数</span><span class="collapse-header-num">188</span>
+        <Tabs>
+          <TabPane label="授权总览">
+            <p class="auth-info-discreption">{{$t('stuAccount.authNum')}}</p>
+
+            <Collapse accordion v-model="activePanel">
+              <Panel name="1">
+                <div class="collapse-header-box">
+                  <span class="collapse-header-label">小学使用数</span><span class="collapse-header-num">188</span>
+                </div>
+                <div slot="content" class="auth-num-item">
+                  <ul>
+                    <li>
+                      <span>一年级使用数</span>
+                      <span>58</span>
+                    </li>
+                    <li>
+                      <span>二年级使用数</span>
+                      <span>46</span>
+                    </li>
+                    <li>
+                      <span>三年级使用数</span>
+                      <span>86</span>
+                    </li>
+                    <li>
+                      <span>四年级使用数</span>
+                      <span>35</span>
+                    </li>
+                    <li>
+                      <span>五年级使用数</span>
+                      <span>48</span>
+                    </li>
+                    <li>
+                      <span>六年级使用数</span>
+                      <span>78</span>
+                    </li>
+                  </ul>
+                </div>
+              </Panel>
+              <Panel name="2">
+                <div style="display:inline-block;" class="collapse-header-box">
+                  <span class="collapse-header-label">初中使用数</span><span class="collapse-header-num">135</span>
+                </div>
+                <div slot="content" class="auth-num-item">
+                  <ul>
+                    <li>
+                      <span>一年级使用数</span>
+                      <span>58</span>
+                    </li>
+                    <li>
+                      <span>二年级使用数</span>
+                      <span>46</span>
+                    </li>
+                    <li>
+                      <span>三年级使用数</span>
+                      <span>86</span>
+                    </li>
+                  </ul>
+                </div>
+              </Panel>
+              <Panel name="3">
+                <div style="display:inline-block;" class="collapse-header-box">
+                  <span class="collapse-header-label">高中使用数</span><span class="collapse-header-num">89</span>
+                </div>
+                <div slot="content" class="auth-num-item">
+                  <ul>
+                    <li>
+                      <span>一年级使用数</span>
+                      <span>58</span>
+                    </li>
+                    <li>
+                      <span>二年级使用数</span>
+                      <span>46</span>
+                    </li>
+                    <li>
+                      <span>三年级使用数</span>
+                      <span>86</span>
+                    </li>
+                  </ul>
+                </div>
+              </Panel>
+            </Collapse>
+          </TabPane>
+          <TabPane label="授权设置">
+            <div class="auth-rule-item">
+              <div class="auth-rule-label">套用至所有当前节选项目</div>
+              <div class="auth-rule-btn">套用</div>
+            </div>
+            <div class="auth-rule-item">
+              <div class="auth-rule-label">
+                <span>套用至所有当前节选目标</span>
+                <Input size="small" placeholder="—" style="width: 50px;border-color:#AAAAAA;" />
+                <span>至</span>
+                <Input size="small" placeholder="—" style="width: 50px" />
+                <span>项</span>
+              </div>
+              <div class="auth-rule-btn">套用</div>
             </div>
-            <div slot="content" class="auth-num-item">
-              <ul>
-                <li>
-                  <span>一年级使用数</span>
-                  <span>58</span>
-                </li>
-                <li>
-                  <span>二年级使用数</span>
-                  <span>46</span>
-                </li>
-                <li>
-                  <span>三年级使用数</span>
-                  <span>86</span>
-                </li>
-                <li>
-                  <span>四年级使用数</span>
-                  <span>35</span>
-                </li>
-                <li>
-                  <span>五年级使用数</span>
-                  <span>48</span>
-                </li>
-                <li>
-                  <span>六年级使用数</span>
-                  <span>78</span>
-                </li>
-              </ul>
+            <div class="auth-rule-item">
+              <div class="auth-rule-label">
+                <span>套用至</span>
+                <Select size="small" v-model="list" style="width:140px" placeholder="请选择学制">
+                  <Option v-for="item in list" :value="item.value" :key="item.value">{{ item.label }}</Option>
+                </Select>
+                <span>所有项目</span>
+              </div>
+              <div class="auth-rule-btn">套用</div>
             </div>
-          </Panel>
-          <Panel name="2">
-            <div style="display:inline-block;" class="collapse-header-box">
-              <span class="collapse-header-label">初中使用数</span><span class="collapse-header-num">135</span>
+            <div class="auth-rule-item">
+              <div class="auth-rule-label">
+                <span>套用至</span>
+                <Select size="small" v-model="list" style="width:140px" placeholder="请选择学级">
+                  <Option v-for="item in list" :value="item.value" :key="item.value">{{ item.label }}</Option>
+                </Select>
+                <span>所有项目</span>
+              </div>
+              <div class="auth-rule-btn">套用</div>
             </div>
-            <div slot="content" class="auth-num-item">
-              <ul>
-                <li>
-                  <span>一年级使用数</span>
-                  <span>58</span>
-                </li>
-                <li>
-                  <span>二年级使用数</span>
-                  <span>46</span>
-                </li>
-                <li>
-                  <span>三年级使用数</span>
-                  <span>86</span>
-                </li>
-              </ul>
+            <div class="auth-rule-item">
+              <div class="auth-rule-label">
+                <span>套用至</span>
+                <Select size="small" v-model="list" style="width:140px" placeholder="请选择班级">
+                  <Option v-for="item in list" :value="item.value" :key="item.value">{{ item.label }}</Option>
+                </Select>
+                <span>所有项目</span>
+              </div>
+              <div class="auth-rule-btn">套用</div>
             </div>
-          </Panel>
-          <Panel name="3">
-            <div style="display:inline-block;" class="collapse-header-box">
-              <span class="collapse-header-label">高中使用数</span><span class="collapse-header-num">89</span>
+            <div class="auth-rule-item">
+              <div class="auth-rule-label">套用至全校所有项目</div>
+              <div class="auth-rule-btn">套用</div>
             </div>
-            <div slot="content" class="auth-num-item">
-              <ul>
-                <li>
-                  <span>一年级使用数</span>
-                  <span>58</span>
-                </li>
-                <li>
-                  <span>二年级使用数</span>
-                  <span>46</span>
-                </li>
-                <li>
-                  <span>三年级使用数</span>
-                  <span>86</span>
-                </li>
-              </ul>
+            <div class="drawer-footer">
+              <div class="my-btn" @click="confirm()">
+                收回所有授权
+              </div>
+              <div class="my-btn my-btn-active" @click="confirm()">
+                保存所有变更
+              </div>
             </div>
-          </Panel>
-        </Collapse>
+          </TabPane>
+        </Tabs>
+        
       </div>
       
     </Drawer>

+ 3 - 2
TEAMModelOS/ClientApp/src/view/student-account/add-student/ImportStudent.vue

@@ -11,8 +11,9 @@
         <Icon type="ios-folder" color="#606060" size="200" style="margin-top:60px;cursor:pointer;" @click="openUploadFile" />
       </Upload>
       <p class="import-tips" style="margin-top:40px;">{{$t('stuAccount.importTips1')}}</p>
-      <p class="import-tips">{{$t('stuAccount.importTips2')}}</p>
-      <p class="import-tips">{{$t('stuAccount.importTips3')}}</p>
+      <!--<p class="import-tips">{{}}</p>-->
+      <p class="import-tips">{{$t('stuAccount.importTips2') + $t('stuAccount.importTips3')}}</p>
+      <a style="margin-top:10px;color:turquoise;display:inline-block;" href="https://teammodelstorage.blob.core.chinacloudapi.cn/teammodelcontest/20191107/%E5%AD%A6%E7%94%9F%E8%B4%A6%E5%8F%B7%E5%90%8D%E5%8D%95%20%E2%80%94%E6%AD%A3%E7%A1%AE%E6%95%B0%E6%8D%AE.xlsx">(下载名单模板)</a>
     </div>
     <div class="form-body" style="background:none;" v-if="file !== null">
       <div class="ivu-upload-list-file">