-
请选择房间(1栋3单元/2层)
+
请选择房间(1栋{{storey}}单元/{{unit}}层)
-
+
+
+
@@ -214,16 +218,34 @@ export default {
active: "1",
step: "0",
type: "0", //1新建 0选择
-
createName: "8层",
+
+ addStorey: '', // 新增楼栋号
+ addUnit: '', // 新增单元楼号
+ addFloor: '', // 新增楼层
+ addRoom: '', // 新增房间号
+
+ storey: '', // xx号楼
+ unit: '', // 单元楼号
+ room: '', // 房间号
+
+
show1: false, //是否显示
show2: false,
show3: false,
- show4: true,
+ show4: false,
+ selectShow: false, // 入驻房间号
}
},
methods: {
+
+ headerInputClick(e) {
+ const { name } = e.currentTarget.dataset;
+ const { value } = e.detail;
+ this[name] = value;
+ },
+
//弹窗创建变成创建
addCommunity() {
this.type = "1"
@@ -231,9 +253,25 @@ export default {
//保存楼栋
saveCommunity() {
- let that = this
+ let that = this;
+ if(!this.addStorey) {
+ uni.showToast({
+ title: '请输入楼栋号',
+ icon: 'none',
+ mask: true
+ })
+ return
+ }
+ if(!this.addUnit) {
+ uni.showToast({
+ title: '请输入单元号',
+ icon: 'none',
+ mask: true
+ })
+ return
+ }
uni.showModal({
- title: `您是要创建:${this.step}`,
+ title: `您是要创建:${this.addStorey}栋${this.addUnit}单元吗?`,
content: '新建的楼栋号需经物业或平台的核 实后才会创建成功。如核实未通过, 将会创建失败!',
success: function (res) {
if (res.confirm) {
@@ -246,27 +284,88 @@ export default {
});
},
//选择楼栋
- choseTower() {
+ choseTower(item) {
+ console.log('111', item);
+ this.storey = item;
this.step = "1"
},
//创建楼层
saveFloor() {
- this.type = "0"
+ // this.type = "0"
+ let that = this;
+ if(!this.addFloor) {
+ uni.showToast({
+ title: '请输入楼层',
+ icon: 'none',
+ mask: true
+ })
+ return
+ }
+
+ uni.showModal({
+ title: `您是要创建:${this.addFloor}层吗?`,
+ content: '新建的楼层需经物业或平台的核实后才会创建成功。如核实未通过,将会创建失败!',
+ success: function (res) {
+ if (res.confirm) {
+ console.log('用户点击确定');
+ that.type = "0"
+ } else if (res.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ });
},
//选择楼层
- choseFloor() {
- this.step = "2"
+ choseFloor(item) {
+ this.step = "2";
+ this.unit = item;
},
//选择房间
- choseRoom() {
- this.step = "3"
+ choseRoom(item) {
+ // this.step = "3"
+ console.log('1');
+ this.room = item;
+ this.selectShow = true
+ },
+
+ headerPopupSubmitClick () {
+ console.log('提交');
+
+ },
+ headerCloseClick() {
+ this.selectShow = false;
+ },
+
+ addRoom1() {
+ this.type = '1'
},
saveRoom() {
- this.type = "0"
+ // this.type = "0"
+ let that = this;
+ if(!this.addRoom) {
+ uni.showToast({
+ title: '请输入房间号',
+ icon: 'none',
+ mask: true
+ })
+ return
+ }
+ uni.showModal({
+ title: `您是要创建:${this.addRoom}房间吗?`,
+ content: '注意:新建的房间号需经物业或平台的核实后自动建立。如核实未通过,将会创建失败!',
+ success: function (res) {
+ if (res.confirm) {
+ console.log('用户点击确定');
+ that.type = "0"
+ } else if (res.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ });
},
back() {
diff --git a/packages/community/index/index.vue b/packages/community/index/index.vue
index 8674de33..dc16dd0b 100644
--- a/packages/community/index/index.vue
+++ b/packages/community/index/index.vue
@@ -86,6 +86,7 @@