Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/importbasedata/importBasedata.jsp =================================================================== diff -u -r29513 -r33765 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/importbasedata/importBasedata.jsp (.../importBasedata.jsp) (revision 29513) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/importbasedata/importBasedata.jsp (.../importBasedata.jsp) (revision 33765) @@ -12,6 +12,8 @@ + + @@ -54,13 +56,28 @@ YAHOO.util.Event.onContentReady('top-stories', function() { var modules = YAHOO.util.Dom.getElementsByClassName('mod', 'div', this); - YAHOO.util.Dom.batch(modules, function(module) { - tabView.addTab( new YAHOO.widget.Tab({ - label: module.getElementsByTagName('h3')[0].innerHTML, - contentEl: YAHOO.util.Dom.getElementsByClassName('bd', - 'div', module)[0] - })); + if(module.getAttribute('id') !== 'showExportZipContent' && module.getAttribute('id') !== 'showExportZipContent2'){ + tabView.addTab( new YAHOO.widget.Tab({ + label: module.getElementsByTagName('h3')[0].innerHTML, + contentEl: YAHOO.util.Dom.getElementsByClassName('bd', + 'div', module)[0] + })); + } + if(sstsConfig.enableExportVideosAndPicturesAndOtherFilesOfTousseDefinitions && module.getAttribute('id') == 'showExportZipContent'){ + tabView.addTab( new YAHOO.widget.Tab({ + label: module.getElementsByTagName('h3')[0].innerHTML, + contentEl: YAHOO.util.Dom.getElementsByClassName('bd', + 'div', module)[0] + })); + } + if(sstsConfig.enableExportFilesOfTrainingModule && module.getAttribute('id') == 'showExportZipContent2'){ + tabView.addTab( new YAHOO.widget.Tab({ + label: module.getElementsByTagName('h3')[0].innerHTML, + contentEl: YAHOO.util.Dom.getElementsByClassName('bd', + 'div', module)[0] + })); + } YAHOO.util.Dom.setStyle(module, 'display', 'none'); /* hide modules */ }); @@ -130,10 +147,98 @@ function exportData(){ location.href = "${ctx}/disinfectsystem/basedatamanager/importbasedata/exportBasedata.jsp"; } +function exportZipData(type){ + var html = '

正在导出,根据导出内容的大小不同,可能需要等待30-90分钟或者更长时间,请稍候......

'; + var url = ''; + if(type == 1){ + $('.bd1').html(html); + url = '${ctx}/disinfectSystem/exportZipFileAction!exportZipVideosAndPicturesAndOtherFilesOfTousseDefinitions.do'; + }else { + $('.bd2').html(html); + url = '${ctx}/disinfectSystem/exportZipFileAction!exportFilesOfTrainingModule.do'; + } + $.ajax({ + type:'post', + dataType:'json', + url : url, + success : function(result) { + if(result.success){ + flushProgress(type); + }else { + if(type == 1){ + $('.bd1').html(''); + }else { + $('.bd2').html(''); + } + showResult(result.msg); + } + } + }) +} +function flushProgress(type){ + var module; + if(type == 1){ + module = 'TousseDefinition'; + }else { + module = 'TrainingModule'; + } + $.ajax({ + type:'post', + dataType:'json', + url : '${ctx}/disinfectSystem/exportZipFileAction!flushProgress.do', + data:{ + 'module':module + }, + success : function(result) { + if(result.success){ + if(result.data.percent > 0 && result.data.percent !== 100){ + var html = '

导出成功,导出进度为'+result.data.percentText+'

'; + if(type == 1){ + $('.bd1').html(html); + }else { + $('.bd2').html(html); + } + setTimeout(function(){ + flushProgress(type); + }, 2000); + }else if(result.data.percent == 100){ + var html = '

导出成功,请点击文件名下载:

'; + html += '

服务器路径:'+result.data.fileSavePath+'

'; + html += '

文件名:'+result.data.fileName+'

'; + if(type == 1){ + $('.bd1').html(html); + }else { + $('.bd2').html(html); + } + } + } + } + }) +} + +window.onload = function(){ + if(sstsConfig.enableExportVideosAndPicturesAndOtherFilesOfTousseDefinitions){ + document.getElementById('showExportZipButton').style.display = 'block'; + flushProgress(1); + } + if(sstsConfig.enableExportFilesOfTrainingModule){ + document.getElementById('showExportZipButton2').style.display = 'block'; + flushProgress(2); + } +} + + @@ -160,6 +265,12 @@
  • 查看文件格式
  • + + @@ -205,8 +316,24 @@ +
    +
    +

    导出包定义的影像及关联文件

    +
    +
    + +
    +
    +
    +

    导出培训管理文件

    +
    +
    + +
    + + \ No newline at end of file