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

topic_bank
杨树林 6 years ago
commit 3f244ab050

@ -74,7 +74,10 @@ class Admins::DepartmentAppliesController < Admins::BaseController
@depart_apply&.applied_messages&.update_all(status:3) @depart_apply&.applied_messages&.update_all(status:3)
if params[:tip] == 'unapplied' #未审批时候删除 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 = { tiding_params = {
user_id: @depart_apply.user_id, user_id: @depart_apply.user_id,
trigger_user_id: 0, trigger_user_id: 0,

@ -16,7 +16,7 @@
<td><%= apply.id %></td> <td><%= apply.id %></td>
<td class="text-left"> <%= apply.name %></td> <td class="text-left"> <%= apply.name %></td>
<td class="text-left"> <%= apply.school.try(: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><%= format_time apply.created_at %></td>
<td class="action-container"> <td class="action-container">
<%= agree_link '批准', agree_admins_department_apply_path(apply, element: ".department-apply-#{apply.id}"), 'data-confirm': '确认批准通过?' %> <%= 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" /> <img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %> <% end %>
</td> </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"><%= link_to library.title, library_path(library), :target => "_blank" %></td>
<td class="text-left"><%= overflow_hidden_span library.content[0..50]%></td> <td class="text-left"><%= overflow_hidden_span library.content[0..50]%></td>
<td><%= apply.updated_at.strftime('%Y-%m-%d %H:%M') %></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" /> <img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %> <% end %>
</td> </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"><%= link_to package.title, "/crowdsourcing/#{package.id}", :target => "_blank" %></td>
<td class="text-left"><%= overflow_hidden_span package.content[0..50] %></td> <td class="text-left"><%= overflow_hidden_span package.content[0..50] %></td>
<td><%= apply.updated_at.strftime('%Y-%m-%d %H:%M') %></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" /> <img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %> <% end %>
</td> </td>
<td><%= user.real_name %></td> <td><%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %></td>
<td class="text-left"> <td class="text-left">
<%= link_to "/shixuns/#{shixun.identifier}", target: '_blank' do %> <%= link_to "/shixuns/#{shixun.identifier}", target: '_blank' do %>
<%= overflow_hidden_span shixun.name, width: 300 %> <%= 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') %> <%= 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' } %> <%= 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>
<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> <td>
<% if shixun.status.to_i < 3 %> <% if shixun.status.to_i < 3 %>
<%= link_to "关闭", admins_shixun_setting_path(shixun,status:3,page_no:page_no),method: :put, :class => "", :remote => true %> <%= 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 => 0).size %></td>
<td><%= shixun.challenges.where(:st => 1).size %></td> <td><%= shixun.challenges.where(:st => 1).size %></td>
<td class="shixuns-status-<%= shixun.status %>"><%= shixun_authentication_status shixun %></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><%= format_time shixun.created_at %></td>
<td class="homepage_teacher"> <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 %>"> <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" /> <img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %> <% end %>
</td> </td>
<td><%= user.real_name %></td> <td><%= link_to user&.real_name,"/users/#{user&.login}", target: "_blank" %></td>
<td class="text-left"> <td class="text-left">
<%= link_to "/paths/#{subject.id}", target: '_blank' do %> <%= link_to "/paths/#{subject.id}", target: '_blank' do %>
<%= overflow_hidden_span subject.name, width: 300 %> <%= overflow_hidden_span subject.name, width: 300 %>

@ -4,7 +4,7 @@
<%= "#{apply&.province.to_s}"+"#{apply&.city.to_s}" %> <%= "#{apply&.province.to_s}"+"#{apply&.city.to_s}" %>
</td> </td>
<td class="text-left"><%= overflow_hidden_span apply.address %></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><%= format_time apply.created_at %></td>
<td class="action-container"> <td class="action-container">
<%= agree_link '批准', agree_admins_unit_apply_path(apply, element: ".unit-apply-#{apply.id}"), 'data-confirm': '确认批准通过?' %> <%= 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" /> <img src="/images/<%= url_to_avatar(user) %>" class="rounded-circle" width="40" height="40" />
<% end %> <% end %>
</td> </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 class="text-left"><%= link_to video.title, video.file_url, :target => "_blank" %></td>
<td><%= video.filesize&.to_s(:human_size) %></td> <td><%= video.filesize&.to_s(:human_size) %></td>
<td class="text-left"><%= link_to "播放视频",video.file_url, target: "_blank" %></td> <td class="text-left"><%= link_to "播放视频",video.file_url, target: "_blank" %></td>

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

@ -455,7 +455,7 @@ class NewWork extends Component{
`}</style> `}</style>
{/* TpmQuestionEdit 这个没出现抖动 */}
{ <Form.Item { <Form.Item
label="内容" label="内容"
className="AboutInputForm workContent mdInForm" className="AboutInputForm workContent mdInForm"

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

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

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

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

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

@ -62,7 +62,7 @@ window.md_rec_data = md_rec_data;
function md_elocalStorage(editor,mdu,id){ function md_elocalStorage(editor,mdu,id){
if (window.sessionStorage){ if (window.sessionStorage){
var oc = window.sessionStorage.getItem('content'+mdu); var oc = window.sessionStorage.getItem('content'+mdu);
if(oc !== null ){ if(oc !== null && oc != editor.getValue()){
console.log("#e_tips_"+id) console.log("#e_tips_"+id)
$("#e_tips_"+id).data('editor', editor); $("#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>'; 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 () { $("#" + _id + " [type=\"inline\"]").bind("click", function () {
_editorName.cm.replaceSelection("$$$$"); _editorName.cm.replaceSelection("`$$$$`");
var __Cursor = _editorName.cm.getDoc().getCursor(); var __Cursor = _editorName.cm.getDoc().getCursor();
_editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); _editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2);
_editorName.cm.focus(); _editorName.cm.focus();

Loading…
Cancel
Save