فهرست منبع

Merge branch 'develop' into hhb/develop-2205

CrazyIter_Bin 3 سال پیش
والد
کامیت
4397dc09a8

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

@@ -1027,6 +1027,7 @@ const LANG_EN_US = {
         cusTable: 'Class Schedule',
         importLabel: 'Import Class Schedule',
         cusMode: 'Course Mode',
+        rtnRoom:'返回教室管理',
         roomLabel: 'Classroom',
         roomType: 'Type:',
 

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

@@ -1027,6 +1027,7 @@ const LANG_ZH_CN = {
         cusTable: '课程表',
         importLabel: '导入课表',
         cusMode: '课程模式',
+        rtnRoom:'返回教室管理',
         roomLabel: '教室',
         roomType: '教室类型:',
 

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

@@ -1027,6 +1027,7 @@ const LANG_ZH_TW = {
         cusTable: '課程表',
         importLabel: '匯入課表',
         cusMode: '課程模式',
+        rtnRoom:'返回教室管理',
         roomLabel: '教室',
         roomType: '教室類型:',
 

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

@@ -595,7 +595,7 @@ export const routes = [{
 		name: 'CoursePlan',
 		component: resolve => require(['@/view/newcourse/CoursePlan.vue'], resolve),
 		meta: {
-			activeName: 'NewCusMgt'
+			activeName: ''
 		}
 	},
 	// 新课纲管理

+ 1 - 0
TEAMModelOS/ClientApp/src/view/mgtPlatform/MgtPlatform.vue

@@ -380,6 +380,7 @@ export default {
 .platform-list-wrap {
     display: flex;
     width: 100%;
+    flex-wrap: wrap;
 }
 .add-platform-icon {
     font-size: 50px;

+ 4 - 2
TEAMModelOS/ClientApp/src/view/mycourse/MyCourse.vue

@@ -327,6 +327,7 @@ export default {
     created() {
         this.initCusType()
         this.getAllStuList()
+        if (!this.filterPeriod) this.getCourseList()
     },
     activated() {
         let tn = this.tabName
@@ -634,7 +635,6 @@ export default {
                             code: this.$store.state.userInfo.TEAMModelId,
                             schedule: this.addCusInfo.schedule || [],
                             scope: 'private',
-                            creatorId: this.$store.state.userInfo.schoolCode
                         }
                     }
                     this.btnLoading = true
@@ -655,8 +655,8 @@ export default {
                                         ci.no = this.addCusInfo.no
                                         ci.desc = this.addCusInfo.desc
                                     }
-                                    this.getCusInfo()
                                 }
+                                this.getCusInfo()
                                 this.initCusInfo()
                                 this.addCusStatus = false
                                 this.$refs['addCusInfo'].resetFields()
@@ -704,6 +704,8 @@ export default {
                     value: 'school'
                 })
                 this.listType = 'school'
+            } else {
+                this.listType = 'private'
             }
         },
         // 获取课程列表

+ 5 - 0
TEAMModelOS/ClientApp/src/view/mycourse/record/Record.less

@@ -66,4 +66,9 @@
     float:right;
     margin-right:20px;
     position: relative;    
+}
+.exam-action-wrap{
+    position: absolute;
+    right: 15px;
+    top: 10px;
 }

+ 56 - 0
TEAMModelOS/ClientApp/src/view/mycourse/record/Record.vue

@@ -1,5 +1,14 @@
 <template>
     <div class="record-container">
+        <div class="exam-action-wrap">
+            <span>
+                <Tooltip :max-width="180" :content="$t('cusMgt.autoShareTips')">
+                    <Icon type="ios-information-circle-outline" />
+                </Tooltip>
+                {{$t('cusMgt.autoShare')}}
+            </span>
+            <i-switch :loading="sLoading" v-model="isAuto" size="small" @on-change="setAutoPublish" />
+        </div>
         <vuescroll>
             <Alert v-show="rcdParams.scope == 'private'" show-icon type="warning" closable>
                 {{$t('cusMgt.recordTips')}}
@@ -96,6 +105,7 @@
     </div>
 </template>
 <script>
+import { mapGetters } from 'vuex'
 import RcdPoster from "../../homepage/RcdPoster.vue"
 export default {
     components: {
@@ -117,13 +127,47 @@ export default {
     },
     data() {
         return {
+            isAuto: false,//是否自动发布课堂记录
+            sLoading: false,
             btnLoading: false,
             editName: '',
             recordList: [],
             editRdStatus: false,
         }
     },
+    computed: {
+        ...mapGetters({
+            lessonShow: 'user/getTeacherLessonShow',//是否自动发布课堂记录
+        }),
+    },
     methods: {
+        //切换是否自动发布课堂记录
+        setAutoPublish() {
+            this.sLoading = true
+            let show = this.lessonShow
+            if (this.isAuto) {
+                show.push('student')
+            } else {
+                let index = show.findIndex(item => item === 'student')
+                if (index > -1) show.splice(index, 1)
+            }
+            let params = {
+                "opt": "UpdateLessonShow",
+                "lessonShow": show
+            }
+            this.$api.schoolUser.setTeacherInfo(params).then(
+                res => {
+                    this.$Message.success(this.$t('teachermgmt.setOk'))
+                    this.$store.commit('user/setLessonShow', show)
+                },
+                err => {
+                    this.$Message.error(this.$t('teachermgmt.setErr'))
+                    this.isAuto = !this.isAuto
+                }
+            ).finally(() => {
+                this.sLoading = false
+            })
+        },
         //分享、取消分享给学生
         toggleShare(data) {
             if (data && data.id) {
@@ -348,6 +392,18 @@ export default {
                 }
 
             }
+        },
+        lessonShow: {
+            deep: true,
+            immediate: true,
+            handler(n, o) {
+                console.log(typeof n)
+                if (n && Array.isArray(n)) {
+                    this.isAuto = n.includes('student')
+                } else {
+                    this.isAuto = false
+                }
+            }
         }
     }
 }

+ 12 - 4
TEAMModelOS/ClientApp/src/view/newcourse/CoursePlan.vue

@@ -4,8 +4,9 @@
             <b class="title">{{$t('cusMgt.schdTable')}}</b>
             <div class="action-btn-wrap">
                 <span v-if="$access.can('admin.*|course-upd')" @click="toggleView()" class="action-btn" style="margin-right:40px">
-                    <Icon custom="iconfont icon-kecheng" size="16" />
-                    <span>{{$t('cusMgt.cusMode')}}</span>
+                    <Icon v-if="fromRouter == 'classroom'" type="md-arrow-back" />
+                    <Icon v-else custom="iconfont icon-kecheng" size="16" />
+                    <span>{{ fromRouter == 'classroom' ? $t('cusMgt.rtnRoom') : $t('cusMgt.cusMode')}}</span>
                 </span>
             </div>
         </div>
@@ -82,6 +83,7 @@ export default {
     inject: ['reload'],
     data() {
         return {
+            fromRouter: '',
             split1: 0.2,
             filterPeriod: '',
             confImpStatus: false,
@@ -149,7 +151,7 @@ export default {
         // 切换课表模式和课程模式
         toggleView() {
             this.$router.push({
-                name: 'NewCusMgt'
+                name: this.fromRouter || 'NewCusMgt'
             })
         },
         //关键字搜索班级
@@ -377,7 +379,7 @@ export default {
                             schdItem.time.splice(j, 1)
                             //如果已经删完了时间安排,则把对应关系也删了
                             if (!schdItem.time.length) {
-                                cus.schedule.splice(i,1)
+                                cus.schedule.splice(i, 1)
                             }
                             this.updCusInfo(cus, 'cancel')
                             break
@@ -472,6 +474,12 @@ export default {
             this.findClassCus()
         })
     },
+    beforeRouteEnter(to, from, next) {
+        next(vm => {
+            vm.fromRouter = from.name
+            console.log(arguments)
+        })
+    },
     computed: {
         //当前班级对应的课程数据
         roomCus() {

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

@@ -2113,7 +2113,6 @@ export default {
                             code: this.$store.state.userInfo.TEAMModelId,
                             schedule: this.addCusInfo.schedule || [],
                             scope: 'private',
-                            creatorId: this.$store.state.userInfo.schoolCode
                         }
                     }
                     this.btnLoading = true