| | |
| | | }, this.getData); |
| | | } |
| | | |
| | | reboot = (e,status) => { |
| | | reboot = (e, status) => { |
| | | this.setState({ loading: true }) |
| | | Fetch.socialUpdate(e, status).then(res => { |
| | | if (res.code == 0) { |
| | | console.log(res) |
| | | this.setState({ loading: false }) |
| | | message.success(status==0?'重启任务成功':'暂停任务成功'); |
| | | message.success(status == 0 ? '重启任务成功' : '暂停任务成功'); |
| | | this.getData(); |
| | | } else { |
| | | this.setState({ loading: false }) |
| | |
| | | { |
| | | record.status == 0 ? |
| | | <React.Fragment> |
| | | <a onClick={() => this.showModal(record.id)}>编辑</a> |
| | | <a onClick={() => this.showModal(record.id)}>查看</a> |
| | | <Divider type="vertical" /> |
| | | <Popconfirm |
| | | title="确认删除任务吗?" |
| | |
| | | </Popconfirm> |
| | | <a onClick={() => this.reboot(record.id, 99)}>暂停</a> |
| | | </React.Fragment> : |
| | | record.status == 1 ? |
| | | <React.Fragment> |
| | | <a onClick={() => this.showModal(record.id)}>查看</a> |
| | | <Divider type="vertical" /> |
| | | <a onClick={() => this.showModal(record.id)}>结束任务</a> |
| | | <Divider type="vertical" /> |
| | | <a onClick={() => this.reboot(record.id, 99)}>暂停</a> |
| | | </React.Fragment> : |
| | | <React.Fragment> |
| | | <a onClick={() => this.showModal(record.id)}>查看</a> |
| | | <Divider type="vertical" /> |
| | | <a onClick={() => this.reboot(record.id, 0)}>重启</a> |
| | | </React.Fragment> |
| | | <React.Fragment> |
| | | <a onClick={() => this.showModal(record.id)}>查看</a> |
| | | <Divider type="vertical" /> |
| | | <a onClick={() => this.reboot(record.id, 0)}>重启</a> |
| | | </React.Fragment> |
| | | } |
| | | </span> |
| | | ), |