Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_cxt2
杨树林 5 years ago
commit 1f2fa1445f

@ -115,7 +115,7 @@ $(document).on('turbolinks:load', function(){
minimumInputLength: 1,
ajax: {
delay: 500,
url: '/api/schools/for_option.json',
url: '/api/schools/search.json',
dataType: 'json',
data: function(params){
return { keyword: params.term };

@ -0,0 +1,90 @@
$(document).on('turbolinks:load', function() {
var $modal = $('.modal.admin-select-school-modal');
if ($modal.length > 0) {
var $link = null;
var $form = $modal.find('form.admin-select-school-form');
var multiple = $form.data('multiple');
$form.find('.school-select').select2({
theme: 'bootstrap4',
placeholder: '请选择',
multiple: multiple,
minimumInputLength: 1,
ajax: {
delay: 500,
url: '/api/schools/search.json',
dataType: 'json',
data: function (params) {
return {keyword: params.term};
},
processResults: function (data) {
return {results: data.schools}
}
},
templateResult: function (item) {
if (!item.id || item.id === '') return item.text;
var html = "<span>" + item.name + "<span class='ml-4 font-12'>";
if(item.province){ html += item.province }
html += "</span></span>";
return $(html);
},
templateSelection: function (item) {
if (item.id) {
}
return item.name || item.text;
}
});
$form.validate({
errorElement: 'span',
errorClass: 'danger text-danger',
rules: {
school_ids: {
required: true
}
},
messages: {
school_ids: {
required: '请选择'
}
}
});
$modal.on('show.bs.modal', function(event){
$link = $(event.relatedTarget);
});
$modal.on('hide.bs.modal', function(){
$form.find('.error').html('');
$form.find('.school-select').select2('val', ' ');
});
$modal.on('click', '.submit-btn', function(){
$form.find('.error').html('');
if($form.valid()){
var url = $form.data('url');
var schoolIds = $form.find('#school_ids').val();
$.ajax({
method: 'POST',
dataType: 'json',
url: url,
data: { school_ids: schoolIds },
success: function(){
$.notify({ message: '操作成功' });
$modal.modal('hide');
setTimeout(function(){
window.location.reload();
}, 500);
},
error: function(res){
var data = res.responseJSON;
$form.find('.error').html(data.message);
}
});
}
});
}
});

@ -9,7 +9,7 @@ $(document).on('turbolinks:load', function () {
minimumInputLength: 1,
ajax: {
delay: 500,
url: '/api/schools/for_option.json',
url: '/api/schools/search.json',
dataType: 'json',
data: function (params) {
return {keyword: params.term};

@ -0,0 +1,38 @@
class Admins::CustomersController < Admins::BaseController
helper_method :current_partner
def index
default_sort('created_at', 'desc')
customers = Admins::CustomerQuery.call(params.merge(partner_id: current_partner.id))
@customers = paginate(customers.preload(:school))
end
def create
params[:school_ids] = Array.wrap(params[:school_ids])
school_ids = School.where(id: params[:school_ids]).pluck(:id)
ActiveRecord::Base.transaction do
school_ids.each do |school_id|
next if current_partner.customers.exists?(school_id)
customer = Customer.create!(school_id: school_id)
current_partner.partner_customers.create!(customer: customer)
end
end
render_ok
end
def destroy
current_partner.customers.find(params[:id]).destroy!
render_delete_success
end
private
def current_partner
@_current_partner ||= Partner.find(params[:partner_id])
end
end

@ -0,0 +1,29 @@
class Admins::PartnersController < Admins::BaseController
def index
default_sort('created_at', 'desc')
partners = Admins::PartnerQuery.call(params)
@partners = paginate(partners.preload(:school))
end
def create
params[:school_ids] = Array.wrap(params[:school_ids])
school_ids = School.where(id: params[:school_ids]).pluck(:id)
exist_school_ids = Partner.where(school_id: school_ids).pluck(:school_id)
Partner.bulk_insert(*%i[school_id created_at updated_at]) do |worker|
(school_ids - exist_school_ids).each do |school_id|
worker.add(school_id: school_id)
end
end
render_ok
end
def destroy
Partner.find(params[:id]).destroy!
render_delete_success
end
end

@ -886,7 +886,7 @@ class ExercisesController < ApplicationController
ex_user_ids = exercise_users.pluck(:id)
EndExerciseCalculateJob.perform_later(ex_user_ids,exercise,Time.now)
EndExerciseCalculateJob.perform_later(ex_user_ids,exercise,Time.now.to_s)
# exercise_users.each do |user|
# if user.commit_status == 0 && user.start_at.present?
# objective_score = calculate_student_score(exercise,user.user)[:total_score]
@ -1068,7 +1068,7 @@ class ExercisesController < ApplicationController
rescue Exception => e
uid_logger_error(e.message)
tip_exception("页面调用失败!")
tip_exception(e.message)
raise ActiveRecord::Rollback
end
end
@ -1123,7 +1123,7 @@ class ExercisesController < ApplicationController
# 学生提交试卷
def commit_exercise
tip_exception(-1, "试卷已提交") if @answer_committed_user.commit_status == 1
tip_exception(0, "试卷截止时间已到,系统已自动提交") if @answer_committed_user.commit_status == 1
ActiveRecord::Base.transaction do
begin
can_commit_exercise = false

@ -17,4 +17,13 @@ class SchoolsController < ApplicationController
render_ok(schools: schools.select(:id, :name).as_json)
end
def search
schools = School.all
keyword = params[:keyword].to_s.strip
schools = schools.where('name LIKE ?', "%#{keyword}%") if keyword
schools = paginate(schools)
render_ok(schools: schools.as_json(only: %i[id name province]))
end
end

@ -905,16 +905,16 @@ module ExercisesHelper
exercise_user_start = exercise_user&.start_at.present? ? exercise_user.start_at.to_i : 0
#用户未开始答题时即exercise_user_start为0
if exercise_user_start == 0
if (exercise_end_time - time_now_i) > time_mill
if (exercise_end_time.to_i - time_now_i) > time_mill
user_left_time = time_mill
else
user_left_time = (exercise_end_time < time_now_i) ? nil : (exercise_end_time - time_now_i)
user_left_time = (exercise_end_time.to_i < time_now_i) ? nil : (exercise_end_time.to_i - time_now_i)
end
else
if (exercise_user_start + time_mill) > exercise_end_time
time_mill = exercise_end_time - exercise_user_start #如果开始答题时间加试卷的限时长大于试卷的截止时间,则以试卷的截止时间到开始答题时间为试卷的限时
if (exercise_user_start + time_mill) > exercise_end_time.to_i
time_mill = exercise_end_time.to_i - exercise_user_start.to_i #如果开始答题时间加试卷的限时长大于试卷的截止时间,则以试卷的截止时间到开始答题时间为试卷的限时
end
exercise_user_left_time = time_now_i - exercise_user_start #用户已回答的时间
exercise_user_left_time = time_now_i - exercise_user_start.to_i #用户已回答的时间
user_left_time = (time_mill < exercise_user_left_time) ? nil : (time_mill - exercise_user_left_time) #当前用户对试卷的回答剩余时间
end
end

@ -9,7 +9,7 @@ class EndExerciseCalculateJob < ApplicationJob
exercise_users = ExerciseUser.where(id: ex_user_ids)
exercise_users.each do |user|
if user.commit_status == 0 && user.start_at.present?
objective_score = calculate_student_score(exercise,user.user,end_time)[:total_score]
objective_score = calculate_student_score(exercise,user.user,end_time.to_time)[:total_score]
user_sub_score = user.subjective_score
subjective_score = user_sub_score < 0.0 ? 0.0 : user_sub_score
total_score = objective_score + subjective_score

@ -156,9 +156,9 @@ class Exercise < ApplicationRecord
if unified_setting || teacher #当试卷为统一设置或当前为老师的时候
pb_time = publish_time
en_time = end_time
if (exercise_status != 3) && en_time.present? && (en_time <= Time.now)
update_column("exercise_status",3)
end
# if (exercise_status != 3) && en_time.present? && (en_time <= Time.now)
# update_column("exercise_status",3)
# end
else
# ex_group_setting = exercise_group_settings
user_group = course.students.where(user_id:user_id).select(:course_group_id)

@ -2,4 +2,6 @@ class Partner < ApplicationRecord
belongs_to :school, optional: true
has_many :users
has_many :partner_customers, dependent: :destroy
has_many :customers, through: :partner_customers
end

@ -0,0 +1,24 @@
class Admins::CustomerQuery < ApplicationQuery
include CustomSortable
attr_reader :params
sort_columns :created_at, default_by: :created_at, default_direction: :desc, default_table: 'customers'
def initialize(params)
@params = params
end
def call
customers = Customer.all
if params[:partner_id].present?
customers = customers.joins(:partner_customers).where(partner_customers: { partner_id: params[:partner_id] })
end
keyword = params[:keyword].to_s.strip
customers = customers.joins(:school).where('schools.name LIKE ?', "%#{keyword}%") if keyword.present?
custom_sort(customers, params[:sort_by], params[:sort_direction])
end
end

@ -0,0 +1,20 @@
class Admins::PartnerQuery < ApplicationQuery
include CustomSortable
attr_reader :params
sort_columns :created_at, default_by: :created_at, default_direction: :desc
def initialize(params)
@params = params
end
def call
partners = Partner.all
keyword = params[:keyword].to_s.strip
partners = partners.joins(:school).where('schools.name LIKE ?', "%#{keyword}%") if keyword.present?
custom_sort(partners, params[:sort_by], params[:sort_direction])
end
end

@ -17,7 +17,7 @@ class CreateBindUserService < ApplicationService
bind_user = User.try_to_login(params[:username], params[:password])
raise Error, '用户名或者密码错误' if bind_user.blank?
raise Error, '该账号已被其他微信号绑定,请更换其他账号进行绑定' if bind_user.bind_open_user?(params[:type].to_s)
raise Error, '该账号已被绑定,请更换其他账号进行绑定' if bind_user.bind_open_user?(params[:type].to_s)
ActiveRecord::Base.transaction do
open_user.user_id = bind_user.id

@ -49,7 +49,7 @@ class ExercisePublishTask
exercises = Exercise.includes(:exercise_questions).where("exercise_status = 2 AND end_time <= ?",Time.now + 900)
exercises.each do |exercise|
Rails.logger.info("end_exercise_id: #{exercise.id}")
exercise.update_attributes!('exercise_status', 3)
exercise.update_attributes!(exercise_status: 3)
if exercise.unified_setting
ex_type = exercise.exercise_questions.pluck(:question_type).uniq
exercise.exercise_users.where("commit_status = 0 and start_at is not null").each do |exercise_user|

@ -0,0 +1,19 @@
<% define_admin_breadcrumbs do %>
<% add_admin_breadcrumb('合作伙伴', admins_partners_path) %>
<% add_admin_breadcrumb(current_partner.school&.name || current_partner.name) %>
<% end %>
<div class="box search-form-container customer-list-form">
<%= form_tag(admins_partner_customers_path(current_partner), method: :get, class: 'form-inline search-form', remote: true) do %>
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-md-4 ml-3', placeholder: '客户名称检索') %>
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
<% end %>
<%= javascript_void_link('添加', class: 'btn btn-primary', data: { toggle: 'modal', target: '.admin-select-school-modal' }) %>
</div>
<div class="box customer-list-container">
<%= render 'admins/customers/shared/list', customers: @customers %>
</div>
<%= render partial: 'admins/shared/modal/select_school_modal', locals: { title: '添加客户', multiple: true, url: admins_partner_customers_path(current_partner) } %>

@ -0,0 +1 @@
$('.customer-list-container').html("<%= j(render partial: 'admins/customers/shared/list', locals: { customers: @customers }) %>");

@ -0,0 +1,26 @@
<table class="table table-hover text-center customer-list-table">
<thead class="thead-light">
<tr>
<th width="50%" class="text-left">客户名称</th>
<th width="30%"><%= sort_tag('添加时间', name: 'created_at', path: admins_partner_customers_path(current_partner)) %></th>
<th width="20%">操作</th>
</tr>
</thead>
<tbody>
<% if customers.present? %>
<% customers.each do |customer| %>
<tr class="customer-item-<%= customer.id %>">
<td class="text-left"><%= customer.school&.name %></td>
<td><%= customer.created_at&.strftime('%Y-%m-%d %H:%M') %></td>
<td>
<%= delete_link '删除', admins_partner_customer_path(current_partner, customer, element: ".customer-item-#{customer.id}"), class: 'delete-customer-action' %>
</td>
</tr>
<% end %>
<% else %>
<%= render 'admins/shared/no_data_for_table' %>
<% end %>
</tbody>
</table>
<%= render partial: 'admins/shared/paginate', locals: { objects: customers } %>

@ -0,0 +1,18 @@
<% define_admin_breadcrumbs do %>
<% add_admin_breadcrumb('合作伙伴') %>
<% end %>
<div class="box search-form-container partner-list-form">
<%= form_tag(admins_partners_path, method: :get, class: 'form-inline search-form', remote: true) do %>
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-md-4 ml-3', placeholder: '合作伙伴名称检索') %>
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
<% end %>
<%= javascript_void_link('添加', class: 'btn btn-primary', data: { toggle: 'modal', target: '.admin-select-school-modal' }) %>
</div>
<div class="box partner-list-container">
<%= render 'admins/partners/shared/list', partners: @partners %>
</div>
<%= render partial: 'admins/shared/modal/select_school_modal', locals: { title: '添加客户', multiple: true, url: admins_partners_path } %>

@ -0,0 +1 @@
$('.partner-list-container').html("<%= j(render partial: 'admins/partners/shared/list', locals: { partners: @partners }) %>");

@ -0,0 +1,27 @@
<table class="table table-hover text-center partner-list-table">
<thead class="thead-light">
<tr>
<th width="50%" class="text-left">名称</th>
<th width="30%"><%= sort_tag('添加时间', name: 'created_at', path: admins_partners_path) %></th>
<th width="20%">操作</th>
</tr>
</thead>
<tbody>
<% if partners.present? %>
<% partners.each do |partner| %>
<tr class="partner-item-<%= partner.id %>">
<td class="text-left"><%= partner.school&.name || partner.name %></td>
<td><%= partner.created_at&.strftime('%Y-%m-%d %H:%M') %></td>
<td>
<%= link_to '查看', admins_partner_customers_path(partner), class: 'action' %>
<%= delete_link '删除', admins_partner_path(partner, element: ".partner-item-#{partner.id}"), class: 'delete-partner-action' %>
</td>
</tr>
<% end %>
<% else %>
<%= render 'admins/shared/no_data_for_table' %>
<% end %>
</tbody>
</table>
<%= render partial: 'admins/shared/paginate', locals: { objects: partners } %>

@ -40,6 +40,7 @@
<%= sidebar_item_group('#schools-submenu', '单位管理', icon: 'building') do %>
<li><%= sidebar_item(admins_schools_path, '单位列表', icon: 'university', controller: 'admins-schools') %></li>
<li><%= sidebar_item(admins_departments_path, '部门列表', icon: 'sitemap', controller: 'admins-departments') %></li>
<li><%= sidebar_item(admins_partners_path, '合作伙伴', icon: 'handshake-o', controller: 'admins-partners') %></li>
<% end %>
</li>

@ -0,0 +1,28 @@
<div class="modal fade admin-select-school-modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><%= title %></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form class="admin-select-school-form" data-multiple="<%= multiple || false %>" data-url="<%= url %>">
<div class="form-group d-flex">
<label for="school_ids" class="col-form-label"><%= label ||= '选择单位:' %></label>
<div class="d-flex flex-column-reverse w-75">
<select id="school_ids" name="school_ids" class="form-control school-select" multiple="multiple"></select>
</div>
</div>
<div class="error text-danger"></div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary submit-btn">确认</button>
</div>
</div>
</div>
</div>

@ -10,8 +10,8 @@ json.students do
if @user_course_identity < Course::ASSISTANT_PROFESSOR && !params[:course_group_id].present?
json.member_roles student.user.course_role(@course)
end
json.user_phone student.user.hidden_phone
json.user_mail student.user.hidden_mail
json.user_phone @course.excellent ? "" : student.user.hidden_phone
json.user_mail @course.excellent ? "" : student.user.hidden_mail
end
end
json.students_count @students_count

@ -3,4 +3,5 @@ admins-laboratory_settings: 'admins-laboratories'
admins-carousels: 'admins-laboratories'
admins-competition_settings: 'admins-competitions'
admins-enroll_lists: 'admins-competitions'
admins-competition_prize_users: 'admins-competitions'
admins-competition_prize_users: 'admins-competitions'
admins-customers: 'admins-partners'

@ -717,6 +717,7 @@ Rails.application.routes.draw do
collection do
get :school_list
get :for_option
get :search
end
scope module: :ecs do
@ -1082,6 +1083,10 @@ Rails.application.routes.draw do
post :cancel_excellent
end
end
resources :partners, only: [:index, :create, :destroy] do
resources :customers, only: [:index, :create, :destroy]
end
end
namespace :cooperative do

File diff suppressed because one or more lines are too long

@ -136185,7 +136185,7 @@ $(document).on('turbolinks:load', function(){
minimumInputLength: 1,
ajax: {
delay: 500,
url: '/api/schools/for_option.json',
url: '/api/schools/search.json',
dataType: 'json',
data: function(params){
return { keyword: params.term };
@ -138214,6 +138214,96 @@ $(document).on('turbolinks:load', function() {
});
})
});
$(document).on('turbolinks:load', function() {
var $modal = $('.modal.admin-select-school-modal');
if ($modal.length > 0) {
var $link = null;
var $form = $modal.find('form.admin-select-school-form');
var multiple = $form.data('multiple');
$form.find('.school-select').select2({
theme: 'bootstrap4',
placeholder: '请选择',
multiple: multiple,
minimumInputLength: 1,
ajax: {
delay: 500,
url: '/api/schools/search.json',
dataType: 'json',
data: function (params) {
return {keyword: params.term};
},
processResults: function (data) {
return {results: data.schools}
}
},
templateResult: function (item) {
if (!item.id || item.id === '') return item.text;
var html = "<span>" + item.name + "<span class='ml-4 font-12'>";
if(item.province){ html += item.province }
html += "</span></span>";
return $(html);
},
templateSelection: function (item) {
if (item.id) {
}
return item.name || item.text;
}
});
$form.validate({
errorElement: 'span',
errorClass: 'danger text-danger',
rules: {
school_ids: {
required: true
}
},
messages: {
school_ids: {
required: '请选择'
}
}
});
$modal.on('show.bs.modal', function(event){
$link = $(event.relatedTarget);
});
$modal.on('hide.bs.modal', function(){
$form.find('.error').html('');
$form.find('.school-select').select2('val', ' ');
});
$modal.on('click', '.submit-btn', function(){
$form.find('.error').html('');
if($form.valid()){
var url = $form.data('url');
var schoolIds = $form.find('#school_ids').val();
$.ajax({
method: 'POST',
dataType: 'json',
url: url,
data: { school_ids: schoolIds },
success: function(){
$.notify({ message: '操作成功' });
$modal.modal('hide');
setTimeout(function(){
window.location.reload();
}, 500);
},
error: function(res){
var data = res.responseJSON;
$form.find('.error').html(data.message);
}
});
}
});
}
});
$(document).on('turbolinks:load', function() {
var $modal = $('.modal.admin-upload-file-modal');
if ($modal.length > 0) {
@ -138636,7 +138726,7 @@ $(document).on('turbolinks:load', function () {
minimumInputLength: 1,
ajax: {
delay: 500,
url: '/api/schools/for_option.json',
url: '/api/schools/search.json',
dataType: 'json',
data: function (params) {
return {keyword: params.term};
@ -138668,12 +138758,18 @@ $(document).on('turbolinks:load', function () {
// 上传图片
$('.modal.admin-upload-file-modal').on('upload:success', function (e, data) {
var $imageElement = $('.subject-image-' + data.source_id);
$imageElement.attr('src', data.url);
$imageElement.show();
$imageElement.next().html('重新上传');
})
if(data.suffix == '_qrcode'){
var $imageElement = $('.subject-weapp-image-' + data.source_id);
$imageElement.attr('src', data.url);
$imageElement.show();
$imageElement.next().html('重新上传');
} else {
var $imageElement = $('.subject-image-' + data.source_id);
$imageElement.attr('src', data.url);
$imageElement.show();
$imageElement.next().html('重新上传');
}
});
// 定义状态切换监听事件
var defineStatusChangeFunc = function (doElement, undoElement, url, callback) {
$('.subject-list-container').on('click', doElement, function () {

@ -91,6 +91,7 @@ class ListPageIndex extends Component{
this.state={
yslGuideone:undefined,
yslElearning:false,
isexcellent:false
}
}
comyslElearning(bool){
@ -163,6 +164,11 @@ class ListPageIndex extends Component{
});
}
}
ispostexcellenttype=(excellent)=>{
this.setState({
isexcellent:excellent
})
}
render() {
let {yslGuideone} =this.state;
// console.log("98");
@ -175,7 +181,7 @@ class ListPageIndex extends Component{
<div>
<div className="newMain clearfix">
{/*头部banner*/}
<CoursesBanner {...this.props}></CoursesBanner>
<CoursesBanner {...this.props} ispostexcellenttype={(excellent)=>this.ispostexcellenttype(excellent)}></CoursesBanner>
{/*下面是指引哦*/}
{/*{yslGuideone!==undefined?*/}
{/*(*/}

@ -28,7 +28,8 @@ class BoardsNew extends Component{
this.state = {
fileList: [],
boards: [],
title_num: 0
title_num: 0,
email_notify:false
}
}
addSuccess = () => {
@ -44,6 +45,7 @@ class BoardsNew extends Component{
if (response.data.status == 0) {
this.setState({
boards: response.data.data.boards || [],
boardsdata:response.data.data,
course_id: response.data.data.course_id
})
if (!isEdit) {
@ -158,6 +160,7 @@ class BoardsNew extends Component{
axios.post(url, {
...values,
email_notify:this.state.email_notify,
course_id: cid,
attachment_ids,
})
@ -247,6 +250,12 @@ class BoardsNew extends Component{
const boardId = this.props.match.params.boardId
this.props.toListPage(courseId, boardId)
}
setemailchange=(e)=>{
this.setState({
email_notify:e.target.checked
})
}
render() {
let { addGroup, fileList, course_id, title_num } = this.state;
const { getFieldDecorator } = this.props.form;
@ -289,6 +298,7 @@ class BoardsNew extends Component{
const boardId = this.props.match.params.boardId
const isCourseEnd = this.props.isCourseEnd();
document.title=this.props.coursedata&&this.props.coursedata.name;
return(
<div className="newMain ">
<AddDirModal {...this.props}
@ -401,6 +411,10 @@ class BoardsNew extends Component{
</Select>
)}
</Form.Item>
{this.state.boardsdata&&this.state.boardsdata.email_notify===true?this.props.isAdminOrTeacher()===true?this.isEdit ?"":<span className={"setemail"}>
<Checkbox onChange={this.setemailchange} checked={this.state.email_notify}>发送邮件提醒</Checkbox>
</span>:"":""}
{/* { isAdmin && <Form.Item
label=""

@ -35,4 +35,12 @@
.ant-pagination.coursePagination {
text-align: center;
margin-top: 16px;
}
.setemail{
margin-left: 20px;
}
.setemail .ant-checkbox-wrapper{
margin-top: 8px;
}

@ -136,6 +136,7 @@ class CoursesBanner extends Component {
coursedata: data,
excellent:data.excellent,
})
this.props.ispostexcellenttype(data.excellent)
}else{
this.onloadupdatabanner()
}

@ -697,7 +697,27 @@ class studentsList extends Component{
const isStudentPage = pageType == TYPE_STUDENTS
this.isStudentPage = isStudentPage
const isGroupChildPage = pageType == TYPE_COURSE_GOURP_CHILD
let studentlist=buildColumns(this,isParent);
if(this.props.isexcellent===true){
studentlist.some((item,key)=> {
if (item.title === "手机号") {
studentlist.splice(key, 1)
return true
}
}
)
}
if(this.props.isexcellent===true){
studentlist.some((item,key)=> {
if (item.title === "邮箱") {
studentlist.splice(key, 1)
return true
}
}
)
}
return(
<React.Fragment >
<DownloadMessageysl
@ -866,7 +886,7 @@ class studentsList extends Component{
<Spin size="large" spinning={this.state.isSpin}>
<div className="clearfix stu_table">
{students && !!students.length && <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
<Table columns={buildColumns(this,isParent)} dataSource={students} onChange={this.onTableChange} pagination={false}></Table>
<Table columns={studentlist} dataSource={students} onChange={this.onTableChange} pagination={false}></Table>
</Checkbox.Group> }
</div>
</Spin>

@ -147,8 +147,8 @@ class ShixunsHome extends Component {
nextArrow={<CustomNextArrow />}
prevArrow={<CustomPrevArrow />}
autoplay
autoplaySpeed={4500}
animation={false}
autoplaySpeed={5000}
animation={false}
pauseOnHover={true}
style={{width:"100%"}}
arrowPos="outer">

Loading…
Cancel
Save