|
@@ -20,19 +20,39 @@
|
|
</template>
|
|
</template>
|
|
</van-nav-bar>
|
|
</van-nav-bar>
|
|
<van-form @submit="onSubmit">
|
|
<van-form @submit="onSubmit">
|
|
- <van-cell title="楼栋" value="请选择" is-link title-class="title1" value-class="value1"></van-cell>
|
|
|
|
- <van-cell title="户型" value="请选择" is-link title-class="title1" value-class="value1"></van-cell>
|
|
|
|
|
|
+ <van-cell title="楼栋" :value="bText" is-link title-class="title1" value-class="value1" @click="showBuild=true"></van-cell>
|
|
|
|
+ <van-popup v-model="showBuild" round position="bottom" >
|
|
|
|
+ <van-picker
|
|
|
|
+ show-toolbar
|
|
|
|
+ title="选择楼栋"
|
|
|
|
+ value-key="keyValue"
|
|
|
|
+ :columns="buildingData"
|
|
|
|
+ @cancel="showBuild=false"
|
|
|
|
+ @confirm="onConfirm"
|
|
|
|
+ />
|
|
|
|
+ </van-popup>
|
|
|
|
+
|
|
|
|
+ <van-cell title="户型" :value="hText" is-link title-class="title1" value-class="value1" @click="showHouse=true"></van-cell>
|
|
|
|
+ <van-popup v-model="showHouse" round position="bottom">
|
|
|
|
+ <van-picker
|
|
|
|
+ show-toolbar
|
|
|
|
+ title="选择户型"
|
|
|
|
+ value-key="keyValue"
|
|
|
|
+ :columns="houseData"
|
|
|
|
+ @cancel="showHouse=false"
|
|
|
|
+ @confirm="onConfirmHouse"
|
|
|
|
+ />
|
|
|
|
+ </van-popup>
|
|
|
|
+
|
|
<van-field
|
|
<van-field
|
|
- v-model="danyuan"
|
|
|
|
-
|
|
|
|
|
|
+ v-model="danyuan"
|
|
label="单元号"
|
|
label="单元号"
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
input-align="right"
|
|
input-align="right"
|
|
label-class="title1"
|
|
label-class="title1"
|
|
/>
|
|
/>
|
|
<van-field
|
|
<van-field
|
|
- v-model="fangjian"
|
|
|
|
-
|
|
|
|
|
|
+ v-model="fangjian"
|
|
label="房间号"
|
|
label="房间号"
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
input-align="right"
|
|
input-align="right"
|
|
@@ -47,12 +67,19 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { GetSaClientSummary } from "@/common/api/loginApi.js";
|
|
|
|
|
|
+import { GetSaBuildingSelectList ,GetSaModelSelectList,GetSaRoomList} from "@/common/api/loginApi.js";
|
|
export default {
|
|
export default {
|
|
name: "login",
|
|
name: "login",
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- data: [],
|
|
|
|
|
|
+ buildingData: [],
|
|
|
|
+ showBuild:false,
|
|
|
|
+ houseData:[],
|
|
|
|
+ showHouse:false,
|
|
|
|
+ bText:'请选择', //楼栋
|
|
|
|
+ hText:'请选择', //户型
|
|
|
|
+ bValue:'', //楼栋
|
|
|
|
+ hValue:'', //户型
|
|
danyuan:'',
|
|
danyuan:'',
|
|
fangjian:''
|
|
fangjian:''
|
|
|
|
|
|
@@ -62,35 +89,79 @@ export default {
|
|
console.info("created");
|
|
console.info("created");
|
|
//console.info(this.$util);
|
|
//console.info(this.$util);
|
|
this.$util.persistLogin(this);
|
|
this.$util.persistLogin(this);
|
|
|
|
+ this.GetSaBuildingSelectList();
|
|
|
|
+ this.GetSaModelSelectList();
|
|
},
|
|
},
|
|
computed:{ //计算属性
|
|
computed:{ //计算属性
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- GetSaClientSummary: function () {
|
|
|
|
|
|
+ //获取楼栋信息
|
|
|
|
+ GetSaBuildingSelectList: function () {
|
|
var that = this;
|
|
var that = this;
|
|
var data = {
|
|
var data = {
|
|
- userCode: that.$store.state.data.userCode,
|
|
|
|
- projectId: that.$store.state.projectId
|
|
|
|
|
|
+ projectId: that.$store.state.projectId
|
|
|
|
+ };
|
|
|
|
+ console.info("data", data);
|
|
|
|
+ GetSaBuildingSelectList(data).then((res) => {
|
|
|
|
+ console.info("GetSaBuildingSelectList", res);
|
|
|
|
+ if (!res.result) {
|
|
|
|
+ that.$toast(res.msg);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ res.data.forEach(function (item, index, array) {
|
|
|
|
+ that.$set(that.buildingData, index, item);
|
|
|
|
+ });
|
|
|
|
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //获取户型列表
|
|
|
|
+ GetSaModelSelectList: function () {
|
|
|
|
+ var that = this;
|
|
|
|
+ var data = {
|
|
|
|
+ projectId: that.$store.state.projectId
|
|
};
|
|
};
|
|
console.info("data", data);
|
|
console.info("data", data);
|
|
- GetSaClientSummary(data).then((res) => {
|
|
|
|
- console.info("GetSaClientSummary", res);
|
|
|
|
|
|
+ GetSaModelSelectList(data).then((res) => {
|
|
|
|
+ console.info("GetSaModelSelectList", res);
|
|
if (!res.result) {
|
|
if (!res.result) {
|
|
that.$toast(res.msg);
|
|
that.$toast(res.msg);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
res.data.forEach(function (item, index, array) {
|
|
res.data.forEach(function (item, index, array) {
|
|
- that.$set(that.data, index, item);
|
|
|
|
|
|
+ that.$set(that.houseData, index, item);
|
|
});
|
|
});
|
|
- that.loading = false;
|
|
|
|
- that.finished = true;
|
|
|
|
|
|
+
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- onSubmit(values) { //提交按钮
|
|
|
|
- console.log('submit', values);
|
|
|
|
|
|
+ onConfirm(value) { //楼栋选定项
|
|
|
|
+ console.info('onConfirm',value);
|
|
|
|
+ this.bValue = value.keyId;
|
|
|
|
+ this.bText=value.keyValue;
|
|
|
|
+ console.info('onConfirm bValue',this.bValue);
|
|
|
|
+ this.showBuild = false;
|
|
|
|
+ //console.info('onConfirm showBuild',this.showBuild);
|
|
|
|
+ },
|
|
|
|
+ onConfirmHouse(value) { //户型选定项
|
|
|
|
+ console.info('onConfirmHouse',value);
|
|
|
|
+ this.hValue = value.keyId;
|
|
|
|
+ this.hText=value.keyValue;
|
|
|
|
+ console.info('onConfirmHouse hValue',this.bValue);
|
|
|
|
+ this.showHouse = false;
|
|
|
|
+ },
|
|
|
|
+ onSubmit() { //提交按钮 查询房源
|
|
|
|
+
|
|
|
|
+ var that = this;
|
|
|
|
+ if(that.bValue=='请选择'){
|
|
|
|
+ that.bValue='';
|
|
|
|
+ }
|
|
|
|
+ if(that.hValue=='请选择'){
|
|
|
|
+ that.hValue='';
|
|
|
|
+ }
|
|
|
|
+ let jsonQuery={buildingId:that.bValue,modelId:that.hValue,danyuan:that.danyuan,fangjian:that.fangjian};
|
|
|
|
+ this.$router.push({path:'/getsaroomlist',query:jsonQuery});
|
|
|
|
+
|
|
},
|
|
},
|
|
onClickLeft() {
|
|
onClickLeft() {
|
|
// this.$toast('返回')
|
|
// this.$toast('返回')
|