Browse Source

联调修改

wangfei 6 years ago
parent
commit
58b58c7128

+ 5
- 1
src/pages/system/courseManager/courseList/index.vue View File

119
               size="mini"
119
               size="mini"
120
               type="warning"
120
               type="warning"
121
               v-if="scope.row.Status===0"
121
               v-if="scope.row.Status===0"
122
+              @click="toSchedule(scope.row)"
122
               >排课</el-button>
123
               >排课</el-button>
123
             <el-button
124
             <el-button
124
               size="mini"
125
               size="mini"
421
     handleCopy (row) {
422
     handleCopy (row) {
422
       this.GetCourseByID({ id: row.CourseId })
423
       this.GetCourseByID({ id: row.CourseId })
423
       this.$router.push({ name: 'addCourse' })
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
 </script>
431
 </script>

+ 12
- 3
src/pages/system/courseManager/scheduleManager/edit.vue View File

161
         pagesize: 10, // 请求数据量
161
         pagesize: 10, // 请求数据量
162
         name: '', // 课程名称
162
         name: '', // 课程名称
163
         date: '',
163
         date: '',
164
+        courseid: '',
164
       },
165
       },
165
     }
166
     }
166
   },
167
   },
167
   mounted () {
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
       this.$message({
171
       this.$message({
171
         type: 'error',
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
       this.$router.push({ name: 'scheduleManager' })
182
       this.$router.push({ name: 'scheduleManager' })
175
     }
183
     }
176
     this.postData.date = date
184
     this.postData.date = date
177
     this.postData.caseid = caseid
185
     this.postData.caseid = caseid
186
+    this.postData.courseid = courseid
178
     this.updateLocationInfo()
187
     this.updateLocationInfo()
179
     this.$nextTick(function () {
188
     this.$nextTick(function () {
180
       this.getList()
189
       this.getList()

+ 18
- 7
src/pages/system/courseManager/scheduleManager/index.vue View File

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

+ 1
- 1
src/pages/system/verificationManager/phoneVerification/verificationList/index.vue View File

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

+ 1
- 1
src/pages/system/verificationManager/qrcodeVerification/verificationList/index.vue View File

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

+ 3
- 0
src/store/course/schedule.js View File

89
         }
89
         }
90
       })
90
       })
91
     },
91
     },
92
+    SetListNull ({ commit }) {
93
+      commit('updatesSheduleList', [])
94
+    }
92
   }
95
   }
93
 }
96
 }