任务实操-资源更换接口

beetlsql3-dev
姚丹ab 2 years ago
parent e852565a9b
commit 1882c56e47

@ -670,13 +670,13 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT
//PPT资源库button
$("#pptClick").click(function (obj) {
updataResourcesOpenRe('','2,3');
updataResourcesOpenRe('2,3');
var htm = "已选中0";
$("#checkNumber").html(htm)
});
/*资源库上传弹出框*/
function updataResourcesOpenRe(resourcesInfoType,resourcesInfoTypePlural) {
function updataResourcesOpenRe(resourcesInfoTypePlural) {
checkStatusData = [];
layer.open({
type: 1,
@ -687,14 +687,14 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT
area: ['820px', '600px'],
content: $("#edit_dialog"),
success: function (layero, index) {
loadResourcesInfo(resourcesInfoType,resourcesInfoTypePlural);
loadResourcesInfo(resourcesInfoTypePlural);
$(".search").unbind();
$(".search").click(function () {searchList(resourcesInfoType,resourcesInfoTypePlural);}); //搜索
$(".search").click(function () {searchList(resourcesInfoTypePlural);}); //搜索
//table.reload('resourcesInfoTable');//刷新table
}, yes: function (index) {
var checkStatus = table.checkStatus("resourcesInfoTable"); //获取选中行状态
var dataNew = checkStatus.data, ids = Common.concatBatchId(dataNew, "resourcesInfoId"); //获取选中行数据
if(resourcesInfoType == 1){
if(resourcesInfoTypePlural == 1){
resourcesInfoShowInfo(checkStatusData)
}else if(resourcesInfoTypePlural == '2,3'){
resourcesInfoShowPPTInfo(checkStatusData)
@ -709,7 +709,7 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT
}
//资源库表格
function loadResourcesInfo(resourcesInfoType,resourcesInfoTypePlural) {
function loadResourcesInfo(resourcesInfoTypePlural) {
$("#edit_dialog input[name='resourcesInfoName']").val("");
resourcesInfoTable = table.render({
elem: '#resourcesInfoTable',
@ -718,8 +718,8 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT
method: 'post',
even: true,
//url: Common.ctxPath + '/jlw/resourcesInfo/list.json' // 数据接口
url: Common.ctxPath + '/jlw/resourcesInfo/resourcesList.json' // 数据接口
, where: getParamRe(resourcesInfoType,resourcesInfoTypePlural)
url: Common.ctxPath + '/jlw/resourcesInfo/getResourceSystemOAndUniversitiesList.json' // 数据接口
, where: getParamRe(resourcesInfoTypePlural)
, page: Lib.tablePage // 开启分页
, limit: 10,
cols: [[ // 表头
@ -899,9 +899,9 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT
/*资源表格搜索*/
/*资源表格搜索*/
function searchList(resourcesInfoType,resourcesInfoTypePlural) {
function searchList(resourcesInfoTypePlural) {
resourcesInfoTable.reload({
where: getParamRe(resourcesInfoType,resourcesInfoTypePlural),
where: getParamRe(resourcesInfoTypePlural),
page: {
curr: 1
}
@ -909,11 +909,10 @@ layui.define([ 'form','laytpl', 'laydate', 'table','element','handsOnSimulationT
}
/*资源库搜索条件*/
function getParamRe(resourcesInfoType,resourcesInfoTypePlural){
function getParamRe(resourcesInfoTypePlural){
var param = {
"courseInfoId_0": $("#edit_dialog select[name='courseInfoId_0']").val(),
"resourcesInfoName": $("#edit_dialog input[name = 'resourcesInfoName']").val(),
"resourcesInfoType":resourcesInfoType,
"resourcesInfoTypePlural":resourcesInfoTypePlural
};

@ -657,13 +657,13 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
//PPT资源库button
$("#pptClick").click(function (obj) {
updataResourcesOpenRe('','2,3');
updataResourcesOpenRe('2,3');
var htm = "已选中0";
$("#checkNumber").html(htm)
});
/*资源库上传弹出框*/
function updataResourcesOpenRe(resourcesInfoType,resourcesInfoTypePlural) {
function updataResourcesOpenRe(resourcesInfoTypePlural) {
checkStatusData = [];
layer.open({
type: 1,
@ -674,14 +674,14 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
area: ['820px', '600px'],
content: $("#edit_dialog"),
success: function (layero, index) {
loadResourcesInfo(resourcesInfoType,resourcesInfoTypePlural);
loadResourcesInfo(resourcesInfoTypePlural);
$(".search").unbind();
$(".search").click(function () {searchList(resourcesInfoType,resourcesInfoTypePlural);}); //搜索
$(".search").click(function () {searchList(resourcesInfoTypePlural);}); //搜索
//table.reload('resourcesInfoTable');//刷新table
}, yes: function (index) {
var checkStatus = table.checkStatus("resourcesInfoTable"); //获取选中行状态
var dataNew = checkStatus.data, ids = Common.concatBatchId(dataNew, "resourcesInfoId"); //获取选中行数据
if(resourcesInfoType == 1){
if(resourcesInfoTypePlural == 1){
resourcesInfoShowInfo(checkStatusData)
}else if(resourcesInfoTypePlural == '2,3'){
resourcesInfoShowPPTInfo(checkStatusData)
@ -696,7 +696,7 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
}
//资源库表格
function loadResourcesInfo(resourcesInfoType,resourcesInfoTypePlural) {
function loadResourcesInfo(resourcesInfoTypePlural) {
$("#edit_dialog input[name='resourcesInfoName']").val("");
resourcesInfoTable = table.render({
elem: '#resourcesInfoTable',
@ -705,8 +705,8 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
method: 'post',
even: true,
//url: Common.ctxPath + '/jlw/resourcesInfo/list.json' // 数据接口
url: Common.ctxPath + '/jlw/resourcesInfo/resourcesList.json' // 数据接口
, where: getParamRe(resourcesInfoType,resourcesInfoTypePlural)
url: Common.ctxPath + '/jlw/resourcesInfo/getResourceSystemOAndUniversitiesList.json' // 数据接口
, where: getParamRe(resourcesInfoTypePlural)
, page: Lib.tablePage // 开启分页
, limit: 10,
cols: [[ // 表头
@ -886,9 +886,9 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
/*资源表格搜索*/
/*资源表格搜索*/
function searchList(resourcesInfoType,resourcesInfoTypePlural) {
function searchList(resourcesInfoTypePlural) {
resourcesInfoTable.reload({
where: getParamRe(resourcesInfoType,resourcesInfoTypePlural),
where: getParamRe(resourcesInfoTypePlural),
page: {
curr: 1
}
@ -896,11 +896,10 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
}
/*资源库搜索条件*/
function getParamRe(resourcesInfoType,resourcesInfoTypePlural){
function getParamRe(resourcesInfoTypePlural){
var param = {
"courseInfoFullId": $("#edit_dialog select[name='courseInfoId_1']").val(),
"resourcesInfoName": $("#edit_dialog input[name = 'resourcesInfoName']").val(),
"resourcesInfoType":resourcesInfoType,
"resourcesInfoTypePlural":resourcesInfoTypePlural
};
return param;

@ -92,9 +92,7 @@
</thead>
<tbody id="demoList">
<div></div>
<!--#if(teacherOpenCourseHandsOn.trainingData != null && teacherOpenCourseHandsOn.trainingData != 'null'
&& teacherOpenCourseHandsOn.trainingData != ''
&& teacherOpenCourseHandsOn.trainingData != '""'){-->
<!--#if(teacherOpenCourseHandsOn.trainingData != null && teacherOpenCourseHandsOn.trainingData != 'null' && teacherOpenCourseHandsOn.trainingData != '' && teacherOpenCourseHandsOn.trainingData != '""'){-->
<!--# var files = JsonString(teacherOpenCourseHandsOn.trainingData); //数据集-->
<!--# for(item in files){ -->
<tr class="uploader-file">
@ -149,7 +147,7 @@
</thead>
<tbody >
<!--#if(handsOnSimulationTasks != null && && handsOnSimulationTasks != 'null' && handsOnSimulationTasks != '""' && handsOnSimulationTasks != []){-->
<!--#if(handsOnSimulationTasks != null && handsOnSimulationTasks != 'null' && handsOnSimulationTasks != '""' && handsOnSimulationTasks != []){-->
<!--# for(item in handsOnSimulationTasks){ -->
<tr>
<td>${item.taskOrder}</td>

Loading…
Cancel
Save