IndexList.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. var refreshGirdData;
  2. var bootstrap = function ($, learun) {
  3. "use strict";
  4. var SrmRateData;
  5. var RobotRateData;
  6. var page = {
  7. init: function () {
  8. $("#beginTime").val(beginTime);
  9. $("#endTime").val(endTime);
  10. //$("#robotbeginTime").val(beginTime);
  11. //$("#robotendTime").val(endTime);
  12. //$("#rgvbeginTime").val(beginTime);
  13. //$("#rgvendTime").val(endTime);
  14. //$("#hjbeginTime").val(beginTime);
  15. //$("#hjendTime").val(endTime);
  16. page.initGird();
  17. page.bind();
  18. },
  19. bind: function () {
  20. // 查询
  21. //$('#btn_rgvSearch').on('click', function () {
  22. // if (page.SearchValid('rgvbeginTime', 'rgvendTime')) {
  23. // return;
  24. // }
  25. // page.searchrgv({ queryJson: JSON.stringify({ beginTime: $("#beginTime").val(), endTime: $("#endTime").val(), DevType: '1' }) });
  26. //});
  27. $('#btn_Search').on('click', function () {
  28. if (page.SearchValid('beginTime', 'endTime')) {
  29. return;
  30. }
  31. page.search({ queryJson: JSON.stringify({ beginTime: $("#beginTime").val(), endTime: $("#endTime").val(), DevType: '2' }) });
  32. });
  33. //$('#btn_robotSearch').on('click', function () {
  34. // if (page.SearchValid('robotbeginTime', 'robotendTime')) {
  35. // return;
  36. // }
  37. // page.searchrobot({ queryJson: JSON.stringify({ beginTime: $("#robotbeginTime").val(), endTime: $("#robotendTime").val(), DevType: '3' }) });
  38. //});
  39. //$('#btn_hjSearch').on('click', function () {
  40. // if (page.SearchValid('hjbeginTime', 'hjendTime')) {
  41. // return;
  42. // }
  43. // page.searchhj({ queryJson: JSON.stringify({ beginTime: $("#hjbeginTime").val(), endTime: $("#hjendTime").val(), DevType: '4' }) });
  44. //});
  45. },
  46. SearchValid: function (begin,end) {
  47. let result = false;
  48. var beginTime = $("#"+begin).val().replace(/^[' ' || ' ']*/, '').replace(/[' ' | ' ']*$/, '');
  49. if (beginTime.length == 0) {
  50. learun.alert.error('开始时间不能为空!');
  51. result = true;
  52. return result;
  53. }
  54. var endTime = $("#"+end).val().replace(/^[' ' || ' ']*/, '').replace(/[' ' | ' ']*$/, '');
  55. if (endTime.length == 0) {
  56. learun.alert.error('结束时间不能为空!');
  57. result = true;
  58. return result;
  59. }
  60. if (!page.isDateValid(beginTime)) {
  61. learun.alert.error('开始时间格式不正确!');
  62. result = true;
  63. return result;
  64. }
  65. if (!page.isDateValid(endTime)) {
  66. learun.alert.error('结束时间格式不正确!');
  67. result = true;
  68. return result;
  69. }
  70. },
  71. isDateValid: function (dateString) {
  72. const date = new Date(dateString);
  73. return !isNaN(date.getTime());
  74. },
  75. // 初始化列表
  76. initGird: function () {
  77. $('#gridtable').jfGrid({
  78. url: top.$.rootUrl + '/CPManager/DeviceEffectives/GetSRMPageList',
  79. headData: [
  80. { label: "设备名", name: "Code", width: 80, align: "left" },
  81. { label: "出库", name: "OutDepot", width: 80, align: "left" },
  82. { label: "入库", name: "EnterDepot", width: 80, align: "left" },
  83. { label: "移库", name: "MoveDepot", width: 80, align: "left" },
  84. //{
  85. // label: "状态分析", name: "State", width: 500, align: "left"
  86. // , formatter: function (cellvalue) {
  87. // let w1 = cellvalue[0] <= 30 ? 30 : cellvalue[0] >= 100?100:cellvalue[0]*1;
  88. // let w2 = cellvalue[1] <= 30 ? 30 : cellvalue[1] >= 100?100:cellvalue[1]*1;
  89. // let w3 = cellvalue[2] <= 30 ? 30 : cellvalue[2] >= 100?100:cellvalue[2]*1;
  90. // let w4 = cellvalue[3] <= 30 ? 30 : cellvalue[3] >= 100?100:cellvalue[3]*1;
  91. // let w5 = cellvalue[4] <= 30 ? 30 : cellvalue[4] >= 100?100:cellvalue[4]*1;
  92. // return '<div class = \"bar-chart\"> <div class=\"bar\" title=\"空闲' + cellvalue[0] + '%\" style=\"background-color: #0ecb86; width: ' + w1 + 'px;\">' + cellvalue[0] + '%</div> <div class=\"bar\" title=\"手动' + cellvalue[1] + '%\" style=\"background-color: #fac82e; width: ' + w2 + 'px;\">' + cellvalue[1] + '%</div> <div class=\"bar\" title=\"自动' + cellvalue[2] + '%\" style=\"background-color: #00d6ce; width: ' + w3 + 'px;\">' + cellvalue[2] + '%</div> <div class=\"bar\" title=\"报警' + cellvalue[3] + '%\" style=\"background-color: #e7441f; width: ' + w4 + 'px;\">' + cellvalue[3] + '%</div> <div class=\"bar\" title=\"运行' + cellvalue[4] + '%\" style=\"background-color: #1890ff; width: ' + w5 + 'px;\">' + cellvalue[4] +'%</div></div>'
  93. //}
  94. //},
  95. {
  96. label: "空闲(分钟)", name: "Free", width: 80, align: "left", formatter: function (cellvalue) {
  97. return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  98. }
  99. },
  100. {
  101. label: "手动(分钟)", name: "Manual", width: 80, align: "left"
  102. , formatter: function (cellvalue) {
  103. return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  104. }
  105. },
  106. {
  107. label: "自动(分钟)", name: "Automatic", width: 80, align: "left", formatter: function (cellvalue) {
  108. return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  109. }
  110. },
  111. {
  112. label: "报警(分钟)", name: "Alarm", width: 80, align: "left", formatter: function (cellvalue) {
  113. return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  114. }
  115. },
  116. {
  117. label: "运行(分钟)", name: "Working", width: 80, align: "left", formatter: function (cellvalue) {
  118. return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  119. }
  120. },
  121. {
  122. label: "总时间(分钟)", name: "TotalTime", width: 80, align: "left", formatter: function (cellvalue) {
  123. return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  124. }
  125. },
  126. {
  127. label: "设备执行分析", name: "DevAction", width: 400, align: "left"
  128. , formatter: function (cellvalue) {
  129. let str = '<div class = \"gridflex-container\">';
  130. for (var i = 0; i < cellvalue.length; i++) {
  131. str += '<div class=\"gridflex-item\" title=\"' + cellvalue[i].Type + ',次数:' + cellvalue[i].ActionAmount + ',平均耗时:' + cellvalue[i].ActionTime + '\" >' + cellvalue[i].Type + ',次数:' + cellvalue[i].ActionAmount + ',平均耗时:' + cellvalue[i].ActionTime + '</div> '
  132. }
  133. str += '</div>';
  134. return str;
  135. }
  136. },
  137. {
  138. label: "工位使用", name: "StationCount", width: 400, align: "left"
  139. , formatter: function (cellvalue) {
  140. let str = '<div class = \"gridflex-container\">';
  141. for (var i = 0; i < cellvalue.length; i++) {
  142. str += '<div class=\"gridflex-item\" title=\"' + cellvalue[i].Type + ',工位数:' + cellvalue[i].StationIndex + ',执行数量:' + cellvalue[i].StationNum + '\" >' + cellvalue[i].Type + ',工位数:' + cellvalue[i].StationIndex + ',执行数量:' + cellvalue[i].StationNum + '</div> '
  143. }
  144. str += '</div>';
  145. return str;
  146. }
  147. },
  148. ],
  149. rowHeight: 70,
  150. mainId: 'Code',
  151. isPage: true,
  152. reloadSelected: true,
  153. autowWidth: true,
  154. sidx: 'Code',
  155. sord: 'DESC',
  156. });
  157. page.search({ queryJson: JSON.stringify({ beginTime: $("#beginTime").val(), endTime: $("#endTime").val(), DevType: '2' }) });
  158. //$('#gridtable2').jfGrid({
  159. // url: top.$.rootUrl + '/CPManager/DeviceEffectives/GetRobotPageList',
  160. // headData: [
  161. // { label: "设备名", name: "Code", width: 80, align: "left" },
  162. // { label: "出库", name: "OutDepot", width: 80, align: "left" },
  163. // { label: "入库", name: "EnterDepot", width: 80, align: "left" },
  164. // { label: "移库", name: "MoveDepot", width: 80, align: "left" },
  165. // //{
  166. // // label: "状态分析", name: "State", width: 500, align: "left"
  167. // // , formatter: function (cellvalue) {
  168. // // let w1 = cellvalue[0] <= 30 ? 30 : cellvalue[0] >= 100?100:cellvalue[0]*1;
  169. // // let w2 = cellvalue[1] <= 30 ? 30 : cellvalue[1] >= 100?100:cellvalue[1]*1;
  170. // // let w3 = cellvalue[2] <= 30 ? 30 : cellvalue[2] >= 100?100:cellvalue[2]*1;
  171. // // let w4 = cellvalue[3] <= 30 ? 30 : cellvalue[3] >= 100?100:cellvalue[3]*1;
  172. // // let w5 = cellvalue[4] <= 30 ? 30 : cellvalue[4] >= 100?100:cellvalue[4]*1;
  173. // // return '<div class = \"bar-chart\"> <div class=\"bar\" title=\"空闲' + cellvalue[0] + '%\" style=\"background-color: #0ecb86; width: ' + w1 + 'px;\">' + cellvalue[0] + '%</div> <div class=\"bar\" title=\"手动' + cellvalue[1] + '%\" style=\"background-color: #fac82e; width: ' + w2 + 'px;\">' + cellvalue[1] + '%</div> <div class=\"bar\" title=\"自动' + cellvalue[2] + '%\" style=\"background-color: #00d6ce; width: ' + w3 + 'px;\">' + cellvalue[2] + '%</div> <div class=\"bar\" title=\"报警' + cellvalue[3] + '%\" style=\"background-color: #e7441f; width: ' + w4 + 'px;\">' + cellvalue[3] + '%</div> <div class=\"bar\" title=\"运行' + cellvalue[4] + '%\" style=\"background-color: #1890ff; width: ' + w5 + 'px;\">' + cellvalue[4] +'%</div></div>'
  174. // //}
  175. // //},
  176. // {
  177. // label: "空闲(分钟)", name: "Free", width: 80, align: "left", formatter: function (cellvalue) {
  178. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  179. // }
  180. // },
  181. // {
  182. // label: "手动(分钟)", name: "Manual", width: 80, align: "left"
  183. // , formatter: function (cellvalue) {
  184. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  185. // }
  186. // },
  187. // {
  188. // label: "自动(分钟)", name: "Automatic", width: 80, align: "left", formatter: function (cellvalue) {
  189. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  190. // }
  191. // },
  192. // {
  193. // label: "报警(分钟)", name: "Alarm", width: 80, align: "left", formatter: function (cellvalue) {
  194. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  195. // }
  196. // },
  197. // {
  198. // label: "运行(分钟)", name: "Working", width: 80, align: "left", formatter: function (cellvalue) {
  199. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  200. // }
  201. // },
  202. // {
  203. // label: "总时间(分钟)", name: "TotalTime", width: 80, align: "left", formatter: function (cellvalue) {
  204. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  205. // }
  206. // },
  207. // {
  208. // label: "设备执行分析", name: "DevAction", width: 400, align: "left"
  209. // , formatter: function (cellvalue) {
  210. // let str = '<div class = \"gridflex-container\">';
  211. // for (var i = 0; i < cellvalue.length; i++) {
  212. // str += '<div class=\"gridflex-item\" title=\"' + cellvalue[i].Type + ',次数:' + cellvalue[i].ActionAmount + ',平均耗时:' + cellvalue[i].ActionTime + '\" >' + cellvalue[i].Type + ',次数:' + cellvalue[i].ActionAmount + ',平均耗时:' + cellvalue[i].ActionTime + '</div> '
  213. // }
  214. // str += '</div>';
  215. // return str;
  216. // }
  217. // },
  218. // {
  219. // label: "工位使用", name: "StationCount", width: 400, align: "left"
  220. // , formatter: function (cellvalue) {
  221. // let str = '<div class = \"gridflex-container\">';
  222. // for (var i = 0; i < cellvalue.length; i++) {
  223. // str += '<div class=\"gridflex-item\" title=\"' + cellvalue[i].Type + ',工位数:' + cellvalue[i].StationIndex + ',执行数量:' + cellvalue[i].StationNum + '\" >' + cellvalue[i].Type + ',工位数:' + cellvalue[i].StationIndex + ',执行数量:' + cellvalue[i].StationNum + '</div> '
  224. // }
  225. // str += '</div>';
  226. // return str;
  227. // }
  228. // },
  229. // ],
  230. // rowHeight: 70,
  231. // mainId: 'Code',
  232. // isPage: true,
  233. // reloadSelected: true,
  234. // autowWidth: true,
  235. // sidx: 'Code',
  236. // sord: 'DESC',
  237. //});
  238. //page.searchrobot({ queryJson: JSON.stringify({ beginTime: $("#robotbeginTime").val(), endTime: $("#robotendTime").val(), DevType: '3' }) });
  239. //$('#rgvgridtable').jfGrid({
  240. // url: top.$.rootUrl + '/CPManager/DeviceEffectives/GetRgvPageList',
  241. // headData: [
  242. // { label: "设备名", name: "Code", width: 80, align: "left" },
  243. // { label: "出库", name: "OutDepot", width: 80, align: "left" },
  244. // { label: "入库", name: "EnterDepot", width: 80, align: "left" },
  245. // { label: "移库", name: "MoveDepot", width: 80, align: "left" },
  246. // //{
  247. // // label: "状态分析", name: "State", width: 500, align: "left"
  248. // // , formatter: function (cellvalue) {
  249. // // let w1 = cellvalue[0] <= 30 ? 30 : cellvalue[0] >= 100?100:cellvalue[0]*1;
  250. // // let w2 = cellvalue[1] <= 30 ? 30 : cellvalue[1] >= 100?100:cellvalue[1]*1;
  251. // // let w3 = cellvalue[2] <= 30 ? 30 : cellvalue[2] >= 100?100:cellvalue[2]*1;
  252. // // let w4 = cellvalue[3] <= 30 ? 30 : cellvalue[3] >= 100?100:cellvalue[3]*1;
  253. // // let w5 = cellvalue[4] <= 30 ? 30 : cellvalue[4] >= 100?100:cellvalue[4]*1;
  254. // // return '<div class = \"bar-chart\"> <div class=\"bar\" title=\"空闲' + cellvalue[0] + '%\" style=\"background-color: #0ecb86; width: ' + w1 + 'px;\">' + cellvalue[0] + '%</div> <div class=\"bar\" title=\"手动' + cellvalue[1] + '%\" style=\"background-color: #fac82e; width: ' + w2 + 'px;\">' + cellvalue[1] + '%</div> <div class=\"bar\" title=\"自动' + cellvalue[2] + '%\" style=\"background-color: #00d6ce; width: ' + w3 + 'px;\">' + cellvalue[2] + '%</div> <div class=\"bar\" title=\"报警' + cellvalue[3] + '%\" style=\"background-color: #e7441f; width: ' + w4 + 'px;\">' + cellvalue[3] + '%</div> <div class=\"bar\" title=\"运行' + cellvalue[4] + '%\" style=\"background-color: #1890ff; width: ' + w5 + 'px;\">' + cellvalue[4] +'%</div></div>'
  255. // //}
  256. // //},
  257. // {
  258. // label: "空闲(分钟)", name: "Free", width: 80, align: "left", formatter: function (cellvalue) {
  259. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  260. // }
  261. // },
  262. // {
  263. // label: "手动(分钟)", name: "Manual", width: 80, align: "left"
  264. // , formatter: function (cellvalue) {
  265. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  266. // }
  267. // },
  268. // {
  269. // label: "自动(分钟)", name: "Automatic", width: 80, align: "left", formatter: function (cellvalue) {
  270. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  271. // }
  272. // },
  273. // {
  274. // label: "报警(分钟)", name: "Alarm", width: 80, align: "left", formatter: function (cellvalue) {
  275. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  276. // }
  277. // },
  278. // {
  279. // label: "运行(分钟)", name: "Working", width: 80, align: "left", formatter: function (cellvalue) {
  280. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  281. // }
  282. // },
  283. // {
  284. // label: "总时间(分钟)", name: "TotalTime", width: 80, align: "left", formatter: function (cellvalue) {
  285. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  286. // }
  287. // },
  288. // {
  289. // label: "设备执行分析", name: "DevAction", width: 400, align: "left"
  290. // , formatter: function (cellvalue) {
  291. // let str = '<div class = \"gridflex-container\">';
  292. // for (var i = 0; i < cellvalue.length; i++) {
  293. // str += '<div class=\"gridflex-item\" title=\"' + cellvalue[i].Type + ',次数:' + cellvalue[i].ActionAmount + ',平均耗时:' + cellvalue[i].ActionTime + '\" >' + cellvalue[i].Type + ',次数:' + cellvalue[i].ActionAmount + ',平均耗时:' + cellvalue[i].ActionTime + '</div> '
  294. // }
  295. // str += '</div>';
  296. // return str;
  297. // }
  298. // },
  299. // {
  300. // label: "工位使用", name: "StationCount", width: 400, align: "left"
  301. // , formatter: function (cellvalue) {
  302. // let str = '<div class = \"gridflex-container\">';
  303. // for (var i = 0; i < cellvalue.length; i++) {
  304. // str += '<div class=\"gridflex-item\" title=\"' + cellvalue[i].Type + ',工位数:' + cellvalue[i].StationIndex + ',执行数量:' + cellvalue[i].StationNum + '\" >' + cellvalue[i].Type + ',工位数:' + cellvalue[i].StationIndex + ',执行数量:' + cellvalue[i].StationNum + '</div> '
  305. // }
  306. // str += '</div>';
  307. // return str;
  308. // }
  309. // },
  310. // ],
  311. // rowHeight: 70,
  312. // mainId: 'Code',
  313. // isPage: true,
  314. // reloadSelected: true,
  315. // autowWidth: true,
  316. // sidx: 'Code',
  317. // sord: 'DESC',
  318. //});
  319. //page.searchrgv({ queryJson: JSON.stringify({ beginTime: $("#robotbeginTime").val(), endTime: $("#robotendTime").val(), DevType: '1' }) });
  320. //$('#hjgridtable').jfGrid({
  321. // url: top.$.rootUrl + '/CPManager/DeviceEffectives/GetHJPageList',
  322. // headData: [
  323. // { label: "设备名", name: "Code", width: 80, align: "left" },
  324. // { label: "出库", name: "OutDepot", width: 80, align: "left" },
  325. // { label: "入库", name: "EnterDepot", width: 80, align: "left" },
  326. // { label: "移库", name: "MoveDepot", width: 80, align: "left" },
  327. // //{
  328. // // label: "状态分析", name: "State", width: 500, align: "left"
  329. // // , formatter: function (cellvalue) {
  330. // // let w1 = cellvalue[0] <= 30 ? 30 : cellvalue[0] >= 100?100:cellvalue[0]*1;
  331. // // let w2 = cellvalue[1] <= 30 ? 30 : cellvalue[1] >= 100?100:cellvalue[1]*1;
  332. // // let w3 = cellvalue[2] <= 30 ? 30 : cellvalue[2] >= 100?100:cellvalue[2]*1;
  333. // // let w4 = cellvalue[3] <= 30 ? 30 : cellvalue[3] >= 100?100:cellvalue[3]*1;
  334. // // let w5 = cellvalue[4] <= 30 ? 30 : cellvalue[4] >= 100?100:cellvalue[4]*1;
  335. // // return '<div class = \"bar-chart\"> <div class=\"bar\" title=\"空闲' + cellvalue[0] + '%\" style=\"background-color: #0ecb86; width: ' + w1 + 'px;\">' + cellvalue[0] + '%</div> <div class=\"bar\" title=\"手动' + cellvalue[1] + '%\" style=\"background-color: #fac82e; width: ' + w2 + 'px;\">' + cellvalue[1] + '%</div> <div class=\"bar\" title=\"自动' + cellvalue[2] + '%\" style=\"background-color: #00d6ce; width: ' + w3 + 'px;\">' + cellvalue[2] + '%</div> <div class=\"bar\" title=\"报警' + cellvalue[3] + '%\" style=\"background-color: #e7441f; width: ' + w4 + 'px;\">' + cellvalue[3] + '%</div> <div class=\"bar\" title=\"运行' + cellvalue[4] + '%\" style=\"background-color: #1890ff; width: ' + w5 + 'px;\">' + cellvalue[4] +'%</div></div>'
  336. // //}
  337. // //},
  338. // {
  339. // label: "空闲(分钟)", name: "Free", width: 80, align: "left", formatter: function (cellvalue) {
  340. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  341. // }
  342. // },
  343. // {
  344. // label: "手动(分钟)", name: "Manual", width: 80, align: "left"
  345. // , formatter: function (cellvalue) {
  346. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  347. // }
  348. // },
  349. // {
  350. // label: "自动(分钟)", name: "Automatic", width: 80, align: "left", formatter: function (cellvalue) {
  351. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  352. // }
  353. // },
  354. // {
  355. // label: "报警(分钟)", name: "Alarm", width: 80, align: "left", formatter: function (cellvalue) {
  356. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  357. // }
  358. // },
  359. // {
  360. // label: "运行(分钟)", name: "Working", width: 80, align: "left", formatter: function (cellvalue) {
  361. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  362. // }
  363. // },
  364. // {
  365. // label: "总时间(分钟)", name: "TotalTime", width: 80, align: "left", formatter: function (cellvalue) {
  366. // return cellvalue % 1 >= 0.5 ? Math.ceil(cellvalue) : Math.floor(cellvalue);
  367. // }
  368. // },
  369. // {
  370. // label: "设备执行分析", name: "DevAction", width: 400, align: "left"
  371. // , formatter: function (cellvalue) {
  372. // let str = '<div class = \"gridflex-container\">';
  373. // for (var i = 0; i < cellvalue.length; i++) {
  374. // str += '<div class=\"gridflex-item\" title=\"' + cellvalue[i].Type + ',次数:' + cellvalue[i].ActionAmount + ',平均耗时:' + cellvalue[i].ActionTime + '\" >' + cellvalue[i].Type + ',次数:' + cellvalue[i].ActionAmount + ',平均耗时:' + cellvalue[i].ActionTime + '</div> '
  375. // }
  376. // str += '</div>';
  377. // return str;
  378. // }
  379. // },
  380. // {
  381. // label: "工位使用", name: "StationCount", width: 400, align: "left"
  382. // , formatter: function (cellvalue) {
  383. // let str = '<div class = \"gridflex-container\" style=\"margin-top:-30px;\">';
  384. // for (var i = 0; i < cellvalue.length; i++) {
  385. // str += '<div class=\"gridflex-item\" title=\"' + cellvalue[i].Type + ',工位数:' + cellvalue[i].StationIndex + ',执行数量:' + cellvalue[i].StationNum + '\" >' + cellvalue[i].Type + ',工位数:' + cellvalue[i].StationIndex + ',执行数量:' + cellvalue[i].StationNum + '</div> '
  386. // }
  387. // str += '</div>';
  388. // return str;
  389. // }
  390. // },
  391. // ],
  392. // rowHeight: 102,
  393. // mainId: 'Code',
  394. // isPage: true,
  395. // reloadSelected: true,
  396. // autowWidth: true,
  397. // sidx: 'Code',
  398. // sord: 'DESC',
  399. //});
  400. //page.searchhj({ queryJson: JSON.stringify({ beginTime: $("#robotbeginTime").val(), endTime: $("#robotendTime").val(), DevType: '4' }) });
  401. },
  402. search: function (param) {
  403. $('#gridtable').jfGridSet('reload', param);
  404. },
  405. //searchrobot: function (param) {
  406. // $('#gridtable2').jfGridSet('reload', param);
  407. //},
  408. //searchrgv: function (param) {
  409. // $('#rgvgridtable').jfGridSet('reload', param);
  410. //},
  411. //searchhj: function (param) {
  412. // $('#hjgridtable').jfGridSet('reload', param);
  413. //},
  414. };
  415. refreshGirdData = function () {
  416. };
  417. page.init();
  418. }