Commit 4f6df0b8 authored by zhuangzhuang's avatar zhuangzhuang

测试用数据

parent 30f553d6
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.witium.muchang" version="2.9.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.witium.muchang.test" version="2.9.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>牧场云</name>
<description>test</description>
<author email="frank.feng@witium.com" href="http://muchang.witium.com/">Van.chen - frank.feng</author>
......
This diff is collapsed.
......@@ -53,21 +53,21 @@ export class EnvDetailPage implements OnInit {
}]);
// ----------------------------------------------
// TODO 测试用准备数据
// this.item = {
// // 3-重度热应激 在线 平控 非智控(自控) 有报警
// fieldRegionNo: 'FRN136641006052720640',
// fieldRegionName: '1号牛舍',
// temp: '23.5',
// humi: '82.8',
// heatStressLevel: '3',
// heatStressLevelName: this.getHeatStressLevelName('3'),
// online: 1, // 0-离线,1-在线
// operationModel: 1, // 0-现控,1-平控
// isWisdomModel: 0, // 0-非智控(自控),1-智控
// alarm: 1,
// inHouse : this.getInHouseState(1), // 0-离舍,1-在舍
// ts: '2019-08-05 23:44',
// };
this.item = {
// 3-重度热应激 在线 平控 非智控(自控) 有报警
fieldRegionNo: 'FRN136641006052720640',
fieldRegionName: '1号牛舍',
temp: '23.5',
humi: '82.8',
heatStressLevel: '3',
heatStressLevelName: this.getHeatStressLevelName('3'),
online: 1, // 0-离线,1-在线
operationModel: 1, // 0-现控,1-平控
isWisdomModel: 0, // 0-非智控(自控),1-智控
alarm: 1,
inHouse : this.getInHouseState(1), // 0-离舍,1-在舍
ts: '2019-08-05 23:44',
};
// ----------------------------------------------
}
......
......@@ -54,17 +54,18 @@ export class EnvFanPage implements OnInit {
this.controlModel = data.controlModel;
this.devices = data.param;
// --------------------------------------------------------------------
// TODO 测试用准备数据
// this.fieldRegionNo = 'FRN136641006052720640';
// this.fieldDeviceType = '风机';
// this.controlModel = 0;
// this.devices = [{fieldDeviceNo: '136641005998194688', fieldDeviceName: 'A号风机组', state: 1},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: 'B号风机组', state: 0},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: 'C号风机组', state: 1},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: 'D号风机组', state: 0},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: 'E号风机组', state: 1},
// {fieldDeviceNo: '136641005998194688', fieldDeviceName: 'F号风机组', state: 1}];
this.fieldDeviceType = '风机';
this.controlModel = 0;
this.devices = [{fieldDeviceNo: '136641005998194688', fieldDeviceName: 'A号风机组', state: 1},
{fieldDeviceNo: '136641005998194688', fieldDeviceName: 'B号风机组', state: 0},
{fieldDeviceNo: '136641005998194688', fieldDeviceName: 'C号风机组', state: 1},
{fieldDeviceNo: '136641005998194688', fieldDeviceName: 'D号风机组', state: 0},
{fieldDeviceNo: '136641005998194688', fieldDeviceName: 'E号风机组', state: 1},
{fieldDeviceNo: '136641005998194688', fieldDeviceName: 'F号风机组', state: 1}];
// --------------------------------------------------------------------
// [手控(0)]的状态下:活性(false) 以外:非活性(true)
const allDisabled = this.controlModel === 0 ? false : true;
......
......@@ -16,6 +16,7 @@ export class EnvHistoryPage implements OnInit {
item = {fieldRegionNo: ''};
// --------------------------------------------------------------------------------
// TODO 以下为假数据 待删除
analResult = '优';
......@@ -48,8 +49,8 @@ export class EnvHistoryPage implements OnInit {
{time: '19:00', thi: '轻', temp: '20.2', humi: '43', AA: '60', BB: '55%', CC: 'O', DD: 'X'},
{time: '19:30', thi: '轻', temp: '21.6', humi: '34', AA: '50', BB: '55%', CC: 'O', DD: 'X'},
{time: '20:00', thi: '轻', temp: '22.5', humi: '43', AA: '40', BB: '55%', CC: 'X', DD: 'O'},
];
// --------------------------------------------------------------------------------
ngOnInit() {
this.ac.queryParams.subscribe((data) => {
......@@ -57,11 +58,13 @@ export class EnvHistoryPage implements OnInit {
});
this.getData(0);
// --------------------------------------------------------------------------------
// TODO 待删除
this.chartOption.xAxis.data = ['1', '2', '3', '4', '5', '6', '7', '8'];
// for (let i = 0; i < 8; i++) {
// this.chartOption.xAxis.data = ['1', '2', '3', '4', '5', '6', '7', '8'];
// }
// --------------------------------------------------------------------------------
}
getData(time) {
......
......@@ -3,7 +3,10 @@
<ion-buttons slot="start">
<ion-back-button color="secondary" defaultHref="/index" text=""></ion-back-button>
</ion-buttons>
<ion-searchbar (ionInput)="getItems($event)" (ionClear)="resetItems()" debounce="1000" style="height: 40px;"></ion-searchbar>
<!--<ion-searchbar (ionInput)="getItems($event)" (ionClear)="resetItems()" debounce="1000" style="height: 40px;"></ion-searchbar>-->
<ion-searchbar (ionInput)="getItems($event)" debounce="1000" style="height: 40px;"></ion-searchbar>
<!--<ion-searchbar debounce="1000" style="height: 40px;"></ion-searchbar>-->
<!--<ion-searchbar (ionInput)="getItems($event)" [(ngModel)]="searchItem"></ion-searchbar>-->
<!--<div class="topSearch">
<SearchBar [placeholder]="'点击此处进行搜索'" [(ngModel)]="searchText"
......
......@@ -48,26 +48,22 @@ export class EnvHomePage implements OnInit {
alarmTotal = 0;
// 牛舍列表
items = [];
displayItems = [];
getItems(e) {
this.items = this.displayItems;
this.comm.isLoading = false;
this.comm.remain = 1000;
this.searchText = e.target.value;
if (!this.searchText.trim()) {
this.resetItems();
const val = e.target.value;
if (val && val.trim() !== '') {
this.items = this.items.filter((item) => {
const name = item.fieldRegionName;
return (name.toLowerCase().indexOf(this.searchText.toLowerCase()) > -1);
});
}
this.items = this.items.filter((item) => {
const name = item.fieldRegionName;
if (name.toLowerCase().indexOf(this.searchText.toLowerCase()) > -1) {
return true;
}
return false;
});
}
resetItems() {
this.init();
}
ngOnInit() {
this.init();
this.ionViewWillEnter();
......@@ -115,81 +111,84 @@ export class EnvHomePage implements OnInit {
this.api.presentMsgToast('获取数据失败');
this.isError = true;
}
// -------------------------------------------------
this.displayItems = this.items;
// --------------------------------------------------------------------
// TODO 测试用准备数据
// this.thiGood = 1;
// this.thiBad = 12;
// this.alarmTotal = 5;
// this.items = [
// {
// // 0-无热应激 离线 无报警
// fieldRegionNo: 'FRN136641006052720640',
// fieldRegionName: '1号牛舍',
// temp: '23.5',
// humi: '82',
// heatStressLevel: '0',
// heatStressLevelName: this.getHeatStressLevelName('0'),
// online: 0, // 0-离线,1-在线
// alarm: 0,
// ts: '2019-08-05 23:44',
// },
// {
// // 1-轻度热应激 在线 现控 无报警
// fieldRegionNo: 'FN108050436279648256',
// fieldRegionName: '2号牛舍',
// temp: '23.5',
// humi: '82',
// heatStressLevel: '1',
// heatStressLevelName: this.getHeatStressLevelName('1'),
// online: 1, // 0-离线,1-在线
// operationModel: 0, // 0-现控,1-平控
// alarm: 0,
// ts: '2019-08-05 23:44',
// },
// {
// // 2-中度热应激 在线 平控 非智控(手控) 有报警
// fieldRegionNo: 'FN108050436279648256',
// fieldRegionName: '3号牛舍',
// temp: '23.5',
// humi: '82',
// heatStressLevel: '2',
// heatStressLevelName: this.getHeatStressLevelName('2'),
// online: 1, // 0-离线,1-在线
// operationModel: 1, // 0-现控,1-平控
// isWisdomModel: 0, // 0-非智控(手控),1-智控
// alarm: 1,
// ts: '2019-08-05 23:44',
// },
// {
// // 3-重度热应激 在线 平控 非智控(自控) 有报警
// fieldRegionNo: 'FN108050436279648256',
// fieldRegionName: '4号牛舍',
// temp: '23.5',
// humi: '82',
// heatStressLevel: '3',
// heatStressLevelName: this.getHeatStressLevelName('3'),
// online: 1, // 0-离线,1-在线
// operationModel: 1, // 0-现控,1-平控
// isWisdomModel: 0, // 0-非智控(自控),1-智控
// alarm: 1,
// ts: '2019-08-05 23:44',
// },
// {
// // 4-II重度热应激 在线 平控 智控 有报警
// fieldRegionNo: 'FN108050436279648256',
// fieldRegionName: '测试用5号牛舍',
// temp: '23.5',
// humi: '82',
// heatStressLevel: '4',
// heatStressLevelName: this.getHeatStressLevelName('4'),
// online: 1, // 0-离线,1-在线
// operationModel: 1, // 0-现控,1-平控
// isWisdomModel: 1, // 0-非智控(自控),1-智控
// alarm: 1,
// ts: '2019-08-05 23:44',
// },
// ];
// -------------------------------------------------
this.thiGood = 1;
this.thiBad = 12;
this.alarmTotal = 5;
this.items = [
{
// 0-无热应激 离线 无报警
fieldRegionNo: 'FRN136641006052720640',
fieldRegionName: '1号牛舍',
temp: '23.5',
humi: '82',
heatStressLevel: '0',
heatStressLevelName: this.getHeatStressLevelName('0'),
online: 0, // 0-离线,1-在线
alarm: 0,
ts: '2019-08-05 23:44',
},
{
// 1-轻度热应激 在线 现控 无报警
fieldRegionNo: 'FN108050436279648256',
fieldRegionName: '2号牛舍',
temp: '23.5',
humi: '82',
heatStressLevel: '1',
heatStressLevelName: this.getHeatStressLevelName('1'),
online: 1, // 0-离线,1-在线
operationModel: 0, // 0-现控,1-平控
alarm: 0,
ts: '2019-08-05 23:44',
},
{
// 2-中度热应激 在线 平控 非智控(手控) 有报警
fieldRegionNo: 'FN108050436279648256',
fieldRegionName: '3号牛舍',
temp: '23.5',
humi: '82',
heatStressLevel: '2',
heatStressLevelName: this.getHeatStressLevelName('2'),
online: 1, // 0-离线,1-在线
operationModel: 1, // 0-现控,1-平控
isWisdomModel: 0, // 0-非智控(手控),1-智控
alarm: 1,
ts: '2019-08-05 23:44',
},
{
// 3-重度热应激 在线 平控 非智控(自控) 有报警
fieldRegionNo: 'FN108050436279648256',
fieldRegionName: '4号牛舍',
temp: '23.5',
humi: '82',
heatStressLevel: '3',
heatStressLevelName: this.getHeatStressLevelName('3'),
online: 1, // 0-离线,1-在线
operationModel: 1, // 0-现控,1-平控
isWisdomModel: 0, // 0-非智控(自控),1-智控
alarm: 1,
ts: '2019-08-05 23:44',
},
{
// 4-II重度热应激 在线 平控 智控 有报警
fieldRegionNo: 'FN108050436279648256',
fieldRegionName: '测试用5号牛舍',
temp: '23.5',
humi: '82',
heatStressLevel: '4',
heatStressLevelName: this.getHeatStressLevelName('4'),
online: 1, // 0-离线,1-在线
operationModel: 1, // 0-现控,1-平控
isWisdomModel: 1, // 0-非智控(自控),1-智控
alarm: 1,
ts: '2019-08-05 23:44',
},
];
this.displayItems = this.items;
// --------------------------------------------------------------------
}
this.load.offLoad();
}]);
......
......@@ -69,8 +69,9 @@ export class EnvLightPage implements OnInit {
this.off = data.controlConfig.off;
this.devices = data.param;
// --------------------------------------------------------------------
// TODO 测试用准备数据
// this.fieldRegionNo = 'FRN136641006052720640';
this.fieldRegionNo = 'FRN136641006052720640';
this.startDate = '05-01';
this.stopDate = '08-31';
// this.fieldDeviceType = '照明';
......@@ -83,6 +84,7 @@ export class EnvLightPage implements OnInit {
{fieldDeviceNo: '136641005998194688', fieldDeviceName: 'D号照明组', state: 0},
{fieldDeviceNo: '136641005998194688', fieldDeviceName: 'E号照明组', state: 1},
{fieldDeviceNo: '136641005998194688', fieldDeviceName: 'F号照明组', state: 1}];
// --------------------------------------------------------------------
// [智控(2)]的状态下:非活性(true) 以外:活性(false)
const allDisabled = this.controlModel === 2 ? true : false;
......
......@@ -4,19 +4,24 @@
export const environment = {
// production: false,
// url: 'http://pasture.witium.com.cn/api', // 对外访问测试网地址
url: 'http://pasture.witium.com.cn/api', // 对外访问测试网地址
// url: 'http://cloud-test.witium.com:8096', // 测试
// url: 'http://172.16.1.53:8097', // cy
url: 'http://172.16.1.52:8096', // zz
// url: 'http://172.16.1.53:8096', // cy
// url: 'http://172.16.1.51:8097', // lin
// url: 'http://211.161.200.169:19200', // zz
// url: 'http://172.16.1.13:8096', // 测试
// mqttUrl: '172.16.1.24',
// mqttUrl: '120.27.235.39'
mqttUrl: '172.16.1.24', // mqttUrl: '172.16.1.24:48083',
// mqttUrl: '211.161.200.169', // 辉度外网访问mqtt地址
// mqttUrl: '120.27.235.39',
production: true,
// url: 'http://pasture.witium.com/api', // 对外访问测试网地址
// url: 'http://172.16.1.13:8096', // 测试
// mqttUrl: '120.27.235.39'
mqttUrl: '120.27.235.31'
// mqttUrl: '120.27.235.31'
// url: 'http://pasture.witium.com.cn/api', // 对外访问测试网地址
// mqttUrl: '172.16.1.24:48083',
};
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment