lancer 3 lat temu
rodzic
commit
1afb2f2066
2 zmienionych plików z 124 dodań i 6 usunięć
  1. +122
    -4
      src/views/Equipment/state.vue
  2. +2
    -2
      vue.config.js

+ 122
- 4
src/views/Equipment/state.vue Wyświetl plik

@@ -2,6 +2,71 @@
<div class="box-center">
<!-- 头 -->
<div class="app-top">
<div class="app-titel" style="margin-left: 15px">
<el-select
v-model="selValue"
@change="selChange1"
style="width: 100px"
placeholder="请选择"
>
<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="margin-left: 26px" v-if="selValue == 1">
<el-select
v-model="choicValue"
@change="valuechange"
placeholder="默认为全部"
clearable
filterable
>
<el-option
v-for="item in dataList"
: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="choicValue"
@change="valuechange"
placeholder="默认为全部"
clearable
filterable
>
<el-option
v-for="item in dataList"
: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="choicValue"
@change="valuechange"
clearable
filterable
placeholder="默认为全部"
>
<el-option
v-for="item in dataList"
:key="item.id"
:label="item.agentName"
:value="item.id"
>
</el-option>
</el-select>
</div>
</div>
<div class="app-titel" style="margin-top: 5px">
<div class="div-lab">
<div class="label">更新时间:</div>
@@ -623,6 +688,13 @@ export default {
],
options1: [],
houseList: [],
selValue: localStorage.getItem("orgType") == 0
? "0"
: localStorage.getItem("orgType") == 1
? "1"
: "2",
choicValue:'',
dataList:[],
searchForm: {
name: "",
imei: "", //设备号
@@ -696,6 +768,7 @@ export default {
onLineCount: "",
offLineCount: "",
workingCount: "",
orgType: localStorage.getItem("orgType"),
dialogVisible5: false,
wifiVisible: false,
customColors: [
@@ -731,11 +804,49 @@ export default {

}
// asd
this.getTableList();
this.getList();
// 获取列表
this.zkhousePage();
},
methods: {
selChange1() {
this.choicValue = "";
this.getList();
},
getList() {
console.log(this.selValue);
// 当为楼盘选择时
if (this.selValue == 1) {
this.$api.api
.findMyOrg({
orgType: localStorage.getItem("orgType"),
agentId: localStorage.getItem("agentId"),
})
.then((res) => {
this.dataList = res.data;
this.getTableList();
});
} else if (this.selValue == 2) {
this.$api.api
.findHouseByUser({
orgType: localStorage.getItem("orgType"),
houseId: localStorage.getItem("houseId"),
})
.then((res) => {
this.dataList = res.data;
this.getTableList();
});
} else {
this.$api.api
.findMyAgent({
orgType: localStorage.getItem("orgType"),
})
.then((res) => {
this.dataList = res.data;
this.getTableList();
});
}
},
// wifi
wifiShow(row) {
this.wifiVisible = true;
@@ -804,10 +915,14 @@ export default {
size: this.size,
current: this.currentPage,
timeType:2,
// orgType: localStorage.getItem("orgType"),
// orgCode: localStorage.getItem("orgCode"),
// agentId: localStorage.getItem("agentId"),
// houseId: localStorage.getItem("houseId"),
agentId: this.selValue == 0 ? this.choicValue : null,
orgCode: this.selValue == 1 ? this.choicValue : null,
houseId: this.selValue == 2 ? this.choicValue : null,
orgType: localStorage.getItem("orgType"),
orgCode: localStorage.getItem("orgCode"),
agentId: localStorage.getItem("agentId"),
houseId: localStorage.getItem("houseId"),
...this.searchForm,
})
.then((res) => {
@@ -827,6 +942,9 @@ export default {
this.total = res.data.list.total;
});
},
valuechange() {
this.getTableList();
},
ascformatDate(dateTimeStamp){
let newDate = new Date(dateTimeStamp.replace(/-/g, '/')).getTime();
let minute = 1000 * 60;


+ 2
- 2
vue.config.js Wyświetl plik

@@ -3,9 +3,9 @@
* https://cli.vuejs.org/zh/config/
*/
// const url = 'http://pigx-gateway'
// const url = 'http://39.97.167.65:9999' //测试
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.134:9999' //嘉豪
// const url = 'http://192.168.31.100:9999' //王笑
// const url = 'http://nitu5e.natappfree.cc' //王笑



Ładowanie…
Anuluj
Zapisz