Index: ssts-web/src/main/webapp/disinfectsystem/problemReport/problemReportForm.js
===================================================================
diff -u -r30761 -r32051
--- ssts-web/src/main/webapp/disinfectsystem/problemReport/problemReportForm.js (.../problemReportForm.js) (revision 30761)
+++ ssts-web/src/main/webapp/disinfectsystem/problemReport/problemReportForm.js (.../problemReportForm.js) (revision 32051)
@@ -1,321 +1,523 @@
var problemWin = null;
var formPanel = null;
+var fileManageStore;
function cancel() {
problemWin.close();
}
-var httpOptionTextAndValueStore= new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/core/httpOptionAction!getHttpOptionTextAndValueById.do?optionId=question_feedback',
- method : 'POST'
+
+var httpOptionTextAndValueStore = new Ext.data.Store({
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/core/httpOptionAction!getHttpOptionTextAndValueById.do?optionId=question_feedback',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
+ reader: new Ext.data.JsonReader({
}, [
- {name : 'id',mapping : 'id'},
- {name : 'name',mapping : 'name'}
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' }
])
});
+
//时间戳转日期
function timestampToTime(timestamp) {
var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
Y = date.getFullYear();
- M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1);
- D = (date.getDate()<10)?'0'+(date.getDate()):date.getDate();
- h = (date.getHours()<10)?'0'+(date.getHours()):date.getHours();
- m = (date.getMinutes()<10)?'0'+(date.getMinutes()):date.getMinutes();
- s = (date.getSeconds()<10)?'0'+(date.getSeconds()):date.getSeconds();
- return Y + '-' + M + '-' + D +' '+ h + ':' + m;
+ M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
+ D = (date.getDate() < 10) ? '0' + (date.getDate()) : date.getDate();
+ h = (date.getHours() < 10) ? '0' + (date.getHours()) : date.getHours();
+ m = (date.getMinutes() < 10) ? '0' + (date.getMinutes()) : date.getMinutes();
+ s = (date.getSeconds() < 10) ? '0' + (date.getSeconds()) : date.getSeconds();
+ return Y + '-' + M + '-' + D + ' ' + h + ':' + m;
}
+
+function deleteOrDownLoad(v, p, record) {
+ var html = '';
+ html += '
';
+ html += '';
+ html += '
';
+ return html;
+}
+
+function downLoadAttachFile(id) {
+ location.href = WWWROOT + "/disinfectsystem/staffArchives/downloadAttachFile.jsp?id=" + id;
+}
+
+function deleteAttachFile(id) {
+ if (id != null && id != "") {
+ top.Ext.MessageBox.confirm("请确认", "是否确定要删除此附件?", function (button, text) {
+ if ("yes" == button) {
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/baseData/staffArchiveAction!deleteAttachFile.do',
+ params: { attachId: id },
+ success: function (response, options) {
+ showResult("删除成功");
+ fileManageStore.load();
+ var status = top.Ext.getCmp('status').getValue();
+ var newId = top.Ext.getCmp('id').getValue();
+ loadAndEditProblemData(newId, status, "update", true)
+ grid.dwrReload();
+ },
+ failure: function (response, options) {
+ showResult("删除失败");
+ }
+ });
+ }
+ });
+ }
+}
+
+function uploadWindow() {
+ var id = top.Ext.getCmp('id').getValue();
+ var dialog = new top.Ext.ux.UploadDialog.Dialog({
+ title: "上传附件",
+ url: WWWROOT + '/disinfectSystem/baseData/staffArchiveAction!uploadAttachFile.do?attachType=' + encodeURI("科室问题反馈附件") + '&objectId=' + id,
+ post_var_name: 'uploadFiles',//这里是自己定义的,默认的名字叫file
+ width: 450,
+ height: 300,
+ minWidth: 450,
+ minHeight: 300,
+ draggable: true,
+ resizable: true,
+ constraintoviewport: true,
+ modal: true,
+ reset_on_hide: false,
+ allow_close_on_upload: false, //关闭上传窗口是否仍然上传文件
+ upload_autostart: false
+ });
+
+ dialog.show();
+ dialog.on('uploadsuccess', function (dialog) {
+ showResult("文件上传成功!");
+ fileManageStore.reload();
+ var status = top.Ext.getCmp('status').getValue();
+ loadAndEditProblemData(id, status, "update", true)
+ dialog.hide();
+ }); //定义上传完成回调函数
+ dialog.on('uploadfailed', function (dialog) {
+ showResult("文件上传失败!");
+ fileManageStore.reload();
+ dialog.hide();
+ }); //定义上传完成回调函数
+}
+
+//附件管理
+function uploadProblemFile() {
+ var id = top.Ext.getCmp('id').getValue();
+ fileManageStore = new top.Ext.data.Store({
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/staffArchiveAction!loadStaffArchiveAttach.do?attachType=' + encodeURI("科室问题反馈附件") + '&objectId=' + id,
+ method: 'POST'
+ }),
+ reader: new Ext.data.JsonReader({
+ totalProperty: 'totalCount',
+ root: 'data'
+ }, [
+ { name: 'id', mapping: 'id' },
+ { name: 'fileName', mapping: 'fileName' }
+ ]
+ )
+ });
+ fileManageStore.load();
+
+ var cm = new top.Ext.grid.ColumnModel([{
+ name: 'id1',
+ hidden: true,
+ dataIndex: 'id1'
+ }, {
+ id: 'imageName',
+ menuDisabled: true,
+ header: "附件名称",
+ width: 200,
+ dataIndex: 'fileName'
+ }, {
+ id: 'deleteAction',
+ menuDisabled: true,
+ header: '删除 | 下载',
+ width: 100,
+ renderer: deleteOrDownLoad,
+ dataIndex: 'button'
+ }]);
+
+ var tbar = [{
+ text: '上传附件',
+ handler: function () {
+ uploadWindow();
+ }
+ }];
+
+ var tousseImagePanel = new top.Ext.FormPanel({
+ id: 'deviceMaintenanceForm',
+ 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.GridPanel({
+ id: 'tousseImageGrid',
+ store: fileManageStore,
+ 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 () {
+ formWindow.close();
+ }
+ }]
+ });
+
+ var formWindow = new top.Ext.Window({
+ id: 'fileWin',
+ layout: 'fit',
+ title: "附件管理",
+ width: 600,
+ modal: true,
+ autoHeight: true,
+ border: false,
+ plain: true,
+ items: [tousseImagePanel]
+ });
+ formWindow.show();
+}
+
/**
* 增加问题
*/
-function addProblemReport(){
+function addProblemReport() {
showWindow();
top.Ext.getCmp('answerArea').disable();
top.Ext.getCmp('answerAreaButton').disable();
}
-function showWindow(){
+
+function showWindow() {
+ var fileHtml = '
';
formPanel = new top.Ext.FormPanel({
- id : 'addProblemForm',
- frame : true,
- labelSeparator : ':',
- bodyStyle : 'padding:5px 5px 0px 5px',
- width : 900,
- height : 500,
- labelAlign : 'right',
- buttonAlign : 'center',
- autoScroll : true,
- items : [{
- layout : 'column',
- xtype:"fieldset", //定义类别为fieldset
- title:"基本信息",
- autoHeight:true,
- items : [{
- xtype : 'hidden',
- name : 'id',
- id : 'id'
- },{
- xtype : 'hidden',
- name : 'actionType',
- id : 'actionType',
- value:'new'
- },{
- xtype : 'hidden',
- name : 'orgUnitCoding',
- id : 'orgUnitCoding',
- value : $Id('orgUnitCoding').value
- },{
- layout : 'form',
- columnWidth : .5,
- labelWidth : 90,
- items : [{
- xtype : 'textfield',
- fieldLabel : "标题",
- name : "title",
- id : "title",
- anchor : '95%',
- allowBlank : false
+ id: 'addProblemForm',
+ frame: true,
+ labelSeparator: ':',
+ bodyStyle: 'padding:5px 5px 0px 5px',
+ width: 900,
+ height: 500,
+ labelAlign: 'right',
+ buttonAlign: 'center',
+ autoScroll: true,
+ items: [{
+ layout: 'column',
+ xtype: "fieldset", //定义类别为fieldset
+ title: "基本信息",
+ autoHeight: true,
+ width: 850,
+ items: [{
+ xtype: 'hidden',
+ name: 'id',
+ id: 'id'
+ }, {
+ xtype: 'hidden',
+ name: 'actionType',
+ id: 'actionType',
+ value: 'new'
+ }, {
+ xtype: 'hidden',
+ name: 'orgUnitCoding',
+ id: 'orgUnitCoding',
+ value: $Id('orgUnitCoding').value
+ }, {
+ layout: 'form',
+ columnWidth: .5,
+ labelWidth: 90,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: "标题",
+ name: "title",
+ id: "title",
+ anchor: '95%',
+ allowBlank: false
}]
- },{
- layout : 'form',
- columnWidth : .5,
- labelWidth : 90,
- items : [{
- xtype : 'combo',
- id : 'type',
- name : 'type',
- valueField : 'name',
- displayField : 'name',
- anchor : '100%',
- fieldLabel : '问题类型',
- triggerAction : 'all',
- forceSelection : true,
- allowBlank : false,
- store : httpOptionTextAndValueStore
+ }, {
+ layout: 'form',
+ columnWidth: .5,
+ labelWidth: 90,
+ items: [{
+ xtype: 'combo',
+ id: 'type',
+ name: 'type',
+ valueField: 'name',
+ displayField: 'name',
+ anchor: '100%',
+ fieldLabel: '问题类型',
+ triggerAction: 'all',
+ forceSelection: true,
+ allowBlank: false,
+ store: httpOptionTextAndValueStore
}]
}, {
- layout : 'form',
- columnWidth : .5,
- labelWidth : 90,
- items : [{
- xtype : 'datefieldWithMin',
- fieldLabel : '报告日期',
- id : 'reportTime',
- name : 'reportTime',
-// value : new Date(),
- editable : false,
- readOnly : true,
- format : 'Y-m-d H:i',
- allowBlank : false,
- anchor : '95%',
- listeners : {
- render : function() {
+ layout: 'form',
+ columnWidth: .5,
+ labelWidth: 90,
+ items: [{
+ xtype: 'datefieldWithMin',
+ fieldLabel: '报告日期',
+ id: 'reportTime',
+ name: 'reportTime',
+ // value : new Date(),
+ editable: false,
+ readOnly: true,
+ format: 'Y-m-d H:i',
+ allowBlank: false,
+ anchor: '95%',
+ listeners: {
+ render: function () {
setStartDate(top.Ext, 'yyyy/MM/dd HH:mm', 'reportTime'); //(设置报告日期,取服务器时间 cjr)
}
}
- },{
- xtype : 'hidden',
- name : 'datetime',
- id : 'datetime'
+ }, {
+ xtype: 'hidden',
+ name: 'datetime',
+ id: 'datetime'
//value : $Id('reportTime').value
- },{
- xtype : 'hidden',
- name : 'answer_Time',
- id : 'answer_Time',
- value : $Id('today').value
+ }, {
+ xtype: 'hidden',
+ name: 'answer_Time',
+ id: 'answer_Time',
+ value: $Id('today').value
}]
}, {
- layout : 'form',
- columnWidth : .5,
- labelWidth : 90,
- items : [{
- xtype : 'textfield',
- name : 'orgUnitName',
- id : 'orgUnitName',
- fieldLabel : "科室",
- value : $Id('orgunit').value,
- anchor : '95%',
- readOnly : true,
- cls:'fieldReadOnlyNoRemove'
+ layout: 'form',
+ columnWidth: .5,
+ labelWidth: 90,
+ items: [{
+ xtype: 'textfield',
+ name: 'orgUnitName',
+ id: 'orgUnitName',
+ fieldLabel: "科室",
+ value: $Id('orgunit').value,
+ anchor: '95%',
+ readOnly: true,
+ cls: 'fieldReadOnlyNoRemove'
}]
- },{
- layout : 'form',
- columnWidth : .5,
- labelWidth : 90,
- items : [{
- xtype : 'textfield',
- name : 'registerPerson',
- id : 'registerPerson',
- fieldLabel : "登记人",
- anchor : '95%',
- readOnly : true,
- value : $Id('userName').value,
- cls:'fieldReadOnlyNoRemove'
+ }, {
+ layout: 'form',
+ columnWidth: .5,
+ labelWidth: 90,
+ items: [{
+ xtype: 'textfield',
+ name: 'registerPerson',
+ id: 'registerPerson',
+ fieldLabel: "登记人",
+ anchor: '95%',
+ readOnly: true,
+ value: $Id('userName').value,
+ cls: 'fieldReadOnlyNoRemove'
}]
- },{
- layout : 'form',
- columnWidth : .5,
- labelWidth : 90,
- items : [{
- xtype : 'textfield',
- id : 'status',
- name : 'status',
- fieldLabel : '状态',
- readOnly : true,
- cls:'fieldReadOnlyNoRemove'
+ }, {
+ layout: 'form',
+ columnWidth: .5,
+ labelWidth: 90,
+ items: [{
+ xtype: 'textfield',
+ id: 'status',
+ name: 'status',
+ fieldLabel: '状态',
+ readOnly: true,
+ cls: 'fieldReadOnlyNoRemove'
}]
- },{
- layout : 'form',
- columnWidth : 1,
- labelWidth : 90,
- items : [ {
- xtype : 'textarea',
- name : 'description',
- id : 'description',
- width : 150,
- height : 50,
- fieldLabel : "描述",
- allowBlank : false,
- anchor : '97%'
+ }, {
+ layout: 'form',
+ columnWidth: 1,
+ labelWidth: 90,
+ items: [{
+ xtype: 'textarea',
+ name: 'description',
+ id: 'description',
+ width: 150,
+ height: 100,
+ fieldLabel: "描述",
+ allowBlank: false,
+ anchor: '97%'
}]
- },{
- layout : 'form',
- columnWidth : 1,
- labelWidth : 90,
- items : [ {
- xtype : 'textarea',
- name : 'remarks',
- id : 'remarks',
- width : 150,
- height : 100,
- fieldLabel : "沟通记录",
- anchor : '97%',
- readOnly : true,
- cls:'fieldReadOnlyNoRemove'
+ }, {
+ layout: 'form',
+ columnWidth: 1,
+ labelWidth: 90,
+ id: "fileButton",
+ items: [{
+ name: 'fileDisplay',
+ id: 'fileDisplay',
+ width: 150,
+ fieldLabel: "附件",
+ anchor: '97%',
+ html: fileHtml
+ }, new top.Ext.Button({
+ text: '附件管理',
+ style: 'margin: 15px 0px 10px 95px;',
+ handler: function () {
+ uploadProblemFile();
+ }
+ })]
+ }, {
+ layout: 'form',
+ columnWidth: 1,
+ labelWidth: 90,
+ items: [{
+ xtype: 'textarea',
+ name: 'remarks',
+ id: 'remarks',
+ width: 150,
+ height: 100,
+ fieldLabel: "沟通记录",
+ anchor: '97%',
+ readOnly: true,
+ cls: 'fieldReadOnlyNoRemove'
}]
- },{
- layout : 'form',
- columnWidth : 1,
- labelWidth : 90,
- id : "answerArea",
- items : [ {
- xtype : 'textarea',
- name : 'answerValue',
- id : 'answerValue',
- maxLength:120,
- width : 150,
- height : 50,
- fieldLabel : "回复",
- anchor : '97%'
+ }, {
+ layout: 'form',
+ columnWidth: 1,
+ labelWidth: 90,
+ id: "answerArea",
+ items: [{
+ xtype: 'textarea',
+ name: 'answerValue',
+ id: 'answerValue',
+ maxLength: 120,
+ width: 150,
+ height: 50,
+ fieldLabel: "回复",
+ anchor: '97%'
}]
- },{
- layout : 'form',
- columnWidth : 1,
- labelWidth : 90,
- id : "answerAreaButton",
- items : [
+ }, {
+ layout: 'form',
+ columnWidth: 1,
+ labelWidth: 90,
+ id: "answerAreaButton",
+ items: [
new top.Ext.Button({
- text:'回复',
- style:'margin: 15px 0px 10px 95px;',
- handler: function(){
+ text: '回复',
+ style: 'margin: 15px 0px 10px 95px;',
+ handler: function () {
var answerValue = top.Ext.getCmp('answerValue').getValue() || '';
var id = top.Ext.getCmp('id').getValue();
- if(answerValue == ''){
+ if (answerValue == '') {
showResult('回复内容不能为空');
return;
}
top.Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/problemAction!replyProblem.do',
- params : {
- 'id':id,
- 'content':answerValue
+ url: WWWROOT + '/disinfectSystem/problemAction!replyProblem.do',
+ params: {
+ 'id': id,
+ 'content': answerValue
},
- success : function(response,options){
+ success: function (response, options) {
var result = Ext.decode(response.responseText);
var status = top.Ext.getCmp('status').getValue();
- if(result.success){
+ if (result.success) {
showResult(result.msg);
- loadAndEditProblemData(id,status,"update",true)
- }else {
+ loadAndEditProblemData(id, status, "update", true)
+ } else {
showResult(result.msg);
}
}
})
}
- })
+ })
]
}]
}],
- buttons : [{
- id : 'saveBtn',
- text : '保存',
- handler : function(){
+ buttons: [{
+ id: 'saveBtn',
+ text: '保存',
+ handler: function () {
saveProblem(this);
}
- },{
- id : 'solveBtn',
- text : '已解决',
- hidden:true,
- handler : function(){
+ }, {
+ id: 'solveBtn',
+ text: '已解决',
+ hidden: true,
+ handler: function () {
top.Ext.getCmp('actionType').setValue('answered');
saveProblem(this);
}
}, {
- text : '取消',
- id : 'saveAndNewBtn',
- handler : cancel
+ text: '取消',
+ id: 'saveAndNewBtn',
+ handler: cancel
}]
});
problemWin = new top.Ext.Window({
- id : 'problemWin',
- layout : 'fit',
- title : '问题反馈信息',
- width : 900,
- modal : true,
- autoHeight : true,
- border : false,
- plain : true,
- items : [ formPanel ]
+ id: 'problemWin',
+ layout: 'fit',
+ title: '问题反馈信息',
+ width: 900,
+ modal: true,
+ autoHeight: true,
+ border: false,
+ plain: true,
+ items: [formPanel]
});
problemWin.show();
}
+
/***
* 加载数据
*/
-function loadAndEditProblemData(id,status,action,isReload){
+function loadAndEditProblemData(id, status, action, isReload) {
//显示窗体
- if(!isReload){
+ if (!isReload) {
showWindow();
}
-
- if(!Ext.isEmpty(id)){
+
+ if (!Ext.isEmpty(id)) {
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/problemAction!loadProblemData.do',
- params : {id : id},
- success : function(response,options){
+ url: WWWROOT + '/disinfectSystem/problemAction!loadProblemData.do',
+ params: { id: id },
+ success: function (response, options) {
var result = Ext.decode(response.responseText);
- if(result.success && result.data){
+ if (result.success && result.data) {
top.Ext.getCmp('id').setValue(result.data.id);
top.Ext.getCmp('title').setValue(result.data.title);
- if(result.data.answerTime != null){
- top.Ext.getCmp('answer_Time').setValue(Ext.util.Format.date(new Date(result.data.answerTime.time),"Y-m-d H:i"));
+ if (result.data.answerTime != null) {
+ top.Ext.getCmp('answer_Time').setValue(Ext.util.Format.date(new Date(result.data.answerTime.time), "Y-m-d H:i"));
}
- top.Ext.getCmp('reportTime').setValue(Ext.util.Format.date(new Date(result.data.reportTime.time),"Y-m-d H:i"));
+ top.Ext.getCmp('reportTime').setValue(Ext.util.Format.date(new Date(result.data.reportTime.time), "Y-m-d H:i"));
top.Ext.getCmp('datetime').setValue(top.Ext.getCmp('reportTime').getValue());
top.Ext.getCmp('orgUnitName').setValue(result.data.orgUnitName);
top.Ext.getCmp('registerPerson').setValue(result.data.registerPerson);
top.Ext.getCmp('orgUnitCoding').setValue(result.data.orgUnitCoding);
top.Ext.getCmp('description').setValue(result.data.description);
-
+
top.Ext.getCmp('actionType').setValue(action);
top.Ext.getCmp('status').setValue(result.data.status);
var answers = result.data.answers;
var contents = '';
- for(var i=0;i" + res.data[i].fileName + "";
+ if (i < (res.data.length - 1)) {
+ html += ",";
+ }
+ html += "";
+ }
+ top.Ext.getCmp('fileDisplay').el.dom.getElementsByClassName('fileDisplayClass')[0].innerHTML = html;
+ }
+ }
+ })
+ } else {
showResult('系统加载出错,请稍候再试');
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
showResult('系统加载出错,请稍候再试');
}
});
}
}
+
/**
* 删除数据
* @param grid
*/
-function deleteProblem(grid){
+function deleteProblem(grid) {
var selectedRecords = grid.getSelectionModel().getSelections();
var selectedCount = grid.getSelectionModel().getCount();
var ids = "";
- if(selectedCount < 1){
+ if (selectedCount < 1) {
showResult("请选择要删除的行");
- }else{
- for ( var i = 0, len = selectedRecords.length; i < len; i++) {
- if(selectedRecords[i].data['status'] == "已完成" || selectedRecords[i].data['status'] == "回复中"){
+ } else {
+ for (var i = 0, len = selectedRecords.length; i < len; i++) {
+ if (selectedRecords[i].data['status'] == "已完成" || selectedRecords[i].data['status'] == "回复中") {
showResult("已回复的记录不能删除!");
return;
}
@@ -401,59 +622,59 @@
ids = ids + ';' + selectedRecords[i].data['id'];
}
}
- Ext.MessageBox.confirm("请确认","确定要删除选中的信息吗?",
- function(button, text) {
- if ("yes" == button){
- Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/problemAction!deleteProblem.do',
- params : {ids : ids},
- success : function(response, options) {
- var result = Ext.decode(response.responseText);
- var success = result.success;
- if (true != success) {
- showResult("删除失败");
- return;
- } else {
- showResult('删除成功!');
- grid.dwrReload();
- }
- },
- failure : function(response, options) {
- showResult("删除失败");
- }
- });
+ Ext.MessageBox.confirm("请确认", "确定要删除选中的信息吗?", function (button, text) {
+ if ("yes" == button) {
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/problemAction!deleteProblem.do',
+ params: { ids: ids },
+ success: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ var success = result.success;
+ if (true != success) {
+ showResult("删除失败");
+ return;
+ } else {
+ showResult('删除成功!');
+ grid.dwrReload();
+ }
+ },
+ failure: function (response, options) {
+ showResult("删除失败");
}
});
+ }
+ });
}
-
}
+
/**
* 保存问题
*/
-function saveProblem(button){
+function saveProblem(button) {
button.disable();
- if(!formPanel.getForm().isValid()){
+ if (!formPanel.getForm().isValid()) {
showResult("请正确填写表单各值");
button.enable();
- }else{
+ } else {
submitForm();
}
}
+
/**
* 提交表单
*/
-function submitForm(){
- formPanel.getForm().submit( {
- url : WWWROOT + '/disinfectSystem/problemAction!saveProblem.do',
- method : 'POST',
- waitMsg : '正在保存数据,请稍候',
- waitTitle : '提交表单',
- success : function(form, action) {
+function submitForm() {
+ formPanel.getForm().submit({
+ url: WWWROOT + '/disinfectSystem/problemAction!saveProblem.do',
+ method: 'POST',
+ waitMsg: '正在保存数据,请稍候',
+ waitTitle: '提交表单',
+ success: function (form, action) {
showResult('保存成功');
problemWin.close();
grid.dwrReload();
},
- failure : function(form, action) {
+ failure: function (form, action) {
showResult('failure = ' + action.failureType);
}
});
Index: ssts-web/src/main/webapp/homepage/portalPage.js
===================================================================
diff -u -r31390 -r32051
--- ssts-web/src/main/webapp/homepage/portalPage.js (.../portalPage.js) (revision 31390)
+++ ssts-web/src/main/webapp/homepage/portalPage.js (.../portalPage.js) (revision 32051)
@@ -1027,6 +1027,10 @@
returnContent += ''+ itemTitle +'';
return returnContent;
}
+ //如果disableDepartmentProblemFeedback不是false,则隐藏培科室问题反馈
+ if (itemId == 'problemReport' && sstsConfig.disableDepartmentProblemFeedback){
+ return returnContent;
+ }
//其它图标(除上面提到的科室申领、外来器械包申请、培训管理、灭菌员发货、外部代理灭菌、设备维护、召回、使用记录)
returnContent += '';
returnContent += '';
Index: ssts-web/src/main/webapp/disinfectsystem/config/dgsetyy/menu/menuconfigure.js
===================================================================
diff -u -r32009 -r32051
--- ssts-web/src/main/webapp/disinfectsystem/config/dgsetyy/menu/menuconfigure.js (.../menuconfigure.js) (revision 32009)
+++ ssts-web/src/main/webapp/disinfectsystem/config/dgsetyy/menu/menuconfigure.js (.../menuconfigure.js) (revision 32051)
@@ -498,6 +498,14 @@
{hidden :SSTS_MESSAGE_Menu,text:"消息发布管理",href:WWWROOT+'/disinfectsystem/message/message.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}
]
},{
+ text:"科室问题反馈",
+ singleClickExpand:singleClickExpandTree,
+ hidden:sstsConfig.disableDepartmentProblemFeedback?true:SSTS_ProblemReport_Menu,
+ children:[
+ {hidden :sstsConfig.disableDepartmentProblemFeedback?true:SSTS_ProblemReport_Menu,text:"科室问题反馈",href:WWWROOT+'/disinfectsystem/problemReport/problemReport.jsp',hrefTarget:linkTarget,leaf:true},
+ {hidden :sstsConfig.disableDepartmentProblemFeedback?true:SSTS_ProblemReport_Menu,text:"科室问题反馈类型设置",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=question_feedback',hrefTarget:linkTarget,leaf:true}
+ ]
+},{
text:"系统告警",
singleClickExpand:singleClickExpandTree,
hidden:SSTS_SystemWarning_Menu,
Index: ssts-web/src/main/webapp/homepage/menuconfigure.js
===================================================================
diff -u -r31987 -r32051
--- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 31987)
+++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 32051)
@@ -535,10 +535,10 @@
},{
text:"科室问题反馈",
singleClickExpand:singleClickExpandTree,
- hidden:SSTS_ProblemReport_Menu,
+ hidden:sstsConfig.disableDepartmentProblemFeedback?true:SSTS_ProblemReport_Menu,
children:[
- {hidden :SSTS_ProblemReport_Menu,text:"科室问题反馈",href:WWWROOT+'/disinfectsystem/problemReport/problemReport.jsp',hrefTarget:linkTarget,leaf:true},
- {hidden :SSTS_ProblemReport_Menu,text:"科室问题反馈类型设置",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=question_feedback',hrefTarget:linkTarget,leaf:true}
+ {hidden :sstsConfig.disableDepartmentProblemFeedback?true:SSTS_ProblemReport_Menu,text:"科室问题反馈",href:WWWROOT+'/disinfectsystem/problemReport/problemReport.jsp',hrefTarget:linkTarget,leaf:true},
+ {hidden :sstsConfig.disableDepartmentProblemFeedback?true:SSTS_ProblemReport_Menu,text:"科室问题反馈类型设置",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=question_feedback',hrefTarget:linkTarget,leaf:true}
]
},{
text:"系统告警",
@@ -733,7 +733,7 @@
}];
var parentTree = {
- text:"自定义报表",
+ text:"自定义报表",
singleClickExpand:singleClickExpandTree,
hidden:SSTS_CustomizeReport_ReportCustomize && SSTS_CustomizeReport_FolderCustomize && SSTS_CustomizeReport_ReportList,
children:[