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
b1ac6330
Commit
b1ac6330
authored
Sep 14, 2018
by
wujiabao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改pageContainer
parent
4015187e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
39 deletions
+47
-39
client/actions/BreakageContainer.js
+17
-4
client/actions/common.js
+12
-14
client/containers/HomePageContainer/HomePageContainer.jsx
+0
-20
client/containers/PageContainer/PageContainer.jsx
+18
-1
client/reducers/BreakageContainer.js
+0
-0
No files found.
client/actions/BreakageContainer.js
View file @
b1ac6330
import
fetch
from
'isomorphic-fetch'
import
fetch
from
'isomorphic-fetch'
import
getTaskList
from
'./common'
const
changeStatus
=
(
data
)
=>
{
const
changeStatus
=
(
data
)
=>
{
let
{
taskId
,
currentTaskType
}
=
data
;
let
{
taskId
,
currentTaskType
}
=
data
.
taskInfo
;
let
url
=
`http://192.168.10.128:8080/`
let
url
=
`http://192.168.10.128:8080/
web/flat/work/lr/status/
${
taskId
}
/
${
currentTaskType
}
`
return
(
dispatch
)
=>
{
return
(
dispatch
)
=>
{
fetch
(
''
,{
fetch
(
url
,{
credentials
:
'include'
,
credentials
:
'include'
,
method
:
'PUT'
,
method
:
'PUT'
,
mode
:
'cors'
,
mode
:
'cors'
,
body
:
{}
body
:
{}
}).
then
((
response
)
=>
response
.
json
())
.
then
((
json
)
=>
{
if
(
json
.
data
){
getTaskList
(
data
)
}
})
})
}
}
}
}
const
changeTaskStatus
=
(
data
)
=>
{
return
{
}
}
\ No newline at end of file
client/actions/common.js
View file @
b1ac6330
...
@@ -38,7 +38,7 @@ let test='http://192.168.10.128:8080/'
...
@@ -38,7 +38,7 @@ let test='http://192.168.10.128:8080/'
const
getTaskInfo
=
(
data
)
=>
{
const
getTaskInfo
=
(
data
)
=>
{
// let {employeeId,storeId} = data;
// let {employeeId,storeId} = data;
// let url = `${test}web/flat/ready${storeId}/${employeeId}`
// let url = `${test}web/flat/ready${storeId}/${employeeId}`
let
url
=
`
${
test
}
web/flat/ready/
16
/2`
;
let
url
=
`
${
test
}
web/flat/ready/
5
/2`
;
return
(
dispatch
)
=>
{
return
(
dispatch
)
=>
{
// let taskInfo=testData.data;
// let taskInfo=testData.data;
// dispatch(startalljob(Object.assign({},{taskInfo})))
// dispatch(startalljob(Object.assign({},{taskInfo})))
...
@@ -55,7 +55,6 @@ const getTaskInfo = (data)=>{
...
@@ -55,7 +55,6 @@ const getTaskInfo = (data)=>{
taskInfo
=
Object
.
assign
({},
json
.
data
)
taskInfo
=
Object
.
assign
({},
json
.
data
)
}
}
console
.
log
(
taskInfo
)
console
.
log
(
taskInfo
)
dispatch
(
saveCommonInfo
(
Object
.
assign
({},
taskInfo
)))
dispatch
(
startalljob
(
Object
.
assign
({},{
taskInfo
})))
dispatch
(
startalljob
(
Object
.
assign
({},{
taskInfo
})))
}).
catch
(
e
=>
{
console
.
error
(
e
)})
}).
catch
(
e
=>
{
console
.
error
(
e
)})
...
@@ -113,7 +112,6 @@ const getInfoByBarcode = (data)=>{
...
@@ -113,7 +112,6 @@ const getInfoByBarcode = (data)=>{
const
getUserinfo
=
(
employeeId
,
storeId
)
=>
{
const
getUserinfo
=
(
employeeId
,
storeId
)
=>
{
let
bodyData
=
Object
.
assign
({},{
employeeId
,
storeId
})
let
bodyData
=
Object
.
assign
({},{
employeeId
,
storeId
})
return
(
dispatch
)
=>
{
return
(
dispatch
)
=>
{
dispatch
(
saveHeaderInfo
(
info
));
fetch
(
domain
+
'machine_pad/get_alowed_task.action'
,{
fetch
(
domain
+
'machine_pad/get_alowed_task.action'
,{
credentials
:
'include'
,
credentials
:
'include'
,
method
:
'POST'
,
method
:
'POST'
,
...
@@ -138,17 +136,17 @@ const getUserinfo = (employeeId,storeId)=>{
...
@@ -138,17 +136,17 @@ const getUserinfo = (employeeId,storeId)=>{
}
}
};
};
const
test
=
()
=>
{
//
const test = ()=>{
fetch
(
'http://192.168.10.128:8080/web/flat/work/status/1'
,{
//
fetch('http://192.168.10.128:8080/web/flat/work/status/1',{
credentials
:
'include'
,
//
credentials : 'include',
method
:
'PUT'
,
//
method : 'PUT',
mode
:
'cors'
,
//
mode : 'cors',
headers
:
myHeaders
,
//
headers:myHeaders,
}).
then
((
response
)
=>
response
.
json
())
//
}).then((response)=>response.json())
.
then
(
json
=>
{
//
.then(json=>{
console
.
log
(
json
)
//
console.log(json)
}).
catch
(
e
=>
{
console
.
error
(
e
)})
//
}).catch(e=>{console.error(e)})
}
//
}
//拉取工单
//拉取工单
const
getTaskList
=
(
data
)
=>
{
const
getTaskList
=
(
data
)
=>
{
...
...
client/containers/HomePageContainer/HomePageContainer.jsx
View file @
b1ac6330
...
@@ -47,27 +47,7 @@ export default class HomePageContainer extends React.Component{
...
@@ -47,27 +47,7 @@ export default class HomePageContainer extends React.Component{
let
props
=
this
.
props
;
let
props
=
this
.
props
;
props
.
startTask
();
props
.
startTask
();
}
}
componentWillReceiveProps
(
nextProps
){
let
props
=
this
.
props
;
if
(
nextProps
.
headerInfo
.
taskInfo
){
let
num
=
nextProps
.
headerInfo
.
taskInfo
.
currentTaskNum
;
switch
(
num
){
case
1
:
props
.
changePages
(
CONFIG
.
showPage
[
5
]);
break
;
case
2
:
props
.
changePages
(
CONFIG
.
showPage
[
5
]);
break
;
case
1
:
props
.
changePages
(
CONFIG
.
showPage
[
6
]);
break
;
case
1
:
props
.
changePages
(
CONFIG
.
showPage
[
6
]);
break
;
}
}
}
}
}
HomePageContainer
.
propTypes
=
{
HomePageContainer
.
propTypes
=
{
...
...
client/containers/PageContainer/PageContainer.jsx
View file @
b1ac6330
...
@@ -54,7 +54,7 @@ class PageContainer extends React.Component {
...
@@ -54,7 +54,7 @@ class PageContainer extends React.Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
showPage
:
showPage
[
1
0
],
showPage
:
showPage
[
1
3
],
lastPage
:
''
,
lastPage
:
''
,
page
:
null
,
page
:
null
,
popupInfo
:
defaultPopupInfo
,
popupInfo
:
defaultPopupInfo
,
...
@@ -210,6 +210,23 @@ class PageContainer extends React.Component {
...
@@ -210,6 +210,23 @@ class PageContainer extends React.Component {
//有错误信息,弹出错误信息弹窗
//有错误信息,弹出错误信息弹窗
this
.
showError
(
state
.
errMsg
.
errMsg
)
this
.
showError
(
state
.
errMsg
.
errMsg
)
}
}
if
(
nextProps
.
state
.
commonInfo
.
taskInfo
){
let
num
=
nextProps
.
state
.
commonInfo
.
taskInfo
.
currentTaskNum
;
switch
(
num
){
case
1
:
this
.
changePages
(
CONFIG
.
showPage
[
5
]);
break
;
case
2
:
this
.
changePages
(
CONFIG
.
showPage
[
5
]);
break
;
case
1
:
this
.
changePages
(
CONFIG
.
showPage
[
6
]);
break
;
case
1
:
this
.
changePages
(
CONFIG
.
showPage
[
6
]);
break
;
}
}
}
}
componentWillUnmount
(){
componentWillUnmount
(){
}
}
...
...
client/reducers/BreakageContainer.js
0 → 100644
View file @
b1ac6330
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