wangfei 6 år sedan
förälder
incheckning
58b58c7128

+ 5
- 1
src/pages/system/courseManager/courseList/index.vue Visa fil

@@ -119,6 +119,7 @@
119 119
               size="mini"
120 120
               type="warning"
121 121
               v-if="scope.row.Status===0"
122
+              @click="toSchedule(scope.row)"
122 123
               >排课</el-button>
123 124
             <el-button
124 125
               size="mini"
@@ -421,7 +422,10 @@ export default {
421 422
     handleCopy (row) {
422 423
       this.GetCourseByID({ id: row.CourseId })
423 424
       this.$router.push({ name: 'addCourse' })
424
-    }
425
+    },
426
+    toSchedule (row) {
427
+      this.$router.push({ name: 'scheduleManager', query: { id: row.CourseId } })
428
+    },
425 429
   }
426 430
 }
427 431
 </script>

+ 12
- 3
src/pages/system/courseManager/scheduleManager/edit.vue Visa fil

@@ -161,20 +161,29 @@ export default {
161 161
         pagesize: 10, // 请求数据量
162 162
         name: '', // 课程名称
163 163
         date: '',
164
+        courseid: '',
164 165
       },
165 166
     }
166 167
   },
167 168
   mounted () {
168
-    const { date, caseid } = this.$route.query
169
-    if (!date || date === '' || !caseid || caseid === '') {
169
+    const { date, caseid, courseid } = this.$route.query
170
+    if (!date || date === '') {
170 171
       this.$message({
171 172
         type: 'error',
172
-        message: '请先选择排课时间与案场'
173
+        message: '请先选择排课时间'
174
+      })
175
+      this.$router.push({ name: 'scheduleManager', query: { courseid: courseid } })
176
+    }
177
+    if ((!courseid && courseid === '') && (!caseid || caseid === '')) {
178
+      this.$message({
179
+        type: 'error',
180
+        message: '请先选择排课案场'
173 181
       })
174 182
       this.$router.push({ name: 'scheduleManager' })
175 183
     }
176 184
     this.postData.date = date
177 185
     this.postData.caseid = caseid
186
+    this.postData.courseid = courseid
178 187
     this.updateLocationInfo()
179 188
     this.$nextTick(function () {
180 189
       this.getList()

+ 18
- 7
src/pages/system/courseManager/scheduleManager/index.vue Visa fil

@@ -5,7 +5,7 @@
5 5
         <div class="flex-item flex-h">
6 6
           <!-- <el-button size="mini" type="success" @click="addSchedule">新增排课</el-button> -->
7 7
         </div>
8
-        <ul>
8
+        <ul v-if="courseid===''">
9 9
           <li>
10 10
             <el-select v-model="CaseId" placeholder="请选择案场">
11 11
               <el-option
@@ -116,6 +116,7 @@ export default {
116 116
     return {
117 117
       caseid: '',
118 118
       seldate: '',
119
+      courseid: '',
119 120
       currentCourseItem: {},
120 121
       centerDialogVisible: false,
121 122
     }
@@ -165,10 +166,11 @@ export default {
165 166
     ...mapScheduleActions([
166 167
       'GetDetailList',
167 168
       'UpdateDetail',
168
-      'DelDetail'
169
+      'DelDetail',
170
+      'SetListNull',
169 171
     ]),
170 172
     dayClick (day, jsEvent) { // 点击某天进入排课
171
-      this.$router.push({ name: 'editSchedule', query: {caseid: this.CaseId, date: this.toolClass.dateFormat(day, 'yyyy-MM-dd')} })
173
+      this.$router.push({ name: 'editSchedule', query: {caseid: this.CaseId, courseid: this.courseid, date: this.toolClass.dateFormat(day, 'yyyy-MM-dd')} })
172 174
     },
173 175
     eventClick (event, jsEvent, pos) { // 点击日历
174 176
       this.currentCourseItem = {...event.detail}
@@ -182,10 +184,15 @@ export default {
182 184
       this.getList()
183 185
     },
184 186
     getList () {
185
-      this.GetDetailList({
186
-        caseid: this.CaseId,
187
-        date: this.CurrentMonth,
188
-      })
187
+      if (this.CaseId !== '' || this.courseid !== '') {
188
+        this.GetDetailList({
189
+          caseid: this.CaseId,
190
+          date: this.CurrentMonth,
191
+          courseid: this.courseid,
192
+        })
193
+      } else {
194
+        this.SetListNull()
195
+      }
189 196
     },
190 197
     handlUpdateDetail () {
191 198
       this.UpdateDetail({...this.currentCourseItem,
@@ -214,6 +221,10 @@ export default {
214 221
   },
215 222
   mounted () {
216 223
     this.$nextTick(function () {
224
+      const { id } = this.$route.query
225
+      if (id && id !== '') {
226
+        this.courseid = id
227
+      }
217 228
       this.getList()
218 229
     })
219 230
   }

+ 1
- 1
src/pages/system/verificationManager/phoneVerification/verificationList/index.vue Visa fil

@@ -59,7 +59,7 @@
59 59
                     type="success"
60 60
                     v-if="scope.row.VerifyStatus!=='used'"
61 61
                     @click="check(scope.row)">核销</el-button>
62
-                  <span>已完成</span>
62
+                  <span v-else>已完成</span>
63 63
                 </template>
64 64
               </el-table-column>
65 65
             </el-table>

+ 1
- 1
src/pages/system/verificationManager/qrcodeVerification/verificationList/index.vue Visa fil

@@ -51,7 +51,7 @@
51 51
                     type="success"
52 52
                     v-if="scope.row.VerifyStatus!=='used'"
53 53
                     @click="check(scope.row)">核销</el-button>
54
-                  <span>已完成</span>
54
+                  <span v-else>已完成</span>
55 55
                 </template>
56 56
               </el-table-column>
57 57
             </el-table>

+ 3
- 0
src/store/course/schedule.js Visa fil

@@ -89,5 +89,8 @@ export default {
89 89
         }
90 90
       })
91 91
     },
92
+    SetListNull ({ commit }) {
93
+      commit('updatesSheduleList', [])
94
+    }
92 95
   }
93 96
 }