Authored by 张凯

杭州-优化通知查询页面

@@ -26,20 +26,17 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -26,20 +26,17 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
26 //回车搜索 26 //回车搜索
27 $('#notice_search_keyword').keydown(function (e) { 27 $('#notice_search_keyword').keydown(function (e) {
28 if (e.keyCode === 13) { 28 if (e.keyCode === 13) {
29 - getChartData();  
30 - reloadTable(); 29 + reloadData();
31 } 30 }
32 }); 31 });
33 //查询按钮点击事件 32 //查询按钮点击事件
34 $('#noticeSearchQueryBtn').on('click',function () { 33 $('#noticeSearchQueryBtn').on('click',function () {
35 - getChartData();  
36 - reloadTable(); 34 + reloadData();
37 }) 35 })
38 36
39 //发送状态 37 //发送状态
40 form.on('select(notice_search_isSend)', function(){ 38 form.on('select(notice_search_isSend)', function(){
41 - getChartData();  
42 - reloadTable(); 39 + reloadData();
43 }); 40 });
44 41
45 form.render(); 42 form.render();
@@ -158,25 +155,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -158,25 +155,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
158 155
159 } 156 }
160 }); 157 });
161 - // 用户下拉框  
162 - // common.userXmSelect({  
163 - // el: '#notice_user_list',  
164 - // name: 'users',  
165 - // tips: '=接收人=',  
166 - // toolbar: {  
167 - // show: false  
168 - // },  
169 - // radio: true,  
170 - // on: function (data) {  
171 - // if (data.arr && data.arr.length > 0){  
172 - // userNames = data.arr[0].username;  
173 - // } else {  
174 - // userNames = '';  
175 - // }  
176 - // reloadTable();  
177 - // }  
178 - // });  
179 - 158 + //用户下拉框 joke add 20211209
180 $.ajax({ 159 $.ajax({
181 url: `${common.domainName}/api-web/notice/getNoticeUsers?access_token=${accessToken}`, 160 url: `${common.domainName}/api-web/notice/getNoticeUsers?access_token=${accessToken}`,
182 method: 'GET', 161 method: 'GET',
@@ -214,8 +193,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -214,8 +193,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
214 } else { 193 } else {
215 userNames = ''; 194 userNames = '';
216 } 195 }
217 - getChartData();  
218 - reloadTable(); 196 + reloadData();
219 } 197 }
220 }); 198 });
221 }else{ 199 }else{
@@ -228,7 +206,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -228,7 +206,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
228 } 206 }
229 }); 207 });
230 208
231 - //绑定业务下拉选择数据 209 + //绑定业务下拉选择数据 joke add 20211209
232 admin.req({ 210 admin.req({
233 url: domainName + '/api-web/notice/getNoticeBusTypes', 211 url: domainName + '/api-web/notice/getNoticeBusTypes',
234 success: function (response) { 212 success: function (response) {
@@ -267,8 +245,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -267,8 +245,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
267 } else { 245 } else {
268 busId = ''; 246 busId = '';
269 } 247 }
270 - getChartData();  
271 - reloadTable(); 248 + reloadData();
272 } 249 }
273 }); 250 });
274 if(busIdSelect){ 251 if(busIdSelect){
@@ -283,6 +260,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -283,6 +260,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
283 layer.msg('获取业务失败', {icon: 2}); 260 layer.msg('获取业务失败', {icon: 2});
284 } 261 }
285 }); 262 });
  263 + //资源类型下拉框 joke add 20211209
286 $.ajax({ 264 $.ajax({
287 url: `${common.domainName}/api-web/notice/getNoticeResTypes?access_token=${accessToken}`, 265 url: `${common.domainName}/api-web/notice/getNoticeResTypes?access_token=${accessToken}`,
288 method: 'GET', 266 method: 'GET',
@@ -321,8 +299,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -321,8 +299,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
321 } else { 299 } else {
322 resType = ''; 300 resType = '';
323 } 301 }
324 - getChartData();  
325 - reloadTable(); 302 + reloadData();
326 } 303 }
327 }); 304 });
328 if(busIdSelect){ 305 if(busIdSelect){
@@ -484,5 +461,10 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -484,5 +461,10 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
484 } 461 }
485 }) 462 })
486 } 463 }
  464 +
  465 + function reloadData(){
  466 + getChartData();
  467 + reloadTable();
  468 + }
487 }); 469 });
488 }); 470 });