| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- Ext.define('erp.view.hr.emplmana.AnswerForm1',{
- extend: 'Ext.form.Panel',
- alias: 'widget.AnswerForm1',
- id: 'form1',
- title: '答题导航 ',
- frame : true,
- autoScroll : true,
- bodyStyle:'',
- buttonAlign : 'center',
- bodyStyle:'background:#FFFFFF',
- FormUtil: Ext.create('erp.util.FormUtil'),
- confirmUrl:'',
- fieldDefaults : {
- margin : '4 2 4 2',
- labelAlign : "right",
- msgTarget: 'side',
- blankText : $I18N.common.form.blankText
- },
- initComponent : function(){
- this.callParent(arguments);
- formCondition = getUrlParam('formCondition');//从url解析参数
- formCondition = (formCondition == null) ? "" : formCondition.replace(/IS/g,"=").split('=')[1];
- //集团版
- var master=getUrlParam('newMaster');
- var param = {caller: this.caller || caller, id: this.formCondition || formCondition, _noc: (getUrlParam('_noc') || this._noc),other:1};
- if(master){
- param.master=master;
- }
- this.createItemsAndButtons(this,this.params || param);
- },
- createItemsAndButtons:function(form,params){
- Ext.Ajax.request({//拿到form的items
- url : basePath + 'hr/emplmana/checkExam.action',
- params: params,
- method : 'post',
- async:false,
- callback : function(options, success, response){
- if (!response) return;
- var res = new Ext.decode(response.responseText);
- if(res.exceptionInfo != null){
- showError(res.exceptionInfo);return;
- }
- var items=new Array();
- var data=res.data;
- var qtype='',detno=0,numb=['一、','二、','三、','四、','五、','六、','七、'],need=0;
- Ext.each(data,function(name,index){
- if(qtype!=data[index][3]){
- if(need%5!=0){
- for(var i=0;i<5-need%5;i++){
- items.push('<div style="display:inline;float:left;width:20%;" class="x-timepicker-item x-timepicker-hours"></div>');
- }
- }
- qtype=data[index][3];
- var it='<div >'+numb[detno++]+data[index][3]+'</div>';
- items.push(it);
- need=0;
- }
- need++;
- if(data[index][7]==0){
- var item='<div style="display:inline;float:left;width:20%;" class="x-timepicker-item x-timepicker-hours">'
- +'<a id=a_'+data[index][1]+' style="background:red;" href="#q_'+data[index][1]+'" hidefocus="on" >'+data[index][1]+'</a>'+'</div>';
- }else{
- var item='<div style="display:inline;float:left;width:20%;" class="x-timepicker-item x-timepicker-hours">'
- +'<a id=a_'+data[index][1]+' style="background:#E4F2FD;" href="#q_'+data[index][1]+'" hidefocus="on" >'+data[index][1]+'</a>'+'</div>';
- }
- items.push(item);
- });
- if(need%5!=0){
- for(var i=0;i<5-need%5;i++){
- items.push('<div style="display:inline;float:left;width:20%;" class="x-timepicker-item x-timepicker-hours"></div>');
- }
- }
- var score=res.score==0?'':res.score;
- var judger=res.judger==null?'':res.judger;
- var time = res.judgetime==null?'':res.judgetime;
- items.push('<div>考 生:'+res.name+'</div>');
- items.push('<div>满 分:'+res.total+'</div>');
- items.push('<div>选择得分:'+res.choicescore+'</div>');
- items.push('<div>总 分:'+score+'</div>');
- items.push('<div>阅卷人:'+judger+'</div>');
- items.push('<div>阅卷时间:'+time+'</div>');
- form.html=items;
- }
- });
- },
- items: [],
- buttons: []
- });
|