|
@@ -90,7 +90,14 @@
|
|
</div>
|
|
</div>
|
|
<div class="right_content">
|
|
<div class="right_content">
|
|
<div class="right_content_head">
|
|
<div class="right_content_head">
|
|
- <span class="head_text">创建房屋</span>
|
|
|
|
|
|
+ <span
|
|
|
|
+ class="head_text"
|
|
|
|
+ v-if="this.todoRow == 'add' ? true : false"
|
|
|
|
+ >创建房屋</span>
|
|
|
|
+ <span
|
|
|
|
+ class="head_text"
|
|
|
|
+ v-else
|
|
|
|
+ >房屋信息</span>
|
|
<span
|
|
<span
|
|
class="close"
|
|
class="close"
|
|
@click="close"
|
|
@click="close"
|
|
@@ -228,7 +235,8 @@
|
|
class="el-mgRight-md"
|
|
class="el-mgRight-md"
|
|
:disabled="!isAdd"
|
|
:disabled="!isAdd"
|
|
@click="createDoor"
|
|
@click="createDoor"
|
|
- >{{ doorData.length ? '重新' : '' }}生成房屋</el-button>
|
|
|
|
|
|
+ >
|
|
|
|
+ {{ doorData.length ? '重新' : '' }}生成房屋</el-button>
|
|
<el-button
|
|
<el-button
|
|
@click="clearDoor"
|
|
@click="clearDoor"
|
|
:disabled="!isAdd"
|
|
:disabled="!isAdd"
|
|
@@ -436,6 +444,7 @@
|
|
></el-input>
|
|
></el-input>
|
|
</el-tag>
|
|
</el-tag>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-show="todoRow == 'edit' ? false : true"
|
|
class="el-icon-plus button-new-tag"
|
|
class="el-icon-plus button-new-tag"
|
|
size="small"
|
|
size="small"
|
|
@click="showInput"
|
|
@click="showInput"
|
|
@@ -520,6 +529,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="add-floor">
|
|
<div class="add-floor">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-show="todoRow == 'edit' ? false : true"
|
|
class="el-icon-plus button-new-tag"
|
|
class="el-icon-plus button-new-tag"
|
|
size="small"
|
|
size="small"
|
|
@click="showInput"
|
|
@click="showInput"
|
|
@@ -676,11 +686,12 @@ export default {
|
|
remarks: '',
|
|
remarks: '',
|
|
houseType: 1,
|
|
houseType: 1,
|
|
floorsNumber: '1', //每栋层数
|
|
floorsNumber: '1', //每栋层数
|
|
- unitNumber: 1, //单元数
|
|
|
|
|
|
+ // unitNumber: 1, //单元数
|
|
|
|
+ unitNumber: '', //单元数
|
|
householdsPerFloor: '1' //每层户数
|
|
householdsPerFloor: '1' //每层户数
|
|
},
|
|
},
|
|
initialUnitList: {
|
|
initialUnitList: {
|
|
- checkedUnit: true,
|
|
|
|
|
|
+ checkedUnit: false,
|
|
enableUnit: 1, //勾选了复选框
|
|
enableUnit: 1, //勾选了复选框
|
|
unit: {
|
|
unit: {
|
|
type: 'Number', // Number letter
|
|
type: 'Number', // Number letter
|
|
@@ -754,6 +765,9 @@ export default {
|
|
params: {
|
|
params: {
|
|
type: Object
|
|
type: Object
|
|
},
|
|
},
|
|
|
|
+ todoRow: {
|
|
|
|
+ type: toString
|
|
|
|
+ },
|
|
isAdd: {
|
|
isAdd: {
|
|
type: Boolean,
|
|
type: Boolean,
|
|
default: true
|
|
default: true
|
|
@@ -784,9 +798,10 @@ export default {
|
|
|
|
|
|
checkedUnit (val) {
|
|
checkedUnit (val) {
|
|
if (val) {
|
|
if (val) {
|
|
|
|
+ this.formdata.unitNumber = 1;
|
|
this.initialUnitList.enableUnit = 1;
|
|
this.initialUnitList.enableUnit = 1;
|
|
} else {
|
|
} else {
|
|
- this.formdata.unitNumber = 1;
|
|
|
|
|
|
+
|
|
this.initialUnitList.enableUnit = 0;
|
|
this.initialUnitList.enableUnit = 0;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -800,13 +815,15 @@ export default {
|
|
}).then((v) => {
|
|
}).then((v) => {
|
|
if (this.initialUnitList.checkedUnit) {
|
|
if (this.initialUnitList.checkedUnit) {
|
|
this.initialUnitList.enableUnit = 1;
|
|
this.initialUnitList.enableUnit = 1;
|
|
- } else {
|
|
|
|
this.formdata.unitNumber = 1;
|
|
this.formdata.unitNumber = 1;
|
|
|
|
+ } else {
|
|
this.initialUnitList.enableUnit = 0;
|
|
this.initialUnitList.enableUnit = 0;
|
|
}
|
|
}
|
|
let isNumberUnitFlag = this.initialUnitList.unit.type == 'Number' ? true : false;
|
|
let isNumberUnitFlag = this.initialUnitList.unit.type == 'Number' ? true : false;
|
|
let checkUnit = this.initialUnitList.unit.start <= this.initialUnitList.unit.end ? true : false;
|
|
let checkUnit = this.initialUnitList.unit.start <= this.initialUnitList.unit.end ? true : false;
|
|
|
|
+ console.log('777', this.initialUnitList.checkedUnit)
|
|
if (this.initialUnitList.checkedUnit) {
|
|
if (this.initialUnitList.checkedUnit) {
|
|
|
|
+
|
|
if (checkUnit && isNumberUnitFlag) {
|
|
if (checkUnit && isNumberUnitFlag) {
|
|
this.formdata.unitNumber = this.initialUnitList.unit.end - this.initialUnitList.unit.start + 1;
|
|
this.formdata.unitNumber = this.initialUnitList.unit.end - this.initialUnitList.unit.start + 1;
|
|
} else if (!isNumberUnitFlag && checkUnit) {
|
|
} else if (!isNumberUnitFlag && checkUnit) {
|
|
@@ -817,8 +834,21 @@ export default {
|
|
this.$message.error('单元起始和结束设置出错');
|
|
this.$message.error('单元起始和结束设置出错');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ } else {
|
|
|
|
+ if (checkUnit && isNumberUnitFlag) {
|
|
|
|
|
|
|
|
+ this.formdata.unitNumber = ''
|
|
|
|
+ // this.formdata.unitNumber = this.initialUnitList.unit.end - this.initialUnitList.unit.start + 1;
|
|
|
|
+ } else if (!isNumberUnitFlag && checkUnit) {
|
|
|
|
+ this.formdata.unitNumber = ''
|
|
|
|
+ // this.formdata.unitNumber =
|
|
|
|
+ // this.initialUnitList.unit.end.charCodeAt() - this.initialUnitList.unit.start.charCodeAt() + 1;
|
|
|
|
+ } else {
|
|
|
|
+ this.formdata.unitNumber = '';
|
|
|
|
+ // this.$message.error('单元起始和结束设置出错');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.doorData = initDoor(this.formdata, this.initialUnitList).generateUnit;
|
|
this.doorData = initDoor(this.formdata, this.initialUnitList).generateUnit;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -833,7 +863,7 @@ export default {
|
|
door: initDoor(this.formdata, this.initialUnitList).generateDoor(value)
|
|
door: initDoor(this.formdata, this.initialUnitList).generateDoor(value)
|
|
};
|
|
};
|
|
if (querySame()) {
|
|
if (querySame()) {
|
|
- debugger
|
|
|
|
|
|
+
|
|
if (code == 'unit') {
|
|
if (code == 'unit') {
|
|
arr.push({
|
|
arr.push({
|
|
unitName: value,
|
|
unitName: value,
|
|
@@ -906,7 +936,8 @@ export default {
|
|
this.formdata.householdsPerFloor = data.floorVo[0].roomList.length;
|
|
this.formdata.householdsPerFloor = data.floorVo[0].roomList.length;
|
|
this.initialUnitList = {
|
|
this.initialUnitList = {
|
|
checkedUnit: data.unitNumber !== 0 ? true : false,
|
|
checkedUnit: data.unitNumber !== 0 ? true : false,
|
|
- enableUnit: data.unitNumber !== 0 ? 1 : 0,
|
|
|
|
|
|
+ // enableUnit: data.unitNumber !== 0 ? 1 : 0,
|
|
|
|
+ enableUnit: data.unitNumber,
|
|
unit: {
|
|
unit: {
|
|
type: 'Number', // Number letter
|
|
type: 'Number', // Number letter
|
|
start: data.floorVo[0]['unitName'], // 1 A单元的起始单元
|
|
start: data.floorVo[0]['unitName'], // 1 A单元的起始单元
|
|
@@ -946,7 +977,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
.el-select-dropdown__wrap {
|
|
.el-select-dropdown__wrap {
|
|
- min-height: 80px !important;
|
|
|
|
|
|
+ min-height: 65px !important;
|
|
}
|
|
}
|
|
|
|
|
|
.formContent-item_title_center::-webkit-scrollbar {
|
|
.formContent-item_title_center::-webkit-scrollbar {
|