Authored by 王涛

624 【现场】【业务视图】用户搜索某个资源,小卡片未同步,展示错误

@@ -107,7 +107,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols @@ -107,7 +107,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
107 }); 107 });
108 } 108 }
109 109
110 - function renderDefaultIndex() { 110 + function renderDefaultIndex(keyWords) {
111 $('#bizIndexContent').show(); 111 $('#bizIndexContent').show();
112 $('#bizListContent').hide(); 112 $('#bizListContent').hide();
113 $('#biztreeTableContent').hide(); 113 $('#biztreeTableContent').hide();
@@ -117,7 +117,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols @@ -117,7 +117,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
117 autoHeight(bizindexTable); 117 autoHeight(bizindexTable);
118 window.setResizeEvents('autoHeight', autoHeight); 118 window.setResizeEvents('autoHeight', autoHeight);
119 admin.req({ 119 admin.req({
120 - url: common.domainName + '/api-web/home/resource/countResourceGroupByBusType', 120 + url: common.domainName + '/api-web/home/resource/countResourceGroupByBusType?keyWords='+keyWords,
121 }).done(function (res) { 121 }).done(function (res) {
122 layer.close(loading); 122 layer.close(loading);
123 laytpl($('#bizindexTpl').html()).render({list: res.data, isBiz: true}, function (html) { 123 laytpl($('#bizindexTpl').html()).render({list: res.data, isBiz: true}, function (html) {
@@ -252,16 +252,16 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols @@ -252,16 +252,16 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
252 $('#bizindexTable').html(html); 252 $('#bizindexTable').html(html);
253 }); 253 });
254 }); 254 });
255 - renderDefaultIndex(); 255 + renderDefaultIndex(val);
256 } 256 }
257 257
258 $("#bizTotal").parent().on("click",function () { 258 $("#bizTotal").parent().on("click",function () {
259 - renderDefaultIndex(); 259 + renderDefaultIndex('');
260 }) 260 })
261 261
262 $(".layui-input-search").keyup(function (e) { 262 $(".layui-input-search").keyup(function (e) {
263 if (e.keyCode === 13) { 263 if (e.keyCode === 13) {
264 - loadBizTree($(this).val()) 264 + loadBizTree($(this).val());
265 } 265 }
266 }); 266 });
267 267
@@ -1036,4 +1036,4 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols @@ -1036,4 +1036,4 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
1036 1036
1037 } 1037 }
1038 }); 1038 });
1039 -});  
  1039 +});
@@ -107,7 +107,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols @@ -107,7 +107,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
107 }); 107 });
108 } 108 }
109 109
110 - function renderDefaultIndex() { 110 + function renderDefaultIndex(keyWords) {
111 $('#bizIndexContent').show(); 111 $('#bizIndexContent').show();
112 $('#bizListContent').hide(); 112 $('#bizListContent').hide();
113 $('#biztreeTableContent').hide(); 113 $('#biztreeTableContent').hide();
@@ -117,7 +117,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols @@ -117,7 +117,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
117 autoHeight(bizindexTable); 117 autoHeight(bizindexTable);
118 window.setResizeEvents('autoHeight', autoHeight); 118 window.setResizeEvents('autoHeight', autoHeight);
119 admin.req({ 119 admin.req({
120 - url: common.domainName + '/api-web/home/resource/countResourceGroupByBusType', 120 + url: common.domainName + '/api-web/home/resource/countResourceGroupByBusType?keyWords='+keyWords
121 }).done(function (res) { 121 }).done(function (res) {
122 layer.close(loading); 122 layer.close(loading);
123 laytpl($('#bizindexTpl').html()).render({list: res.data, isBiz: true}, function (html) { 123 laytpl($('#bizindexTpl').html()).render({list: res.data, isBiz: true}, function (html) {
@@ -252,11 +252,11 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols @@ -252,11 +252,11 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols
252 $('#bizindexTable').html(html); 252 $('#bizindexTable').html(html);
253 }); 253 });
254 }); 254 });
255 - renderDefaultIndex(); 255 + renderDefaultIndex(val);
256 } 256 }
257 257
258 $("#bizTotal").parent().on("click",function () { 258 $("#bizTotal").parent().on("click",function () {
259 - renderDefaultIndex(); 259 + renderDefaultIndex('');
260 }) 260 })
261 261
262 $(".layui-input-search").keyup(function (e) { 262 $(".layui-input-search").keyup(function (e) {