Commit df3681e1 by chengming

修改bug

parent 271d8022
...@@ -22,14 +22,12 @@ class Editor extends PureComponent { ...@@ -22,14 +22,12 @@ class Editor extends PureComponent {
} }
componentDidMount() { componentDidMount() {
const { importContent, type } = this.props; const { importContent, type } = this.props;
console.log("importContent11111111", type);
if (type === 'look') { if (type === 'look') {
this.setState({ this.setState({
readOnly: true, readOnly: true,
editorState: BraftEditor.createEditorState(importContent) editorState: BraftEditor.createEditorState(importContent)
}) })
} else if (type === 'edit' && importContent) { } else if ((type === 'edit' || !type) && importContent) {
this.setState({ this.setState({
editorState: BraftEditor.createEditorState(importContent), // 更新 editorState editorState: BraftEditor.createEditorState(importContent), // 更新 editorState
}); });
......
...@@ -378,7 +378,7 @@ class homePage extends Component { ...@@ -378,7 +378,7 @@ class homePage extends Component {
xAxis: [ xAxis: [
{ {
type: "category", type: "category",
data: ["测试总数", "参加人数"], data: ["培训总数", "参加人数"],
boundaryGap: ["0%", "0%"], boundaryGap: ["0%", "0%"],
axisLine: { axisLine: {
show: false, // 确保显示 Y 轴线 show: false, // 确保显示 Y 轴线
......
...@@ -153,9 +153,8 @@ class addEdit extends React.Component { ...@@ -153,9 +153,8 @@ class addEdit extends React.Component {
return; return;
} }
let temp = this.state.fileList;
if (file.status == "removed") { if (file.status == "removed") {
temp = temp.filter(item => { const temp = this.state.fileList.filter(item => {
return item.uid != file.uid; return item.uid != file.uid;
}); });
this.setState({ this.setState({
...@@ -170,26 +169,21 @@ class addEdit extends React.Component { ...@@ -170,26 +169,21 @@ class addEdit extends React.Component {
}), }),
}); });
} else { } else {
temp.push(fileList.pop()); // 直接替换而不是添加到列表中
const newFile = fileList.pop();
this.setState({ this.setState({
fileList: temp.map(item => { fileList: [{
return { uid: newFile.uid,
uid: item.uid, name: newFile.name,
name: item.name, size: newFile.size,
size: item.size, fileUrl: newFile.fileUrl ? newFile.fileUrl : (newFile.response ? newFile.response.data : ''),
fileUrl: item.fileUrl, }],
}; responseList: [{
}), fileName: newFile.name,
}); fileUrl: newFile.fileUrl ? newFile.fileUrl : (newFile.response ? newFile.response.data : ''),
this.setState({ size: newFile.size + "",
responseList: temp.map(item => { suffix: "." + newFile.name.split(".")[1],
return { }]
fileName: item.name,
fileUrl: item.fileUrl ? item.fileUrl : item.response.data,
size: item.size + "",
suffix: "." + item.name.split(".")[1],
};
}),
}); });
} }
} }
......
...@@ -103,10 +103,6 @@ class App extends React.Component { ...@@ -103,10 +103,6 @@ class App extends React.Component {
</div> </div>
); );
const { const {
// receiveHtml,
// tags,
// logourl,
// onTrainKind,
trainkindlist, trainkindlist,
activityList, activityList,
trainfirstinfo, trainfirstinfo,
...@@ -139,12 +135,6 @@ class App extends React.Component { ...@@ -139,12 +135,6 @@ class App extends React.Component {
sm: { span: 8 }, sm: { span: 8 },
}, },
}; };
let formItemLayoutLogo = {
layout: {
labelCol: { span: 4 },
wrapperCol: { span: 11 },
},
};
let tagPropsNew = {}; let tagPropsNew = {};
if (that.props.infoTitle === "新建信息") { if (that.props.infoTitle === "新建信息") {
tagPropsNew = { tagPropsNew = {
...@@ -220,16 +210,6 @@ class App extends React.Component { ...@@ -220,16 +210,6 @@ class App extends React.Component {
/> />
)} )}
</FormItem> </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 === "新建信息" && ( {(this.props.infoTitle === "新建信息" && (
<FormItem {...formItemLayout} label="活动分类"> <FormItem {...formItemLayout} label="活动分类">
......
...@@ -383,40 +383,6 @@ class enrollform extends React.Component { ...@@ -383,40 +383,6 @@ class enrollform extends React.Component {
</FormItem> </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> </Form>
</div> </div>
); );
......
...@@ -200,6 +200,8 @@ class App extends React.Component { ...@@ -200,6 +200,8 @@ class App extends React.Component {
seeting, seeting,
newsList, newsList,
} = this.props; } = this.props;
console.clear()
console.log(signinfolist,'hasEnrolled1111');
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
const { enableApp, enableMail } = this.state; const { enableApp, enableMail } = this.state;
let usable = false; 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