From a2299a6d4a6f99e9c11132138f5d3e9ec68f03ea Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 06 六月 2025 19:19:34 +0800
Subject: [PATCH] 开发更新

---
 admin/src/views/project/components/OperaYwRoomWindow.vue |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/admin/src/views/project/components/OperaYwRoomWindow.vue b/admin/src/views/project/components/OperaYwRoomWindow.vue
index cdfdf2d..1ed0a57 100644
--- a/admin/src/views/project/components/OperaYwRoomWindow.vue
+++ b/admin/src/views/project/components/OperaYwRoomWindow.vue
@@ -23,7 +23,7 @@
         <el-input v-model="form.code" placeholder="璇疯緭鍏ユ埧闂寸紪鍙�" v-trim />
       </el-form-item>
       <el-form-item label="鏄惁鎷涘晢" prop="isInvestment">
-        <el-switch v-model="form.isInvestment" active-value="1" inactive-value="0">
+        <el-switch v-model="form.isInvestment" :active-value="1" :inactive-value="0">
         </el-switch>
       </el-form-item>
       <el-form-item label="寤虹瓚闈㈢Н(m虏)" prop="area">
@@ -67,7 +67,7 @@
         imgurl: '',
         code: '',
         roomNum: '',
-        isInvestment: '0',
+        isInvestment: 0,
         area: '',
         feeArea: '',
         rentArea: '',
@@ -101,6 +101,8 @@
       this.title = title
       this.visible = true
       this.getProject()
+      this.buildList = []
+      this.floorList = []
       // 鏂板缓缁勭粐
       if (target == null) {
         this.$nextTick(() => {
@@ -114,6 +116,16 @@
       this.$nextTick(() => {
         this.getDetail(target.id)
       })
+    },
+    confirm() {
+      if (!this.form.feeArea) {
+        this.form.feeArea = this.form.rentArea
+      }
+      if (this.form.id == null || this.form.id === '') {
+        this.__confirmCreate()
+        return
+      }
+      this.__confirmEdit()
     },
     getDetail(id) {
       detailById(id).then(res => {
@@ -133,6 +145,10 @@
     getProject() {
       getProjectList({}).then(res => {
         this.projectList = res || []
+        if (this.projectList.length > 0) {
+          this.$set(this.form, 'projectId', this.projectList[0].id)
+          this.changeProject(this.projectList[0].id)
+        }
       })
 
     },
@@ -140,6 +156,9 @@
       this.form.buildingId = ''
       getBuildList({ projectId: e }).then(res => {
         this.buildList = res || []
+        // if(this.buildList.length > 0){
+        //   this.form.buildingId = this.buildList[0].id
+        // }
       })
     },
     changeBuild(e) {

--
Gitblit v1.9.3