Commit 647fd86a by yuananting

fix:预览多媒体+分类选中展开+教师权限bug修复

parent e2c2d3c7
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-02-21 17:51:01 * @Date: 2021-02-21 17:51:01
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-03-15 14:46:12 * @LastEditTime: 2021-03-22 14:28:00
* @Description: 助学工具-题库-题库主页面 * @Description: 助学工具-题库-题库主页面
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -30,8 +30,9 @@ class QuestionBankIndex extends Component { ...@@ -30,8 +30,9 @@ class QuestionBankIndex extends Component {
} }
}; };
updatedSiderTreeFromList = (currentTotal) => { updatedSiderTreeFromList = (currentTotal, updatedCategoryId) => {
this.setState({currentTotal}); this.setState({currentTotal});
this.setState({updatedCategoryId});
}; };
render() { render() {
...@@ -43,6 +44,7 @@ class QuestionBankIndex extends Component { ...@@ -43,6 +44,7 @@ class QuestionBankIndex extends Component {
<QuestionBankSider <QuestionBankSider
getSelectedCategoryId={this.getCategoryIdFromSider.bind(this)} getSelectedCategoryId={this.getCategoryIdFromSider.bind(this)}
currentTotal={this.state.currentTotal} currentTotal={this.state.currentTotal}
updatedCategoryId={this.state.updatedCategoryId}
/> />
</div> </div>
<div className="content"> <div className="content">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-02-22 10:59:43 * @Date: 2021-02-22 10:59:43
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-03-22 09:47:50 * @LastEditTime: 2021-03-22 14:28:13
* @Description: 助学工具-题库-题库主页面侧边栏 * @Description: 助学工具-题库-题库主页面侧边栏
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -40,8 +40,8 @@ class QuestionBankSider extends Component { ...@@ -40,8 +40,8 @@ class QuestionBankSider extends Component {
} }
shouldComponentUpdate(nextProps, nextState) { shouldComponentUpdate(nextProps, nextState) {
const { currentTotal } = nextProps; const { currentTotal, updatedCategoryId } = nextProps;
if (this.props.currentTotal !== currentTotal) { if (this.props.currentTotal !== currentTotal && this.props.updatedCategoryId === updatedCategoryId) {
this.queryCategoryTree(); this.queryCategoryTree();
} }
return true; return true;
...@@ -185,7 +185,7 @@ class QuestionBankSider extends Component { ...@@ -185,7 +185,7 @@ class QuestionBankSider extends Component {
this.queryCategoryTree(value); this.queryCategoryTree(value);
}} }}
/> />
<div className="sider-btn"> {User.getUserRole() !== "CloudLecturer" && <div className="sider-btn">
<Button <Button
onClick={() => { onClick={() => {
window.RCHistory.push({ window.RCHistory.push({
...@@ -195,7 +195,7 @@ class QuestionBankSider extends Component { ...@@ -195,7 +195,7 @@ class QuestionBankSider extends Component {
> >
分类管理 分类管理
</Button> </Button>
</div> </div>}
<div className="sider-tree"> <div className="sider-tree">
<DirectoryTree <DirectoryTree
expandedKeys={expandedKeys} expandedKeys={expandedKeys}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yuananting * @Author: yuananting
* @Date: 2021-02-25 11:23:47 * @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting * @LastEditors: yuananting
* @LastEditTime: 2021-03-22 09:44:27 * @LastEditTime: 2021-03-22 14:28:40
* @Description: 助学工具-题库-题目管理主页面列表数据 * @Description: 助学工具-题库-题目管理主页面列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -105,7 +105,7 @@ class QuestionManageContent extends Component { ...@@ -105,7 +105,7 @@ class QuestionManageContent extends Component {
QuestionBankService.queryQuestionPageList(_query).then((res) => { QuestionBankService.queryQuestionPageList(_query).then((res) => {
const { records = [], total = 0 } = res.result; const { records = [], total = 0 } = res.result;
this.setState({ dataSource: records }); this.setState({ dataSource: records });
this.setState({ total }, () => this.props.updatedSiderTree(total)); this.setState({ total }, () => this.props.updatedSiderTree(total, this.props.selectedCategoryId));
}); });
}; };
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
.input-box { .input-box {
margin-bottom: 8px; margin-bottom: 8px;
* { * {
display: inline-block; display: inline-block;
} }
} }
.picture-box { .picture-box {
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
vertical-align: top; vertical-align: top;
} }
} }
.picture-box { .picture-box {
display: inline-flex; display: inline-flex;
margin: 12px 12px 0 0; margin: 12px 12px 0 0;
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
.gap-content { .gap-content {
display: inline-block; display: inline-block;
span { span {
background: #F7F8F9; background: #f7f8f9;
border-radius: 2px; border-radius: 2px;
padding: 2px 12px; padding: 2px 12px;
margin-right: 8px; margin-right: 8px;
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
.desc-input-box { .desc-input-box {
margin-bottom: 8px; margin-bottom: 8px;
* { * {
display: inline-block; display: inline-block;
} }
} }
.desc-picture-box { .desc-picture-box {
...@@ -189,13 +189,17 @@ ...@@ -189,13 +189,17 @@
position: relative; position: relative;
display: inline-block; display: inline-block;
width: 208px; width: 208px;
overflow: hidden; height: calc(208px * 9 / 16);
padding-top: 12px; position: relative;
background-color: #000;
margin: 0px 12px 12px 0; margin: 0px 12px 12px 0;
&_content { &_content {
max-width: 200px; max-width: 100%;
max-height: 200px; max-height: 100%;
border-radius: 4px; position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} }
&_btn { &_btn {
width: 32px; width: 32px;
...@@ -203,16 +207,24 @@ ...@@ -203,16 +207,24 @@
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
margin-top: -8px; margin-top: -16px;
margin-left: -16px; margin-left: -16px;
} }
.icon_arrow {
position: absolute;
top: -12px;
right: -8px;
color: #bfbfbf;
cursor: pointer;
font-size: 16px;
}
} }
} }
} }
} }
} }
.question-preview-modal.ant-modal { .question-preview-modal.ant-modal {
max-height: 60% !important; max-height: 60% !important;
} }
.add-fill-line { .add-fill-line {
padding: 0 10px; padding: 0 10px;
......
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