|
|
@ -3,6 +3,7 @@ import {getImageUrl} from 'educoder';
|
|
|
|
import {Modal,Input,Checkbox,Tooltip,Spin,notification} from "antd";
|
|
|
|
import {Modal,Input,Checkbox,Tooltip,Spin,notification} from "antd";
|
|
|
|
import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd';
|
|
|
|
import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd';
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
|
|
|
|
import Addshixuns from './Addshixuns';
|
|
|
|
import '../ShixunPaths.css';
|
|
|
|
import '../ShixunPaths.css';
|
|
|
|
import axios from 'axios';
|
|
|
|
import axios from 'axios';
|
|
|
|
import NewShixunModel from '../../courses/coursesPublic/NewShixunModel';
|
|
|
|
import NewShixunModel from '../../courses/coursesPublic/NewShixunModel';
|
|
|
@ -52,7 +53,8 @@ class DetailCardsEditAndAdd extends Component{
|
|
|
|
Modalsbottomval:"",
|
|
|
|
Modalsbottomval:"",
|
|
|
|
ChooseShixunListshixun_list:undefined,
|
|
|
|
ChooseShixunListshixun_list:undefined,
|
|
|
|
stage_nametype:false,
|
|
|
|
stage_nametype:false,
|
|
|
|
descriptiontype:false
|
|
|
|
descriptiontype:false,
|
|
|
|
|
|
|
|
Addshixunstype:false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.onDragEnd = this.onDragEnd.bind(this);
|
|
|
|
this.onDragEnd = this.onDragEnd.bind(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -113,9 +115,12 @@ class DetailCardsEditAndAdd extends Component{
|
|
|
|
for(var z=0; z<newshixun_lists.length; z++){
|
|
|
|
for(var z=0; z<newshixun_lists.length; z++){
|
|
|
|
newshixuns_listedit.push(newshixun_lists[z]);
|
|
|
|
newshixuns_listedit.push(newshixun_lists[z]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(var i=0; i<newshixun_lists.length; i++){
|
|
|
|
for(var i=0; i<newshixun_lists.length; i++){
|
|
|
|
list.push(newshixun_lists[i].shixun_id);
|
|
|
|
list.push(newshixun_lists[i].shixun_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
shixuns_listedit:newshixuns_listedit,
|
|
|
|
shixuns_listedit:newshixuns_listedit,
|
|
|
|
shixuns_listeditlist:list,
|
|
|
|
shixuns_listeditlist:list,
|
|
|
@ -224,7 +229,8 @@ class DetailCardsEditAndAdd extends Component{
|
|
|
|
Modalstype:false,
|
|
|
|
Modalstype:false,
|
|
|
|
Modalstopval:'',
|
|
|
|
Modalstopval:'',
|
|
|
|
Modalsbottomval:'',
|
|
|
|
Modalsbottomval:'',
|
|
|
|
delectfunvalue:undefined
|
|
|
|
delectfunvalue:undefined,
|
|
|
|
|
|
|
|
Addshixunstype:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -308,6 +314,41 @@ class DetailCardsEditAndAdd extends Component{
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Addshixuns=()=>{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
Addshixunstype:true,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Getaddshixuns=(value)=>{
|
|
|
|
|
|
|
|
let {
|
|
|
|
|
|
|
|
shixuns_listeditlist,
|
|
|
|
|
|
|
|
shixuns_listedit,
|
|
|
|
|
|
|
|
} = this.state
|
|
|
|
|
|
|
|
let newshixuns_listedit=shixuns_listedit;
|
|
|
|
|
|
|
|
let list=shixuns_listeditlist
|
|
|
|
|
|
|
|
let url='/paths/add_shixun_to_stage.json';
|
|
|
|
|
|
|
|
axios.post(url,{
|
|
|
|
|
|
|
|
name:value
|
|
|
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
|
|
|
if(response){
|
|
|
|
|
|
|
|
if(response.data){
|
|
|
|
|
|
|
|
newshixuns_listedit.push(response.data);
|
|
|
|
|
|
|
|
list.push(response.data.shixun_id);
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
shixuns_listedit:newshixuns_listedit,
|
|
|
|
|
|
|
|
shixuns_listeditlist:list,
|
|
|
|
|
|
|
|
patheditarry:[],
|
|
|
|
|
|
|
|
selectShixun:false,
|
|
|
|
|
|
|
|
page:1,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
console.log(error)
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
render(){
|
|
|
|
let {selectShixun,
|
|
|
|
let {selectShixun,
|
|
|
@ -340,6 +381,22 @@ class DetailCardsEditAndAdd extends Component{
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</Modals>
|
|
|
|
</Modals>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{this.state.Addshixunstype===true?<Addshixuns
|
|
|
|
|
|
|
|
modalCancel={this.cardsModalcancel}
|
|
|
|
|
|
|
|
Setaddshixuns={(value)=>this.Getaddshixuns(value)}
|
|
|
|
|
|
|
|
{...this.props}
|
|
|
|
|
|
|
|
{...this.state}
|
|
|
|
|
|
|
|
/>:""}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
`
|
|
|
|
|
|
|
|
.mb10 {
|
|
|
|
|
|
|
|
margin-bottom: 10px !important;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
{ editPanel &&
|
|
|
|
{ editPanel &&
|
|
|
|
<div className="lesson-edit-content mb10">
|
|
|
|
<div className="lesson-edit-content mb10">
|
|
|
|
<div className="clearfix edu-back-white pt30 pb30">
|
|
|
|
<div className="clearfix edu-back-white pt30 pb30">
|
|
|
@ -371,13 +428,20 @@ class DetailCardsEditAndAdd extends Component{
|
|
|
|
<div className={descriptiontype===true?"red":"none"}>描述不能超多最大限制300个字符</div>
|
|
|
|
<div className={descriptiontype===true?"red":"none"}>描述不能超多最大限制300个字符</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<p className="clearfix mb30">
|
|
|
|
<p className="clearfix mb10">
|
|
|
|
<a onClick={this.AddShixunBox} className="fl defalutGreyBorder color-grey-6 ml37">
|
|
|
|
<a onClick={()=>this.AddShixunBox()} className="fl defalutGreyBorder color-grey-6 ml37">
|
|
|
|
<i className="iconfont icon-tianjiafangda fl mr5"></i>
|
|
|
|
<i className="iconfont icon-tianjiafangda fl mr5"></i>
|
|
|
|
选用实训项目</a>
|
|
|
|
选用实训项目</a>
|
|
|
|
<span id="sx_notice" className="fl ml20 color-grey-9 mt5">选择下面实训后,可以通过拖拽进行排序调整</span>
|
|
|
|
<span id="sx_notice" className="fl ml20 color-grey-9 mt5">选择下面实训后,可以通过拖拽进行排序调整</span>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p className="clearfix mb30">
|
|
|
|
|
|
|
|
<a onClick={()=>this.Addshixuns()} className="fl defalutGreyBorder color-grey-6 ml37">
|
|
|
|
|
|
|
|
<i className="iconfont icon-tianjiafangda fl mr5"></i>
|
|
|
|
|
|
|
|
添加实训项目</a>
|
|
|
|
|
|
|
|
<span id="sx_notice" className="fl ml20 color-grey-9 mt5">您只需输入实训名称即可完成实训项目的添加,进入实训详情后可进行具体配置操作</span>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
{selectShixun===true?<style>
|
|
|
|
{selectShixun===true?<style>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
`
|
|
|
|
`
|
|
|
|