IndexList.js 27 KB

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