Merge branches 'dev_aliyun' and 'dev_newysm' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_cxt

chromesetting
杨树明 5 years ago
commit bae2a17f96

@ -215,7 +215,8 @@ class ShixunsController < ApplicationController
if @shixun.shixun_info.present?
ShixunInfo.create!(shixun_id: @new_shixun.id,
description: @shixun.description,
evaluate_script: @shixun.evaluate_script)
evaluate_script: @shixun.evaluate_script,
shixun_reason: params[:reason].to_s.strip)
end
# 同步私密版本库

@ -64,7 +64,7 @@ module ApplicationHelper
shixun_id = shixun_id.blank? ? -1 : shixun_id.join(",")
Shixun.select([:id, :name, :user_id, :challenges_count, :myshixuns_count, :trainee, :identifier]).where("id
in(#{shixun_id})").unhidden.order("homepage_show asc, myshixuns_count desc").limit(3)
in(#{shixun_id})").unhidden.publiced.order("homepage_show asc, myshixuns_count desc").limit(3)
end

@ -103,6 +103,19 @@ class Shixun < ApplicationRecord
shixun_info.try(:evaluate_script)
end
def fork_reason
case shixun_info.try(:fork_reason)
when 'Shixun'
'实训内容升级'
when 'Course'
'课堂教学使用'
when 'Subject'
'实践课程使用'
else
shixun_info.try(:fork_reason)
end
end
def fork_identifier
self.fork_from.nil? ? "--" : fork_shixuns.first&.identifier
end

@ -33,6 +33,16 @@ class Admins::ShixunQuery < ApplicationQuery
all_shixuns = all_shixuns.where(status: status) if status.present?
all_shixuns = all_shixuns.where(public: public) if public.present?
if params[:fork_status].present?
all_shixuns = all_shixuns.where.not(fork_from: nil)
case params[:fork_status]
when 'Shixun', 'Course', 'Subject'
all_shixuns = all_shixuns.joins(:shixun_info).where(shixun_infos: {fork_reason: params[:fork_status]})
when 'Other'
all_shixuns = all_shixuns.joins(:shixun_info).where("fork_reason is null or fork_reason not in ('Shixun', 'Course', 'Subject')")
end
end
if params[:tag].present?
all_shixuns = all_shixuns.joins(:mirror_repositories).where("mirror_repositories.id = ?",params[:tag].to_i)
end

@ -49,12 +49,16 @@ class ShixunSearchService < ApplicationService
includes: [ :shixun_info, :challenges, :subjects, user: { user_extension: :school } ]
}
model_options.merge!(where: { id: @shixuns.pluck(:id) })
model_options.merge!(order: {"myshixuns_count" => sort_str})
model_options.merge!(order: {sort_str => order_str})
model_options.merge!(default_options)
model_options
end
def sort_str
def order_str
params[:order] || "desc"
end
def sort_str
params[:sort] || "myshixuns_count"
end
end

@ -65,13 +65,18 @@ class Users::ShixunService
end
def manage_shixun_status_filter(relations)
status = case params[:status]
when 'editing' then 0
when 'applying' then 1
when 'published' then 2
when 'closed' then 3
end
relations = relations.where(status: status) if status
if params[:status] == "publiced"
relations = relations.where(public: 2)
elsif params[:status] == "applying"
relations = relations.where(public: 1)
else
status = case params[:status]
when 'editing' then 0
when 'published' then 2
when 'closed' then 3
end
relations = relations.where(status: status) if status
end
relations
end

@ -4,33 +4,48 @@
<div class="box search-form-container shixuns-list-form">
<%= form_tag(admins_shixuns_path, method: :get, class: 'form-inline search-form',id:"shixuns-search-form",remote:true) do %>
<div class="form-group">
<label for="status">状态:</label>
<% status_options = [['全部', ''], ["编辑中(#{@editing_shixuns})", "editing"], ["待审核(#{@pending_shixuns})", 'pending'], ["已发布(#{@processed_shixuns})", 'processed'],["已关闭(#{@closed_shixuns})",'closed']] %>
<%= select_tag(:status, options_for_select(status_options), class: 'form-control') %>
</div>
<div class="d-flex flex-column w-100">
<div class="d-flex position-r">
<div class="form-group">
<label for="status">状态:</label>
<% status_options = [['全部', ''], ["编辑中(#{@editing_shixuns})", "editing"], ["待审核(#{@pending_shixuns})", 'pending'], ["已发布(#{@processed_shixuns})", 'processed'],["已关闭(#{@closed_shixuns})",'closed']] %>
<%= select_tag(:status, options_for_select(status_options), class: 'form-control') %>
</div>
<div class="form-group">
<label for="status">公开:</label>
<% public_options = [['全部', ''], ["未公开(#{@none_public_shixuns})", "editing"], ["待审核(#{@pending_public_shixuns})", 'pending'], ["已公开(#{@processed_pubic_shixuns})", 'processed']] %>
<%= select_tag(:public, options_for_select(public_options), class: 'form-control') %>
</div>
<div class="form-group mr-2">
<label for="status">公开:</label>
<% public_options = [['全部', ''], ["未公开(#{@none_public_shixuns})", "editing"], ["待审核(#{@pending_public_shixuns})", 'pending'], ["已公开(#{@processed_pubic_shixuns})", 'processed']] %>
<%= select_tag(:public, options_for_select(public_options), class: 'form-control') %>
</div>
<div class="form-group mr-2">
<label for="tag-choosed">技术平台:</label>
<%= select_tag(:tag, options_for_select(@shixuns_type_check.unshift(["",nil])), class: 'form-control',id:"tag-choosed") %>
</div>
<div class="form-group mr-2">
<label for="tag-choosed">技术平台:</label>
<%= select_tag(:tag, options_for_select(@shixuns_type_check.unshift(["",nil])), class: 'form-control',id:"tag-choosed") %>
</div>
<div class="form-group mr-2">
<label>搜索类型:</label>
<% auto_trial_options = [['创建者姓名', 0], ['实训名称', 1], ['学校名称', 2]] %>
<%= select_tag(:search_type, options_for_select(auto_trial_options), class: 'form-control') %>
</div>
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '输入关键字搜索') %>
<div class="">
<a href="javascript:void(0)" class="btn btn-primary" id="shixuns-export" data-disable-with = '导出中...'>导出</a>
</div>
</div>
<div class="d-flex mt-3">
<div class="form-group">
<label for="status">fork原因</label>
<% fork_status_options = [['全部', ''], ["全部fork实训", "Fork"], ["实训内容升级", 'Shixun'], ["课堂教学使用", 'Course'],["实践课程使用",'Subject'],["其他原因",'Other']] %>
<%= select_tag(:fork_status, options_for_select(fork_status_options), class: 'form-control') %>
</div>
<div class="form-group">
<label>搜索类型:</label>
<% auto_trial_options = [['创建者姓名', 0], ['实训名称', 1], ['学校名称', 2]] %>
<%= select_tag(:search_type, options_for_select(auto_trial_options), class: 'form-control') %>
<%= submit_tag('搜索', class: 'btn btn-primary ml-3','data-disable-with': '搜索中...') %>
<%= link_to "清除", admins_shixuns_path,class: "btn btn-default",id:"shixuns-clear-search",'data-disable-with': '清除中...' %>
</div>
</div>
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2', placeholder: '输入关键字搜索') %>
<%= submit_tag('搜索', class: 'btn btn-primary','data-disable-with': '搜索中...') %>
<%= link_to "清除", admins_shixuns_path,class: "btn btn-default",id:"shixuns-clear-search",'data-disable-with': '清除中...' %>
<% end %>
<a href="javascript:void(0)" class="btn btn-primary" id="shixuns-export" data-disable-with = '导出中...'>导出</a>
</div>
<div class="box admin-list-container shixuns-list-container">

@ -2,17 +2,18 @@
<thead class="thead-light">
<th width="4%">序号</th>
<th width="8%">ID</th>
<th width="24%" class="text-left">实训名称</th>
<th width="22%" class="text-left">实训名称</th>
<th width="8%">技术平台</th>
<th width="5%">Fork源</th>
<th width="10%">Fork原因</th>
<th width="5%">实践</th>
<th width="5%">选择</th>
<th width="4%">选择</th>
<th width="6%">状态</th>
<th width="6%">公开</th>
<th width="7%">创建者</th>
<th width="11%"><%= sort_tag('创建于', name: 'created_at', path: admins_shixuns_path) %></th>
<th width="5%">单测</th>
<th width="6%">操作</th>
<th width="6%">创建者</th>
<th width="8%"><%= sort_tag('创建于', name: 'created_at', path: admins_shixuns_path) %></th>
<th width="4%">单测</th>
<th width="4%">操作</th>
</thead>
<tbody>
<% if shixuns.present? %>
@ -31,6 +32,7 @@
<%= link_to shixun.try(:identifier), shixun_path(shixun.try(:identifier)), target: '_blank'%>
<% end%>
</td>
<td><%= overflow_hidden_span(shixun&.fork_reason) %></td>
<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>

@ -0,0 +1,5 @@
class AddForkReasonToShixunInfo < ActiveRecord::Migration[5.2]
def change
add_column :shixun_infos, :fork_reason, :string
end
end

@ -102,11 +102,26 @@ class CoursesHome extends Component{
})
}
getUser=(url,type)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
if(url !== undefined || url!==""){
this.props.history.push(url);
}
}
render() {
let { order,search,page,coursesHomelist }=this.state;
//console.log(this.props)
return (
<div>
{this.state.updata===undefined?"":<UpgradeModals
@ -144,6 +159,7 @@ class CoursesHome extends Component{
onClick={ () => this.changeStatus("created_at")}>最新</a>
<a className={ order == "visits" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}
onClick={ () => this.changeStatus("visits")}>最热</a>
{this.props.user&&this.props.user.user_identity==="学生"?"":<span className={ "fr font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/courses/new")}>+新建翻转课堂</span>}
{/*<div className="fr mr5 search-new">*/}
{/*/!* <Search*/}

@ -25,8 +25,15 @@ class NewShixunModel extends Component{
}
componentDidMount() {
let{page,type,keyword,order,diff,limit,status,sort}=this.state;
let newsort=sort
if(this.props&&this.props.user.course_name===undefined){
newsort="created_at";
}else{
newsort="publish_time";
}
if(this.props.type==='shixuns'){
this.getdatalist(page,type,status,keyword,order,diff,limit)
this.getdatalist(page,type,status,keyword,order,diff,limit,undefined,newsort);
}else{
this.getdatalist(page,type,undefined,keyword,order,undefined,limit,undefined,sort);
}
@ -34,6 +41,7 @@ class NewShixunModel extends Component{
}
getdatalist=(page,type,newstatus,keyword,order,diff,limit,pagetype,sort)=>{
this.setState({
isspinning:true
})
@ -368,6 +376,7 @@ class NewShixunModel extends Component{
// let {visible,patheditarry}=this.props;
// console.log(Grouplist)
// console.log(allGrouplist)
const statusmenus=(
<Menu className="menus">
<Menu.Item>
@ -425,7 +434,6 @@ class NewShixunModel extends Component{
);
console.log(shixun_list)
return(
<div>

@ -681,6 +681,7 @@ class Exercisesetting extends Component{
<div className="clearfix">
<span className="mr15 fl mt10 font-16">截止时间</span>
<div className="fl">
<Tooltip placement="bottom" title={end_timetype===true ? this.props.isAdmin()?"":"截止时间已过,不能再修改":""}>
<DatePicker
dropdownClassName="hideDisable"
placeholder="请选择截止时间"
@ -694,9 +695,10 @@ class Exercisesetting extends Component{
disabledDate={disabledDate}
onChange={this.onChangeTimeEnd}
value={end_time && moment(end_time,"YYYY-MM-DD HH:mm")}
disabled={ end_timetype===true?true:!flagPageEdit}
disabled={ end_timetype===true?this.props.isAdmin()?false:true:!flagPageEdit}
>
</DatePicker>
</Tooltip>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{
unit_e_tip && unit_e_tip != "" ? <span className="fl">{ unit_e_tip }</span>:""

@ -584,7 +584,7 @@ class PollDetailTabForth extends Component{
<div className="clearfix">
<span className="mr15 fl mt10 font-16">截止时间</span>
<div className="fl">
<Tooltip placement="bottom" title={un_change_end ? this.props.isAdmin()?"截止时间已过,不能再修改":"":""}>
<Tooltip placement="bottom" title={un_change_end ? this.props.isAdmin()?"":"截止时间已过,不能再修改":""}>
<span>
<DatePicker
showToday={false}
@ -599,7 +599,7 @@ class PollDetailTabForth extends Component{
disabledTime={disabledDateTime}
onChange={this.onChangeTimeEnd}
value={ end_time && moment(end_time,dataformat) }
disabled={un_change_end == true ? true : !flagPageEdit }
disabled={un_change_end == true ?this.props.isAdmin()?false:true : !flagPageEdit }
>
</DatePicker>
</span>

@ -93,14 +93,14 @@ class Addshixuns extends Component {
</style>:""}
<div className="task-popup-content">
{/*<Form {...formItemLayout}>*/}
{/* <Form.Item label="实训类型">*/}
{/* <Radio.Group value={this.state.is_jupyter} onChange={this.GrouponChange}>*/}
{/* <Radio value="1">普通实训</Radio>*/}
{/* <Radio value="2">jupyter实训</Radio>*/}
{/* </Radio.Group>*/}
{/* </Form.Item>*/}
{/*</Form>*/}
<Form {...formItemLayout}>
<Form.Item label="实训类型">
<Radio.Group value={this.state.is_jupyter} onChange={this.GrouponChange}>
<Radio value="1">普通实训</Radio>
<Radio value="2">jupyter实训</Radio>
</Radio.Group>
</Form.Item>
</Form>
<p className="task-popup-text-center font-16">
<span style={{ "line-height":"30px"}}>实训名称</span>
<span><Input style={{ width:"80%"}} className="yslzxueshisy " placeholder="请输入60字以内的实训名称" onChange={this.handleChange} addonAfter={String(this.state.shixunname===undefined?0:this.state.shixunname.length)+"/60"} maxLength={60} />

@ -574,6 +574,7 @@ class DetailCards extends Component{
</div>
}
<DetailCardsEditAndEdit
{...this.props}
idsum={idsum}
keys={key}
pathCardsedittype={pathCardsedittype}

@ -77,10 +77,6 @@ class DetailTop extends Component{
}
}
})
console.log(courseslist)
}
if(courseslist.length!=0){
this.props.getMenuItemsindex(keys,courseslist[0].course_status.status)

@ -124,10 +124,39 @@ class ShixunPathSearch extends Component{
this.props.history.push(url)
}
//头部获取是否已经登录了
getUser=(url,type)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
if(url !== undefined || url!==""){
this.props.history.push(url);
}
}
render() {
let { order,sortList,search,page,total_count,select }=this.state;
let pathstype=false;
if(this.props&&this.props.mygetHelmetapi!=null){
let paths="/paths";
this.props.mygetHelmetapi.navbar.map((item,key)=>{
var reg = RegExp(item.link);
if(paths.match(reg)){
if(item.hidden===true){
pathstype=true
}
}
// console.log()
})
}
// console.log(this.props)
return (
<div>
{this.state.updata===undefined?"":<UpgradeModals
@ -169,6 +198,10 @@ class ShixunPathSearch extends Component{
{/*<a href="javascript:void(0)" className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("mine")}>我的</a>*/}
<span className={ order == "updated_at" ? "active" : ""} onClick={ () => this.changeStatus("updated_at")}>最新</span>
<span className={ order == "myshixun_count" ? "active" : ""} onClick={ () => this.changeStatus("myshixun_count")}>最热</span>
{this.props.user&&this.props.user.main_site===false?"":this.props.Headertop===undefined?"":<a className={ "fr font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/paths/new")}>+新建实践课程</a>}
{this.props.user&&this.props.user.main_site===true?"":this.props.Headertop===undefined?"":
pathstype===true?"":this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.is_teacher===true||this.props.user&&this.props.user.business===true?<a className={ "fr font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/paths/new")}>+新建实践课程</a>:""
}
{/*<div className="fr mr5 search-new">*/}
{/*/!* <Search*/}
{/*placeholder="请输入路径名称进行搜索"*/}

@ -15,6 +15,7 @@ import axios from 'axios'
import Modals from '../modals/Modals';
import './shixuns/css/TPMBanner.css';
import types from "../../redux/actions/actionTypes";
let $ = window.$;
@ -22,6 +23,8 @@ const Search = Input.Search;
const RadioGroup = Radio.Group;
const { TextArea } = Input;
class TPMBanner extends Component {
constructor(props) {
super(props)
@ -54,7 +57,9 @@ class TPMBanner extends Component {
Senttothevcaluetype: false,
jupyterbool: false,
openknow:false,
openshowpublictype:false
openshowpublictype:false,
Radiovalue:1,
TextAreaintshow:false
}
}
@ -197,13 +202,46 @@ class TPMBanner extends Component {
})
}
changeTextArea=(e)=>{
this.setState({
TextArea:e.target.value
})
}
addForkvisible = () => {
let reason;
switch (this.state.Radiovalue) {
case 1:
reason="Shixun";
break;
case 2:
reason="Course";
break;
case 3:
reason="Subject";
break;
case 4:
reason=this.state.TextArea;
}
if(this.state.Radiovalue===4){
if(this.state.TextArea===null||this.state.TextArea===undefined||this.state.TextArea=== ""){
this.setState({
TextAreaintshow:true
})
return
}
}
this.setState({
Forkvisibletype: true,
Forkvisibletype:true,
})
let id = this.props.match.params.shixunId;
let url = "/shixuns/" + id + "/copy.json";
axios.post(url).then((response) => {
axios.post(url, {
reason:reason,
}).then((response) => {
if (response.data.status === 401) {
} else {
@ -694,17 +732,9 @@ class TPMBanner extends Component {
}
showonMouseOver = () => {
$("#ratePanel").show();
this.setState({
showradios: true
})
}
hideonMouseOut = () => {
$("#ratePanel").hide();
onChangeRadiovalue=(e)=>{
this.setState({
showradios: false
Radiovalue:e.target.value
})
}
@ -1128,7 +1158,7 @@ class TPMBanner extends Component {
}
{
<a onClick={this.Senttothe}
this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter===true?"":<a onClick={this.Senttothe}
className="fr kaike kkbths mr20 font-18"
data-tip-down=""
style={{display: shixunsDetails.shixun_status === 0 || shixunsDetails.shixun_status === 3 || shixunsDetails.shixun_status === 1 || shixunsDetails.shixun_status === -1 ? "none" : "block"}}
@ -1233,9 +1263,34 @@ class TPMBanner extends Component {
</span>
</Tooltip>
{Forkvisible===true?<style>
{
`
.ant-modal-body{
padding: 10px;
}
`
}
</style>:""}
{
this.state.TextAreaintshow===true?<style>
{
`
.ant-input:hover {
border: 1px solid red !important;
}
.ant-input:focus {
border: 1px solid red !important;
}
`
}
</style>:""
}
<Modal
keyboard={false}
title="提示"
title="Fork原因"
visible={Forkvisible}
closable={false}
footer={null}
@ -1247,8 +1302,25 @@ class TPMBanner extends Component {
>
</Spin> :
<div>
<div className="task-popup-content"><p
className="task-popup-text-center font-16 pb20">复制将在后台执行平台将为你创建<br/>一个新的同名实训和内容请问是否继续</p>
<div className="task-popup-content">
<div className={"forkfactors"}>请根据实际情况填写fork本实训的原因</div>
<Radio.Group onChange={this.onChangeRadiovalue} value={this.state.Radiovalue} className={"ml20 mt20 mb20"} style={{ width: "100%" }}>
<Radio style={radioStyle} value={1}>
实训内容升级
</Radio>
<Radio style={radioStyle} value={2}>
课堂教学使用
</Radio>
<Radio style={radioStyle} value={3}>
实践课程使用
</Radio>
<Radio style={radioStyle} value={4}>
其它原因
</Radio>
{this.state.Radiovalue === 4 ?
<TextArea className={this.state.TextAreaintshow===true?"bor-red mt10":"mt10"} rows={4} style={{ width: '85%', marginLeft: '30px' }} onInput={this.changeTextArea}/>: null}
{this.state.TextAreaintshow===true?<div className={"color-red ml30"}>不能为空</div>:""}
</Radio.Group>
</div>
<div className="task-popup-submit clearfix">
<a onClick={this.hideForkvisible} className="task-btn fl">取消</a>

@ -159,4 +159,10 @@ a:active{text-decoration:none;}
.forkNumst{display: block;float: left;width: 36px;text-align: center;border-left: 1px solid #ffffff !important;color: #ffffff!important; }
.mlbanner36{
margin-left: 36px;
}
.forkfactors{
text-align: center;
color: #999999;
}

@ -214,12 +214,12 @@ class InfosShixun extends Component{
</style>
<div className="white-panel edu-back-white pt20 pb20 clearfix ">
<li className={category ? " font-16 whitepanelyslli" : "active font-16 whitepanelyslli"}><a
href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li>
onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li>
<li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("manage")}
onClick={() => this.changeCategory("manage")}
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}管理的</a></li>
<li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("study")}
onClick={() => this.changeCategory("study")}
className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}学习的</a></li>
</div>
<style>
@ -242,29 +242,30 @@ class InfosShixun extends Component{
{
category && category == "manage" && is_current &&
<div className="edu-back-white padding10-30 clearfix secondNavs bor-top-greyE">
<li className={status ? "whitepanelyslliss" : "active whitepanelyslliss"}><a href="javascript:void(0)"
onClick={() => this.changeStatus()}
className="w32">全部</a></li>
<li className={status ? "whitepanelyslliss" : "active whitepanelyslliss"}>
<a onClick={() => this.changeStatus()} className="w32">全部</a></li>
<li className={status == "editing" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
href="javascript:void(0)" onClick={() => this.changeStatus("editing")} className="w60">编辑中</a></li>
<li className={status == "applying" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
href="javascript:void(0)" onClick={() => this.changeStatus("applying")} className="w60">待审核</a></li>
onClick={() => this.changeStatus("editing")} className="w60">编辑中</a></li>
<li className={status == "published" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
href="javascript:void(0)" onClick={() => this.changeStatus("published")} className="w60">已发布</a></li>
onClick={() => this.changeStatus("published")} className="w60">已发布</a></li>
<li className={status == "applying" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
onClick={() => this.changeStatus("applying")} className="w60">待审核</a></li>
<li className={status == "publiced" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
onClick={() => this.changeStatus("publiced")} className="w60">已公开</a></li>
<li className={status == "closed" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
href="javascript:void(0)" onClick={() => this.changeStatus("closed")} className="w60">已关闭</a></li>
onClick={() => this.changeStatus("closed")} className="w60">已关闭</a></li>
</div>
}
{
category && category == "study" && is_current &&
<div className="edu-back-white padding10-30 clearfix secondNavs bor-top-greyE">
<li className={status ? "whitepanelyslliss" : "active whitepanelyslliss"}><a href="javascript:void(0)"
<li className={status ? "whitepanelyslliss" : "active whitepanelyslliss"}><a
onClick={() => this.changeStatus()}
className="w32">全部</a></li>
<li className={status == "processing" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
href="javascript:void(0)" onClick={() => this.changeStatus("processing")} className="w60">未通关</a></li>
onClick={() => this.changeStatus("processing")} className="w60">未通关</a></li>
<li className={status == "passed" ? "active whitepanelysllisyt" : "whitepanelysllisyt"}><a
href="javascript:void(0)" onClick={() => this.changeStatus("passed")} className="w60">已通关</a></li>
onClick={() => this.changeStatus("passed")} className="w60">已通关</a></li>
</div>
}
<div className=" clearfix font-12 " style={{
@ -387,12 +388,12 @@ class InfosShixun extends Component{
:""}
<a href="javascript:void(0)" className="square-img">
<a className="square-img">
<img src={setImagesUrl(`${item.image_url}`)}/>
</a>
<div className="square-main">
<p className="task-hide">
<a href="javascript:void(0)" className="justify color-grey-name">{item.name}</a>
<a className="justify color-grey-name">{item.name}</a>
</p>
<div className="user-bar mt10">
<p style={{'width': `${parseFloat(parseInt(item.finished_challenges_count)/parseInt(item.challenges_count)).toFixed(2)*100}%`}}></p>

Loading…
Cancel
Save