Browse Source

必填bug

shibei_master
jiangyy 3 years ago
parent
commit
8ec7892391
  1. 18
      src/views/modules/base/epidemic/natInfo/natForm.vue
  2. 35
      src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue
  3. 16
      src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue
  4. 23
      src/views/modules/base/epidemic/veroFocus/veroFocusList.vue
  5. 74
      src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue
  6. 10
      src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue

18
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'

35
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"

16
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"

23
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)
})

74
src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue

@ -9,10 +9,10 @@
class="form">
<el-form-item label="通知渠道"
prop="noticeWay"
prop="channel"
label-width="150px"
style="display: block">
<el-checkbox-group v-model="formData.noticeWay">
<el-checkbox-group v-model="formData.channel">
<el-checkbox key="1"
label="1">小程序通知</el-checkbox>
<el-checkbox key="2"
@ -22,17 +22,17 @@
</el-form-item>
<el-form-item label="通知内容"
prop="noticeContent"
prop="content"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="1000"
show-word-limit
:autosize="{ minRows: 4, maxRows: 10 }"
:autosize="{ minRows: 10, maxRows: 15 }"
clearable
placeholder="请输入通知内容"
v-model="formData.noticeContent"></el-input>
v-model="formData.content"></el-input>
</el-form-item>
</el-form>
@ -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' }
]
}
},

10
src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue

@ -50,7 +50,7 @@
</div>
</div>
<el-dialog :visible.sync="dialogVisible"
width="550px"
width="850px"
top="5vh"
title="新增"
append-to-body
@ -141,6 +141,7 @@ export default {
methods: {
async initTable (row) {
this.formData.idCard = row.idCard
this.formData.name = row.name
this.formData.mobile = row.mobile
@ -203,11 +204,10 @@ export default {
async handleExport () {
let title = this.formData.name + '—随访记录'
const url = "/gov/org/house/exporthouseinfo"
const url = "/epmetuser/followup/export"
let params = {
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
buildingId: this.agencyObj.id
idCard: this.formData.idCard,
}
app.ajax.exportFilePost(

Loading…
Cancel
Save