diff --git a/src/views/modules/base/epidemic/natInfo/natForm.vue b/src/views/modules/base/epidemic/natInfo/natForm.vue index b804a953..3011ec1d 100644 --- a/src/views/modules/base/epidemic/natInfo/natForm.vue +++ b/src/views/modules/base/epidemic/natInfo/natForm.vue @@ -380,10 +380,7 @@ export default { async handleComfirm () { - this.btnDisable = true - setTimeout(() => { - this.btnDisable = false - }, 5000) + const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 if (regPhone.test(this.formData.mobile) === false) { @@ -404,6 +401,19 @@ export default { return false; } + if (this.formData.channel.length > 0 && !this.formData.content) { + this.$message({ + type: 'warning', + message: '请填写通知内容' + }) + return false; + } + + this.btnDisable = true + setTimeout(() => { + this.btnDisable = false + }, 5000) + let url = '' if (this.formType === 'add') { url = '/epmetuser/icNat/add' diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue index 4ef86d81..28cb8960 100644 --- a/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue +++ b/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue @@ -490,17 +490,6 @@ export default { async handleComfirm () { - this.btnDisable = true - setTimeout(() => { - this.btnDisable = false - }, 5000) - - - await this.addVero() - - - }, - async addVero () { let list = [] if (this.activeName === 'first') { list.push(this.formData1) @@ -523,12 +512,31 @@ export default { }) return false; } + + if (this.formData1.channel.length > 0 && !this.formData1.content) { + this.$message({ + type: 'warning', + message: '请填写通知内容' + }) + return false; + } + } else { + + if (this.selectionAll.length === 0) { this.$message.info('请选择批量添加的人员') return false } + if (this.formData2.channel.length > 0 && !this.formData2.content) { + this.$message({ + type: 'warning', + message: '请填写通知内容' + }) + return false; + } + this.selectionAll.forEach(element => { let obj = { name: element.name, @@ -544,7 +552,10 @@ export default { } console.log(list) - + this.btnDisable = true + setTimeout(() => { + this.btnDisable = false + }, 5000) let url = '/epmetuser/icEpidemicSpecialAttention/vaccination-add' // url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/save" diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue index 619e9eb0..b28e62fe 100644 --- a/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue +++ b/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue @@ -149,18 +149,20 @@ export default { }, + async handleComfirm () { + if (this.formData.channel.length > 0 && !this.formData.content) { + this.$message({ + type: 'warning', + message: '请填写通知内容' + }) + return false; + } + this.btnDisable = true setTimeout(() => { this.btnDisable = false }, 5000) - - - await this.addVero() - - }, - async addVero () { - let url = '/epmetuser/icEpidemicSpecialAttention/vaccination-update' // url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icEpidemicSpecialAttention/vaccination-update" diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue index 4521a19f..f1090c1e 100644 --- a/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue +++ b/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue @@ -376,13 +376,15 @@ export default { this.total = data.total this.tableData = data.list - this.tableData.forEach(item => { - if (item.time) { - let timeArray = item.time.split(' ') - item.time = timeArray[0] - } + this.analysisTableSelection() - }); + // this.tableData.forEach(item => { + // if (item.time) { + // let timeArray = item.time.split(' ') + // item.time = timeArray[0] + // } + + // }); } else { this.$message.error(msg) } @@ -398,7 +400,7 @@ export default { } else { for (let i = 0; i < this.selectionAll.length; i++) { let item = this.selectionAll[i] - if (item.ID_CARD === row.ID_CARD) { + if (item.idCard === row.idCard) { this.selectionAll.splice(i, 1) break } @@ -416,7 +418,7 @@ export default { let isHasItem = false for (let j = 0; j < this.selectionAll.length; j++) { let selectionItem = this.selectionAll[j] - if (selectionItem.ID_CARD === tableItem.ID_CARD) { + if (selectionItem.idCard === tableItem.idCard) { isHasItem = true if (!selFlag) { this.selectionAll.splice(j, 1) @@ -429,7 +431,6 @@ export default { if (!isHasItem && selFlag) { this.selectionAll.push(tableItem) } - } }, @@ -444,7 +445,7 @@ export default { for (let j = 0; j < this.selectionAll.length; j++) { let selectionItem = this.selectionAll[j] - if (selectionItem.ID_CARD === tableItem.ID_CARD) { + if (selectionItem.idCard === tableItem.idCard) { tableItem.isSel = true break @@ -512,7 +513,7 @@ export default { this.visiteListFormShow = true this.$nextTick(() => { - this.$refs.ref_visitelist.initTable(row.idCard) + this.$refs.ref_visitelist.initTable(row) }) diff --git a/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue b/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue index 304f6efb..0ef6381f 100644 --- a/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue +++ b/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue @@ -9,10 +9,10 @@ class="form"> - + 小程序通知 + v-model="formData.content"> @@ -70,9 +70,11 @@ export default { btnDisable: false, formData: { - - noticeWay: [], - noticeContent: '', + origin: '1', + channel: [], + content: '', + userList: [], + orgName }, selectionAll: [] @@ -94,27 +96,24 @@ export default { this.$refs['ref_form1'].resetFields(); this.selectionAll = selectionAll - }, - async handleComfirm () { - this.btnDisable = true - setTimeout(() => { - this.btnDisable = false - }, 5000) + async handleComfirm () { - await this.sendNotice() - }, - async sendNotice () { console.log(this.formData) return false + this.btnDisable = true + setTimeout(() => { + this.btnDisable = false + }, 5000) + let url = '' - url = '/gov/project/memoConcern/update' - // url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/update" + url = '/epmetuser/icNotice/batchnotice' + // url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNotice/batchnotice" const { data, code, msg } = await requestPost(url, this.formData) @@ -152,8 +151,8 @@ export default { idCard: '', phone: '', remark: '', - noticeWay: [], - noticeContent: '', + channel: [], + content: '', } }, @@ -194,35 +193,12 @@ export default { ...mapGetters(['clientHeight', 'iframeHeight']), dataRule () { return { - name: [ - { required: true, message: '姓名不能为空', trigger: 'blur' } - ], - idCard: [ - { required: true, message: '身份证号不能为空', trigger: 'blur' } - ], - phone: [ - { required: true, message: '手机号不能为空', trigger: 'blur' }, - ], - checkTime: [ - { required: true, message: '检测时间不能为空', trigger: 'blur' }, - ], - - address: [ - { required: false }, - ], - result: [ - { required: true }, - ], - address: [ - { required: false }, + channel: [ + { required: true, message: '通知渠道不能为空', trigger: 'blur' } ], - noticeWay: [ - { required: false }, - ], - noticeContent: [ - { required: false }, - ], - + content: [ + { required: true, message: '通知内容不能为空', trigger: 'blur' } + ] } }, diff --git a/src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue b/src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue index b2331351..524cc20b 100644 --- a/src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue +++ b/src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue @@ -50,7 +50,7 @@