Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mp_estate_client
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mp_estate_backstage
mp_estate_client
Commits
336176d0
Commit
336176d0
authored
Sep 08, 2020
by
成旭东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
7ad07a39
Pipeline
#28012
passed with stage
in 2 minutes 42 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
1 deletion
+49
-1
index.tsx
src/pages/mpEstate/videoList/index.tsx
+49
-1
No files found.
src/pages/mpEstate/videoList/index.tsx
View file @
336176d0
...
@@ -15,6 +15,8 @@ const { Option } = Select;
...
@@ -15,6 +15,8 @@ const { Option } = Select;
const
DrawerForm
=
(
props
:
any
)
=>
{
const
DrawerForm
=
(
props
:
any
)
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
[
selectProjectID
,
setSelectProjectID
]
=
useState
(
''
);
const
{
const
{
estateData
,
estateData
,
getProjectList
,
getProjectList
,
...
@@ -84,6 +86,10 @@ const DrawerForm = (props: any) => {
...
@@ -84,6 +86,10 @@ const DrawerForm = (props: any) => {
}
}
}
}
const
changeProject
=
(
val
:
any
)
=>
{
setSelectProjectID
(
val
);
}
return
(
return
(
<>
<>
<
Form
<
Form
...
@@ -105,6 +111,7 @@ const DrawerForm = (props: any) => {
...
@@ -105,6 +111,7 @@ const DrawerForm = (props: any) => {
<
Select
<
Select
showSearch
showSearch
onSearch=
{
searchProject
}
onSearch=
{
searchProject
}
onChange=
{
changeProject
}
>
>
{
estateData
.
list
.
map
((
item
:
any
,
index
:
any
)
=>
(
{
estateData
.
list
.
map
((
item
:
any
,
index
:
any
)
=>
(
<
Option
key=
{
index
}
value=
{
item
.
id
}
>
<
Option
key=
{
index
}
value=
{
item
.
id
}
>
...
@@ -113,6 +120,10 @@ const DrawerForm = (props: any) => {
...
@@ -113,6 +120,10 @@ const DrawerForm = (props: any) => {
))
}
))
}
</
Select
>
</
Select
>
</
FormItem
>
</
FormItem
>
<
div
style=
{
{
marginBottom
:
'24px'
,
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
span
style=
{
{
width
:
'34%'
,
fontSize
:
'14px'
,
color
:
'rgba(0, 0, 0, 0.85)'
,
lineHeight
:
'32px'
}
}
>
楼盘ID:
</
span
>
<
Input
disabled
value=
{
selectProjectID
||
(
editeObj
&&
editeObj
.
project
&&
editeObj
.
project
.
id
)
||
''
}
/>
</
div
>
<
FormItem
<
FormItem
name=
"title"
name=
"title"
label=
"视频标题"
label=
"视频标题"
...
@@ -176,6 +187,21 @@ const DrawerForm = (props: any) => {
...
@@ -176,6 +187,21 @@ const DrawerForm = (props: any) => {
<
Switch
/>
<
Switch
/>
</
FormItem
>
</
FormItem
>
<
FormItem
<
FormItem
name=
"status"
label=
"在线状态"
rules=
{
[
{
required
:
true
,
message
:
'选择上下线状态'
,
},
]
}
>
<
Select
>
<
Option
value=
"online"
>
上线
</
Option
>
<
Option
value=
"offline"
>
下线
</
Option
>
</
Select
>
</
FormItem
>
<
FormItem
name=
"cover_image"
name=
"cover_image"
label=
"视频背景图"
label=
"视频背景图"
rules=
{
[
rules=
{
[
...
@@ -370,6 +396,11 @@ const VideoList: React.FC<any> = (props) => {
...
@@ -370,6 +396,11 @@ const VideoList: React.FC<any> = (props) => {
updateData
(
id
,
params
);
updateData
(
id
,
params
);
}
}
// 切换在线状态
const
changeStatus
=
(
params
:
any
,
id
:
number
)
=>
{
updateData
(
id
,
params
);
}
// 编辑视频
// 编辑视频
const
editeVideo
=
(
obj
:
any
)
=>
{
const
editeVideo
=
(
obj
:
any
)
=>
{
const
currentEstateData
=
estateData
.
list
.
map
((
item
:
any
)
=>
item
.
id
);
const
currentEstateData
=
estateData
.
list
.
map
((
item
:
any
)
=>
item
.
id
);
...
@@ -513,6 +544,23 @@ const VideoList: React.FC<any> = (props) => {
...
@@ -513,6 +544,23 @@ const VideoList: React.FC<any> = (props) => {
},
record
.
id
)
}
}
/>
},
record
.
id
)
}
}
/>
)
)
},
{
},
{
title
:
'在线状态'
,
dataIndex
:
'status'
,
key
:
'status'
,
width
:
100
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
const
statusMap
=
{
online
:
true
,
offline
:
false
,
}
return
(
<
Switch
checked=
{
statusMap
[
text
]
}
onChange=
{
(
val
)
=>
{
changeStatus
({
status
:
val
?
'online'
:
'offline'
,
},
record
.
id
)
}
}
/>
)
}
},
{
title
:
'操作'
,
title
:
'操作'
,
dataIndex
:
'operate'
,
dataIndex
:
'operate'
,
key
:
'operate'
,
key
:
'operate'
,
...
@@ -549,7 +597,7 @@ const VideoList: React.FC<any> = (props) => {
...
@@ -549,7 +597,7 @@ const VideoList: React.FC<any> = (props) => {
columns=
{
projectColumns
}
columns=
{
projectColumns
}
onChange=
{
handleStandardTableChange
}
onChange=
{
handleStandardTableChange
}
pagination=
{
videoData
.
pagination
}
pagination=
{
videoData
.
pagination
}
scroll=
{
{
x
:
9
10
}
}
scroll=
{
{
x
:
10
10
}
}
/>
/>
</
Card
>
</
Card
>
...
...
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