用户注册



邮箱:

密码:

用户登录


邮箱:

密码:
记住登录一个月忘记密码?

发表随想


还能输入:200字
云代码 - java代码库

Extjs管理系统页面

2016-01-05 作者: 云代码会员举报

[java]代码库

Ext.define('voole.view.vrm.cpManage.CpManage',{
    extend: 'Ext.panel.Panel',
    alias:'widget.cpManage_view_alias',
    store:'vrm.cpManage.CpManageStore',
    layout:'border',
    split: true,
    initComponent: function() {
        //内容提供商的类型
        var cptype_store= voole.biz.service.Dict.getDictStore("cptype",false);
            cptype_store.load();
        var isnotsync_store =voole.biz.service.Dict.getDictStore("isnotsync",false);
            isnotsync_store.load();
        var needauth_store =voole.biz.service.Dict.getDictStore("needauth",false);
            needauth_store.load();
        var synctype_store =voole.biz.service.Dict.getDictStore("synctype",false);
            synctype_store.load(); 
                //render 的时候用于调用keyname------------------------------------
        var getkeyname =function(value,render_arr){
            for(var k = 0; k < render_arr.length; k++){
                if(render_arr.items[k]["data"]['keyvalue'] == value){
                    return render_arr.items[k]["data"]['keyname'];
                }
            }
            return '';
        }
        this.items=[
                {
                     xtype:'panel',
                     region: 'center',
                     layout:"border",
                     split: true,
                    items:[
                        {//查询区域
                            xtype:"form",
                            title:'查询区域',
                            id:'cmManage_form_find_id',
                            layout:'column',
                            collapsible: true,
                            region:"north",
                            frame:true,
                            height:80,
                            defaults: { // defaults 将会应用所有的子组件上,而不是父容器
                               labelWidth:90,
                                 width:190,
                                 xtype:'textfield'
                            },
                            items:[
 
                    {
                        fieldLabel:'内容提供商编号',
                        name : 'cpid',
                        xtype: 'textfield',
                        width: 180,
                        allowBlank: true
                    },
                    {
                        fieldLabel:'内容提供商名称',
                        name : 'cpname',
                        xtype: 'textfield',
                        width: 180,
                        allowBlank: true
                    },
                   {
                      xtype: 'combo',
                      editable:false,
                      width:240,
                      name : 'cptype',
                      fieldLabel: '内容提供商类型',
                      id:'find_cplistby_cptype',
                      displayField :'keyname',
                      valueField:'keyvalue',
                        emptyText:'请选择内容提供商类型',
                      store:cptype_store,
                      queryMode: 'local'
                  } ,{
                        id:'find_cpManageby',
                        xtype: 'button',
                        width: 60,
                        text:'查询'
                    },
                    {
                        name : 'rst01',
                        xtype: 'button',
                        width: 60,
                        text:'重置',
                        handler: function(){
                            Ext.getCmp("cmManage_form_find_id").getForm().reset();
                        }
                    }        ] 
                },{//表格-----------------------------------
                         xtype:'gridpanel',
                         id:'cpManage_grid',
                         region: 'center',
                         store:'vrm.cpManage.CpManageStore',
                         defaults: { // defaults 将会应用所有的子组件上,而不是父容器
                                autoScroll: true,
                                align:'center'
                        },
                         border:1,multiSelect: true,frame:true,selModel:{selType:'checkboxmodel'},
                            tbar: [
                                   { xtype: 'button', text: '增加' ,iconCls:'grid-add',action:"cpManage_add",id:'cp_info_add',disabled:true},
                                   { xtype: 'button', text: '修改' ,iconCls:'grid-mif',action:"cpManage_modify",id:'cp_info_edit',disabled:true},
                                   { xtype: 'button', text: '删除' ,iconCls:'grid-delete',action:"cpManage_delete",id:'cp_info_del',disabled:true},
                                   { xtype: 'button', text: '内容同步任务' ,iconCls:'grid-mif',action:"cpManage_syncjobs",id:'cp_info_syncjobs',disabled:true}
                                 ],
                            columns:[
                                        {header: "seqno", width: 120, dataIndex: 'seqno', sortable: true,hidden: true},
                                       {header: "内容提供商编号", width: 100, dataIndex: 'cpid', sortable: true},
                                       {header: "内容提供商名称", width: 100, dataIndex: 'cpname', sortable: true},
                                       {header: "内容商英文名称", width: 100, dataIndex: 'cpenname', sortable: true},
                                       {header: "内容商类型", width: 100, dataIndex: 'cptype', sortable: true, renderer:function(value){return getkeyname(value,cptype_store.data)}},
                                       {header: "内容商简介", width: 100, dataIndex: 'cpintro', sortable: true},
                                       {header: "联系人", width: 100, dataIndex: 'contact', sortable: true},
                                       {header: "联系地址", width: 100, dataIndex: 'address', sortable: true},
                                       {header: "联系电话", width: 120, dataIndex: 'telephone', sortable: true},
                                       {header: "电子邮件", width: 100, dataIndex: 'email', sortable: true },
                                       {header: "网站地址", width: 100, dataIndex: 'weburl', sortable: true },
                                       {header: "是否执行同步任务", width: 100, dataIndex: 'isnotsync', sortable: true, renderer:function(value){return getkeyname(value,isnotsync_store.data)}},
                                       {header: "同步任务类型", width: 100, dataIndex: 'synctype', sortable: true, renderer:function(value){return getkeyname(value,synctype_store.data)}},
                                       {header: "是否需要授权", width: 100, dataIndex: 'needauth', sortable: true, renderer:function(value){return getkeyname(value,needauth_store.data)}},
                                       {header: "同步任务地址", width: 100, dataIndex: 'syncurl', sortable: true },
                                       {header: "同步任务结果地址", width: 100, dataIndex: 'resulturl', sortable: true }
                                     ],
                             dockedItems: [{
                                 id:'cp_list_pagingtoolbar',
                                 displayMsg:"显示从{0}条数据到{1}条数据,共{2}条数据",
                                 emptyMsg:"没有数据",
                                 xtype: 'pagingtoolbar',
                                store: 'vrm.cpManage.CpManageStore',   // GridPanel中使用的数据
                                 dock: 'bottom',
                                 displayInfo: true,        
                                 plugins:[Ext.create('Ext.ux.PagingToolbarResizer', {displayText:'每页显示条数:',options:VooleUtil.options})]
                             }]
                }]
            }]
        this.callParent(arguments);
     }
});


网友评论    (发表评论)


发表评论:

评论须知:

  • 1、评论每次加2分,每天上限为30;
  • 2、请文明用语,共同创建干净的技术交流环境;
  • 3、若被发现提交非法信息,评论将会被删除,并且给予扣分处理,严重者给予封号处理;
  • 4、请勿发布广告信息或其他无关评论,否则将会删除评论并扣分,严重者给予封号处理。


扫码下载

加载中,请稍后...

输入口令后可复制整站源码

加载中,请稍后...