|
@@ -183,6 +183,13 @@
|
183
|
183
|
</el-table-column>
|
184
|
184
|
</el-table>
|
185
|
185
|
</div>
|
|
186
|
+ <el-pagination
|
|
187
|
+ @current-change="handleCurrentChange"
|
|
188
|
+ :current-page.sync="postData.page"
|
|
189
|
+ :page-size="postData.pagesize"
|
|
190
|
+ layout="prev, pager, next, jumper"
|
|
191
|
+ :total="total">
|
|
192
|
+ </el-pagination>
|
186
|
193
|
<span slot="footer" class="dialog-footer">
|
187
|
194
|
<el-button @click="selCourseVisible = false">取 消</el-button>
|
188
|
195
|
<el-button type="primary" @click="addCourseOk">确 定</el-button>
|
|
@@ -209,6 +216,11 @@ export default {
|
209
|
216
|
detailimg: '',
|
210
|
217
|
selCourseVisible: false,
|
211
|
218
|
selCourseList: [],
|
|
219
|
+ postData: {
|
|
220
|
+ page: 1,
|
|
221
|
+ pagesize: 6
|
|
222
|
+ },
|
|
223
|
+ total: 0,
|
212
|
224
|
}
|
213
|
225
|
},
|
214
|
226
|
components: {},
|
|
@@ -276,6 +288,10 @@ export default {
|
276
|
288
|
}
|
277
|
289
|
return true
|
278
|
290
|
},
|
|
291
|
+ handleCurrentChange (val) {
|
|
292
|
+ this.postData.page = val
|
|
293
|
+ this.getCourse()
|
|
294
|
+ },
|
279
|
295
|
submit () {
|
280
|
296
|
var checkOff = this.checkFn([{
|
281
|
297
|
target: Boolean(this.CaseId || ''),
|
|
@@ -309,7 +325,7 @@ export default {
|
309
|
325
|
if (!checkOff) {
|
310
|
326
|
return false
|
311
|
327
|
}
|
312
|
|
- if (this.detail.IsAllCourse === '0' && !this.detail.Courses.length) {
|
|
328
|
+ if (this.detail.IsAllCourse === 0 && !this.detail.Courses.length) {
|
313
|
329
|
this.$message({
|
314
|
330
|
message: '选择指定课程不能为空',
|
315
|
331
|
type: 'error'
|
|
@@ -345,7 +361,10 @@ export default {
|
345
|
361
|
this.GetCaseInfo({ id: this.id })
|
346
|
362
|
},
|
347
|
363
|
getCourse () {
|
348
|
|
- this.GetCourseList({ caseid: this.CaseId === 'all' ? '' : this.CaseId, page: 1, pagesize: 100, status: 1 })
|
|
364
|
+ this.GetCourseList({ caseid: this.CaseId === 'all' ? '' : this.CaseId, ...this.postData, callback: this.coursesShow }).then((res) => {
|
|
365
|
+ this.postData.page = res.page
|
|
366
|
+ this.total = res.pagenum
|
|
367
|
+ })
|
349
|
368
|
},
|
350
|
369
|
toggleSelection (rows) {
|
351
|
370
|
if (rows) {
|