金豪看板
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

643 lines
22 KiB

8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>生产监控看板</title>
  6. <script type="text/javascript" src="~/Content/Cust011/js/jquery.js"></script>
  7. <link rel="stylesheet" href="~/Content/Cust011/css/comon0.css?ss=7" />
  8. <script type="text/javascript" src="~/Content/Cust011/js/echarts.min.js"></script>
  9. @*<script language="JavaScript" src="~/Content/Cust011/js/js.js?ss=4"></script>*@
  10. <style>
  11. .logoclass {
  12. height:1rem;
  13. }
  14. .TopNamelogo {
  15. position:absolute;
  16. }
  17. </style>
  18. </head>
  19. <body>
  20. @*<div class="loading">
  21. <div class="loadbox"><img src="~/Content/Cust011/images/loading.gif" /> 页面加载中...</div>
  22. </div>*@
  23. <div class="head">
  24. <img class="TopNamelogo logoclass" src="~/Content/img/logo.png" border="0" />
  25. <h1><a href="">生产监控看板</a></h1>
  26. <div class="time" id="showTime">2019/12/05 16:16:54</div>
  27. </div>
  28. <div class="mainbox">
  29. <ul class="clearfix" style="height: calc(35%)">
  30. <li>
  31. <div class="boxall" style="height: calc(100% - 0.15rem)">
  32. <div class="alltitle">工单产出统计</div>
  33. <div class="boxnav" id="echarts1"></div>
  34. </div>
  35. </li>
  36. <li>
  37. <div class="boxall" style="height: calc(100% - 0.15rem)">
  38. <div class="alltitle">
  39. <p>在制统计</p>
  40. </div>
  41. <div class="boxnav yqlist" style="height: calc(100% - 0.05rem)">
  42. <ul>
  43. <li class="LineStringSet">
  44. <div class="yq" id="yq">170</div>
  45. <span>在制数</span>
  46. </li>
  47. <li class="LineStringSet">
  48. <div class="yq">139</div>
  49. <span>入库数</span>
  50. </li>
  51. <li class="LineStringSet">
  52. <div class="yq">141</div>
  53. <span>合格数</span>
  54. </li>
  55. <li class="LineStringSet">
  56. <div class="yq">3</div>
  57. <span>不良数</span>
  58. </li>
  59. </ul>
  60. </div>
  61. </div>
  62. </li>
  63. <li >
  64. <div class="boxall" style="height: calc(100% - 0.15rem)">
  65. <div class="alltitle">不良品分析</div>
  66. <div class="boxnav" id="echarts5"></div>
  67. </div>
  68. </li>
  69. </ul>
  70. <ul class="clearfix" style="height: calc(35% )">
  71. <li style="width: calc(50%)">
  72. <div class="boxall" style="height: calc(100% - 0.15rem)">
  73. <div class="alltitle">不良品分布</div>
  74. <div class="boxnav"
  75. id="echarts6"
  76. style="height: calc(100% - 0.3rem)"></div>
  77. </div>
  78. <li style="width: calc(50%)">
  79. <div class="boxall" style="height: calc(100% - 0.15rem )">
  80. <div class="alltitle">人员任务</div>
  81. <div class="boxnav" id="">
  82. <table border="0" cellspacing="0">
  83. <tr>
  84. <th></th>
  85. <th>字段</th>
  86. <th>字段</th>
  87. <th>字段</th>
  88. <th>字段</th>
  89. </tr>
  90. <tr>
  91. <th>字段</th>
  92. <td>8098</td>
  93. <td>19.80%</td>
  94. <td>22</td>
  95. <td>368</td>
  96. </tr>
  97. <tr>
  98. <th>字段</th>
  99. <td>7506</td>
  100. <td>6.70%</td>
  101. <td>22</td>
  102. <td>339</td>
  103. </tr>
  104. <tr>
  105. <th>字段</th>
  106. <td>3261</td>
  107. <td>32.30%</td>
  108. <td>10</td>
  109. <td>325.7</td>
  110. </tr>
  111. <tr>
  112. <th>字段</th>
  113. <td>1993</td>
  114. <td>201%</td>
  115. <td>10</td>
  116. <td>199</td>
  117. </tr>
  118. </table>
  119. </div>
  120. </div>
  121. </li>
  122. </ul>
  123. <ul class="clearfix" style="height: calc(30% )">
  124. <li style="width: calc(100%)">
  125. <div class="boxall" style="height: calc(100% - 0.15rem )">
  126. <div class="alltitle">工单进度执行跟踪</div>
  127. <div class="boxnav" id="">
  128. <table border="0" cellspacing="0">
  129. <tr>
  130. <th>字段</th>
  131. <th>字段</th>
  132. <th>字段</th>
  133. <th>字段</th>
  134. <th>字段</th>
  135. <th>字段</th>
  136. <th>字段</th>
  137. </tr>
  138. <tr>
  139. <td>8098</td>
  140. <td>19.80%</td>
  141. <td>22</td>
  142. <td>8098</td>
  143. <td>19.80%</td>
  144. <td>22</td>
  145. <td>368</td>
  146. </tr>
  147. <tr>
  148. <td>7506</td>
  149. <td>6.70%</td>
  150. <td>22</td>
  151. <td>7506</td>
  152. <td>6.70%</td>
  153. <td>22</td>
  154. <td>339</td>
  155. </tr>
  156. <tr>
  157. <td>3261</td>
  158. <td>32.30%</td>
  159. <td>10</td>
  160. <td>3261</td>
  161. <td>32.30%</td>
  162. <td>10</td>
  163. <td>325.7</td>
  164. </tr>
  165. <tr>
  166. <td>1993</td>
  167. <td>201%</td>
  168. <td>10</td>
  169. <td>1993</td>
  170. <td>201%</td>
  171. <td>10</td>
  172. <td>199</td>
  173. </tr>
  174. </table>
  175. </div>
  176. </div>
  177. </li>
  178. </ul>
  179. </div>
  180. <script>
  181. $(document).ready(function () {
  182. var whei = $(window).width()
  183. $("html").css({ fontSize: whei / 20 })
  184. $(window).resize(function () {
  185. var whei = $(window).width()
  186. $("html").css({ fontSize: whei / 20 })
  187. });
  188. });
  189. var DataF = 300;// 300;//单位秒 //刷新数据时间
  190. $(function () {
  191. getTime();
  192. GetDataZong();
  193. //刷新数据
  194. timer = setInterval(function () {
  195. GetDataZong();
  196. }, DataF * 1000);
  197. });
  198. function getTime() {
  199. var days = new Array("日", "一", "二", "三", "四", "五", "六");
  200. var currentDT = new Date();
  201. var y, m, date, day, hs, ms, ss, theDateStr;
  202. y = currentDT.getFullYear(); //四位整数表示的年份
  203. m = currentDT.getMonth() < 10 ? '0' + (currentDT.getMonth() + 1) : (currentDT.getMonth() + 1); //月
  204. date = currentDT.getDate() < 10 ? '0' + currentDT.getDate() : currentDT.getDate(); //日
  205. day = currentDT.getDay(); //星期
  206. hs = currentDT.getHours() < 10 ? '0' + currentDT.getHours() : currentDT.getHours(); //时
  207. ms = currentDT.getMinutes() < 10 ? '0' + currentDT.getMinutes() : currentDT.getMinutes(); //分
  208. ss = currentDT.getSeconds() < 10 ? '0' + currentDT.getSeconds() : currentDT.getSeconds(); //秒
  209. theDateStr = y + "-" + m + "-" + date + " " + hs + ":" + ms + ":" + ss;
  210. //填充到组件中
  211. $("#showTime").text(theDateStr);
  212. // setTimeout 在执行时,是在载入后延迟指定时间后,去执行一次表达式,仅执行一次
  213. window.setTimeout(getTime, 1000);
  214. }
  215. function GetDataZong() {
  216. echarts_1();
  217. echarts_6();
  218. echarts_5();
  219. // GetZhiXing_MO("marqueeCustCH1", "30");
  220. // SetIfGo("marqueeCust1", "marqueeCustCH1", "marqueelist1");//判断是否需要滚动
  221. // GetOtherData();
  222. // echart2_2();
  223. // echart2_3();
  224. }
  225. function echarts_1() {
  226. var myChart = echarts.init(document.getElementById('echarts1'));
  227. var ComInQty = new Array();//工单入库数量
  228. var MoQty = new Array();//工单用量
  229. var MonthData = new Array();
  230. //测试
  231. MonthData = ["1月", "2月", "3月"];
  232. ComInQty = ["200", "100", "140"];
  233. MoQty = ["4", "2", "7"];
  234. //$.ajax({
  235. // url: "/SRM/WatchPanel/GetWipZ?XX=XX&" + Math.random(),
  236. // dataType: "json",
  237. // async: false,
  238. // success: function (data) {
  239. // if (data != false && data != null && data.length > 0) {
  240. // for (var i = 0; i < data.length; i++) {
  241. // MonthData.push(data[i].月份);
  242. // ComInQty.push(data[i].工单入库数量);
  243. // MoQty.push(data[i].工单用量);
  244. // }
  245. // }
  246. // }
  247. //});
  248. option = {
  249. tooltip: {
  250. trigger: 'axis',
  251. axisPointer: { type: 'shadow' },
  252. }, "grid": {
  253. "top": "20%",
  254. "right": "50",
  255. "bottom": "20",
  256. "left": "30",
  257. },
  258. legend: {
  259. data: [ '工单入库数量', '工单数量' ],
  260. right: 'center', width: '100%',
  261. textStyle: {
  262. color: "#fff"
  263. },
  264. itemWidth: 12,
  265. itemHeight: 10,
  266. },
  267. "xAxis": [
  268. {
  269. "type": "category",
  270. data: MonthData,
  271. axisLine: { lineStyle: { color: "rgba(255,255,255,.1)" } },
  272. axisLabel: {
  273. textStyle: { color: "rgba(255,255,255,.7)", fontSize: '14', },
  274. },
  275. },
  276. ],
  277. "yAxis": [
  278. {
  279. "type": "value",
  280. "name": "工单入库数量",
  281. axisTick: { show: false },
  282. splitLine: {
  283. show: false,
  284. },
  285. "axisLabel": {
  286. "show": true,
  287. fontSize: 14,
  288. color: "rgba(255,255,255,.6)"
  289. },
  290. axisLine: {
  291. min: 0,
  292. max: 10,
  293. lineStyle: { color: 'rgba(255,255,255,.1)' }
  294. },//左线色
  295. },
  296. {
  297. "type": "value",
  298. "name": "工单数量",
  299. "show": true,
  300. "axisLabel": {
  301. "show": true,
  302. fontSize: 14,
  303. formatter: "{value} ",
  304. color: "rgba(255,255,255,.6)"
  305. },
  306. axisTick: { show: false },
  307. axisLine: { lineStyle: { color: 'rgba(255,255,255,.1)' } },//右线色
  308. splitLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } },//x轴线
  309. },
  310. ],
  311. "series": [
  312. {
  313. "name": "工单入库数量",
  314. "type": "bar",
  315. "data": ComInQty,
  316. "barWidth": "15%",
  317. "itemStyle": {
  318. "normal": {
  319. barBorderRadius: 15,
  320. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  321. offset: 0,
  322. color: '#8bd46e'
  323. }, {
  324. offset: 1,
  325. color: '#09bcb7'
  326. }]),
  327. }
  328. },
  329. "barGap": "0.2"
  330. },
  331. //{
  332. // "name": "工单数量",
  333. // "type": "bar",
  334. // "data": MoQty,
  335. // "barWidth": "15%",
  336. // "itemStyle": {
  337. // "normal": {
  338. // barBorderRadius: 15,
  339. // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  340. // offset: 0,
  341. // color: '#248ff7'
  342. // }, {
  343. // offset: 1,
  344. // color: '#6851f1'
  345. // }]),
  346. // }
  347. // },
  348. // "barGap": "0.2"
  349. //},
  350. {
  351. "name": "工单数量",
  352. "type": "line",
  353. smooth: true,
  354. "yAxisIndex": 1,
  355. "data": MoQty,
  356. lineStyle: {
  357. normal: {
  358. width: 2
  359. },
  360. },
  361. "itemStyle": {
  362. "normal": {
  363. "color": '#6851f1'//'#248ff7' //"#86d370",
  364. }
  365. },
  366. }
  367. ]
  368. };
  369. myChart.setOption(option);
  370. window.addEventListener("resize", function () {
  371. myChart.resize();
  372. });
  373. }
  374. function echarts_6() {
  375. // 基于准备好的dom,初始化echarts实例
  376. var myChart = echarts.init(document.getElementById('echarts6'));
  377. option = {
  378. title: {
  379. text: '5132',
  380. subtext: '总体',
  381. x: 'center',
  382. y: '40%',
  383. textStyle: {
  384. color: '#fff',
  385. fontSize: 22,
  386. lineHeight: 10,
  387. },
  388. subtextStyle: {
  389. color: '#90979c',
  390. fontSize: 16,
  391. lineHeight: 10,
  392. },
  393. },
  394. tooltip: {
  395. trigger: 'item',
  396. formatter: "{b} : {c} ({d}%)"
  397. },
  398. visualMap: {
  399. show: false,
  400. min: 500,
  401. max: 600,
  402. inRange: {
  403. //colorLightness: [0, 1]
  404. }
  405. },
  406. series: [{
  407. name: '访问来源',
  408. type: 'pie',
  409. radius: ['50%', '70%'],
  410. center: ['50%', '50%'],
  411. color: ['rgb(131,249,103)', '#FBFE27', '#FE5050', '#1DB7E5'], //'#FBFE27','rgb(11,228,96)','#FE5050'
  412. data: [{
  413. "value": 1924,
  414. "name": "字段名称1"
  415. }, {
  416. "value": 1055,
  417. "name": "字段名称2"
  418. }, {
  419. "value": 1532,
  420. "name": "字段名称3"
  421. }
  422. ].sort(function (a, b) {
  423. return a.value - b.value
  424. }),
  425. roseType: 'radius',
  426. label: {
  427. normal: {
  428. formatter: ['{c|{c}万}', '{b|{b}}'].join('\n'),
  429. rich: {
  430. c: {
  431. color: 'rgb(241,246,104)',
  432. fontSize: 20,
  433. fontWeight: 'bold',
  434. lineHeight: 5
  435. },
  436. b: {
  437. color: 'rgb(98,137,169)',
  438. fontSize: 14,
  439. height: 44
  440. },
  441. },
  442. }
  443. },
  444. labelLine: {
  445. normal: {
  446. lineStyle: {
  447. color: 'rgb(98,137,169)',
  448. },
  449. smooth: 0.2,
  450. length: 10,
  451. length2: 20,
  452. }
  453. }
  454. }]
  455. };
  456. // 使用刚指定的配置项和数据显示图表。
  457. myChart.setOption(option);
  458. window.addEventListener("resize", function () {
  459. myChart.resize();
  460. });
  461. }
  462. function echarts_5() {
  463. // 基于准备好的dom,初始化echarts实例
  464. var myChart = echarts.init(document.getElementById('echarts5'));
  465. option = {
  466. tooltip: {
  467. trigger: 'axis',
  468. axisPointer: { type: 'shadow' },
  469. }, "grid": {
  470. "top": "15%",
  471. "right": "10%",
  472. "bottom": "20",
  473. "left": "10%",
  474. },
  475. legend: {
  476. data: ['字段1', '字段2'],
  477. right: 'center',
  478. top: 0,
  479. textStyle: {
  480. color: "#fff"
  481. },
  482. itemWidth: 12,
  483. itemHeight: 10,
  484. },
  485. "xAxis": [
  486. {
  487. "type": "category",
  488. data: ['2016', '2017', '2018', '2019'],
  489. axisLine: { lineStyle: { color: "rgba(255,255,255,.1)" } },
  490. axisLabel: {
  491. textStyle: { color: "rgba(255,255,255,.7)", fontSize: '14', },
  492. },
  493. },
  494. ],
  495. "yAxis": [
  496. {
  497. "type": "value",
  498. "name": "单位1",
  499. splitLine: { show: false },
  500. axisTick: { show: false },
  501. "axisLabel": {
  502. "show": true,
  503. color: "rgba(255,255,255,.6)"
  504. },
  505. axisLine: { lineStyle: { color: 'rgba(255,255,255,.1)' } },//左线色
  506. },
  507. {
  508. "type": "value",
  509. "name": "单位2",
  510. "show": true,
  511. axisTick: { show: false },
  512. "axisLabel": {
  513. "show": true,
  514. formatter: "{value} %",
  515. color: "rgba(255,255,255,.6)"
  516. },
  517. axisLine: { lineStyle: { color: 'rgba(255,255,255,.1)' } },//右线色
  518. splitLine: { show: true, lineStyle: { color: 'rgba(255,255,255,.1)' } },//x轴线
  519. },
  520. ],
  521. "series": [
  522. {
  523. "name": "字段1",
  524. "type": "bar",
  525. "data": [
  526. 18453.35, 20572.22, 24274.22, 30500.00
  527. ],
  528. "barWidth": "20%",
  529. "itemStyle": {
  530. "normal": {
  531. barBorderRadius: 15,
  532. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  533. offset: 0,
  534. color: '#fccb05'
  535. }, {
  536. offset: 1,
  537. color: '#f5804d'
  538. }]),
  539. }
  540. },
  541. "barGap": "0"
  542. },
  543. {
  544. "name": "字段2",
  545. "type": "line",
  546. "yAxisIndex": 1,
  547. "data": [0, 11.48, 18.00, 25.65],
  548. lineStyle: {
  549. normal: {
  550. width: 2
  551. },
  552. },
  553. "itemStyle": {
  554. "normal": {
  555. "color": "#ff3300",
  556. }
  557. },
  558. "smooth": true
  559. }
  560. ]
  561. };
  562. // 使用刚指定的配置项和数据显示图表。
  563. myChart.setOption(option);
  564. window.addEventListener("resize", function () {
  565. myChart.resize();
  566. });
  567. }
  568. </script>
  569. </body>
  570. </html>