example.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <!DOCTYPE html>
  2. <html lang="en">
  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="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  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.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. <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
  26. <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  27. <script src="https://cdn.bootcss.com/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
  28. <script src="https://cdn.bootcss.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  29. <link rel="stylesheet" href="http://jqueryui.com/resources/demos/style.css">
  30. <link rel="icon" href="https://static.jianshukeji.com/highcharts/images/favicon.ico">
  31. <meta name="viewport" content="width=device-width, initial-scale=1">
  32. <style>
  33. /* css 代码 */
  34. </style>
  35. <script src="https://img.hcharts.cn/highcharts/highcharts.js"></script>
  36. <script src="https://img.hcharts.cn/highcharts/modules/exporting.js"></script>
  37. <script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
  38. </head>
  39. <body>
  40. <div class="row">
  41. <div class=" col-lg-3 col-md-3 col-sm-6 col-xs-12">
  42. <div class="info-box bg-pink " onclick="addContent1()" >
  43. 合格数
  44. <script>
  45. function addContent1(){
  46. $('a[href="#home"]').tab('show');
  47. }
  48. </script>
  49. </div>
  50. </div>
  51. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  52. <div class="info-box bg-cyan "onclick="addContent2()">
  53. 不合格数
  54. <script>
  55. function addContent2(){
  56. $('a[href="#profile"]').tab('show');
  57. }
  58. </script>
  59. </div>
  60. </div>
  61. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  62. <div class="info-box bg-light-green " onclick="addContent3()">
  63. 堆积数
  64. <script>
  65. function addContent3(){
  66. $('a[href="#contact"]').tab('show');
  67. }
  68. </script>
  69. </div>
  70. </div>
  71. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  72. <div class="info-box bg-orange " onclick="addContent4()">
  73. 工作时长
  74. <script>
  75. function addContent4(){
  76. $('a[href="#time"]').tab('show');
  77. }
  78. </script>
  79. </div>
  80. </div>
  81. </div>
  82. <div>
  83. <ul class="nav nav-tabs" id="myTab" role="tablist" style="display: none">
  84. <li class="nav-item">
  85. <a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a>
  86. </li>
  87. <li class="nav-item">
  88. <a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Profile</a>
  89. </li>
  90. <li class="nav-item">
  91. <a class="nav-link" id="contact-tab" data-toggle="tab" href="#contact" role="tab" aria-controls="contact" aria-selected="false">Contact</a>
  92. </li>
  93. <li class="nav-item">
  94. <a class="nav-link" id="time-tab" data-toggle="tab" href="#time" role="tab" aria-controls="time" aria-selected="false">Time</a>
  95. </li>
  96. </ul>
  97. <div class="tab-content" id="myTabContent">
  98. <div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
  99. <div id="container1"class="text-center" style="width: 50%;height:400px;margin: 0 auto"></div>
  100. </div>
  101. <div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
  102. <div id="container2" style="width:50%;height:400px;margin: 0 auto"></div>
  103. </div>
  104. <div class="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">
  105. <div id="container3" style="width:50%;height:400px;margin: 0 auto"></div>
  106. </div>
  107. <div class="tab-pane fade" id="time" role="tabpanel" aria-labelledby="contact-tab">
  108. <div id="container4" style="width:50%;height:400px;margin: 0 auto"></div>
  109. </div>
  110. </div>
  111. </div>
  112. <script>
  113. var chart = Highcharts.chart('container2',{
  114. chart: {
  115. type: 'column'
  116. },
  117. title: {
  118. text: '月平均降雨量'
  119. },
  120. subtitle: {
  121. text: '数据来源: WorldClimate.com'
  122. },
  123. xAxis: {
  124. categories: [
  125. '一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'
  126. ],
  127. crosshair: true
  128. },
  129. yAxis: {
  130. min: 0,
  131. title: {
  132. text: '降雨量 (mm)'
  133. }
  134. },
  135. tooltip: {
  136. // head + 每个 point + footer 拼接成完整的 table
  137. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  138. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  139. '<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
  140. footerFormat: '</table>',
  141. shared: true,
  142. useHTML: true
  143. },
  144. plotOptions: {
  145. column: {
  146. borderWidth: 0
  147. }
  148. },
  149. series: [{
  150. name: '东京',
  151. data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
  152. }, {
  153. name: '纽约',
  154. data: [83.6, 78.8, 98.5, 93.4, 106.0, 84.5, 105.0, 104.3, 91.2, 83.5, 106.6, 92.3]
  155. }, {
  156. name: '伦敦',
  157. data: [48.9, 38.8, 39.3, 41.4, 47.0, 48.3, 59.0, 59.6, 52.4, 65.2, 59.3, 51.2]
  158. }, {
  159. name: '柏林',
  160. data: [42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 39.1, 46.8, 51.1]
  161. }]
  162. });
  163. </script>
  164. <script>
  165. var chart = Highcharts.chart('container1', {
  166. chart: {
  167. type: 'bar'
  168. },
  169. title: {
  170. text: '堆叠条形图'
  171. },
  172. xAxis: {
  173. categories: ['苹果', '橘子', '梨', '葡萄', '香蕉']
  174. },
  175. yAxis: {
  176. min: 0,
  177. title: {
  178. text: '水果消费总量'
  179. }
  180. },
  181. legend: {
  182. /* 图例显示顺序反转
  183. * 这是因为堆叠的顺序默认是反转的,可以设置
  184. * yAxis.reversedStacks = false 来达到类似的效果
  185. */
  186. reversed: true
  187. },
  188. plotOptions: {
  189. series: {
  190. stacking: 'normal'
  191. }
  192. },
  193. series: [{
  194. name: '小张',
  195. data: [5, 3, 4, 7, 2]
  196. }, {
  197. name: '小彭',
  198. data: [2, 2, 3, 2, 1]
  199. }, {
  200. name: '小潘',
  201. data: [3, 4, 4, 2, 5]
  202. }]
  203. });
  204. </script>
  205. <script>
  206. var chart = Highcharts.chart('container3', {
  207. chart: {
  208. type: 'column'
  209. },
  210. title: {
  211. text: '全球各大城市人口排行'
  212. },
  213. subtitle: {
  214. text: '数据截止 2017-03,来源: <a href="https://en.wikipedia.org/wiki/List_of_cities_proper_by_population">Wikipedia</a>'
  215. },
  216. xAxis: {
  217. type: 'category',
  218. labels: {
  219. rotation: -45 // 设置轴标签旋转角度
  220. }
  221. },
  222. yAxis: {
  223. min: 0,
  224. title: {
  225. text: '人口 (百万)'
  226. }
  227. },
  228. legend: {
  229. enabled: false
  230. },
  231. tooltip: {
  232. pointFormat: '人口总量: <b>{point.y:.1f} 百万</b>'
  233. },
  234. series: [{
  235. name: '总人口',
  236. data: [
  237. ['上海', 24.25],
  238. ['卡拉奇', 23.50],
  239. ['北京', 21.51],
  240. ['德里', 16.78],
  241. ['拉各斯', 16.06],
  242. ['天津', 15.20],
  243. ['伊斯坦布尔', 14.16],
  244. ['东京', 13.51],
  245. ['广州', 13.08],
  246. ['孟买', 12.44],
  247. ['莫斯科', 12.19],
  248. ['圣保罗', 12.03],
  249. ['深圳', 10.46],
  250. ['雅加达', 10.07],
  251. ['拉合尔', 10.05],
  252. ['首尔', 9.99],
  253. ['武汉', 9.78],
  254. ['金沙萨', 9.73],
  255. ['开罗', 9.27],
  256. ['墨西哥', 8.87]
  257. ],
  258. dataLabels: {
  259. enabled: true,
  260. rotation: -90,
  261. color: '#FFFFFF',
  262. align: 'right',
  263. format: '{point.y:.1f}', // :.1f 为保留 1 位小数
  264. y: 10
  265. }
  266. }]
  267. });
  268. </script>
  269. <script>
  270. var chart = Highcharts.chart('container4', {
  271. chart: {
  272. type: 'line'
  273. },
  274. title: {
  275. text: '月平均气温'
  276. },
  277. subtitle: {
  278. text: '数据来源: WorldClimate.com'
  279. },
  280. xAxis: {
  281. categories: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
  282. },
  283. yAxis: {
  284. title: {
  285. text: '气温 (°C)'
  286. }
  287. },
  288. plotOptions: {
  289. line: {
  290. dataLabels: {
  291. // 开启数据标签
  292. enabled: true
  293. },
  294. // 关闭鼠标跟踪,对应的提示框、点击事件会失效
  295. enableMouseTracking: false
  296. }
  297. },
  298. series: [{
  299. name: '东京',
  300. 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]
  301. }, {
  302. name: '伦敦',
  303. 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]
  304. }]
  305. });
  306. </script>
  307. </body>
  308. </html>