Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/watchVideoModel.jsp =================================================================== diff -u -r29513 -r31363 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/watchVideoModel.jsp (.../watchVideoModel.jsp) (revision 29513) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/watchVideoModel.jsp (.../watchVideoModel.jsp) (revision 31363) @@ -1,109 +1,151 @@ -<%@ page contentType="text/html; charset=UTF-8"%> +<%@ page contentType="text/html; charset=UTF-8" %> + -<% - String tousseName = request.getParameter("tousseName"); -%> - - - + + var objectId = '${param.objectId}'; + var videoId = '${param.videoId}'; + -
-
-
-
-
+
+
- +
+
+
- + + \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r31362 -r31363 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 31362) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 31363) @@ -212,6 +212,7 @@ Ext4.getCmp('basketTreeGrid').getView().refresh(); } + function checkAllWaitPackingTaskNode(checked){ var rootNode = Ext4.getCmp('waitPackingTreeGrid').getRootNode(); if(rootNode != null){ @@ -226,41 +227,22 @@ } Ext4.getCmp('waitPackingTreeGrid').getView().refresh(); } -//视频观看 -function watchVideo(uuid_vedioNames){ - var url = Ext4.urlEncode({ - videoName : uuid_vedioNames - }); - var tousseName = Ext4.getCmp('imageName').getText(); - if(tousseName != ""){ - url = Ext4.urlEncode({ - videoName : uuid_vedioNames, - tousseName:tousseName - }); + +//配包教学视频 +function watchVideoModel(objectId){ + if (objectId !== '') { + var params = { + objectId: objectId + } + if(isIE()){ + openModalWindow(WWWROOT + "/disinfectsystem/basedatamanager/tousse/watchVideoModel.jsp?objectId="+objectId, '', "800", "390"); + }else { + openModalWindowForExt(WWWROOT + "/disinfectsystem/basedatamanager/tousse/watchVideoModel.jsp", params, "配包教学视频", "800", "390"); + } + }else { + showResult("请选择装配任务" , null , sstsConfig.messagePauseTimeOnPackingPage); } - openModalWindowForExt(WWWROOT+"/disinfectsystem/basedatamanager/tousse/watchVideo.jsp?"+url,'', "观看配包教学视频", "700", "400"); } -function watchVideoModel(uuid_vedioNames,td_id,tousseName){ - var url = Ext4.urlEncode({ - videoName : uuid_vedioNames - }); - if(tousseName != ""){ - url = Ext4.urlEncode({ - videoName :uuid_vedioNames, - tousseName:tousseName, - objectId:td_id - }); - } - openModalWindowForExt(WWWROOT+"/disinfectsystem/basedatamanager/tousse/watchVideoModel.jsp?"+url,'', "打包视频", "800", "390"); -} -function onSupplementIDCard(idCardInfo){ - return; - var text = idCardInfo.recyclingError.materialName+':'+'丢失'+idCardInfo.recyclingError.amount+',已补充'+idCardInfo.recyclingError.additionalAmount - var idCardErrorsInfoCmp = top.Ext4.getCmp('idCardErrorsInfo'); -// alert(idCardErrorsInfoCmp) - idCardErrorsInfoCmp.setText(text); -// idCardInfo.recyclingError -} function additionalMaterialCallback(success,type,packingTaskId){ if(packingTaskId != ""){ @@ -1359,14 +1341,8 @@ id:'btn_watchVideoBar', name:'btn_watchVideoBar', handler : function(){ - //var vedioName = Ext4.getCmp('vedioName').getValue(); - var videoName = ""; - var tousseName = Ext4.getCmp('imageName').getText(); var td_id = Ext4.getCmp('td_id').getValue(); - // if(vedioName != ""){ - watchVideoModel(videoName,td_id,tousseName); - //watchVideo(vedioName); - //} + watchVideoModel(td_id); } }, { Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/tousseUploadVideoManager.js =================================================================== diff -u -r28800 -r31363 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/tousseUploadVideoManager.js (.../tousseUploadVideoManager.js) (revision 28800) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/tousseUploadVideoManager.js (.../tousseUploadVideoManager.js) (revision 31363) @@ -1,322 +1,287 @@ +var toussePackingVideoStore;//器械包指定类型视频Store //排序:向上移动视频 -function moveUpVideo(id){ - VideoFileTableManager.moveUpVideoFile(id, function(){ - toussePackingVideoStore.reload(); - }); +function moveUpVideo(id) { + VideoFileTableManager.moveUpVideoFile(id, function () { + toussePackingVideoStore.reload(); + }); } + //排序:向下移动视频 -function moveDownVideo(id){ - VideoFileTableManager.moveDownVideoFile(id, function(){ - toussePackingVideoStore.reload(); - }); +function moveDownVideo(id) { + VideoFileTableManager.moveDownVideoFile(id, function () { + toussePackingVideoStore.reload(); + }); } + //写排序视频页面代码 -function moveUpDownVideo(v, p, record){ +function moveUpDownVideo(v, p, record) { var html = ''; - html += '向上移动'; - html += ''; - html += '向下移动'; - return html; + html += '向上移动'; + html += ''; + html += '向下移动'; + return html; } + //写删除视频页面代码 -function deleteOrDownLoadVideo(v, p, record){ - var html = ''; - html += '删除'; - html += ''; - html += '下载'; - return html; +function deleteOrDownLoadVideo(v, p, record) { + var html = ''; + html += '删除'; + html += ''; + html += '下载'; + return html; } -var toussePackingVideoStore;//器械包指定类型视频Store //写播放视频页面代码 -function playTeachingVideo(v, p, record){ - var html = ''; - html += '向上移动'; - return html; +function playTeachingVideo(v, p, record) { + var html = ''; + html += '向上移动'; + return html; } //下载视频 -function downloadVideo(objectId,uuid_vedioNames){ - location.href = WWWROOT + "/disinfectsystem/basedatamanager/tousse/downloadVideo.jsp?objectId="+objectId+"&videoName="+uuid_vedioNames; +function downloadVideo(objectId, uuid_vedioNames) { + location.href = WWWROOT + "/disinfectsystem/basedatamanager/tousse/downloadVideo.jsp?objectId=" + objectId + "&videoName=" + uuid_vedioNames; } -function watchVideoModel(uuid_vedioNames, td_id, tousseName){ - var url = Ext.urlEncode({ - videoName : uuid_vedioNames - }); - if(tousseName != ""){ - url = Ext.urlEncode({ - videoName : uuid_vedioNames, - tousseName:tousseName, - objectId:td_id - }); - } +//播放视频 +function watchVideoModel(objectId, videoId) { + if (objectId !== '') { + var params = { + objectId: objectId, + videoId: videoId + } - openModalWindowForExt(WWWROOT+"/disinfectsystem/basedatamanager/tousse/watchVideoModel.jsp?"+url,'', "打包视频", "800", "390"); + if(isIE()){ + openModalWindow(WWWROOT + "/disinfectsystem/basedatamanager/tousse/watchVideoModel.jsp?objectId="+objectId+'&videoId='+videoId, '', "800", "390"); + }else { + openModalWindowForExt(WWWROOT + "/disinfectsystem/basedatamanager/tousse/watchVideoModel.jsp", params, "配包教学视频", "800", "390"); + } + } } -//观看视频 -function watchVideo(uuid_vedioNames,tousseName){ - var url = Ext.urlEncode({ - videoName : uuid_vedioNames - }); - if(tousseName!=null && tousseName!=""){ - url = Ext.urlEncode({ - videoName : uuid_vedioNames, - tousseName:tousseName - }); - } - - openModalWindowForExt(WWWROOT+"/disinfectsystem/basedatamanager/tousse/watchVideo.jsp?"+url,'', "观看配包教学视频", "600", "400"); -} - //删除视频 -function deleteVideo(id,uuid_vedioNames){ - top.Ext.MessageBox.confirm("请确认","是否确定要删除配包教学视频?", - function(button, text) { - if ("yes" == button){ - Ext.Ajax.request({ - url : WWWROOT + '/disinfectSystem/baseData/videoFileAction!deleteVideo.do', - params : { - videoName : uuid_vedioNames, - objectId : id - }, - success : function(result){ - var resultObj = Ext.decode(result.responseText); - if(resultObj != null && resultObj.success){ - if(resultObj.msg == ""){ - toussePackingVideoStore.reload(); - showResult("删除成功!"); - top.Ext.getCmp('uuid_vedioNames').setValue(); - updateVideoUploadStatus(videoType, id); - grid.dwrReload(); - }else{ - if(resultObj.msg == "fileNotFound"){ - showResult("文件不存在,请确认文件是否已被删除!"); - }else if(resultObj.msg == "deleteFail"){ - showResult("文件删除失败,请手动删除或稍后再试!"); - } +function deleteVideo(id, uuid_vedioNames) { + top.Ext.MessageBox.confirm("请确认", "是否确定要删除配包教学视频?", function (button, text) { + if ("yes" == button) { + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/videoFileAction!deleteVideo.do', + params: { + videoName: uuid_vedioNames, + objectId: id + }, + success: function (result) { + var resultObj = Ext.decode(result.responseText); + if (resultObj != null && resultObj.success) { + if (resultObj.msg == "") { + toussePackingVideoStore.reload(); + showResult("删除成功!"); + updateVideoUploadStatus(videoType, id); + grid.dwrReload(); + } else { + if (resultObj.msg == "fileNotFound") { + showResult("文件不存在,请确认文件是否已被删除!"); + } else if (resultObj.msg == "deleteFail") { + showResult("文件删除失败,请手动删除或稍后再试!"); } } - grid.dwrReload(); - }, - failure : function(){ - } - }); + grid.dwrReload(); } }); + } + }); } //上传视频 -function uploadVideoWindow(videoType, id){ - var dialog = new top.Ext.ux.UploadDialog.Dialog({ - title: "上传" + videoType+'(注意:最大上传文件大小为500M)', +function uploadVideoWindow(videoType, id) { + var dialog = new top.Ext.ux.UploadDialog.Dialog({ + title: "上传" + videoType + '(注意:最大上传文件大小为500M)', //这里我用struts2做后台处理 - url:WWWROOT + '/disinfectSystem/baseData/videoFileAction!uploadVideo.do?videoType='+encodeURI(videoType)+'&objectId='+id , - post_var_name:'uploadFiles',//这里是自己定义的,默认的名字叫file - width : 450, - height : 300, - minWidth : 450, - minHeight : 300, - draggable : true , - resizable : true , - constraintoviewport: true , - permitted_extensions:['f4v','mp4','flv'], - modal: true , - reset_on_hide: false , - allow_close_on_upload: false , //关闭上传窗口是否仍然上传文件 - upload_autostart: false - }); + url: WWWROOT + '/disinfectSystem/baseData/videoFileAction!uploadVideo.do?videoType=' + encodeURI(videoType) + '&objectId=' + id, + post_var_name: 'uploadFiles',//这里是自己定义的,默认的名字叫file + width: 450, + height: 300, + minWidth: 450, + minHeight: 300, + draggable: true, + resizable: true, + constraintoviewport: true, + permitted_extensions: ['f4v', 'mp4', 'flv'], + modal: true, + reset_on_hide: false, + allow_close_on_upload: false, //关闭上传窗口是否仍然上传文件 + upload_autostart: false + }); dialog.show(); //定义上传完成回调函数 - dialog.on('uploadsuccess',function(dialog,filename,resp_data){ - if(resp_data!=null && resp_data.success){ - if( resp_data.msg==""){ + dialog.on('uploadsuccess', function (dialog, filename, resp_data) { + if (resp_data != null && resp_data.success) { + if (resp_data.msg == "") { showResult("文件上传成功!"); toussePackingVideoStore.reload(); - top.Ext.getCmp('uuid_vedioNames').setValue(resp_data.fileName); - + updateVideoUploadStatus(videoType, id); grid.dwrReload(); - }else{ + } else { showResult("文件上传失败!"); toussePackingVideoStore.reload(); } - dialog.hide(); + dialog.hide(); } }); dialog.show(); } //修改视频状态 function updateVideoUploadStatus(videoType, objectId) { - TousseDefinitionTableManager.updateVideoUploadStatus(objectId, videoType); + TousseDefinitionTableManager.updateVideoUploadStatus(objectId, videoType); } //打开id=id的器械包指定类型voideType的弹框 -function uploadToussePackingVideoFile(videoType,id){ - toussePackingVideoStore = new top.Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url:WWWROOT + '/disinfectSystem/baseData/videoFileAction!loadTousseTeachingVideo.do?videoType='+encodeURI(videoType)+'&objectId='+id , - method : 'POST' - }), - reader : new Ext.data.JsonReader({ - totalProperty : 'totalCount', - root : 'data' - }, [ - {name : 'id',mapping : 'id'}, - {name : 'videoName',mapping : 'videoName'}, - {name : 'uuid_videoName',mapping : 'uuid_videoName'}, - {name : 'td_id',mapping : 'td_id'}, - {name : 'tousseName',mapping : 'tousseName'} - ] - ) - }); - - toussePackingVideoStore.load(); - var cm = new top.Ext.grid.ColumnModel([ - { - name:'id', - hidden :true, - dataIndex : 'id' - },{ - name:'td_id', - hidden :true, - dataIndex : 'td_id' - },{ - name:'tousseName', - hidden :true, - dataIndex : 'tousseName' - },{ - id:'uuid_videoName', - hidden :true, - dataIndex : 'uuid_videoName' - },{ - id:'videoName', - menuDisabled: true, - header : "视频名称", - width:330, - dataIndex : 'videoName', - menuDisabled : true, - editor : new top.Ext.form.TextField({ - maxLength : 30, - minLength : 1, - allowBlank : false, - listeners:{ - change :function(field,newVal,oldVal,record){ - var selectedRecordData = top.Ext.getCmp('tousseTeachingVideoGrid').getSelectionModel().getSelections()[0].data; - var choose = false; - if(newVal != null && newVal.trim() != '' && newVal.trim() != oldVal.trim()){ - top.Ext.MessageBox.confirm("请确认","视频名称是否改为" + newVal.trim() + "?", - function(button, text) { - if ("yes" == button){ +function uploadToussePackingVideoFile(videoType, id) { + toussePackingVideoStore = new top.Ext.data.Store({ + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/videoFileAction!loadTousseTeachingVideo.do?videoType=' + encodeURI(videoType) + '&objectId=' + id, + method: 'POST' + }), + reader: new Ext.data.JsonReader({ + totalProperty: 'totalCount', + root: 'data' + }, [ + { name: 'id', mapping: 'id' }, + { name: 'videoName', mapping: 'videoName' }, + { name: 'uuid_videoName', mapping: 'uuid_videoName' }, + { name: 'td_id', mapping: 'td_id' }, + { name: 'tousseName', mapping: 'tousseName' } + ] + ) + }); + + toussePackingVideoStore.load(); + var cm = new top.Ext.grid.ColumnModel([{ + id: 'videoName', + menuDisabled: true, + header: "视频名称", + width: 330, + dataIndex: 'videoName', + menuDisabled: true, + editor: new top.Ext.form.TextField({ + maxLength: 30, + minLength: 1, + allowBlank: false, + listeners: { + change: function (field, newVal, oldVal, record) { + var selectedRecordData = top.Ext.getCmp('tousseTeachingVideoGrid').getSelectionModel().getSelections()[0].data; + if (newVal != null && newVal.trim() != '' && newVal.trim() != oldVal.trim()) { + top.Ext.MessageBox.confirm("请确认", "视频名称是否改为" + newVal.trim() + "?", + function (button, text) { + if ("yes" == button) { Ext.Ajax.request({ - url : WWWROOT + '/disinfectSystem/baseData/videoFileAction!updateVideoName.do', - params : { - id : selectedRecordData.id, - objectId : selectedRecordData.td_id, - oldUuidVideoName : selectedRecordData.uuid_videoName, - oldVideoName : oldVal, - newVideoName : newVal.trim() + url: WWWROOT + '/disinfectSystem/baseData/videoFileAction!updateVideoName.do', + params: { + id: selectedRecordData.id, + objectId: selectedRecordData.td_id, + oldUuidVideoName: selectedRecordData.uuid_videoName, + oldVideoName: oldVal, + newVideoName: newVal.trim() }, - success : function(result){ + success: function (result) { toussePackingVideoStore.reload(); }, - failure : function(){ + failure: function () { } }); - }else{ + } else { toussePackingVideoStore.reload(); } }); - } - }, - specialkey:function(field,e){ - if(e.getKey()==Ext.EventObject.ENTER){ - toussePackingVideoStore.reload(); - } } + }, + specialkey: function (field, e) { + if (e.getKey() == Ext.EventObject.ENTER) { + toussePackingVideoStore.reload(); + } } - }) - },{ - id:'moveUpDown', - menuDisabled: true, - header:'排序操作', - width:60, - renderer: moveUpDownVideo, - dataIndex:'button' - },{ - id:'deleteAction', - menuDisabled: true, - header:'删除 | 下载', - width:60, - renderer: deleteOrDownLoadVideo, - dataIndex:'button' - },{ - id:'playAction', - menuDisabled: true, - header:'播放', - width:60, - renderer: playTeachingVideo, - dataIndex:'button' - }]); - - var tbar = [{ - text : '上传视频', - handler:function(){ - uploadVideoWindow(videoType, id); - } - }]; - - var tousseVideoPanel = new top.Ext.FormPanel({ - id : 'teachingVideoMaintenanceForm', - frame : true, - labelAlign:'right', - labelSeparator : ':', - bodyStyle : 'padding:5px 5px 0px 5px', - autoWidth : true, - autoHeight : true, - autoScroll : true, - items:[{ - layout : 'column', - items : [{ - columnWidth : 1, - layout: 'form', - items : [ - new top.Ext.grid.EditorGridPanel({ - id : 'tousseTeachingVideoGrid', - store : toussePackingVideoStore, - tbar : tbar, - cm : cm, - height: 240, - frame : false, - autoExpandColumn : 'deleteAction', - bodyStyle : 'border:1px solid #afd7af', - anchor : '100%', - selModel : new top.Ext.grid.RowSelectionModel({ - singleSelect : false - }) - }) - ] - }] - }], - buttons : [{ - id : 'cancleBtn', - text : '取消', - handler : function() { - teachingVideoFormWindow.close(); - } - }] - }); - - var teachingVideoFormWindow = new top.Ext.Window( { - id : 'teachingVideoDeviceMaintenanceWin', - layout : 'fit', - title : videoType+"管理", - width : 600, - modal : true, - autoHeight : true, - border : false, - plain : true, - items : [tousseVideoPanel] - }); - teachingVideoFormWindow.show(); + } + }) + }, { + id: 'moveUpDown', + menuDisabled: true, + header: '排序操作', + width: 60, + renderer: moveUpDownVideo, + dataIndex: 'button' + }, { + id: 'deleteAction', + menuDisabled: true, + header: '删除 | 下载', + width: 60, + renderer: deleteOrDownLoadVideo, + dataIndex: 'button' + }, { + id: 'playAction', + menuDisabled: true, + header: '播放', + width: 60, + renderer: playTeachingVideo, + dataIndex: 'button' + }]); + + var tbar = [{ + text: '上传视频', + handler: function () { + uploadVideoWindow(videoType, id); + } + }]; + + var tousseVideoPanel = new top.Ext.FormPanel({ + id: 'teachingVideoMaintenanceForm', + frame: true, + labelAlign: 'right', + labelSeparator: ':', + bodyStyle: 'padding:5px 5px 0px 5px', + autoWidth: true, + autoHeight: true, + autoScroll: true, + items: [{ + layout: 'column', + items: [{ + columnWidth: 1, + layout: 'form', + items: [ + new top.Ext.grid.EditorGridPanel({ + id: 'tousseTeachingVideoGrid', + store: toussePackingVideoStore, + tbar: tbar, + cm: cm, + height: 240, + frame: false, + autoExpandColumn: 'deleteAction', + bodyStyle: 'border:1px solid #afd7af', + anchor: '100%', + selModel: new top.Ext.grid.RowSelectionModel({ + singleSelect: false + }) + }) + ] + }] + }], + buttons: [{ + id: 'cancleBtn', + text: '取消', + handler: function () { + teachingVideoFormWindow.close(); + } + }] + }); + + var teachingVideoFormWindow = new top.Ext.Window({ + id: 'teachingVideoDeviceMaintenanceWin', + layout: 'fit', + title: videoType + "管理", + width: 600, + modal: true, + autoHeight: true, + border: false, + plain: true, + items: [tousseVideoPanel] + }); + teachingVideoFormWindow.show(); } \ No newline at end of file