diff --git a/src/views/systemConfig/responsibleUser/editResponsibleUser.vue b/src/views/systemConfig/responsibleUser/editResponsibleUser.vue index 6b4b2ff..c3d1238 100644 --- a/src/views/systemConfig/responsibleUser/editResponsibleUser.vue +++ b/src/views/systemConfig/responsibleUser/editResponsibleUser.vue @@ -76,6 +76,7 @@ this.form.deptid = row.id this.form.user = row.user this.dialogFormVisible = dialogFormVisible + this.radio = '' this.fetchData() }, fetchData() { @@ -84,10 +85,12 @@ this.list = response.data.rows this.loading = false // 根据选中情况将选择radio置为显示 - for (const index in this.list) { - const user = this.list[index] - if (user.id === this.form.user) { - this.radio = index + if (this.form.user && this.form.user !== '') { + for (const index in this.list) { + const user = this.list[index] + if (user.id === this.form.user) { + this.radio = parseInt(index) + } } } }) @@ -108,6 +111,7 @@ }, cancel() { this.dialogFormVisible = false + this.radio = '' } } }