Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
max_android_panel
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xin
max_android_panel
Commits
b0565605
Commit
b0565605
authored
Mar 20, 2019
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初步完成需求168
parent
c1def063
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
22 deletions
+52
-22
client/containers/HomePageContainer/HomePageContainer.jsx
+3
-3
client/containers/PageContainer/PageContainer.jsx
+49
-19
No files found.
client/containers/HomePageContainer/HomePageContainer.jsx
View file @
b0565605
...
@@ -44,9 +44,9 @@ export default class HomePageContainer extends React.Component{
...
@@ -44,9 +44,9 @@ export default class HomePageContainer extends React.Component{
closeDoorStatus
:
1
closeDoorStatus
:
1
},()
=>
{
},()
=>
{
this
.
props
.
willCloseDoor
();
this
.
props
.
willCloseDoor
();
// let msg={type:'WILL_CLOSEDOOR'};
//
sendMsg(JSON.stringify(msg));
//
this.props.beginCloseDoor()
// this.props.changeIsSend(true);
this
.
props
.
tempLogout
()
this
.
props
.
tempLogout
()
})
})
}
}
...
...
client/containers/PageContainer/PageContainer.jsx
View file @
b0565605
...
@@ -78,8 +78,8 @@ class PageContainer extends React.Component {
...
@@ -78,8 +78,8 @@ class PageContainer extends React.Component {
successCloseDoor
:
false
,
successCloseDoor
:
false
,
showClassify
:
false
,
//显示右侧菜单栏,默认不显示,目前没用
showClassify
:
false
,
//显示右侧菜单栏,默认不显示,目前没用
isSend
:
false
,
isSend
:
false
,
area
:
''
//区域
area
:
''
,
//区域
maxTime
:
300
};
};
this
.
getPages
=
this
.
getPages
.
bind
(
this
);
//获取当前页面
this
.
getPages
=
this
.
getPages
.
bind
(
this
);
//获取当前页面
this
.
showPopup
=
this
.
showPopup
.
bind
(
this
);
//显示弹窗
this
.
showPopup
=
this
.
showPopup
.
bind
(
this
);
//显示弹窗
...
@@ -145,6 +145,9 @@ class PageContainer extends React.Component {
...
@@ -145,6 +145,9 @@ class PageContainer extends React.Component {
this
.
getPageStyle
();
this
.
getPageStyle
();
let
that
=
this
;
let
that
=
this
;
let
{
dispatch
}
=
this
.
props
;
let
{
dispatch
}
=
this
.
props
;
// this.beginCountBack();
// dispatch(saveCommonInfo({ip:"192.168.10.128"}));
// dispatch(saveCommonInfo({ip:"192.168.10.128"}));
// dispatch(getStoreInfo(20));
// dispatch(getStoreInfo(20));
// dispatch(saveCommonInfo({userInfo:{employeeId:14}}));
// dispatch(saveCommonInfo({userInfo:{employeeId:14}}));
...
@@ -197,9 +200,20 @@ class PageContainer extends React.Component {
...
@@ -197,9 +200,20 @@ class PageContainer extends React.Component {
dispatch
(
saveCommonInfo
(
Object
.
assign
({},{
taskInfo
:{
area
:
info
.
area
,
taskId
:
0
,
currentTaskType
:
'OPEN'
}})))
dispatch
(
saveCommonInfo
(
Object
.
assign
({},{
taskInfo
:{
area
:
info
.
area
,
taskId
:
0
,
currentTaskType
:
'OPEN'
}})))
}
}
let
maxTime
=
this
.
maxCountBackTime
;
if
(
parseInt
(
info
.
maxTime
)){
maxTime
=
parseInt
(
info
.
maxTime
);
}
this
.
setState
({
this
.
setState
({
successCloseDoor
:
false
,
successCloseDoor
:
false
,
area
:
info
.
area
area
:
info
.
area
,
maxTime
:
maxTime
},()
=>
{
//开门开始倒计时
this
.
countBackTime
=
maxTime
;
this
.
beginCountBack
()
});
});
break
;
break
;
case
'SUCCESS_CLOSEDOOR'
:
case
'SUCCESS_CLOSEDOOR'
:
...
@@ -243,8 +257,6 @@ class PageContainer extends React.Component {
...
@@ -243,8 +257,6 @@ class PageContainer extends React.Component {
}
}
componentDidMount
(){
componentDidMount
(){
// this.beginCountBack()
let
{
dispatch
}
=
this
.
props
;
}
}
componentDidUpdate
()
{
componentDidUpdate
()
{
}
}
...
@@ -352,7 +364,7 @@ class PageContainer extends React.Component {
...
@@ -352,7 +364,7 @@ class PageContainer extends React.Component {
this
.
setState
({
this
.
setState
({
showPage
:
showPage
[
1
]
showPage
:
showPage
[
1
]
},()
=>
{
},()
=>
{
this
.
beginCountBack
();
//
this.beginCountBack();
});
});
}
}
showSecondTroubelPage
(
info
){
showSecondTroubelPage
(
info
){
...
@@ -374,6 +386,7 @@ class PageContainer extends React.Component {
...
@@ -374,6 +386,7 @@ class PageContainer extends React.Component {
this
.
countBackTime
=
this
.
maxCountBackTime
;
this
.
countBackTime
=
this
.
maxCountBackTime
;
clearTimeout
(
this
.
countbackTimer
);
clearTimeout
(
this
.
countbackTimer
);
this
.
countbackTimer
=
null
;
this
.
countbackTimer
=
null
;
this
.
countBackTime
=
this
.
state
.
maxTime
;
this
.
countBack
.
bind
(
this
)();
this
.
countBack
.
bind
(
this
)();
}
}
...
@@ -407,7 +420,8 @@ class PageContainer extends React.Component {
...
@@ -407,7 +420,8 @@ class PageContainer extends React.Component {
let
btnWidth
=
UTILPATH
.
getRemByPx
(
260
);
let
btnWidth
=
UTILPATH
.
getRemByPx
(
260
);
let
btnMarginLeft
=
UTILPATH
.
getRemByPx
(
30
);
let
btnMarginLeft
=
UTILPATH
.
getRemByPx
(
30
);
let
btnBorderRadius
=
UTILPATH
.
getRemByPx
(
10
);
let
btnBorderRadius
=
UTILPATH
.
getRemByPx
(
10
);
let
btnDom
=
<
Button
key=
{
"pagecountBack1"
}
style=
{
{
'width'
:
btnWidth
}
}
text=
{
"确定"
}
option=
{
this
.
overTimeSolve
}
/>
let
border
=
"2px solid #e5e5e5"
;
let
btnDom
=
<
Button
key=
{
"pagecountBack1"
}
style=
{
{
'width'
:
btnWidth
,
'border'
:
border
}
}
text=
{
"确定"
}
option=
{
this
.
overTimeSolve
}
/>
let
clockDom
=
<
Clock
key=
{
"pagecountBack2"
}
totalTime=
{
60
}
let
clockDom
=
<
Clock
key=
{
"pagecountBack2"
}
totalTime=
{
60
}
style=
{
{
'width'
:
btnWidth
,
'marginLeft'
:
btnMarginLeft
,
'borderRadius'
:
btnBorderRadius
}
}
style=
{
{
'width'
:
btnWidth
,
'marginLeft'
:
btnMarginLeft
,
'borderRadius'
:
btnBorderRadius
}
}
callback=
{
this
.
showAlarm
}
callback=
{
this
.
showAlarm
}
...
@@ -425,7 +439,8 @@ class PageContainer extends React.Component {
...
@@ -425,7 +439,8 @@ class PageContainer extends React.Component {
uploadErrs
(
type
){
uploadErrs
(
type
){
let
{
dispatch
,
state
}
=
this
.
props
;
let
{
dispatch
,
state
}
=
this
.
props
;
dispatch
(
uploadError
(
Object
.
assign
({},
state
.
commonInfo
,{
exceptionType
:
type
})));
let
{
commonInfo
=
{}}
=
state
;
dispatch
(
uploadError
(
commonInfo
,{
exceptionType
:
type
},
false
));
}
}
...
@@ -448,11 +463,15 @@ class PageContainer extends React.Component {
...
@@ -448,11 +463,15 @@ class PageContainer extends React.Component {
//弹出警告弹窗,并报警
//弹出警告弹窗,并报警
showAlarm
(){
showAlarm
(){
//屏幕超过300s无人操作
//屏幕超过300s无人操作
this
.
uploadErrs
(
errorType
[
1
])
//TODO 上报300s无人操作
this
.
uploadErrs
(
errorType
[
1
]);
let
btnWidth
=
UTILPATH
.
getRemByPx
(
260
);
let
btnWidth
=
UTILPATH
.
getRemByPx
(
260
);
let
btnMarginLeft
=
UTILPATH
.
getRemByPx
(
30
);
let
btnMarginLeft
=
UTILPATH
.
getRemByPx
(
30
);
let
btnBorderRadius
=
UTILPATH
.
getRemByPx
(
10
);
let
btnBorderRadius
=
UTILPATH
.
getRemByPx
(
10
);
let
btnDom
=
<
Button
key=
{
"pagecountBack1"
}
style=
{
{
'width'
:
btnWidth
}
}
text=
{
"确定"
}
option=
{
this
.
beginCloseDoor
}
/>
let
border
=
"2px solid #e5e5e5"
let
btnDom
=
<
Button
key=
{
"pagecountBack1"
}
style=
{
{
'width'
:
btnWidth
,
'border'
:
border
}
}
text=
{
"确定"
}
option=
{
this
.
beginCloseDoor
}
/>
let
clockDom
=
<
Clock
key=
{
"pagecountBack2"
}
totalTime=
{
30
}
let
clockDom
=
<
Clock
key=
{
"pagecountBack2"
}
totalTime=
{
30
}
style=
{
{
'width'
:
btnWidth
,
'marginLeft'
:
btnMarginLeft
,
'borderRadius'
:
btnBorderRadius
}
}
style=
{
{
'width'
:
btnWidth
,
'marginLeft'
:
btnMarginLeft
,
'borderRadius'
:
btnBorderRadius
}
}
callback=
{
this
.
beginCloseDoor
}
callback=
{
this
.
beginCloseDoor
}
...
@@ -475,6 +494,10 @@ class PageContainer extends React.Component {
...
@@ -475,6 +494,10 @@ class PageContainer extends React.Component {
let
btnWidth
=
UTILPATH
.
getRemByPx
(
260
);
let
btnWidth
=
UTILPATH
.
getRemByPx
(
260
);
let
btnMarginLeft
=
UTILPATH
.
getRemByPx
(
30
);
let
btnMarginLeft
=
UTILPATH
.
getRemByPx
(
30
);
let
btnBorderRadius
=
UTILPATH
.
getRemByPx
(
10
);
let
btnBorderRadius
=
UTILPATH
.
getRemByPx
(
10
);
//老机器
this
.
handleCloseDoor
();
this
.
setState
({
this
.
setState
({
popupInfo
:
defaultPopupInfo
popupInfo
:
defaultPopupInfo
},()
=>
{
},()
=>
{
...
@@ -487,7 +510,15 @@ class PageContainer extends React.Component {
...
@@ -487,7 +510,15 @@ class PageContainer extends React.Component {
popupText
:
'关门倒数,请尽快站到设备外关闭设备门'
,
popupText
:
'关门倒数,请尽快站到设备外关闭设备门'
,
popupButtons
:[
clockDom
]
popupButtons
:[
clockDom
]
});
});
this
.
showPopup
({
popupChild
:
beginCloseDoorDom
})
this
.
showPopup
({
popupChild
:
beginCloseDoorDom
});
//新机器 todo
// sendMsg(JSON.stringify({type:'WILL_CLOSEDOOR'}));
// this.changeIsSend.bind(this)(true);
})
})
}
}
...
@@ -502,17 +533,15 @@ class PageContainer extends React.Component {
...
@@ -502,17 +533,15 @@ class PageContainer extends React.Component {
}
}
judgeDoorStatus
(){
judgeDoorStatus
(){
//成功关门
this
.
setState
({
//关门失败
showPage
:
showPage
[
initPage
],
// this.emptyUser();
popupInfo
:
defaultPopupInfo
,
// this.failCloseDoor()
},()
=>
{
if
(
!
this
.
state
.
successCloseDoor
){
if
(
!
this
.
state
.
successCloseDoor
){
//关门失败,上传警报
//关门失败,上传警报
this
.
failCloseDoor
();
this
.
failCloseDoor
();
}
}
//写死的数据
});
// this.tempLogout();
}
}
playAlarmMusic
(){
playAlarmMusic
(){
...
@@ -739,6 +768,7 @@ class PageContainer extends React.Component {
...
@@ -739,6 +768,7 @@ class PageContainer extends React.Component {
closeDoor=
{
true
}
closeDoor=
{
true
}
tempLogout=
{
()
=>
this
.
tempLogout
.
bind
(
this
)()
}
tempLogout=
{
()
=>
this
.
tempLogout
.
bind
(
this
)()
}
changeIsSend
={
this
.
changeIsSend
.
bind
(
this
)}
changeIsSend
={
this
.
changeIsSend
.
bind
(
this
)}
beginCloseDoor=
{
this
.
beginCloseDoor
.
bind
(
this
)
}
/>
;
/>
;
break;
break;
case showPage[12]:
case showPage[12]:
...
@@ -841,7 +871,7 @@ class PageContainer extends React.Component {
...
@@ -841,7 +871,7 @@ class PageContainer extends React.Component {
handleTouch()
{
handleTouch()
{
this
.
countBackTime
=
this
.
maxCountBack
Time
;
this
.
countBackTime
=
this
.
state
.
max
Time
;
}
}
render()
{
render()
{
...
...
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