Browse Source

init

newStyle
wangxiaohua 3 years ago
parent
commit
8fdead11e6
3 changed files with 141 additions and 37 deletions
  1. +127
    -35
      src/views/Equipment/equipmentDetailList.vue
  2. +12
    -0
      src/views/building/Count.vue
  3. +2
    -2
      vue.config.js

+ 127
- 35
src/views/Equipment/equipmentDetailList.vue View File

@@ -9,8 +9,8 @@
padding-top: 18px;
"
>
<span class="demonstration">楼盘名称:</span>
<!-- <el-select
<!-- <span class="demonstration">楼盘名称:</span> -->
<el-select
v-model="selValue"
@change="selChange"
style="width: 100px"
@@ -19,9 +19,8 @@
<el-option label="代理商" v-if="orgType == 0" value="0"></el-option>
<el-option label="公司" v-if="orgType != 2" value="1"></el-option>
<el-option label="楼盘" value="2"></el-option>
</el-select> -->
<div style="width: 200px">
<!-- <el-input v-model="page.accountName"></el-input>-->
</el-select>
<!-- <div style="width: 200px">
<el-select
v-model="houseId"
filterable
@@ -36,6 +35,55 @@
>
</el-option>
</el-select>
</div> -->
<div style="margin-left: 26px" v-if="selValue == 1">
<el-select
v-model="houseId"
filterable
placeholder="默认为全部"
@change="change"
>
<el-option
v-for="item in houseList"
:key="item.orgCode"
:label="item.name"
:value="item.orgCode"
>
</el-option>
</el-select>
</div>
<!-- 楼盘 -->
<div style="margin-left: 26px" v-else-if="selValue == 2">
<el-select
v-model="houseId"
filterable
placeholder="默认为全部"
@change="change"
>
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.propertyName"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div style="margin-left: 26px" v-else>
<el-select
v-model="houseId"
filterable
placeholder="默认为全部"
@change="change"
>
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.agentName"
:value="item.id"
>
</el-option>
</el-select>
</div>
</div>
</div>
@@ -697,7 +745,11 @@ export default {
houseId: "",
timeType: 0,
orgType: localStorage.getItem("orgType"),
selValue:'0',
selValue: localStorage.getItem("orgType") == 0
? "0"
: localStorage.getItem("orgType") == 1
? "1"
: "2",
time: "",
compareFlag: "0",
selectTime: "",
@@ -828,11 +880,12 @@ export default {
selChange() {
this.choicValue = "";
this.timeType = 4;
// this.getList();
this.getTableList();
this.getdetail();
// 获取对比列表
this.getcompare();
this.houseId='';
this.getHouseList();
// this.getTableList();
// this.getdetail();
// // 获取对比列表
// this.getcompare();
},
// 没有对比时的折线图
getNoCompare(){
@@ -842,7 +895,9 @@ export default {
// pageSize: this.pageNum,
startDate: this.page.openTime,
endDate: this.page.closeTime,
houseId: this.houseId,
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : 'null',
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : 'null',
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : 'null',
timeType: this.timeType,
contrastStartDate: this.selectTime,
contrastEndDate: this.selectTime1,
@@ -1019,26 +1074,57 @@ export default {
},
//获取楼盘数据
getHouseList() {
this.$api.api
.findHouseByUser({
orgType: localStorage.getItem("orgType"),
agentId: localStorage.getItem("agentId"),
})
.then((res) => {
this.houseList = res.data;
if (!this.flag) {
// console.log(this.flag, "12");
if (localStorage.getItem("orgType") == 3) {
this.houseId = localStorage.getItem("houseId");
} else {
this.houseId = res.data[0].id;
}
}
// console.log(this.flag,'12')
this.tabtimetap(this.timeType);
// return
this.getTableList();
});
if (this.selValue == 1) {
this.$api.api
.findMyOrg({
orgType: localStorage.getItem("orgType"),
agentId: localStorage.getItem("agentId"),
})
.then((res) => {
this.houseList = res.data;
this.tabtimetap(this.timeType);
this.getTableList();
});
} else if (this.selValue == 2) {
this.$api.api
.findHouseByUser({
orgType: localStorage.getItem("orgType"),
houseId: localStorage.getItem("houseId"),
})
.then((res) => {
this.houseList = res.data;
this.tabtimetap(this.timeType);
this.getTableList();
});
} else {
this.$api.api
.findMyAgent({
orgType: localStorage.getItem("orgType"),
})
.then((res) => {
this.houseList = res.data;
this.tabtimetap(this.timeType);
this.getTableList();
});
}


// this.$api.api.findHouseByUser({
// orgType: localStorage.getItem("orgType"),
// agentId: localStorage.getItem("agentId"),
// })
// .then((res) => {
// this.houseList = res.data;
// if (!this.flag) {
// if (localStorage.getItem("orgType") == 3) {
// this.houseId = localStorage.getItem("houseId");
// } else {
// this.houseId = res.data[0].id;
// }
// }
// this.tabtimetap(this.timeType);
// this.getTableList();
// });
},
handleSizeChange(val) {
console.log("每页条" + val);
@@ -1068,7 +1154,9 @@ export default {
size: this.pageSize,
startDate: this.page.openTime,
endDate: this.page.closeTime,
houseId: this.houseId,
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : 'null',
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : 'null',
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : 'null',
timeType: this.timeType,
contrastStartDate: this.selectTime,
contrastEndDate: this.selectTime1,
@@ -1405,7 +1493,9 @@ export default {
let obj = {
startDate: this.page.openTime,
endDate: this.page.closeTime,
houseId: this.houseId,
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : 'null',
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : 'null',
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : 'null',
timeType: this.timeType,
contrastStartDate: this.selectTime,
contrastEndDate: this.selectTime1,
@@ -1564,7 +1654,9 @@ export default {
pageSize: this.page.pageSize,
startDate: this.page.openTime,
endDate: this.page.closeTime,
houseId: this.houseId,
agentId: localStorage.getItem("orgType")==1?localStorage.getItem("agentId"):this.selValue == 0 ? this.houseId : 'null',
orgCode: localStorage.getItem("orgType")==2?localStorage.getItem("orgCode"):this.selValue == 1 ? this.houseId : 'null',
houseId: localStorage.getItem("orgType")==3?localStorage.getItem("houseId"):this.selValue == 2 ? this.houseId : 'null',
timeType: this.timeType,
orgType: localStorage.getItem("orgType"),
};


+ 12
- 0
src/views/building/Count.vue View File

@@ -262,6 +262,10 @@
<el-table-column prop="houseQuantityOfEnough" label="服务期内楼盘" align="center">
</el-table-column>
<el-table-column prop="onlineQuantity" label="在线设备" align="center">
</el-table-column>
<el-table-column prop="area" label="地区" align="center">
</el-table-column>
<el-table-column prop="operationStaffName" label="运营人员" align="center">
</el-table-column>
<el-table-column prop="equipmentNum" label="设备总数" align="center">
</el-table-column>
@@ -582,6 +586,7 @@ export default {
this.total = res.data.total;
});
}else if(this.activeTotal==1){
obj.operationType=null;
// 代理商
this.$api.api.agentStatistics(obj).then((res) => {
// console.log(res);
@@ -589,6 +594,13 @@ export default {
this.total = res.data.total;
});
}else{
if(this.orgType==0){
obj.operationType=1
}else if(this.orgType==1){
obj.operationType=2
}else{
obj.operationType=null
}
// 公司
this.$api.api.companyStatistics(obj).then((res) => {
// console.log(res);


+ 2
- 2
vue.config.js View File

@@ -4,8 +4,8 @@
*/
// const url = 'http://pigx-gateway'
// const url = 'http://39.97.167.65:9999' //测试
const url = 'http://192.168.31.169:9999' //长龙
// const url = 'http://192.168.31.134:9999' //嘉豪
// const url = 'http://192.168.31.169:9999' //长龙
const url = 'http://192.168.31.134:9999' //嘉豪
// const url = 'http://192.168.31.100:9999' //王笑
// const url = 'http://nitu5e.natappfree.cc' //王笑



Loading…
Cancel
Save