From 5c53a09ff28e5be90af9c1bc0534a4320fc5aec0 Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期一, 23 十二月 2024 14:08:11 +0800 Subject: [PATCH] ll --- admin/src/views/workorder/components/OperaYwWorkorderWindow.vue | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/admin/src/views/workorder/components/OperaYwWorkorderWindow.vue b/admin/src/views/workorder/components/OperaYwWorkorderWindow.vue index 4f8ce99..c97fbf4 100644 --- a/admin/src/views/workorder/components/OperaYwWorkorderWindow.vue +++ b/admin/src/views/workorder/components/OperaYwWorkorderWindow.vue @@ -140,7 +140,7 @@ this.visible = true this.getProject() this.getCate() - // 鏂板缓 + // 鏂板缓 if (target == null) { this.form = { id: null, @@ -192,7 +192,11 @@ }, getProject() { getProjectList({}).then(res => { - this.projectList = res + this.projectList = res || [] + if(this.projectList.length > 0){ + this.$set(this.form, 'projectId', this.projectList[0].id) + this.getBuild(this.projectList[0].id) + } }) }, getBuild(projectId) { @@ -200,7 +204,11 @@ this.$set(this.form, 'floorId', '') this.$set(this.form, 'roomId', '') getBuildList({ projectId }).then(res => { - this.buildList = res + this.buildList = res || [] + // if(projectId && this.buildList.length > 0){ + // this.$set(this.form, 'buildingId', this.buildList[0].id) + // this.changeBuild(this.buildList[0].id) + // } }) }, changeBuild(e) { -- Gitblit v1.9.3