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
5148932b
Commit
5148932b
authored
Jul 23, 2018
by
Zhang Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片æ点击放大,删除提示
parent
119ada55
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
11 deletions
+54
-11
client/components/CommonComponent/ImgToolComponent/index.css
+13
-0
client/components/TroubleComponent/TroubleItemComponent/TroubleItemComponent.jsx
+34
-5
client/containers/PageContainer/PageContainer.jsx
+3
-5
client/containers/TroubleContainer/TroubleContainer.jsx
+4
-1
No files found.
client/components/CommonComponent/ImgToolComponent/index.css
View file @
5148932b
...
@@ -34,3 +34,15 @@
...
@@ -34,3 +34,15 @@
top
:
-16px
;
top
:
-16px
;
right
:
-16px
right
:
-16px
}
}
.showBigImg
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
height
:
732px
;
width
:
976px
;
text-align
:
center
;
}
.showBigImg
>
img
{
height
:
100%
;
}
\ No newline at end of file
client/components/TroubleComponent/TroubleItemComponent/TroubleItemComponent.jsx
View file @
5148932b
import
React
from
'react'
;
import
React
from
'react'
;
import
ImageComponent
from
'../../CommonComponent/ImgToolComponent/CommonSmalContainer'
;
import
ImageComponent
from
'../../CommonComponent/ImgToolComponent/CommonSmalContainer'
;
import
Button
from
'../../CommonComponent/ButtonComponent/ButtonComponent'
require
(
'./index.css'
)
require
(
'./index.css'
)
export
default
class
TroubleItemComponent
extends
React
.
Component
{
export
default
class
TroubleItemComponent
extends
React
.
Component
{
constructor
(
props
){
constructor
(
props
){
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
text
:
''
text
:
''
,
imgStyle
:{
'height'
:
'100%'
,
}
}
}
this
.
reRreshImg
=
this
.
reRreshImg
.
bind
(
this
)
this
.
reRreshImg
=
this
.
reRreshImg
.
bind
(
this
)
this
.
deleteImgById
=
this
.
deleteImgById
.
bind
(
this
)
this
.
deleteImgById
=
this
.
deleteImgById
.
bind
(
this
)
this
.
confirmDeleteImg
=
this
.
confirmDeleteImg
.
bind
(
this
)
this
.
addImg
=
this
.
addImg
.
bind
(
this
)
this
.
addImg
=
this
.
addImg
.
bind
(
this
)
this
.
showImg
=
this
.
showImg
.
bind
(
this
)
}
}
getDes
(
item
){
getDes
(
item
){
...
@@ -38,16 +44,38 @@ export default class TroubleItemComponent extends React.Component{
...
@@ -38,16 +44,38 @@ export default class TroubleItemComponent extends React.Component{
}
}
deleteImgById
(
fileId
){
deleteImgById
(
fileId
){
console
.
log
(
"deleteImgById :"
,
fileId
)
console
.
log
(
"deleteImgById :"
,
fileId
);
let
{
hidePopup
}
=
this
.
props
;
let
props
=
this
.
props
;
let
props
=
this
.
props
;
let
{
deleteImg
}
=
props
;
let
{
deleteImg
}
=
props
;
let
item
=
props
.
item
;
let
item
=
props
.
item
;
let
errorId
=
item
.
id
;
let
errorId
=
item
.
id
;
let
type
=
item
.
type
;
let
type
=
item
.
type
;
console
.
log
(
errorId
,
type
,
fileId
)
console
.
log
(
errorId
,
type
,
fileId
);
hidePopup
()
deleteImg
(
errorId
,
type
,
fileId
)
deleteImg
(
errorId
,
type
,
fileId
)
}
}
confirmDeleteImg
(
fileId
){
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
btnDom1
=
<
Button
key=
{
"confirmDeleteTroubleImg1"
}
style=
{
{
'width'
:
'260px'
}
}
text=
{
"取消"
}
option=
{
hidePopup
}
/>
let
btnDom2
=
<
Button
key=
{
"confirmDeleteTroubleImg2"
}
style=
{
{
'width'
:
'260px'
,
'marginLeft'
:
' 30px'
}
}
text=
{
"确定"
}
option=
{
()
=>
this
.
deleteImgById
(
fileId
)
}
/>
showPopup
({
popupText
:
'确定删除此照片吗'
,
popupButtons
:[
btnDom1
,
btnDom2
]
})
}
showImg
(
imgSrc
){
let
{
showPopup
,
hidePopup
}
=
this
.
props
;
let
showImgDom
=
<
div
onClick=
{
()
=>
hidePopup
()
}
className=
{
"showBigImg"
}
>
<
img
src=
{
imgSrc
}
alt=
""
/>
</
div
>;
showPopup
({
popupChild
:
showImgDom
});
}
render
(){
render
(){
let
props
=
this
.
props
;
let
props
=
this
.
props
;
...
@@ -56,10 +84,11 @@ export default class TroubleItemComponent extends React.Component{
...
@@ -56,10 +84,11 @@ export default class TroubleItemComponent extends React.Component{
let
imgFiles
=
Array
.
isArray
(
item
.
files
)
?
item
.
files
.
map
((
f
,
k
)
=>
{
let
imgFiles
=
Array
.
isArray
(
item
.
files
)
?
item
.
files
.
map
((
f
,
k
)
=>
{
return
<
ImageComponent
key=
{
"troubleItemImg"
+
k
}
return
<
ImageComponent
key=
{
"troubleItemImg"
+
k
}
noCloseBtn=
{
false
}
noCloseBtn=
{
false
}
handleClikCloseFunc
=
{()=
>
this.
deleteImgById
(f.id)}
handleClikCloseFunc
=
{()=
>
this.
confirmDeleteImg
(f.id)}
handleClikImgFunc =
{
()
=>
{}
}
handleClikImgFunc =
{
()
=>
{
this
.
showImg
(
f
.
filePath
)
}
}
type=
{
"custom"
}
type=
{
"custom"
}
imgSrc =
{
f
.
filePath
}
/
>
imgSrc =
{
f
.
filePath
}
/
>
}) : null;
}) : null;
return (
return (
...
...
client/containers/PageContainer/PageContainer.jsx
View file @
5148932b
...
@@ -44,7 +44,7 @@ class PageContainer extends React.Component {
...
@@ -44,7 +44,7 @@ class PageContainer extends React.Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
showPage
:
showPage
[
3
]
,
showPage
:
initPage
,
lastPage
:
''
,
lastPage
:
''
,
page
:
null
,
page
:
null
,
popupInfo
:
defaultPopupInfo
,
popupInfo
:
defaultPopupInfo
,
...
@@ -144,6 +144,8 @@ class PageContainer extends React.Component {
...
@@ -144,6 +144,8 @@ class PageContainer extends React.Component {
console
.
log
(
"closedoor"
);
console
.
log
(
"closedoor"
);
dispatch
(
logoutUser
());
dispatch
(
logoutUser
());
this
.
endCountBack
();
this
.
endCountBack
();
// remove(CONFIG.socketType.GETSTOREINFO,this)
// remove(CONFIG.socketType.GETSOCKETMSG,this)
this
.
setState
({
this
.
setState
({
showPage
:
showPage
[
7
],
showPage
:
showPage
[
7
],
showClock
:
false
,
showClock
:
false
,
...
@@ -168,13 +170,9 @@ class PageContainer extends React.Component {
...
@@ -168,13 +170,9 @@ class PageContainer extends React.Component {
(
!
nowUserInfo
||
!
nowUserInfo
.
employee
||
(
nowUserInfo
.
employee
.
id
!==
userinfo
.
employee
.
id
));
(
!
nowUserInfo
||
!
nowUserInfo
.
employee
||
(
nowUserInfo
.
employee
.
id
!==
userinfo
.
employee
.
id
));
let
isNotOneTask
=
userinfo
.
types
&&
userinfo
.
types
!==
nowUserInfo
.
types
;
let
isNotOneTask
=
userinfo
.
types
&&
userinfo
.
types
!==
nowUserInfo
.
types
;
console
.
log
(
isNotOneTask
);
console
.
log
(
isNotOneUser
)
if
(
isNotOneUser
&&
isNotOneTask
){
if
(
isNotOneUser
&&
isNotOneTask
){
this
.
dealPageByType
(
userinfo
.
types
);
this
.
dealPageByType
(
userinfo
.
types
);
}
}
console
.
log
(
state
.
errMsg
);
if
(
state
.
errMsg
.
errMsg
){
if
(
state
.
errMsg
.
errMsg
){
this
.
showError
(
state
.
errMsg
.
errMsg
)
this
.
showError
(
state
.
errMsg
.
errMsg
)
}
}
...
...
client/containers/TroubleContainer/TroubleContainer.jsx
View file @
5148932b
...
@@ -168,7 +168,7 @@ export default class TroubleContainer extends React.Component{
...
@@ -168,7 +168,7 @@ export default class TroubleContainer extends React.Component{
}
}
getDefaultDom
(){
getDefaultDom
(){
let
{
userInfo
,
storeInfo
,
getRefreshImg
,
deleteImg
,
changePages
}
=
this
.
props
;
let
{
userInfo
,
storeInfo
,
getRefreshImg
,
deleteImg
,
changePages
,
showPopup
,
hidePopup
}
=
this
.
props
;
let
troubleList
=
this
.
state
.
troubleList
;
let
troubleList
=
this
.
state
.
troubleList
;
let
showTrouble
=
Array
.
isArray
(
troubleList
.
details
)
&&
troubleList
.
details
.
length
>
0
;
let
showTrouble
=
Array
.
isArray
(
troubleList
.
details
)
&&
troubleList
.
details
.
length
>
0
;
let
details
=
Array
.
isArray
(
troubleList
.
details
)
?
troubleList
.
details
:
[];
let
details
=
Array
.
isArray
(
troubleList
.
details
)
?
troubleList
.
details
:
[];
...
@@ -177,6 +177,9 @@ export default class TroubleContainer extends React.Component{
...
@@ -177,6 +177,9 @@ export default class TroubleContainer extends React.Component{
showText=
{
this
.
showText
}
showQrcode=
{
this
.
showQrcode
}
showText=
{
this
.
showText
}
showQrcode=
{
this
.
showQrcode
}
getRefreshImg=
{
getRefreshImg
}
getRefreshImg=
{
getRefreshImg
}
deleteImg=
{
deleteImg
}
deleteImg=
{
deleteImg
}
showPopup=
{
showPopup
}
hidePopup=
{
hidePopup
}
/>;
/>;
});
});
let
swiperOptions
=
{
let
swiperOptions
=
{
...
...
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