• EXT gridPanel 添加图片


    var workAreaGrid = new Ext.grid.GridPanel({
                region: 'west',
                title: '工作面预警结果',
                store: wkSto,
                 500,
                split: true,
                margins: "0 3 0 0",
                stripeRows: true,
                autoExpandColumn: '4',
                //            loadMask: {
                //                msg: '正在加载数据,请稍侯……'
                //            },
                columns: [new Ext.grid.RowNumberer(), {
                    header: 'ID',
                    hidden: true,
                     0,
                    dataIndex: 'ID'
                },
                {
                    header: 'intClassBJ',
                    hidden: true,
                     0,
                    dataIndex: 'BJ'
                },
                {
                    header: 'intClassYJ',
                    hidden: true,
                     0,
                    dataIndex: 'YJ'
                },
                {
                    header: '工作面名称',
                     120,
                    dataIndex: 'chrWorName'
                },
                {
                    header: '时间',
                     100,
                    dataIndex: 'date'
                },
                {
                    header: '采掘工艺',
                     100,
                    dataIndex: 'GX'
                },
                {
                    header: '状态预警',
                     100,
                    dataIndex: 'intClassBJ',
                    renderer: function (record) {
                        var str;
                        switch (record.toString()) {
                            case "0": str = "<img src="SubSystem/WSFT_System/resources/Imgs/0.jpg"/>";
                                break;
                            case "1": str = "<img src="SubSystem/WSFT_System/resources/Imgs/1.jpg"/>";
                                break;
                            case "2": str = "<img src="SubSystem/WSFT_System/resources/Imgs/2.jpg"/>";
                                break;
                        }
                        return str;
                    }
                },
                {
                    header: '趋势预警',
                     100,
                    dataIndex: 'intClassBJ',
                    renderer: function (record) {
                        var str;
                        switch (record.toString()) {
                            case "0": str = "<img src="SubSystem/WSFT_System/resources/Imgs/0j.jpg"/>";
                                break;
                            case "1": str = "<img src="SubSystem/WSFT_System/resources/Imgs/1j.jpg"/>";
                                break;
                            case "2": str = "<img src="SubSystem/WSFT_System/resources/Imgs/2j.jpg"/>";
                                break;
                        }
                        
                        return str;
                    }
                }],
                listeners: {
                    celldblclick: function (grid, rowIndex, record) {
    
                        //alert(record.toString());
                    }
                }
            });
  • 相关阅读:
    DB-MySQL:MySQL 正则表达式
    DB-MySQL:MySQL 事务
    DB-MySQL:MySQL 索引
    DB-MySQL:MySQL 临时表
    DB-MySQL:MySQL 复制表
    DB-MySQL:MySQL 序列使用
    DB-MySQL:MySQL 处理重复数据
    DB-MySql:MySQL 及 SQL 注入
    mysql
    PHP+jQuery 注册模块的改进之一:验证码存入SESSION
  • 原文地址:https://www.cnblogs.com/wuyihong/p/3387248.html
Copyright © 2020-2023  润新知