boss.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  6. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  7. <title>工厂产能管理页</title>
  8. <!-- Favicon-->
  9. <link rel="icon" href="favicon.ico" type="image/x-icon">
  10. <!-- Google Fonts -->
  11. <link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
  12. <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
  13. <!-- Bootstrap Core Css -->
  14. <link rel="stylesheet" href="css/third/bootstrap.min.css" >
  15. <!-- Waves Effect Css -->
  16. <link href="plugins/node-waves/waves.css" rel="stylesheet" />
  17. <!-- Animation Css -->
  18. <link href="plugins/animate-css/animate.css" rel="stylesheet" />
  19. <!-- Morris Chart Css-->
  20. <link href="plugins/morrisjs/morris.css" rel="stylesheet" />
  21. <!-- Custom Css -->
  22. <link href="css/style-frontend.css" rel="stylesheet">
  23. <!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes -->
  24. <link href="css/themes/all-themes.css" rel="stylesheet" />
  25. <script src="css/third/jq.3.2.1.min.js"></script>
  26. <script src="css/third/popper.1.12.9.js" ></script>
  27. <script src="css/third/boot.min.js" ></script>
  28. <meta name="viewport" content="width=device-width, initial-scale=1">
  29. <style>
  30. /* css 代码 */
  31. </style>
  32. <script src="css/third/hchart.js"></script>
  33. <script src="https://img.hcharts.cn/highcharts/highcharts-more.js"></script>
  34. <script src="css/third/exporting.js"></script>
  35. <script src="css/third/cn.js"></script>
  36. </head>
  37. <body class="theme-red">
  38. <script>
  39. function addContent(name){
  40. console.log( $(name));
  41. $(name).tab('show');
  42. }
  43. </script>
  44. <section class="content" style="margin: 0 auto">
  45. <div class="container-fluid">
  46. <!-- Widgets -->
  47. <div class="row" >
  48. <div class=" col-lg-2 col-md-2 col-sm-6 col-xs-12" >
  49. <div class="info-box bg-pink text-center " onclick="addContent('#capacity-tab')" >
  50. <div class="row text-center" style="">
  51. <div class="col-12">产能</div>
  52. <div class="col-12">1224123</div>
  53. </div>
  54. </div>
  55. </div>
  56. <div class=" col-lg-2 col-md-2 col-sm-6 col-xs-12" >
  57. <div class="info-box bg-pink text-center " onclick="addContent('#home-tab')" >
  58. <div class="row text-center" style="">
  59. <div class="col-12">合格数</div>
  60. <div class="col-12">123123</div>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="col-lg-2 col-md-2 col-sm-6 col-xs-12">
  65. <div class="info-box bg-cyan "onclick="addContent('#profile-tab')">
  66. <div class="row text-center" style="">
  67. <div class="col-12">不合格数</div>
  68. <div class="col-12">555</div>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="col-lg-2 col-md-2 col-sm-6 col-xs-12">
  73. <div class="info-box bg-light-green " onclick="addContent('#contact-tab')">
  74. <div class="row text-center" style="">
  75. <div class="col-12">堆积数</div>
  76. <div class="col-12">4445</div>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="col-lg-2 col-md-2 col-sm-6 col-xs-12">
  81. <div class="info-box bg-orange " onclick="addContent('#time-tab')">
  82. <div class="row text-center" style="">
  83. <div class="col-12">工作时长</div>
  84. <div class="col-12">2245</div>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="col-lg-2 col-md-2 col-sm-6 col-xs-12">
  89. <div class="info-box bg-orange " onclick="addContent('#Unqualified-tab')">
  90. <div class="row text-center" style="">
  91. <div class="col-12">不良率</div>
  92. <div class="col-12">20%</div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. <div>
  98. <ul class="nav nav-tabs" id="myTab" role="tablist" style="display: none">
  99. <li class="nav-item">
  100. <a class="nav-link active" id="capacity-tab" data-toggle="tab" href="#capacity" role="tab" aria-controls="capacity" aria-selected="true">Capacity</a>
  101. </li>
  102. <li class="nav-item">
  103. <a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a>
  104. </li>
  105. <li class="nav-item">
  106. <a class="nav-link" id="profile-tab" data-toggle="tab" href="#ppr" role="tab" aria-controls="ppr" aria-selected="false">Profile</a>
  107. </li>
  108. <li class="nav-item">
  109. <a class="nav-link" id="contact-tab" data-toggle="tab" href="#contact" role="tab" aria-controls="contact" aria-selected="false">Contact</a>
  110. </li>
  111. <li class="nav-item">
  112. <a class="nav-link" id="time-tab" data-toggle="tab" href="#time" role="tab" aria-controls="time" aria-selected="false">Time</a>
  113. </li>
  114. <li class="nav-item">
  115. <a class="nav-link" id="Unqualified-tab" data-toggle="tab" href="#Unqualified" role="tab" aria-controls="Unqualified" aria-selected="false">Unqualified</a>
  116. </li>
  117. </ul>
  118. <div class="tab-content" id="myTabContent">
  119. <div class="tab-pane" id="capacity" role="tabpanel" aria-labelledby="capacity-tab">
  120. <div id="container0"class="text-center" style="width: 100%;height:300px;margin: 0 auto"></div>
  121. </div>
  122. <div class="tab-pane" id="home" role="tabpanel" aria-labelledby="home-tab">
  123. <div id="container1"class="text-center" style="width: 100%;height:300px;margin: 0 auto"></div>
  124. </div>
  125. <div class="tab-pane" id="ppr" role="tabpanel" aria-labelledby="profile-tab">
  126. <div id="container2" style="width:100%;height:300px;margin: 0 auto"></div>
  127. </div>
  128. <div class="tab-pane" id="contact" role="tabpanel" aria-labelledby="contact-tab">
  129. <div id="container3" style="width:100%;height:300px;margin: 0 auto"></div>
  130. </div>
  131. <div class="tab-pane" id="time" role="tabpanel" aria-labelledby="time-tab">
  132. <div id="container4" style="width:100%;height:300px;margin: 0 auto"></div>
  133. </div>
  134. <div class="tab-pane" id="Unqualified" role="tabpanel" aria-labelledby="Unqualified-tab">
  135. <div id="container5" style="width:100%;height:300px;margin: 0 auto"></div>
  136. </div>
  137. </div>
  138. </div>
  139. <!-- #END# Widgets -->
  140. <div class="cow">
  141. <div class="card">
  142. <div class="body">
  143. <div class="table-responsive">
  144. <table class="table table-hover dashboard-task-infos">
  145. <thead>
  146. <tr>
  147. <th>不良工位</th>
  148. <th>数量</th>
  149. <th>良品工位</th>
  150. <th>数量</th>
  151. </tr>
  152. </thead>
  153. <tbody id="rank-one">
  154. <tr>
  155. <td>张三</td>
  156. <td>11</td>
  157. <td>Task A</td>
  158. <td>22</td>
  159. </tr>
  160. <tr>
  161. <td>李四</td>
  162. <td>33</td>
  163. <td>Task B</td>
  164. <td>44</td>
  165. </tr>
  166. <tr>
  167. <td>王五</td>
  168. <td>21</td>
  169. <td>Task C</td>
  170. <td>12</td>
  171. </tr>
  172. </tbody>
  173. </table>
  174. </div>
  175. </div>
  176. </div>
  177. </div>
  178. <!-- CPU Usage -->
  179. <div class="row clearfix">
  180. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  181. <div class="card">
  182. <div class="header">
  183. <div class="row clearfix">
  184. <div class="col-xs-12 col-sm-6">
  185. <h2>CPU USAGE (%)</h2>
  186. </div>
  187. <div class="col-xs-12 col-sm-6 align-right">
  188. <div class="switch panel-switch-btn">
  189. <span class="m-r-10 font-12">REAL TIME</span>
  190. <label>OFF<input type="checkbox" id="realtime" checked><span class="lever switch-col-cyan"></span>ON</label>
  191. </div>
  192. </div>
  193. </div>
  194. <ul class="header-dropdown m-r--5">
  195. <li class="dropdown">
  196. <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
  197. <i class="material-icons">more_vert</i>
  198. </a>
  199. <ul class="dropdown-menu pull-right">
  200. <li><a href="javascript:void(0);">Action</a></li>
  201. <li><a href="javascript:void(0);">Another action</a></li>
  202. <li><a href="javascript:void(0);">Something else here</a></li>
  203. </ul>
  204. </li>
  205. </ul>
  206. </div>
  207. <div class="body">
  208. <div id="real_time_chart" class="dashboard-flot-chart"></div>
  209. </div>
  210. </div>
  211. </div>
  212. </div>
  213. <!-- #END# CPU Usage -->
  214. <div class="row clearfix">
  215. <!-- Visitors -->
  216. <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
  217. <div class="card">
  218. <div class="body bg-pink">
  219. <div class="sparkline" data-type="line" data-spot-Radius="4" data-highlight-Spot-Color="rgb(233, 30, 99)" data-highlight-Line-Color="#fff"
  220. data-min-Spot-Color="rgb(255,255,255)" data-max-Spot-Color="rgb(255,255,255)" data-spot-Color="rgb(255,255,255)"
  221. data-offset="90" data-width="100%" data-height="92px" data-line-Width="2" data-line-Color="rgba(255,255,255,0.7)"
  222. data-fill-Color="rgba(0, 188, 212, 0)">
  223. 12,10,9,6,5,6,10,5,7,5,12,13,7,12,11
  224. </div>
  225. <ul class="dashboard-stat-list">
  226. <li>
  227. TODAY
  228. <span class="pull-right"><b>1 200</b> <small>USERS</small></span>
  229. </li>
  230. <li>
  231. YESTERDAY
  232. <span class="pull-right"><b>3 872</b> <small>USERS</small></span>
  233. </li>
  234. <li>
  235. LAST WEEK
  236. <span class="pull-right"><b>26 582</b> <small>USERS</small></span>
  237. </li>
  238. </ul>
  239. </div>
  240. </div>
  241. </div>
  242. <!-- #END# Visitors -->
  243. <!-- Latest Social Trends -->
  244. <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
  245. <div class="card">
  246. <div class="body bg-cyan">
  247. <div class="m-b--35 font-bold">LATEST SOCIAL TRENDS</div>
  248. <ul class="dashboard-stat-list">
  249. <li>
  250. #socialtrends
  251. <span class="pull-right">
  252. <i class="material-icons">trending_up</i>
  253. </span>
  254. </li>
  255. <li>
  256. #materialdesign
  257. <span class="pull-right">
  258. <i class="material-icons">trending_up</i>
  259. </span>
  260. </li>
  261. <li>#adminbsb</li>
  262. <li>#freeadmintemplate</li>
  263. <li>#bootstraptemplate</li>
  264. <li>
  265. #freehtmltemplate
  266. <span class="pull-right">
  267. <i class="material-icons">trending_up</i>
  268. </span>
  269. </li>
  270. </ul>
  271. </div>
  272. </div>
  273. </div>
  274. <!-- #END# Latest Social Trends -->
  275. <!-- Answered Tickets -->
  276. <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
  277. <div class="card">
  278. <div class="body bg-teal">
  279. <div class="font-bold m-b--35">ANSWERED TICKETS</div>
  280. <ul class="dashboard-stat-list">
  281. <li>
  282. TODAY
  283. <span class="pull-right"><b>12</b> <small>TICKETS</small></span>
  284. </li>
  285. <li>
  286. YESTERDAY
  287. <span class="pull-right"><b>15</b> <small>TICKETS</small></span>
  288. </li>
  289. <li>
  290. LAST WEEK
  291. <span class="pull-right"><b>90</b> <small>TICKETS</small></span>
  292. </li>
  293. <li>
  294. LAST MONTH
  295. <span class="pull-right"><b>342</b> <small>TICKETS</small></span>
  296. </li>
  297. <li>
  298. LAST YEAR
  299. <span class="pull-right"><b>4 225</b> <small>TICKETS</small></span>
  300. </li>
  301. <li>
  302. ALL
  303. <span class="pull-right"><b>8 752</b> <small>TICKETS</small></span>
  304. </li>
  305. </ul>
  306. </div>
  307. </div>
  308. </div>
  309. <!-- #END# Answered Tickets -->
  310. </div>
  311. <div class="row clearfix">
  312. <!-- Task Info -->
  313. <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
  314. <div class="card">
  315. <div class="header">
  316. <h2>TASK INFOS</h2>
  317. <ul class="header-dropdown m-r--5">
  318. <li class="dropdown">
  319. <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
  320. <i class="material-icons">more_vert</i>
  321. </a>
  322. <ul class="dropdown-menu pull-right">
  323. <li><a href="javascript:void(0);">Action</a></li>
  324. <li><a href="javascript:void(0);">Another action</a></li>
  325. <li><a href="javascript:void(0);">Something else here</a></li>
  326. </ul>
  327. </li>
  328. </ul>
  329. </div>
  330. <div class="body">
  331. <div class="table-responsive">
  332. <table class="table table-hover dashboard-task-infos">
  333. <thead>
  334. <tr>
  335. <th>#</th>
  336. <th>Task</th>
  337. <th>Status</th>
  338. <th>Manager</th>
  339. <th>Progress</th>
  340. </tr>
  341. </thead>
  342. <tbody >
  343. <tr>
  344. <td>2</td>
  345. <td>Task B</td>
  346. <td><span class="label bg-blue">To Do</span></td>
  347. <td>John Doe</td>
  348. <td>
  349. <div class="progress">
  350. <div class="progress-bar bg-blue" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%"></div>
  351. </div>
  352. </td>
  353. </tr>
  354. <tr>
  355. <td>3</td>
  356. <td>Task C</td>
  357. <td><span class="label bg-light-blue">On Hold</span></td>
  358. <td>John Doe</td>
  359. <td>
  360. <div class="progress">
  361. <div class="progress-bar bg-light-blue" role="progressbar" aria-valuenow="72" aria-valuemin="0" aria-valuemax="100" style="width: 72%"></div>
  362. </div>
  363. </td>
  364. </tr>
  365. <tr>
  366. <td>4</td>
  367. <td>Task D</td>
  368. <td><span class="label bg-orange">Wait Approvel</span></td>
  369. <td>John Doe</td>
  370. <td>
  371. <div class="progress">
  372. <div class="progress-bar bg-orange" role="progressbar" aria-valuenow="95" aria-valuemin="0" aria-valuemax="100" style="width: 95%"></div>
  373. </div>
  374. </td>
  375. </tr>
  376. <tr>
  377. <td>5</td>
  378. <td>Task E</td>
  379. <td>
  380. <span class="label bg-red">Suspended</span>
  381. </td>
  382. <td>John Doe</td>
  383. <td>
  384. <div class="progress">
  385. <div class="progress-bar bg-red" role="progressbar" aria-valuenow="87" aria-valuemin="0" aria-valuemax="100" style="width: 87%"></div>
  386. </div>
  387. </td>
  388. </tr>
  389. </tbody>
  390. </table>
  391. </div>
  392. </div>
  393. </div>
  394. </div>
  395. <!-- #END# Task Info -->
  396. <!-- Browser Usage -->
  397. <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
  398. <div class="card">
  399. <div class="header">
  400. <h2>BROWSER USAGE</h2>
  401. <ul class="header-dropdown m-r--5">
  402. <li class="dropdown">
  403. <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
  404. <i class="material-icons">more_vert</i>
  405. </a>
  406. <ul class="dropdown-menu pull-right">
  407. <li><a href="javascript:void(0);">Action</a></li>
  408. <li><a href="javascript:void(0);">Another action</a></li>
  409. <li><a href="javascript:void(0);">Something else here</a></li>
  410. </ul>
  411. </li>
  412. </ul>
  413. </div>
  414. <div class="body">
  415. <div id="donut_chart" class="dashboard-donut-chart"></div>
  416. </div>
  417. </div>
  418. </div>
  419. <!-- #END# Browser Usage -->
  420. </div>
  421. </div>
  422. </section>
  423. <!-- Jquery Core Js -->
  424. <script src="plugins/jquery/jquery.min.js"></script>
  425. <!-- Bootstrap Core Js -->
  426. <script src="plugins/bootstrap/js/bootstrap.js"></script>
  427. <!-- Select Plugin Js -->
  428. <script src="plugins/bootstrap-select/js/bootstrap-select.js"></script>
  429. <!-- Slimscroll Plugin Js -->
  430. <script src="plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
  431. <!-- Waves Effect Plugin Js -->
  432. <script src="plugins/node-waves/waves.js"></script>
  433. <!-- Jquery CountTo Plugin Js -->
  434. <script src="plugins/jquery-countto/jquery.countTo.js"></script>
  435. <!-- Morris Plugin Js -->
  436. <script src="plugins/raphael/raphael.min.js"></script>
  437. <script src="plugins/morrisjs/morris.js"></script>
  438. <!-- ChartJs -->
  439. <script src="plugins/chartjs/Chart.bundle.js"></script>
  440. <!-- Flot Charts Plugin Js -->
  441. <script src="plugins/flot-charts/jquery.flot.js"></script>
  442. <script src="plugins/flot-charts/jquery.flot.resize.js"></script>
  443. <script src="plugins/flot-charts/jquery.flot.pie.js"></script>
  444. <script src="plugins/flot-charts/jquery.flot.categories.js"></script>
  445. <script src="plugins/flot-charts/jquery.flot.time.js"></script>
  446. <!-- Sparkline Chart Plugin Js -->
  447. <script src="plugins/jquery-sparkline/jquery.sparkline.js"></script>
  448. <!-- Custom Js -->
  449. <script src="js/admin.js"></script>
  450. <script src="js/pages/index.js"></script>
  451. <!-- Demo Js -->
  452. <script src="js/demo.js"></script>
  453. <script>
  454. function get_data(url, callback){
  455. if(la.anyone.alldata){
  456. callback([
  457. {name:"张三", id:133, approve:300, decline:400, Accumulate:1000,worktime:1},
  458. {name:"李四", id:133, approve:300, decline:400, Accumulate:1000,worktime:2},
  459. ]);
  460. return;
  461. }
  462. callback([{x:1527957798468,y:3000},{x:1527957799468,y:3000},{x:1527957800468,y:3000.5},{x:1527957801468,y:3001}]);
  463. }
  464. get_data('la.acceptedCount.3600',mmm);
  465. function mmm(shuju) {
  466. console.log("------ getting la.acceptedCount.3000 -------")
  467. console.log(shuju);
  468. var chart = Highcharts.chart('container1',{
  469. chart: {
  470. type: 'spline'
  471. },
  472. title: {
  473. text: '月平均降雨量'
  474. },
  475. subtitle: {
  476. text: '数据来源: WorldClimate.com'
  477. },
  478. xAxis: {
  479. tickInterval: 1000, // 坐标轴刻度间隔为一星期
  480. tickWidth: 0,
  481. gridLineWidth: 1,
  482. // 时间格式化字符
  483. // 默认会根据当前的刻度间隔取对应的值,即当刻度间隔为一周时,取 week 值
  484. dateTimeLabelFormats: {
  485. week: '%Y-%m-%d'
  486. }
  487. },
  488. yAxis: {
  489. // min: 0,
  490. // title: {
  491. // text: '降雨量 (mm)'
  492. // }
  493. },
  494. tooltip: {
  495. // head + 每个 point + footer 拼接成完整的 table
  496. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  497. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  498. '<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
  499. footerFormat: '</table>',
  500. shared: true,
  501. useHTML: true
  502. },
  503. plotOptions: {
  504. column: {
  505. borderWidth: 0
  506. }
  507. },
  508. series: [{
  509. name: '东京',
  510. data: shuju
  511. }]
  512. });
  513. }
  514. setInterval(lll,100);
  515. function lll() {
  516. }
  517. get_data("la.anyone.alldata", showAllData);
  518. function showAllData(shuju){
  519. var htmlbody = "";
  520. var i = 0;
  521. for(i=0; i < shuju.length; i++){
  522. var one_person = shuju[i];
  523. htmlbody += "<tr>";
  524. htmlbody += " <tr>\n" +
  525. " <td>"+one_person.name+"("+one_person.id+")</td>\n" +
  526. " <td>"+one_person.approve+"</td>\n" +
  527. " <td>"+one_person.decline+"</td>\n" +
  528. " <td>"+one_person.Accumulate+"</td>\n" +
  529. " <td>"+one_person.worktime+"</td>\n" +
  530. " <td>\n" +
  531. " <div class=\"progress\">\n" +
  532. " <div class=\"progress-bar bg-green\" role=\"progressbar\" aria-valuenow=\"62\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 62%\"></div>\n" +
  533. " </div>\n" +
  534. " </td>\n" +
  535. " </tr>";
  536. htmlbody += "</tr>";
  537. }
  538. $("#rank-one").html(htmlbody);
  539. }
  540. </script>
  541. <script>
  542. var chart = Highcharts.chart('container0', {
  543. title: {
  544. text: '产能'
  545. },
  546. /*subtitle: {
  547. text: '普通的'
  548. },*/
  549. xAxis: {
  550. categories: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
  551. },
  552. series: [{
  553. type: 'column',
  554. colorByPoint: true,
  555. data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
  556. showInLegend: false
  557. }]
  558. });
  559. </script>
  560. <script>
  561. var chart = Highcharts.chart('container1', {
  562. title: {
  563. text: '合格数'
  564. },
  565. /* subtitle: {
  566. text: '数据来源:thesolarfoundation.com'
  567. },*/
  568. yAxis: {
  569. title: {
  570. text: '就业人数'
  571. }
  572. },
  573. legend: {
  574. layout: 'vertical',
  575. align: 'right',
  576. verticalAlign: 'middle'
  577. },
  578. plotOptions: {
  579. series: {
  580. label: {
  581. connectorAllowed: false
  582. },
  583. pointStart: 2010
  584. }
  585. },
  586. series: [{
  587. name: '安装,实施人员',
  588. data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
  589. }, {
  590. name: '工人',
  591. data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
  592. }, {
  593. name: '销售',
  594. data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
  595. }, {
  596. name: '项目开发',
  597. data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227]
  598. }, {
  599. name: '其他',
  600. data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
  601. }],
  602. responsive: {
  603. rules: [{
  604. condition: {
  605. maxWidth: 500
  606. },
  607. chartOptions: {
  608. legend: {
  609. layout: 'horizontal',
  610. align: 'center',
  611. verticalAlign: 'bottom'
  612. }
  613. }
  614. }]
  615. }
  616. });
  617. </script>
  618. <script>
  619. var chart = Highcharts.chart('container2', {
  620. chart: {
  621. type: 'bar'
  622. },
  623. title: {
  624. text: '不合格数'
  625. },
  626. xAxis: {
  627. categories: ['苹果', '橘子', '梨', '葡萄', '香蕉']
  628. },
  629. yAxis: {
  630. min: 0,
  631. title: {
  632. text: '水果消费总量'
  633. }
  634. },
  635. legend: {
  636. /* 图例显示顺序反转
  637. * 这是因为堆叠的顺序默认是反转的,可以设置
  638. * yAxis.reversedStacks = false 来达到类似的效果
  639. */
  640. reversed: true
  641. },
  642. plotOptions: {
  643. series: {
  644. stacking: 'normal'
  645. }
  646. },
  647. series: [{
  648. name: '小张',
  649. data: [5, 3, 4, 7, 2]
  650. }, {
  651. name: '小彭',
  652. data: [2, 2, 3, 2, 1]
  653. }, {
  654. name: '小潘',
  655. data: [3, 4, 4, 2, 5]
  656. }]
  657. });
  658. </script>
  659. <script>
  660. var chart = Highcharts.chart('container3', {
  661. chart: {
  662. type: 'column'
  663. },
  664. title: {
  665. text: '堆积数'
  666. },
  667. /*subtitle: {
  668. text: '数据截止 2017-03,来源: <a href="https://en.wikipedia.org/wiki/List_of_cities_proper_by_population">Wikipedia</a>'
  669. },*/
  670. xAxis: {
  671. type: 'category',
  672. labels: {
  673. rotation: -45 // 设置轴标签旋转角度
  674. }
  675. },
  676. yAxis: {
  677. min: 0,
  678. title: {
  679. text: '人口 (百万)'
  680. }
  681. },
  682. legend: {
  683. enabled: false
  684. },
  685. tooltip: {
  686. pointFormat: '人口总量: <b>{point.y:.1f} 百万</b>'
  687. },
  688. series: [{
  689. name: '总人口',
  690. data: [
  691. ['上海', 24.25],
  692. ['卡拉奇', 23.50],
  693. ['北京', 21.51],
  694. ['德里', 16.78],
  695. ['拉各斯', 16.06],
  696. ['天津', 15.20],
  697. ['伊斯坦布尔', 14.16],
  698. ['东京', 13.51],
  699. ['广州', 13.08],
  700. ['孟买', 12.44],
  701. ['莫斯科', 12.19],
  702. ['圣保罗', 12.03],
  703. ['深圳', 10.46],
  704. ['雅加达', 10.07],
  705. ['拉合尔', 10.05],
  706. ['首尔', 9.99],
  707. ['武汉', 9.78],
  708. ['金沙萨', 9.73],
  709. ['开罗', 9.27],
  710. ['墨西哥', 8.87]
  711. ],
  712. dataLabels: {
  713. enabled: true,
  714. rotation: -90,
  715. color: '#FFFFFF',
  716. align: 'right',
  717. format: '{point.y:.1f}', // :.1f 为保留 1 位小数
  718. y: 10
  719. }
  720. }]
  721. });
  722. </script>
  723. <script>
  724. var chart = Highcharts.chart('container4', {
  725. chart: {
  726. type: 'line'
  727. },
  728. title: {
  729. text: '工作时长'
  730. },
  731. /*/subtitle: {
  732. text: '数据来源: WorldClimate.com'
  733. },*/
  734. xAxis: {
  735. categories: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
  736. },
  737. yAxis: {
  738. title: {
  739. text: '气温 (°C)'
  740. }
  741. },
  742. plotOptions: {
  743. line: {
  744. dataLabels: {
  745. // 开启数据标签
  746. enabled: true
  747. },
  748. // 关闭鼠标跟踪,对应的提示框、点击事件会失效
  749. enableMouseTracking: false
  750. }
  751. },
  752. series: [{
  753. name: '东京',
  754. data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
  755. }, {
  756. name: '伦敦',
  757. data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
  758. }]
  759. });
  760. </script>
  761. <script>
  762. var chart = Highcharts.chart('container5', {
  763. chart: {
  764. type: 'column'
  765. },
  766. title: {
  767. text: '不良率'
  768. },
  769. xAxis: {
  770. categories: ['苹果', '橘子', '梨', '葡萄', '香蕉']
  771. },
  772. yAxis: {
  773. min: 0,
  774. title: {
  775. text: '水果消费总量'
  776. }
  777. },
  778. tooltip: {
  779. pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b>' +
  780. '({point.percentage:.0f}%)<br/>',
  781. //:.0f 表示保留 0 位小数,详见教程:https://www.hcharts.cn/docs/basic-labels-string-formatting
  782. shared: true
  783. },
  784. plotOptions: {
  785. column: {
  786. stacking: 'percent'
  787. }
  788. },
  789. series: [{
  790. name: '小张',
  791. data: [5, 3, 4, 7, 2]
  792. }, {
  793. name: '小彭',
  794. data: [2, 2, 3, 2, 1]
  795. }, {
  796. name: '小潘',
  797. data: [3, 4, 4, 2, 5]
  798. }]
  799. });
  800. </script>
  801. </body>
  802. </html>