diff --git a/src/views/train/synInfo/components/sendUtil.vue b/src/views/train/synInfo/components/sendUtil.vue index 6e06834..36a958b 100644 --- a/src/views/train/synInfo/components/sendUtil.vue +++ b/src/views/train/synInfo/components/sendUtil.vue @@ -4,13 +4,13 @@ :visible.sync="visible" :append-to-body="appendToBody" :before-close="beforeClose" - title="推送" + title="推送??" width="1000px" destroy-on-close> - + - + - + - + @@ -98,6 +98,17 @@ export default { user: '', tm: new Date().getTime(), list: [] + }, + rules: { + APPOINT_DEPARTMENT_ID: [ + { required: true, message: '请选择指定监管部门', trigger: 'change' } + ], + APPOINT_USER_ID: [ + { required: true, message: '请选择指定监管部门审批人', trigger: 'change' } + ], + APPOINT_CORP_ID: [ + { required: true, message: '请选择企业', trigger: 'change' } + ] } } }, @@ -139,17 +150,21 @@ export default { this.visible = false }, sendMessage() { - this.form.list = this.heirloom - console.log(this.form) - requestFN( - '/trainingbatch/sendMessage', this.form - ).then((data) => { - if (data.code !== '0') { - this.$message.error(data.msg) + this.$refs.form.validate((valid) => { + if (!valid) { + this.$message.error('请填写完整信息') } else { - this.$message.success('推送成功') - this.visible = false - this.$emit('refresh', '') + this.form.list = this.heirloom + requestFN('/trainingbatch/sendMessage', this.form + ).then((data) => { + if (data.code !== '0') { + this.$message.error(data.msg) + } else { + this.$message.success('推送成功') + this.visible = false + this.$emit('refresh', '') + } + }) } }) },