【1040】 【过滤和压制】压制后的资源表头出现了undefined
Showing
1 changed file
with
7 additions
and
6 deletions
@@ -62,7 +62,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'commonDe | @@ -62,7 +62,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'commonDe | ||
62 | , {field: 'resTypeName', title: '资源类型', align: 'center', width: '15%'} | 62 | , {field: 'resTypeName', title: '资源类型', align: 'center', width: '15%'} |
63 | , { | 63 | , { |
64 | field: 'resName', title: '资源名称', minWidth: 200, align: 'center', width: '25%', | 64 | field: 'resName', title: '资源名称', minWidth: 200, align: 'center', width: '25%', |
65 | - templet: '<div><span data-ip="{{d.ip}}" data-resname="{{d.resName}}" data-resid="{{d.resId}}" data-restype="{{d.resType}}" data-zymc="{{d.id}}" class="layui-table-link">{{d.resName}}</span></div>' | 65 | + templet: '<div><span data-ip="{{d.ip}}" data-resname="{{d.resName}}" data-resid="{{d.resId}}" data-restypename="{{d.resTypeName}}" data-restype="{{d.resType}}" data-zymc="{{d.id}}" class="layui-table-link">{{d.resName}}</span></div>' |
66 | } | 66 | } |
67 | // , {field: 'kpiName', title: '指标', align: 'left'} | 67 | // , {field: 'kpiName', title: '指标', align: 'left'} |
68 | , {field: 'flag', title: '标识', align: 'center', width: '15%'} | 68 | , {field: 'flag', title: '标识', align: 'center', width: '15%'} |
@@ -82,7 +82,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'commonDe | @@ -82,7 +82,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'commonDe | ||
82 | , {field: 'resTypeName', title: '资源类型', align: 'center'} | 82 | , {field: 'resTypeName', title: '资源类型', align: 'center'} |
83 | , { | 83 | , { |
84 | field: 'resName', title: '资源名称', minWidth: 200, align: 'center', | 84 | field: 'resName', title: '资源名称', minWidth: 200, align: 'center', |
85 | - templet: '<div><span data-ip="{{d.ip}}" data-resname="{{d.resName}}" data-resid="{{d.resId}}" data-restype="{{d.resType}}" data-zymc="{{d.id}}" class="layui-table-link">{{d.resName}}</span></div>' | 85 | + templet: '<div><span data-ip="{{d.ip}}" data-resname="{{d.resName}}" data-resid="{{d.resId}}" data-restypename="{{d.resTypeName}}" data-restype="{{d.resType}}" data-zymc="{{d.id}}" class="layui-table-link">{{d.resName}}</span></div>' |
86 | } | 86 | } |
87 | , {field: 'kpiName', title: '指标', align: 'left'} | 87 | , {field: 'kpiName', title: '指标', align: 'left'} |
88 | , {field: 'flag', title: '标识', align: 'center'} | 88 | , {field: 'flag', title: '标识', align: 'center'} |
@@ -116,10 +116,11 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'commonDe | @@ -116,10 +116,11 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'commonDe | ||
116 | $('[data-zymc]').unbind().bind('click', function () { | 116 | $('[data-zymc]').unbind().bind('click', function () { |
117 | var resId = $(this).data("resid"); | 117 | var resId = $(this).data("resid"); |
118 | var resType = $(this).data("restype"); | 118 | var resType = $(this).data("restype"); |
119 | - var ip = $(this).data("ip"); | ||
120 | - var resName = $(this).data("resname"); | ||
121 | - var resTypeName = $(this).data(""); | ||
122 | - var title = resName + '|' + resTypeName + '|' + ip;//名称,类型,及ip | 119 | + //lsq 优化详情页的title出现undefined 2022-08-31 |
120 | + var ip = $(this).data("ip") && $(this).data("ip")!=undefined && $(this).data("ip")!='undefined'?$(this).data("ip"):''; | ||
121 | + var resName = $(this).data("resname") && $(this).data("resname")!=undefined && $(this).data("resname")!='undefined'?$(this).data("resname"):''; | ||
122 | + var resTypeName = $(this).data("resTypeName") && $(this).data("resTypeName")!=undefined && $(this).data("resTypeName")!='undefined'?$(this).data("resTypeName"):''; | ||
123 | + var title = resName + (resTypeName?'|' + resTypeName:'') + (ip?'|' + ip:'');//名称,类型,及ip | ||
123 | commonDetail.openDetail(resId, resType, title); | 124 | commonDetail.openDetail(resId, resType, title); |
124 | }); | 125 | }); |
125 | 126 |
-
Please register or login to post a comment