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
63ed0d3a
Commit
63ed0d3a
authored
Jan 23, 2019
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix opendoor commonInfo
parent
43f4fd99
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
9 deletions
+33
-9
client/actions/chooseTaskContainer.js
+5
-1
client/containers/HomePageContainer/HomePageContainer.jsx
+17
-3
client/containers/PageContainer/PageContainer.jsx
+9
-3
client/containers/QuestionContainer/QuestionContainer.jsx
+2
-2
No files found.
client/actions/chooseTaskContainer.js
View file @
63ed0d3a
import
fetch
from
'isomorphic-fetch'
import
fetch
from
'isomorphic-fetch'
import
{
logout
,
getTaskList
}
from
"./common"
;
import
{
logout
,
getTaskList
,
saveCommonInfo
}
from
"./common"
;
let
domain
=
ENV
.
domain
;
let
domain
=
ENV
.
domain
;
// let domain1='http://192.168.10.184:8080/maxbox/web/'
// let domain1='http://192.168.10.184:8080/maxbox/web/'
const
willCloseDoor
=
(
data
,
flag
=
false
)
=>
{
const
willCloseDoor
=
(
data
,
flag
=
false
)
=>
{
...
@@ -22,7 +22,11 @@ const willCloseDoor=(data,flag=false)=>{
...
@@ -22,7 +22,11 @@ const willCloseDoor=(data,flag=false)=>{
}).
then
((
response
)
=>
response
.
json
())
}).
then
((
response
)
=>
response
.
json
())
.
then
((
json
)
=>
{
.
then
((
json
)
=>
{
if
(
flag
){
if
(
flag
){
//回收箱完成
dispatch
(
getTaskList
(
data
))
dispatch
(
getTaskList
(
data
))
}
else
{
//没有问题,完成任务
// dispatch(saveCommonInfo(Object.assign({},{taskInfo:{currentTaskType:'FINISH'}})))
}
}
// dispatch(closeDoorSuccess(data));
// dispatch(closeDoorSuccess(data));
})
})
...
...
client/containers/HomePageContainer/HomePageContainer.jsx
View file @
63ed0d3a
...
@@ -9,9 +9,10 @@ export default class HomePageContainer extends React.Component{
...
@@ -9,9 +9,10 @@ export default class HomePageContainer extends React.Component{
constructor
(
props
){
constructor
(
props
){
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
text
:
''
text
:
''
,
closeDoorStatus
:
0
}
}
this
.
logout
=
this
.
logout
.
bind
(
this
)
this
.
logout
=
this
.
logout
.
bind
(
this
)
;
this
.
showLogoutPopup
=
this
.
showLogoutPopup
.
bind
(
this
)
this
.
showLogoutPopup
=
this
.
showLogoutPopup
.
bind
(
this
)
}
}
...
@@ -38,10 +39,23 @@ export default class HomePageContainer extends React.Component{
...
@@ -38,10 +39,23 @@ export default class HomePageContainer extends React.Component{
}
}
logout
(){
logout
(){
if
(
this
.
state
.
closeDoorStatus
===
0
){
this
.
setState
({
closeDoorStatus
:
1
},()
=>
{
this
.
props
.
willCloseDoor
();
// let msg={type:'WILL_CLOSEDOOR'};
// let msg={type:'WILL_CLOSEDOOR'};
// sendMsg(JSON.stringify(msg));
// sendMsg(JSON.stringify(msg));
// this.props.changeIsSend(true);
// this.props.changeIsSend(true);
this
.
props
.
tempLogout
()
this
.
props
.
tempLogout
()
})
}
}
componentWillUnmount
(){
this
.
setState
({
closeDoorStatus
:
0
})
}
}
showLogoutPopup
(){
showLogoutPopup
(){
...
@@ -89,7 +103,7 @@ export default class HomePageContainer extends React.Component{
...
@@ -89,7 +103,7 @@ export default class HomePageContainer extends React.Component{
:
null
:
null
}
}
<
div
className=
{
"homeText font42"
}
style=
{
{
marginTop
:
marginTop20
}
}
>
请关门,然后继续完成其他工作
</
div
>
<
div
className=
{
"homeText font42"
}
style=
{
{
marginTop
:
marginTop20
}
}
>
请关门,然后继续完成其他工作
</
div
>
<
Button
text=
{
'
关门'
}
btnContainer=
{
'colfff font30'
}
style=
{
buttonStyle
}
option=
{
this
.
logout
.
bind
(
this
)
}
/>
<
Button
text=
{
this
.
state
.
closeDoorStatus
?
'关门中...'
:
'请点击按钮后
关门'
}
btnContainer=
{
'colfff font30'
}
style=
{
buttonStyle
}
option=
{
this
.
logout
.
bind
(
this
)
}
/>
</
div
>
:
</
div
>
:
<
div
className=
{
"homeContainer"
}
>
<
div
className=
{
"homeContainer"
}
>
<
img
className=
{
"homeIcon"
}
style=
{
imgStyle
}
src=
{
UTILPATH
.
localImg
.
homePage
}
alt=
""
/>
<
img
className=
{
"homeIcon"
}
style=
{
imgStyle
}
src=
{
UTILPATH
.
localImg
.
homePage
}
alt=
""
/>
...
...
client/containers/PageContainer/PageContainer.jsx
View file @
63ed0d3a
...
@@ -194,7 +194,7 @@ class PageContainer extends React.Component {
...
@@ -194,7 +194,7 @@ class PageContainer extends React.Component {
}
}
if
(
info
.
area
){
if
(
info
.
area
){
//区域信息
//区域信息
dispatch
(
saveCommonInfo
(
Object
.
assign
({},{
taskInfo
:{
area
:
info
.
area
,
taskId
:
0
,
currentTaskType
:
''
}})))
dispatch
(
saveCommonInfo
(
Object
.
assign
({},{
taskInfo
:{
area
:
info
.
area
,
taskId
:
0
,
currentTaskType
:
'
OPEN
'
}})))
}
}
this
.
setState
({
this
.
setState
({
...
@@ -270,11 +270,11 @@ class PageContainer extends React.Component {
...
@@ -270,11 +270,11 @@ class PageContainer extends React.Component {
//补货人员,根据type判断显示页面
//补货人员,根据type判断显示页面
let
nextTaskInfo
=
nextCommonInfo
.
taskInfo
||
{};
let
nextTaskInfo
=
nextCommonInfo
.
taskInfo
||
{};
let
lastCurrentType
=
taskInfo
.
currentTaskType
;
let
lastCurrentType
=
taskInfo
.
currentTaskType
||
''
;
if
(
nextUserInfo
.
taskType
===
"SECOND"
&&
nextTaskInfo
&&
nextTaskInfo
.
currentTaskType
&&
if
(
nextUserInfo
.
taskType
===
"SECOND"
&&
nextTaskInfo
&&
nextTaskInfo
.
currentTaskType
&&
nextTaskInfo
.
currentTaskType
!==
lastCurrentType
nextTaskInfo
.
currentTaskType
!==
lastCurrentType
&&
lastCurrentType
!==
'FINISH'
){
){
switch
(
nextTaskInfo
.
currentTaskType
)
{
switch
(
nextTaskInfo
.
currentTaskType
)
{
case
'LR'
:
case
'LR'
:
...
@@ -299,6 +299,9 @@ class PageContainer extends React.Component {
...
@@ -299,6 +299,9 @@ class PageContainer extends React.Component {
case
'REA'
:
case
'REA'
:
this
.
changePages
(
CONFIG
.
showPage
[
15
]);
this
.
changePages
(
CONFIG
.
showPage
[
15
]);
break
;
break
;
case
'FINISH'
:
this
.
changePages
(
CONFIG
.
showPage
[
131
]);
break
;
default
:
default
:
this
.
changePages
(
CONFIG
.
showPage
[
13
]);
this
.
changePages
(
CONFIG
.
showPage
[
13
]);
break
;
break
;
...
@@ -614,6 +617,9 @@ class PageContainer extends React.Component {
...
@@ -614,6 +617,9 @@ class PageContainer extends React.Component {
case
'REA'
:
case
'REA'
:
this
.
changePages
(
CONFIG
.
showPage
[
15
]);
this
.
changePages
(
CONFIG
.
showPage
[
15
]);
break
;
break
;
case
'FINISH'
:
this
.
changePages
(
CONFIG
.
showPage
[
131
]);
break
;
default
:
default
:
this
.
changePages
(
CONFIG
.
showPage
[
13
]);
this
.
changePages
(
CONFIG
.
showPage
[
13
]);
break
;
break
;
...
...
client/containers/QuestionContainer/QuestionContainer.jsx
View file @
63ed0d3a
...
@@ -23,11 +23,11 @@ export default class QuestionContainer extends React.Component{
...
@@ -23,11 +23,11 @@ export default class QuestionContainer extends React.Component{
handleNoQuestion
(){
handleNoQuestion
(){
let
{
menuType
=
''
,
changePages
}
=
this
.
props
;
let
{
menuType
=
''
,
changePages
,
willCloseDoor
}
=
this
.
props
;
if
(
menuType
){
if
(
menuType
){
this
.
context
.
goBackTask
()
this
.
context
.
goBackTask
()
}
else
{
}
else
{
this
.
props
.
willCloseDoor
();
//
willCloseDoor();
changePages
(
CONFIG
.
showPage
[
131
])
changePages
(
CONFIG
.
showPage
[
131
])
}
}
}
}
...
...
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