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

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

@ -64,13 +64,16 @@
prop="channel" prop="channel"
label-width="150px" label-width="150px"
style="display: block"> 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" <el-checkbox key="1"
label="1">小程序通知</el-checkbox> label="1">小程序通知</el-checkbox>
<!-- <el-checkbox key="2" <el-checkbox key="2"
label="2">短信通知</el-checkbox> --> label="2">短信通知</el-checkbox>
</el-checkbox-group> </el-checkbox-group> -->
</el-form-item> </el-form-item>
<el-form-item label="通知内容" <el-form-item label="通知内容"
@ -231,13 +234,16 @@
prop="channel" prop="channel"
label-width="100px" label-width="100px"
style="display: block"> 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" <el-checkbox key="0"
label="0">小程序通知</el-checkbox> label="0">小程序通知</el-checkbox>
<el-checkbox key="1" <el-checkbox key="1"
label="1">短信通知</el-checkbox> label="1">短信通知</el-checkbox>
</el-checkbox-group> </el-checkbox-group> -->
</el-form-item> </el-form-item>
<el-form-item label="通知内容" <el-form-item label="通知内容"
@ -301,6 +307,7 @@ export default {
idCard: '', idCard: '',
mobile: '', mobile: '',
remark: '', remark: '',
isSelChannel: false,
channel: [], channel: [],
content: '', content: '',
@ -309,6 +316,7 @@ export default {
formData2: { formData2: {
attentionType: 1, attentionType: 1,
remark: '', remark: '',
isSelChannel: false,
channel: [], channel: [],
content: '', 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 = [] let list = []
if (this.activeName === 'first') { if (this.activeName === 'first') {
list.push(this.formData1) list.push(this.formData1)
@ -513,12 +538,19 @@ export default {
return false; return false;
} }
if (this.formData1.channel.length > 0 && !this.formData1.content) { if (this.formData1.isSelChannel) {
this.$message({ if (!this.formData1.content) {
type: 'warning', this.$message({
message: '请填写通知内容' type: 'warning',
}) message: '请填写通知内容'
return false; })
return false;
} else {
this.formData1.channel = ['0']
}
} else {
this.formData1.channel = []
} }
} else { } else {
@ -529,12 +561,19 @@ export default {
return false return false
} }
if (this.formData2.channel.length > 0 && !this.formData2.content) { if (this.formData2.isSelChannel) {
this.$message({ if (!this.formData2.content) {
type: 'warning', this.$message({
message: '请填写通知内容' type: 'warning',
}) message: '请填写通知内容'
return false; })
return false;
} else {
this.formData2.channel = ['0']
}
} else {
this.formData2.channel = []
} }
this.selectionAll.forEach(element => { this.selectionAll.forEach(element => {
@ -604,6 +643,7 @@ export default {
idCard: '', idCard: '',
mobile: '', mobile: '',
remark: '', remark: '',
isSelChannel: false,
channel: [], channel: [],
content: '', content: '',
attentionType: 1, attentionType: 1,
@ -612,6 +652,7 @@ export default {
this.formData2 = { this.formData2 = {
attentionType: 1, attentionType: 1,
remark: '', remark: '',
isSelChannel: false,
channel: [], channel: [],
content: '', content: '',
} }

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

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

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

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

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

@ -86,7 +86,7 @@
show-word-limit show-word-limit
:autosize="{ minRows: 4, maxRows: 10 }" :autosize="{ minRows: 4, maxRows: 10 }"
clearable clearable
placeholder="请输入通知内容" placeholder="请输入随访内容"
v-model="formData.content"></el-input> v-model="formData.content"></el-input>
</el-form-item> </el-form-item>
@ -156,6 +156,7 @@ export default {
// const url = '/epmetuser/followup/page' // const url = '/epmetuser/followup/page'
const url = 'http://yapi.elinkservice.cn/mock/245/epmetuser/followup/page' const url = 'http://yapi.elinkservice.cn/mock/245/epmetuser/followup/page'
let params = { let params = {
name: this.formData.name,
idCard: this.formData.idCard, idCard: this.formData.idCard,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
@ -207,6 +208,7 @@ export default {
const url = "/epmetuser/followup/export" const url = "/epmetuser/followup/export"
let params = { let params = {
idCard: this.formData.idCard, idCard: this.formData.idCard,
name: this.formData.name,
} }

Loading…
Cancel
Save