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
7571411d
Commit
7571411d
authored
Jul 13, 2018
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs
parent
1fb80874
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
13 deletions
+60
-13
client/actions/index.js
+3
-0
client/containers/PageContainer/PageContainer.jsx
+27
-3
client/containers/TroubleContainer/TroubleContainer.jsx
+6
-3
client/containers/TroubleContainer/index.css
+15
-1
client/css/color.css
+4
-0
client/index.js
+0
-1
webpack.config.js
+5
-5
No files found.
client/actions/index.js
View file @
7571411d
import
actiontypes
from
'../actiontype/index'
;
import
mock
from
'../mock/index'
let
domain
=
ENV
.
domain
;
const
initStart
=
()
=>
{
return
{
type
:
actiontypes
.
INITSTART
,
...
...
client/containers/PageContainer/PageContainer.jsx
View file @
7571411d
'use strict'
;
import
React
from
'react'
import
{
connect
}
from
'react-redux'
;
import
HeaderComponent
from
'../../components/CommonComponent/HeaderComponent/HeaderComponent'
import
TroubleContainer
from
'../TroubleContainer/TroubleContainer'
import
ScanBarCodeContainer
from
'../ScanBarCodeContainer/ScanBarCodeContaienr'
const
showPage
=
{
1
:
'Trouble'
,
2
:
'Scan'
}
class
PageContainer
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
// UTILPATH.socket.getIp();
this
.
state
=
{
showPage
:
showPage
[
2
],
page
:
null
};
this
.
getPages
=
this
.
getPages
.
bind
(
this
);
}
componentWillMount
()
{
let
pages
=
this
.
getPages
();
this
.
setState
({
page
:
pages
})
}
componentDidMount
(){
}
...
...
@@ -23,12 +35,24 @@ class PageContainer extends React.Component {
componentWillUnmount
(){
}
getPages
(){
let
pages
=
null
;
switch
(
this
.
state
.
showPage
){
case
showPage
[
1
]:
pages
=
<
TroubleContainer
/>;
break
;
case
showPage
[
2
]:
pages
=
<
ScanBarCodeContainer
/>;
break
;
}
return
pages
;
}
render
()
{
console
.
log
(
this
.
state
);
return
(
<
div
>
<
HeaderComponent
/>
<
TroubleContainer
/>
{
this
.
state
.
page
}
</
div
>
)
}
...
...
client/containers/TroubleContainer/TroubleContainer.jsx
View file @
7571411d
...
...
@@ -9,9 +9,12 @@ export default class TroubleContainer extends React.Component{
return
<
div
className=
{
"troubleContainer"
}
>
<
div
className=
{
"troubleText font32"
}
><
span
className=
{
"colff7860"
}
>
*
</
span
>
必填项
</
div
>
<
div
className=
{
"troubleBox"
}
>
<
div
className=
{
"troubleItem"
}
>
<
div
className=
{
"itemText"
}
>
故障问题1:故障ID-00001
</
div
>
<
div
className=
{
"itemWrongInfo"
}
>
2:3 左侧动作故障,取货动作出错
</
div
>
<
div
className=
{
"troubleItemComponent"
}
>
<
div
className=
{
"itemText font32"
}
>
故障问题1:故障ID-00001
</
div
>
<
div
className=
{
"itemWrongInfo font24 col999"
}
>
<
p
>
2:3 左侧动作故障,取货动作出错2:3 左侧动作故障,取货动作出错2:3 左侧动作故障,取货动作出错2:3 左侧动作故障,取货动作出错
</
p
>
</
div
>
<
div
className=
{
"jugdeQuestion"
}
>
<
span
>
*
</
span
>
是否有此问题
<
span
>
是
</
span
>
...
...
client/containers/TroubleContainer/index.css
View file @
7571411d
...
...
@@ -10,11 +10,24 @@
.troubleBox
{
margin-top
:
20px
;
}
.troubleItem
{
.troubleItem
Component
{
width
:
1396px
;
height
:
608px
;
border
:
1px
solid
#e5e5e5
;
background-color
:
#ffffff
;
border-radius
:
20px
;
overflow
:
hidden
;
padding
:
42px
45px
0
45px
;
}
.troubleItemComponent
.itemText
{
font-weight
:
bold
;
}
.troubleItemComponent
.itemWrongInfo
{
height
:
86px
;
position
:
relative
;
}
.troubleItemComponent
.itemWrongInfo
>
p
{
line-height
:
32px
;
top
:
50%
;
transform
:
translateY
(
-50%
);
}
\ No newline at end of file
client/css/color.css
View file @
7571411d
...
...
@@ -17,4 +17,7 @@
}
.col333
{
color
:
#333333
!important
;
}
.col999
{
color
:
#999999
!important
;
}
\ No newline at end of file
client/index.js
View file @
7571411d
...
...
@@ -18,7 +18,6 @@ function activateVendor() {
)
)
}
function
renderPage
(
store
)
{
ReactDom
.
render
(
<
Provider
store
=
{
store
}
>
...
...
webpack.config.js
View file @
7571411d
...
...
@@ -82,12 +82,12 @@ let envConfig = {
}),
//分割共有模块和代码模块
new
webpack
.
optimize
.
AggressiveMergingPlugin
(),
new
webpack
.
DefinePlugin
({
'process.env'
:
{
NODE_ENV
:
JSON
.
stringify
(
process
.
env
.
NODE_ENV
||
'
development
'
)
}
'process.env'
:
{
NODE_ENV
:
JSON
.
stringify
(
process
.
env
.
NODE_ENV
||
'
production
'
)
}
}),
new
webpack
.
ProvidePlugin
({
ENV
:
__dirname
+
'/client/env/
'
+
(
process
.
env
.
NODE_ENV
||
'development'
)
,
ENV
:
__dirname
+
'/client/env/
production'
,
UTILPATH
:
__dirname
+
'/client/util/util'
,
CONFIG
:
__dirname
+
'/client/config/index'
CONFIG
:
__dirname
+
'/client/config/index'
,
}),
new
webpack
.
NoEmitOnErrorsPlugin
(),
//配置了NoErrorsPlugin插件,用来跳过编译时出错的代码并记录,使编译后运行时的包不会发生错误
]
...
...
@@ -108,9 +108,9 @@ let envConfig = {
'process.env'
:
{
NODE_ENV
:
JSON
.
stringify
(
process
.
env
.
NODE_ENV
||
'development'
)
}
}),
new
webpack
.
ProvidePlugin
({
ENV
:
__dirname
+
'/client/env/
'
+
(
process
.
env
.
NODE_ENV
||
'development'
)
,
ENV
:
__dirname
+
'/client/env/
development'
,
UTILPATH
:
__dirname
+
'/client/util/util'
,
CONFIG
:
__dirname
+
'/client/config/index'
CONFIG
:
__dirname
+
'/client/config/index'
,
}),
new
webpack
.
LoaderOptionsPlugin
({
options
:
{
...
...
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