diff --git a/epmet-oper-web/src/views/modules/yantai/certify.vue b/epmet-oper-web/src/views/modules/yantai/certify.vue index d69d27f..1fc8274 100644 --- a/epmet-oper-web/src/views/modules/yantai/certify.vue +++ b/epmet-oper-web/src/views/modules/yantai/certify.vue @@ -272,9 +272,13 @@ export default { handleChange (value) { - let selAgency = this.$refs["myCascader"].getCheckedNodes()[0].data - console.log(selAgency) - this.formData.orgId = selAgency.value + if (value && value.length > 0) { + let selAgency = this.$refs["myCascader"].getCheckedNodes()[0].data + console.log(selAgency) + this.formData.orgId = selAgency.value + } else { + this.formData.orgId = '' + } }, async loadTable () { diff --git a/epmet-oper-web/src/views/modules/yantai/editForm.vue b/epmet-oper-web/src/views/modules/yantai/editForm.vue index 6a6244f..21464e8 100644 --- a/epmet-oper-web/src/views/modules/yantai/editForm.vue +++ b/epmet-oper-web/src/views/modules/yantai/editForm.vue @@ -177,10 +177,17 @@ export default { }, handleChangeAgency (value) { - let selAgency = this.$refs["myCascader"].getCheckedNodes()[0].data - this.peoForm.orgName = selAgency.agencyName - this.peoForm.orgType = selAgency.level - this.peoForm.orgId = selAgency.agencyId + if (value && value.length > 0) { + let selAgency = this.$refs["myCascader"].getCheckedNodes()[0].data + this.peoForm.orgName = selAgency.agencyName + this.peoForm.orgType = selAgency.level + this.peoForm.orgId = selAgency.agencyId + } else { + this.peoForm.orgName = '' + this.peoForm.orgType = '' + this.peoForm.orgId = '' + } + },