Commit 82562bd2 by zangsuyun

fix:添加知识弹窗优化

parent e0b2d8d7
......@@ -3,7 +3,7 @@
* @Author: zangsuyun
* @Date: 2021-03-13 09:54:26
* @LastEditors: zangsuyun
* @LastEditTime: 2021-03-30 19:24:05
* @LastEditTime: 2021-04-07 11:56:10
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -67,7 +67,7 @@ class AddCourse extends React.Component {
excludeUsed: true,
courseType: "LIVE",
storeId: User.getStoreId(),
toRefKnowledgeCategoryId:this.props.categoryId
toRefKnowledgeCategoryId: this.props.categoryId,
},
liveTotalCount: 0,
selectLive: [], //弹窗内已选择的直播课程
......@@ -79,7 +79,7 @@ class AddCourse extends React.Component {
courseType: "VOICE",
excludeUsed: true,
storeId: User.getStoreId(),
toRefKnowledgeCategoryId:this.props.categoryId
toRefKnowledgeCategoryId: this.props.categoryId,
},
videoTotalCount: 0,
selectVideo: [], //弹窗内已选择的视频课程
......@@ -91,7 +91,7 @@ class AddCourse extends React.Component {
excludeUsed: true,
courseType: "PICTURE",
storeId: User.getStoreId(),
toRefKnowledgeCategoryId:this.props.categoryId
toRefKnowledgeCategoryId: this.props.categoryId,
},
pictureTotalCount: 0,
selectPicture: [], //弹窗内已选择的图文课程
......@@ -126,7 +126,7 @@ class AddCourse extends React.Component {
<span className="icon iconfont" style={{ color: "#FBD140" }}>
&#xe7f1;&nbsp;
</span>
{ item.categoryName}
{item.categoryName}
</span>
);
item.key = item.id;
......@@ -395,6 +395,7 @@ class AddCourse extends React.Component {
{
title: "课程时长",
key: "videoDuration",
width: 80,
dataIndex: "videoDuration",
render: (text, item) => {
return <span>{text ? dealTimeDuration(text) : "-"}</span>;
......@@ -614,6 +615,18 @@ class AddCourse extends React.Component {
});
};
renderFooter = () => {
const {selectVideo,selectPicture,selectLive} =this.state
return (
<div>
<Button onClick={this.props.onClose}>取消</Button>
<Button disabled={!(selectLive.length || selectVideo.length || selectPicture.length)} type="primary" onClick={this.handAddCourse}>
确定
</Button>
</div>
);
};
render() {
const {
liveDataSource,
......@@ -703,8 +716,8 @@ class AddCourse extends React.Component {
visible={true}
width={720}
title="新增课程"
footer={this.renderFooter()}
onCancel={this.props.onClose}
onOk={this.handAddCourse}
className="add-course-modal"
>
<Tabs defaultActiveKey="VIDEO" onChange={this.callback} centered>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment