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
91a2ce13
Commit
91a2ce13
authored
Sep 15, 2019
by
yating.lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
牛舍配置: 追加【参考常用模式】【替换模式】【添加模式】
parent
cd6645c6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
39 deletions
+52
-39
env-cfg.module.ts
src/app/envCtrl/env-cfg/env-cfg.module.ts
+3
-1
env-cfg.page.html
src/app/envCtrl/env-cfg/env-cfg.page.html
+5
-1
env-cfg.page.ts
src/app/envCtrl/env-cfg/env-cfg.page.ts
+44
-37
No files found.
src/app/envCtrl/env-cfg/env-cfg.module.ts
View file @
91a2ce13
...
...
@@ -6,6 +6,7 @@ import { Routes, RouterModule } from '@angular/router';
import
{
IonicModule
}
from
'@ionic/angular'
;
import
{
EnvCfgPage
}
from
'./env-cfg.page'
;
import
{
NgxDatatableModule
}
from
'@swimlane/ngx-datatable'
;
const
routes
:
Routes
=
[
{
...
...
@@ -19,7 +20,8 @@ const routes: Routes = [
CommonModule
,
FormsModule
,
IonicModule
,
RouterModule
.
forChild
(
routes
)
RouterModule
.
forChild
(
routes
),
NgxDatatableModule
],
declarations
:
[
EnvCfgPage
]
})
...
...
src/app/envCtrl/env-cfg/env-cfg.page.html
View file @
91a2ce13
...
...
@@ -68,7 +68,11 @@
</ion-row>
</ion-grid>
</ion-item>
<ion-item
class=
"fanItem"
lines=
"none"
style=
"padding-left: 10px"
>
<a
(
click
)="
referenceModel
()"
>
参考常用模式
</a>
</ion-item>
</div>
<div
*
ngIf=
"penLin"
>
<ion-item-divider>
<ion-label>
喷淋模式配置
</ion-label>
...
...
@@ -310,7 +314,7 @@
<ngx-datatable
class=
'material'
[
rows
]="
environmentConfig
"
[
columnMode
]="'
force
'"
style=
"white-space: nowrap; text-align: center"
>
<ngx-datatable-column
name=
""
prop=
"tittle"
width=
"50px;"
>
</ngx-datatable-column>
<ngx-datatable-column
name=
"上限"
prop=
"top"
width=
"20px;"
>
<ngx-datatable-column
name=
"上限"
prop=
"top"
width=
"20px;"
>
</ngx-datatable-column>
<ngx-datatable-column
name=
"下限"
prop=
"lower"
width=
"20px;"
>
</ngx-datatable-column>
...
...
src/app/envCtrl/env-cfg/env-cfg.page.ts
View file @
91a2ce13
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
PickerController
}
from
'@ionic/angular'
;
import
{
PickerController
,
AlertController
}
from
'@ionic/angular'
;
import
{
Api
}
from
'../../service/api'
;
import
{
Load
}
from
'../../service/load'
;
import
{
NgxDatatableModule
}
from
'@swimlane/ngx-datatable'
;
...
...
@@ -21,7 +21,7 @@ export class EnvCfgPage implements OnInit {
'selecting'
:
false
,
};
constructor
(
private
pickerController
:
PickerController
,
private
api
:
Api
,
private
load
:
Load
)
{
constructor
(
p
ublic
alerCtrl
:
AlertController
,
p
rivate
pickerController
:
PickerController
,
private
api
:
Api
,
private
load
:
Load
)
{
}
isError
=
false
;
...
...
@@ -370,47 +370,54 @@ export class EnvCfgPage implements OnInit {
}]);
}
referenceModel
()
{
this
.
selectModel
(
'风机'
,
0
);
}
addModel
()
{
this
.
popupModelSelect
(
1
,
'照明'
);
// this.popup($scope, $ionicPopup, $timeout);
this
.
selectModel
(
'照明'
,
1
);
}
changeModel
()
{
this
.
popupModelSelect
(
0
,
'喷淋'
);
this
.
selectModel
(
'喷淋'
,
1
);
}
// 模式组选择 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);
// });
// 参考:0 添加/替换:1
async
selectModel
(
deviceName
,
ref
)
{
const
alert
=
await
this
.
alerCtrl
.
create
({
header
:
deviceName
+
'常用模式选择'
,
inputs
:
[
{
type
:
'radio'
,
label
:
'春季'
,
value
:
'Spring'
,
checked
:
false
},
{
type
:
'radio'
,
label
:
'夏季'
,
value
:
'Summer'
,
checked
:
false
},
{
type
:
'radio'
,
label
:
'秋季'
,
value
:
'Autumn'
,
checked
:
false
},
{
type
:
'radio'
,
label
:
'冬季'
,
value
:
'Winter'
,
checked
:
false
}],
buttons
:
[{
text
:
'取消'
,
cssClass
:
'width: 40%'
},
{
text
:
'确定'
,
cssClass
:
'width: 40%'
}]
});
if
(
1
===
ref
)
{
alert
.
inputs
.
push
({
type
:
'radio'
,
label
:
'自定义'
,
value
:
'other'
,
checked
:
false
});
}
await
alert
.
present
();
}
}
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