|
|
|
@ -1,6 +1,15 @@
|
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
|
|
|
|
|
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker,Breadcrumb,Upload,Button,notification, Tooltip,Tabs} from 'antd';
|
|
|
|
|
import MonacoEditor from 'react-monaco-editor';
|
|
|
|
|
|
|
|
|
|
//MonacoDiffEditor 对比模式
|
|
|
|
|
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker,Breadcrumb,Upload,Button,notification, Tooltip} from 'antd';
|
|
|
|
|
|
|
|
|
|
// import "antd/dist/antd.css";
|
|
|
|
|
|
|
|
|
|
import locale from 'antd/lib/date-picker/locale/zh_CN';
|
|
|
|
|
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
|
|
|
|
@ -8,6 +17,22 @@ import './css/TPMsettings.css';
|
|
|
|
|
|
|
|
|
|
import { getImageUrl, toPath, getUrl ,appendFileSizeToUploadFileAll, getUploadActionUrl} from 'educoder';
|
|
|
|
|
|
|
|
|
|
let origin = getUrl();
|
|
|
|
|
|
|
|
|
|
let path = getUrl("/editormd/lib/")
|
|
|
|
|
|
|
|
|
|
const $ = window.$;
|
|
|
|
|
|
|
|
|
|
let timeout;
|
|
|
|
|
|
|
|
|
|
let currentValue;
|
|
|
|
|
|
|
|
|
|
const Option = Select.Option;
|
|
|
|
|
|
|
|
|
|
const RadioGroup = Radio.Group;
|
|
|
|
|
const confirm = Modal.confirm;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default class Shixuninformation extends Component {
|
|
|
|
@ -22,15 +47,82 @@ export default class Shixuninformation extends Component {
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {can_copy}=this.state;
|
|
|
|
|
let options;
|
|
|
|
|
|
|
|
|
|
if (this.props.departmentslist != undefined) {
|
|
|
|
|
options = this.props.departmentslist.map((d, k) => {
|
|
|
|
|
return (
|
|
|
|
|
<Option key={d} id={k}>{d}</Option>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<div className="clearfix mt20 ml30">
|
|
|
|
|
<div className="clearfix 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>
|
|
|
|
|
<Checkbox checked={this.props.data&&this.props.data.shixun.can_copy === undefined ? false : this.props.data&&this.props.data.shixun.can_copy} onChange={this.props.data&&this.props.data.shixun.can_copy}></Checkbox>
|
|
|
|
|
<label style={{top:'6px'}} className="color-grey-9 ml10">(勾选则允许已认证的教师复制该实训)</label>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="edu-back-white mb10 padding40-20" style={{display:this.props.identity===1?"block":this.props.data&&this.props.data.shixun.status===2&&this.props.data&&this.props.data.shixun.use_scope===0||this.props.data&&this.props.data.shixun.status===1&&this.props.data&&this.props.data.shixun.use_scope===0?"none":"block"}}>
|
|
|
|
|
<p className="color-grey-6 font-16 mb30">公开程度</p>
|
|
|
|
|
<RadioGroup onChange={this.SelectOpenpublic} value={this.props.data&&this.props.data.use_scope}>
|
|
|
|
|
<Radio className="radioStyle" value={0}><span>对所有公开</span> <span className="color-grey-9">(选中则所有已被试用授权的用户可以学习)</span></Radio>
|
|
|
|
|
<Radio className="radioStyle" value={1}><span>对指定单位公开</span> <span className="color-grey-9">(选中则下方指定单位的已被试用授权的用户可以学习)</span></Radio>
|
|
|
|
|
</RadioGroup>
|
|
|
|
|
|
|
|
|
|
<div className="clearfix none" id="unit-all" style={{display: this.props.scopetype === false ? 'none' : 'block'}}>
|
|
|
|
|
<div className="fl ml25">
|
|
|
|
|
<div className="fl" id="unit-input-part" style={{width:'100%'}}>
|
|
|
|
|
<div id="person-unit" className="fl pr mr10">
|
|
|
|
|
<div className="shixunScopeInput fl" >
|
|
|
|
|
<Select
|
|
|
|
|
style={{width:'200px'}}
|
|
|
|
|
placeholder="请输入并选择单位名称"
|
|
|
|
|
onChange={(value)=>this.shixunScopeInput(value)}
|
|
|
|
|
onSearch={this.shixunHandleSearch}
|
|
|
|
|
showSearch
|
|
|
|
|
defaultActiveFirstOption={false}
|
|
|
|
|
showArrow={false}
|
|
|
|
|
filterOption={false}
|
|
|
|
|
notFoundContent={null}
|
|
|
|
|
className={this.props.scope_partmenttype===true?"bor-red":""}
|
|
|
|
|
>
|
|
|
|
|
{options}
|
|
|
|
|
</Select>
|
|
|
|
|
</div>
|
|
|
|
|
<span className="color-grey-9">(搜索并选中添加单位名称)</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div style={{width:'100%'}}>
|
|
|
|
|
<div className="mt20 clearfix" id="task_tag_content">
|
|
|
|
|
{
|
|
|
|
|
this.props.scope_partment===undefined?"":this.props.scope_partment.map((item,key)=>{
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<li className="task_tag_span" key={key}><span>{item}</span>
|
|
|
|
|
<a style={{ color: 'rgba(0,0,0,.25)' }}
|
|
|
|
|
onClick={(key)=>this.deleteScopeInput(key)}
|
|
|
|
|
>
|
|
|
|
|
{this.props.identity===1?"x":this.state.status===2&&this.props.scope_partment===this.props.scope_partments||this.state.status===1&&this.props.scope_partment===this.props.scope_partments?"":"×"}
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<span className={this.props.scope_partmenttype===true?"color-orange ml20 fl":"color-orange ml20 fl none"} id="public_unit_notice">
|
|
|
|
|
<i className="fa fa-exclamation-circle mr3"></i>
|
|
|
|
|
请选择需要公开的单位
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|