Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maple
TOSTUMI
Commits
ae8fef3d
Commit
ae8fef3d
authored
Oct 29, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
住户卡申请列表bug处理完成
parent
de18cd4d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
29 deletions
+60
-29
TitleSearch.tsx
src/components/TitleSearch/TitleSearch.tsx
+14
-1
Card.tsx
src/pages/CommercialService/Card.tsx
+46
-28
No files found.
src/components/TitleSearch/TitleSearch.tsx
View file @
ae8fef3d
...
@@ -97,6 +97,15 @@ const TitleSearch = (props: any) => {
...
@@ -97,6 +97,15 @@ const TitleSearch = (props: any) => {
});
});
};
};
// 小区默认值
const
communityDef
=
()
=>
{
if
(
defaultValue
!=
null
&&
defaultValue
.
communityName
)
{
return
defaultValue
.
communityName
;
}
else
{
return
undefined
;
}
};
return
(
return
(
<>
<>
<
Form
form=
{
form
}
name=
"basic"
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Form
form=
{
form
}
name=
"basic"
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
...
@@ -104,7 +113,11 @@ const TitleSearch = (props: any) => {
...
@@ -104,7 +113,11 @@ const TitleSearch = (props: any) => {
{
communitySelect
!=
null
?
(
{
communitySelect
!=
null
?
(
<
Col
key=
{
'communitySelect_'
}
>
<
Col
key=
{
'communitySelect_'
}
>
<
Form
.
Item
name=
{
'communityName'
}
>
<
Form
.
Item
name=
{
'communityName'
}
>
<
SearchOptionsCommnity
titleSearch=
{
true
}
opname=
{
opname
}
/>
<
SearchOptionsCommnity
defaultName=
{
communityDef
}
titleSearch=
{
true
}
opname=
{
opname
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
)
:
null
}
)
:
null
}
...
...
src/pages/CommercialService/Card.tsx
View file @
ae8fef3d
...
@@ -12,11 +12,17 @@ import TitleSearch from '../../components/TitleSearch/TitleSearch';
...
@@ -12,11 +12,17 @@ import TitleSearch from '../../components/TitleSearch/TitleSearch';
import
{
RA
,
SA
,
urlEncode
,
filterObj
,
filterObjbyTg
}
from
'@/utils/method'
;
import
{
RA
,
SA
,
urlEncode
,
filterObj
,
filterObjbyTg
}
from
'@/utils/method'
;
let
readyData
:
any
=
{
communityName
:
''
,
ownerName
:
''
,
handleStatus
:
''
,
pageNum
:
1
,
};
const
module
=
'CommunityService'
;
const
module
=
'CommunityService'
;
const
Card
=
(
props
:
any
)
=>
{
const
Card
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data7
}
=
props
;
const
{
dispatch
,
Data7
,
location
}
=
props
;
const
[
readyData
,
setReadyData
]
=
useState
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
// const apply_status = [[0, "审核中"], [1, "批准"], [2, "拒绝"], [3, "领取"]]
// const apply_status = [[0, "审核中"], [1, "批准"], [2, "拒绝"], [3, "领取"]]
const
apply_status
=
[
const
apply_status
=
[
...
@@ -51,42 +57,36 @@ const Card = (props: any) => {
...
@@ -51,42 +57,36 @@ const Card = (props: any) => {
],
],
[
[
'Actions'
,
'Actions'
,
null
,
'apply_status'
,
(
text
:
any
,
record
:
any
)
=>
(
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
<
Space
size=
"middle"
>
{
' '
}
<
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Detail
</
a
>
<
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Detail
</
a
>
</
Space
>
</
Space
>
),
),
],
],
]);
]);
useEffect
(()
=>
{
if
(
Data7
!=
null
)
{
setLoading
(
false
);
}
},
[
Data7
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
//前置数据
//前置数据
console
.
log
(
'前置数据'
);
console
.
log
(
'前置数据'
);
let
tmp
:
any
=
filterObjbyTg
(
location
.
query
,
[
readyData
=
{
'handleStatus'
,
pageNum
:
1
,
'ownerName'
,
...
location
.
query
,
'communityName'
,
};
'current'
,
]);
tmp
.
handleStatus
=
apply_status
[
parseInt
(
tmp
.
handleStatus
)];
//特殊处理
setReadyData
(
tmp
);
//获取数据
//获取数据
setLoading
(
true
);
setLoading
(
true
);
RA
(
31
,
{
serviceType
:
'7'
,
id
:
''
},
module
,
dispatch
);
RA
(
},
[]);
31
,
{
...
filterObjbyTg
(
readyData
,
[
'handleStatus'
,
'ownerName'
,
'communityName'
,
'pageNum'
])
},
module
,
dispatch
,
);
},
[
location
]);
// 监听数据返回
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Data7
!=
null
)
{
if
(
Data7
!=
null
)
{
console
.
log
(
'首页信息'
);
setLoading
(
false
);
console
.
log
(
Data7
);
}
}
},
[
Data7
]);
},
[
Data7
]);
...
@@ -95,17 +95,26 @@ const Card = (props: any) => {
...
@@ -95,17 +95,26 @@ const Card = (props: any) => {
history
.
push
(
'./AccessCardApplication/Detail'
);
history
.
push
(
'./AccessCardApplication/Detail'
);
};
};
const
goToAdd
=
(
values
:
any
,
e
:
any
)
=>
{
const
goToAdd
=
()
=>
{
history
.
push
(
'./AccessCardApplication/Add'
);
history
.
push
(
'./AccessCardApplication/Add'
);
};
};
//页面搜索
//页面搜索
const
ClickTitleSearch
=
(
comment
:
any
)
=>
{
const
ClickTitleSearch
=
(
comment
:
any
)
=>
{
let
tmp
=
filterObjbyTg
(
comment
,
[
'handleStatus'
,
'ownerName'
,
'communityName'
]);
let
tmp
=
filterObjbyTg
(
comment
,
[
'handleStatus'
,
'ownerName'
,
'communityName'
]);
tmp
[
'current'
]
=
1
;
tmp
[
'pageNum'
]
=
1
;
console
.
log
(
tmp
);
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
));
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
));
};
};
// 切换页码
const
changePage
=
(
values
:
any
)
=>
{
let
tmp
=
{
...
location
.
query
,
pageNum
:
values
.
current
,
};
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
));
};
return
(
return
(
<
div
style=
{
{
width
:
'100%'
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
'#ffffff'
}
}
>
<
div
style=
{
{
width
:
'100%'
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
'#ffffff'
}
}
>
{
Data7
!=
null
?
(
{
Data7
!=
null
?
(
...
@@ -115,8 +124,12 @@ const Card = (props: any) => {
...
@@ -115,8 +124,12 @@ const Card = (props: any) => {
listkey=
{
[
'ownerName'
]
}
listkey=
{
[
'ownerName'
]
}
list=
{
[
'Owner Name'
]
}
list=
{
[
'Owner Name'
]
}
status=
{
[{
name
:
[
'handleStatus'
,
'Status'
],
data
:
apply_status
}]
}
status=
{
[{
name
:
[
'handleStatus'
,
'Status'
],
data
:
apply_status
}]
}
defaultValue=
{
readyData
}
onSubmit=
{
ClickTitleSearch
}
onSubmit=
{
ClickTitleSearch
}
defaultValue=
{
{
ownerName
:
readyData
.
ownerName
,
handleStatus
:
apply_status
[
parseInt
(
readyData
.
handleStatus
)],
communityName
:
readyData
.
communityName
,
}
}
/>
/>
<
div
style=
{
{
height
:
80
,
position
:
'relative'
}
}
>
<
div
style=
{
{
height
:
80
,
position
:
'relative'
}
}
>
...
@@ -131,9 +144,14 @@ const Card = (props: any) => {
...
@@ -131,9 +144,14 @@ const Card = (props: any) => {
loading=
{
loading
}
loading=
{
loading
}
rowKey=
"id"
rowKey=
"id"
style=
{
{
marginTop
:
16
}
}
style=
{
{
marginTop
:
16
}
}
dataSource=
{
Data7
.
data
.
rows
}
dataSource=
{
Data7
.
data
.
list
}
columns=
{
columns
}
columns=
{
columns
}
pagination=
{
{
defaultCurrent
:
1
,
total
:
Data7
.
total
}
}
pagination=
{
{
defaultPageSize
:
15
,
total
:
Data7
.
data
.
page
.
totalRow
,
showSizeChanger
:
false
,
}
}
onChange=
{
changePage
}
/>
/>
</>
</>
)
:
null
}
)
:
null
}
...
...
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