浏览代码

01/17 11:17

课表详情 提交测试
mo 5 年之前
父节点
当前提交
8decd38e94

+ 10 - 1
src/api/buildTeam.js

@@ -861,4 +861,13 @@ export function findStudentCourseHomeworks (data) {
     method: 'get',
     params: data
   })
-}
+}
+
+// 老师布置的作业
+export function getCourseScheduleHomework (data) {
+  return request({
+    url: api + '/teacher/getCourseScheduleHomework',
+    method: 'get',
+    params: data
+  })
+}

+ 1 - 1
src/store/modules/tagsView.js

@@ -93,4 +93,4 @@ const tagsView = {
   }
 }
 
-export default tagsView
+export default tagsView

+ 4 - 0
src/views/login/index.vue

@@ -140,7 +140,11 @@ export default {
             .dispatch("user/login", this.loginForm)
             .then(() => {
               this.$nextTick(res => {
+                //  这里清空 tab
+                this.$store
+                  .dispatch("delAllViews")
                 this.$router.push({ path: "/main/main" });
+
               })
             })
             .catch(() => {

+ 19 - 2
src/views/teamDetail/componentCourse/studentWork.vue

@@ -17,6 +17,7 @@
         <div class="inputStyle">{{ repliedNum}}</div>
       </el-form-item>
     </el-form>
+    <p class="work">老师布置的作业:{{content}}</p>
     <div class="tableWrap">
       <el-table :data='tableList'
                 :header-cell-style="{background:'#EDEEF0',color:'#444'}">
@@ -89,7 +90,7 @@
 </template>
 <script>
 import pagination from '@/components/Pagination/index'
-import { findStudentCourseHomeworks, sumStudentAttendance } from '@/api/buildTeam'
+import { findStudentCourseHomeworks, sumStudentAttendance, getCourseScheduleHomework } from '@/api/buildTeam'
 export default {
   props: ['courseScheduleId'],
   components: { pagination },
@@ -106,7 +107,8 @@ export default {
       studentNum: null,
       homeworkNum: null,
       repliedNum: null,
-      activeUrl: null
+      activeUrl: null,
+      content: null
     }
   },
   mounted () {
@@ -124,6 +126,17 @@ export default {
           this.repliedNum = res.data.repliedNum
         }
       })
+      //this.courseScheduleId 
+      // 
+
+      getCourseScheduleHomework({ courseScheduleId: this.courseScheduleId }).then(res => {
+        if (res.code == 200) {
+          if (res.data) {
+            this.content = res.data.content
+          }
+          this.content ? this.content : this.content = '还未布置作业'
+        }
+      })
       this.getList()
     },
     getList () {
@@ -149,4 +162,8 @@ export default {
   width: 100px;
   text-align: center;
 }
+.work {
+  margin-bottom: 30px;
+  font-size: 16px;
+}
 </style>

+ 7 - 2
src/views/teamDetail/teamCourseList.vue

@@ -223,12 +223,14 @@
         <el-form-item label="签到状态">
           <!-- <el-input :value=" maskForm.isSignIn | attendanceType"
                     disabled></el-input> -->
-          <div class="inputStyle">{{ maskForm.isSignIn | attendanceType}}</div>
+          <div class="inputStyle"
+               :class="maskForm.isSignIn==1?'':'red'">{{ maskForm.isSignIn | attendanceType}}</div>
         </el-form-item>
         <el-form-item label="签退状态">
           <!-- <el-input :value=" maskForm.isSignOut | attendanceOutType"
                     disabled></el-input> -->
-          <div class="inputStyle">{{ maskForm.isSignOut | attendanceOutType}}</div>
+          <div class="inputStyle"
+               :class="maskForm.isSignIn==1?'':'red'">{{ maskForm.isSignOut | attendanceOutType}}</div>
         </el-form-item>
         <el-form-item label="备注">
           <!-- <el-input :value=" maskForm.isSignOut | attendanceOutType"
@@ -466,4 +468,7 @@ export default {
 .inputStyle {
   width: 180px;
 }
+.red {
+  color: red;
+}
 </style>

+ 26 - 7
src/views/vipClass/vipReset.vue

@@ -124,7 +124,7 @@
                       prop="startTime">
           <el-time-select placeholder="起始时间"
                           style="width:200px!important;"
-                          v-model="maskForm.startTime"
+                          v-model="startTime"
                           :picker-options="{
                             start: '04:30',
                             step: '00:05',
@@ -413,7 +413,7 @@ export default {
       },
       maskRules: {
         date: [{ required: true, message: '请选择上课时间', trigger: 'blur' },],
-        startTime: [{ required: true, message: '请选择上课开始时间', trigger: 'blur' },],
+        // startTime: [{ required: true, message: '请选择上课开始时间', trigger: 'blur' },],
         endTime: [{ required: true, message: '请选择上课结束时间', trigger: 'blur' },],
 
       },
@@ -453,6 +453,7 @@ export default {
       // 改版加课
       isaddCourse: false,
       adjustmentName: '',
+      startTime: ''
 
     }
   },
@@ -462,12 +463,12 @@ export default {
   mounted () {
     this.getList();
   },
-  activated() {
+  activated () {
     this.__init()
     this.getList()
   },
   methods: {
-    __init() {
+    __init () {
       this.vipid = this.$route.query.id;
       if (this.$route.query.rules) {
         this.Frules = this.$route.query.rules
@@ -483,7 +484,7 @@ export default {
             this.tableList = res.data.pageInfo.rows;
             this.rules.total = res.data.pageInfo.total;
             this.courseTime = res.data.singleClassMinutes;
-            if(this.tableList.length > 0) {
+            if (this.tableList.length > 0) {
               getTeachSchool({ userId: res.data.pageInfo.rows[0].teacherId }).then(res => {
                 if (res.code == 200) {
                   this.schoolList = res.data;
@@ -498,8 +499,13 @@ export default {
       this.$router.push({ path: '/business/vipList', query: { rules: this.Frules, searchForm: this.FsearchForm } })
     },
     resetClass (row) {
+
+      /**
+       * maskForm.startTime
+       * 
+       */
       this.maskForm.date = row.classDate;
-      this.maskForm.startTime = row.startClassTimeStr;
+      this.startTime = row.startClassTimeStr;
       // this.maskForm.endTime = row.endClassTimeStr;
       this.maskForm.id = row.id;
       this.maskForm.address = row.schoolId
@@ -509,12 +515,25 @@ export default {
     },
     handleClose () {
       this.courseVisible = false;
+      this.startTime = ''
+      this.maskForm = {
+        date: '',
+        startTime: '',
+        endTime: '',
+        id: '',
+        address: '',
+        teachMode: ''
+      }
       this.$refs['maskForm'].resetFields()
     },
     submitResetClass () {
       //   endClassTimeStr: this.maskForm.endTime,
+      if (!this.startTime) {
+        this.$message.error('请填写修改时间')
+        return
+      }
       let obj = {
-        startClassTimeStr: this.maskForm.startTime,
+        startClassTimeStr: this.startTime,
         id: this.maskForm.id,
         classDate: this.maskForm.date,
         schoolId: this.maskForm.address || null,