lancer před 4 roky
rodič
revize
3ab293fc3c
3 změnil soubory, kde provedl 691 přidání a 420 odebrání
  1. +17
    -0
      src/api/modules/api.js
  2. +37
    -26
      src/page/check/chose.vue
  3. +637
    -394
      src/views/Equipment/index.vue

+ 17
- 0
src/api/modules/api.js Zobrazit soubor

@@ -480,3 +480,20 @@ export function lifeTrackDefineAdd(data) {
})
}


// 设备列表
export function equipmentManagement(query) {
return request({
url: 'autoSR/zk/equipment/equipmentManagement',
method:'get',
params:query
})
}

export function findByUserName(query) {
return request({
url: 'admin/user/findByUserName',
method:'post',
params:query
})
}

+ 37
- 26
src/page/check/chose.vue Zobrazit soubor

@@ -223,7 +223,7 @@ export default {
},
flag: 1,
provice: [],
area:'',
area: "",
provinceId: "", //省id
cityId: "", //市id
currentPage: 1,
@@ -242,7 +242,7 @@ export default {
this.flag = this.$route.query.flag;
// 获取用户信息
this.info = getStore({ name: "userInfo" });
// this.info.selectHouseType=1
// 获取数据
if (this.flag == 1) {
// 获取代理商
@@ -252,10 +252,7 @@ export default {
// 获取公司
this.getCompanyList();
} else {
// 获取楼盘
this.zkhousePage();
// 获取区域列表
this.findArea()
this.findByUserName();
}
},
computed: {},
@@ -274,6 +271,20 @@ export default {
this.total = res.data.total;
});
},
findByUserName() {
this.$api.api
.findByUserName({
managerPhone: this.info.username,
})
.then((res) => {
// console.log(res);
this.info.selectHouseType=res.selectHouseType
// 获取楼盘
this.zkhousePage();
// 获取区域列表
this.findArea();
});
},
getCompanyList() {
this.$api.api
.zkorg({
@@ -288,12 +299,11 @@ export default {
this.total = res.data.total;
});
},
findArea(){
this.$api.api.findArea()
.then(res=>{
console.log(res)
this.options=res.data.records
})
findArea() {
this.$api.api.findArea().then((res) => {
console.log(res);
this.options = res.data.records;
});
},
zkhousePage() {
let obj = {
@@ -301,23 +311,24 @@ export default {
size: this.size,
propertyName: this.propertyName,
};
if(this.info.selectHouseType == 1){
if (this.info.selectHouseType == 1) {
this.$api.api.zkhousePage(obj).then((res) => {
// console.log(res)
this.list = res.data.records;
this.total = res.data.total;
});
// console.log(res)
this.list = res.data.records;
this.total = res.data.total;
});
}
if(this.info.selectHouseType == 2){
this.$api.api.findHouseByArea({
id:this.area
}).then((res) => {
// console.log(res)
this.list = res.data.records;
this.total = res.data.total;
});
if (this.info.selectHouseType == 2) {
this.$api.api
.findHouseByArea({
id: this.area,
})
.then((res) => {
// console.log(res)
this.list = res.data.records;
this.total = res.data.total;
});
}

},
chose(item) {
console.log(item);


+ 637
- 394
src/views/Equipment/index.vue
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


Načítá se…
Zrušit
Uložit