Index: ssts-web/src/main/webapp/personalSetting/modifyPWDByExt.js =================================================================== diff -u -r37676 -r38086 --- ssts-web/src/main/webapp/personalSetting/modifyPWDByExt.js (.../modifyPWDByExt.js) (revision 37676) +++ ssts-web/src/main/webapp/personalSetting/modifyPWDByExt.js (.../modifyPWDByExt.js) (revision 38086) @@ -1,118 +1,113 @@ -Ext.onReady(function(){ - Ext.QuickTips.init(); +var formObj; +//保存 +function save() { + if (!formObj.form.isValid()) { + showResult('请正确填写表单各值。'); + return false; + } + var checkPasswordResult = testPasswordReg(Ext4.getCmp('newPassword').getValue(), userNameID) + if (!checkPasswordResult.success) { + showResult(checkPasswordResult.msg); + return false; + } + if (Ext4.getCmp('newPassword').getValue() != Ext4.getCmp('confirmNewPassword').getValue()) { + showResult('新密码与确认新密码不一致,请重新填写!'); + return false; + } + + formObj.form.submit({ + url: WWWROOT + '/personalSetting/modifyPWDByExt/save.do', + method: 'POST', + waitMsg: '正在修改密码,请稍候', + waitTitle: '修改密码', + success: function (form, action) { + if (action.result && action.result.success) { + alert('修改密码成功,退出返回登录页面!'); + logout(WWWROOT); + } else { + showResult('修改密码失败!'); + } + }, + failure: function (form, action) { + if (action.result && action.result.message) { + showResult(action.result.message); + } else { + showResult('修改密码失败!'); + } + } + }); +} + +Ext4.onReady(function () { + Ext4.QuickTips.init(); + //ZSRY-72:增加密码设置要求提示语 - var msg = getModifyPwdMsg(); - - var formObj = new Ext.FormPanel({ - labelAlign: 'left', - frame:true, - labelSeparator:':', + var msg = getModifyPwdMsg(); + + formObj = new Ext4.form.Panel({ + frame: true, + labelSeparator: ':', title: '密码设置', - bodyStyle:'padding:5px 5px 0px 25px', + bodyStyle: 'padding:5px 5px 0px 25px', width: 440, - labelWidth:80, + fieldDefaults: { + labelAlign: 'left', + labelWidth: 80 + }, + border: false, + buttonAlign: 'center', items: [{ - xtype: 'textfield', + xtype: 'textfield', fieldLabel: '旧密码', inputType: 'password', name: 'oldPassword', id: 'oldPassword', - width: 280, - allowBlank:false, - blankText:'请输入旧密码!', - msgTarget:'side' - },{ - xtype: 'textfield', + anchor: '99%', + allowBlank: false, + blankText: '请输入旧密码!', + msgTarget: 'side' + }, { + xtype: 'textfield', fieldLabel: '新密码', inputType: 'password', name: 'newPassword', id: 'newPassword', - width: 280, - allowBlank:false, - blankText:'请输入新密码!', - msgTarget:'side' - },{ - xtype: 'textfield', + anchor: '99%', + allowBlank: false, + blankText: '请输入新密码!', + msgTarget: 'side' + }, { + xtype: 'textfield', fieldLabel: '确认新密码', inputType: 'password', name: 'confirmNewPassword', id: 'confirmNewPassword', - width: 280, - allowBlank:false, - blankText:'请输入确认新密码!', - msgTarget:'side' + anchor: '99%', + allowBlank: false, + blankText: '请输入确认新密码!', + msgTarget: 'side' }, { - items:[{ - hidden:msg == ''?true:false, - layout:'column', - items:[{ - id:'showPwdMessage', - xtype:'textfield', - width : 390, - allowBlank : true, - labelSeparator:'', - labelWidth:0, - anchor: '99%', - readOnly : true, - cls : 'fieldReadOnlyNoRemove', - value: msg - }] - }] - }], + id: 'showPwdMessage', + xtype: 'displayfield', + hidden: msg == '' ? true : false, + height: 30, + anchor: '99%', + value: msg + }], buttons: [{ - id:'saveBtn', + id: 'saveBtn', text: '确认', handler: save - },{ + }, { text: '取消', - handler:gohistory + handler: gohistory }] }); formObj.render("formDiv"); - if(msg !== ''){ - Ext.getCmp('showPwdMessage').el.dom.style.color = 'red'; - } - Ext.getCmp('oldPassword').focus(); - function save(){ - if(!formObj.form.isValid()){ - Ext.MessageBox.show({title:'错误提示', msg:'请正确填写表单各值。',buttons:Ext.Msg.OK,icon:Ext.Msg.ERROR}); - return false; - } - //暂时屏蔽验证复杂密码 - var checkPasswordResult = testPasswordReg(Ext.getCmp('newPassword').getValue(),userNameID) - if(!checkPasswordResult.success){ - Ext.MessageBox.show({title:'错误提示', msg:checkPasswordResult.msg, buttons:Ext.Msg.OK,icon:Ext.Msg.ERROR}); - return false; - } - if(Ext.getCmp('newPassword').getValue() != Ext.getCmp('confirmNewPassword').getValue()){ - Ext.MessageBox.show({title:'错误提示', msg:'新密码与确认新密码不一致,请重新填写!',buttons:Ext.Msg.OK,icon:Ext.Msg.ERROR}); - return false; - } - formObj.form.submit({ - url:WWWROOT+'/personalSetting/modifyPWDByExt/save.do', - method:'POST', - waitMsg:'正在修改密码,请稍候', - waitTitle:'修改密码', - success:function(form,action){ - if(action.result && action.result.success){ - alert("修改密码成功,退出返回登录页面!"); - logout(WWWROOT); - }else{ - Ext.MessageBox.show({title:'错误提示', msg:'修改密码失败!',buttons:Ext.Msg.OK,icon:Ext.Msg.ERROR}); - } - }, - failure:function(form, action){ - if(action.result && action.result.message){ - alert(action.result.message); - }else{ - Ext.MessageBox.show({title:'错误提示', msg:'修改密码失败!',buttons:Ext.Msg.OK,icon:Ext.Msg.ERROR}); - } - } - }); - } - + + Ext4.getCmp('oldPassword').focus(); }); Index: ssts-web/src/main/webapp/personalSetting/modifySearchMode.js =================================================================== diff -u -r32364 -r38086 --- ssts-web/src/main/webapp/personalSetting/modifySearchMode.js (.../modifySearchMode.js) (revision 32364) +++ ssts-web/src/main/webapp/personalSetting/modifySearchMode.js (.../modifySearchMode.js) (revision 38086) @@ -1,363 +1,264 @@ -Ext.onReady(function(){ - Ext.QuickTips.init(); - var fontSizeStore = new Ext.data.SimpleStore( { - fields : ['value','fontText'], - data : [['12','标准'], ['15','加大']] +var formObj; + +//保存 +function save() { + formObj.form.submit({ + url: WWWROOT + '/systemmanage/user/saveUserSearchMode!saveUserSearchMode.do', + method: 'POST', + waitMsg: '正在更新,请稍候', + waitTitle: '更新个人设置', + success: function (form, action) { + showResult("更新成功,重新登录后才能生效!"); + }, + failure: function (form, action) { + showResult("更新失败!"); + } }); - var warningStore = new Ext.data.SimpleStore( { - fields : ['value','fontText'], - data : [['0','是'], ['1','否']] - }); - - var messagePromptTypeStore = new Ext.data.SimpleStore( { - fields : ['value','fontText'], - data : [[MESSAGE_PROMPT_TYPE_NONE,MESSAGE_PROMPT_TYPE_NONE] - , [MESSAGE_PROMPT_TYPE_DETAIL,MESSAGE_PROMPT_TYPE_DETAIL] - , [MESSAGE_PROMPT_TYPE_NAME,MESSAGE_PROMPT_TYPE_NAME] - , [MESSAGE_PROMPT_TYPE_SIMPLE,MESSAGE_PROMPT_TYPE_SIMPLE]] - }); +} - var enableSterilizationUnloadStore = new Ext.data.SimpleStore( { - fields : ['value','fontText'], - data : [['0','是'], ['1','否']] +Ext4.onReady(function () { + Ext4.QuickTips.init(); + var fontSizeStore = new Ext4.data.SimpleStore({ + fields: ['value', 'fontText'], + data: [['12', '标准'], ['15', '加大']] }); - //灭菌炉Store - var sterilizerStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/sterilizerAction!loadAllSterilizerList.do', - method : 'POST' - }), - reader : new Ext.data.JsonReader({ - root : 'data' - },[ - {name : 'id',mapping : 'id'}, - {name : 'name',mapping : 'name'} - ] - ) + var messagePromptTypeStore = new Ext4.data.SimpleStore({ + fields: ['value', 'fontText'], + data: [[MESSAGE_PROMPT_TYPE_NONE, MESSAGE_PROMPT_TYPE_NONE] + , [MESSAGE_PROMPT_TYPE_DETAIL, MESSAGE_PROMPT_TYPE_DETAIL] + , [MESSAGE_PROMPT_TYPE_NAME, MESSAGE_PROMPT_TYPE_NAME] + , [MESSAGE_PROMPT_TYPE_SIMPLE, MESSAGE_PROMPT_TYPE_SIMPLE]] }); - - var formObj = new Ext.FormPanel({ - labelAlign: 'left', - frame:true, - labelSeparator:':', - title: '个人参数设置', - bodyStyle:'padding:5px 5px 0px 25px', - width: 400, - labelWidth:80, - items: [{ - xtype:'hidden', - id:'ignoredSterilizerIds', - name:'ignoredSterilizerIds' - },{ - xtype : "fieldset", - title : '匹配方式', - layout:'column', - autoHeight : true, - items : [ - { - layout : 'form', - columnWidth : 0.33, - labelWidth : 40, - items : [ { - id : 'spelling', - name : 'spelling', - fieldLabel : '拼音', - xtype : 'checkbox', - inputValue : "拼音" - } ] - },{ - layout : 'form', - columnWidth : 0.33, - labelWidth : 40, - items : [ { - id : 'wbCode', - name : 'wbCode', - fieldLabel : '五笔', - xtype : 'checkbox', - inputValue : "五笔" - } ] + + formObj = new Ext4.form.Panel({ + frame: true, + labelSeparator: ':', + title: '个人参数设置', + bodyStyle: 'padding:5px 5px 0px 25px', + width: 440, + fieldDefaults: { + labelAlign: 'left', + labelWidth: 80 + }, + border: false, + buttonAlign: 'center', + items: [{ + xtype: 'hidden', + id: 'ignoredSterilizerIds', + name: 'ignoredSterilizerIds' + }, { + xtype: "fieldset", + title: '匹配方式', + layout: 'column', + autoHeight: true, + items: [{ + layout: 'form', + columnWidth: 0.33, + items: [{ + id: 'spelling', + name: 'spelling', + labelWidth: 40, + fieldLabel: '拼音', + xtype: 'checkbox', + inputValue: "拼音" + }] }, { - layout : 'form', - columnWidth : 0.33, - labelWidth : 80, - items : [ { - id : 'externalCode', - name : 'externalCode', - fieldLabel : '外部编码', - xtype : 'checkbox', - inputValue : '外部编码' - } ] - } ] - },{ - xtype : "fieldset", - title : '字体设置', - layout:'column', - autoHeight : true, - items : [{ - layout : 'form', - columnWidth : 0.6, - labelWidth : (newFontSize == 12) ? 60 : 80, - items : [{ - xtype : 'combo', - fieldLabel : '字体大小', - id : 'fontSize', - name : 'fontSize', - width : 180, - valueField : 'value', - displayField : 'fontText', - store : fontSizeStore, - forceSelection : true, - mode : 'local', - editable:false, - triggerAction : 'all', - anchor : '100%', - readOnly : true + layout: 'form', + columnWidth: 0.33, + items: [{ + id: 'wbCode', + name: 'wbCode', + labelWidth: 40, + fieldLabel: '五笔', + xtype: 'checkbox', + inputValue: "五笔" }] + }, { + layout: 'form', + columnWidth: 0.33, + items: [{ + id: 'externalCode', + name: 'externalCode', + labelWidth: 60, + fieldLabel: '外部编码', + xtype: 'checkbox', + inputValue: '外部编码' + }] }] - },{ - xtype : "fieldset", - title : '告警提示设置', - layout:'column', - autoHeight : true, - items : [{ - layout : 'form', - columnWidth : 0.6, - labelWidth : (newFontSize == 12) ? 60 : 80, - items : [{ - xtype : 'combo', - fieldLabel : '告警提示', - id : 'suggestiveWarningInfo', - name : 'suggestiveWarningInfo', - width : 180, - valueField : 'value', - displayField : 'fontText', - store : warningStore, - forceSelection : true, - mode : 'local', - editable:false, - triggerAction : 'all', - anchor : '100%', - readOnly : true + }, { + xtype: "fieldset", + title: '字体设置', + layout: 'column', + autoHeight: true, + items: [{ + layout: 'form', + columnWidth: 0.6, + items: [{ + xtype: 'combo', + fieldLabel: '字体大小', + labelWidth: (newFontSize == 12) ? 60 : 80, + id: 'fontSize', + name: 'fontSize', + width: 180, + valueField: 'value', + displayField: 'fontText', + store: fontSizeStore, + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' }] }] - },{ - xtype : "fieldset", - title : '语音设置', - layout:'column', - autoHeight : true, - items : [{ - layout : 'form', - columnWidth : 0.6, - labelWidth : (newFontSize == 12) ? 60 : 80, - items : [{ - xtype : 'combo', - fieldLabel : '启用语音', - id : 'messagePromptType', - name : 'messagePromptType', - width : 180, - valueField : 'value', - displayField : 'fontText', - store : messagePromptTypeStore, - forceSelection : true, - mode : 'local', - editable:false, - triggerAction : 'all', - anchor : '100%', - readOnly : true + }, { + xtype: "fieldset", + title: '告警提示设置', + layout: 'column', + autoHeight: true, + items: [{ + layout: 'form', + columnWidth: 0.6, + items: [{ + xtype: 'combo', + fieldLabel: '告警提示', + labelWidth: (newFontSize == 12) ? 60 : 80, + id: 'suggestiveWarningInfo', + name: 'suggestiveWarningInfo', + width: 180, + valueField: 'value', + displayField: 'value', + store: new Ext4.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' }] }] - },{ - xtype : "fieldset", - title : '灭菌卸载提醒设置', - layout:'column', - autoHeight : true, - hidden:true, - //hidden:!(SSTS_Sterilization_Unload && globalIsSupplyRoomUser), - items : [{ - layout : 'form', - labelWidth : (newFontSize == 12) ? 120 : 140, - items : [{ - xtype : 'combo', - fieldLabel : '启用灭菌卸载提醒', - id : 'enableSterilizeUnloadWarning', - name : 'enableSterilizeUnloadWarning', - width : 140, - valueField : 'value', - displayField : 'fontText', - value:'否', - store : enableSterilizationUnloadStore, - forceSelection : true, - mode : 'local', - editable:false, - triggerAction : 'all', - anchor : '100%', - readOnly : true + }, { + xtype: "fieldset", + title: '语音设置', + layout: 'column', + autoHeight: true, + items: [{ + layout: 'form', + columnWidth: 0.6, + items: [{ + xtype: 'combo', + fieldLabel: '启用语音', + labelWidth: (newFontSize == 12) ? 60 : 80, + id: 'messagePromptType', + name: 'messagePromptType', + width: 180, + valueField: 'value', + displayField: 'fontText', + store: messagePromptTypeStore, + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' }] - },{ - layout : 'form', - labelWidth : (newFontSize == 12) ? 120 : 140, - items : [{ - xtype : 'numberfield', - minValue:0, - fieldLabel : '灭菌卸载时间(分钟)', - id : 'sterilizeUnloadTimes', - name : 'sterilizeUnloadTimes', - allowDecimals: false, - allowNegative:false, - width : 140 - }] - },{ - layout : 'form', - labelWidth : (newFontSize == 12) ? 120 : 140, - items : [{ - xtype : 'multiSelect', - fieldLabel : '不提示卸载的灭菌炉', - width : 140, - valueField : 'id', - displayField : 'name', - store : sterilizerStore, - triggerAction : 'all', - mode : 'remote', - listWidth:180, - forceSelection : false, - name : "ignoredSterilizerName", - id : "ignoredSterilizerName", - editable : false, - readOnly:true, - anchor : '100%', - listeners:{ - select:function(e){ - Ext.getCmp('ignoredSterilizerIds').setValue(e.value) - } - } - }] }] - },{ - xtype : "fieldset", - title : '个性化设置', - layout:'column', - autoHeight : true, - items : [{ - layout : 'form', - columnWidth : 0.8, - labelWidth : (newFontSize == 12) ? 170 : 210, - items : [{ - xtype : 'combo', - fieldLabel : '申请单列表启用鼠标悬停事件', - id : 'mouseHoverEventOfApply', - name : 'mouseHoverEventOfApply', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore({ - fields : [ 'value'], - data : [['是'],['否']] - }), - forceSelection : true, - mode : 'local', - editable:false, - triggerAction : 'all', - anchor : '100%', - readOnly : true + }, { + xtype: "fieldset", + title: '个性化设置', + layout: 'column', + autoHeight: true, + items: [{ + layout: 'form', + columnWidth: 0.8, + items: [{ + xtype: 'combo', + fieldLabel: '申请单列表启用鼠标悬停事件', + labelWidth: (newFontSize == 12) ? 180 : 220, + id: 'mouseHoverEventOfApply', + name: 'mouseHoverEventOfApply', + valueField: 'value', + displayField: 'value', + store: new Ext4.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + forceSelection: true, + mode: 'local', + triggerAction: 'all', + anchor: '100%' }] }] }], - buttons: [{ - id:'saveBtn', - text: '确认', - handler: save - },{ - text: '取消', - handler:gohistory - }] - }); + buttons: [{ + id: 'saveBtn', + text: '确认', + handler: save + }, { + text: '取消', + handler: gohistory + }] + }); - formObj.render("formDiv"); - - var id = $Id("userName").value; - if(id != null && id.length > 0){ - Ext.Ajax.request({ - url : WWWROOT + '/systemmanage/user/loadUserSearchMode.do', - params : {id : id}, - success : function(response, options) { + formObj.render("formDiv"); + + var id = userName; + if (id != null && id.length > 0) { + Ext4.Ajax.request({ + url: WWWROOT + '/systemmanage/user/loadUserSearchMode.do', + params: { id: id }, + success: function (response, options) { var searchMode = response.responseText; - if(searchMode != null && searchMode.length > 0){ + if (searchMode != null && searchMode.length > 0) { var mode = searchMode.split("##")[0]; - var fontSize = searchMode.split("##")[1]; - - if(mode != null && mode.length > 0){ + var fontSize = searchMode.split("##")[1]; + + if (mode != null && mode.length > 0) { var moduleNameArr = new Array(); moduleNameArr[0] = "拼音"; moduleNameArr[1] = "五笔"; moduleNameArr[2] = "外部编码"; - - var moduleIDArr= new Array(); + + var moduleIDArr = new Array(); moduleIDArr[0] = "spelling"; moduleIDArr[1] = "wbCode"; moduleIDArr[2] = "externalCode"; - - for(var i =0;i< moduleNameArr.length;i++){ - checkModuleTextIsExist(mode,moduleNameArr[i],moduleIDArr[i]); + + for (var i = 0; i < moduleNameArr.length; i++) { + checkModuleTextIsExist(mode, moduleNameArr[i], moduleIDArr[i]); } - }else{ + } else { var mode = "拼音;五笔;外部编码"; var moduleNameArr = new Array(); moduleNameArr[0] = "拼音"; moduleNameArr[1] = "五笔"; moduleNameArr[2] = "外部编码"; - - var moduleIDArr= new Array(); + + var moduleIDArr = new Array(); moduleIDArr[0] = "spelling"; moduleIDArr[1] = "wbCode"; moduleIDArr[2] = "externalCode"; - for(var i =0;i< moduleNameArr.length;i++){ - checkModuleTextIsExist(mode,moduleNameArr[i],moduleIDArr[i]); + for (var i = 0; i < moduleNameArr.length; i++) { + checkModuleTextIsExist(mode, moduleNameArr[i], moduleIDArr[i]); } } - Ext.getCmp('fontSize').setValue(fontSize); - Ext.getCmp('suggestiveWarningInfo').setValue(searchMode.split("##")[2]); - Ext.getCmp('messagePromptType').setValue(searchMode.split("##")[3]); - Ext.getCmp('mouseHoverEventOfApply').setValue(searchMode.split("##")[4]); - Ext.getCmp('enableSterilizeUnloadWarning').setValue(searchMode.split("##")[5]); - Ext.getCmp('sterilizeUnloadTimes').setValue(searchMode.split("##")[6]); - var ids = searchMode.split("##")[7] || ''; - if(ids !== ''){ - sterilizerStore.load(); - sterilizerStore.on('load',function(){ - Ext.getCmp('ignoredSterilizerName').setValue(ids); - }); - } + Ext4.getCmp('fontSize').setValue(fontSize); + Ext4.getCmp('suggestiveWarningInfo').setValue(searchMode.split("##")[2]); + Ext4.getCmp('messagePromptType').setValue(searchMode.split("##")[3]); + Ext4.getCmp('mouseHoverEventOfApply').setValue(searchMode.split("##")[4]); } }, - failure : function(response, options) { + failure: function (response, options) { showResult(response.responseText); } }); } - - function checkModuleTextIsExist(moduleStr,poModuleName,moduleCmpId){ - if(moduleStr){ - if(moduleStr.indexOf(poModuleName) != -1){ - Ext.getCmp(moduleCmpId).setValue(true); - } - } - } - - function save(){ - formObj.form.submit({ - url:WWWROOT+'/systemmanage/user/saveUserSearchMode!saveUserSearchMode.do', - method:'POST', - waitMsg:'正在更新,请稍候', - waitTitle:'更新个人设置', - success:function(form,action){ - showResult("更新成功,重新登录后才能生效!"); - }, - failure:function(form, action){ - showResult("更新失败!"); - } - }); - } - + + function checkModuleTextIsExist(moduleStr, poModuleName, moduleCmpId) { + if (moduleStr) { + if (moduleStr.indexOf(poModuleName) != -1) { + Ext4.getCmp(moduleCmpId).setValue(true); + } + } + } }); Index: ssts-web/src/main/webapp/personalSetting/modifySearchMode.jsp =================================================================== diff -u -r32364 -r38086 --- ssts-web/src/main/webapp/personalSetting/modifySearchMode.jsp (.../modifySearchMode.jsp) (revision 32364) +++ ssts-web/src/main/webapp/personalSetting/modifySearchMode.jsp (.../modifySearchMode.jsp) (revision 38086) @@ -15,35 +15,38 @@ <%@ include file="/common/includeExtJsAndCss.jsp"%> - - - +<%@ include file="/common/includeExtJs4_2.jsp"%> + + -
-