公共资源多个资源发送功能
This commit is contained in:
parent
0a7d1f1efc
commit
ab4aa0f06f
|
@ -1987,7 +1987,7 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elsif params[:send_ids].present?
|
elsif params[:send_ids].present?
|
||||||
send_ids = params[:send_ids].split(" ")
|
send_ids = params[:send_ids].split(",")
|
||||||
course_ids = params[:course_ids]
|
course_ids = params[:course_ids]
|
||||||
if course_ids.nil?
|
if course_ids.nil?
|
||||||
@flag = false
|
@flag = false
|
||||||
|
@ -2139,7 +2139,7 @@ class UsersController < ApplicationController
|
||||||
@ori = ori
|
@ori = ori
|
||||||
end
|
end
|
||||||
elsif params[:send_ids].present?
|
elsif params[:send_ids].present?
|
||||||
send_ids = params[:send_ids].split(" ")
|
send_ids = params[:send_ids].split(",")
|
||||||
project_ids = params[:projects_ids]
|
project_ids = params[:projects_ids]
|
||||||
if project_ids.nil?
|
if project_ids.nil?
|
||||||
@flag = false
|
@flag = false
|
||||||
|
@ -2286,7 +2286,7 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
@ori = ori
|
@ori = ori
|
||||||
elsif params[:send_ids].present?
|
elsif params[:send_ids].present?
|
||||||
send_ids = params[:send_ids].split(" ")
|
send_ids = params[:send_ids].split(",")
|
||||||
subfield_id = params[:subfield]
|
subfield_id = params[:subfield]
|
||||||
if subfield_id.nil?
|
if subfield_id.nil?
|
||||||
@flag = false
|
@flag = false
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<div >
|
<div >
|
||||||
<div class="relateText fl mb10 mr5">发送到</div>
|
<div class="relateText fl mb10 mr5">发送到</div>
|
||||||
<div class="resourcesSendTo mr15">
|
<div class="resourcesSendTo mr15">
|
||||||
<select class="resourcesSendType" onclick="chooseSendType('<%= send_id%>','<%= send_ids%>','<%= User.current.id %>','file');">
|
<% send_ids = send_ids.class == String ? send_ids : send_ids.join(",") %>
|
||||||
|
<select class="resourcesSendType" onclick="chooseSendType2('<%= send_id%>','<%= send_ids%>','<%= User.current.id %>','file', '<%= @type %>');">
|
||||||
<option value="1">课程</option>
|
<option value="1">课程</option>
|
||||||
<option value="2">项目</option>
|
<option value="2">项目</option>
|
||||||
<option value="3" selected>组织</option>
|
<option value="3" selected>组织</option>
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
<div>
|
<div>
|
||||||
<div class="sendText fl mr10" style="width: auto">发送到</div>
|
<div class="sendText fl mr10" style="width: auto">发送到</div>
|
||||||
<div class="resourcesSendTo">
|
<div class="resourcesSendTo">
|
||||||
<select class="resourcesSendType" onclick="chooseSendType('<%= send_id %>','<%= send_ids %>','<%= User.current.id %>','file');">
|
<% send_ids = send_ids.class == String ? send_ids : send_ids.join(",") %>
|
||||||
|
<select class="resourcesSendType" onclick="chooseSendType2(<%= send_id %>,<%= send_ids %>,'<%= User.current.id %>','file', '<%= @type %>');">
|
||||||
<option value="1">课程</option>
|
<option value="1">课程</option>
|
||||||
<option value="2" selected>项目</option>
|
<option value="2" selected>项目</option>
|
||||||
<option value="3">组织</option>
|
<option value="3">组织</option>
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
<div>
|
<div>
|
||||||
<div class="sendText fl mr10" style="width: auto">发送到</div>
|
<div class="sendText fl mr10" style="width: auto">发送到</div>
|
||||||
<div class="resourcesSendTo">
|
<div class="resourcesSendTo">
|
||||||
<select class="resourcesSendType" onclick="chooseSendType2('<%= send_id %>','<%= send_ids%>','<%= User.current.id %>','file', '<%= @type %>');">
|
<% send_ids = send_ids.class == String ? send_ids : send_ids.join(",") %>
|
||||||
|
<select class="resourcesSendType" onclick="chooseSendType2('<%= send_id %>', '<%= send_ids%>','<%= User.current.id %>','file', '<%= @type %>');">
|
||||||
<option value="1">课程</option>
|
<option value="1">课程</option>
|
||||||
<option value="2">项目</option>
|
<option value="2">项目</option>
|
||||||
<option value="3">组织</option>
|
<option value="3">组织</option>
|
||||||
|
|
|
@ -1192,6 +1192,7 @@ function chooseSendType2(res_id,res_ids, user_id, send_type, type){
|
||||||
data:{send_id:res_id, send_ids:res_ids ,send_type:send_type}
|
data:{send_id:res_id, send_ids:res_ids ,send_type:send_type}
|
||||||
});
|
});
|
||||||
} else if(sendType == '2') {
|
} else if(sendType == '2') {
|
||||||
|
console.log(res_ids);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'get',
|
type: 'get',
|
||||||
url: '/users/' + user_id + '/search_user_project' + '?' + "&type=" + type,
|
url: '/users/' + user_id + '/search_user_project' + '?' + "&type=" + type,
|
||||||
|
|
Loading…
Reference in New Issue