Sfoglia il codice sorgente

11/23 15:16

vip课程组限制
mo 4 anni fa
parent
commit
5cca9a888d
1 ha cambiato i file con 20 aggiunte e 22 eliminazioni
  1. 20 22
      src/views/vipClass/vipReset.vue

+ 20 - 22
src/views/vipClass/vipReset.vue

@@ -5,7 +5,7 @@
         <el-page-header @back="goBack"
                         :content="name"></el-page-header>
       </h2>
-      <p style="margin-bottom:10px; margin-left:30px;">课程有效期:{{ startClassTime|dayjsFormat }} ~ {{endTime |dayjsFormat}}</p>
+      <!-- <p style="margin-bottom:10px; margin-left:30px;">课程有效期:{{ startClassTime|dayjsFormat }} ~ {{endTime |dayjsFormat}}</p> -->
     </div>
     <div class="vipwrap">
       <!-- <div class="newBand"
@@ -20,9 +20,9 @@
       <div class="newBand"
            v-permission="{parent:'/vipReset',child:'employee/findEducationUsers'}"
            @click="educationalVisible = true">课程信息</div>
-            <div class="newBand"
+      <!-- <div class="newBand"
            v-permission="'vipGroupManage/update'"
-           @click="expireVisible = true">有效期调整</div> 
+           @click="expireVisible = true">有效期调整</div>  -->
     </div>
 
     <div class="tableWrap">
@@ -136,7 +136,7 @@
                       prop="date">
           <el-date-picker v-model.trim="maskForm.date"
                           type="date"
-                          :picker-options="coursesDate(this.endTime)"
+                          :picker-options="coursesDate()"
                           value-format="yyyy-MM-dd"
                           placeholder="选择日期"></el-date-picker>
         </el-form-item>
@@ -311,7 +311,7 @@
         <el-form-item label="排课起始时间"
                       prop="courseTime">
           <el-date-picker v-model.trim="adjustmentForm.courseTime"
-                          :picker-options="pickerOptions(this.endTime)"
+                          :picker-options="pickerOptions()"
                           style="width:200px!important;"
                           type="date"
                           value-format="yyyy-MM-dd"
@@ -442,9 +442,8 @@
                    @click="resetEducationalVisible">确 定</el-button>
       </span>
     </el-dialog>
-        <el-dialog title="有效期调整"
+    <el-dialog title="有效期调整"
                width="400px"
-             
                :visible.sync="expireVisible">
       <el-form :model="expireForm"
                ref="expireForm"
@@ -501,7 +500,7 @@ export default {
   },
   data () {
     return {
-      expireVisible:false,
+      expireVisible: false,
       addrVisible: false,
       adjustmentVisible: false,
       addCourseVisible: false,
@@ -586,12 +585,12 @@ export default {
       name: '',
       endTime: '',
       startClassTime: '',
-         expireForm: {
+      expireForm: {
         coursesExpireDate: null,
         tempCoursesExpireDate: null
       },
       bigin: this.beginDate(),
-        expireRules: {
+      expireRules: {
         coursesExpireDate: [{ required: true, message: "请选择课程结束时间", trigger: "blur" }]
       },
     };
@@ -1038,8 +1037,7 @@ export default {
       return {
         firstDayOfWeek: 1,
         disabledDate: time => {
-          let date = new Date(dateStr.replace(/-/, "/"));
-          return time.getTime() > date.getTime();
+          return time.getTime() + 86400000 <= new Date().getTime()
         }
       };
     },
@@ -1047,8 +1045,8 @@ export default {
       return {
         firstDayOfWeek: 1,
         disabledDate (time) {
-          let date = new Date(dateStr.replace(/-/, "/"));
-          return time.getTime() + 86400000 <= new Date().getTime() || time.getTime() > date.getTime();
+
+          return time.getTime() + 86400000 <= new Date().getTime();
         }
       }
     },
@@ -1062,11 +1060,11 @@ export default {
             if (res.code == 200) {
               this.$message.success("有效期修改成功")
               this.expireVisible = false
-              let str = this.expireForm.coursesExpireDate+ ' 00:00:00'
+              let str = this.expireForm.coursesExpireDate + ' 00:00:00'
               this.$router.push({
-                query:{
-                   ...this.$route.query,
-                endTimeStr: str
+                query: {
+                  ...this.$route.query,
+                  endTimeStr: str
                 }
               })
               // this.$route.query.endTimeStr = str;
@@ -1083,16 +1081,16 @@ export default {
       });
 
     },
-    beginDate(){
-        let self = this
+    beginDate () {
+      let self = this
       return {
         firstDayOfWeek: 1,
         disabledDate (time) {
           // if (self.expireForm.tempCoursesExpireDate) {
           //   return new Date(self.expireForm.tempCoursesExpireDate).getTime() > time.getTime()
           // } else {
-            return time.getTime() <= Date.now()
-            //开始时间不选时,结束时间最大值小于等于当天
+          return time.getTime() <= Date.now()
+          //开始时间不选时,结束时间最大值小于等于当天
           // }
         }
       }