From a25fb99dcd89533d454213f333bcef9b133f0e54 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 30 Mar 2022 09:54:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/epidemic/natInfo/natForm.vue | 44 ++++++++++++++----- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/src/views/modules/base/epidemic/natInfo/natForm.vue b/src/views/modules/base/epidemic/natInfo/natForm.vue index 8d1b761e..f656dd0f 100644 --- a/src/views/modules/base/epidemic/natInfo/natForm.vue +++ b/src/views/modules/base/epidemic/natInfo/natForm.vue @@ -162,13 +162,17 @@ prop="channel" label-width="150px" style="display: block"> - + + 小程序通知 + + 短信通知 - + --> 0 && !this.formData.content) { - this.$message({ - type: 'warning', - message: '请填写通知内容' - }) - return false; + if (this.formData.isSelChannel) { + if (!this.formData.content) { + this.$message({ + type: 'warning', + message: '请填写通知内容' + }) + return false; + } else { + this.formData.channel = ['0'] + } + + } else { + this.formData.channel = [] } this.btnDisable = true @@ -518,6 +539,7 @@ export default { natTime: '', natAddress: '', natResult: '', + isSelChannel: false, channel: [], content: '', From 2f05880d4318f9dc156dc13e4960194a7d8ae537 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 30 Mar 2022 10:52:02 +0800 Subject: [PATCH 2/2] bug --- .../modules/base/epidemic/natInfo/natForm.vue | 15 +++- .../base/epidemic/veroFocus/veroFocusAdd.vue | 79 ++++++++++++++----- .../base/epidemic/veroFocus/veroFocusEdit.vue | 33 +++++--- .../base/epidemic/veroFocus/vfSendNotice.vue | 28 ++++++- .../base/epidemic/veroFocus/vfVisiteList.vue | 4 +- 5 files changed, 121 insertions(+), 38 deletions(-) diff --git a/src/views/modules/base/epidemic/natInfo/natForm.vue b/src/views/modules/base/epidemic/natInfo/natForm.vue index f656dd0f..1da56223 100644 --- a/src/views/modules/base/epidemic/natInfo/natForm.vue +++ b/src/views/modules/base/epidemic/natInfo/natForm.vue @@ -392,10 +392,19 @@ export default { } }, + handleComfirm () { + this.$refs['ref_form'].validate((valid, messageObj) => { + if (!valid) { + app.util.validateRule(messageObj) - async handleComfirm () { + } else { + this.addNat() + } + }) + }, + async addNat () { const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 if (regPhone.test(this.formData.mobile) === false) { this.btnDisable = false @@ -587,9 +596,7 @@ export default { natResult: [ { required: true }, ], - natAddress: [ - { required: false }, - ], + channel: [ { required: false }, ], diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue index ba00652e..d952132d 100644 --- a/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue +++ b/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue @@ -64,13 +64,16 @@ prop="channel" label-width="150px" style="display: block"> - + 小程序通知 + + 短信通知 - + --> - + 小程序通知 + { + if (!valid) { + app.util.validateRule(messageObj) + + } else { + this.handleVero() + } + }) + }, - async handleComfirm () { + async handleVero () { let list = [] if (this.activeName === 'first') { list.push(this.formData1) @@ -513,12 +538,19 @@ export default { return false; } - if (this.formData1.channel.length > 0 && !this.formData1.content) { - this.$message({ - type: 'warning', - message: '请填写通知内容' - }) - return false; + if (this.formData1.isSelChannel) { + if (!this.formData1.content) { + this.$message({ + type: 'warning', + message: '请填写通知内容' + }) + return false; + } else { + this.formData1.channel = ['0'] + } + + } else { + this.formData1.channel = [] } } else { @@ -529,12 +561,19 @@ export default { return false } - if (this.formData2.channel.length > 0 && !this.formData2.content) { - this.$message({ - type: 'warning', - message: '请填写通知内容' - }) - return false; + if (this.formData2.isSelChannel) { + if (!this.formData2.content) { + this.$message({ + type: 'warning', + message: '请填写通知内容' + }) + return false; + } else { + this.formData2.channel = ['0'] + } + + } else { + this.formData2.channel = [] } this.selectionAll.forEach(element => { @@ -604,6 +643,7 @@ export default { idCard: '', mobile: '', remark: '', + isSelChannel: false, channel: [], content: '', attentionType: 1, @@ -612,6 +652,7 @@ export default { this.formData2 = { attentionType: 1, remark: '', + isSelChannel: false, channel: [], content: '', } diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue index 19297662..0c12d5e0 100644 --- a/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue +++ b/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue @@ -63,13 +63,16 @@ prop="channel" label-width="150px" style="display: block"> - + 小程序通知 + + 短信通知 - + --> 0 && !this.formData.content) { - this.$message({ - type: 'warning', - message: '请填写通知内容' - }) - return false; + if (this.formData.isSelChannel) { + if (!this.formData.content) { + this.$message({ + type: 'warning', + message: '请填写通知内容' + }) + return false; + } else { + this.formData.channel = ['0'] + } + + } else { + this.formData.channel = [] } this.btnDisable = true @@ -202,6 +214,7 @@ export default { idCard: '', mobile: '', remark: '', + isSelChannel: false, channel: [], content: '', diff --git a/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue b/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue index e341a6d5..957388e6 100644 --- a/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue +++ b/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue @@ -12,13 +12,16 @@ prop="channel" label-width="150px" style="display: block"> - + 小程序通知 + + 短信通知 - + --> @@ -156,6 +156,7 @@ export default { // const url = '/epmetuser/followup/page' const url = 'http://yapi.elinkservice.cn/mock/245/epmetuser/followup/page' let params = { + name: this.formData.name, idCard: this.formData.idCard, pageNo: this.pageNo, pageSize: this.pageSize, @@ -207,6 +208,7 @@ export default { const url = "/epmetuser/followup/export" let params = { idCard: this.formData.idCard, + name: this.formData.name, }