金豪看板
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.

1029 lines
36 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
  1. 
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <!--更多资源: -->
  6. <meta charset="utf-8" />
  7. <meta name="description" content="" />
  8. <meta name="keywords" content="" />
  9. <meta name="viewport"
  10. content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  11. <title>生产监控看板</title>
  12. <!--大屏-->
  13. <link type="text/css" href="~/Content/Cust003/css/public.css" rel="stylesheet" />
  14. <link type="text/css" href="~/Content/Cust003/css/icon.css" rel="stylesheet" />
  15. <link type="text/css" href="~/Content/Cust003/css/index.css" rel="stylesheet" />
  16. <link rel="stylesheet" href="~/Content/Cust069/fonts/icomoon.css">
  17. <script src="~/Content/js/jquery/jquery-2.1.1.min.js" type="text/javascript"></script>
  18. <script src="~/Content/Cust003/js/jquery.numscroll.js" type="text/javascript" charset="utf-8"></script>
  19. <script src="~/Content/js/echarts/echarts5.3.3.js"></script>
  20. <script src="~/Content/js/echarts4.8/echarts-liquidfill.js"></script>
  21. <style>
  22. h3 {
  23. color: #FFFFFF;
  24. text-shadow: #05d1fc 0px 1px 3px, #05d1fc 1px 0px 3px,#05d1fc 0px -1px 3px, #05d1fc -1px 0px 3px;
  25. filter: glow(color=#00FFCC,strength=3);
  26. }
  27. .rightMain_top,.leftMain_bottom ul li {
  28. width: 100%;
  29. }
  30. .leftWZ ul {
  31. height: 50%;
  32. }
  33. .titleCust {
  34. background-color:#bbcec830;
  35. }
  36. .animationNone {
  37. animation: none !important;
  38. }
  39. .leftWZ ul li {
  40. width:calc(25% ) !important;
  41. color:white;
  42. float:left;
  43. vertical-align: bottom;
  44. text-align: center;
  45. height:100%;
  46. }
  47. .leftMain_top, .leftMain_bottom {
  48. height: calc( 46% );
  49. }
  50. .leftMain_topIn, .leftMain_bottomIn, .leftMain_topInUL,
  51. .rightMain_bottom, .rightMain_bottomIn,.leftMain_bottom ul {
  52. height: 100%;
  53. }
  54. img {
  55. height: 0.2rem;
  56. width: 0.5rem;
  57. padding-top: 0.05rem;
  58. }
  59. .bg {
  60. padding-top: 0.01rem;
  61. }
  62. .title {
  63. height: 8%;
  64. text-shadow: #01db78 0px 2px 3px, #01db78 1px 0px 3px, #05d1fc 0px -2px 3px, #05d1fc -1px 0px 3px;
  65. }
  66. .TopName {
  67. vertical-align: middle;
  68. text-align: center;
  69. font-size: 30px;
  70. font-weight: 700;
  71. color: white;
  72. }
  73. .TopNameTime {
  74. vertical-align: middle;
  75. text-align: right;
  76. font-size: 20px;
  77. font-weight: 700;
  78. color: white;
  79. }
  80. .rightMain_bottomIn .biaoge_list ul li {
  81. overflow: hidden;
  82. padding-right: 0px;
  83. }
  84. .rightMain_bottomIn .biaoge {
  85. height: calc(100% );
  86. }
  87. .zantingCla li {
  88. color:yellow !important;
  89. }
  90. .allnav {
  91. /*height: calc(100% - 0.01rem);*/
  92. height: 100%;
  93. width:100%;
  94. position:relative;
  95. }
  96. .TopAll {
  97. height:calc(33% - 0.1rem);
  98. }
  99. </style>
  100. <script type="text/javascript">
  101. document.documentElement.style.fontSize =
  102. (document.documentElement.clientWidth / 768) * 100 + 'px'
  103. </script>
  104. </head>
  105. <body>
  106. <div class="bg">
  107. <table class="title">
  108. <tr>
  109. <td style="width:20%">
  110. <div class="TopNamelogo" id="TopNamelogo">
  111. <img src="~/Content/img/zhenxiang.png" border="0" class="logoclass" />
  112. </div>
  113. </td>
  114. <td style="width:60%">
  115. <div class="TopName" id="TopName">生产监控看板</div>
  116. </td>
  117. <td style="width:20%">
  118. <div class="TopNameTime" id="TopNameTime"></div>
  119. </td>
  120. </tr>
  121. </table>
  122. <div class="leftMain_top TopAll" >
  123. <div class="leftMain_topIn">
  124. <ul class="leftMain_topInUL">
  125. <li class="LineLi" style="width:33%">
  126. <div class="rightMain_bottom">
  127. <div class="rightMain_bottomIn" style="height:calc( 100% )">
  128. <div class="biaoge biaoge_list" id="marqueelist1"
  129. style="width: 100%; ">
  130. <div class="allnav" id="echart2_2"></div>
  131. </div>
  132. <span class="border_bg_leftTop"></span>
  133. <span class="border_bg_rightTop"></span>
  134. <span class="border_bg_leftBottom"></span>
  135. <span class="border_bg_rightBottom"></span>
  136. </div>
  137. </div>
  138. @*</div>*@
  139. </li>
  140. <li class="LineLi" style="width:33%">
  141. <div class="rightMain_bottom">
  142. <div class="leftWZ" style="height:calc( 50% )">
  143. <ul>
  144. <li class="titleCust">待检数量</li>
  145. <li class="titleCust">已检数量</li>
  146. <li class="titleCust">待整改车辆</li>
  147. <li class="titleCust">已整改车辆</li>
  148. </ul>
  149. <ul id="ttt2">
  150. <li>0台</li>
  151. <li>0台</li>
  152. <li>0台</li>
  153. <li>0台</li>
  154. </ul>
  155. </div>
  156. <div class="leftWZ" style="height:calc( 50% )">
  157. <ul>
  158. <li class="titleCust">XX</li>
  159. <li class="titleCust">XX</li>
  160. <li class="titleCust">待整改车辆</li>
  161. <li class="titleCust">已整改车辆</li>
  162. </ul>
  163. <ul id="ttt2">
  164. <li>0台</li>
  165. <li>0台</li>
  166. <li>0台</li>
  167. <li>0台</li>
  168. </ul>
  169. </div>
  170. </div>
  171. </li>
  172. <li class="LineLi" style="width:33%">
  173. <div class="rightMain_bottom">
  174. <div class="rightMain_bottomIn">
  175. <div class="biaoge biaoge_list" id="marqueelist1"
  176. style="width: 100%; ">
  177. <div class="allnav" id="echart33">
  178. </div>
  179. </div>
  180. <span class="border_bg_leftTop"></span>
  181. <span class="border_bg_rightTop"></span>
  182. <span class="border_bg_leftBottom"></span>
  183. <span class="border_bg_rightBottom"></span>
  184. </div>
  185. </div>
  186. </li>
  187. </ul>
  188. </div>
  189. </div>
  190. <div class="leftMain_bottom TopAll" >
  191. <div class="leftMain_bottomIn">
  192. <ul>
  193. <li class="LineLi" style="width:50%">
  194. <div class="rightMain_bottom">
  195. <div class="rightMain_bottomIn">
  196. @*<h3> SMT车间生产加工数据</h3>*@
  197. <div class="biaoge biaoge_list"
  198. style="width: 100%; ">
  199. <div class="biaoge_listIn CustDiv4">
  200. <ul class="ul_title">
  201. <li>销售车号</li>
  202. <li>部件</li>
  203. <li>人员</li>
  204. <li>项目</li>
  205. <li>时间</li>
  206. <li>类型</li>
  207. <li>结果</li>
  208. </ul>
  209. <div class="ul_list" id="marqueeCust1">
  210. <div class="ul_listIn ul_listInCust" id="marqueeCustCH1">
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. <span class="border_bg_leftTop"></span>
  216. <span class="border_bg_rightTop"></span>
  217. <span class="border_bg_leftBottom"></span>
  218. <span class="border_bg_rightBottom"></span>
  219. </div>
  220. </div>
  221. </li>
  222. <li class="LineLi" style="width:50%">
  223. <div class="rightMain_bottom">
  224. <div class="rightMain_bottomIn">
  225. @*<h3> SMT车间生产加工数据</h3>*@
  226. <div class="biaoge biaoge_list"
  227. style="width: 100%; ">
  228. <div class="biaoge_listIn CustDiv4">
  229. <ul class="ul_title">
  230. <li>销售车号</li>
  231. <li>部件</li>
  232. <li>人员</li>
  233. <li>项目</li>
  234. <li>时间</li>
  235. <li>类型</li>
  236. <li>结果</li>
  237. </ul>
  238. <div class="ul_list" id="marqueeCust33">
  239. <div class="ul_listIn ul_listInCust" id="marquee33">
  240. </div>
  241. </div>
  242. </div>
  243. </div>
  244. <span class="border_bg_leftTop"></span>
  245. <span class="border_bg_rightTop"></span>
  246. <span class="border_bg_leftBottom"></span>
  247. <span class="border_bg_rightBottom"></span>
  248. </div>
  249. </div>
  250. </li>
  251. </ul>
  252. </div>
  253. </div>
  254. <div class="leftMain_bottom TopAll" >
  255. <div class="leftMain_bottomIn">
  256. <ul>
  257. <li class="LineLi" style="width:100%">
  258. <div class="rightMain_bottom">
  259. <div class="rightMain_bottomIn">
  260. @*<h3> SMT车间生产加工数据</h3>*@
  261. <div class="biaoge biaoge_list"
  262. style="width: 100%; ">
  263. <div class="biaoge_listIn CustDiv4">
  264. <ul class="ul_title">
  265. <li>销售车号</li>
  266. <li>部件</li>
  267. <li>人员</li>
  268. <li>项目</li>
  269. <li>时间</li>
  270. <li>类型</li>
  271. <li>结果</li>
  272. </ul>
  273. <div class="ul_list" id="marqueeCust1">
  274. <div class="ul_listIn ul_listInCust" id="marqueeCustCH1">
  275. </div>
  276. </div>
  277. </div>
  278. </div>
  279. <span class="border_bg_leftTop"></span>
  280. <span class="border_bg_rightTop"></span>
  281. <span class="border_bg_leftBottom"></span>
  282. <span class="border_bg_rightBottom"></span>
  283. </div>
  284. </div>
  285. </li>
  286. </ul>
  287. </div>
  288. </div>
  289. <div style="clear: both"></div>
  290. </div>
  291. <script>
  292. var DataF = 300;// 300;//单位秒 //刷新数据时间
  293. var _BarWidth = "25%";
  294. var _barBorderRadius_M = 2;
  295. var myChart = echarts.init(document.getElementById('echart2_2'));
  296. var myChartArea3 = echarts.init(document.getElementById('echart33'));
  297. $(function () {
  298. getTime();
  299. GetDataZong();
  300. //刷新数据
  301. timer = setInterval(function () {
  302. GetDataZong();
  303. }, DataF * 1000);
  304. });
  305. function getTime() {
  306. var days = new Array("日", "一", "二", "三", "四", "五", "六");
  307. var currentDT = new Date();
  308. var y, m, date, day, hs, ms, ss, theDateStr;
  309. y = currentDT.getFullYear(); //四位整数表示的年份
  310. m = currentDT.getMonth() < 10 ? '0' + (currentDT.getMonth() + 1) : (currentDT.getMonth() + 1); //月
  311. date = currentDT.getDate() < 10 ? '0' + currentDT.getDate() : currentDT.getDate(); //日
  312. day = currentDT.getDay(); //星期
  313. hs = currentDT.getHours() < 10 ? '0' + currentDT.getHours() : currentDT.getHours(); //时
  314. ms = currentDT.getMinutes() < 10 ? '0' + currentDT.getMinutes() : currentDT.getMinutes(); //分
  315. ss = currentDT.getSeconds() < 10 ? '0' + currentDT.getSeconds() : currentDT.getSeconds(); //秒
  316. theDateStr = y + "-" + m + "-" + date + " " + hs + ":" + ms + ":" + ss;
  317. //填充到组件中
  318. $("#TopNameTime").text(theDateStr);
  319. // setTimeout 在执行时,是在载入后延迟指定时间后,去执行一次表达式,仅执行一次
  320. window.setTimeout(getTime, 1000);
  321. }
  322. function GetDataZong() {
  323. // GetZhiXing_MO("marqueeCustCH1", "30");
  324. // SetIfGo("marqueeCust1", "marqueeCustCH1", "marqueelist1");//判断是否需要滚动
  325. // GetOtherData();
  326. // echart2_2();
  327. // echart2_3();
  328. }
  329. function SetIfGo(DivID, DivCHID,listID)
  330. {
  331. var ListDIV = $("#" + listID)[0].clientHeight;
  332. var H_marqueediv = $("#" + DivCHID)[0];
  333. var H_marqueeView = $("#" + DivID)[0].clientHeight;
  334. if ((ListDIV-40) > H_marqueeView) {
  335. if (!$("#" + DivID).hasClass("animationNone")) {
  336. $("#" + DivID).addClass("animationNone");
  337. }
  338. if (!$("#" + DivCHID).hasClass("animationNone")) {
  339. $("#" + DivCHID).addClass("animationNone");
  340. }
  341. }
  342. else {
  343. if ($("#" + DivID).hasClass("animationNone")) {
  344. $("#" + DivID).removeClass("animationNone");
  345. }
  346. if ($("#" + DivCHID).hasClass("animationNone")) {
  347. $("#" + DivCHID).removeClass("animationNone");
  348. }
  349. }
  350. }
  351. function GetZhiXing_MO(marqueeID, ItemNumber) {
  352. $.ajax({
  353. url: "/SRM/WatchPanel/GetCKData?XX=XX&" + Math.random(),
  354. dataType: "json",
  355. async: false,
  356. success: function (data) {
  357. if (data != false && data != null && data.length > 0) {
  358. var html = "";
  359. for (var i = 0; i < data.length; i++) {
  360. html += "<ul>";
  361. html += ' <li >' + data[i].销售车号 + '</li> ';
  362. html += ' <li >' + data[i].部件名称 + '</li> <li >' + data[i].人员 + '</li>';
  363. html += ' <li >' + data[i].项目 + '</li> <li >' + data[i].时间 + '</li>';
  364. html += ' <li >' + data[i].类型 + '</li> <li >' + data[i].结果 + '</li> </ul> ';
  365. }
  366. $(".ul_listInCust").css("animation-duration", data.length * 1.3 + "s");
  367. $("#" + marqueeID).html(html);
  368. }
  369. else {
  370. $("#" + marqueeID).html("");
  371. }
  372. },
  373. error: function (aa) {
  374. }
  375. });
  376. }
  377. function GetOtherData()
  378. {
  379. $.ajax({
  380. url: "/SRM/WatchPanel/GetOtherData?XX=XX&" + Math.random(),
  381. dataType: "json",
  382. async: false,
  383. success: function (data) {
  384. if (data != false && data != null && data.length > 0) {
  385. for (var i = 0; i < data.length; i++) {
  386. $("#ttt2").html ( "<li>" + data[i].待检车辆 + "台</li> <li>" + data[i].已检车辆 +
  387. "台</li> <li>" + data[i].待整改 + "台</li> <li>" + data[i].已整改 + "台</li>");
  388. }
  389. }
  390. }
  391. });
  392. }
  393. function echart2_2() {
  394. // 基于准备好的dom,初始化echarts实例
  395. var colors = ['#4992ff', '#7cffb2', '#fddd60', '#ff6e76'];
  396. var colors2 = ['#4992ff40', '#7cffb230', '#fddd609e', '#ff6e7678'];
  397. var MonArray = new Array();//月份["2023-01","2023-02","2023-03","2023-04"]
  398. var ZongArray = new Array();//Qty [89,90,60,90]
  399. $.ajax({
  400. url: "/SRM/WatchPanel/GetCKOKRate?XX=XX&" + Math.random(),
  401. dataType: "json",
  402. async: false,
  403. success: function (data) {
  404. if (data != false && data != null && data.length > 0) {
  405. for (var i = 0; i < data.length; i++) {
  406. MonArray.push(data[i].月份);
  407. ZongArray.push(data[i].Qty);
  408. }
  409. }
  410. }
  411. });
  412. option = {
  413. tooltip: {
  414. trigger: 'axis',
  415. axisPointer: { type: 'shadow' },
  416. formatter: function (params) {
  417. var showHtm = "";
  418. showHtm = params[0].name + "月:" + '<br>' +
  419. params[0].seriesName + ':' + params[0].data + '%' ;
  420. return showHtm;
  421. }
  422. },
  423. grid: {
  424. "top": "35",
  425. "right": "5",
  426. "bottom": "20",
  427. "left": "30",
  428. },
  429. legend: {
  430. show: false,
  431. },
  432. title: {
  433. text: '一次性验收合格率',
  434. textStyle: {
  435. fontSize: 15,
  436. color: "rgba(250, 249, 249, 1)",
  437. },
  438. },
  439. "xAxis": [
  440. {
  441. "type": "category",
  442. data: MonArray,
  443. axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.5)", } },
  444. axisTick: { show: false, },
  445. axisLabel: {
  446. textStyle: {
  447. fontSize: 9,
  448. color: "rgba(255,255,255,.8)",
  449. },
  450. },
  451. },
  452. ],
  453. "yAxis": [
  454. {
  455. "type": "value",
  456. axisTick: { show: false },
  457. splitLine: { show: false, },
  458. "axisLabel": {
  459. "show": true,
  460. fontSize: 9,
  461. color: "rgba(255,255,255,.8)"
  462. },
  463. axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.5)", } },
  464. },
  465. ],
  466. "series": [
  467. {
  468. "name": "一次检验合格率",
  469. "type": "line",
  470. "data": ZongArray,
  471. areaStyle: {},
  472. "itemStyle": {
  473. "normal": {
  474. barBorderRadius: _barBorderRadius_M,
  475. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  476. offset: 0,
  477. color: '#8bd46e'
  478. }, {
  479. offset: 1,
  480. color: '#09bcb7'
  481. }]),
  482. }
  483. },
  484. "barGap": "0.2",
  485. stack: 'SunShi',
  486. }
  487. ]
  488. };
  489. myChart.setOption(option);
  490. }
  491. function echart2_3() {
  492. // 基于准备好的dom,初始化echarts实例
  493. var colors = ['#7cffb220', '#7cffb2', '#04040445', '#ff6e76'];
  494. var ZongArray = 0;//[89, 90, 60, 90]//new Array();//工作总时间
  495. $.ajax({
  496. url: "/SRM/WatchPanel/GetCKOKRateALL?XX=XX&" + Math.random(),
  497. dataType: "json",
  498. async: false,
  499. success: function (data) {
  500. if (data != false && data != null && data.length > 0) {
  501. for (var i = 0; i < data.length; i++) {
  502. ZongArray=data[i].Qty;
  503. }
  504. }
  505. }
  506. });
  507. //ZongArray = 0.7;
  508. var options = {
  509. title: {
  510. text: '质量控制指标',
  511. textStyle: {
  512. fontSize: 15,
  513. color: "rgba(250, 249, 249, 1)",
  514. },
  515. }
  516. ,
  517. series: [
  518. {
  519. type: 'liquidFill',
  520. radius: '85%',
  521. color: [
  522. {
  523. type: 'linear',
  524. x: 0,
  525. y: 0,
  526. x2: 0,
  527. y2: 1,
  528. colorStops: [
  529. {
  530. offset: 0,
  531. color: colors[1],
  532. },
  533. {
  534. offset: 1,
  535. color: colors[0],
  536. },
  537. ],
  538. globalCoord: false,
  539. },
  540. ],
  541. data: [ZongArray, ZongArray-0.1, ZongArray], // data个数代表波浪数
  542. backgroundStyle: {
  543. borderWidth: 1,
  544. color: colors[2],
  545. },
  546. label: {
  547. normal: {
  548. textStyle: {
  549. fontSize: 26,
  550. color: '#fff',
  551. },
  552. },
  553. },
  554. outline: {
  555. // show: false
  556. borderDistance: 0,
  557. itemStyle: {
  558. borderWidth: 6,
  559. borderColor: colors[1],
  560. },
  561. },
  562. }
  563. ],
  564. };
  565. myChartArea3.setOption(options);
  566. }
  567. function GetArea3() {
  568. var value = 0.4;
  569. var value1 = 0.6;
  570. var value2 = 0.3;
  571. var value3 = 0.4;
  572. var value4 = 0.5;
  573. var value5 = 0.4;
  574. var value6 = 0.4;
  575. var value7 = 0.5;
  576. $("#div3-C1-C1").html(value7 + "月完成率");
  577. $("#div3-C2-C1").html(value6 + "月完成率");
  578. $("#div3-C1-C2-div1").html(value3);
  579. $("#lastMothPlan").html(value3);
  580. $("#div3-C1-C2-div2").html(value2);
  581. $("#div3-C2-C2-div1").html(value1);
  582. $("#div3-C2-C2-div2").html(value);
  583. var data = [value5, value5, value5];
  584. var option3 = {
  585. title: [
  586. {
  587. text: value7 + '月完成率',
  588. x: '22%',
  589. y: '90%',
  590. textStyle: {
  591. fontSize: 14,
  592. fontWeight: '100',
  593. color: '#5dc3ea',
  594. lineHeight: 16,
  595. textAlign: 'center',
  596. },
  597. },
  598. {
  599. text: value6 + '月完成率',
  600. x: '76%',
  601. y: '90%',
  602. textStyle: {
  603. fontSize: 14,
  604. fontWeight: '100',
  605. color: '#5dc3ea',
  606. lineHeight: 16,
  607. textAlign: 'center',
  608. },
  609. },
  610. ],
  611. series: [
  612. {
  613. type: 'liquidFill',
  614. radius: '85%',
  615. center: ['30%', '48%'],
  616. color: [
  617. {
  618. type: 'linear',
  619. x: 0,
  620. y: 0,
  621. x2: 0,
  622. y2: 1,
  623. colorStops: [
  624. {
  625. offset: 0,
  626. color: '#446bf5',
  627. },
  628. {
  629. offset: 1,
  630. color: '#0000FF',
  631. },
  632. ],
  633. globalCoord: false,
  634. },
  635. ],
  636. data: [value5, value5, value5], // data个数代表波浪数
  637. backgroundStyle: {
  638. borderWidth: 1,
  639. color: 'RGBA(51, 66, 127, 0.7)',
  640. },
  641. label: {
  642. normal: {
  643. textStyle: {
  644. fontSize: 14,
  645. color: '#fff',
  646. },
  647. },
  648. },
  649. outline: {
  650. // show: false
  651. borderDistance: 0,
  652. itemStyle: {
  653. borderWidth: 6,
  654. borderColor: '#0000FF',
  655. },
  656. },
  657. },
  658. { //第二个球的填充
  659. type: 'liquidFill',
  660. radius: '85%',
  661. center: ['84%', '45%'],
  662. color: [
  663. {
  664. type: 'linear',
  665. x: 0,
  666. y: 0,
  667. x2: 0,
  668. y2: 1,
  669. colorStops: [
  670. {
  671. offset: 0,
  672. color: '#2aa1e3',
  673. },
  674. {
  675. offset: 1,
  676. color: '#08bbc9',
  677. },
  678. ],
  679. globalCoord: false,
  680. },
  681. ],
  682. data: [value4, value4, value4], // data个数代表波浪数
  683. backgroundStyle: {
  684. borderWidth: 1,
  685. color: 'RGBA(51, 66, 127, 0.7)',
  686. },
  687. label: {
  688. normal: {
  689. textStyle: {
  690. fontSize: 28,
  691. color: '#fff',
  692. },
  693. },
  694. },
  695. outline: {
  696. // show: false
  697. borderDistance: 0,
  698. itemStyle: {
  699. borderWidth: 6,
  700. borderColor: '#08bbc9',
  701. },
  702. },
  703. },
  704. ],
  705. };
  706. myChartArea3.setOption(option3);
  707. }
  708. //工单产出统计
  709. function echart1_1() {
  710. // 基于准备好的dom,初始化echarts实例
  711. var myChart = echarts.init(document.getElementById('echart1_1'));
  712. var colors = ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc']
  713. var RK_Num = new Array();//工单入库数量
  714. var moNum = new Array();//工单用量
  715. var MonthData = new Array();
  716. //测试
  717. MonthData = ["1月", "2月", "3月"];
  718. RK_Num = ["200", "100", "140"];
  719. moNum = ["4", "2", "7"];
  720. //$.ajax({
  721. // url: "/SRM/WatchPanel/GetWipZ?XX=XX&" + Math.random(),
  722. // dataType: "json",
  723. // async: false,
  724. // success: function (data) {
  725. // if (data != false && data != null && data.length > 0) {
  726. // for (var i = 0; i < data.length; i++) {
  727. // MonthData.push(data[i].月份);
  728. // RK_Num.push(data[i].工单入库数量);
  729. // moNum.push(data[i].工单用量);
  730. // }
  731. // }
  732. // }
  733. //});
  734. option = {
  735. color: colors,
  736. tooltip: {
  737. trigger: 'axis',
  738. axisPointer: { type: 'shadow' },
  739. formatter: function (params) {
  740. var showHtm = "";
  741. showHtm = params[0].name + ":" + '<br>' +
  742. params[0].seriesName + ':' + params[0].data + '<br>' +
  743. params[1].seriesName + ':' + params[1].data ;
  744. return showHtm;
  745. }
  746. },
  747. grid: {
  748. "top": "5",
  749. "right": "30",
  750. "bottom": "30",
  751. "left": "30",
  752. },
  753. legend: {
  754. show: false,
  755. },
  756. "xAxis": [
  757. {
  758. "type": "category",
  759. data: MonthData,
  760. axisLine: { show: false, lineStyle: { color: "rgba(255,255,255,.5)", } },
  761. axisTick: { show: false, },
  762. axisLabel: {
  763. textStyle: {
  764. fontSize: 9,
  765. color: "rgba(255,255,255,.5)",
  766. },
  767. rotate: 60,
  768. },
  769. },
  770. ],
  771. "yAxis": [
  772. {
  773. min: 0,
  774. max: function (value) {
  775. return value.max;
  776. },
  777. "type": "value",
  778. axisTick: { show: false },
  779. splitLine: { show: false, },
  780. axisLine: { show: false, },
  781. "axisLabel": {
  782. "show": true,
  783. fontSize: 9,
  784. color: "rgba(255,255,255,.5)"
  785. },
  786. axisLine: {
  787. show: false
  788. },
  789. },
  790. {
  791. min: 0,
  792. max: function (value) {
  793. return value.max;
  794. },
  795. "type": "value",
  796. axisTick: { show: false },
  797. splitLine: { show: false, },
  798. axisLine: { show: false, },
  799. "axisLabel": {
  800. "show": true,
  801. fontSize: 9,
  802. color: "rgba(255,255,255,.5)"
  803. },
  804. axisLine: {
  805. show: false
  806. },
  807. },
  808. ],
  809. "series": [
  810. {
  811. "name": "工单入库数量",
  812. "type": "bar",
  813. "data": RK_Num,
  814. barWidth: _BarWidth,
  815. "itemStyle": {
  816. "normal": {
  817. barBorderRadius: _barBorderRadius_M,
  818. }
  819. },
  820. barGap: "0.2",
  821. // stack: 'total',
  822. },
  823. {
  824. "name": "工单用量",
  825. "type": "line",
  826. "data": moNum,
  827. lineStyle: {
  828. normal: {
  829. width: 2
  830. },
  831. },
  832. "itemStyle": {
  833. "normal": {
  834. "color": "#3496f8",
  835. }
  836. },
  837. "yAxisIndex": 1,
  838. symbolSize: 0,
  839. }
  840. ]
  841. };
  842. myChart.setOption(option);
  843. }
  844. </script>
  845. </body>
  846. </html>