将查询得到的json段的一行,设为链接形式,以打开新页面进行详细内容显示

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/LegendaryHe/article/details/52755124

{

            //将从数据库中查出的excel_id 夹在 url中作为参数传到 新打开的钻取界面中
            "text" : "明细",
            "dataIndex" : "EXCEL_ID",
            "width" : 40,
            "renderer" : function(value,cellmeta,record) {
                var value = '明细查询';
                var excel_id = "'"+ record.data["EXCEL_ID"]+"'";
                return '<a href="#" onclick="queryDetial('+excel_id+')">' + value + '</a>';
            },
        } , {//该字段,设为hidden,不用于显示,用于传输excel_id数据进行,表格的明细查询
            "dataIndex" : "EXCEL_ID",
            "width" : 40,
            "hidden" : true,

        }


function queryDetial(excel_id){
        var queryDetial = new queryDetialWin(excel_id);
        queryDetial.winshow();
    };
    
    function queryDetialWin(excel_id){
        var win = null;
        
        this.create = function(){
            console.log(excel_id);
            win = Ext.create('Ext.window.Window',{
                title : "明细查询结果页面",
                width : '80%',
                height : 300,
                resizable : false,
                draggable : false, // 是否可以拖动
                collapsible : true, //允许缩放条
                closeAction : 'close',
                closable : true,
                modal : 'true',// 弹出模态窗体
                html:'<iframe src="detail.jsp?excel_id='+excel_id+'" width="100%" height="100%"></iframe>',
            });
        };
        this.winshow = function(){
            if(win==null)
                this.create();
            win.show();
        };
    };

猜你喜欢

转载自blog.csdn.net/LegendaryHe/article/details/52755124