Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun
commit
de95f17b48
@ -0,0 +1,20 @@
|
||||
$(document).on('turbolinks:load', function() {
|
||||
if ($('body.admins-project-package-applies-index-page').length > 0) {
|
||||
var $searchFrom = $('.project-package-applies-form');
|
||||
$searchFrom.find('select[name="status"]').val('pending');
|
||||
|
||||
$searchFrom.on('click', '.search-form-tab', function(){
|
||||
var $link = $(this);
|
||||
|
||||
$searchFrom.find('input[name="keyword"]').val('');
|
||||
$searchFrom.find('select[name="status"]').val('all');
|
||||
|
||||
if($link.data('value') === 'all'){
|
||||
$searchFrom.find('.status-filter').show();
|
||||
} else {
|
||||
$searchFrom.find('.status-filter').hide();
|
||||
$searchFrom.find('select[name="status"]').val('pending');
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
@ -0,0 +1,20 @@
|
||||
$(document).on('turbolinks:load', function() {
|
||||
if ($('body.admins-video-applies-index-page').length > 0) {
|
||||
var $searchFrom = $('.video-applies-form');
|
||||
$searchFrom.find('select[name="status"]').val('pending');
|
||||
|
||||
$searchFrom.on('click', '.search-form-tab', function(){
|
||||
var $link = $(this);
|
||||
|
||||
$searchFrom.find('input[name="keyword"]').val('');
|
||||
$searchFrom.find('select[name="status"]').val('all');
|
||||
|
||||
if($link.data('value') === 'all'){
|
||||
$searchFrom.find('.status-filter').show();
|
||||
} else {
|
||||
$searchFrom.find('.status-filter').hide();
|
||||
$searchFrom.find('select[name="status"]').val('pending');
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
@ -0,0 +1,9 @@
|
||||
.admins-project-package-applies-index-page {
|
||||
.project-package-applies-list-container {
|
||||
span {
|
||||
&.apply-status-agreed { color: #28a745; }
|
||||
&.apply-status-refused { color: #dc3545; }
|
||||
&.apply-status-processed { color: #6c757d; }
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
.admins-video-applies-index-page {
|
||||
.video-applies-list-container {
|
||||
span {
|
||||
&.apply-status-agreed { color: #28a745; }
|
||||
&.apply-status-refused { color: #dc3545; }
|
||||
&.apply-status-processed { color: #6c757d; }
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
class Admins::ProjectPackageAppliesController < Admins::BaseController
|
||||
before_action :current_apply,only: [:agree,:refuse]
|
||||
|
||||
def index
|
||||
params[:status] ||= 'pending'
|
||||
status = params[:status]
|
||||
if status == 'all'
|
||||
status = %w(agreed refused)
|
||||
end
|
||||
package_applies = ProjectPackageApply.where(status: status)
|
||||
keyword = params[:keyword].to_s.strip || ""
|
||||
if keyword.present?
|
||||
package_applies = package_applies.joins(:project_package).where("project_packages.title like ?","%#{keyword}%")
|
||||
end
|
||||
@package_applies = paginate package_applies.includes(project_package: { creator: :user_extension })
|
||||
end
|
||||
|
||||
def agree
|
||||
ProjectPackages::AgreeApplyService.new(current_apply).call
|
||||
render_success_js
|
||||
rescue ProjectPackages::AgreeApplyService::Error => e
|
||||
render json: { status: -1, message: e.message }
|
||||
end
|
||||
|
||||
def refuse
|
||||
ProjectPackages::RefuseApplyService.new(current_apply, reason: params[:reason]).call
|
||||
render_success_js
|
||||
rescue ProjectPackages::RefuseApplyService::Error => e
|
||||
render json: { status: -1, message: e.message }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def current_apply
|
||||
@_current_apply ||= ProjectPackageApply.find(params[:id])
|
||||
end
|
||||
end
|
@ -0,0 +1,41 @@
|
||||
class Admins::VideoAppliesController < Admins::BaseController
|
||||
|
||||
def index
|
||||
params[:status] ||= 'pending'
|
||||
status = params[:status]
|
||||
if status == 'all'
|
||||
status = %w(agreed refused)
|
||||
end
|
||||
|
||||
applies = VideoApply.where(status: status).order('video_applies.updated_at desc')
|
||||
|
||||
search = params[:keyword].to_s.strip
|
||||
if search.present?
|
||||
applies = applies.joins(:video)
|
||||
.where('videos.title like :search', search: "%#{search}%")
|
||||
end
|
||||
|
||||
@video_applies = paginate applies.includes(video: { user: :user_extension })
|
||||
end
|
||||
|
||||
def agree
|
||||
Videos::AgreeApplyService.new(current_video_apply, current_user).call
|
||||
render_success_js
|
||||
rescue Videos::AgreeApplyService::Error => e
|
||||
render json: { status: -1, message: e.message }
|
||||
end
|
||||
|
||||
def refuse
|
||||
Videos::RefuseApplyService.new(current_video_apply, current_user, reason: params[:reason]).call
|
||||
render_success_js
|
||||
rescue Videos::RefuseApplyService::Error => e
|
||||
render json: { status: -1, message: e.message }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def current_video_apply
|
||||
@_current_video_apply ||= VideoApply.find(params[:id])
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,32 @@
|
||||
<% define_admin_breadcrumbs do %>
|
||||
<% add_admin_breadcrumb('众包需求发布') %>
|
||||
<% end %>
|
||||
|
||||
<div class="box search-form-container flex-column mb-0 pb-0 project-package-applies-form">
|
||||
<ul class="nav nav-tabs w-100 search-form-tabs">
|
||||
<li class="nav-item">
|
||||
<%= link_to '待审批', admins_project_package_applies_path(status: :pending), remote: true, 'data-value': 'pending',
|
||||
class: "nav-link search-form-tab #{params[:status] == 'pending' ? 'active' : ''}" %>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<%= link_to '已审批', admins_project_package_applies_path(status: "all"), remote: true, 'data-value': 'all',
|
||||
class: "nav-link search-form-tab #{params[:status] != 'pending' ? 'active' : ''}" %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<%= form_tag(admins_project_package_applies_path(unsafe_params), method: :get, class: 'form-inline search-form justify-content-end mt-3', remote: true) do %>
|
||||
<div class="form-group status-filter" style="<%= params[:status] != 'pending' ? '' : 'display: none;' %>">
|
||||
<label for="status">审核状态:</label>
|
||||
<% status_options = [['全部', 'all'], ['已同意', 'agreed'], ['已拒绝', 'refused']] %>
|
||||
<%= select_tag(:status, options_for_select(status_options), class: 'form-control') %>
|
||||
</div>
|
||||
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '需求标题检索') %>
|
||||
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="box project-package-applies-list-container">
|
||||
<%= render(partial: 'admins/project_package_applies/shared/list', locals: { applies: @package_applies}) %>
|
||||
</div>
|
||||
|
||||
<%= render(partial: 'admins/shared/admin_common_refuse_modal') %>
|
@ -0,0 +1 @@
|
||||
$('.project-package-applies-list-container').html("<%= j( render partial: 'admins/project_package_applies/shared/list', locals: { applies: @package_applies } ) %>");
|
@ -0,0 +1,56 @@
|
||||
<% is_processed = params[:status].to_s != 'pending' %>
|
||||
|
||||
<table class="table table-hover text-center library_applies-list-table">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th width="8%">头像</th>
|
||||
<th width="14%">姓名</th>
|
||||
<th width="26%" class="text-left">众包需求</th>
|
||||
<th width="26%" class="text-left">需求描述</th>
|
||||
<th width="16%">时间</th>
|
||||
<% if is_processed %>
|
||||
<th width="16%">拒绝原因</th>
|
||||
<th width="8%">状态</th>
|
||||
<% else %>
|
||||
<th width="20%">操作</th>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if applies.present? %>
|
||||
<% applies.each do |apply| %>
|
||||
<% package = apply.project_package %>
|
||||
<% user = package.creator %>
|
||||
<tr class="project-package-item project-package-applies-<%= apply.id %>">
|
||||
<td>
|
||||
<%= link_to "/users/#{user.login}", class: 'professional-authentication-avatar', target: '_blank', data: { toggle: 'tooltip', title: '个人主页' } do %>
|
||||
<img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= user.real_name %></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>
|
||||
|
||||
<% if is_processed %>
|
||||
<td class="text-secondary"><%= overflow_hidden_span apply.reason %></td>
|
||||
<td><span class="apply-status-<%= apply.status %>"><%= t("admins_apply_status.status.#{apply.status}") %></span></td>
|
||||
<% else %>
|
||||
<td class="action-container">
|
||||
<%= agree_link '同意', agree_admins_project_package_apply_path(apply, element: ".project_package_applies-#{apply.id}"), 'data-confirm': '确认审核通过?' %>
|
||||
<%= javascript_void_link('拒绝', class: 'action refuse-action',
|
||||
data: {
|
||||
toggle: 'modal', target: '.admin-common-refuse-modal', id: apply.id,
|
||||
url: refuse_admins_project_package_apply_path(apply, element: ".project_package_applies-#{apply.id}")
|
||||
}) %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render 'admins/shared/no_data_for_table' %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= render partial: 'admins/shared/paginate', locals: { objects: applies } %>
|
@ -0,0 +1,32 @@
|
||||
<% define_admin_breadcrumbs do %>
|
||||
<% add_admin_breadcrumb('视频发布') %>
|
||||
<% end %>
|
||||
|
||||
<div class="box search-form-container flex-column mb-0 pb-0 video-applies-form">
|
||||
<ul class="nav nav-tabs w-100 search-form-tabs">
|
||||
<li class="nav-item">
|
||||
<%= link_to '待审批', admins_video_applies_path(status: :pending), remote: true, 'data-value': 'pending',
|
||||
class: "nav-link search-form-tab #{params[:status] == 'pending' ? 'active' : ''}" %>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<%= link_to '已审批', admins_video_applies_path(status: "all"), remote: true, 'data-value': 'all',
|
||||
class: "nav-link search-form-tab #{params[:status] != 'pending' ? 'active' : ''}" %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<%= form_tag(admins_video_applies_path(unsafe_params), method: :get, class: 'form-inline search-form justify-content-end mt-3', remote: true) do %>
|
||||
<div class="form-group status-filter" style="<%= params[:status] != 'pending' ? '' : 'display: none;' %>">
|
||||
<label for="status">审核状态:</label>
|
||||
<% status_options = [['全部', 'all'], ['已同意', 'agreed'], ['已拒绝', 'refused']] %>
|
||||
<%= select_tag(:status, options_for_select(status_options), class: 'form-control') %>
|
||||
</div>
|
||||
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '需求标题检索') %>
|
||||
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="box video-applies-list-container">
|
||||
<%= render(partial: 'admins/video_applies/shared/list', locals: { applies: @video_applies}) %>
|
||||
</div>
|
||||
|
||||
<%= render(partial: 'admins/shared/admin_common_refuse_modal') %>
|
@ -0,0 +1 @@
|
||||
$('.video-applies-list-container').html("<%= j( render partial: 'admins/video_applies/shared/list', locals: { applies: @video_applies } ) %>");
|
@ -0,0 +1,57 @@
|
||||
<% is_processed = params[:status].to_s != 'pending' %>
|
||||
|
||||
<table class="table table-hover text-center library_applies-list-table">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th width="8%">头像</th>
|
||||
<th width="14%">姓名</th>
|
||||
<th width="26%" class="text-left">视频名称</th>
|
||||
<th width="13%">视频大小</th>
|
||||
<th width="13%" class="text-left">播放链接</th>
|
||||
<th width="16%">时间</th>
|
||||
<% if is_processed %>
|
||||
<th width="16%">拒绝原因</th>
|
||||
<th width="8%">状态</th>
|
||||
<% else %>
|
||||
<th width="20%">操作</th>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if applies.present? %>
|
||||
<% applies.each do |v| %>
|
||||
<% video = v.video %>
|
||||
<% user = video.user %>
|
||||
<tr class="video-applies-item video-applies-<%= v.id %>">
|
||||
<td>
|
||||
<%= link_to "/users/#{user.login}", class: 'professional-authentication-avatar', target: '_blank', data: { toggle: 'tooltip', title: '个人主页' } do %>
|
||||
<img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= user.real_name %></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>
|
||||
<td><%= v.updated_at.strftime('%Y-%m-%d %H:%M') %></td>
|
||||
<% if is_processed %>
|
||||
<td class="text-secondary"><%= overflow_hidden_span v.reason %></td>
|
||||
<td><span class="apply-status-<%= v.status %>"><%= t("admins_apply_status.status.#{v.status}") %></span></td>
|
||||
<% else %>
|
||||
<td class="action-container">
|
||||
<%= agree_link '同意', agree_admins_video_apply_path(v, element: ".video_applies-#{v.id}"), 'data-confirm': '确认审核通过?' %>
|
||||
<%= javascript_void_link('拒绝', class: 'action refuse-action',
|
||||
data: {
|
||||
toggle: 'modal', target: '.admin-common-refuse-modal', id: v.id,
|
||||
url: refuse_admins_video_apply_path(v, element: ".video_applies-#{v.id}")
|
||||
}) %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render 'admins/shared/no_data_for_table' %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= render partial: 'admins/shared/paginate', locals: { objects: applies } %>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1,135 +1,135 @@
|
||||
import React,{Component} from "React";
|
||||
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
|
||||
import {Link} from 'react-router-dom';
|
||||
import locale from 'antd/lib/date-picker/locale/zh_CN';
|
||||
import { WordsBtn } from 'educoder';
|
||||
import axios from 'axios';
|
||||
import Modals from '../../modals/Modals';
|
||||
import CoursesListType from '../coursesPublic/CoursesListType';
|
||||
import HomeworkModal from "../coursesPublic/HomeworkModal";
|
||||
import moment from 'moment';
|
||||
import '../css/Courses.css'
|
||||
const { Option} = Select;
|
||||
const CheckboxGroup = Checkbox.Group;
|
||||
const confirm = Modal.confirm;
|
||||
let GraduationTasksnewtype=true;
|
||||
const $ = window.$;
|
||||
const Search = Input.Search;
|
||||
const RadioGroup = Radio.Group;
|
||||
|
||||
function scrollTo(className) {
|
||||
$("html").animate({ scrollTop: $(`${className}`).offset().top - 400 })
|
||||
}
|
||||
|
||||
|
||||
function range(start, end) {
|
||||
const result = [];
|
||||
for (let i = start; i < end; i++) {
|
||||
result.push(i);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function disabledDateTime() {
|
||||
return {
|
||||
// disabledHours: () => range(0, 24).splice(4, 20),
|
||||
disabledMinutes: () => range(1, 30).concat(range(31, 60)),
|
||||
// disabledSeconds: () => [55, 56],
|
||||
};
|
||||
}
|
||||
function handleDateString (dateString) {
|
||||
if (!dateString) return dateString;
|
||||
const ar = dateString.split(':')
|
||||
if (ar[1] != '00' && ar[1] != '30') {
|
||||
return [ar[0], '00'].join(':')
|
||||
}
|
||||
return dateString
|
||||
}
|
||||
// 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting
|
||||
class CommonWorkSetting extends Component{
|
||||
|
||||
constructor(props){
|
||||
super(props)
|
||||
this.state={
|
||||
course_name:"",
|
||||
homework_name:"",
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
render(){
|
||||
const { getFieldDecorator } = this.props.form;
|
||||
const dateFormat = 'YYYY-MM-DD HH:mm';
|
||||
|
||||
let {course_name, homework_name
|
||||
} =this.state;
|
||||
|
||||
let courseId=this.props.match.params.coursesId;
|
||||
let category_id=this.props.match.params.category_id;
|
||||
let task_Id=this.props.match.params.task_Id;
|
||||
const radioStyle = {
|
||||
display: 'block',
|
||||
height: '30px',
|
||||
lineHeight: '30px',
|
||||
};
|
||||
|
||||
|
||||
return(
|
||||
<React.Fragment>
|
||||
{ <div>
|
||||
|
||||
<div className="newMain clearfix">
|
||||
<div className={"educontent mb20"}>
|
||||
|
||||
<p className="clearfix mt10">
|
||||
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId} className="color-grey-6">{course_name}</Link></WordsBtn>
|
||||
<span className="color-grey-9 fl ml3 mr3">></span>
|
||||
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation"} className="color-grey-6">毕设任务</Link></WordsBtn>
|
||||
<span className="color-grey-9 fl ml3 mr3">></span>
|
||||
<span>任务详情</span>
|
||||
</p>
|
||||
|
||||
<div style={{ width:'100%',height:'75px'}} >
|
||||
<p className=" fl color-black mt25 summaryname">
|
||||
<Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link>
|
||||
</p>
|
||||
<CoursesListType
|
||||
typelist={["已开启补交"]}
|
||||
typesylename={"mt22"}
|
||||
/>
|
||||
<a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a>
|
||||
</div>
|
||||
|
||||
<div className="stud-class-set bor-bottom-greyE">
|
||||
<div className="mt10 clearfix edu-back-white poll_list pl20">
|
||||
<Link
|
||||
className="active"
|
||||
to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>作品列表</Link>
|
||||
<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>作业问答</Link>
|
||||
<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>参考答案</Link>
|
||||
<Link
|
||||
style={{paddingLeft:'38px'}}
|
||||
to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link>
|
||||
|
||||
<a className={"fr color-blue font-16"} onClick={() => { this.end()} }>立即截止</a>
|
||||
<a className={"fr color-blue font-16"} onClick={() => { this.publish()} }>立即发布</a>
|
||||
|
||||
<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation/graduation_tasks/"+task_Id+"/edit"}>编辑作业</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
|
||||
</React.Fragment>
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const CommonWorkSettingForm = Form.create({ name: 'commonworkSettingForm' })(CommonWorkSetting);
|
||||
import React,{Component} from "React";
|
||||
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
|
||||
import {Link} from 'react-router-dom';
|
||||
import locale from 'antd/lib/date-picker/locale/zh_CN';
|
||||
import { WordsBtn } from 'educoder';
|
||||
import axios from 'axios';
|
||||
import Modals from '../../modals/Modals';
|
||||
import CoursesListType from '../coursesPublic/CoursesListType';
|
||||
import HomeworkModal from "../coursesPublic/HomeworkModal";
|
||||
import moment from 'moment';
|
||||
import '../css/Courses.css'
|
||||
const { Option} = Select;
|
||||
const CheckboxGroup = Checkbox.Group;
|
||||
const confirm = Modal.confirm;
|
||||
let GraduationTasksnewtype=true;
|
||||
const $ = window.$;
|
||||
const Search = Input.Search;
|
||||
const RadioGroup = Radio.Group;
|
||||
|
||||
function scrollTo(className) {
|
||||
$("html").animate({ scrollTop: $(`${className}`).offset().top - 400 })
|
||||
}
|
||||
|
||||
|
||||
function range(start, end) {
|
||||
const result = [];
|
||||
for (let i = start; i < end; i++) {
|
||||
result.push(i);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function disabledDateTime() {
|
||||
return {
|
||||
// disabledHours: () => range(0, 24).splice(4, 20),
|
||||
disabledMinutes: () => range(1, 30).concat(range(31, 60)),
|
||||
// disabledSeconds: () => [55, 56],
|
||||
};
|
||||
}
|
||||
function handleDateString (dateString) {
|
||||
if (!dateString) return dateString;
|
||||
const ar = dateString.split(':')
|
||||
if (ar[1] != '00' && ar[1] != '30') {
|
||||
return [ar[0], '00'].join(':')
|
||||
}
|
||||
return dateString
|
||||
}
|
||||
// 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting
|
||||
class CommonWorkSetting extends Component{
|
||||
|
||||
constructor(props){
|
||||
super(props)
|
||||
this.state={
|
||||
course_name:"",
|
||||
homework_name:"",
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
render(){
|
||||
const { getFieldDecorator } = this.props.form;
|
||||
const dateFormat = 'YYYY-MM-DD HH:mm';
|
||||
|
||||
let {course_name, homework_name
|
||||
} =this.state;
|
||||
|
||||
let courseId=this.props.match.params.coursesId;
|
||||
let category_id=this.props.match.params.category_id;
|
||||
let task_Id=this.props.match.params.task_Id;
|
||||
const radioStyle = {
|
||||
display: 'block',
|
||||
height: '30px',
|
||||
lineHeight: '30px',
|
||||
};
|
||||
|
||||
|
||||
return(
|
||||
<React.Fragment>
|
||||
{ <div>
|
||||
|
||||
<div className="newMain clearfix">
|
||||
<div className={"educontent mb20"}>
|
||||
|
||||
<p className="clearfix mt10">
|
||||
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId} className="color-grey-6">{course_name}</Link></WordsBtn>
|
||||
<span className="color-grey-9 fl ml3 mr3">></span>
|
||||
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation"} className="color-grey-6">毕设任务</Link></WordsBtn>
|
||||
<span className="color-grey-9 fl ml3 mr3">></span>
|
||||
<span>任务详情</span>
|
||||
</p>
|
||||
|
||||
<div style={{ width:'100%',height:'75px'}} >
|
||||
<p className=" fl color-black mt25 summaryname">
|
||||
<Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link>
|
||||
</p>
|
||||
<CoursesListType
|
||||
typelist={["已开启补交"]}
|
||||
typesylename={"mt22"}
|
||||
/>
|
||||
<a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a>
|
||||
</div>
|
||||
|
||||
<div className="stud-class-set bor-bottom-greyE">
|
||||
<div className="mt10 clearfix edu-back-white poll_list pl20">
|
||||
<Link
|
||||
className="active"
|
||||
to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>作品列表</Link>
|
||||
<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>作业描述</Link>
|
||||
<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>参考答案</Link>
|
||||
<Link
|
||||
style={{paddingLeft:'38px'}}
|
||||
to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link>
|
||||
|
||||
<a className={"fr color-blue font-16"} onClick={() => { this.end()} }>立即截止</a>
|
||||
<a className={"fr color-blue font-16"} onClick={() => { this.publish()} }>立即发布</a>
|
||||
|
||||
<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation/graduation_tasks/"+task_Id+"/edit"}>编辑作业</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
|
||||
</React.Fragment>
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const CommonWorkSettingForm = Form.create({ name: 'commonworkSettingForm' })(CommonWorkSetting);
|
||||
export default CommonWorkSettingForm;
|
Loading…
Reference in new issue