怎么在表格里加链接

提问 3 842
然然
然然 2020-09-10
版本:renren-security V4.0 开发环境:
使用最新版本的renren-security,自动生成的代码。 现在有个需求,就是在列表页的表格中,点击编号,跳转到详情页。 如下图所示,点击“工程编号”,即跳转或者弹窗该工程的详细信息。 这个该怎么实现?求指导!!!在线等!!!谢谢!!! img[//cdn.renren.io/d5359202009100929011387.png]
回帖
  • [pre] {title: '图标', field: 'icon', align: 'center', valign: 'middle', sortable: true, width: '80px', formatter: function(item, index){ return item.icon == null ? '' : '<i class="'+item.icon+' fa-lg"></i>'; }} [/pre] 类似这样
    0
  • 然然
    然然 (楼主)
    2020-09-10
    @Mark 你刚才提供的代码是renren-fast前端,在vue里面写的吧? 我用的是renren-security,它是用js生成的表格: [pre] $(function () { $("#jqGrid").jqGrid({ url: baseURL + 'sys/item/list', datatype: "json", colModel: [ { label: '工程编号', name: 'proNo', index: 'pro_no', width: 80 }, { label: '工程名称', name: 'proName', index: 'pro_name', width: 80 }, { label: '年份', name: 'proYear', index: 'pro_year', width: 80 }, { label: '工程类型', name: 'proType', index: 'pro_type', width: 80 } ], viewrecords: true, height: 385, rowNum: 10, rowList : [10,30,50], rownumbers: true, rownumWidth: 25, autowidth:true, multiselect: true, pager: "#jqGridPager", jsonReader : { root: "page.list", page: "page.currPage", total: "page.totalPage", records: "page.totalCount" }, prmNames : { page:"page", rows:"limit", order: "order" }, gridComplete:function(){ //隐藏grid底部滚动条 $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" }); } }); }); [/pre] 不知道怎样在这个pro_no这一列加上链接,
    0
  • 然然
    然然 (楼主)
    2020-09-10
    @Mark 抱歉,刚才没明白意思。。。哈哈。。。实现了。。。谢谢! [pre] colModel: [ { label: '工程编号', name: 'proNo', index: 'pro_no', width: 80, formatter: function(item, index){ return item == null ? '' : '<a style="cursor: pointer;">'+item+'</a>'; } }, { label: '工程名称', name: 'proName', index: 'pro_name', width: 80 }, { label: '年份', name: 'proYear', index: 'pro_year', width: 80 }, { label: '工程类型', name: 'proType', index: 'pro_type', width: 80 } ], [/pre]
    0
本帖已结贴