index.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. //大屏
  2. $(function(){
  3. $("body").click(function(){
  4. $(".depo_down").slideUp();
  5. })
  6. $(".depot").click(function(e){
  7. e.stopPropagation();
  8. if($(this).hasClass("active")){
  9. $(this).removeClass("active");
  10. $(".depo_down").slideUp();
  11. }else{
  12. $(this).addClass("active");
  13. $(".depo_down").slideDown();
  14. }
  15. })
  16. $(".depo_down li").click(function(){
  17. var tex=$(this).text();
  18. $(".depot input").val(tex);
  19. })
  20. //选择仓库
  21. laydate.render({
  22. elem: '#time_star'
  23. ,type: 'datetime'
  24. });
  25. laydate.render({
  26. elem: '#time_end'
  27. ,type: 'datetime'
  28. });
  29. //时间
  30. var myChart1 =echarts.init(document.getElementById('home_today'));
  31. var option1 = {
  32. backgroundColor: '#1b1e25',
  33. title: {
  34. text: ''
  35. },
  36. tooltip: {
  37. enterable:true,
  38.         trigger: 'axis'
  39. },
  40. grid: {
  41. left: '3%',
  42. right: '3%',
  43. top: '10%',
  44. bottom:"2%",
  45. containLabel: true
  46. },
  47. xAxis : [
  48. {
  49. axisLine:{
  50. lineStyle:{
  51. color:'#3e4148',
  52. width:1,//这里是为了突出显示加上的
  53. }
  54. },
  55. type : 'category',
  56. boundaryGap : false,
  57. data : ['0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23']
  58. }
  59. ],
  60. yAxis : [
  61. {
  62. splitLine:{
  63. lineStyle:{
  64. color: '#21242b',
  65. }
  66. },
  67. type : 'value',
  68. axisLine:{
  69. lineStyle:{
  70. color:'#43484e',
  71. width:0,//这里是为了突出显示加上的
  72. }
  73. }
  74. }
  75. ],
  76. series : [
  77. {
  78. name:'新增单量',
  79. type:'line',
  80. symbol:'none',
  81. data:[50, 132,40, 1500, 2000, 800, 210,100],
  82. smooth: true,
  83. itemStyle : {
  84. normal : {
  85. lineStyle:{
  86. color:'#533d86'
  87. }
  88. }
  89. },
  90. areaStyle: {normal: { color: ['rgba(255,255,255,0.1)']}},
  91. },
  92. {
  93. name:'拣选单量',
  94. type:'line',
  95. symbol:'none',
  96. data:[2, 8, 500, 2000,200,100, 50,50],
  97. smooth: true,
  98. itemStyle : {
  99. normal : {
  100. lineStyle:{
  101. color:'#60ba9e'
  102. }
  103. }
  104. },
  105. areaStyle: {normal: { color: ['rgba(255,255,255,0.1)']}},
  106. },
  107. {
  108. name:'质检单量',
  109. type:'line',
  110. symbol:'none',
  111. data:[150, 500, 530, 1500, 1000, 330, 410,60],
  112. smooth: true,
  113. itemStyle : {
  114. normal : {
  115. lineStyle:{
  116. color:'#476d9e'
  117. }
  118. }
  119. },
  120. areaStyle: {normal: { color: ['rgba(255,255,255,0.1)']}},
  121. },
  122. {
  123. name:'出库单量',
  124. type:'line',
  125. symbol:'none',
  126. data:[800, 400, 1500, 1200, 800, 700, 600,200],
  127. smooth: true,
  128. itemStyle : {
  129. normal : {
  130. lineStyle:{
  131. color:'#b1526a'
  132. }
  133. }
  134. },
  135. areaStyle: {normal: { color: ['rgba(255,255,255,0.1)']}},
  136. }
  137. ]
  138. };
  139. var myChart2 =echarts.init(document.getElementById('ship_order'));
  140. var option2 = {
  141. backgroundColor: '#1b1e25',
  142. title: {
  143. text: '货主订单执行情况',
  144. textStyle:{ //设置主标题风格
  145. color:'#ffffff',//设置主标题字体颜色
  146. fontSize:'14px',
  147. },
  148. subtext: '货主1 货主2 货主3 货主4 货主5 货主6 货主7',
  149. subtextStyle: {
  150. color: '#ffffff' // 副标题文字颜色
  151. }
  152. },
  153. color: ['#ed4b97', '#26a0c9', '#44cb90', '#d2bd7a'],
  154. tooltip: {},
  155. legend: {
  156. data: ['未开始', '作业中', '出库', '拦截'],
  157. textStyle: {
  158. color: '#ffffff'
  159. },
  160. right: 10,
  161. itemWidth: 10,
  162. itemHeight: 10
  163. },
  164. calculable: true,
  165. grid: {
  166. left: '3%',
  167. right: '3%',
  168. bottom:"20",
  169. containLabel: true
  170. },
  171. xAxis: [
  172. {
  173. type: 'category',
  174. axisTick: {show: false},
  175. data: ['货主1', '货主2', '货主3', '货主4', '货主5','货主6','货主7'],
  176. "axisLabel":{
  177. interval: 0
  178. },
  179. axisLine:{
  180. lineStyle:{
  181. color:'#ffffff',
  182. width:1,//这里是为了突出显示加上的
  183. }
  184. },
  185. }
  186. ],
  187. dataZoom: [{
  188.                      type: 'slider',
  189.                      show: true, //flase直接隐藏图形
  190.                      xAxisIndex: [0],
  191.                      left: '9%', //滚动条靠左侧的百分比
  192.                      bottom: -5,
  193. height: 15,
  194.                      start: 0,//滚动条的起始位置
  195.                      end: 50
  196.          }] ,
  197. yAxis: [
  198. {
  199. splitLine:{
  200. lineStyle:{
  201. color: '#21242b',
  202. }
  203. },
  204. type: 'value',
  205. axisLine:{
  206. lineStyle:{
  207. color:'#43484e',
  208. width:0,//这里是为了突出显示加上的
  209. }
  210. }
  211. }
  212. ],
  213. series: [
  214. {
  215. name: '未开始',
  216. type: 'bar',
  217. barGap: 0.2,
  218. data: [320, 332,310,200,222,40,300]
  219. },
  220. {
  221. name: '作业中',
  222. type: 'bar',
  223. data: [130, 182,30,50,122,20,30]
  224. },
  225. {
  226. name: '出库',
  227. type: 'bar',
  228. data: [320, 82,220,250,322,50,10]
  229. },
  230. {
  231. name: '拦截',
  232. type: 'bar',
  233. data: [100, 182,120,100,22,100,30]
  234. }
  235. ]
  236. };
  237. var myChart3 =echarts.init(document.getElementById('imple'));
  238. var option3 = {
  239. grid: {
  240. left: '3%',
  241. right: '3%',
  242. top: '10%',
  243. bottom:"2%",
  244. containLabel: true
  245. },
  246. title: {
  247. text: '订单执行情况',
  248. textStyle:{ //设置主标题风格
  249. color:'#90939a',//设置主标题字体颜色
  250. fontSize:'14px',
  251. },
  252. },
  253. backgroundColor: '#1b1e25',
  254. tooltip: {
  255. trigger: 'item',
  256. formatter: " {b}:{d}%"
  257. },
  258. legend: {
  259. orient: 'vertical',
  260. right: 10,
  261. y:'center',
  262. textStyle: {
  263. color: '#7c8081'
  264. },
  265. itemWidth: 10,
  266. itemHeight: 10,
  267. data:['未开始','波次','拣选','质检','拦截','出库'],
  268. formatter: function (params) {
  269. for (var i = 0; i < option3.series[0].data.length; i++) {
  270. if (option3.series[0].data[i].name == params) {
  271. return params +":"+ option3.series[0].data[i].value;
  272. }
  273. }
  274. }
  275. },
  276. series: [
  277. {
  278. name:'订单执行情况',
  279. type:'pie',
  280. radius: ['50%', '70%'],
  281. avoidLabelOverlap: false,
  282. label: {
  283. normal: {
  284. show: false,
  285. position: 'center'
  286. },
  287. emphasis: {
  288. show: true,
  289. textStyle: {
  290. fontSize: '20',
  291. fontWeight: 'bold'
  292. }
  293. }
  294. },
  295. labelLine: {
  296. normal: {
  297. show: false
  298. }
  299. },
  300. data:[
  301. {value:734, name:'未开始'},
  302. {value:260, name:'波次'},
  303. {value:62, name:'拣选'},
  304. {value:294, name:'质检'},
  305. {value:5376, name:'拦截'},
  306. {value:17672, name:'出库'}
  307. ],
  308. itemStyle: {
  309. emphasis: {
  310. shadowBlur: 10,
  311. shadowOffsetX: 0,
  312. shadowColor: 'rgba(0, 0, 0, 0.5)'
  313. },
  314. normal:{
  315. color:function(params) {
  316. //自定义颜色
  317. var colorList = [
  318. '#74529e', '#da8f3c', '#447cb7', '#be4868', '#4dc892', '#efbb43',
  319. ];
  320. return colorList[params.dataIndex]
  321. }
  322. }
  323. }
  324. }
  325. ]
  326. };
  327. var setoption=function(){
  328. myChart1.setOption(option1);//今日作业趋势
  329. myChart2.setOption(option2);//货主订单执行情况
  330. myChart3.setOption(option3);//订单执行情况
  331. }
  332. setoption()
  333. $(window).resize(function(){
  334. myChart1.resize();
  335. myChart2.resize();
  336. myChart3.resize();
  337. })
  338. $(".abort_list").niceScroll({
  339. cursorcolor: "rgba(255,255,255,0.2)", //#CC0071 光标颜色
  340. cursoropacitymax: 1, //改变不透明度非常光标处于活动状态(scrollabar“可见”状态),范围从1到0
  341. touchbehavior: false, //使光标拖动滚动像在台式电脑触摸设备
  342. cursorwidth: "6px", //像素光标的宽度
  343. cursorborder: "0", // 游标边框css定义
  344. cursorborderradius: "5px", //以像素为光标边界半径
  345. autohidemode:true //是否隐藏滚动条
  346. });
  347. $(".situ_list").niceScroll({
  348. cursorcolor: "rgba(255,255,255,0.2)", //#CC0071 光标颜色
  349. cursoropacitymax: 1, //改变不透明度非常光标处于活动状态(scrollabar“可见”状态),范围从1到0
  350. touchbehavior: false, //使光标拖动滚动像在台式电脑触摸设备
  351. cursorwidth: "6px", //像素光标的宽度
  352. cursorborder: "0", // 游标边框css定义
  353. cursorborderradius: "5px", //以像素为光标边界半径
  354. autohidemode:true //是否隐藏滚动条
  355. });
  356. //滚动条
  357. $(".situ_use li").each(function(){
  358. var all_num=parseInt($(this).find(".lal_num").text());
  359. var at_num=parseInt($(this).find(".quan_num").text());
  360. var len=(at_num/all_num)*100+'%';
  361. $(this).find(".tity").css({"width":len})
  362. })
  363. //上一小时作业情况
  364. })