Commit 82562bd2 by zangsuyun

fix:添加知识弹窗优化

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