Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
muChangApp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WitCloud
muChangApp
Commits
cd6645c6
Commit
cd6645c6
authored
Sep 12, 2019
by
zhuangzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
牛舍配置页微调
parent
531ae561
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
99 additions
and
55 deletions
+99
-55
env-cfg.page.html
src/app/envCtrl/env-cfg/env-cfg.page.html
+34
-28
env-cfg.page.scss
src/app/envCtrl/env-cfg/env-cfg.page.scss
+4
-0
env-cfg.page.ts
src/app/envCtrl/env-cfg/env-cfg.page.ts
+61
-27
No files found.
src/app/envCtrl/env-cfg/env-cfg.page.html
View file @
cd6645c6
This diff is collapsed.
Click to expand it.
src/app/envCtrl/env-cfg/env-cfg.page.scss
View file @
cd6645c6
...
...
@@ -41,3 +41,7 @@
text-align
:
center
;
padding-left
:
0px
}
.addBtn
{
width
:
100%
;
}
src/app/envCtrl/env-cfg/env-cfg.page.ts
View file @
cd6645c6
...
...
@@ -11,13 +11,6 @@ import {NgxDatatableModule} from '@swimlane/ngx-datatable';
})
export
class
EnvCfgPage
implements
OnInit
{
// 工作模式
workModeSetting
=
{
'workMode'
:
'1'
,
'DeviceNo'
:
''
,
'workModeOld'
:
'1'
};
defaultColumnOptions
=
[];
fanMode
=
{
...
...
@@ -54,6 +47,7 @@ export class EnvCfgPage implements OnInit {
shuiCao
:
any
=
{};
// 环境参数预警配置
environmentConfig
=
[];
private
$ionicPopup
:
any
;
async
openPicker
(
numColumns
=
1
,
numOptions
=
5
,
columnOptions
=
this
.
defaultColumnOptions
)
{
const
picker
=
await
this
.
pickerController
.
create
({
...
...
@@ -208,26 +202,8 @@ export class EnvCfgPage implements OnInit {
}
workModeEvent
(
item
)
{
// if ( this.workModeSetting.workModeOld === this.workModeSetting.workMode ) {
// return;
// }
//
// const opt = {fieldDeviceNo : this.workModeSetting.DeviceNo ,
// op : this.workModeSetting.workMode ,
// startTime: parseInt((new Date().getTime() / 1000).toString(), 10),
// ts: parseInt((new Date().getTime() / 1000).toString(), 10)
// };
//
// opt.startTime = opt.ts;
//
// this.api.control.controlSwitch([opt, (data) => {
// if (data && data.code === 1) {
// this.getData(1);
// this.api.presentMsgToast(data.message);
// } else {
// this.api.presentMsgToast(data.message);
// }
// }]);
console
.
log
(
'更新牛舍配置信息'
);
this
.
updateCowshed
();
}
async
openCalendarPicker
(
numColumns
=
1
,
numOptions
=
5
,
columnOptions
=
this
.
defaultColumnOptions
)
{
...
...
@@ -379,4 +355,62 @@ export class EnvCfgPage implements OnInit {
this
.
environmentConfig
.
push
(
temperatureCfg
,
humidityCfg
);
}
}
// 修改牛舍配置
updateCowshed
()
{
this
.
api
.
config
.
updateCowshedConfig
([
this
.
curCowshed
,
(
data
)
=>
{
if
(
data
)
{
console
.
log
(
'更新成功'
);
}
else
{
this
.
api
.
presentMsgToast
(
'获取数据失败'
);
this
.
isError
=
true
;
}
this
.
load
.
offLoad
();
}]);
}
addModel
()
{
this
.
popupModelSelect
(
1
,
'照明'
);
// this.popup($scope, $ionicPopup, $timeout);
}
changeModel
()
{
this
.
popupModelSelect
(
0
,
'喷淋'
);
}
// 模式组选择 1:添加 0:替换
popupModelSelect
(
option
,
model
)
{
// const popup = this.$ionicPopup.show({
// templateUrl: 'www/templates/popUp/authenticationPop.html',
// title: model + '常用模式选择',
// scope: $scope,
// buttons: [
// { text: '取消',type:'button-small' },
// { text: '确定',
// type: 'button-small',
// onTap: function() {
// console.log("认证值______________",$scope.choice);
// var prompt=$ionicPopup.show({
// template:'<i class="icon ion-ios-checkmark"></i>',
// title:'提示',
// subTitle:'申请认证已提交,正等待审核',
// scope:$scope,
// });
// prompt.then(function(){
//
// });
// $timeout(function(){
// prompt.close();
// },3000);
// }
// },
// ]
// });
// popup.then(function(res) {
// console.log('Tapped!', res);
// });
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment