|
@ -179,15 +179,6 @@ |
|
|
@click="handleComfirm">确 定</el-button> |
|
|
@click="handleComfirm">确 定</el-button> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<el-dialog :visible.sync="dialogVisible" |
|
|
|
|
|
width="550px" |
|
|
|
|
|
top="5vh" |
|
|
|
|
|
append-to-body> |
|
|
|
|
|
<img width="100%" |
|
|
|
|
|
:src="dialogImageUrl" |
|
|
|
|
|
alt=""> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -203,8 +194,7 @@ export default { |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 |
|
|
formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 |
|
|
hideUploadEdit: false, // 隐藏'上传按钮' |
|
|
|
|
|
limitNum: 1, |
|
|
|
|
|
enterType: '1',//录入方式1 手动输入 2 选择居民 |
|
|
enterType: '1',//录入方式1 手动输入 2 选择居民 |
|
|
isFromResi: false,//是否从已有居民信息中选择 |
|
|
isFromResi: false,//是否从已有居民信息中选择 |
|
|
|
|
|
|
|
@ -218,12 +208,13 @@ export default { |
|
|
|
|
|
|
|
|
btnDisable: false, |
|
|
btnDisable: false, |
|
|
|
|
|
|
|
|
icVaccineId: '', |
|
|
vaccineId: '', |
|
|
formData: { |
|
|
formData: { |
|
|
icVaccineId: '', |
|
|
vaccineId: '', |
|
|
agencyId: '',//当前网格所属组织Id |
|
|
agencyId: '',//当前网格所属组织Id |
|
|
userId: '',//居民端小程序的用户id、数字社区的icResiUserId、其他情况无值 |
|
|
userId: '',//居民端小程序的用户id、数字社区的icResiUserId、其他情况无值 |
|
|
userType: 'icresi',//居民端小程序的人:resi;数字社区的居民:icresi;导入的:import;同步的:synchro |
|
|
userType: 'icresi',//居民端小程序的人:resi;数字社区的居民:icresi;导入的:import;同步的:synchro |
|
|
|
|
|
isResiUser: "0",//是否客户下居民(0:否 1:是) |
|
|
name: '', |
|
|
name: '', |
|
|
idCard: '', |
|
|
idCard: '', |
|
|
mobile: '', |
|
|
mobile: '', |
|
@ -253,7 +244,7 @@ export default { |
|
|
this.formData.content = '' |
|
|
this.formData.content = '' |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async initForm (type, icVaccineId) { |
|
|
async initForm (type, row) { |
|
|
this.startLoading() |
|
|
this.startLoading() |
|
|
this.formData.agencyId = this.agencyId |
|
|
this.formData.agencyId = this.agencyId |
|
|
|
|
|
|
|
@ -262,11 +253,16 @@ export default { |
|
|
this.enterType = '1' |
|
|
this.enterType = '1' |
|
|
this.formType = type |
|
|
this.formType = type |
|
|
|
|
|
|
|
|
if (icVaccineId) { |
|
|
if (row) { |
|
|
this.icVaccineId = icVaccineId |
|
|
|
|
|
this.formData.icVaccineId = icVaccineId |
|
|
if (row.userId) { |
|
|
this.isFromResi = false |
|
|
this.isFromResi = true |
|
|
await this.loadFormData() |
|
|
} |
|
|
|
|
|
row.content = '' |
|
|
|
|
|
row.isSelChannel = false |
|
|
|
|
|
row.channel = [] |
|
|
|
|
|
this.formData = { ...row } |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.endLoading() |
|
|
this.endLoading() |
|
@ -283,8 +279,10 @@ export default { |
|
|
|
|
|
|
|
|
this.$refs['ref_form'].resetFields(); |
|
|
this.$refs['ref_form'].resetFields(); |
|
|
if (value === '2') { |
|
|
if (value === '2') { |
|
|
|
|
|
this.formData.isResiUser = "1" |
|
|
this.isFromResi = true |
|
|
this.isFromResi = true |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
this.formData.isResiUser = "0" |
|
|
this.isFromResi = false |
|
|
this.isFromResi = false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -335,10 +333,9 @@ export default { |
|
|
|
|
|
|
|
|
async loadFormData () { |
|
|
async loadFormData () { |
|
|
|
|
|
|
|
|
// const url = 'http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/detail' |
|
|
|
|
|
const url = '/epmetuser/icNat/detail' |
|
|
const url = '/epmetuser/icNat/detail' |
|
|
let params = { |
|
|
let params = { |
|
|
icVaccineId: this.icVaccineId, |
|
|
vaccineId: this.vaccineId, |
|
|
} |
|
|
} |
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
@ -356,7 +353,7 @@ export default { |
|
|
// } |
|
|
// } |
|
|
console.log(this.formData.isSelChannel) |
|
|
console.log(this.formData.isSelChannel) |
|
|
|
|
|
|
|
|
this.formData.icVaccineId = this.icVaccineId |
|
|
this.formData.vaccineId = this.vaccineId |
|
|
if (this.formData.userId) { |
|
|
if (this.formData.userId) { |
|
|
this.isFromResi = true |
|
|
this.isFromResi = true |
|
|
} else { |
|
|
} else { |
|
@ -375,20 +372,14 @@ export default { |
|
|
app.util.validateRule(messageObj) |
|
|
app.util.validateRule(messageObj) |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.addNat() |
|
|
this.addVaccin() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async addNat () { |
|
|
async addVaccin () { |
|
|
// if (this.imgLoading) { |
|
|
|
|
|
// this.$message({ |
|
|
|
|
|
// type: 'warning', |
|
|
|
|
|
// message: '正在上传图片,请稍候重试' |
|
|
|
|
|
// }) |
|
|
|
|
|
// return false; |
|
|
|
|
|
// } |
|
|
|
|
|
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 |
|
@ -424,6 +415,8 @@ export default { |
|
|
this.formData.content = '' |
|
|
this.formData.content = '' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.btnDisable = true |
|
|
this.btnDisable = true |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
this.btnDisable = false |
|
|
this.btnDisable = false |
|
@ -431,13 +424,13 @@ export default { |
|
|
|
|
|
|
|
|
let url = '' |
|
|
let url = '' |
|
|
if (this.formType === 'add') { |
|
|
if (this.formType === 'add') { |
|
|
url = '/epmetuser/icNat/add' |
|
|
url = '/epmetuser/icVaccine/add' |
|
|
// url = "http://yapi.elinkservice.cn/mock/102/epmetuser/icNat/add" |
|
|
|
|
|
this.formData.icVaccineId = '' |
|
|
this.formData.vaccineId = '' |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
url = '/epmetuser/icNat/edit' |
|
|
url = '/epmetuser/icVaccine/edit' |
|
|
// url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/edit" |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -448,8 +441,9 @@ export default { |
|
|
type: 'success', |
|
|
type: 'success', |
|
|
message: '操作成功' |
|
|
message: '操作成功' |
|
|
}) |
|
|
}) |
|
|
this.resetData() |
|
|
|
|
|
this.$emit('dialogOk') |
|
|
this.$emit('dialogOk') |
|
|
|
|
|
this.resetData() |
|
|
this.btnDisable = false |
|
|
this.btnDisable = false |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
@ -467,15 +461,14 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resetData () { |
|
|
resetData () { |
|
|
this.icVaccineId = '' |
|
|
this.vaccineId = '' |
|
|
this.fileList = [] |
|
|
|
|
|
this.hideUploadEdit = false |
|
|
|
|
|
|
|
|
|
|
|
this.formData = { |
|
|
this.formData = { |
|
|
icVaccineId: '', |
|
|
vaccineId: '', |
|
|
agencyId: '',//当前网格所属组织Id |
|
|
agencyId: '',//当前网格所属组织Id |
|
|
userId: '',//居民端小程序的用户id、数字社区的icResiUserId、其他情况无值 |
|
|
userId: '',//居民端小程序的用户id、数字社区的icResiUserId、其他情况无值 |
|
|
userType: 'icresi',//居民端小程序的人:resi;数字社区的居民:icresi;导入的:import;同步的:synchro |
|
|
userType: 'icresi',//居民端小程序的人:resi;数字社区的居民:icresi;导入的:import;同步的:synchro |
|
|
|
|
|
isResiUser: "0",//是否客户下居民(0:否 1:是) |
|
|
name: '', |
|
|
name: '', |
|
|
idCard: '', |
|
|
idCard: '', |
|
|
mobile: '', |
|
|
mobile: '', |
|
@ -511,22 +504,22 @@ export default { |
|
|
dataRule () { |
|
|
dataRule () { |
|
|
return { |
|
|
return { |
|
|
name: [ |
|
|
name: [ |
|
|
{ required: true, message: '姓名不能为空', trigger: 'blur' } |
|
|
{ required: true, message: '姓名不能为空', trigger: 'change' } |
|
|
], |
|
|
], |
|
|
idCard: [ |
|
|
idCard: [ |
|
|
{ required: true, message: '身份证号不能为空', trigger: 'blur' } |
|
|
{ required: true, message: '身份证号不能为空', trigger: 'change' } |
|
|
], |
|
|
], |
|
|
mobile: [ |
|
|
mobile: [ |
|
|
{ required: true, message: '手机号不能为空', trigger: 'blur' }, |
|
|
{ required: true, message: '手机号不能为空', trigger: 'change' }, |
|
|
], |
|
|
], |
|
|
inoculateTime: [ |
|
|
inoculateTime: [ |
|
|
{ required: true, message: '接种时间不能为空', trigger: 'blur' }, |
|
|
{ required: true, message: '接种时间不能为空', trigger: 'change' }, |
|
|
], |
|
|
], |
|
|
inoculateTime: [ |
|
|
inoculateTime: [ |
|
|
{ required: true, message: '接种地点不能为空', trigger: 'blur' }, |
|
|
{ required: true, message: '接种地点不能为空', trigger: 'change' }, |
|
|
], |
|
|
], |
|
|
inoculateTime: [ |
|
|
inoculateTime: [ |
|
|
{ required: true, message: '疫苗厂家不能为空', trigger: 'blur' }, |
|
|
{ required: true, message: '疫苗厂家不能为空', trigger: 'change' }, |
|
|
], |
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
|
|
|