repairboard.js.下载 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. $(document).ready(function(){
  2. FullScreenManager.on();//全屏
  3. showlist();
  4. });
  5. var sIndex = $.cookie("sIndex") || 0;//当前播放索引
  6. var swoperObj = {};
  7. var col_height=$(".kanban-main-bottom").height();
  8. var h=Math.floor((col_height-140)/42);
  9. $(".swiper-container").height(h*42+"px");
  10. function showlist(){
  11. var result={"msg":"成功","code":0,"data":{"v6":25,"v1":160,"reportlist":[{"devid":10000431,"devsn":"DEV201900138","fault_type":70,"report_type":102,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":null,"content":"没电","fault_level":219,"duration":"","managerusername":null,"attachment":"","has_response_time_out_msg":null,"devname":"120","id":429,"sn":"BXD201910000313","time":"2019-10-09 14:25:33","state":1,"audio":"","reportusername":"方正","levelvalue":"紧急","time_spend":null},{"devid":3,"devsn":"SB2018111400002","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":17,"processor":null,"content":"设备启动有异响","fault_level":219,"duration":null,"managerusername":null,"attachment":"","has_response_time_out_msg":null,"devname":"空气消毒机","id":428,"sn":"BXD201910000312","time":"2019-10-09 13:20:59","state":1,"audio":null,"reportusername":"易尔山","levelvalue":"紧急","time_spend":null},{"devid":10000434,"devsn":"DEV2019000146","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":9,"processor":9,"content":"Test","fault_level":219,"duration":null,"managerusername":"demo","attachment":"","has_response_time_out_msg":null,"devname":"电脑主机","id":427,"sn":"BXD201910000311","time":"2019-10-08 16:45:50","state":2,"audio":null,"reportusername":"demo","levelvalue":"紧急","time_spend":null},{"devid":10000422,"devsn":"DEV2019000139","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":1,"userid":11,"processor":5,"content":"123","fault_level":217,"duration":null,"managerusername":"吴晶晶","attachment":"","has_response_time_out_msg":null,"devname":"111","id":426,"sn":"BXD201909000310","time":"2019-09-29 10:55:34","state":3,"audio":null,"reportusername":"方正","levelvalue":"一般","time_spend":null},{"devid":10000422,"devsn":"DEV2019000139","fault_type":70,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":5,"processor":121,"content":"123","fault_level":218,"duration":null,"managerusername":"陈振安","attachment":"","has_response_time_out_msg":1,"devname":"111","id":425,"sn":"BXD201909000309","time":"2019-09-29 10:51:07","state":2,"audio":null,"reportusername":"吴晶晶","levelvalue":"严重","time_spend":null},{"devid":10000404,"devsn":"DEV2019000124","fault_type":71,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":90,"content":"gjykgh","fault_level":217,"duration":null,"managerusername":"ch3","attachment":"","has_response_time_out_msg":null,"devname":"121","id":424,"sn":"BXD201909000308","time":"2019-09-27 14:47:14","state":2,"audio":null,"reportusername":"方正","levelvalue":"一般","time_spend":null},{"devid":10000414,"devsn":"T3000111111","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":128,"content":"测试","fault_level":218,"duration":null,"managerusername":"达尔文","attachment":"","has_response_time_out_msg":1,"devname":"null-已删除","id":421,"sn":"BXD201909000305","time":"2019-09-24 18:01:02","state":2,"audio":null,"reportusername":"方正","levelvalue":"严重","time_spend":null},{"devid":10000413,"devsn":"DEV2019000133","fault_type":101,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":128,"content":"测试1","fault_level":217,"duration":null,"managerusername":"达尔文","attachment":"","has_response_time_out_msg":null,"devname":"呼吸机-已删除","id":420,"sn":"BXD201909000304","time":"2019-09-24 09:06:46","state":2,"audio":null,"reportusername":"方正","levelvalue":"一般","time_spend":null},{"devid":0,"devsn":null,"fault_type":69,"report_type":null,"title":"标题","has_repair_time_out_msg":null,"userid":11,"processor":124,"content":"123123","fault_level":218,"duration":null,"managerusername":"陈延飞","attachment":"","has_response_time_out_msg":1,"devname":null,"id":418,"sn":"BXD201909000302","time":"2019-09-20 09:48:06","state":2,"audio":null,"reportusername":"方正","levelvalue":"严重","time_spend":null},{"devid":10000351,"devsn":"DEV2019000082","fault_type":70,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":30,"processor":17,"content":"无法开机","fault_level":217,"duration":null,"managerusername":"易尔山","attachment":"","has_response_time_out_msg":null,"devname":"笔记本电脑","id":417,"sn":"BXD201909000301","time":"2019-09-18 10:45:02","state":2,"audio":null,"reportusername":"李振宝","levelvalue":"一般","time_spend":null},{"devid":10000346,"devsn":"NA00010751","fault_type":69,"report_type":102,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":8,"content":"1","fault_level":219,"duration":"","managerusername":"Qin","attachment":"","has_response_time_out_msg":null,"devname":"一号开卷机","id":415,"sn":"BXD201909000299","time":"2019-09-16 16:27:07","state":2,"audio":"","reportusername":"方正","levelvalue":"紧急","time_spend":null},{"devid":10000431,"devsn":"DEV201900138","fault_type":70,"report_type":102,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":null,"content":"没电","fault_level":219,"duration":"","managerusername":null,"attachment":"","has_response_time_out_msg":null,"devname":"120","id":429,"sn":"BXD201910000313","time":"2019-10-09 14:25:33","state":1,"audio":"","reportusername":"方正","levelvalue":"紧急","time_spend":null},{"devid":3,"devsn":"SB2018111400002","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":17,"processor":null,"content":"设备启动有异响","fault_level":219,"duration":null,"managerusername":null,"attachment":"","has_response_time_out_msg":null,"devname":"空气消毒机","id":428,"sn":"BXD201910000312","time":"2019-10-09 13:20:59","state":1,"audio":null,"reportusername":"易尔山","levelvalue":"紧急","time_spend":null},{"devid":10000434,"devsn":"DEV2019000146","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":9,"processor":9,"content":"Test","fault_level":219,"duration":null,"managerusername":"demo","attachment":"","has_response_time_out_msg":null,"devname":"电脑主机","id":427,"sn":"BXD201910000311","time":"2019-10-08 16:45:50","state":2,"audio":null,"reportusername":"demo","levelvalue":"紧急","time_spend":null},{"devid":10000422,"devsn":"DEV2019000139","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":1,"userid":11,"processor":5,"content":"123","fault_level":217,"duration":null,"managerusername":"吴晶晶","attachment":"","has_response_time_out_msg":null,"devname":"111","id":426,"sn":"BXD201909000310","time":"2019-09-29 10:55:34","state":3,"audio":null,"reportusername":"方正","levelvalue":"一般","time_spend":null},{"devid":10000422,"devsn":"DEV2019000139","fault_type":70,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":5,"processor":121,"content":"123","fault_level":218,"duration":null,"managerusername":"陈振安","attachment":"","has_response_time_out_msg":1,"devname":"111","id":425,"sn":"BXD201909000309","time":"2019-09-29 10:51:07","state":2,"audio":null,"reportusername":"吴晶晶","levelvalue":"严重","time_spend":null},{"devid":10000404,"devsn":"DEV2019000124","fault_type":71,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":90,"content":"gjykgh","fault_level":217,"duration":null,"managerusername":"ch3","attachment":"","has_response_time_out_msg":null,"devname":"121","id":424,"sn":"BXD201909000308","time":"2019-09-27 14:47:14","state":2,"audio":null,"reportusername":"方正","levelvalue":"一般","time_spend":null},{"devid":10000414,"devsn":"T3000111111","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":128,"content":"测试","fault_level":218,"duration":null,"managerusername":"达尔文","attachment":"","has_response_time_out_msg":1,"devname":"null-已删除","id":421,"sn":"BXD201909000305","time":"2019-09-24 18:01:02","state":2,"audio":null,"reportusername":"方正","levelvalue":"严重","time_spend":null},{"devid":10000413,"devsn":"DEV2019000133","fault_type":101,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":128,"content":"测试1","fault_level":217,"duration":null,"managerusername":"达尔文","attachment":"","has_response_time_out_msg":null,"devname":"呼吸机-已删除","id":420,"sn":"BXD201909000304","time":"2019-09-24 09:06:46","state":2,"audio":null,"reportusername":"方正","levelvalue":"一般","time_spend":null},{"devid":0,"devsn":null,"fault_type":69,"report_type":null,"title":"标题","has_repair_time_out_msg":null,"userid":11,"processor":124,"content":"123123","fault_level":218,"duration":null,"managerusername":"陈延飞","attachment":"","has_response_time_out_msg":1,"devname":null,"id":418,"sn":"BXD201909000302","time":"2019-09-20 09:48:06","state":2,"audio":null,"reportusername":"方正","levelvalue":"严重","time_spend":null},{"devid":10000351,"devsn":"DEV2019000082","fault_type":70,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":30,"processor":17,"content":"无法开机","fault_level":217,"duration":null,"managerusername":"易尔山","attachment":"","has_response_time_out_msg":null,"devname":"笔记本电脑","id":417,"sn":"BXD201909000301","time":"2019-09-18 10:45:02","state":2,"audio":null,"reportusername":"李振宝","levelvalue":"一般","time_spend":null},{"devid":10000346,"devsn":"NA00010751","fault_type":69,"report_type":102,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":8,"content":"1","fault_level":219,"duration":"","managerusername":"Qin","attachment":"","has_response_time_out_msg":null,"devname":"一号开卷机","id":415,"sn":"BXD201909000299","time":"2019-09-16 16:27:07","state":2,"audio":"","reportusername":"方正","levelvalue":"紧急","time_spend":null},{"devid":10000431,"devsn":"DEV201900138","fault_type":70,"report_type":102,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":null,"content":"没电","fault_level":219,"duration":"","managerusername":null,"attachment":"","has_response_time_out_msg":null,"devname":"120","id":429,"sn":"BXD201910000313","time":"2019-10-09 14:25:33","state":1,"audio":"","reportusername":"方正","levelvalue":"紧急","time_spend":null},{"devid":3,"devsn":"SB2018111400002","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":17,"processor":null,"content":"设备启动有异响","fault_level":219,"duration":null,"managerusername":null,"attachment":"","has_response_time_out_msg":null,"devname":"空气消毒机","id":428,"sn":"BXD201910000312","time":"2019-10-09 13:20:59","state":1,"audio":null,"reportusername":"易尔山","levelvalue":"紧急","time_spend":null},{"devid":10000434,"devsn":"DEV2019000146","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":9,"processor":9,"content":"Test","fault_level":219,"duration":null,"managerusername":"demo","attachment":"","has_response_time_out_msg":null,"devname":"电脑主机","id":427,"sn":"BXD201910000311","time":"2019-10-08 16:45:50","state":2,"audio":null,"reportusername":"demo","levelvalue":"紧急","time_spend":null},{"devid":10000422,"devsn":"DEV2019000139","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":1,"userid":11,"processor":5,"content":"123","fault_level":217,"duration":null,"managerusername":"吴晶晶","attachment":"","has_response_time_out_msg":null,"devname":"111","id":426,"sn":"BXD201909000310","time":"2019-09-29 10:55:34","state":3,"audio":null,"reportusername":"方正","levelvalue":"一般","time_spend":null},{"devid":10000422,"devsn":"DEV2019000139","fault_type":70,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":5,"processor":121,"content":"123","fault_level":218,"duration":null,"managerusername":"陈振安","attachment":"","has_response_time_out_msg":1,"devname":"111","id":425,"sn":"BXD201909000309","time":"2019-09-29 10:51:07","state":2,"audio":null,"reportusername":"吴晶晶","levelvalue":"严重","time_spend":null},{"devid":10000404,"devsn":"DEV2019000124","fault_type":71,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":90,"content":"gjykgh","fault_level":217,"duration":null,"managerusername":"ch3","attachment":"","has_response_time_out_msg":null,"devname":"121","id":424,"sn":"BXD201909000308","time":"2019-09-27 14:47:14","state":2,"audio":null,"reportusername":"方正","levelvalue":"一般","time_spend":null},{"devid":10000414,"devsn":"T3000111111","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":128,"content":"测试","fault_level":218,"duration":null,"managerusername":"达尔文","attachment":"","has_response_time_out_msg":1,"devname":"null-已删除","id":421,"sn":"BXD201909000305","time":"2019-09-24 18:01:02","state":2,"audio":null,"reportusername":"方正","levelvalue":"严重","time_spend":null},{"devid":0,"devsn":null,"fault_type":69,"report_type":null,"title":"标题","has_repair_time_out_msg":null,"userid":11,"processor":124,"content":"123123","fault_level":218,"duration":null,"managerusername":"陈延飞","attachment":"","has_response_time_out_msg":1,"devname":null,"id":418,"sn":"BXD201909000302","time":"2019-09-20 09:48:06","state":2,"audio":null,"reportusername":"方正","levelvalue":"严重","time_spend":null},{"devid":10000351,"devsn":"DEV2019000082","fault_type":70,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":30,"processor":17,"content":"无法开机","fault_level":217,"duration":null,"managerusername":"易尔山","attachment":"","has_response_time_out_msg":null,"devname":"笔记本电脑","id":417,"sn":"BXD201909000301","time":"2019-09-18 10:45:02","state":2,"audio":null,"reportusername":"李振宝","levelvalue":"一般","time_spend":null},{"devid":10000346,"devsn":"NA00010751","fault_type":69,"report_type":102,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":8,"content":"1","fault_level":219,"duration":"","managerusername":"Qin","attachment":"","has_response_time_out_msg":null,"devname":"一号开卷机","id":415,"sn":"BXD201909000299","time":"2019-09-16 16:27:07","state":2,"audio":"","reportusername":"方正","levelvalue":"紧急","time_spend":null},{"devid":10000431,"devsn":"DEV201900138","fault_type":70,"report_type":102,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":null,"content":"没电","fault_level":219,"duration":"","managerusername":null,"attachment":"","has_response_time_out_msg":null,"devname":"120","id":429,"sn":"BXD201910000313","time":"2019-10-09 14:25:33","state":1,"audio":"","reportusername":"方正","levelvalue":"紧急","time_spend":null},{"devid":3,"devsn":"SB2018111400002","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":17,"processor":null,"content":"设备启动有异响","fault_level":219,"duration":null,"managerusername":null,"attachment":"","has_response_time_out_msg":null,"devname":"空气消毒机","id":428,"sn":"BXD201910000312","time":"2019-10-09 13:20:59","state":1,"audio":null,"reportusername":"易尔山","levelvalue":"紧急","time_spend":null},{"devid":10000434,"devsn":"DEV2019000146","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":9,"processor":9,"content":"Test","fault_level":219,"duration":null,"managerusername":"demo","attachment":"","has_response_time_out_msg":null,"devname":"电脑主机","id":427,"sn":"BXD201910000311","time":"2019-10-08 16:45:50","state":2,"audio":null,"reportusername":"demo","levelvalue":"紧急","time_spend":null},{"devid":10000422,"devsn":"DEV2019000139","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":1,"userid":11,"processor":5,"content":"123","fault_level":217,"duration":null,"managerusername":"吴晶晶","attachment":"","has_response_time_out_msg":null,"devname":"111","id":426,"sn":"BXD201909000310","time":"2019-09-29 10:55:34","state":3,"audio":null,"reportusername":"方正","levelvalue":"一般","time_spend":null},{"devid":10000422,"devsn":"DEV2019000139","fault_type":70,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":5,"processor":121,"content":"123","fault_level":218,"duration":null,"managerusername":"陈振安","attachment":"","has_response_time_out_msg":1,"devname":"111","id":425,"sn":"BXD201909000309","time":"2019-09-29 10:51:07","state":2,"audio":null,"reportusername":"吴晶晶","levelvalue":"严重","time_spend":null},{"devid":10000404,"devsn":"DEV2019000124","fault_type":71,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":90,"content":"gjykgh","fault_level":217,"duration":null,"managerusername":"ch3","attachment":"","has_response_time_out_msg":null,"devname":"121","id":424,"sn":"BXD201909000308","time":"2019-09-27 14:47:14","state":2,"audio":null,"reportusername":"方正","levelvalue":"一般","time_spend":null},{"devid":10000414,"devsn":"T3000111111","fault_type":69,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":128,"content":"测试","fault_level":218,"duration":null,"managerusername":"达尔文","attachment":"","has_response_time_out_msg":1,"devname":"null-已删除","id":421,"sn":"BXD201909000305","time":"2019-09-24 18:01:02","state":2,"audio":null,"reportusername":"方正","levelvalue":"严重","time_spend":null},{"devid":10000413,"devsn":"DEV2019000133","fault_type":101,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":128,"content":"测试1","fault_level":217,"duration":null,"managerusername":"达尔文","attachment":"","has_response_time_out_msg":null,"devname":"呼吸机-已删除","id":420,"sn":"BXD201909000304","time":"2019-09-24 09:06:46","state":2,"audio":null,"reportusername":"方正","levelvalue":"一般","time_spend":null},{"devid":0,"devsn":null,"fault_type":69,"report_type":null,"title":"标题","has_repair_time_out_msg":null,"userid":11,"processor":124,"content":"123123","fault_level":218,"duration":null,"managerusername":"陈延飞","attachment":"","has_response_time_out_msg":1,"devname":null,"id":418,"sn":"BXD201909000302","time":"2019-09-20 09:48:06","state":2,"audio":null,"reportusername":"方正","levelvalue":"严重","time_spend":null},{"devid":10000351,"devsn":"DEV2019000082","fault_type":70,"report_type":null,"title":"","has_repair_time_out_msg":null,"userid":30,"processor":17,"content":"无法开机","fault_level":217,"duration":null,"managerusername":"易尔山","attachment":"","has_response_time_out_msg":null,"devname":"笔记本电脑","id":417,"sn":"BXD201909000301","time":"2019-09-18 10:45:02","state":2,"audio":null,"reportusername":"李振宝","levelvalue":"一般","time_spend":null},{"devid":10000346,"devsn":"NA00010751","fault_type":69,"report_type":102,"title":"","has_repair_time_out_msg":null,"userid":11,"processor":8,"content":"1","fault_level":219,"duration":"","managerusername":"Qin","attachment":"","has_response_time_out_msg":null,"devname":"一号开卷机","id":415,"sn":"BXD201909000299","time":"2019-09-16 16:27:07","state":2,"audio":"","reportusername":"方正","levelvalue":"紧急","time_spend":null}],"v2":5,"v3":77,"v4":38,"v5":59}}
  12. if(result.code == 0){
  13. console.log(result.data)
  14. var str='';
  15. var v = result.data;
  16. for(var i=1;i<=6;i++){
  17. $(".v"+i).html(v['v'+i]);
  18. }
  19. var list=result.data.reportlist;
  20. for(var m=0;m<list.length;m+=h){
  21. str +="<div class=\"swiper-slide\">";
  22. for(var j=i;j<m+h;j++){
  23. if(j<list.length){
  24. var fh=list[j];
  25. str+='<div class="col-main">';
  26. str+='<div class="col-15">'+(fh.devsn||' ')+'</div>';
  27. str+='<div class="col-15">'+(fh.devname||' ')+'</div>';
  28. str+='<div class="col-11">'+(fh.reportusername||' ')+'</div>';
  29. str+='<div class="col-15">'+(fh.time||' ')+'</div>';
  30. str+='<div class="col-11">'+(fh.levelvalue||' ')+'</div>';
  31. str+='<div class="col-11">'+(fh.managerusername||' ')+'</div>';
  32. str+='<div class="col-11">'+getStateValue(fh.state)+'</div>';
  33. str+='<div class="col-11"></div>';
  34. str+='</div>';
  35. }
  36. }
  37. str +="</div>";
  38. }
  39. $(".swiper-wrapper").append(str);
  40. swoperObj = swiper();
  41. }
  42. }
  43. function swiper(){
  44. var mySwiper = new Swiper ('.swiper-container', {
  45. direction: 'horizontal', // 垂直切换选项
  46. loop: true, // 循环模式选项
  47. initialSlide:parseInt(sIndex),
  48. autoplay: {
  49. delay: 4000,
  50. stopOnLastSlide: false,
  51. disableOnInteraction: true,
  52. },//自动播放
  53. pagination: {
  54. el: '.swiper-pagination',
  55. type: 'custom',
  56. renderCustom: function (swiper, current, total) {
  57. return '当前第'+current + '页/共' + total+'页';
  58. }
  59. },
  60. })
  61. return mySwiper;
  62. }
  63. var stateMap = {1:"待分派",2:"已分派",3:"维修中",4:"已完工",0:"已撤销",5:"验收通过",6:"验收不通过"};
  64. var colorMap = ['ic-34FFFF','ic-FFED34','color-D12BFF','color-438CE8','color-E7CF22','color-FF4575','color-85F018'];
  65. function getStateValue(type){
  66. return "<span class='"+colorMap[type]+"'>"+stateMap[type]+"</span>";
  67. }