|
@@ -143,7 +143,7 @@
|
|
<div style="width: 100%;">
|
|
<div style="width: 100%;">
|
|
<el-select v-model="examRow.openExamVal" multiple placeholder="请选择" style="width: 100%;">
|
|
<el-select v-model="examRow.openExamVal" multiple placeholder="请选择" style="width: 100%;">
|
|
<el-option v-for="item in (examRow.offlineSignList || [])" :key="item.id" :label="item.courseOfflineName"
|
|
<el-option v-for="item in (examRow.offlineSignList || [])" :key="item.id" :label="item.courseOfflineName"
|
|
- :value="item.id">
|
|
|
|
|
|
+ :value="item.courseOfflineId">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
@@ -245,8 +245,8 @@ export default {
|
|
return {
|
|
return {
|
|
...item,
|
|
...item,
|
|
course: item.offlineSignList.map(ua => ua.courseOfflineName).join(','),
|
|
course: item.offlineSignList.map(ua => ua.courseOfflineName).join(','),
|
|
- courseIds: item.offlineSignList.map(ua => ua.id).join(','),
|
|
|
|
- courseIdList: item.offlineSignList.map(ua => ua.id)
|
|
|
|
|
|
+ courseIds: item.offlineSignList.map(ua => ua.courseOfflineId).join(','),
|
|
|
|
+ courseIdList: item.offlineSignList.map(ua => ua.courseOfflineId)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
this.total = total
|
|
this.total = total
|
|
@@ -269,6 +269,7 @@ export default {
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
editCourseRegistration(row) {
|
|
editCourseRegistration(row) {
|
|
|
|
+ console.log(row, '<=== 编辑')
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
this.registrationForm = {
|
|
this.registrationForm = {
|
|
id: row.id,
|
|
id: row.id,
|
|
@@ -305,12 +306,29 @@ export default {
|
|
},
|
|
},
|
|
submitRegistration() {
|
|
submitRegistration() {
|
|
// 这里添加提交逻辑
|
|
// 这里添加提交逻辑
|
|
- console.log(this.registrationForm, '<==== registrationForm')
|
|
|
|
- this.$message({
|
|
|
|
- type: 'success',
|
|
|
|
- message: '报名成功!'
|
|
|
|
- });
|
|
|
|
- this.dialogVisible = false;
|
|
|
|
|
|
+ const { id, name, phone, course = [] } = this.registrationForm
|
|
|
|
+ if(!name || !phone || !course.length) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '请填写完整信息'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const urls = !id ? 'course-offline-sign/save' : 'course-offline-sign/update'
|
|
|
|
+ let obj = { name, phone, courseOffLineIdStr: course.join(',') }
|
|
|
|
+ if (id) {
|
|
|
|
+ obj.userSignId = id
|
|
|
|
+ }
|
|
|
|
+ post(urls, { ...obj }).then(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: id ? '操作成功!' : '报名成功!'
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ this.getList()
|
|
|
|
+ this.dialogVisible = false;
|
|
|
|
+ })
|
|
|
|
+
|
|
},
|
|
},
|
|
// 课程管理
|
|
// 课程管理
|
|
batchManage(flag = true) {
|
|
batchManage(flag = true) {
|
|
@@ -523,9 +541,16 @@ export default {
|
|
openExamCli() {
|
|
openExamCli() {
|
|
const { id, openExamVal = [] } = this.examRow;
|
|
const { id, openExamVal = [] } = this.examRow;
|
|
console.log(openExamVal, '<==== openExamVal')
|
|
console.log(openExamVal, '<==== openExamVal')
|
|
|
|
+ if(!openExamVal.length) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'warning',
|
|
|
|
+ message: '请选择要开通的考试'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
post(`/course-offline-sign/openCourseExam`, {
|
|
post(`/course-offline-sign/openCourseExam`, {
|
|
userSignId: id,
|
|
userSignId: id,
|
|
- courseOfflineId: openExamVal.join(',')
|
|
|
|
|
|
+ courseOffLineIdStr: openExamVal.join(',')
|
|
}).then(() => {
|
|
}).then(() => {
|
|
this.$message({
|
|
this.$message({
|
|
type: 'success',
|
|
type: 'success',
|