网页切换时怎么用JS代码怎么筛选数据

图片说明
图片说明
切换前网页如图1,点击对应查看按钮进行切换到图2,如何根据病人姓名筛选图2中的数据,只显示图1中选中查看按钮的病人的数据信息,即点击查看小明的数据,则跳转后只显示小明的各项数据。跳转的代码如下:
var DeviceMgr_t = Ext.getCmp(Device.DeviceMgr.DeviceMgrPanelID+'_t');
if (DeviceMgr_t){
DeviceMgr_t.destroy();
}

        var DevicePanel = new Device.DeviceMgr.DeviceMgrPanel();
        var mainPanel = Ext.getCmp("main-panel");
        var p = mainPanel.add({
            xtype : 'panel',
            id : Device.DeviceMgr.DeviceMgrPanelID+'_t',
            region : 'center',
            layout : 'fit',
            items : [DevicePanel]
        });
        p.show();
    小弟初学JS就要改网页,如有帮助,感激不尽,新人没有C币。。。

对病人匹配,只展示当前查看病人的数据

if(数据.当前使用病人 === “病人姓名”){
//展示数据
}
注意:“病人姓名”是你点击从上一个页面传递过来的参数,你可以给每个病人设置对应的独立id