|
@@ -245,6 +245,7 @@ export default class extends Page {
|
|
|
isSentence: node.isSentence,
|
|
|
isCourse: node.isCourse,
|
|
|
isData: node.isData,
|
|
|
+ isExamination: node.isExamination,
|
|
|
};
|
|
|
} else {
|
|
|
itemList = this.examinationItemList;
|
|
@@ -293,6 +294,7 @@ export default class extends Page {
|
|
|
isSentence: node.isSentence,
|
|
|
isCourse: node.isCourse,
|
|
|
isData: node.isData,
|
|
|
+ isExamination: node.isExamination,
|
|
|
parentName: this.state.exerciseMap[node.parentId].title,
|
|
|
};
|
|
|
} else {
|
|
@@ -380,9 +382,9 @@ export default class extends Page {
|
|
|
asyncDelConfirm('删除确认', '是否删除选中节点?', () => {
|
|
|
let handler;
|
|
|
if (tab === 'exercise') {
|
|
|
- handler = Promise.all(checkedKeys.map(row => Examination.delStruct({ id: row })));
|
|
|
+ handler = Promise.all(checkedKeys.checked.map(row => Exercise.delStruct({ id: row })));
|
|
|
} else {
|
|
|
- handler = Promise.all(checkedKeys.map(row => Examination.delStruct({ id: row })));
|
|
|
+ handler = Promise.all(checkedKeys.checked.map(row => Examination.delStruct({ id: row })));
|
|
|
}
|
|
|
return handler.then(() => {
|
|
|
asyncSMessage('删除成功!');
|
|
@@ -397,13 +399,13 @@ export default class extends Page {
|
|
|
<ActionLayout
|
|
|
itemList={this.exerciseActionList}
|
|
|
selectedKeys={this.state.selectedKeys}
|
|
|
- checkedKeys={this.state.checkedKeys}
|
|
|
+ checkedKeys={this.state.checkedKeys ? this.state.checkedKeys.checked || [] : []}
|
|
|
onAction={key => this.onAction(key)} />
|
|
|
<TreeLayout autoExpandParent defaultExpandAll checkable itemList={this.state.examinationStruct} selectedKeys={this.state.selectedKeys} onSelect={(selectedKeys) => {
|
|
|
this.setState({ selectedKeys });
|
|
|
}} checkedKeys={this.state.checkedKeys} checkStrictly onCheck={(checkedKeys, e) => {
|
|
|
if (e.node.props.level > 2) {
|
|
|
- this.setState({ checkedKeys: { checkedKeys, halfCheckedKeys: e.halfCheckedKeys } });
|
|
|
+ this.setState({ checkedKeys });
|
|
|
}
|
|
|
}} />
|
|
|
</Block>;
|
|
@@ -415,13 +417,13 @@ export default class extends Page {
|
|
|
<ActionLayout
|
|
|
itemList={this.exerciseActionList}
|
|
|
selectedKeys={this.state.selectedKeys}
|
|
|
- checkedKeys={this.state.checkedKeys}
|
|
|
+ checkedKeys={this.state.checkedKeys ? this.state.checkedKeys.checked || [] : []}
|
|
|
onAction={key => this.onAction(key)} />
|
|
|
<TreeLayout autoExpandParent defaultExpandAll checkable itemList={this.state.exerciseStruct} selectedKeys={this.state.selectedKeys} onSelect={(selectedKeys) => {
|
|
|
this.setState({ selectedKeys });
|
|
|
}} checkedKeys={this.state.checkedKeys} checkStrictly onCheck={(checkedKeys, e) => {
|
|
|
if (e.node.props.level > 2) {
|
|
|
- this.setState({ checkedKeys: { checkedKeys, halfCheckedKeys: e.halfCheckedKeys } });
|
|
|
+ this.setState({ checkedKeys });
|
|
|
}
|
|
|
}} />
|
|
|
</Block>;
|