| | |
| | | |
| | | export const adddata = (row) => { |
| | | return request({ |
| | | url: '/api/trainingRegistration/submit', |
| | | url: '/api/trainingRegistration/save', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const cancelTrain = (row) => { |
| | | return request({ |
| | | url: '/api/trainingRegistration/cancelTrain', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | |
| | | // import( /* webpackChunkName: "views" */ '@/views/securityEquipment/gun') |
| | | // }] |
| | | // }, |
| | | // { |
| | | // path: '/trainingRegistration', |
| | | // component: Layout, |
| | | // redirect: '/trainingRegistration/index', |
| | | // children: [{ |
| | | // path: 'index', |
| | | // name: '保安培训报名管理', |
| | | // meta: { |
| | | // i18n: 'dict' |
| | | // }, |
| | | // component: () => |
| | | // import ( /* webpackChunkName: "views" */ '@/views/trainingRegistration/index') |
| | | // }] |
| | | // }, |
| | | { |
| | | path: '/trainingRegistration', |
| | | component: Layout, |
| | | redirect: '/trainingRegistration/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '保安培训报名管理', |
| | | meta: { |
| | | i18n: 'dict' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/trainingRegistration/index') |
| | | }] |
| | | }, { |
| | | path: '/securityAnalysis', |
| | | component: Layout, |
| | | redirect: '/securityAnalysis/index', |
| | |
| | | // import( /* webpackChunkName: "views" */ '@/views/securityEquipment/gun') |
| | | // }] |
| | | // }, |
| | | { |
| | | path: '/trainingRegistration', |
| | | component: Layout, |
| | | redirect: '/trainingRegistration/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '保安培训报名', |
| | | meta: { |
| | | i18n: 'dict' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/trainingRegistration/index') |
| | | }] |
| | | }, |
| | | // { |
| | | // path: '/trainingRegistration', |
| | | // component: Layout, |
| | | // redirect: '/trainingRegistration/index', |
| | | // children: [{ |
| | | // path: 'index', |
| | | // name: '保安培训报名', |
| | | // meta: { |
| | | // i18n: 'dict' |
| | | // }, |
| | | // component: () => |
| | | // import ( /* webpackChunkName: "views" */ '@/views/trainingRegistration/index') |
| | | // }] |
| | | // }, |
| | | { |
| | | path: '/trainExam', |
| | | component: Layout, |
| | |
| | | > |
| | | |
| | | <template slot-scope="{ type,row }" slot="menu"> |
| | | <el-button |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-edit" |
| | | @click="handleTrainApply(row)" |
| | | >报名 |
| | | </el-button> |
| | | </template> |
| | | <el-button |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-edit" |
| | | @click="handleTrainApply(row)" |
| | | >报名 |
| | | </el-button> |
| | | <el-button |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-edit" |
| | | @click="handleTrainApplyBatch(row)" |
| | | >批量报名 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | handleTrainApply(row){ |
| | | //保安公司批量报名 |
| | | handleTrainApplyBatch(row){ |
| | | this.dialogDisable = true; |
| | | this.optionTrainApply.column.trainingUnitId = row.departmentid; |
| | | this.formTrainApply = { |
| | | trainingUnitId: row.departmentid |
| | | } |
| | | }, |
| | | //未持证保安人员报名 |
| | | handleTrainApply(row,done,loading){ |
| | | row['userId'] = this.userInfo.user_id; |
| | | row['trainingUnitId'] = row.departmentid; |
| | | adddata(row).then( |
| | | (res) => { |
| | | // this.onLoad(this.page); |
| | | if(res.data.data==201){ |
| | | this.$message({ |
| | | type: "warning", |
| | | message:"已报名,不能重复报名", |
| | | }); |
| | | }else if(res.data.data==201){ |
| | | this.$message({ |
| | | type: "warning", |
| | | message:"报名失败", |
| | | }); |
| | | }else{ |
| | | this.$message({ |
| | | type: "success", |
| | | message:"报名成功", |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | //关闭窗口清除数据 |
| | | closeDialog(){ |
| | | this.$refs.formTrainApply.resetFields(); |