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 () { async handleComfirm () {
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 5000)
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; // const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
if (regPhone.test(this.formData.mobile) === false) { if (regPhone.test(this.formData.mobile) === false) {
@ -404,6 +401,19 @@ export default {
return false; 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 = '' let url = ''
if (this.formType === 'add') { if (this.formType === 'add') {
url = '/epmetuser/icNat/add' url = '/epmetuser/icNat/add'

35
src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue

@ -490,17 +490,6 @@ export default {
async handleComfirm () { async handleComfirm () {
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 5000)
await this.addVero()
},
async addVero () {
let list = [] let list = []
if (this.activeName === 'first') { if (this.activeName === 'first') {
list.push(this.formData1) list.push(this.formData1)
@ -523,12 +512,31 @@ export default {
}) })
return false; return false;
} }
if (this.formData1.channel.length > 0 && !this.formData1.content) {
this.$message({
type: 'warning',
message: '请填写通知内容'
})
return false;
}
} else { } else {
if (this.selectionAll.length === 0) { if (this.selectionAll.length === 0) {
this.$message.info('请选择批量添加的人员') this.$message.info('请选择批量添加的人员')
return false return false
} }
if (this.formData2.channel.length > 0 && !this.formData2.content) {
this.$message({
type: 'warning',
message: '请填写通知内容'
})
return false;
}
this.selectionAll.forEach(element => { this.selectionAll.forEach(element => {
let obj = { let obj = {
name: element.name, name: element.name,
@ -544,7 +552,10 @@ export default {
} }
console.log(list) console.log(list)
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 5000)
let url = '/epmetuser/icEpidemicSpecialAttention/vaccination-add' let url = '/epmetuser/icEpidemicSpecialAttention/vaccination-add'
// url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/save" // 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 () { async handleComfirm () {
if (this.formData.channel.length > 0 && !this.formData.content) {
this.$message({
type: 'warning',
message: '请填写通知内容'
})
return false;
}
this.btnDisable = true this.btnDisable = true
setTimeout(() => { setTimeout(() => {
this.btnDisable = false this.btnDisable = false
}, 5000) }, 5000)
await this.addVero()
},
async addVero () {
let url = '/epmetuser/icEpidemicSpecialAttention/vaccination-update' let url = '/epmetuser/icEpidemicSpecialAttention/vaccination-update'
// url = "http://yapi.elinkservice.cn/mock/245/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.total = data.total
this.tableData = data.list this.tableData = data.list
this.tableData.forEach(item => { this.analysisTableSelection()
if (item.time) {
let timeArray = item.time.split(' ')
item.time = timeArray[0]
}
}); // this.tableData.forEach(item => {
// if (item.time) {
// let timeArray = item.time.split(' ')
// item.time = timeArray[0]
// }
// });
} else { } else {
this.$message.error(msg) this.$message.error(msg)
} }
@ -398,7 +400,7 @@ export default {
} else { } else {
for (let i = 0; i < this.selectionAll.length; i++) { for (let i = 0; i < this.selectionAll.length; i++) {
let item = this.selectionAll[i] let item = this.selectionAll[i]
if (item.ID_CARD === row.ID_CARD) { if (item.idCard === row.idCard) {
this.selectionAll.splice(i, 1) this.selectionAll.splice(i, 1)
break break
} }
@ -416,7 +418,7 @@ export default {
let isHasItem = false let isHasItem = false
for (let j = 0; j < this.selectionAll.length; j++) { for (let j = 0; j < this.selectionAll.length; j++) {
let selectionItem = this.selectionAll[j] let selectionItem = this.selectionAll[j]
if (selectionItem.ID_CARD === tableItem.ID_CARD) { if (selectionItem.idCard === tableItem.idCard) {
isHasItem = true isHasItem = true
if (!selFlag) { if (!selFlag) {
this.selectionAll.splice(j, 1) this.selectionAll.splice(j, 1)
@ -429,7 +431,6 @@ export default {
if (!isHasItem && selFlag) { if (!isHasItem && selFlag) {
this.selectionAll.push(tableItem) this.selectionAll.push(tableItem)
} }
} }
}, },
@ -444,7 +445,7 @@ export default {
for (let j = 0; j < this.selectionAll.length; j++) { for (let j = 0; j < this.selectionAll.length; j++) {
let selectionItem = this.selectionAll[j] let selectionItem = this.selectionAll[j]
if (selectionItem.ID_CARD === tableItem.ID_CARD) { if (selectionItem.idCard === tableItem.idCard) {
tableItem.isSel = true tableItem.isSel = true
break break
@ -512,7 +513,7 @@ export default {
this.visiteListFormShow = true this.visiteListFormShow = true
this.$nextTick(() => { 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"> class="form">
<el-form-item label="通知渠道" <el-form-item label="通知渠道"
prop="noticeWay" prop="channel"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-checkbox-group v-model="formData.noticeWay"> <el-checkbox-group v-model="formData.channel">
<el-checkbox key="1" <el-checkbox key="1"
label="1">小程序通知</el-checkbox> label="1">小程序通知</el-checkbox>
<el-checkbox key="2" <el-checkbox key="2"
@ -22,17 +22,17 @@
</el-form-item> </el-form-item>
<el-form-item label="通知内容" <el-form-item label="通知内容"
prop="noticeContent" prop="content"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-input class="item_width_1" <el-input class="item_width_1"
type="textarea" type="textarea"
maxlength="1000" maxlength="1000"
show-word-limit show-word-limit
:autosize="{ minRows: 4, maxRows: 10 }" :autosize="{ minRows: 10, maxRows: 15 }"
clearable clearable
placeholder="请输入通知内容" placeholder="请输入通知内容"
v-model="formData.noticeContent"></el-input> v-model="formData.content"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -70,9 +70,11 @@ export default {
btnDisable: false, btnDisable: false,
formData: { formData: {
origin: '1',
noticeWay: [], channel: [],
noticeContent: '', content: '',
userList: [],
orgName
}, },
selectionAll: [] selectionAll: []
@ -94,27 +96,24 @@ export default {
this.$refs['ref_form1'].resetFields(); this.$refs['ref_form1'].resetFields();
this.selectionAll = selectionAll this.selectionAll = selectionAll
}, },
async handleComfirm () {
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 5000)
async handleComfirm () {
await this.sendNotice()
},
async sendNotice () {
console.log(this.formData) console.log(this.formData)
return false return false
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 5000)
let url = '' let url = ''
url = '/gov/project/memoConcern/update' url = '/epmetuser/icNotice/batchnotice'
// url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/update" // url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNotice/batchnotice"
const { data, code, msg } = await requestPost(url, this.formData) const { data, code, msg } = await requestPost(url, this.formData)
@ -152,8 +151,8 @@ export default {
idCard: '', idCard: '',
phone: '', phone: '',
remark: '', remark: '',
noticeWay: [], channel: [],
noticeContent: '', content: '',
} }
}, },
@ -194,35 +193,12 @@ export default {
...mapGetters(['clientHeight', 'iframeHeight']), ...mapGetters(['clientHeight', 'iframeHeight']),
dataRule () { dataRule () {
return { return {
name: [ channel: [
{ required: true, message: '姓名不能为空', trigger: 'blur' } { 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 },
], ],
noticeWay: [ content: [
{ required: false }, { required: true, message: '通知内容不能为空', trigger: 'blur' }
], ]
noticeContent: [
{ required: false },
],
} }
}, },

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

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

Loading…
Cancel
Save