Browse Source

Merge branch 'dev-fangyi' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-fangyi

shibei_master
13176889840 3 years ago
parent
commit
c4426350ec
  1. 59
      src/views/modules/base/epidemic/natInfo/natForm.vue
  2. 79
      src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue
  3. 33
      src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue
  4. 28
      src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue
  5. 4
      src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue

59
src/views/modules/base/epidemic/natInfo/natForm.vue

@ -162,13 +162,17 @@
prop="channel"
label-width="150px"
style="display: block">
<el-checkbox-group v-model="formData.channel">
<el-checkbox v-model="formData.isSelChannel"
key="0"
label="0">小程序通知</el-checkbox>
<!-- <el-checkbox-group v-model="formData.channel">
<el-checkbox key="0"
label="0">小程序通知</el-checkbox>
<!-- <el-checkbox key="1"
label="1">短信通知</el-checkbox> -->
<el-checkbox key="1"
label="1">短信通知</el-checkbox>
</el-checkbox-group>
</el-checkbox-group> -->
</el-form-item>
<el-form-item label="通知内容"
@ -244,6 +248,7 @@ export default {
natTime: '',
natAddress: '',
natResult: '',
isSelChannel: false,
channel: [],
content: '',
@ -270,7 +275,7 @@ export default {
methods: {
async initForm (type, icNatId) {
this.startLoading()
this.formData.agencyId = this.agencyId
this.$refs['ref_form'].resetFields();
@ -284,6 +289,8 @@ export default {
await this.loadFormData()
}
this.endLoading()
},
@ -354,7 +361,14 @@ export default {
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.formData = data
this.formData.channel = []
this.formData.content = ''
this.formData.icNatId = this.icNatId
if (this.formData.userId) {
this.isFromResi = true
} else {
this.isFromResi = false
}
this.fileList = []
if (data.fileName) {
let obj = {
@ -378,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
@ -401,12 +424,19 @@ export default {
return false;
}
if (this.formData.channel.length > 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 +548,7 @@ export default {
natTime: '',
natAddress: '',
natResult: '',
isSelChannel: false,
channel: [],
content: '',
@ -565,9 +596,7 @@ export default {
natResult: [
{ required: true },
],
natAddress: [
{ required: false },
],
channel: [
{ required: false },
],

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

@ -64,13 +64,16 @@
prop="channel"
label-width="150px"
style="display: block">
<el-checkbox-group v-model="formData1.channel">
<el-checkbox v-model="formData1.isSelChannel"
key="0"
label="0">小程序通知</el-checkbox>
<!-- <el-checkbox-group v-model="formData1.channel">
<el-checkbox key="1"
label="1">小程序通知</el-checkbox>
<!-- <el-checkbox key="2"
label="2">短信通知</el-checkbox> -->
<el-checkbox key="2"
label="2">短信通知</el-checkbox>
</el-checkbox-group>
</el-checkbox-group> -->
</el-form-item>
<el-form-item label="通知内容"
@ -231,13 +234,16 @@
prop="channel"
label-width="100px"
style="display: block">
<el-checkbox-group v-model="formData2.channel">
<el-checkbox v-model="formData2.isSelChannel"
key="0"
label="0">小程序通知</el-checkbox>
<!-- <el-checkbox-group v-model="formData2.channel">
<el-checkbox key="0"
label="0">小程序通知</el-checkbox>
<el-checkbox key="1"
label="1">短信通知</el-checkbox>
</el-checkbox-group>
</el-checkbox-group> -->
</el-form-item>
<el-form-item label="通知内容"
@ -301,6 +307,7 @@ export default {
idCard: '',
mobile: '',
remark: '',
isSelChannel: false,
channel: [],
content: '',
@ -309,6 +316,7 @@ export default {
formData2: {
attentionType: 1,
remark: '',
isSelChannel: false,
channel: [],
content: '',
},
@ -487,9 +495,26 @@ export default {
}
},
handleComfirm () {
let refName = ''
if (this.activeName === 'first') {
refName = 'ref_form1'
} else {
refName = 'ref_form2'
}
this.$refs[refName].validate((valid, messageObj) => {
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: '',
}

33
src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue

@ -63,13 +63,16 @@
prop="channel"
label-width="150px"
style="display: block">
<el-checkbox-group v-model="formData.channel">
<el-checkbox v-model="formData.isSelChannel"
key="0"
label="0">小程序通知</el-checkbox>
<!-- <el-checkbox-group v-model="formData.channel">
<el-checkbox key="0"
label="0">小程序通知</el-checkbox>
<!-- <el-checkbox key="1"
label="1">短信通知</el-checkbox> -->
<el-checkbox key="1"
label="1">短信通知</el-checkbox>
</el-checkbox-group>
</el-checkbox-group> -->
</el-form-item>
<el-form-item label="通知内容"
@ -127,6 +130,7 @@ export default {
idCard: '',
mobile: '',
remark: '',
isSelChannel: false,
channel: [],
content: '',
},
@ -145,18 +149,26 @@ export default {
this.$refs['ref_form1'].resetFields();
row.channel = []
row.content = ''
row.isSelChannel = false
this.formData = JSON.parse(JSON.stringify(row))
},
async handleComfirm () {
if (this.formData.channel.length > 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: '',

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

@ -12,13 +12,16 @@
prop="channel"
label-width="150px"
style="display: block">
<el-checkbox-group v-model="formData.channel">
<el-checkbox v-model="formData.isSelChannel"
key="0"
label="0">小程序通知</el-checkbox>
<!-- <el-checkbox-group v-model="formData.channel">
<el-checkbox key="1"
label="1">小程序通知</el-checkbox>
<!-- <el-checkbox key="2"
label="2">短信通知</el-checkbox> -->
<el-checkbox key="2"
label="2">短信通知</el-checkbox>
</el-checkbox-group>
</el-checkbox-group> -->
</el-form-item>
<el-form-item label="通知内容"
@ -71,6 +74,7 @@ export default {
formData: {
origin: '1',
isSelChannel: false,
channel: [],
content: '',
userList: [],
@ -99,6 +103,21 @@ export default {
async handleComfirm () {
if (this.formData.isSelChannel) {
if (!this.formData.content) {
this.$message({
type: 'warning',
message: '请填写通知内容'
})
return false;
} else {
this.formData.channel = ['0']
}
} else {
this.formData.channel = []
}
console.log(this.formData)
return false
@ -148,6 +167,7 @@ export default {
idCard: '',
phone: '',
remark: '',
isSelChannel: false,
channel: [],
content: '',

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

@ -86,7 +86,7 @@
show-word-limit
:autosize="{ minRows: 4, maxRows: 10 }"
clearable
placeholder="请输入通知内容"
placeholder="请输入随访内容"
v-model="formData.content"></el-input>
</el-form-item>
@ -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,
}

Loading…
Cancel
Save