|
|
|
@ -92,7 +92,7 @@ class Newshixuns extends Component {
|
|
|
|
|
if (!err) {
|
|
|
|
|
console.log('Received values of form: ', values);
|
|
|
|
|
|
|
|
|
|
let Url = `/api/shixuns.json`;
|
|
|
|
|
let Url = `/shixuns.json`;
|
|
|
|
|
axios.post(Url, {
|
|
|
|
|
description: mdContnet,
|
|
|
|
|
main_type: values.main_type,
|
|
|
|
@ -131,16 +131,28 @@ class Newshixuns extends Component {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
main_type = (value) => {
|
|
|
|
|
main_type = (value, e) => {
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
main_type: value,
|
|
|
|
|
});
|
|
|
|
|
this.setState({
|
|
|
|
|
mainvalues: e.props.name
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sub_type = (value) => {
|
|
|
|
|
sub_type = (value, e) => {
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
sub_type: value,
|
|
|
|
|
});
|
|
|
|
|
let newlist = ""
|
|
|
|
|
e.map((item, key) => {
|
|
|
|
|
if(item.props.name!=""){
|
|
|
|
|
newlist = newlist + `${item.props.name}`
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.setState({
|
|
|
|
|
subvalues: newlist
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
post_apply = () => {
|
|
|
|
@ -344,7 +356,15 @@ class Newshixuns extends Component {
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div className="newMain clearfix">
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.ant-form-item{
|
|
|
|
|
margin-bottom:5px;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<div className="educontent mt20 mb60 clearfix">
|
|
|
|
|
<div className="new_shixun">
|
|
|
|
|
|
|
|
|
@ -444,7 +464,7 @@ class Newshixuns extends Component {
|
|
|
|
|
{
|
|
|
|
|
newshixunlist === undefined ? "" : newshixunlist.main_type.map((item, key) => {
|
|
|
|
|
return (
|
|
|
|
|
<Option value={item.id} key={key}>
|
|
|
|
|
<Option value={item.id} key={key} name={item.description}>
|
|
|
|
|
<Tooltip placement="right"
|
|
|
|
|
title={item.description === "" ? "无描述" : item.description}>
|
|
|
|
|
{item.type_name}
|
|
|
|
@ -460,8 +480,17 @@ class Newshixuns extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.Selectlittle .ant-select-selection__rendered{
|
|
|
|
|
line-height:25px;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<Form.Item
|
|
|
|
|
style={{"borderBottom": 'none', 'width': '61%', 'float': 'left', 'marginTop': '40px'}}
|
|
|
|
|
style={{"borderBottom": 'none', 'width': '82%', 'float': 'left', 'marginTop': '40px'}}
|
|
|
|
|
className="chooseDes pr"
|
|
|
|
|
>
|
|
|
|
|
<div className=" fl pr mr20">
|
|
|
|
@ -474,11 +503,12 @@ class Newshixuns extends Component {
|
|
|
|
|
style={{width: 180}}
|
|
|
|
|
onChange={this.sub_type}
|
|
|
|
|
defaultOpen={false}
|
|
|
|
|
className={"Selectlittle"}
|
|
|
|
|
>
|
|
|
|
|
{
|
|
|
|
|
newshixunlist === undefined ? "" : newshixunlist.small_type.map((item, key) => {
|
|
|
|
|
return (
|
|
|
|
|
<Option value={item.id} key={key}>
|
|
|
|
|
<Option value={item.id} key={key} name={item.description}>
|
|
|
|
|
<Tooltip placement="right"
|
|
|
|
|
title={item.description === "" ? "无描述" : item.description}>
|
|
|
|
|
{item.type_name}
|
|
|
|
@ -492,12 +522,12 @@ class Newshixuns extends Component {
|
|
|
|
|
)}
|
|
|
|
|
<span className="fl ml20 color-grey lineh-20">
|
|
|
|
|
<div>
|
|
|
|
|
<div className={"font-12"}>
|
|
|
|
|
已安装软件:hadoop3.1.0、jdk1.8;
|
|
|
|
|
</div>
|
|
|
|
|
<div className={"font-12"}>
|
|
|
|
|
说明:添加了hadoop3.1.0、jdk1.8的源码包,添加了hadoop3.1.0、jdk1.8的源码包
|
|
|
|
|
</div>
|
|
|
|
|
{this.state.mainvalues === undefined && this.state.subvalues === undefined ? "" :
|
|
|
|
|
<div className={"font-12"} style={{'max-width':'700px'}}>
|
|
|
|
|
{`已安装软件:${this.state.mainvalues===undefined?"":this.state.mainvalues}${this.state.subvalues===undefined?"":this.state.subvalues}`}
|
|
|
|
|
{`说明:添加了${this.state.mainvalues===undefined?"":this.state.mainvalues}${this.state.subvalues===undefined?"":this.state.subvalues}`}
|
|
|
|
|
</div>}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|