更新时间:
@@ -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;
diff --git a/vue.config.js b/vue.config.js
index b514bbc..db6248b 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -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' //王笑