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
d27922d1
Commit
d27922d1
authored
6 years ago
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理故障列表提交部分
parent
37a39bc8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
73 deletions
+97
-73
client/actions/getTroubles.js
+1
-14
client/components/TroubleComponent/FinishTroubleComponent/FinishTroubleComponent.jsx
+31
-0
client/components/TroubleComponent/FinishTroubleComponent/index.css
+10
-0
client/containers/PageContainer/PageContainer.jsx
+2
-1
client/containers/TroubleContainer/TroubleContainer.jsx
+41
-43
client/containers/TroubleContainer/index.css
+12
-15
No files found.
client/actions/getTroubles.js
View file @
d27922d1
...
...
@@ -35,20 +35,7 @@ let json = {
"id"
:
1
,
"errorCode"
:
null
,
"type"
:
"OP"
,
"files"
:
[
{
"id"
:
16
,
"filePath"
:
"/tmp/2016-08-16/1471329685902.jpg"
},
{
"id"
:
17
,
"filePath"
:
"/sku/0/0/427/1471329704482.jpg"
},
{
"id"
:
18
,
"filePath"
:
"/sku/0/0/426/1471330380712.jpg"
}
],
"files"
:
[],
"parentProblemName"
:
"机械故障"
,
"subProblemName"
:
"其他问题111"
}
...
...
This diff is collapsed.
Click to expand it.
client/components/TroubleComponent/FinishTroubleComponent/FinishTroubleComponent.jsx
0 → 100644
View file @
d27922d1
import
React
from
'react'
;
import
Button
from
'../../CommonComponent/ButtonComponent/ButtonComponent'
require
(
'./index.css'
);
export
default
class
FinishTroubleComponent
extends
React
.
Component
{
constructor
(
props
){
super
(
props
);
}
haveNext
(){
console
.
log
(
"有"
)
}
haveNoNext
(){
console
.
log
(
"没有"
)
}
render
(){
return
(
<
div
className=
{
"finishTroubleComponent "
}
>
<
div
className=
{
"selectText font40 col333"
}
style=
{
{
"marginTop"
:
"230px"
}
}
>
出货板传送区、机械手平台、轨道是否有未出货遗留的货品
</
div
>
<
div
className=
{
"selectButtons"
}
>
<
Button
text=
{
"有"
}
option=
{
this
.
haveNext
.
bind
(
this
)
}
style=
{
{
"marginTop"
:
"128px"
}
}
/>
<
Button
text=
{
"没有"
}
option=
{
this
.
haveNoNext
.
bind
(
this
)
}
style=
{
{
"marginTop"
:
"49px"
}
}
/>
</
div
>
</
div
>
)
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
client/components/TroubleComponent/FinishTroubleComponent/index.css
0 → 100644
View file @
d27922d1
.finishTroubleComponent
{
text-align
:
center
;
}
.finishTroubleComponent
.selectButtons
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
client/containers/PageContainer/PageContainer.jsx
View file @
d27922d1
...
...
@@ -135,7 +135,8 @@ class PageContainer extends React.Component {
userInfo=
{
state
.
userInfo
}
initTroubleList=
{
()
=>
dispatch
(
getTroubleList
())
}
showTextArea=
{
(
text
)
=>
this
.
showTextArea
(
text
)
}
showPopup=
{
(
info
)
=>
this
.
showPopup
(
info
)
}
hidePopup=
{
()
=>
this
.
hidePopup
()
}
/>;
break
;
case
showPage
[
2
]:
...
...
This diff is collapsed.
Click to expand it.
client/containers/TroubleContainer/TroubleContainer.jsx
View file @
d27922d1
...
...
@@ -4,6 +4,7 @@ import TroubleItem from '../../components/TroubleComponent/TroubleItemComponent/
import
Button
from
'../../components/CommonComponent/ButtonComponent/ButtonComponent'
import
HeaderComponent
from
'../../components/CommonComponent/HeaderComponent/HeaderComponent'
import
TextArea
from
"../TextAreaContainer/TextAreaContainer"
;
import
FinishTrouble
from
'../../components/TroubleComponent/FinishTroubleComponent/FinishTroubleComponent'
require
(
'./index.css'
)
export
default
class
TroubleContainer
extends
React
.
Component
{
constructor
(
props
){
...
...
@@ -21,17 +22,29 @@ export default class TroubleContainer extends React.Component{
this
.
saveText
=
this
.
saveText
.
bind
(
this
);
}
dealTrouble
(){
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
troubleList
=
this
.
state
.
troubleList
;
let
details
=
troubleList
.
details
;
let
arr
=
details
.
filter
(
d
=>
{
return
!
d
.
isExistProblem
||
!
d
.
explanation
});
})
this
.
setState
({
showTrouble
:
false
})
if
(
arr
&&
arr
.
length
>
0
){
showPopup
({
popupText
:
'请完成所有需要处理的故障的必填项'
,
popupButtons
:[{
text
:
'关闭'
,
option
:
hidePopup
}]
})
}
else
{
details
.
forEach
((
d
)
=>
{
d
.
imagesFileId
=
d
.
files
.
map
(
f
=>
f
.
id
).
join
(
','
);
});
this
.
setState
({
showTrouble
:
false
})
}
}
...
...
@@ -60,17 +73,6 @@ export default class TroubleContainer extends React.Component{
}
haveNext
(){
console
.
log
(
"有"
)
}
haveNoNext
(){
console
.
log
(
"没有"
)
}
showText
(
errcode
){
console
.
log
(
"errcode "
,
errcode
)
let
troubleList
=
this
.
state
.
troubleList
;
...
...
@@ -128,7 +130,6 @@ export default class TroubleContainer extends React.Component{
return
<
TroubleItem
key=
{
k
}
item=
{
i
}
num=
{
k
+
1
}
setItem=
{
this
.
setItem
}
showText=
{
this
.
showText
}
/>;
});
let
swiperOptions
=
{
width
:
1396
,
spaceBetween
:
30
,
freeMode
:
true
,
...
...
@@ -136,42 +137,39 @@ export default class TroubleContainer extends React.Component{
let
swiperContainer
=
CONFIG
.
swiperContainers
.
troubleSwiperContainer
;
let
swiperCount
=
details
.
length
;
return
(
<
div
>
<
div
className=
{
"troubleContainers "
+
(
this
.
state
.
showTextArea
?
'backfff'
:
''
)
}
>
{
this
.
state
.
showTextArea
?
<
TextArea
text=
{
this
.
state
.
tmpText
}
goBack=
{
this
.
goBack
}
saveText=
{
this
.
saveText
}
></
TextArea
>
:
<
div
className=
{
"toubleContainer
s
"
+
(
showTrouble
?
''
:
'hide'
)
}
>
<
div
className=
{
"toubleContainer "
+
(
showTrouble
?
''
:
'hide'
)
}
>
<
HeaderComponent
showHeader=
{
CONFIG
.
headerStatus
[
1
]
}
userinfo=
{
userInfo
}
storeInfo=
{
storeInfo
}
/>
<
div
className=
{
"troubleContainer "
+
(
this
.
state
.
showTrouble
?
''
:
'hide'
)
}
>
<
div
className=
{
"troubleText font32"
}
><
span
className=
{
"colff7860"
}
>
*
</
span
>
必填项
</
div
>
<
div
className=
{
"troubleBox"
}
>
<
SwiperComponent
swiperContainer=
{
swiperContainer
}
swiperOptions=
{
swiperOptions
}
swiperCount=
{
swiperCount
}
>
{
dom
}
</
SwiperComponent
>
</
div
>
<
div
className=
{
"troubleBtnBox"
}
>
<
div
className=
{
"troubleBtn colfff font32"
}
onClick=
{
()
=>
this
.
dealTrouble
.
bind
(
this
)()
}
>
处理完毕
</
div
>
</
div
>
</
div
>
<
div
className=
{
"selectContainer "
+
(
this
.
state
.
showTrouble
?
'hide'
:
''
)
}
>
<
div
className=
{
"selectText font40 col333"
}
style=
{
{
"marginTop"
:
"230px"
}
}
>
出货板传送区、机械手平台、轨道是否有未出货遗留的货品
</
div
>
<
div
className=
{
"selectButtons"
}
>
<
Button
text=
{
"有"
}
option=
{
this
.
haveNext
}
style=
{
{
"marginTop"
:
"128px"
}
}
/>
<
Button
text=
{
"没有"
}
option=
{
this
.
haveNoNext
}
style=
{
{
"marginTop"
:
"49px"
}
}
/>
</
div
>
</
div
>
{
this
.
state
.
showTrouble
?
<
div
className=
{
"troubleContent "
+
(
this
.
state
.
showTrouble
?
''
:
'hide'
)
}
>
<
div
className=
{
"troubleText font32"
}
><
span
className=
{
"colff7860"
}
>
*
</
span
>
必填项
</
div
>
<
div
className=
{
"troubleBox"
}
>
<
SwiperComponent
swiperContainer=
{
swiperContainer
}
swiperOptions=
{
swiperOptions
}
swiperCount=
{
swiperCount
}
>
{
dom
}
</
SwiperComponent
>
</
div
>
<
div
className=
{
"troubleBtnBox"
}
>
<
div
className=
{
"troubleBtn colfff font32"
}
onClick=
{
()
=>
this
.
dealTrouble
.
bind
(
this
)()
}
>
处理完毕
</
div
>
</
div
>
</
div
>
:
<
FinishTrouble
/>
}
</
div
>
}
</
div
>
...
...
This diff is collapsed.
Click to expand it.
client/containers/TroubleContainer/index.css
View file @
d27922d1
.troubleContainer
{
.troubleContainers
{
width
:
100%
;
height
:
100%
;
}
.troubleContainers.backfff
{
background-color
:
#ffffff
;
}
.troubleContent
{
padding-left
:
30px
;
}
.troubleCont
ainer
.troubleText
{
.troubleCont
ent
.troubleText
{
height
:
100px
;
display
:
table-cell
;
vertical-align
:
bottom
;
}
.troubleCont
ainer
.troubleBox
{
.troubleCont
ent
.troubleBox
{
margin
:
20px
0
;
}
.troubleCont
ainer
.troubleBtnBox
{
.troubleCont
ent
.troubleBtnBox
{
height
:
80px
;
width
:
100%
;
text-align
:
right
;
padding-right
:
30px
;
}
.troubleCont
ainer
.troubleBtn
{
.troubleCont
ent
.troubleBtn
{
width
:
413px
;
height
:
100%
;
display
:
inline-block
;
...
...
@@ -24,12 +31,3 @@
background-color
:
#ff7860
;
border-radius
:
10px
;
}
.selectContainer
{
text-align
:
center
;
}
.selectButtons
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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