Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringMonthView.js
===================================================================
diff -u -r30854 -r31201
--- ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringMonthView.js (.../qualityMonitoringMonthView.js) (revision 30854)
+++ ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityMonitoringMonthView.js (.../qualityMonitoringMonthView.js) (revision 31201)
@@ -1,24 +1,24 @@
var entityName = "质量监测项统计月报";
var grid;
-var rd = new Ext.data.JsonReader( {
- fields : [
- {name : 'id'},
- {name : 'departId'},
- {name : 'name'}
+var rd = new Ext.data.JsonReader({
+ fields: [
+ { name: 'id' },
+ { name: 'departId' },
+ { name: 'name' }
]
});
var supplyRoomStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!loadSupplyRoomConfigRoom.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!loadSupplyRoomConfigRoom.do',
+ method: 'POST'
}),
- baseParams :{type:"12"},
- reader : rd,
- listeners :{
- 'load' : function(thiz,records,options){
- if(records.length > 0){
+ baseParams: { type: "12" },
+ reader: rd,
+ listeners: {
+ 'load': function (thiz, records, options) {
+ if (records.length > 0) {
var record = records[0];
Ext.getCmp('querySupplyRoom').setValue(record.get('departId'));
}
@@ -27,76 +27,76 @@
});
var myMask;
-Ext.onReady(function() {
+Ext.onReady(function () {
Ext.QuickTips.init();
//20181225
var supplyRoomRecord = Ext.data.Record.create([
- {name: 'departCode', type: 'string'},
- {name: 'name', type: 'string'}
- ]);
-
+ { name: 'departCode', type: 'string' },
+ { name: 'name', type: 'string' }
+ ]);
+
var supplyRoomStore = new Ext.data.SimpleStore({
- fields : ['departCode','name']
+ fields: ['departCode', 'name']
});
-
+
var supplyRoomRemoteStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!loadSupplyRoomConfigRoom.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!loadSupplyRoomConfigRoom.do',
+ method: 'POST'
}),
- baseParams :{type:"12"},
+ baseParams: { type: "12" },
// reader : rd,
- reader : new Ext.data.JsonReader({
- fields : [
- {name : 'id', mapping : 'id'},
- {name : 'departCode', mapping : 'departId'},
- {name : 'name', mapping : 'name'}
+ reader: new Ext.data.JsonReader({
+ fields: [
+ { name: 'id', mapping: 'id' },
+ { name: 'departCode', mapping: 'departId' },
+ { name: 'name', mapping: 'name' }
]
}),
- listeners:{
- beforeload : function(){
+ listeners: {
+ beforeload: function () {
loadMask = new Ext.LoadMask(Ext.getBody(), {
- msg: '正在加载供应室...,请稍候!',removeMask: true
+ msg: '正在加载供应室...,请稍候!', removeMask: true
});
loadMask.show();
},
- load :function (thiz,records,options ){
+ load: function (thiz, records, options) {
loadMask.hide();
var currentOrgUnitIsSupplyRoom = false;
- if(records && records.length > 0){
+ if (records && records.length > 0) {
for (var i = 0; i < records.length; i++) {
var supplyRoomData = records[i].data;
var departCodeTemp = supplyRoomData.departCode;
//如果没有查看其它供应室权限时,只显示是当前用户的科室
- if(SSTS_View_All_Supply_Room_Report){
- if(departCodeTemp == currentOrgUnitCoding){
- supplyRoomStore.add(new supplyRoomRecord({'departCode':departCodeTemp,'name':supplyRoomData.name}));
+ if (SSTS_View_All_Supply_Room_Report) {
+ if (departCodeTemp == currentOrgUnitCoding) {
+ supplyRoomStore.add(new supplyRoomRecord({ 'departCode': departCodeTemp, 'name': supplyRoomData.name }));
currentOrgUnitIsSupplyRoom = true;
}
- }else{
- supplyRoomStore.add(new supplyRoomRecord({'departCode':departCodeTemp,'name':supplyRoomData.name}));
- if(departCodeTemp == currentOrgUnitCoding){
+ } else {
+ supplyRoomStore.add(new supplyRoomRecord({ 'departCode': departCodeTemp, 'name': supplyRoomData.name }));
+ if (departCodeTemp == currentOrgUnitCoding) {
currentOrgUnitIsSupplyRoom = true;
}
}
}
}
//最后使供应室下拉框默认选中用户所属的当前的科室(前提是用户所属的当前的科室也在选项中)
- if(currentOrgUnitIsSupplyRoom){
+ if (currentOrgUnitIsSupplyRoom) {
Ext.getCmp('querySupplyRoom').setValue(currentOrgUnitCoding);
}
}
}
});
//20181225 end
// 记录cookie(3步)
- function reloadReport(){
+ function reloadReport() {
var departCoding = Ext.getCmp('querySupplyRoom').getValue();
var querySupplyRoom = Ext.getCmp('querySupplyRoom').getValue();
- if(querySupplyRoom.indexOf(ALL) == 0){
+ if (querySupplyRoom.indexOf(ALL) == 0) {
querySupplyRoom = "";
}
-
+
var queryYear = $Id('monthSearch').value;
// 监测项类型
var monitoringType = $Id('monitoringType').value;
@@ -112,19 +112,19 @@
var timeType = Ext.getCmp('timeType').getRawValue();
var yearStr = '';
var monthStr = '';
- if('年份' == timeType){
+ if ('年份' == timeType) {
yearStr = $Id('yearSearch').value;
- }else{
+ } else {
var monthSearch = $Id('monthSearch').value;
var arr = new Array();
arr = monthSearch.split('-');
- if(arr.length > 1){
+ if (arr.length > 1) {
yearStr = arr[0];
monthStr = arr[1];
}
}
-
- if((inspectItem == null || inspectItem == "") && (responsibilityType == null || responsibilityType == "")){
+
+ if ((inspectItem == null || inspectItem == "") && (responsibilityType == null || responsibilityType == "")) {
showResult("请选择责任环节或者监测项");
return;
}
@@ -133,237 +133,237 @@
removeMask: true
});
myMask.show();
-
+
var reportFile = "";
- if(type == "lineChart"){
+ if (type == "lineChart") {
// 折线图
reportFile = "QualityMonitoringInspectMonthReportLineChartView.jasper";
- }else if(type == "barChart"){
+ } else if (type == "barChart") {
// 柱状图
reportFile = "QualityMonitoringInspectMonthReportBarChartView.jasper";
- }else if( type == "firstSecondHalfForm" || type == "compareLastForm"){
+ } else if (type == "firstSecondHalfForm" || type == "compareLastForm") {
// 上下半年对比 用表格
reportFile = "QualityMonitoringInspectCompareReportView.jasper";
- }else if(type == "quarterForm"){
+ } else if (type == "quarterForm") {
// 季度对比表格
reportFile = "QualityMonitoringInspectQuarterCompareReportView.jasper";
- }else {
+ } else {
// 表格
- if('年月' == timeType){
+ if ('年月' == timeType) {
reportFile = "QualityMonitoringInspectDayOfMonthReportView.jasper";
- }else{
+ } else {
reportFile = "QualityMonitoringInspectMonthReportView.jasper";
}
}
var url = WWWROOT + '/jasperreports/jasperreportsAction!createReportFromJavaBeanSource.do';
var params = {
- jasperreportName : reportFile,
- monitoringType : monitoringType,
- queryYear : yearStr,
- queryMonth : monthStr,
- inspectItem : inspectItem,
- type : type,
- inspectDetail : inspectDetail,
- querySupplyRoom : querySupplyRoom,
- responsibilityType : responsibilityType,
- reportName:'QualityMonitoringInspectMonthReport'
+ jasperreportName: reportFile,
+ monitoringType: monitoringType,
+ queryYear: yearStr,
+ queryMonth: monthStr,
+ inspectItem: inspectItem,
+ type: type,
+ inspectDetail: inspectDetail,
+ querySupplyRoom: querySupplyRoom,
+ responsibilityType: responsibilityType,
+ reportName: 'QualityMonitoringInspectMonthReport'
}
- searchReport(url,params);
+ searchReport(url, params);
}
- Ext.ux.ForgonPageGrid.prototype.getGridParameterMap = function() {
+ Ext.ux.ForgonPageGrid.prototype.getGridParameterMap = function () {
- };
-
- var departRecord = Ext.data.Record.create([ {
- name : 'id'
- }, {
- name : 'name'
- } ]);
-
- var formDefinitionStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/qualityMonitoringDefinitionAction!loadLastDeployFormDefinitionGroupByFormName.do',
- method : 'POST'
- }),
- reader : new Ext.data.JsonReader({
- root : 'data'
- },[
- {name : 'id'},
- {name : 'name'}
- ]
- )
- });
- formDefinitionStore.on("beforeload", function(thiz, options) {
- thiz.baseParams["formType"] = Ext.getCmp('monitoringType').getValue();
- if(supplyRoomType == supplyRoomTypeFirstSupplyRoom || supplyRoomType == supplyRoomTypeSecondSupplyRoom){
- thiz.baseParams["showAll"] = true;
- }
- thiz.baseParams["querySupplyRoom"] = Ext.getCmp('querySupplyRoom').getRawValue();
- });
-
- var formDefinitionDeatilStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : '/disinfectSystem/qualityMonitoringDefinitionAction!loadQualityMonitoringItem.do',
- method : 'POST'
- }),
- reader : new Ext.data.JsonReader({
- root : 'data'
- },[
- {name : 'id'},
- {name : 'name'}
- ]
- )
- });
- formDefinitionDeatilStore.on("beforeload", function(thiz, options) {
- thiz.baseParams["inspectItemId"] = Ext.getCmp('inspectItem').getValue();
- });
-
- var monitoringTypeStore = new Ext.data.SimpleStore( {
- fields : [ 'value' ],
- data : [['质量监测'], ['定期监测']]
- });
-
-
- var timeTypeStore = new Ext.data.SimpleStore( {
- fields : [ 'value' ],
- data : [['年份'], ['年月']]
- });
-
- var form = new Ext.form.FormPanel({
- title : '质量监测报表',
- region : 'north',
- labelAlign : 'right',
- buttonAlign : 'center',
- collapsible : true,
- collapseMode : 'mini',
- split : true,
- border : 0,
- // bodyStyle : 'padding: 10px 10px 0px 10px;',
- frame : true,
- bodyStyle : 'padding:0px auto;margin:0px',// padding:1px;padding-top:5px;
- height : 170,
- items : [{
- layout : 'column',
- height : 110,
- labelWidth : 70,
- items : [{
- width : 160,
- layout : 'form',
- labelWidth : 60,
- items : [{
- xtype : 'combo',
- fieldLabel : "日期类型",
- valueField : 'value',
- displayField : 'value',
- store : timeTypeStore,
- triggerAction : 'all',
- editable : false,
- mode : 'local',
- forceSelection : false,
- name : "timeType",
- id : "timeType",
- anchor : '95%',
- value:'年份',
- listeners:{
- select:function(){
- if('年份' == this.value){
- Ext.getCmp('yearSearch_id').show();
- Ext.getCmp('monthSearch_id').hide();
- }else{
- Ext.getCmp('yearSearch_id').hide();
- Ext.getCmp('monthSearch_id').show();
- }
+ };
+
+ var departRecord = Ext.data.Record.create([{
+ name: 'id'
+ }, {
+ name: 'name'
+ }]);
+
+ var formDefinitionStore = new Ext.data.Store({
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/qualityMonitoringDefinitionAction!loadLastDeployFormDefinitionGroupByFormName.do',
+ method: 'POST'
+ }),
+ reader: new Ext.data.JsonReader({
+ root: 'data'
+ }, [
+ { name: 'id' },
+ { name: 'name' }
+ ]
+ )
+ });
+ formDefinitionStore.on("beforeload", function (thiz, options) {
+ thiz.baseParams["formType"] = Ext.getCmp('monitoringType').getValue();
+ if (supplyRoomType == supplyRoomTypeFirstSupplyRoom || supplyRoomType == supplyRoomTypeSecondSupplyRoom) {
+ thiz.baseParams["showAll"] = true;
+ }
+ thiz.baseParams["querySupplyRoom"] = Ext.getCmp('querySupplyRoom').getRawValue();
+ });
+
+ var formDefinitionDeatilStore = new Ext.data.Store({
+ proxy: new Ext.data.HttpProxy({
+ url: '/disinfectSystem/qualityMonitoringDefinitionAction!loadQualityMonitoringItem.do',
+ method: 'POST'
+ }),
+ reader: new Ext.data.JsonReader({
+ root: 'data'
+ }, [
+ { name: 'id' },
+ { name: 'name' }
+ ]
+ )
+ });
+ formDefinitionDeatilStore.on("beforeload", function (thiz, options) {
+ thiz.baseParams["inspectItemId"] = Ext.getCmp('inspectItem').getValue();
+ });
+
+ var monitoringTypeStore = new Ext.data.SimpleStore({
+ fields: ['value'],
+ data: [['质量监测'], ['定期监测']]
+ });
+
+
+ var timeTypeStore = new Ext.data.SimpleStore({
+ fields: ['value'],
+ data: [['年份'], ['年月']]
+ });
+
+ var form = new Ext.form.FormPanel({
+ title: '质量监测报表',
+ region: 'north',
+ labelAlign: 'right',
+ buttonAlign: 'center',
+ collapsible: true,
+ collapseMode: 'mini',
+ split: true,
+ border: 0,
+ // bodyStyle : 'padding: 10px 10px 0px 10px;',
+ frame: true,
+ bodyStyle: 'padding:0px auto;margin:0px',// padding:1px;padding-top:5px;
+ height: 170,
+ items: [{
+ layout: 'column',
+ height: 110,
+ labelWidth: 70,
+ items: [{
+ width: 160,
+ layout: 'form',
+ labelWidth: 60,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: "日期类型",
+ valueField: 'value',
+ displayField: 'value',
+ store: timeTypeStore,
+ triggerAction: 'all',
+ editable: false,
+ mode: 'local',
+ forceSelection: false,
+ name: "timeType",
+ id: "timeType",
+ anchor: '95%',
+ value: '年份',
+ listeners: {
+ select: function () {
+ if ('年份' == this.value) {
+ Ext.getCmp('yearSearch_id').show();
+ Ext.getCmp('monthSearch_id').hide();
+ } else {
+ Ext.getCmp('yearSearch_id').hide();
+ Ext.getCmp('monthSearch_id').show();
}
}
- }]
-
- },{
- width : 200,
- layout : 'form',
- labelWidth : 60,
- id : 'yearSearch_id',
- items : [
- new Ext.ux.MonthField({
- id:'yearSearch',
- name : 'yearSearch',
- fieldLabel : '年份',
- readOnly : true,
- width : 110,
- format:'Y',
- value : new Date(),
- listeners : {
- specialkey : function(field, ee) {
- if (ee.getKey() == Ext.EventObject.ENTER) {
-// initQueryValueAndReload();
- }
+ }
+ }]
+
+ }, {
+ width: 200,
+ layout: 'form',
+ labelWidth: 60,
+ id: 'yearSearch_id',
+ items: [
+ new Ext.ux.MonthField({
+ id: 'yearSearch',
+ name: 'yearSearch',
+ fieldLabel: '年份',
+ readOnly: true,
+ width: 110,
+ format: 'Y',
+ value: new Date(),
+ listeners: {
+ specialkey: function (field, ee) {
+ if (ee.getKey() == Ext.EventObject.ENTER) {
+ // initQueryValueAndReload();
}
}
- })]
- },{
- width : 200,
- layout : 'form',
- labelWidth : 60,
- id : 'monthSearch_id',
- hidden : false,
- items : [
- new Ext.ux.MonthField({
- id:'monthSearch',
- name : 'monthSearch',
- fieldLabel : '年月',
- readOnly : true,
- width : 110,
- format:'Y-m',
- value : new Date(),
- listeners : {
- specialkey : function(field, ee) {
- if (ee.getKey() == Ext.EventObject.ENTER) {
-// initQueryValueAndReload();
- }
- },
- render: function() {
- setTimeout(function() {
- Ext.getCmp('monthSearch_id').hide();
- }, 100);
+ }
+ })]
+ }, {
+ width: 200,
+ layout: 'form',
+ labelWidth: 60,
+ id: 'monthSearch_id',
+ hidden: false,
+ items: [
+ new Ext.ux.MonthField({
+ id: 'monthSearch',
+ name: 'monthSearch',
+ fieldLabel: '年月',
+ readOnly: true,
+ width: 110,
+ format: 'Y-m',
+ value: new Date(),
+ listeners: {
+ specialkey: function (field, ee) {
+ if (ee.getKey() == Ext.EventObject.ENTER) {
+ // initQueryValueAndReload();
}
+ },
+ render: function () {
+ setTimeout(function () {
+ Ext.getCmp('monthSearch_id').hide();
+ }, 100);
}
- })]
- },{
-// columnWidth : .2,
- width : 248,
- layout : 'form',
- labelWidth : 70,
- hidden : false,
- items : [{
- width : 250,
- layout : 'form',
- labelWidth : 70,
- labelSeparator : '选择供应室:',
- items : [{//20181225
- xtype : 'multiSelect',
- id : 'querySupplyRoom',
- name : 'querySupplyRoom',
- valueField : 'departCode',
- displayField : 'name',
- minChars : 0,
- allowBlank : true,
- editable : false,
- store : supplyRoomStore,
- forceSelection : false,
- mode : 'local',
- triggerAction : 'all',
- lazyInit : true,
- typeAhead : false,
- anchor : '95%',
- listeners: {
- select: function (combo, record, index) {
-
- formDefinitionStore.load();
- }
+ }
+ })]
+ }, {
+ // columnWidth : .2,
+ width: 248,
+ layout: 'form',
+ labelWidth: 70,
+ hidden: false,
+ items: [{
+ width: 250,
+ layout: 'form',
+ labelWidth: 70,
+ labelSeparator: '选择供应室:',
+ items: [{//20181225
+ xtype: 'multiSelect',
+ id: 'querySupplyRoom',
+ name: 'querySupplyRoom',
+ valueField: 'departCode',
+ displayField: 'name',
+ minChars: 0,
+ allowBlank: true,
+ editable: false,
+ store: supplyRoomStore,
+ forceSelection: false,
+ mode: 'local',
+ triggerAction: 'all',
+ lazyInit: true,
+ typeAhead: false,
+ anchor: '95%',
+ listeners: {
+ select: function (combo, record, index) {
+
+ formDefinitionStore.load();
}
- }]
-
+ }
+ }]
+
// items : [{
// xtype : 'combo',
// id : 'querySupplyRoom',
@@ -378,192 +378,192 @@
// triggerAction : 'all',
// anchor : '95%'
// }]
- }]
-// items : [{
-// xtype : 'combo',
-// id : 'querySupplyRoom',
-// name : 'querySupplyRoom',
-// valueField : 'departId',
-// displayField : 'name',
-// fieldLabel : "选择供应室",
-// allowBlank : true,
-// editable : false,
-// store : supplyRoomStore,
-// forceSelection : true,
-// mode : 'local',
-// triggerAction : 'all',
-// anchor : '95%'
-// }]
- },{
-// columnWidth : .2,
- width : 200,
- layout : 'form',
- labelWidth : 60,
- items : [{
- xtype : 'combo',
- fieldLabel : "监测类型",
- valueField : 'value',
- displayField : 'value',
- store : monitoringTypeStore,
- triggerAction : 'all',
- editable : false,
- mode : 'local',
- forceSelection : false,
- name : "monitoringType",
- id : "monitoringType",
- anchor : '95%',
- value:'质量监测',
- listeners:{
- select:function(){
- Ext.getCmp("inspectItem").setValue("");
- formDefinitionStore.removeAll();
- formDefinitionStore.load();
- }
+ }]
+ // items : [{
+ // xtype : 'combo',
+ // id : 'querySupplyRoom',
+ // name : 'querySupplyRoom',
+ // valueField : 'departId',
+ // displayField : 'name',
+ // fieldLabel : "选择供应室",
+ // allowBlank : true,
+ // editable : false,
+ // store : supplyRoomStore,
+ // forceSelection : true,
+ // mode : 'local',
+ // triggerAction : 'all',
+ // anchor : '95%'
+ // }]
+ }, {
+ // columnWidth : .2,
+ width: 200,
+ layout: 'form',
+ labelWidth: 60,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: "监测类型",
+ valueField: 'value',
+ displayField: 'value',
+ store: monitoringTypeStore,
+ triggerAction: 'all',
+ editable: false,
+ mode: 'local',
+ forceSelection: false,
+ name: "monitoringType",
+ id: "monitoringType",
+ anchor: '95%',
+ value: '质量监测',
+ listeners: {
+ select: function () {
+ Ext.getCmp("inspectItem").setValue("");
+ formDefinitionStore.removeAll();
+ formDefinitionStore.load();
}
- }]
- },{
- width : 200,
- layout : 'form',
- labelWidth : 60,
- items : [{
- xtype : 'combo',
- fieldLabel : "责任环节",
- valueField : 'value',
- displayField : 'value',
- store : new top.Ext.data.SimpleStore({
- fields : [ 'value' ],
- data : [[moduleNameArr[0]],[moduleNameArr[1]],[moduleNameArr[2]],[moduleNameArr[3]],[moduleNameArr[4]],[moduleNameArr[5]],[moduleNameArr[8]],[moduleNameArr[9]],['全部环节']]
- }
- ),
- triggerAction : 'all',
- editable : true,
- mode : 'local',
- forceSelection : false,
- name : "responsibilityType",
- id : "responsibilityType",
- anchor : '95%',
- value:'',
- listeners:{
- select:function(){
- Ext.getCmp("inspectItem").setValue("");
- Ext.getCmp("inspectDetail").setValue("");
- }
+ }
+ }]
+ }, {
+ width: 200,
+ layout: 'form',
+ labelWidth: 60,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: "责任环节",
+ valueField: 'value',
+ displayField: 'value',
+ store: new top.Ext.data.SimpleStore({
+ fields: ['value'],
+ data: [[moduleNameArr[0]], [moduleNameArr[1]], [moduleNameArr[2]], [moduleNameArr[3]], [moduleNameArr[4]], [moduleNameArr[5]], [moduleNameArr[8]], [moduleNameArr[9]], ['全部环节']]
+ }
+ ),
+ triggerAction: 'all',
+ editable: true,
+ mode: 'local',
+ forceSelection: false,
+ name: "responsibilityType",
+ id: "responsibilityType",
+ anchor: '95%',
+ value: '',
+ listeners: {
+ select: function () {
+ Ext.getCmp("inspectItem").setValue("");
+ Ext.getCmp("inspectDetail").setValue("");
}
- }]
- },{
-// columnWidth : .3,
- width : 270,
- layout : 'form',
- labelWidth : 50,
- items : [{
- xtype : 'combo',
- id : 'inspectItem',
- name : 'inspectItem',
- queryParam : 'spell',
- fieldLabel : '监测项',
- minChars : 0,
- valueField : 'id',
- displayField : 'name',
- anchor : '95%',
- store : formDefinitionStore,
- lazyInit : true,
- forceSelection : true,
- triggerAction : 'all',
- hideTrigger : false,
- typeAhead : false,
- allowBlank : true,
- listeners:{
- select:function(){
- Ext.getCmp("inspectDetail").setValue("");
- Ext.getCmp("responsibilityType").setValue("");
- formDefinitionDeatilStore.removeAll();
- formDefinitionDeatilStore.load();
- }
+ }
+ }]
+ }, {
+ // columnWidth : .3,
+ width: 270,
+ layout: 'form',
+ labelWidth: 50,
+ items: [{
+ xtype: 'combo',
+ id: 'inspectItem',
+ name: 'inspectItem',
+ queryParam: 'spell',
+ fieldLabel: '监测项',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'name',
+ anchor: '95%',
+ store: formDefinitionStore,
+ lazyInit: true,
+ forceSelection: true,
+ triggerAction: 'all',
+ hideTrigger: false,
+ typeAhead: false,
+ allowBlank: true,
+ listeners: {
+ select: function () {
+ Ext.getCmp("inspectDetail").setValue("");
+ Ext.getCmp("responsibilityType").setValue("");
+ formDefinitionDeatilStore.removeAll();
+ formDefinitionDeatilStore.load();
}
- }]
- },{
- layout:'form',
-// columnWidth:.28,
- width : 220,
- labelWidth:60,
- items:[{
- xtype : 'combo',
- id : 'inspectDetail',
- name : 'inspectDetail',
- queryParam : 'spell',
- fieldLabel : '监测细则',
- minChars : 0,
- valueField : 'name',
- displayField : 'name',
- store : formDefinitionDeatilStore,
- forceSelection : true,
- lazyInit : true,
- anchor : '95%',
- triggerAction : 'all',
- hideTrigger : false,
- typeAhead : false,
- allowBlank : true
- }]
- },{
- width : 550,
- layout : 'form',
- labelWidth : 60,
- items : [new Ext.ux.RadioGroup({
- fieldLabel : "显示形式",
- allowBlank : false,
- horizontal:true,
- defaultValue:'form',
- name : "type",
- id : "type",
- radios:[{boxLabel:'表格',value:'form'},
- {boxLabel:'折线图',value:'lineChart'},
- {boxLabel:'柱状图',value:'barChart'},
- {boxLabel:'上下半年对比',value:'firstSecondHalfForm'},
- {boxLabel:'跟去年对比',value:'compareLastForm'},
- {boxLabel:'季度对比',value:'quarterForm'}]
- }) ]
+ }
}]
- }],
- buttons:[{
- text : '查询',
- minWidth : 70,
- iconCls : 'icon_search',
- handler : function() {
- reloadReport();
- }
- },{
- text : '重置',
- minWidth : 70,
- iconCls : 'icon_set',
- handler : function() {
- Ext.getCmp('monthSearch').setValue("");
- Ext.getCmp('querySupplyRoom').setValue("");
- Ext.getCmp('inspectDetail').setValue("");
- Ext.getCmp('inspectItem').setValue("");
- Ext.getCmp('monitoringType').setValue("");
- Ext.getCmp('responsibilityType').setValue("");
- }
+ }, {
+ layout: 'form',
+ // columnWidth:.28,
+ width: 220,
+ labelWidth: 60,
+ items: [{
+ xtype: 'combo',
+ id: 'inspectDetail',
+ name: 'inspectDetail',
+ queryParam: 'spell',
+ fieldLabel: '监测细则',
+ minChars: 0,
+ valueField: 'name',
+ displayField: 'name',
+ store: formDefinitionDeatilStore,
+ forceSelection: true,
+ lazyInit: true,
+ anchor: '95%',
+ triggerAction: 'all',
+ hideTrigger: false,
+ typeAhead: false,
+ allowBlank: true
+ }]
+ }, {
+ width: 550,
+ layout: 'form',
+ labelWidth: 60,
+ items: [new Ext.ux.RadioGroup({
+ fieldLabel: "显示形式",
+ allowBlank: false,
+ horizontal: true,
+ defaultValue: 'form',
+ name: "type",
+ id: "type",
+ radios: [{ boxLabel: '表格', value: 'form' },
+ { boxLabel: '折线图', value: 'lineChart' },
+ { boxLabel: '柱状图', value: 'barChart' },
+ { boxLabel: '上下半年对比', value: 'firstSecondHalfForm' },
+ { boxLabel: '跟去年对比', value: 'compareLastForm' },
+ { boxLabel: '季度对比', value: 'quarterForm' }]
+ })]
}]
- });
-
-
- var reportForm = new Ext.Panel({
- frame:false,//渲染面板
- autoScroll:true,//自动显示滚动条
- collapsible:true,//允许展开和收缩
- bodyPadding:5,
- html:''
- });
-
- var viewport = new Ext.Viewport({
- layout : 'border',
- items : [form, {
- region : 'center',
- margins : '0 0 0 0',
- layout : 'fit',
- items : reportForm
- }]
- });
- // supplyRoomStore.load();
- supplyRoomRemoteStore.load();//20181225
- });
\ No newline at end of file
+ }],
+ buttons: [{
+ text: '查询',
+ minWidth: 70,
+ iconCls: 'icon_search',
+ handler: function () {
+ reloadReport();
+ }
+ }, {
+ text: '重置',
+ minWidth: 70,
+ iconCls: 'icon_set',
+ handler: function () {
+ Ext.getCmp('monthSearch').setValue("");
+ Ext.getCmp('querySupplyRoom').setValue("");
+ Ext.getCmp('inspectDetail').setValue("");
+ Ext.getCmp('inspectItem').setValue("");
+ Ext.getCmp('monitoringType').setValue("");
+ Ext.getCmp('responsibilityType').setValue("");
+ }
+ }]
+ });
+
+
+ var reportForm = new Ext.Panel({
+ frame: false,//渲染面板
+ autoScroll: true,//自动显示滚动条
+ collapsible: true,//允许展开和收缩
+ bodyPadding: 5,
+ html: ''
+ });
+
+ var viewport = new Ext.Viewport({
+ layout: 'border',
+ items: [form, {
+ region: 'center',
+ margins: '0 0 0 0',
+ layout: 'fit',
+ items: reportForm
+ }]
+ });
+ // supplyRoomStore.load();
+ supplyRoomRemoteStore.load();//20181225
+});
\ No newline at end of file