Browse Source

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

CrazyIter_Bin 3 years ago
parent
commit
7d38ca79f1

+ 2 - 0
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -459,6 +459,7 @@ const LANG_EN_US = {
         cc2:'PC端(HiTeach)',
         cc3:'Web端 (HiTeach CC)',
         cc4:'教師:',
+        stuClient:'學生連接數'
     },
     // 班级管理
     classMgmt: {
@@ -3776,6 +3777,7 @@ const LANG_EN_US = {
         updClass: 'Change Class',
         sltStuLabel: 'Selected Student:',
         classLabel: 'Class:',
+        confirmText:'確認',
 
         // AddStudent.vue
         accountInfo: 'Account Information',

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

@@ -459,6 +459,7 @@ const LANG_ZH_CN = {
         cc2:'PC端(HiTeach)',
         cc3:'Web端 (HiTeach CC)',
         cc4:'教师:',
+        stuClient:'学生连接数'
     },
     // 班级管理
     classMgmt: {
@@ -3776,6 +3777,7 @@ const LANG_ZH_CN = {
         updClass: '修改班级',
         sltStuLabel: '选取学生:',
         classLabel: '班级:',
+        confirmText:'确认',
 
         // AddStudent.vue
         accountInfo: '账号资讯',

+ 2 - 0
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -459,6 +459,7 @@ const LANG_ZH_TW = {
         cc2:'PC端(HiTeach)',
         cc3:'Web端 (HiTeach CC)',
         cc4:'教師:',
+        stuClient:'學生連接數'
     },
     // 班级管理
     classMgmt: {
@@ -3776,6 +3777,7 @@ const LANG_ZH_TW = {
         updClass: '修改班級',
         sltStuLabel: '選取學生:',
         classLabel: '班級:',
+        confirmText:'確認',
 
         //AddStudent.vue
         accountInfo: '帳號資訊',

+ 4 - 35
TEAMModelOS/ClientApp/src/view/areaMgmt/AreaLayout.vue

@@ -294,40 +294,7 @@ export default {
                     isShow: !this.$jsFn.checkJinNiu() && !this.$jsFn.checkTrain(),
                     to: 'activity'
                 },
-                // {
-                //     icon: 'iconfont icon-create',
-                //     name: this.$t('area.base.createAc'),
-                //     router: '/area/CreateAreaTrain',
-                //     tag: '',
-                //     role: '',
-                //     permission: '',
-                //     menuName: 'CreateAreaTrain',
-                //     child: [],
-                //     isShow: true
-                // },
-
-                // {
-                //     icon: 'iconfont icon-vote',
-                //     name: this.$t('system.menu.scVote'),
-                //     router: '/area/manageAreaVote',
-                //     tag: '',
-                //     role: '',
-                //     permission: '',
-                //     menuName: 'manageAreaVote',
-                //     child: [],
-                //     isShow: true
-                // },
-                // {
-                //     icon: 'iconfont icon-questionnaire',
-                //     name: this.$t('system.menu.scQu'),
-                //     router: '/area/manageAreaQuestionnaire',
-                //     tag: '',
-                //     role: '',
-                //     permission: '',
-                //     menuName: 'manageAreaQuestionnaire',
-                //     child: [],
-                //     isShow: true
-                // },
+                // 资源平台
                 {
                     icon: 'iconfont icon-app',
                     name: this.$t('system.menu.platform'),
@@ -339,6 +306,7 @@ export default {
                     child: [],
                     isShow: !this.$jsFn.checkJinNiu() && !this.$jsFn.checkTrain()
                 },
+                // 研修平台
                 {
                     icon: 'iconfont icon-basic-setting',
                     name: this.$t('system.menu.trainSystem'),
@@ -458,7 +426,8 @@ export default {
             }
         },
         isShowStudentMenu() {
-            let res = (!this.$jsFn.checkJinNiu() && !this.$jsFn.checkTrain() && this.srvAdr == 'China' && ['02944f32-f534-3397-ea56-e6f1fc6c3714', '69e3d413-50a1-4f5e-844a-e0f7c9622ea3'].includes(this.areaId)) || this.$store.state.config.srvAdrType === 'test'
+            // let res = (!this.$jsFn.checkJinNiu() && !this.$jsFn.checkTrain() && this.srvAdr == 'China' && ['02944f32-f534-3397-ea56-e6f1fc6c3714', '69e3d413-50a1-4f5e-844a-e0f7c9622ea3'].includes(this.areaId)) || this.$store.state.config.srvAdrType === 'test'
+            let res = (!this.$jsFn.checkJinNiu() && !this.$jsFn.checkTrain() && this.srvAdr == 'China') || this.$store.state.config.srvAdrType === 'test'
             console.log('isShowStudentMenu:', res)
             return res
         },

+ 10 - 0
TEAMModelOS/ClientApp/src/view/auth/Serial.vue

@@ -61,6 +61,7 @@
             <!-- <div slot="extra" class="cc-auth-tips" v-show="tabView == 'web'">
                 HiTeachCC今日可用授权数:34
             </div> -->
+            <!-- HiTeach授权 -->
             <TabPane :label="$t('auth.cc2')" name="pc" style="height:100%">
                 <div class="serial-mgt-box">
                     <Split v-model="split1">
@@ -129,6 +130,14 @@
                                     </div>
                                     <!-- 序列号权限 -->
                                     <div style="margin-top:10px;display: flex;flex-wrap: wrap;">
+                                        <Tag class="serial-auth-tag" color="blue">
+                                            <span class="serial-auth-name">
+                                                {{$t('auth.stuClient')}}
+                                            </span>
+                                            <span class="serial-auth-number">
+                                                {{item.clientQty}}
+                                            </span>
+                                        </Tag>
                                         <template v-for="(aitem) in serialAuthList">
                                             <Tag :key="aitem.code" class="serial-auth-tag" v-show="item.authKey.includes(aitem.code)" :color="aitem.color">
                                                 <span class="serial-auth-name">
@@ -203,6 +212,7 @@
                     </Modal>
                 </div>
             </TabPane>
+            <!-- cc授权 -->
             <TabPane :label="$t('auth.cc3')" name="web" class="cc-auth-tab">
                 <vuescroll>
                     <div class="cc-auth-content">

+ 10 - 10
TEAMModelOS/ClientApp/src/view/mycourse/MyCourse.vue

@@ -19,7 +19,7 @@
                 <span v-show="!courseListShow.length">
                     {{$t('cusMgt.noScCus')}}
                 </span>
-                <RadioGroup v-model="courseId" type="button" id="course-list-box" style="width: calc(100% - 70px);">
+                <RadioGroup v-model="courseId" type="button" id="course-list-box" style="width: calc(100% - 120px);">
                     <Radio v-for="item in courseListShow" :label="item.id" :key="item.id" style="margin-right:15px">
                         {{item.name}}
                         <span v-if="listType == 'private'" class="cus-action-icon-wrap">
@@ -64,7 +64,7 @@
                                     <span class="class-name">{{item.allStu ? item.allStu.length : 0}}{{$t('unit.text7')}}</span>
                                 </p>
                                 <Icon size="25" custom="iconfont icon-qr-code" :class="['qr-code-icon', {'qr-code-icon-color': item.joinLock}]" @click="showQrCode(index)" v-if="listType == 'private'" :title="$t('cusMgt.qrCodeLabel')" />
-                                <span v-if="hasCCAuth" :class="['qr-code-icon', hasCCAuth ? 'cc-icon' : 'no-cc-auth']" @click="startCus(index)">
+                                <span v-if="!hasCCAuth" :class="['qr-code-icon', hasCCAuth ? 'cc-icon' : 'no-cc-auth']" @click="startCus(index)">
                                     CC
                                 </span>
                             </div>
@@ -440,14 +440,14 @@ export default {
             }
         },
         startCus(index) {
-            if (!this.$store.state.userInfo.hasSchool) {
-                this.$Message.warning(this.$t('cusMgt.cc8'))
-                return
-            }
-            if (!this.$store.state.user.schoolProfile?.svcStatus?.LZLL6ZEI) {
-                this.$Message.warning(this.$t('cusMgt.cc9'))
-                return
-            }
+            // if (!this.$store.state.userInfo.hasSchool) {
+            //     this.$Message.warning(this.$t('cusMgt.cc8'))
+            //     return
+            // }
+            // if (!this.$store.state.user.schoolProfile?.svcStatus?.LZLL6ZEI) {
+            //     this.$Message.warning(this.$t('cusMgt.cc9'))
+            //     return
+            // }
             this.startCusInfo.cid = this.courseInfo.id
             this.startCusInfo.cname = this.courseInfo.name
             this.startCusInfo.sp = this.courseInfo.scope

+ 7 - 7
TEAMModelOS/ClientApp/src/view/student-account/stuMgt/StuMgt.vue

@@ -139,9 +139,9 @@
                         <div>
                             <ol>
                                 <li v-for="(item,index) in studentInfo.guardians" :key="index" class="guardian-item">
-                                    <Input v-special-char v-model="item.gName" class="guardian-info-input" :placeholder="$t('stuAccount.gName')"></Input>
-                                    <Input v-special-char v-model="item.guardian" class="guardian-info-input" :placeholder="$t('stuAccount.guardian')"></Input>
-                                    <Input v-special-char v-model="item.gPhone" class="guardian-info-input" :placeholder="$t('stuAccount.gPhone')"></Input>
+                                    <Input v-special-char v-model="item.name" class="guardian-info-input" :placeholder="$t('stuAccount.gName')"></Input>
+                                    <Input v-special-char v-model="item.relation" class="guardian-info-input" :placeholder="$t('stuAccount.guardian')"></Input>
+                                    <Input v-special-char v-model="item.mobile" class="guardian-info-input" :placeholder="$t('stuAccount.gPhone')"></Input>
                                     <Icon type="md-remove-circle" class="remove-guardian-icon" color="#ed4014" @click="removeGuardian(index)" />
                                 </li>
                             </ol>
@@ -149,7 +149,7 @@
                     </FormItem>
                 </Form>
                 <Button :loading="btnLoading" @click="confirmAddStu" long type="primary" class="confirm-btn">
-                    确认
+                    {{$t('stuAccount.confirmText')}}
                 </Button>
             </div>
 
@@ -299,9 +299,9 @@ export default {
                 return
             }
             this.studentInfo.guardians.push({
-                guardian: '',
-                gName: '',
-                gPhone: ''
+                relation: '',
+                name: '',
+                mobile: ''
             })
         },
         /**

+ 0 - 1
TEAMModelOS/ClientApp/src/view/teachermgmt/components/mgt/TeacherMgt.less

@@ -65,7 +65,6 @@
 }
 
 .subject-tag{
-    cursor: pointer;
     user-select: none;
     white-space: pre-line;
 }

+ 50 - 26
TEAMModelOS/ClientApp/src/view/teachermgmt/components/mgt/TeacherMgt.vue

@@ -46,7 +46,7 @@
                             <PersonalPhoto :name="row.name || row.iname" :picture="row.picture" />
                         </template>
                         <template slot-scope="{ row,index }" slot="subject">
-                            <p :style="{color:row.subjectIds && row.subjectIds.length? '':'red'}" class="subject-tag" @click="showSetSubj(index)">
+                            <p :style="{color:row.subjectIds && row.subjectIds.length? '':'red'}" class="subject-tag">
                                 {{row.subjectIds && row.subjectIds.length ? getSubjectNames(row.subjectIds) : $t('teachermgmt.notSet')}}
                             </p>
                         </template>
@@ -65,8 +65,8 @@
                         </template>
                         <template slot-scope="{ row }" slot="action" v-if="!activePanel">
                             <div class="teacher-action-wrap">
-                                <icon v-show="row.roles && !row.roles.includes('admin')" icon="shield-alt" style="font-size: 13px; color: var(--normal-icon-color); margin-right: 15px; cursor: pointer;" @click="openPanel('single',row)" />
-                                <Icon type="md-create" style="color: var(--normal-icon-color); font-size: 15px; cursor: pointer;margin-right: 15px;" @click="editTeacher(row)" />
+                                <icon v-show="row.roles && !row.roles.includes('admin') && row.status == 'join'" icon="shield-alt" style="font-size: 13px; color: var(--normal-icon-color); margin-right: 15px; cursor: pointer;" @click="openPanel('single',row)" />
+                                <Icon type="md-create" v-show="row.status == 'join'" style="color: var(--normal-icon-color); font-size: 15px; cursor: pointer;margin-right: 15px;" @click="editTeacher(row)" />
                                 <Icon v-show="row.roles && !row.roles.includes('admin')" size="16" type="md-trash" style="color: var(--normal-icon-color); cursor: pointer" @click="removeUser(row)" />
                                 <Icon v-show="row.roles && row.roles.includes('admin') && row.id == $store.state.userInfo.TEAMModelId && row.status == 'join'" type="md-repeat" style="color: var(--normal-icon-color); font-size: 14px; cursor: pointer" @click="transferAdmin(row)" />
                             </div>
@@ -265,14 +265,14 @@
                     <FormItem :label="$t('teachermgmt.tcUpd2')">
                         {{`${teacherInfo.name}(${teacherInfo.id})`}}
                     </FormItem>
-                    <FormItem :label="$t('teachermgmt.tcUpd3')">
+                    <!-- <FormItem :label="$t('teachermgmt.tcUpd3')">
                         管理员
-                    </FormItem>
+                    </FormItem> -->
                     <FormItem :label="$t('teachermgmt.tcUpd4')">
                         <Input v-model="teacherInfo.iname" :placeholder="$t('teachermgmt.tcUpd4')"></Input>
                     </FormItem>
                     <FormItem :label="$t('teachermgmt.tcUpd5')">
-                        <el-cascader ref="subjects" size="small" :options="targetData" clearable filterable v-model="subjectsPath" :props="props" style="width:100%;" popper-class="el-cascader-custom">
+                        <el-cascader ref="subjects" size="small" :options="targetData" clearable filterable v-model="teacherInfo.subjectsPath" :props="props" style="width:100%;" popper-class="el-cascader-custom">
                         </el-cascader>
                     </FormItem>
                     <FormItem :label="$t('teachermgmt.tcUpd6')">
@@ -282,7 +282,7 @@
                         <Input v-model="teacherInfo.note" :placeholder="$t('teachermgmt.tcUpd8')"></Input>
                     </FormItem>
                 </Form>
-                <Button :loading="btnLoading" @click="confirmSetSubj" long type="primary" class="confirm-btn">{{ $t('syllabus.confirm') }}</Button>
+                <Button :loading="btnLoading" @click="confirmUpdateTeacher" long type="primary" class="confirm-btn">{{ $t('syllabus.confirm') }}</Button>
             </div>
         </Modal>
         <Modal v-model="setSubjStatus" footer-hide className="ed-name-modal">
@@ -307,11 +307,12 @@ export default {
     },
     data() {
         return {
-            subjectsPath: [],
             teacherInfo: {
-                name: '罗老师',
-                id: '1595321354',
-                iname: '罗xx'
+                name: '',
+                id: '',
+                iname: '',
+                note: '',
+                subjectsPath: []
             },
             editTeacherStatus: false,
             filters: {
@@ -707,15 +708,50 @@ export default {
         },
     },
     methods: {
+        confirmUpdateTeacher() {
+            let sIds = this.teacherInfo.subjectsPath.map(item => item[item.length - 1])
+            let params = {
+                "opt": "UpdateMoreInfo",
+                "teacherInfo": {
+                    id: this.teacherInfo.id,
+                    iname: this.teacherInfo.iname,
+                    subjectIds: sIds,
+                    job: this.teacherInfo.job,
+                    note: this.teacherInfo.note
+                }
+            }
+            this.btnLoading = true
+            this.$api.schoolUser.setTeacherInfo(params).then(
+                res => {
+                    this.$Message.success(this.$t('teachermgmt.setOk'))
+                    this.editTeacherStatus = false
+                    //更新UI
+                    let t = this.teachers.find(item => item.id == this.teacherInfo.id)
+                    if (t) {
+                        t.subjectIds = sIds
+                        t.iname = this.teacherInfo.iname
+                        t.job = this.teacherInfo.job
+                        t.note = this.teacherInfo.note
+                        this.$store.commit('user/updTeacher', [t])
+                    }
+                },
+                err => {
+                    this.$Message.error(this.$t('teachermgmt.setErr'))
+                }
+            ).finally(() => {
+                this.btnLoading = false
+            })
+        },
         editTeacher(teacher) {
             console.log(teacher)
+            this.teacherInfo = this._.cloneDeep(teacher)
             if (teacher.subjectIds && teacher.subjectIds.length) {
                 let subjectInfos = this.$jsFn.getTeacherSubjects(teacher.subjectIds)
-                this.subjectsPath = subjectInfos.map(item => [item.periodId, item.subjectId])
+                this.teacherInfo.subjectsPath = subjectInfos.map(item => [item.periodId, item.subjectId])
             } else {
-                this.subjectsPath = []
+                this.teacherInfo.subjectsPath = []
             }
-            this.teacherInfo = this._.cloneDeep(teacher)
+
             this.editTeacherStatus = true
         },
         getGroupName(groups) {
@@ -1014,18 +1050,6 @@ export default {
                 })
             }
         },
-        //单一设置教师学科
-        showSetSubj(index) {
-            this.setSubjIndex = index
-            if (this.tableData[index].status != 'join') return
-            if (this.tableData[index].subjectIds && this.tableData[index].subjectIds.length) {
-                let subjectInfos = this.$jsFn.getTeacherSubjects(this.tableData[index].subjectIds)
-                this.setSubj = subjectInfos.map(item => [item.periodId, item.subjectId])
-            } else {
-                this.setSubj = []
-            }
-            this.setSubjStatus = true
-        },
         //确认设置教师学科
         confirmSetSubj() {
             if (this.setSubj.length) {