Index: ssts-web/src/main/webapp/WEB-INF/spring/applicationContext-acegi-security.xml
===================================================================
diff -u -r39876 -r40529
--- ssts-web/src/main/webapp/WEB-INF/spring/applicationContext-acegi-security.xml (.../applicationContext-acegi-security.xml) (revision 39876)
+++ ssts-web/src/main/webapp/WEB-INF/spring/applicationContext-acegi-security.xml (.../applicationContext-acegi-security.xml) (revision 40529)
@@ -129,6 +129,8 @@
+
+
Index: ssts-web/src/main/webapp/disinfectsystem/config/zsdxfsdeyy/config.js
===================================================================
diff -u -r40302 -r40529
--- ssts-web/src/main/webapp/disinfectsystem/config/zsdxfsdeyy/config.js (.../config.js) (revision 40302)
+++ ssts-web/src/main/webapp/disinfectsystem/config/zsdxfsdeyy/config.js (.../config.js) (revision 40529)
@@ -331,6 +331,8 @@
enableCustomReportModule:true,
//申请单界面是否显示选择模板的下拉框
isOpenLoadTemplateByUnit:true,
+ //启用培训管理功能的版权管理模式
+ enableCopyrightManagementModelOfTrainingManage:true,
//启用发货管理的一次性物品树状结构模式
enableTheDisposableGoodsTreeModeForiInvoiceView:true
}
\ No newline at end of file
Index: ssts-web/src/main/webapp/knowledge/viewExt.js
===================================================================
diff -u -r34874 -r40529
--- ssts-web/src/main/webapp/knowledge/viewExt.js (.../viewExt.js) (revision 34874)
+++ ssts-web/src/main/webapp/knowledge/viewExt.js (.../viewExt.js) (revision 40529)
@@ -6,6 +6,528 @@
var trainingRecordStore;
var formPanel;
+Ext.apply(Ext.form.VTypes, {
+ minLength: function (value, field) {
+ return value.length >= (field.minLength || 0);
+ },
+ minLengthText: '至少需要 {0} 个字符'
+});
+
+//ZSRY-126:加载下载密码
+function loadDownloadPassword(downType) {
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/downloadPasswordController/loadDownloadPassword.mhtml',
+ success: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ if (result.success) {
+ var downloadPassword = '';
+ if (result.data && result.data.downloadPassword) {
+ downloadPassword = result.data.downloadPassword;
+ }
+ if (downType == 0) {
+ if (downloadPassword == '') {
+ Ext.MessageBox.confirm("请确认", "是否下载附件?", function (btn) {
+ if (btn == 'yes') {
+ showAllField();
+ }
+ });
+ } else {
+ showDownFieldWindow();
+ }
+ } else {
+ showPasswordDownWindow(downloadPassword);
+ }
+ } else {
+ showResult(result.message);
+ }
+ }
+ });
+}
+
+//ZSRY-126:设置下载密码
+function setDownloadPassword(downloadPassword) {
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/downloadPasswordController/setDownloadPassword.mhtml',
+ params: {
+ downloadPassword: encryptText(downloadPassword, DEVICEINTERFACE_ENCRPT_DEPTH)
+ },
+ success: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ showResult(result.message);
+ if (result.success) {
+ Ext.getCmp('passwordDownWindow').close();
+ }
+ }
+ });
+}
+
+//ZSRY-126:清除密码
+function clearDownloadPassword() {
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/downloadPasswordController/clearDownloadPassword.mhtml',
+ success: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ showResult(result.message);
+ if (result.success) {
+ Ext.getCmp('passwordDownWindow').close();
+ }
+ }
+ });
+}
+
+//ZSRY-126:校验下载密码
+function downloadPasswordVerification(downloadPassword, window) {
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/downloadPasswordController/downloadPasswordVerification.mhtml',
+ params: {
+ downloadPassword: encryptText(downloadPassword, DEVICEINTERFACE_ENCRPT_DEPTH)
+ },
+ success: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ if (result.success) {
+ window.close();
+ showAllField();
+ } else {
+ showResult(result.message);
+ }
+ }
+ });
+}
+
+//ZSRY-126:显示所有附件
+function showAllField() {
+ var row = grid.getSelectionModel().getSelections();
+ if (row.length == 0) {
+ showResult('请至少选择一条记录!');
+ return
+ }
+ var fkeyId = '';
+ for (var i = 0; i < row.length; i++) {
+ var id = row[i].data.id;
+ if (fkeyId == '') {
+ fkeyId = id;
+ } else {
+ fkeyId += ';' + id;
+ }
+ }
+ AttachFileManager.getAttachFilesIdAndFileName('KnowledgeFile1', fkeyId, function (attachFileList) {
+ if (attachFileList.length > 0) {
+ showFieldWindow(attachFileList);
+ }
+ });
+}
+
+//ZSRY-126:播放视频
+function playVideoForField(UUIDFileName, fileName) {
+ var url = Ext.urlEncode({
+ videoName: UUIDFileName, //视频播放文件名
+ fileName: fileName //文件名
+ });
+ openModalWindowForExt(WWWROOT + "/knowledge/watchVideo.jsp?" + url, '', "观看视频", "930", "538");
+}
+
+//ZSRY-126:预览
+function prevewField(id, name, moduleId) {
+ moduleId = moduleId || 'trainingManage';
+ var originUrl = WWWROOT + "/attachfiles/fileDownLoad?loadType=open&moduleId=" + moduleId + "&id=" + id + '&fullfilename=' + name;
+ var url = 'http://127.0.0.1:8012/onlinePreview?url=' + encodeURIComponent(Base64.encode(originUrl));
+ var win = new top.Ext.Window({
+ title: '文件预览',
+ id: 'extWindow',
+ width: 980,
+ height: 600,
+ autoScroll: false,
+ isTopContainer: true,
+ modal: true,
+ resizable: false,
+ items: [{
+ xtype: 'panel',
+ html: ""
+ }],
+ listeners: {
+ render: function (win) {
+ var overlay = win.body.createChild({
+ tag: 'div',
+ style: 'position:absolute;top:0;left:0;width:97%;height:100%;z-index:9999;'
+ });
+ overlay.on('contextmenu', function (e) {
+ e.preventDefault()
+ });
+ }
+ }
+ })
+ win.show();
+}
+
+//ZSRY-126:获取文件类型
+function getFileType(attachType) {
+ if (attachType == '.mp4' || attachType == '.avi' || attachType == '.wmv') {
+ return 'video'
+ } else {
+ return 'file'
+ }
+}
+
+//ZSRY-126:批量下载文件
+function batchDownField(index, ids) {
+ if (index < ids.length) {
+ location.href = WWWROOT + "/networkdisk/downloadAttachFile.mhtml?id=" + ids[index]
+ setTimeout(function () {
+ batchDownField(index + 1, ids)
+ }, 500);
+ }
+}
+
+//ZSRY-126:显示所有附件
+function showFieldWindow(attachFileList) {
+ var store = new top.Ext.data.Store({
+ data: attachFileList,
+ reader: new top.Ext.data.JsonReader({
+ fields: [
+ { name: 'id' },
+ { name: 'UUIDFileName' },
+ { name: 'attachFileName' },
+ { name: 'attachType' },
+ { name: 'contentType' }
+ ]
+ })
+ });
+ var selectModel = new top.Ext.grid.CheckboxSelectionModel();
+ var gridPanel = new top.Ext.grid.GridPanel({
+ store: store,
+ id: 'gridPanel',
+ autoScroll: true,
+ width: 480,
+ height: 220,
+ tbar: [{
+ text: '批量下载',
+ handler: function () {
+ var row = gridPanel.getSelectionModel().getSelections();
+ if (row.length > 0) {
+ var ids = [];
+ for (var i = 0; i < row.length; i++) {
+ var id = row[i].data.id;
+ ids.push(id);
+ }
+ batchDownField(0, ids);
+ }
+ }
+ }],
+ bodyStyle: 'border:1px solid #afd7af',
+ sm: selectModel,
+ cm: new top.Ext.grid.ColumnModel([selectModel,
+ { header: "名称", width: 380, dataIndex: 'attachFileName', menuDisabled: true },
+ {
+ header: "操作", width: 100, menuDisabled: true, renderer: function (v, p, record) {
+ var str = "预览";
+ if (getFileType(record.data.attachType) == 'video') {
+ str = "播放";
+ }
+ str += "下载";
+ return str;
+ }
+ }
+ ]),
+ frame: false,
+ viewConfig: { forceFit: true }
+ })
+
+ var window = new top.Ext.Window({
+ id: 'fieldWindow',
+ title: '显示附件',
+ width: 500,
+ height: 250,
+ border: false,
+ modal: true,
+ closeAction: 'close',
+ items: [gridPanel]
+ });
+
+ window.show();
+}
+
+//ZSRY-126:修改密码
+function showPasswordDownWindow(downloadPassword) {
+ var formObj = new Ext.FormPanel({
+ frame: true,
+ labelSeparator: ':',
+ bodyStyle: 'padding:5px 5px 0px 25px',
+ width: 400,
+ labelWidth: 80,
+ labelAlign: 'right',
+ items: [{
+ layout: 'column',
+ items: [{
+ columnWidth: .5,
+ layout: 'form',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '当前密码',
+ inputType: downloadPassword == '' ? '' : 'password',
+ name: 'oldPassword',
+ id: 'oldPassword',
+ width: 280,
+ value: downloadPassword == '' ? '未设置' : downloadPassword,
+ readOnly: true,
+ cls: 'fieldReadOnlyNoRemove',
+ allowBlank: true
+ }]
+ }, {
+ columnWidth: .5,
+ layout: 'form',
+ id: 'showPwdButton',
+ hidden: downloadPassword == '',
+ items: [{
+ xtype: 'button',
+ text: '显示密码',
+ handler: function () {
+ var downloadPasswordText = dencryptText(downloadPassword, DEVICEINTERFACE_ENCRPT_DEPTH);
+ Ext.getCmp('oldPassword').setValue(downloadPasswordText);
+ var textField = Ext.getCmp('oldPassword');
+ var inputEl = textField.getEl().dom;
+ inputEl.type = 'text'
+ Ext.getCmp('showPwdButton').hide();
+ Ext.getCmp('hiddenPwdButton').show();
+ }
+ }]
+ }, {
+ columnWidth: .5,
+ layout: 'form',
+ id: 'hiddenPwdButton',
+ hidden: true,
+ items: [{
+ xtype: 'button',
+ text: '隐藏密码',
+ handler: function () {
+ Ext.getCmp('oldPassword').setValue(downloadPassword);
+ var textField = Ext.getCmp('oldPassword');
+ var inputEl = textField.getEl().dom;
+ inputEl.type = 'password'
+ Ext.getCmp('showPwdButton').show();
+ Ext.getCmp('hiddenPwdButton').hide();
+ }
+ }]
+ }, {
+ columnWidth: 1,
+ layout: 'form',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '新密码',
+ inputType: 'password',
+ name: 'downloadPassword',
+ id: 'downloadPassword',
+ minLength: 6,
+ width: 280,
+ allowBlank: false,
+ blankText: '请输入新密码!',
+ msgTarget: 'side'
+ }]
+ }, {
+ columnWidth: 1,
+ layout: 'form',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '确认新密码',
+ inputType: 'password',
+ name: 'confirmNewPassword',
+ id: 'confirmNewPassword',
+ minLength: 6,
+ width: 280,
+ allowBlank: false,
+ blankText: '请输入确认新密码!',
+ msgTarget: 'side'
+ }]
+ }]
+ }],
+
+ buttons: [{
+ text: '确认',
+ handler: save
+ }, {
+ text: '清除密码',
+ handler: function () {
+ Ext.MessageBox.confirm("请确认", "是否清除密码?", function (btn) {
+ if (btn == 'yes') {
+ clearDownloadPassword();
+ }
+ });
+ }
+ }, {
+ text: '取消',
+ handler: function () {
+ Ext.getCmp('passwordDownWindow').close();
+ }
+ }]
+ });
+
+ function save() {
+ if (!formObj.form.isValid()) {
+ Ext.MessageBox.show({
+ title: '错误提示',
+ msg: '请正确填写表单各值。',
+ buttons: Ext.Msg.OK,
+ icon: Ext.Msg.ERROR
+ });
+ return false;
+ }
+ var downloadPassword = Ext.getCmp('downloadPassword').getValue();
+ var confirmNewPassword = Ext.getCmp('confirmNewPassword').getValue();
+ if (downloadPassword != confirmNewPassword) {
+ Ext.MessageBox.show({
+ title: '错误提示',
+ msg: '新密码与确认新密码不一致,请重新填写!',
+ buttons: Ext.Msg.OK,
+ icon: Ext.Msg.ERROR
+ });
+ return false;
+ }
+ Ext.MessageBox.confirm("请确认", "是否修改密码?", function (btn) {
+ if (btn == 'yes') {
+ setDownloadPassword(downloadPassword);
+ }
+ });
+ }
+
+ var window = new Ext.Window({
+ id: 'passwordDownWindow',
+ layout: 'fit',
+ title: '修改密码',
+ width: 440,
+ height: 185,
+ modal: true,
+ border: false,
+ plain: true,
+ modal: true,
+ closeAction: 'close',
+ items: [formObj]
+ });
+
+ window.show();
+}
+
+//ZSRY-126:下载附件
+function showDownFieldWindow() {
+ var window;
+ var formObj = new Ext.FormPanel({
+ frame: true,
+ labelSeparator: ':',
+ bodyStyle: 'padding:5px 5px 0px 25px',
+ width: 300,
+ labelWidth: 60,
+ labelAlign: 'right',
+ items: [{
+ layout: 'column',
+ items: [{
+ columnWidth: 1,
+ layout: 'form',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '',
+ labelSeparator: '',
+ width: 280,
+ value: '请输入下载密码:',
+ readOnly: true,
+ cls: 'fieldReadOnlyNoRemove',
+ allowBlank: true
+ }]
+ }, {
+ columnWidth: 1,
+ layout: 'form',
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '密码',
+ inputType: 'password',
+ name: 'downloadPassword2',
+ id: 'downloadPassword2',
+ minLength: 6,
+ allowBlank: false,
+ blankText: '请输入密码!',
+ msgTarget: 'side'
+ }]
+ }]
+ }],
+
+ buttons: [{
+ text: '保存',
+ handler: function () {
+ var downloadPassword = Ext.getCmp('downloadPassword2').getValue();
+ if (downloadPassword == '') {
+ showResult('密码不能为空!');
+ return
+ }
+ downloadPasswordVerification(downloadPassword, window);
+ }
+ }, {
+ text: '取消',
+ handler: function () {
+ window.close();
+ }
+ }]
+ });
+
+ window = new Ext.Window({
+ layout: 'fit',
+ title: '下载',
+ width: 340,
+ height: 150,
+ modal: true,
+ border: false,
+ plain: true,
+ modal: true,
+ closeAction: 'close',
+ items: [formObj]
+ });
+
+ window.show();
+}
+
+//DGKHYY-25:显示PDA安装包下载地址的二维码
+function showPDADownloadWindow() {
+ document.getElementById('downloadImage').innerHTML = '';
+ var imagePanel = new top.Ext.Panel({
+ id: 'downloadImagePanel',
+ layout: 'fit',
+ bbar: [{
+ xtype: 'button',
+ text: '请在PDA端使用浏览器或下载功能扫描二维码进行下载'
+ }],
+ items: [{
+ xtype: 'box',
+ id: 'browseImage',
+ fieldLabel: "二维码",
+ autoEl: {
+ id: 'downloadImageBrowse',
+ tag: 'div',
+ complete: 'off'
+ }
+ }]
+ });
+
+ var url = WWWROOT + '/mobileClient/mobileClientAction!downloadPdaInstallPackage.do';
+ var qrcode = new QRCode("downloadImage", url);
+ setTimeout(function () {
+ var imgHtml = document.getElementById('downloadImage').innerHTML;
+ var downloadImageBrowse = top.Ext.get('downloadImageBrowse');
+ var image = downloadImageBrowse.dom;
+ image.innerHTML = imgHtml;
+ }, 1000);
+ var window = new top.Ext.Window({
+ id: 'PDADownloadWindow',
+ layout: 'fit',
+ title: 'PDA客户端下载',
+ width: 308,
+ height: 350,
+ modal: true,
+ border: false,
+ plain: true,
+ modal: true,
+ closeAction: 'close',
+ items: [imagePanel]
+ });
+
+ window.show();
+}
+
//删除
function deleteFileAndFolder() {
var moduleId = getModuleId();
@@ -37,7 +559,7 @@
videoName: params.videoName, //视频播放文件名
fileName: params.fileName //文件名
});
- openModalWindowForExt(WWWROOT + "/knowledge/watchVideo.jsp?" + url, '', "观看视频", "565", "390");
+ openModalWindowForExt(WWWROOT + "/knowledge/watchVideo.jsp?" + url, '', "观看视频", "930", "538");
} else if (type == 'image') {
document.getElementById('clickTab').click();
} else {
@@ -150,13 +672,6 @@
accumulateReadRecord(id, 'video', params);
}
-//打开图片
-function openImg(attachFileId, moduleId, id) {
- var linkUrl = WWWROOT + "/attachfiles/fileDownLoad?loadType=open&id=" + attachFileId + "&moduleId=" + moduleId;
- document.getElementById('clickTab').setAttribute('href', linkUrl);
- accumulateReadRecord(id, 'image');
-}
-
function openUrl(id, url) {
var params = {
url: url
@@ -169,12 +684,13 @@
var linkUrl = record.data['linkUrl'];
var attachFileType = record.data['attacnFileType'];
var attachFileId = record.data['attachFileId'];
+ var attachFileName = record.data['attachFileName'];
if (!isUndefinedOrNullOrEmpty(attachFileId) && attachFileId.indexOf(",") == -1) {
//判断类型是否包含video包含为视频文件
if (attachFileType.indexOf("video") >= 0) {
v = '
' + v + '';
} else {
- v = '
' + v + '';
+ v = '
' + v + '';
}
} else {
//如果不为空,则目前加载的文件,要重新设置对应文件的url,如果是目前加载目录,这个url是一个js的方法
@@ -578,22 +1094,36 @@
items: [{
text: '增加文件',
iconCls: 'btn_ext_add',
- hidden:SSTS_TrainingManage_Add,
+ hidden: SSTS_TrainingManage_Add,
handler: function () { addFile(); }
}, '-', {
text: '增加文件夹',
iconCls: 'btn_ext_add_folder',
- hidden:SSTS_TrainingManage_Add,
+ hidden: SSTS_TrainingManage_Add,
handler: function () { addFolder(); }
}, '-', {
text: '修改',
iconCls: 'btn_ext_edit',
- hidden:SSTS_TrainingManage_Update,
+ hidden: SSTS_TrainingManage_Update,
handler: function () { updateFileAndFolder(); }
}, '-', {
+ text: '下载',
+ iconCls: 'btn_ext_upload',
+ hidden: SSTS_TrainingManage_Download,
+ handler: function () {
+ loadDownloadPassword(0);
+ }
+ }, '-', {
+ text: '下载密码管理',
+ iconCls: 'btn_ext_application_todo',
+ hidden: SSTS_DownloadPassword_Manager,
+ handler: function () {
+ loadDownloadPassword(1);
+ }
+ }, '-', {
text: '删除',
iconCls: 'btn_remove',
- hidden:SSTS_TrainingManage_Delete,
+ hidden: SSTS_TrainingManage_Delete,
handler: function () { deleteFileAndFolder(); }
}, '-', {
text: '上一文件夹',
Index: ssts-web/src/main/webapp/knowledge/viewExt.jsp
===================================================================
diff -u -r34874 -r40529
--- ssts-web/src/main/webapp/knowledge/viewExt.jsp (.../viewExt.jsp) (revision 34874)
+++ ssts-web/src/main/webapp/knowledge/viewExt.jsp (.../viewExt.jsp) (revision 40529)
@@ -1,15 +1,29 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
+<%@page import="com.forgon.tools.crypto.coder.CoderEncryption"%>
<%@ include file="/common/taglibs.jsp"%>
+<%
+ request.setAttribute("userName",AcegiHelper.getLoginUser().getUserFullName());
+%>
+<%@ include file="/common/includeExtJsAndCss.jsp"%>
+
+
+
+
+
+
+
+
+
-<%@ include file="/common/includeExtJsAndCss.jsp"%>
-
-
-
-
-
-
-<%
- request.setAttribute("userName",AcegiHelper.getLoginUser().getUserFullName());
-%>