chromesetting
杨树明 5 years ago
parent 04821153f4
commit 0b7037123d

@ -23,7 +23,7 @@ const versionNum = '0001';
// let _url_origin = getUrl() // let _url_origin = getUrl()
let _url_origin=''; let _url_origin='';
if(window.location.port === "3007"){ if(window.location.port === "3007"){
_url_origin="http://pre-newweb.educoder.net"; _url_origin="https://test-newweb.educoder.net";
} }
// let _url_origin=`https://www.educoder.net`; // let _url_origin=`https://www.educoder.net`;

@ -21,10 +21,16 @@ export default class Shixuninformation extends Component {
render() { render() {
let {can_copy}=this.state;
return ( return (
<div> <div>
1111 <div className="clearfix mt20 ml30">
<span className="color-grey-6 mt5 fl" style={{minWidth: '95px'}}>复制:</span>
<span className="fl mt5">
<Checkbox checked={can_copy === undefined ? false : can_copy} onChange={this.can_copy}></Checkbox>
<label style={{top:'6px'}} className="color-grey-9 ml10">(勾选则允许已认证的教师复制该实训)</label>
</span>
</div>
</div> </div>
); );
} }

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

Loading…
Cancel
Save