issues25489
杨树林 5 years ago
parent 7ff5f2f44f
commit 537f75fd6d

@ -212,12 +212,52 @@ class Bullsubdirectory extends Component{
}
//上移
Moveupward = () => {
Moveupward = (id) => {
let url = `/courses/${this.props.match.params.coursesId}/inform_up.json`;
axios.post(url, {
inform_id: id
}).then((response) => {
if (response) {
if (response.data) {
if (response.data.status === 0) {
this.props.showNotification(`下移成功`);
this.props.getinputdata();
} else {
this.props.showNotification(`下移失败`);
}
} else {
this.props.showNotification(`下移失败`);
}
} else {
this.props.showNotification(`下移失败`);
}
}).catch((error) => {
console.log(error)
});
}
//下移
Movedown = () => {
Movedown = (id) => {
let url = `/courses/${this.props.match.params.coursesId}/inform_down.json`;
axios.post(url, {
inform_id: id
}).then((response) => {
if (response) {
if (response.data) {
if (response.data.status === 0) {
this.props.showNotification(`下移成功`);
this.props.getinputdata();
} else {
this.props.showNotification(`下移失败`);
}
} else {
this.props.showNotification(`下移失败`);
}
} else {
this.props.showNotification(`下移失败`);
}
}).catch((error) => {
console.log(error)
});
}
@ -288,7 +328,7 @@ class Bullsubdirectory extends Component{
style={{
lineHeight: "34px",
}}
onClick={() => this.Movedown()}
onClick={() => this.Movedown(this.props.id)}
><Tooltip
title="下移"><i
style={{color: "#4CACFF"}}
@ -300,7 +340,7 @@ class Bullsubdirectory extends Component{
style={{
lineHeight: "34px",
}}
onClick={() => this.Moveupward()}
onClick={() => this.Moveupward(this.props.id)}
><Tooltip
title="上移"><i
style={{color: "#4CACFF"}}

Loading…
Cancel
Save