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
ba96b544
Commit
ba96b544
authored
Nov 29, 2019
by
yating.lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对应BUG
parent
98b96e79
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
10 deletions
+25
-10
config.xml
config.xml
+1
-1
env-add-model.page.ts
src/app/envCtrl/env-add-model/env-add-model.page.ts
+6
-4
env-cfg.page.html
src/app/envCtrl/env-cfg/env-cfg.page.html
+3
-3
env-cfg.page.ts
src/app/envCtrl/env-cfg/env-cfg.page.ts
+15
-2
No files found.
config.xml
View file @
ba96b544
<?xml version='1.0' encoding='utf-8'?>
<widget
id=
"com.witium.muchang.test"
version=
"2.9.6.
2
"
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.6.
3
"
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>
...
...
src/app/envCtrl/env-add-model/env-add-model.page.ts
View file @
ba96b544
...
...
@@ -52,19 +52,20 @@ export class EnvAddModelPage implements OnInit {
}
tempHaveTouch
(
event
)
{
const
selectedId
=
event
.
target
.
value
-
10
;
// 温度: 10~
for
(
let
i
=
10
;
i
<=
50
;
i
++
)
{
this
.
defaultColumnOptions
[
0
][
i
-
10
]
=
i
.
toString
();
}
if
(
this
.
fanMode
.
selecting
===
false
)
{
this
.
fanMode
.
selecting
=
true
;
this
.
openPicker
(
1
,
41
,
this
.
defaultColumnOptions
,
event
);
this
.
openPicker
(
1
,
41
,
this
.
defaultColumnOptions
,
event
,
selectedId
);
}
}
async
openPicker
(
numColumns
=
1
,
numOptions
=
5
,
columnOptions
=
this
.
defaultColumnOptions
,
event
)
{
async
openPicker
(
numColumns
=
1
,
numOptions
=
5
,
columnOptions
=
this
.
defaultColumnOptions
,
event
,
selectedId
)
{
const
picker
=
await
this
.
pickerController
.
create
({
columns
:
this
.
getColumns
(
numColumns
,
numOptions
,
columnOptions
),
columns
:
this
.
getColumns
(
numColumns
,
numOptions
,
columnOptions
,
selectedId
),
buttons
:
[
{
text
:
'取消'
,
...
...
@@ -86,11 +87,12 @@ export class EnvAddModelPage implements OnInit {
await
picker
.
present
();
}
getColumns
(
numColumns
,
numOptions
,
columnOptions
)
{
getColumns
(
numColumns
,
numOptions
,
columnOptions
,
selectedId
)
{
const
columns
=
[];
for
(
let
i
=
0
;
i
<
numColumns
;
i
++
)
{
columns
.
push
({
name
:
`col
${
i
}
`
,
selectedIndex
:
selectedId
,
options
:
this
.
getColumnOptions
(
i
,
numOptions
,
columnOptions
)
});
}
...
...
src/app/envCtrl/env-cfg/env-cfg.page.html
View file @
ba96b544
...
...
@@ -7,7 +7,7 @@
<ion-content
color=
"light"
>
<ion-item
lines=
"none"
style=
"margin-left: 5px;"
class=
"itemColor"
>
<ion-label
class=
"font-sub-title"
>
选择牛舍
</ion-label>
<ion-select
class=
"font-sub-title"
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
curFieldRegionNo
"
(
ionChange
)="
s
electCowshed
()"
>
<ion-select
class=
"font-sub-title"
multiple=
"false"
cancelText=
"取消"
okText=
"确认"
[(
ngModel
)]="
curFieldRegionNo
"
(
ionChange
)="
onS
electCowshed
()"
>
<ion-select-option
*
ngFor=
"let cowshed of cowshedList"
[
value
]="
cowshed
.
fieldRegionNo
"
>
{{cowshed.fieldRegionName}}
</ion-select-option>
</ion-select>
</ion-item>
...
...
@@ -164,7 +164,7 @@
<ion-item-options
side=
"end"
>
<!--<ion-button color='danger' expand="full" style="width:15%;height:90%" (click)="deleteShowerModel(cfg)">删除</ion-button>-->
<div
style=
"text-content: center; background-color: lightgray;"
>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
(
click
)="
deleteShowerModel
(
allCfg
.
config
)"
style=
"margin-top:
12
0px;"
></ion-icon>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
(
click
)="
deleteShowerModel
(
allCfg
.
config
)"
style=
"margin-top:
8
0px;"
></ion-icon>
</div>
</ion-item-options>
</ion-item-sliding>
...
...
@@ -236,7 +236,7 @@
<ion-item-options
side=
"end"
>
<!--<ion-button color='danger' expand="full" style="width:15%;height:90%" (click)="deleteLightModel(cfg)">删除</ion-button>-->
<div
style=
"text-content: center; background-color: lightgray;"
(
click
)="
deleteLightModel
(
allCfg
.
config
)"
>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
style=
"margin-top:
7
0px;"
></ion-icon>
<ion-icon
name=
"remove-circle"
color=
'danger'
class=
"deleteIcon"
style=
"margin-top:
6
0px;"
></ion-icon>
</div>
</ion-item-options>
</ion-item-sliding>
...
...
src/app/envCtrl/env-cfg/env-cfg.page.ts
View file @
ba96b544
...
...
@@ -112,8 +112,8 @@ export class EnvCfgPage implements OnInit {
ionViewWillLeave
()
{
clearInterval
(
this
.
commTmr
);
this
.
curFieldRegionNo
=
''
;
this
.
curCowshed
.
fieldRegionName
=
null
;
//
this.curFieldRegionNo = '';
//
this.curCowshed.fieldRegionName = null;
}
init
()
{
...
...
@@ -137,6 +137,7 @@ export class EnvCfgPage implements OnInit {
// });
this
.
light
.
controlConfig
=
cfg
;
}
this
.
ac
.
queryParams
=
null
;
}
});
}
...
...
@@ -167,6 +168,18 @@ export class EnvCfgPage implements OnInit {
}]);
}
onSelectCowshed
()
{
this
.
isOpenProperty
=
false
;
this
.
isOpenFan
=
false
;
this
.
isOpenShower
=
false
;
this
.
isOpenLight
=
false
;
this
.
isOpenWaterChannel
=
false
;
this
.
isOpenInHouse
=
false
;
this
.
isOpenEnvironment
=
false
;
this
.
isOpenHeatStress
=
false
;
this
.
selectCowshed
();
}
// 获取当前牛舍配置信息
selectCowshed
()
{
if
(
this
.
curFieldRegionNo
!==
null
&&
this
.
curFieldRegionNo
!==
''
)
{
...
...
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