From efd87d7ac5c978dd8181f6ca4e75e0cf47c9ca45 Mon Sep 17 00:00:00 2001 From: liujun Date: Thu, 25 Jan 2024 20:03:38 +0800 Subject: [PATCH] =?UTF-8?q?13818=20=E6=89=B9=E9=87=8F=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E5=92=8C=E5=8D=95=E7=8B=AC=E6=8E=A8=E9=80=81=20=E6=96=87?= =?UTF-8?q?=E5=AD=97=E4=BF=AE=E6=94=B9=20=E7=9B=91=E7=AE=A1=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E4=B8=8D=E5=90=88=E9=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../train/synInfo/components/sendUtil.vue | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) 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', '') + } + }) } }) },