Ext.namespace("XXX.train");
XXX.train.commentShowWin = function(config)
{
Ext.apply(this, config);
// 数据源
this.store = new Ext.data.Store
(
{
url : '../trainComment/get_unfinish_detail?train='+this.uid,
waitMsg : 'Loading',
reader : new Ext.data.JsonReader
(
{
root : 'items',
id : 'id',
totalProperty : "totalCount",
fields :
[
'id',
'train_name',
'employee_name',
'status_name'
]
}
)
}
);
this.store.load();
this.cm = new Ext.grid.ColumnModel
(
[
{header: "培训标题", width: 50, sortable: true, dataIndex: 'train_name'},
{header: "参训人员", width: 50, sortable: true, dataIndex: 'employee_name'},
{header: "反馈状态", width: 25, sortable: true, dataIndex: 'status_name'}
]
);
this.grid = new Ext.grid.GridPanel
(
{
id : Ext.id(),
margins : '2 2 2 2', //为了不要与容器的边框重叠,设定2px的间距。
loadMask : true,
store : this.store,
cm : this.cm,
plugins : [new Ext.ux.plugins.FitToParent()],
stripeRows : true,
width : '100%',
header : false,
layout : "fit",
frame : false,
border : false,
viewConfig : {forceFit: true}
}
);
this.form = newXXX.common.baseForm
(
{
id : this.form_id,
height : 400,
width : 800,
items : [this.grid]
}
);
// 初始构造函数
XXX.train.commentShowWin.superclass.constructor.call
(
this,
{
items : [this.form]
}
);
};
// 继承
Ext.extend
(
XXX.train.commentShowWin,
Ext.Window,
{
width : 800
}
);
Ext.namespace("XXX.train");
XXX.train.totalShowWin = function(config)
{
Ext.apply(this, config);
// 讲师评估图表
this.lector_store_conn = new Ext.data.Connection
({
timeout : 1200000,
url : '../trainComment/get_lector_avg',
method : 'POST'
});
this.lector_store = new Ext.data.Store
(
{
proxy : new Ext.data.HttpProxy(this.lector_store_conn),
waitMsg : 'loading',
reader : new Ext.data.JsonReader
(
{
root : 'items',
fields : ['type', 'count']
}
)
}
);
this.lector_store.baseParams =
{
id : this.uid
};
this.lector_store.load();
this.lector_panel = new Ext.Panel
(
{
title : '讲师评估',
width : 700,
height : 200,
frame : true,
items :
{
store : this.lector_store,
xtype : 'columnchart',
yField : 'count',
xField : 'type',
xAxis : new Ext.chart.CategoryAxis
(
{
title : ''
}
),
yAxis : new Ext.chart.NumericAxis
(
{
title : ''
}
),
extraStyle :
{
xAxis :
{
labelRotation : 0 // 字体倾斜度
}
}
}
}
);
// 课程评估图表
this.content_store_conn = new Ext.data.Connection
({
timeout : 1200000,
url : '../trainComment/get_content_avg',
method : 'POST'
});
this.content_store = new Ext.data.Store
(
{
proxy : new Ext.data.HttpProxy(this.content_store_conn),
waitMsg : 'loading',
reader : new Ext.data.JsonReader
(
{
root : 'items',
fields : ['type', 'count']
}
)
}
);
this.content_store.baseParams =
{
id : this.uid
};
this.content_store.load();
this.content_panel = new Ext.Panel
(
{
title : '课程评估',
width : 700,
height : 200,
frame : true,
items :
{
store : this.content_store,
xtype : 'columnchart',
yField : 'count',
xField : 'type',
xAxis : new Ext.chart.CategoryAxis
(
{
title : ''
}
),
yAxis : new Ext.chart.NumericAxis
(
{
title : ''
}
),
extraStyle :
{
xAxis :
{
labelRotation : 0 // 字体倾斜度
}
}
}
}
);
// 总体平均分
this.score = newXXX.common.DisplayField
({
id : Ext.id(),
labelStyle : 'width:250px;',
fieldLabel : '本次培训的总体评价平均分(满分10分)'
});
Ext.Ajax.request
({
url: '../trainComment/get_score_avg',
success: function(response, options)
{
var result = Ext.util.JSON.decode(response.responseText);
this.score.setValue(result.score);
},
failure: function(response, options)
{
this.score.setValue(0);
},
scope : this,
params: { id : this.uid }
});
this.train_result = new Ext.form.TextArea
({
xtype : 'textarea',
anchor : '95%',
id : Ext.id(),
name : 'train_result',
grow : true,
growMax : 150,
growMin : 50,
fieldLabel : '培训收获'
});
Ext.Ajax.request
({
url: '../trainComment/get_train_result',
success: function(response, options)
{
var result = Ext.util.JSON.decode(response.responseText);
this.train_result.setValue(result.train_result);
},
failure: function(response, options)
{
this.train_result.setValue(0);
},
scope : this,
params: { id : this.uid }
});
this.train_question = new Ext.form.TextArea
({
xtype : 'textarea',
anchor : '95%',
id : Ext.id(),
name : 'train_question',
grow : true,
growMax : 150,
growMin : 50,
fieldLabel : '学员的问题与建议'
});
Ext.Ajax.request
({
url: '../trainComment/get_train_question',
success: function(response, options)
{
var result = Ext.util.JSON.decode(response.responseText);
this.train_question.setValue(result.train_question);
},
failure: function(response, options)
{
this.train_question.setValue(0);
},
scope : this,
params: { id : this.uid }
});
this.form = newXXX.common.baseForm
(
{
id : this.form_id,
labelWidth : 200,
items :
[
this.lector_panel,
this.content_panel,
this.score,
this.train_result,
this.train_question,
],
buttons:
[
{
xtype : 'submitbtn',
text: '提交',
handler: function()
{
if(this.form.getForm().isValid())
{
this.form.getForm().submit
(
{
url : '../trainComment/train_comment',
waitTitle : "消息提示",
waitMsg : '保存数据......',
scope:this,
success : function(temp_form,action)
{
parent.set_text(action.result.msg,action.result.status);
if(action.result.status == 10010)
{
grid.getStore().reload();
this.close();
}
},
failure : function()
{
parent.set_failure_text();
}
}
);
}
},
scope : this
},
{
xtype : 'cancelbtn',
text : '取消',
handler : function()
{
this.close();
},
scope : this
}
]
}
);
XXX.train.totalShowWin.superclass.constructor.call
(
this,
{
items : [this.form]
}
);
};
// 继承
Ext.extend
(
XXX.train.totalShowWin,
Ext.Window,
{
maximized : false,
maximizable : true,
width : 800
}
);
分享到:
相关推荐
其最大特色是以六条主线贯穿全书:面向对象编程思想、Java语言的语法、Java虚拟机执行Java程序的原理、在实际项目中的运用、设计模式和性能优化技巧。同时,本书还贯穿了Sun公司的SCJP(Sun Cer......
C#面向对象编程期末开卷参考题
习题解答-Java面向对象程序设计-邢国波-清华大学出版社.pdf习题解答-Java面向对象程序设计-邢国波-清华大学出版社.pdf习题解答-Java面向对象程序设计-邢国波-清华大学出版社.pdf习题解答-Java面向对象程序设计-邢...
《Java面向对象程序设计》和《Java面向对象程序设计习题解答与实验》,使用超星阅读器浏览,仅供学习和参考使用。
面向对象编程是计算机语言的一种先进的编程模式,在工业控制系统的PLC程序中也可以采用这种设计思想,虽然我们无法实现面向对象的很多特点如“继承”,甚至于它根本就不具备面向对象编程语言的特点,但面向对象编程...
面向对象程序设计 廖裕青 面向对象的软件开发
Labview面向对象编程快速入门
《面向对象程序设计:C++语言描述(原书第2版)》内容丰富,结构合理,写作风格严谨,深刻地论述了c++语言的面向对象编程的各种技术,主要内容包括:面向对象编程方法、c++语言的各种特性、stl、c++输入/输出流、mfc等。...
C++面向对象程序设计课程设计报告.pdf
c++面向对象程序设计课后习题答案c++面向对象程序设计课后习题答案c++面向对象程序设计课后习题答案
让读者在理解面向对象编程思想的同时逐步掌握Java程序设计语言,在能够使用Java编写应用程序后建立起完整的面向对象编程思想体系。 全书共13章,内容包括Java介绍、面向对象编程中的对象、由对象展开的Java基本数据...
Python实验一 面向对象程序设计实验
C++面向对象程序设计习题集,主要练习面向对象思想。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
java面向对象程序设计第4章源代码
面向对象程序设计—c++部分习题答案。面向对象程序设计—c++部分习题答案
Delphi面向对象程序设计课件
JAVA面向对象程序设计(期末考试试题及答案)
在次有大量的关于c++面向对象编程的实例 对于初级的学习者有很大的帮助
JAVA面向对象程序设计(期末考试试题及答案)
Java面向对象程序设计教程PDF,完整的面向对象编程指南,大量习题便于自学。