Commit 647fd86a by yuananting

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

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