Merge branch 'topic_bank' into dev_aliyun_beta

dev_aliyun_beta
caicai8 6 years ago
commit 5bbfb9c00f

@ -74,7 +74,10 @@ class Admins::DepartmentAppliesController < Admins::BaseController
@depart_apply&.applied_messages&.update_all(status:3)
if params[:tip] == 'unapplied' #未审批时候删除
UserExtension.where(department_id: @depart_apply.department_id).update_all(department_id:nil)
user_extens = UserExtension.where(department_id: @depart_apply.department_id)
user_extens.update_all(department_id:nil)
User.where(id: user_extens.pluck(:user_id)).update_all(profile_completed:false)
tiding_params = {
user_id: @depart_apply.user_id,
trigger_user_id: 0,

@ -16,7 +16,7 @@
<td><%= apply.id %></td>
<td class="text-left"> <%= apply.name %></td>
<td class="text-left"> <%= apply.school.try(:name) %></td>
<td><%= apply.user.show_real_name %></td>
<td><%= apply&.user&.real_name %></td>
<td><%= format_time apply.created_at %></td>
<td class="action-container">
<%= agree_link '批准', agree_admins_department_apply_path(apply, element: ".department-apply-#{apply.id}"), 'data-confirm': '确认批准通过?' %>

@ -27,7 +27,7 @@
<img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %>
</td>
<td><%= user.real_name %></td>
<td><%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %></td>
<td class="text-left"><%= link_to library.title, library_path(library), :target => "_blank" %></td>
<td class="text-left"><%= overflow_hidden_span library.content[0..50]%></td>
<td><%= apply.updated_at.strftime('%Y-%m-%d %H:%M') %></td>

@ -27,7 +27,7 @@
<img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %>
</td>
<td><%= user.real_name %></td>
<td><%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %></td>
<td class="text-left"><%= link_to package.title, "/crowdsourcing/#{package.id}", :target => "_blank" %></td>
<td class="text-left"><%= overflow_hidden_span package.content[0..50] %></td>
<td><%= apply.updated_at.strftime('%Y-%m-%d %H:%M') %></td>

@ -27,7 +27,7 @@
<img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %>
</td>
<td><%= user.real_name %></td>
<td><%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %></td>
<td class="text-left">
<%= link_to "/shixuns/#{shixun.identifier}", target: '_blank' do %>
<%= overflow_hidden_span shixun.name, width: 300 %>

@ -21,7 +21,7 @@
<%= image_tag(imageUrl, width: 60, height: 40, class: "preview-image shixun-image-#{shixun.id}", data: { toggle: 'tooltip', title: '点击预览' }, style: imageExists ? '' : 'display:none') %>
<%= javascript_void_link imageExists ? '重新上传' : '上传图片', class: 'action upload-shixun-image-action', data: { source_id: shixun.id, source_type: 'Shixun', toggle: 'modal', target: '.admin-upload-file-modal' } %>
</td>
<td><%= link_to shixun.owner.try(:show_real_name),"/users/#{shixun.owner.login}",target:'_blank' %></td>
<td><%= link_to shixun.owner.try(:real_name),"/users/#{shixun.owner.login}",target:'_blank' %></td>
<td>
<% if shixun.status.to_i < 3 %>
<%= link_to "关闭", admins_shixun_setting_path(shixun,status:3,page_no:page_no),method: :put, :class => "", :remote => true %>

@ -33,7 +33,7 @@
<td><%= shixun.challenges.where(:st => 0).size %></td>
<td><%= shixun.challenges.where(:st => 1).size %></td>
<td class="shixuns-status-<%= shixun.status %>"><%= shixun_authentication_status shixun %></td>
<td><%= link_to shixun.owner.try(:show_real_name),"/users/#{shixun.owner.try(:login)}",target:'_blank' %></td>
<td><%= link_to shixun.owner.try(:real_name),"/users/#{shixun.owner.try(:login)}",target:'_blank' %></td>
<td><%= format_time shixun.created_at %></td>
<td class="homepage_teacher">
<input type="checkbox" name="sigle_show" value="<%= shixun.id %>" <%= shixun.sigle_training ? "checked" : "" %> class="ml-3 mr5 magic-checkbox" id="join_teacher_homepage_<%= shixun.id %>">

@ -29,7 +29,7 @@
<img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %>
</td>
<td><%= user.real_name %></td>
<td><%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %></td>
<td class="text-left">
<%= link_to "/paths/#{subject.id}", target: '_blank' do %>
<%= overflow_hidden_span subject.name, width: 300 %>

@ -4,7 +4,7 @@
<%= "#{apply&.province.to_s}"+"#{apply&.city.to_s}" %>
</td>
<td class="text-left"><%= overflow_hidden_span apply.address %></td>
<td><%= apply.user.try(:show_real_name) %></td>
<td><%= link_to apply&.user&.real_name, "/users/#{apply&.user&.login}", target: "_blank" %></td>
<td><%= format_time apply.created_at %></td>
<td class="action-container">
<%= agree_link '批准', agree_admins_unit_apply_path(apply, element: ".unit-apply-#{apply.id}"), 'data-confirm': '确认批准通过?' %>

@ -28,7 +28,7 @@
<img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %>
</td>
<td><%= user.real_name %></td>
<td><%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %></td>
<td class="text-left"><%= link_to video.title, video.file_url, :target => "_blank" %></td>
<td><%= video.filesize&.to_s(:human_size) %></td>
<td class="text-left"><%= link_to "播放视频",video.file_url, target: "_blank" %></td>

@ -254,7 +254,7 @@ class CommonWorkAppraise extends Component{
关联项目
</div>
<div className={"ml20"}>
{project_info.name}
<a className="color-blue" href={`/projects/${project_info.id}`}>{project_info.name}</a>
</div>
</div>
}

@ -4,7 +4,7 @@ import axios from 'axios'
import '../css/busyWork.css'
import '../css/Courses.css'
import { WordsBtn, getUrl, ConditionToolTip, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll
, getUploadActionUrl } from 'educoder'
, getUploadActionUrl } from 'educoder'
import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor';
import CBreadcrumb from '../common/CBreadcrumb'
import NewWorkForm from './NewWorkForm'
@ -13,116 +13,116 @@ const confirm = Modal.confirm;
const $ = window.$
const MAX_TITLE_LENGTH = 60;
class NewWork extends Component{
constructor(props){
super(props);
this.contentMdRef = React.createRef();
this.answerMdRef = React.createRef();
this.state={
category: {},
course_name: ''
}
}
componentDidMount () {
let {typeId, coursesId, pageType, workId}=this.props.match.params;
const isEdit = pageType === "edit"
this.isEdit = isEdit;
if (isEdit) {
this.fetchWork(workId)
} else {
this.fetchCourseData(coursesId)
}
}
fetchCourseData = (courseId) => {
const isGroup = this.props.isGroup()
const url = `/courses/${courseId}/homework_commons/new.json?type=${isGroup ? 3 : 1}`
axios.get(url, {
})
.then((response) => {
if (response.data.course_name) {
const data = response.data;
this.setState({
course_id: data.course_id,
course_name: data.course_name,
category: data.category,
})
}
})
.catch(function (error) {
console.log(error);
});
}
fetchWork = (workId) => {
const url = `/homework_commons/${workId}/edit.json`
axios.get(url, {
})
.then((response) => {
if (response.data.name) {
const data = response.data;
data.isEdit = this.isEdit
this.setState({
course_id: data.course_id,
course_name: data.course_name,
category: data.category,
})
this.newWorkFormRef.initValue(response.data)
}
})
.catch(function (error) {
console.log(error);
});
}
onCancel = () => {
this.props.toListPage(this.props.match.params, this.state.category.category_id)
}
doEdit = (params) => {
const workId = this.props.match.params.workId
const newUrl = `/homework_commons/${workId}.json`
axios.put(newUrl, params)
.then((response) => {
if (response.data.status == 0) {
this.props.showNotification('保存成功')
this.props.toWorkListPage(this.props.match.params, workId)
}
})
.catch(function (error) {
console.log(error);
});
}
doNew = (params) => {
const coursesId = this.props.match.params.coursesId
const newUrl = `/courses/${coursesId}/homework_commons.json`
axios.post(newUrl, params)
.then((response) => {
if (response.data.status == 0) {
this.props.showNotification('保存成功')
this.props.toWorkListPage(this.props.match.params, response.data.homework_id)
}
})
.catch(function (error) {
console.log(error);
});
}
handleContentUploadChange = (info) => {
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let contentFileList = info.fileList;
this.setState({ contentFileList: appendFileSizeToUploadFileAll(contentFileList) });
}
}
handleAnswerUploadChange = (info) => {
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let answerFileList = info.fileList;
this.setState({ answerFileList: appendFileSizeToUploadFileAll(answerFileList) });
}
}
onAttachmentRemove = (file, stateName) => {
constructor(props){
super(props);
this.contentMdRef = React.createRef();
this.answerMdRef = React.createRef();
this.state={
category: {},
course_name: ''
}
}
componentDidMount () {
let {typeId, coursesId, pageType, workId}=this.props.match.params;
const isEdit = pageType === "edit"
this.isEdit = isEdit;
if (isEdit) {
this.fetchWork(workId)
} else {
this.fetchCourseData(coursesId)
}
}
fetchCourseData = (courseId) => {
const isGroup = this.props.isGroup()
const url = `/courses/${courseId}/homework_commons/new.json?type=${isGroup ? 3 : 1}`
axios.get(url, {
})
.then((response) => {
if (response.data.course_name) {
const data = response.data;
this.setState({
course_id: data.course_id,
course_name: data.course_name,
category: data.category,
})
}
})
.catch(function (error) {
console.log(error);
});
}
fetchWork = (workId) => {
const url = `/homework_commons/${workId}/edit.json`
axios.get(url, {
})
.then((response) => {
if (response.data.name) {
const data = response.data;
data.isEdit = this.isEdit
this.setState({
course_id: data.course_id,
course_name: data.course_name,
category: data.category,
})
this.newWorkFormRef.initValue(response.data)
}
})
.catch(function (error) {
console.log(error);
});
}
onCancel = () => {
this.props.toListPage(this.props.match.params, this.state.category.category_id)
}
doEdit = (params) => {
const workId = this.props.match.params.workId
const newUrl = `/homework_commons/${workId}.json`
axios.put(newUrl, params)
.then((response) => {
if (response.data.status == 0) {
this.props.showNotification('保存成功')
this.props.toWorkListPage(this.props.match.params, workId)
}
})
.catch(function (error) {
console.log(error);
});
}
doNew = (params) => {
const coursesId = this.props.match.params.coursesId
const newUrl = `/courses/${coursesId}/homework_commons.json`
axios.post(newUrl, params)
.then((response) => {
if (response.data.status == 0) {
this.props.showNotification('保存成功')
this.props.toWorkListPage(this.props.match.params, response.data.homework_id)
}
})
.catch(function (error) {
console.log(error);
});
}
handleContentUploadChange = (info) => {
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let contentFileList = info.fileList;
this.setState({ contentFileList: appendFileSizeToUploadFileAll(contentFileList) });
}
}
handleAnswerUploadChange = (info) => {
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let answerFileList = info.fileList;
this.setState({ answerFileList: appendFileSizeToUploadFileAll(answerFileList) });
}
}
onAttachmentRemove = (file, stateName) => {
if(!file.percent || file.percent == 100){
this.props.confirm({
content: '是否确认删除?',
@ -139,69 +139,69 @@ class NewWork extends Component{
return false;
}
}
render(){
let {typeId,coursesId,pageType}=this.props.match.params;
const isGroup = this.props.isGroup()
const moduleName = !isGroup? "普通作业":"分组作业";
const moduleEngName = this.props.getModuleName()
let{
course_name, category
}=this.state
const { current_user } = this.props
const courseId = this.state.course_id || coursesId ;
const isEdit = this.isEdit;
const common = {
onCancel:this.onCancel,
isGroup: this.props.isGroup,
doNew: this.doNew,
doEdit: this.doEdit,
}
return(
<div className="newMain">
<div className="educontent mt20 mb50">
<CBreadcrumb items={[
{ to: current_user && current_user.first_category_url, name: this.state.course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category && category.category_id ? category.category_id : ''}`
, name: category && category.category_name },
{ name: `${ this.isEdit ? '编辑' : '新建'}` }
]}></CBreadcrumb>
<p className="clearfix mt20 mb20">
<span className="fl font-24 color-grey-3">{this.isEdit ?"编辑":"新建"}{ moduleName }</span>
<a href="javascript:void(0)" className="color-grey-6 fr font-16 mr2"
onClick={() => this.props.history.goBack()}>
返回
</a>
</p>
<div>
<style>
{
`
}
render(){
let {typeId,coursesId,pageType}=this.props.match.params;
const isGroup = this.props.isGroup()
const moduleName = !isGroup? "普通作业":"分组作业";
const moduleEngName = this.props.getModuleName()
let{
course_name, category
}=this.state
const { current_user } = this.props
const courseId = this.state.course_id || coursesId ;
const isEdit = this.isEdit;
const common = {
onCancel:this.onCancel,
isGroup: this.props.isGroup,
doNew: this.doNew,
doEdit: this.doEdit,
}
return(
<div className="newMain">
<div className="educontent mt20 mb50">
<CBreadcrumb items={[
{ to: current_user && current_user.first_category_url, name: this.state.course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category && category.category_id ? category.category_id : ''}`
, name: category && category.category_name },
{ name: `${ this.isEdit ? '编辑' : '新建'}` }
]}></CBreadcrumb>
<p className="clearfix mt20 mb20">
<span className="fl font-24 color-grey-3">{this.isEdit ?"编辑":"新建"}{ moduleName }</span>
<a href="javascript:void(0)" className="color-grey-6 fr font-16 mr2"
onClick={() => this.props.history.goBack()}>
返回
</a>
</p>
<div>
<style>
{
`
.yslnewworkinputaddonAfter .ant-input{
border-right: none !important;
height: 40px !important;
}
`
}
</style>
<NewWorkForm
{...this.props}
{...this.state}
{...common}
wrappedComponentRef={(ref) => {this.newWorkFormRef = ref}}
></NewWorkForm>
</div>
</div>
</div>
)
}
}
</style>
<NewWorkForm
{...this.props}
{...this.state}
{...common}
wrappedComponentRef={(ref) => {this.newWorkFormRef = ref}}
></NewWorkForm>
</div>
</div>
</div>
)
}
}
export default NewWork;

@ -65,29 +65,42 @@ class Completetopicdetails extends Component {
<div className="yslquestionbank1">
{
datas&&(datas.description===null?
<NoneData></NoneData>
""
:datas.description==="null"?
<NoneData></NoneData>
""
:
datas.description===""?
<NoneData></NoneData>
""
:
<MarkdownToHtml content={datas.description} selector="work_content" className="mb10 yslquesHeigth"></MarkdownToHtml>
)
}
// <div id="MakedownHTML"className="markdown-body yslquesHeigth yslquesmarkdowntext" dangerouslySetInnerHTML={{__html: markdownToHTML(datas.description).replace(/▁/g, "▁▁▁")}}/>
{datas.attachment_list === undefined ?
(datas.description===undefined || datas.description===null?
<NoneData></NoneData>
:
""
)
:
datas.attachment_list === null ?
(datas.description===undefined || datas.description===null?
<NoneData></NoneData>
:
""
)
:
datas.attachment_list.length === 0 ?
(datas.description===undefined || datas.description===null?
<NoneData></NoneData>
:
""
)
:
<div className="mb29px">
<AttachmentsList {...this.state} {...this.props} attachments={datas.attachment_list} ></AttachmentsList>
</div>
}
{/*<div id="MakedownHTML"className="markdown-body yslquesHeigth yslquesmarkdowntext" dangerouslySetInnerHTML={{__html: markdownToHTML(datas&&datas.description).replace(/▁/g, "▁▁▁")}}/>*/}
{/*{datas.attachment_list === undefined ? "" : datas.attachment_list.map((item, key) => {*/}
{/* return (*/}
{/* <GroupPackage key={key} attachments={item}></GroupPackage>*/}
{/* )*/}
{/*})}*/}
<div className="mb29px">
{datas.attachment_list === undefined ? "" :
<AttachmentsList {...this.state} {...this.props} attachments={datas.attachment_list} ></AttachmentsList>}
</div>
</div>
</div>
<div style={{width:"100%", padding: "36px"}}>

@ -6,8 +6,6 @@
}
.yslquesHeigth{
width: 100% !important;
}
.yslquesmarkdowntext{
font-size: 16px;

@ -139,7 +139,7 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback, initV
});
$("#" + _id + " [type=\"inline\"]").bind("click", function () {
_editorName.cm.replaceSelection("$$$$");
_editorName.cm.replaceSelection("`$$$$`");
var __Cursor = _editorName.cm.getDoc().getCursor();
_editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2);
_editorName.cm.focus();

@ -338,7 +338,8 @@ class Exercise extends Component{
checkBoxValues:[],
Modalstypeloding:false
})
this.InitList(type,StudentList_value,page,limit)
this.InitList(type,StudentList_value,page,limit);
this.props.updataleftNavfun();
}
}).catch((error)=>{
console.log(error);

@ -64,28 +64,42 @@ class Groupjobquesanswer extends Component {
<div className=" clearfix edu-back-white " ref='targetElementTrainingjobsetting' style={{margin: "auto", minWidth:"1200px"}}>
<div className="yslquestionbank1">
{
datas&&(datas.reference_answer===null?
<NoneData></NoneData>
datas.reference_answer===null?
""
:datas.reference_answer==="null"?
<NoneData></NoneData>
:
"" :
datas.reference_answer===""?
<NoneData></NoneData>
""
:
<MarkdownToHtml content={datas.reference_answer} selector="work_content" className="mb10 yslquesHeigth"></MarkdownToHtml>
// <div id="MakedownHTML"className="markdown-body yslquesHeigth yslquesmarkdowntext" dangerouslySetInnerHTML={{__html: markdownToHTML(datas.reference_answer).replace(/▁/g, "▁▁▁")}}/>
)
}
{/*<div id="MakedownHTML"className="markdown-body yslquesHeigth yslquesmarkdowntext" dangerouslySetInnerHTML={{__html: markdownToHTML(datas&&(datas.description===null?"无":datas.description==="null"?"无":datas.description)).replace(/▁/g, "▁▁▁")}}/>*/}
<div className="mt24">
{datas.attachments === undefined ? "" :
<AttachmentsList {...this.state} {...this.props} attachments={datas.attachments} ></AttachmentsList>}
</div>
{/*<GroupPackage2 datas={datas} bool={true}></GroupPackage2>*/}
{datas.reference_attachments === undefined ?
(datas.reference_answer===undefined || datas.reference_answer===null?
<NoneData></NoneData>
:
""
)
:
datas.reference_attachments === null ?
(datas.reference_answer===undefined || datas.reference_answer===null?
<NoneData></NoneData>
:
""
)
:
datas.reference_attachments.length === 0 ?
(datas.reference_answer===undefined || datas.reference_answer===null?
<NoneData></NoneData>
:
""
)
:
<div className="mt24">
<AttachmentsList {...this.state} {...this.props} attachments={datas.reference_attachments} ></AttachmentsList>
</div>
}
</div>
</div>
)

@ -335,11 +335,19 @@ class CoursesNew extends Component {
// this.props.history.push(this.props.current_user.first_category_url);
// }
// window.history.go(-1)
if(id===undefined){
this.props.history.goBack()
}else{
this.props.history.push(this.props.current_user.first_category_url);
}
try {
if(id===undefined){
this.props.history.push("/");
}else{
if(this.props.current_user.first_category_url===undefined){
this.props.history.push("/");
}else{
this.props.history.push(this.props.current_user.first_category_url);
}
}
}catch (e) {
this.props.history.push("/");
}
}

@ -61,33 +61,62 @@ class Generaljobanswer extends Component {
return (
<div className=" clearfix edu-back-white " ref='targetElementTrainingjobsetting' style={{margin: "auto", minWidth:"1200px"}}>
<div className="yslquestionbank1">
{/*{*/}
{/* datas&&(datas.reference_answer===null?*/}
{/* <NoneData></NoneData>*/}
{/* :datas.reference_answer==="null"?*/}
{/* <NoneData></NoneData>*/}
{/* :*/}
{/* datas.reference_answer===""?*/}
{/* <NoneData></NoneData>*/}
{/* :*/}
{/* <MarkdownToHtml content={datas.reference_answer} selector="work_content" className="mb10 yslquesHeigth "></MarkdownToHtml>*/}
{/* // <div id="MakedownHTML"className="markdown-body yslquesHeigth yslquesmarkdowntext" dangerouslySetInnerHTML={{__html: markdownToHTML(datas.reference_answer).replace(/▁/g, "▁▁▁")}}/>*/}
{/* )*/}
{/*}*/}
{/*/!*<div id="MakedownHTML"className="markdown-body yslquesHeigth yslquesmarkdowntext" dangerouslySetInnerHTML={{__html: markdownToHTML(datas&&(datas.reference_answer===null?"无":datas.reference_answer==="null"?"无":datas.reference_answer)).replace(/▁/g, "▁▁▁")}}/>*!/*/}
{/*<div className="mt16px">*/}
{/*{datas.reference_attachments === undefined ? "" :*/}
{/* <AttachmentsList {...this.state} {...this.props} attachments={datas.reference_attachments} ></AttachmentsList>}*/}
{/*</div>*/}
{
datas&&(datas.reference_answer===null?
datas.reference_answer===null?
""
:datas.reference_answer==="null"?
"" :
datas.reference_answer===""?
""
:
<MarkdownToHtml content={datas.reference_answer} selector="work_content" className="mb10 yslquesHeigth "></MarkdownToHtml>
}
{datas.reference_attachments === undefined ?
(datas.reference_answer===undefined || datas.reference_answer===null?
<NoneData></NoneData>
:datas.reference_answer==="null"?
:
""
)
:
datas.reference_attachments === null ?
(datas.reference_answer===undefined || datas.reference_answer===null?
<NoneData></NoneData>
:
datas.reference_answer===""?
""
)
:
datas.reference_attachments.length === 0 ?
(datas.reference_answer===undefined || datas.reference_answer===null?
<NoneData></NoneData>
:
<MarkdownToHtml content={datas.reference_answer} selector="work_content" className="mb10 yslquesHeigth "></MarkdownToHtml>
// <div id="MakedownHTML"className="markdown-body yslquesHeigth yslquesmarkdowntext" dangerouslySetInnerHTML={{__html: markdownToHTML(datas.reference_answer).replace(/▁/g, "▁▁▁")}}/>
)
:
""
)
:
<div className="mt24">
<AttachmentsList {...this.state} {...this.props} attachments={datas.reference_attachments} ></AttachmentsList>
</div>
}
{/*<div id="MakedownHTML"className="markdown-body yslquesHeigth yslquesmarkdowntext" dangerouslySetInnerHTML={{__html: markdownToHTML(datas&&(datas.reference_answer===null?"无":datas.reference_answer==="null"?"无":datas.reference_answer)).replace(/▁/g, "▁▁▁")}}/>*/}
<div className="mt16px">
{datas.attachments === undefined ? "" :
<AttachmentsList {...this.state} {...this.props} attachments={datas.attachments} ></AttachmentsList>}
</div>
{/*{datas.attachments === undefined ? "" : datas.attachments.map((item, key) => {*/}
{/* return (*/}
{/* <GroupPackage key={key} attachments={item}></GroupPackage>*/}
{/* )*/}
{/*})}*/}
</div>

@ -168,27 +168,29 @@ class ShixunWorkReport extends Component {
// })
//
// }
let{work_comment,work_comment_hidden}=this.state;
this.setState({
showAppraiseModaltype:true,
work_comment_hidden:work_comment===null||work_comment===undefined?this.state.work_type?true:false:work_comment_hidden,
})
}
hideAppraiseModal=()=>{
let{data,work_comment}=this.state;
let{work_comment,work_comment_hidden}=this.state;
this.setState({
showAppraiseModaltype:false,
work_comment_hidden:data&&data.work_comment_hidden===true?true:work_comment!=null?true:false,
work_comment_hidden:work_comment===null||work_comment===undefined?this.state.work_type===1?true:false:work_comment_hidden,
})
}
showAppraiseModals=(list,type)=>{
let{data,work_comment}=this.state;
this.setState({
showAppraiseModaltype:false,
work_comment_hidden:data&&data.work_comment_hidden===true?true:work_comment!=null?true:false,
work_comment_hidden:type===0?false:true,
work_comment:list,
work_type:type,
showAppraiseModals:true,
showAppraiseModalsshow:true
showAppraiseModalsshow:true,
})
}
isdeleteModal=()=>{
@ -258,7 +260,7 @@ class ShixunWorkReport extends Component {
Cancel={()=>this.hideAppraiseModal()}
showCancel={(list,type)=>this.showAppraiseModals(list,type)}
work_comment={this.state.work_comment}
work_type={this.state.work_type}
work_type={work_comment===null||work_comment===undefined?this.state.work_type:work_comment_hidden===true?1:0}
/>:""}
<div className="newMain clearfix ">
<div className={"educontent mb20" }>

@ -81,7 +81,7 @@ class ConclusionEvaluation extends Component {
</span>
),
}, {
title: '耗时',
title: '实战耗时',
key: 'elapsed',
dataIndex: 'elapsed',

@ -150,7 +150,7 @@ class OfficialAcademicTranscript extends Component {
</span>
),
}, {
title: '耗时',
title: '实战耗时',
key: 'elapsedtime',
dataIndex: 'elapsedtime',

@ -166,7 +166,7 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback, initV
});
$("#" + _id + " [type=\"inline\"]").bind("click", function () {
_editorName.cm.replaceSelection("$$$$");
_editorName.cm.replaceSelection("`$$$$`");
var __Cursor = _editorName.cm.getDoc().getCursor();
_editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2);
_editorName.cm.focus();

@ -62,7 +62,7 @@ window.md_rec_data = md_rec_data;
function md_elocalStorage(editor,mdu,id){
if (window.sessionStorage){
var oc = window.sessionStorage.getItem('content'+mdu);
if(oc !== null ){
if(oc !== null && oc != editor.getValue()){
console.log("#e_tips_"+id)
$("#e_tips_"+id).data('editor', editor);
var h = '您上次有已保存的数据,是否<a style="cursor: pointer;" class="link-color-blue" onclick="md_rec_data(\'content\',\''+ mdu + '\',\'' + id + '\')">恢复</a> ? / <a style="cursor: pointer;" class="link-color-blue" onclick="md_clear_data(\'content\',\''+ mdu + '\',\'' + id + '\')">不恢复</a>';
@ -169,7 +169,7 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback, initV
});
$("#" + _id + " [type=\"inline\"]").bind("click", function () {
_editorName.cm.replaceSelection("$$$$");
_editorName.cm.replaceSelection("`$$$$`");
var __Cursor = _editorName.cm.getDoc().getCursor();
_editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2);
_editorName.cm.focus();

@ -367,7 +367,7 @@ class InfosTopics extends Component{
float: left;
border-radius: 4px;
cursor: pointer;
margin-right: 10px;
margin-right: 15px !important;
display: block;
margin-bottom: 2px;
color: #666;
@ -397,14 +397,14 @@ class InfosTopics extends Component{
<Spin size="large" spinning={isSpin}>
<div className="clearfix topicsbox">
{types==="publicly"?<div className={"topcschild"}>
<a className={types==="personal"?"topicstopfont fr topcsactive":"topicstopfont fr"}
<a className={types==="personal"?"topicstopfont fr ":"topicstopfont fr topcsactive"}
href={`/users/${username}/topics/personal`}>我的题库</a>
<a className={types==="publicly"?"topicstopfont fl topcsactive":"topicstopfont fl"}
>公共题库</a>
<div className={types==="publicly"?"topicstopfont fl ":"topicstopfont fl topcsactive"}
>公共题库</div>
</div>:<div className={"topcschild"}>
<a className={types==="personal"?"topicstopfont fl topcsactive":"topicstopfont fl"}
>我的题库</a>
<a className={types==="publicly"?"topicstopfont fr topcsactive":"topicstopfont fr"}
<div className={types==="personal"?"topicstopfont fl ":"topicstopfont fl topcsactive"}
>我的题库</div>
<a className={types==="publicly"?"topicstopfont fr ":"topicstopfont fr topcsactive"}
href={`/topicbank/${username}/publicly`}
>公共题库</a>
</div>}
@ -421,7 +421,7 @@ class InfosTopics extends Component{
</div>
<div className={data===undefined?"":data.course_list===undefined||data.course_list.length===0?"shaiContent mb45":"shaiContent"}>
{data&&data.count===undefined?"":data&&data.count===0?"":<div className={data===undefined?"":data.course_list===undefined||data.course_list.length===0?"shaiContent mb45":"shaiContent"}>
<li className={course_list_id===undefined?"shaiItem shixun_repertoire active fl":"shaiItem shixun_repertoire fl"} onClick={()=>this.searchCourselistid(undefined)}>全部</li>
<div className="fl pr topicsItem mb20">
{data===undefined?"":data.course_list===undefined||data.course_list.length===0?"":data.course_list.map((item,key)=>{
@ -430,7 +430,7 @@ class InfosTopics extends Component{
)
})}
</div>
</div>
</div>}
</div>:<div className={"professional_certificationbox"}>
<p className="clearfix ">
@ -450,7 +450,7 @@ class InfosTopics extends Component{
</div>
{isshowprofes===false?<div className="clearfix font-12 mt20">
<p className="font-12 ml25 fl">
<p className="font-12 ml5 fl">
<span className="fl color-grey-9 mr20"> <span className={"color-orange"}>{data&&data.count===undefined?0:data&&data.count}</span> </span>
<span className="fr color-grey-9">已选择 <span className={"color-orange"}>{checkBoxValues.length}</span> ()</span>
</p>
@ -507,7 +507,7 @@ class InfosTopics extends Component{
{item.name}
</a>
{item.is_public===true?<span className="edu-filter-btn edu-filter-btn-4CACFF ml15 fl typestyle mt3">公开</span>:""}
{item.is_public===true?types==="publicly"?"":<span className="edu-filter-btn edu-filter-btn-4CACFF ml15 fl typestyle mt3">公开</span>:""}
@ -517,7 +517,7 @@ class InfosTopics extends Component{
<span className={"topicswidth600"}>
{types==="publicly"?<span className="topsics135 color-grey9 mr50">{item.creator_name}</span>:""}
<span className="mr50 color-grey9">{item.quotes_count} 次引用</span>
<span className="mr50 color-grey9">{item.solve_count} 次答题</span>
<span className="mr50 color-grey9">{item.solve_count} 次答题</span>
<span className="mr50 color-grey9">{moment(item.updated_at).fromNow()}</span>
</span>
{item.course_list_name===null?"":<span className={"topsicrelative topsicinline"} title={item.course_list_name}>

@ -105,7 +105,7 @@ class BanksIndex extends Component{
}
{
crumbData &&<p className="clearfix mt10 mb10 ">
crumbData &&<p className="clearfix mt20 mb30 ">
<span className="fl font-24 color-grey-3 task-hide lineh-30" style={{maxWidth:'800px'}}>{crumbData && crumbData.title}</span>
{ crumbData.is_public == true ?
<span className="bank_is_public">公开</span>

@ -237,6 +237,9 @@
line-height: 18px;
margin:10px 0px 0px;
}
.breadcrumb .ant-breadcrumb a:hover{
color: #459BE5 !important;
}
.breadcrumb .ant-breadcrumb-separator{
margin:0px 2px!important;
}
@ -255,6 +258,12 @@
border-radius:20px;
margin-top:3px;
}
.breadcrumb.ant-breadcrumb > span:last-child a{
color: #05101A
}
.breadcrumb.ant-breadcrumb a{
color:#999;
}
.bank_is_private{
background: #56B998;
float: left;
@ -281,7 +290,6 @@
font-family:PingFangSC;
font-weight:400;
color: #666 !important;
cursor: pointer;
}
.topcschild{
@ -299,6 +307,7 @@
.topcsactive{
color: #4CACFF !important;
cursor: pointer;
}
.topicsmidfont{
@ -401,7 +410,7 @@
}
.topicsItem{
max-width: 1073px;
max-width: 1068px;
max-height: 115px;
overflow-y: auto;
}

Loading…
Cancel
Save