Commit 83c37506 authored by frank's avatar frank 🏀

release

parent 70180495
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { EnvFanPage } from './env-fan.page';
const routes: Routes = [
{
path: '',
component: EnvFanPage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [EnvFanPage]
})
export class EnvFanPageModule {}
<ion-header style="background-color: #F3F4F4;">
</ion-header>
<ion-content color='light' style="height: 100%">
<h1 style="
font-size: 16px;
padding-left: 5px;
border-left: 5px solid #28c9bd;
line-height: 25px;
margin-bottom: 5px;">模式状态</h1>
<ion-item lines="full">
<ion-label>运行模式</ion-label>
<ion-select multiple="false" cancelText="取消" okText="确认" [(ngModel)]="workModeSetting.workMode" [(value)]="workModeSetting.workMode" (ionChange)="workModeEvent()">
<ion-select-option value="0">手控模式</ion-select-option>
<ion-select-option value="1">自控模式</ion-select-option>
<ion-select-option value="2">智慧控制</ion-select-option>
</ion-select>
</ion-item>
<h1 style="
font-size: 16px;
padding-left: 5px;
border-left: 5px solid #28c9bd;
line-height: 25px;
margin-bottom: 5px;">控制/状态</h1>
<ion-item *ngFor="let a of allBtns" lines="full" insert="false" >
<!--<v-switch [value]="a.value" (click)="toggle(a)" [loading]="a.loading"></v-switch>-->
<ion-label>一键控制{{a.l}}</ion-label>
<v-switch [value]="a.v" (click)="allCheck(a)" [loading]="a.d"></v-switch>
</ion-item>
<div>
<ion-card *ngFor="let a of workarea.param" class="card" color="white">
<ion-card-header>
<ion-card-subtitle>{{a.name}}</ion-card-subtitle>
</ion-card-header>
<ion-card-content>
<v-switch [value]="a.runningState" (click)="toggle(a)" style="float: none;display: inline-block;margin-top: 5px"></v-switch>
</ion-card-content>
</ion-card>
<!--<ion-card class="card" color="white">-->
<!--<ion-card-header>-->
<!--<ion-card-subtitle>1号风机组</ion-card-subtitle>-->
<!--</ion-card-header>-->
<!--<ion-card-content>-->
<!--<v-switch [value]="true" (click)="toggle(a)" style="float: none;display: inline-block;"></v-switch>-->
<!--</ion-card-content>-->
<!--</ion-card>-->
<!--<ion-card class="card" color="white">-->
<!--<ion-card-header>-->
<!--<ion-card-subtitle>2号风机组</ion-card-subtitle>-->
<!--</ion-card-header>-->
<!--<ion-card-content>-->
<!--<v-switch [value]=true style="float: none;display: inline-block;"></v-switch>-->
<!--</ion-card-content>-->
<!--</ion-card>-->
<!--<ion-card class="card" color="white">-->
<!--<ion-card-header>-->
<!--<ion-card-subtitle>3号风机组</ion-card-subtitle>-->
<!--</ion-card-header>-->
<!--<ion-card-content>-->
<!--<v-switch [value]=true style="float: none;display: inline-block;"></v-switch>-->
<!--</ion-card-content>-->
<!--</ion-card>-->
</div>
</ion-content>
.card{
float: none;
display: inline-block;
width:28%;
margin: 10px 10px 5px 5px;
}
\ No newline at end of file
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EnvFanPage } from './env-fan.page';
describe('EnvFanPage', () => {
let component: EnvFanPage;
let fixture: ComponentFixture<EnvFanPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EnvFanPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EnvFanPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import {Api} from '../../service/api';
@Component({
selector: 'v-env-fan',
templateUrl: './env-fan.page.html',
styleUrls: ['./env-fan.page.scss'],
})
export class EnvFanPage implements OnInit {
// 工作模式
workModeSetting = { 'workMode' : '1',
'DeviceNo' : '',
'workModeOld' : '1'};
// 发送指令延时判断
comm = {
remain : 20,
isLoading : true
};
allBtns = [{v:1}];
fieldRegionNo = '';
fieldRegionName = '';
workarea = {
param: [
{
name: '1号风机组',
runningState:true, //是否开启
},
{
name: '2号风机组',
runningState:false,
}
]
};
constructor(private api: Api,) { }
ngOnInit() {
}
toggle(a) {
console.log("123");
}
allCheck(a) {
a.d = true;
const req = {
fieldRegionNo: this.fieldRegionNo,
op: a.v ? 0 : 1,
type: a.t,
ts: parseInt((new Date().getTime() / 1000).toString(), 10)
};
this.comm.remain = 120;
this.api.control.controlBatchSwitch([req, (data) => {
if (data.code === 1) {
this.getData(1);
this.api.presentMsgToast(data.message);
} else {
this.api.presentMsgToast(data.message);
}
this.comm.remain = 0;
a.d = false;
}]);
}
getData(a){
}
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { EnvLightPage } from './env-light.page';
const routes: Routes = [
{
path: '',
component: EnvLightPage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [EnvLightPage]
})
export class EnvLightPageModule {}
<ion-header style="background-color: #F3F4F4;">
</ion-header>
<ion-content color='light' style="height: 100%">
<h1 style="
font-size: 16px;
padding-left: 5px;
border-left: 5px solid #28c9bd;
line-height: 25px;
margin-bottom: 5px;">模式状态</h1>
<ion-item lines="full">
<ion-label>运行模式</ion-label>
<ion-select multiple="false" cancelText="取消" okText="确认" [(ngModel)]="workModeSetting.workMode" [(value)]="workModeSetting.workMode" (ionChange)="workModeEvent()">
<ion-select-option value="0">手控模式</ion-select-option>
<ion-select-option value="1">自控模式</ion-select-option>
<ion-select-option value="2">智慧模式</ion-select-option>
</ion-select>
</ion-item>
<h1 style="
font-size: 16px;
padding-left: 5px;
border-left: 5px solid #28c9bd;
line-height: 25px;
margin-bottom: 5px;">时间模式</h1>
<ion-item lines="full">
<i class="vo v-yue"></i>
<span style="margin-left: 60px;font-size:15px"> 开启时间 {{lightMode.openTime}}<br><br>关闭时间 {{lightMode.closeTime}}</span>
</ion-item>
<h1 style="
font-size: 16px;
padding-left: 5px;
border-left: 5px solid #28c9bd;
line-height: 25px;
margin-bottom: 5px;">控制/状态</h1>
<ion-item *ngFor="let a of allBtns" lines="full" insert="false" >
<!--<v-switch [value]="a.value" (click)="toggle(a)" [loading]="a.loading"></v-switch>-->
<ion-label>一键控制{{a.l}}</ion-label>
<v-switch [value]="a.v" (click)="allCheck(a)" [loading]="a.d"></v-switch>
</ion-item>
<div>
<ion-card *ngFor="let a of workarea.param" class="card" color="white">
<ion-card-header>
<ion-card-subtitle>{{a.name}}</ion-card-subtitle>
</ion-card-header>
<ion-card-content>
<v-switch [value]="a.runningState" (click)="toggle(a)" style="float: none;display: inline-block;margin-top: 5px"></v-switch>
</ion-card-content>
</ion-card>
</div>
</ion-content>
\ No newline at end of file
i.vo.v-yue {
font-size: 55px;
color: #199ED8;
}
.card{
float: none;
display: inline-block;
width:28%;
margin: 10px 10px 5px 5px;
}
\ No newline at end of file
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EnvLightPage } from './env-light.page';
describe('EnvLightPage', () => {
let component: EnvLightPage;
let fixture: ComponentFixture<EnvLightPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EnvLightPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EnvLightPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import {Api} from '../../service/api';
@Component({
selector: 'v-env-light',
templateUrl: './env-light.page.html',
styleUrls: ['./env-light.page.scss'],
})
export class EnvLightPage implements OnInit {
workModeSetting = { 'workMode' : '1',
'DeviceNo' : '',
'workModeOld' : '1'};
// 发送指令延时判断
comm = {
remain : 20,
isLoading : true
};
allBtns = [{v:1}];
fieldRegionNo = '';
fieldRegionName = '';
lightMode = {
name:'July',
openTime:'19:00',
closeTime:'05:00'};
workarea = {
param: [
{
name: '1号组',
runningState:true,
},
{
name: '2号组',
runningState:false,
}
]
};
constructor(private api: Api,) { }
ngOnInit() {
}
toggle(a) {
console.log("123");
}
allCheck(a) {
a.d = true;
const req = {
fieldRegionNo: this.fieldRegionNo,
op: a.v ? 0 : 1,
type: a.t,
ts: parseInt((new Date().getTime() / 1000).toString(), 10)
};
this.comm.remain = 120;
this.api.control.controlBatchSwitch([req, (data) => {
if (data.code === 1) {
this.getData(1);
this.api.presentMsgToast(data.message);
} else {
this.api.presentMsgToast(data.message);
}
this.comm.remain = 0;
a.d = false;
}]);
}
getData(a){
}
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { EnvShowerPage } from './env-shower.page';
const routes: Routes = [
{
path: '',
component: EnvShowerPage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [EnvShowerPage]
})
export class EnvShowerPageModule {}
<ion-header style="background-color: #F3F4F4;">
</ion-header>
<ion-content color='light' style="height: 100%">
<h1 style="
font-size: 16px;
padding-left: 5px;
border-left: 5px solid #28c9bd;
line-height: 25px;
margin-bottom: 5px;">模式状态</h1>
<ion-item lines="full">
<ion-label>运行模式</ion-label>
<ion-select multiple="false" cancelText="取消" okText="确认" [(ngModel)]="workModeSetting.workMode" [(value)]="workModeSetting.workMode" (ionChange)="workModeEvent()">
<ion-select-option value="0">手控模式</ion-select-option>
<ion-select-option value="1">自控模式</ion-select-option>
<ion-select-option value="2">智慧模式</ion-select-option>
</ion-select>
</ion-item>
<h1 style="
font-size: 16px;
padding-left: 5px;
border-left: 5px solid #28c9bd;
line-height: 25px;
margin-bottom: 5px;">供液泵状态</h1>
<ion-item lines="full">
<div [ngClass]="{'sucCir': bump.online, 'errCir': !bump.online}"></div>&nbsp;
<span style="font-size: 13px">{{bump.online ? '在线' : '离线'}}</span>
<span style="font-size: 13px; margin-left: 30px">压力: {{bump.press}} Mpa</span>
</ion-item>
<h1 style="
font-size: 16px;
padding-left: 5px;
border-left: 5px solid #28c9bd;
line-height: 25px;
margin-bottom: 5px;">时间参数</h1>
<ion-item lines="full" *ngFor="let a of workarea.param" insert="false">
<span style="font-size: 13px;">{{a.name}}喷淋时间 {{a.workTime}} 秒</span>
</ion-item>
<ion-item lines="full" insert="false">
<span style="font-size: 13px;">间隔时间 {{workarea.Interval}} 秒</span>
</ion-item>
<h1 style="
font-size: 16px;
padding-left: 5px;
border-left: 5px solid #28c9bd;
line-height: 25px;
margin-bottom: 5px;">控制/状态</h1>
<!--<ion-item *ngFor="let a of allBtns" lines="full" insert="false" >-->
<!--&lt;!&ndash;<v-switch [value]="a.value" (click)="toggle(a)" [loading]="a.loading"></v-switch>&ndash;&gt;-->
<!--<ion-label>一键控制{{a.l}}</ion-label>-->
<!--<v-switch [value]="a.v" (click)="allCheck(a)" [loading]="a.d"></v-switch>-->
<!--</ion-item>-->
<div>
<ion-card *ngFor="let a of workarea.param" class="card" color="white">
<ion-card-header>
<ion-card-title>{{a.name}}</ion-card-title>
</ion-card-header>
<ion-card-content>
<span>压力 {{a.press}} MPa</span><br>
<v-switch [value]="a.runningState" (click)="toggle(a)" style="float: none;display: inline-block;margin-top: 5px"></v-switch>
</ion-card-content>
</ion-card>
</div>
</ion-content>
\ No newline at end of file
.card{
float: none;
display: inline-block;
width:42%;
margin: 10px 10px 5px 5px;
text-align: center;
}
\ No newline at end of file
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EnvShowerPage } from './env-shower.page';
describe('EnvShowerPage', () => {
let component: EnvShowerPage;
let fixture: ComponentFixture<EnvShowerPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EnvShowerPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EnvShowerPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'v-env-shower',
templateUrl: './env-shower.page.html',
styleUrls: ['./env-shower.page.scss'],
})
export class EnvShowerPage implements OnInit {
workModeSetting = { 'workMode' : '1',
'DeviceNo' : '',
'workModeOld' : '1'};
// 发送指令延时判断
comm = {
remain : 20,
isLoading : true
};
bump = {online:true,
press:0.4};
workarea = {
Interval: 25, //间隔时间
param: [
{
name: 'A区',
workTime:25, //工作时长
press:0.3, //水压
runningState:true, // 是否开启
},
{
name: 'B区',
workTime:25,
press:0.4,
runningState:false,
},
]
};
constructor() { }
ngOnInit() {
}
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { EnvWaterchannelPage } from './env-waterchannel.page';
const routes: Routes = [
{
path: '',
component: EnvWaterchannelPage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [EnvWaterchannelPage]
})
export class EnvWaterchannelPageModule {}
<ion-header>
</ion-header>
<ion-content>
<h1 style="
font-size: 16px;
padding-left: 5px;
border-left: 5px solid #28c9bd;
line-height: 25px;
margin-bottom: 5px;">状态</h1>
<ion-card *ngFor="let a of workarea.param" class="card" color="white">
<ion-card-header>
<ion-card-title> <span [ngClass]="{'sucCir': a.online, 'errCir': !a.online}"></span>&nbsp; {{a.name}}</ion-card-title>
</ion-card-header>
<ion-card-content>
<span>当前功率 </span> <span> {{a.kw}} KW<br></span>
<span>估计加热设备台数 </span> <span> {{a.deviceOnLineNum}} 台</span>
</ion-card-content>
</ion-card>
</ion-content>
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EnvWaterchannelPage } from './env-waterchannel.page';
describe('EnvWaterchannelPage', () => {
let component: EnvWaterchannelPage;
let fixture: ComponentFixture<EnvWaterchannelPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EnvWaterchannelPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EnvWaterchannelPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'v-env-waterchannel',
templateUrl: './env-waterchannel.page.html',
styleUrls: ['./env-waterchannel.page.scss'],
})
export class EnvWaterchannelPage implements OnInit {
workModeSetting = { 'workMode' : '1',
'DeviceNo' : '',
'workModeOld' : '1'};
// 发送指令延时判断
comm = {
remain : 20,
isLoading : true
};
workarea = {
param: [
{
name: '1号组',
kw:0.3, //当前功率
deviceOnLineNum:3, //估计加热设备台数
online:true,
},
{
name: '2号组',
kw:3, //当前功率
deviceOnLineNum:2, //估计加热设备台数
online:true,
},
{
name: '3号组',
kw:15, //当前功率
deviceOnLineNum:10, //估计加热设备台数
online:true,
},
]
};
constructor() { }
ngOnInit() {
}
}
This diff is collapsed.
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