Commit df3681e1 by chengming

修改bug

parent 271d8022
......@@ -22,14 +22,12 @@ class Editor extends PureComponent {
}
componentDidMount() {
const { importContent, type } = this.props;
console.log("importContent11111111", type);
if (type === 'look') {
this.setState({
readOnly: true,
editorState: BraftEditor.createEditorState(importContent)
})
} else if (type === 'edit' && importContent) {
} else if ((type === 'edit' || !type) && importContent) {
this.setState({
editorState: BraftEditor.createEditorState(importContent), // 更新 editorState
});
......
......@@ -378,7 +378,7 @@ class homePage extends Component {
xAxis: [
{
type: "category",
data: ["测试总数", "参加人数"],
data: ["培训总数", "参加人数"],
boundaryGap: ["0%", "0%"],
axisLine: {
show: false, // 确保显示 Y 轴线
......
......@@ -153,9 +153,8 @@ class addEdit extends React.Component {
return;
}
let temp = this.state.fileList;
if (file.status == "removed") {
temp = temp.filter(item => {
const temp = this.state.fileList.filter(item => {
return item.uid != file.uid;
});
this.setState({
......@@ -170,26 +169,21 @@ class addEdit extends React.Component {
}),
});
} else {
temp.push(fileList.pop());
// 直接替换而不是添加到列表中
const newFile = fileList.pop();
this.setState({
fileList: temp.map(item => {
return {
uid: item.uid,
name: item.name,
size: item.size,
fileUrl: item.fileUrl,
};
}),
});
this.setState({
responseList: temp.map(item => {
return {
fileName: item.name,
fileUrl: item.fileUrl ? item.fileUrl : item.response.data,
size: item.size + "",
suffix: "." + item.name.split(".")[1],
};
}),
fileList: [{
uid: newFile.uid,
name: newFile.name,
size: newFile.size,
fileUrl: newFile.fileUrl ? newFile.fileUrl : (newFile.response ? newFile.response.data : ''),
}],
responseList: [{
fileName: newFile.name,
fileUrl: newFile.fileUrl ? newFile.fileUrl : (newFile.response ? newFile.response.data : ''),
size: newFile.size + "",
suffix: "." + newFile.name.split(".")[1],
}]
});
}
}
......
......@@ -103,10 +103,6 @@ class App extends React.Component {
</div>
);
const {
// receiveHtml,
// tags,
// logourl,
// onTrainKind,
trainkindlist,
activityList,
trainfirstinfo,
......@@ -139,12 +135,6 @@ class App extends React.Component {
sm: { span: 8 },
},
};
let formItemLayoutLogo = {
layout: {
labelCol: { span: 4 },
wrapperCol: { span: 11 },
},
};
let tagPropsNew = {};
if (that.props.infoTitle === "新建信息") {
tagPropsNew = {
......@@ -220,16 +210,6 @@ class App extends React.Component {
/>
)}
</FormItem>
{/* {this.props.infoTitle === "查看信息" &&
trainfirstinfo !== undefined && (
<UpLoad {...uploadPropsSee} ref={c => (this.validate = c)} />
)} */}
{/* {this.props.infoTitle === "修改信息" &&
trainfirstinfo.logoImg && (
<UpLoad {...uploadPropsEdite} ref={c => (this.validate = c)} />
)} */}
{/* 活动分类 */}
{(this.props.infoTitle === "新建信息" && (
<FormItem {...formItemLayout} label="活动分类">
......
......@@ -383,40 +383,6 @@ class enrollform extends React.Component {
</FormItem>
)}
{/* {
String(isPayForEnroll) == "0" ?
<FormItem label="是否审核">
<Col span={1}>
{getFieldDecorator("needAudit", {
initialValue: this.state.needFlag,
valuePropName: "checked",
})(
<Switch
disabled={usable}
checkedChildren="ON"
unCheckedChildren="OFF"
//defaultChecked={this.state.needFlag}
/>
)}
</Col>
</FormItem> : ""
} */}
{/* <FormItem label="报名须知">
{getFieldDecorator("notice", {
initialValue: this.state.notice,
rules: [{ required: false, message: "请填写须知" }],
})(
<TextArea
maxLength="50"
disabled={usable}
placeholder="可填写报名注意事项,最多可输入50字"
rows={4}
/>
)}
</FormItem> */}
</Form>
</div>
);
......
......@@ -200,6 +200,8 @@ class App extends React.Component {
seeting,
newsList,
} = this.props;
console.clear()
console.log(signinfolist,'hasEnrolled1111');
const { getFieldDecorator } = this.props.form;
const { enableApp, enableMail } = this.state;
let usable = false;
......
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