eleFireInner.js 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216
  1. /*
  2. 电气火灾打印页面 echarts配置 及打印
  3. */
  4. // 数据离散率挖掘1
  5. (function() {
  6. var sortData = [{
  7. sortName: "三相电压",
  8. data: [
  9. [30, 35, 36, 40, 120, 230, 210, 120, 213, 180, 200, 180, 79, 191, 324, 200, 180, 79, 82, 64, 43, 60, 19, 82, 64, 43, 60, 19, 34],
  10. [123, 175, 112, 197, 121, 67, 98, 21, 43, 64, 76, 38, 24, 52, 26, 27, 30, 35, 36, 40, 120, 230, 210, 120, 213, 180, 200, 180, 79, 191, 324, ],
  11. [400, 64, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 9, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 82, 64, 79, 82, 64, 4]
  12. ]
  13. }, ];
  14. var xData = function() {
  15. var data = [];
  16. for (var i = 1; i < 31; i++) {
  17. data.push(i);
  18. }
  19. return data;
  20. }();
  21. // 1. 实例化对象
  22. var myChart = echarts.init(document.querySelector("#divergenceChart1"));
  23. // 2.指定配置
  24. var option = {
  25. color: [{
  26. colorStops: [{
  27. offset: 0,
  28. color: '#F9860C' // 0% 处的颜色
  29. }, {
  30. offset: 1,
  31. color: '#fff' // 100% 处的颜色
  32. }],
  33. },
  34. {
  35. colorStops: [{
  36. offset: 0,
  37. color: '#07E1F1' // 0% 处的颜色
  38. }, {
  39. offset: 1,
  40. color: '#0456CB' // 100% 处的颜色
  41. }],
  42. },
  43. {
  44. colorStops: [{
  45. offset: 0,
  46. color: '#11F90C' // 0% 处的颜色
  47. }, {
  48. offset: 1,
  49. color: '#3FC713' // 100% 处的颜色
  50. }],
  51. }
  52. ],
  53. tooltip: {
  54. trigger: "axis",
  55. textStyle: {
  56. align: 'left' //图例左对齐
  57. },
  58. backgroundColor: '#12DFE0',
  59. formatter: '{a0}: {c0}<br />{a1}: {c1}<br />{a2}: {c2}<br />时间:2021年3月{b}日'
  60. },
  61. legend: {
  62. // 如果series 对象有name 值,则 legend可以不用写data
  63. itemGap: 20,
  64. itemHeight: 2,
  65. itemWidth: 15,
  66. icon: 'rect',
  67. textStyle: {
  68. color: "#aaa"
  69. },
  70. top: "bottom",
  71. },
  72. grid: {
  73. top: "0%",
  74. left: "1%",
  75. right: "1%",
  76. bottom: "15%",
  77. show: true, // 显示边框
  78. borderWidth: '0', //去除边框
  79. containLabel: true // 包含刻度文字在内
  80. },
  81. xAxis: {
  82. type: "category",
  83. boundaryGap: false,
  84. data: xData,
  85. axisTick: {
  86. show: false // 去除刻度线
  87. },
  88. axisLabel: {
  89. color: "#AADDFF" // 文本颜色
  90. },
  91. axisLine: {
  92. lineStyle: {
  93. color: 'rgba(255,255,255,.3)'
  94. }
  95. },
  96. splitLine: {
  97. show: false
  98. },
  99. splitArea: {
  100. show: true,
  101. areaStyle: {
  102. color: ["rgba(250,250,250,0.05)", "rgba(250,250,250,0.0)"]
  103. }
  104. }
  105. },
  106. yAxis: {
  107. splitNumber: 8,
  108. type: "value",
  109. axisTick: {
  110. show: false // 去除刻度线
  111. },
  112. axisLabel: {
  113. show: false // 去除文本
  114. },
  115. axisLine: {
  116. show: false // 去除轴线
  117. },
  118. splitLine: {
  119. lineStyle: {
  120. color: "#012f4a", // 分割线颜色
  121. opacity: .2
  122. }
  123. }
  124. },
  125. series: [{
  126. symbol: "none",
  127. name: "方差",
  128. type: "line",
  129. data: sortData[0].data[0]
  130. },
  131. {
  132. symbol: "none",
  133. name: "标准差",
  134. type: "line",
  135. data: sortData[0].data[1]
  136. }, {
  137. symbol: "none",
  138. name: "平均值",
  139. type: "line",
  140. data: sortData[0].data[2]
  141. }
  142. ]
  143. };
  144. myChart.setOption(option);
  145. //echarts赋值到src
  146. var img1 = document.getElementById('divergenceChart1_img');
  147. setTimeout(function() {
  148. img1.src = myChart.getDataURL();
  149. }, 1000)
  150. })();
  151. // 数据离散率挖掘2
  152. (function() {
  153. var sortData = [{
  154. sortName: "三相电流",
  155. data: [
  156. // 两个数组是因为有两条线
  157. [143, 19, 34, 40, 64, 191, 324, 290, 330, 310, 131, 165, 123, 178, 21, 82, 64, 43, 60, 213, 180, 200, 180, 79, 9, 191, 324, 290, 330, 310, 213, 180, ],
  158. [24, 52, 26, 27, 30, 35, 36, 40, 120, 230, 210, 120, 213, 180, 200, 180, 79, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 82, 64, 43, 60, 19, 34],
  159. [40, 64, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 9, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 82, 64, 79, 82, 64, 4]
  160. ]
  161. },
  162. ];
  163. var xData = function() {
  164. var data = [];
  165. for (var i = 1; i < 31; i++) {
  166. data.push(i);
  167. }
  168. return data;
  169. }();
  170. // 1. 实例化对象
  171. var myChart = echarts.init(document.querySelector("#divergenceChart2"));
  172. // 2.指定配置
  173. var option = {
  174. color: [{
  175. colorStops: [{
  176. offset: 0,
  177. color: '#F9860C' // 0% 处的颜色
  178. }, {
  179. offset: 1,
  180. color: '#fff' // 100% 处的颜色
  181. }],
  182. },
  183. {
  184. colorStops: [{
  185. offset: 0,
  186. color: '#07E1F1' // 0% 处的颜色
  187. }, {
  188. offset: 1,
  189. color: '#0456CB' // 100% 处的颜色
  190. }],
  191. },
  192. {
  193. colorStops: [{
  194. offset: 0,
  195. color: '#11F90C' // 0% 处的颜色
  196. }, {
  197. offset: 1,
  198. color: '#3FC713' // 100% 处的颜色
  199. }],
  200. }
  201. ],
  202. tooltip: {
  203. trigger: "axis",
  204. textStyle: {
  205. align: 'left' //图例左对齐
  206. },
  207. backgroundColor: '#12DFE0',
  208. formatter: '{a0}: {c0}<br />{a1}: {c1}<br />{a2}: {c2}<br />时间:2021年3月{b}日'
  209. },
  210. legend: {
  211. // 如果series 对象有name 值,则 legend可以不用写data
  212. itemGap: 20,
  213. itemHeight: 2,
  214. itemWidth: 15,
  215. icon: 'rect',
  216. textStyle: {
  217. color: "#aaa"
  218. },
  219. top: "bottom",
  220. },
  221. grid: {
  222. top: "0%",
  223. left: "1%",
  224. right: "1%",
  225. bottom: "15%",
  226. show: true, // 显示边框
  227. borderWidth: '0', //去除边框
  228. containLabel: true // 包含刻度文字在内
  229. },
  230. xAxis: {
  231. type: "category",
  232. boundaryGap: false,
  233. data: xData,
  234. axisTick: {
  235. show: false // 去除刻度线
  236. },
  237. axisLabel: {
  238. color: "#AADDFF" // 文本颜色
  239. },
  240. axisLine: {
  241. lineStyle: {
  242. color: 'rgba(255,255,255,.3)'
  243. }
  244. },
  245. splitNumber: 8,
  246. splitLine: {
  247. show: false
  248. },
  249. splitArea: {
  250. show: true,
  251. areaStyle: {
  252. color: ["rgba(250,250,250,0.05)", "rgba(250,250,250,0.0)"]
  253. }
  254. }
  255. },
  256. yAxis: {
  257. type: "value",
  258. splitNumber: 8,
  259. axisTick: {
  260. show: false // 去除刻度线
  261. },
  262. axisLabel: {
  263. show: false // 去除文本
  264. },
  265. axisLine: {
  266. show: false // 去除轴线
  267. },
  268. splitLine: {
  269. lineStyle: {
  270. color: "#012f4a", // 分割线颜色
  271. opacity: .2
  272. }
  273. }
  274. },
  275. series: [{
  276. symbol: "none",
  277. name: "方差",
  278. type: "line",
  279. data: sortData[0].data[0]
  280. },
  281. {
  282. symbol: "none",
  283. name: "标准差",
  284. type: "line",
  285. data: sortData[0].data[1]
  286. }, {
  287. symbol: "none",
  288. name: "平均值",
  289. type: "line",
  290. data: sortData[0].data[2]
  291. }
  292. ]
  293. };
  294. myChart.setOption(option);
  295. //echarts赋值到src
  296. var img1 = document.getElementById('divergenceChart2_img');
  297. setTimeout(function() {
  298. img1.src = myChart.getDataURL();
  299. }, 1000)
  300. })();
  301. // 数据离散率挖掘3
  302. (function() {
  303. var sortData = [{
  304. sortName: "三相电流",
  305. data: [
  306. // 两个数组是因为有两条线
  307. [24, 52, 26, 27, 30, 35, 36, 40, 120, 230, 210, 120, 213, 180, 200, 180, 79, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 82, 64, 43, 60, 19, 34],
  308. [123, 175, 112, 197, 121, 67, 98, 21, 43, 64, 76, 38, 24, 52, 26, 27, 30, 35, 36, 40, 120, 230, 210, 120, 213, 180, 200, 180, 79, 191, 324, ],
  309. [131, 165, 123, 178, 21, 82, 64, 43, 60, 82, 64, 43, 60, 19, 34, 40, 64, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 9, 191, 324, 290, 330, 310, 213, 180, ]
  310. ]
  311. },
  312. ];
  313. var xData = function() {
  314. var data = [];
  315. for (var i = 1; i < 31; i++) {
  316. data.push(i);
  317. }
  318. return data;
  319. }();
  320. // 1. 实例化对象
  321. var myChart = echarts.init(document.querySelector("#divergenceChart3"));
  322. // 2.指定配置
  323. var option = {
  324. color: [{
  325. colorStops: [{
  326. offset: 0,
  327. color: '#F9860C' // 0% 处的颜色
  328. }, {
  329. offset: 1,
  330. color: '#fff' // 100% 处的颜色
  331. }],
  332. },
  333. {
  334. colorStops: [{
  335. offset: 0,
  336. color: '#07E1F1' // 0% 处的颜色
  337. }, {
  338. offset: 1,
  339. color: '#0456CB' // 100% 处的颜色
  340. }],
  341. },
  342. {
  343. colorStops: [{
  344. offset: 0,
  345. color: '#11F90C' // 0% 处的颜色
  346. }, {
  347. offset: 1,
  348. color: '#3FC713' // 100% 处的颜色
  349. }],
  350. }
  351. ],
  352. tooltip: {
  353. trigger: "axis",
  354. textStyle: {
  355. align: 'left' //图例左对齐
  356. },
  357. backgroundColor: '#12DFE0',
  358. formatter: '{a0}: {c0}<br />{a1}: {c1}<br />{a2}: {c2}<br />时间:2021年3月{b}日'
  359. },
  360. legend: {
  361. // 如果series 对象有name 值,则 legend可以不用写data
  362. itemGap: 20,
  363. itemHeight: 2,
  364. itemWidth: 15,
  365. icon: 'rect',
  366. textStyle: {
  367. color: "#aaa"
  368. },
  369. top: "bottom",
  370. },
  371. grid: {
  372. top: "0%",
  373. left: "1%",
  374. right: "1%",
  375. bottom: "15%",
  376. show: true, // 显示边框
  377. borderWidth: '0', //去除边框
  378. containLabel: true // 包含刻度文字在内
  379. },
  380. xAxis: {
  381. type: "category",
  382. boundaryGap: false,
  383. data: xData,
  384. axisTick: {
  385. show: false // 去除刻度线
  386. },
  387. axisLabel: {
  388. color: "#AADDFF" // 文本颜色
  389. },
  390. axisLine: {
  391. lineStyle: {
  392. color: 'rgba(255,255,255,.3)'
  393. }
  394. },
  395. splitNumber: 8,
  396. splitLine: {
  397. show: false
  398. },
  399. splitArea: {
  400. show: true,
  401. areaStyle: {
  402. color: ["rgba(250,250,250,0.05)", "rgba(250,250,250,0.0)"]
  403. }
  404. }
  405. },
  406. yAxis: {
  407. type: "value",
  408. axisTick: {
  409. show: false // 去除刻度线
  410. },
  411. axisLabel: {
  412. show: false // 去除文本
  413. },
  414. axisLine: {
  415. show: false // 去除轴线
  416. },
  417. splitLine: {
  418. lineStyle: {
  419. color: "#012f4a", // 分割线颜色
  420. opacity: .2
  421. }
  422. }
  423. },
  424. series: [{
  425. symbol: "none",
  426. name: "方差",
  427. type: "line",
  428. data: sortData[0].data[0]
  429. },
  430. {
  431. symbol: "none",
  432. name: "标准差",
  433. type: "line",
  434. data: sortData[0].data[1]
  435. }, {
  436. symbol: "none",
  437. name: "平均值",
  438. type: "line",
  439. data: sortData[0].data[2]
  440. }
  441. ]
  442. };
  443. myChart.setOption(option);
  444. //echarts赋值到src
  445. var img1 = document.getElementById('divergenceChart3_img');
  446. setTimeout(function() {
  447. img1.src = myChart.getDataURL();
  448. }, 1000)
  449. })();
  450. // 数据离散率挖掘4
  451. (function() {
  452. var sortData = [{
  453. sortName: "三相电流",
  454. data: [
  455. // 两个数组是因为有两条线
  456. [143, 131, 165, 123, 178, 21, 82, 64, 43, 60, 19, 34, 40, 64, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 9, 191, 324, 290, 330, 310, 213, 180, ],
  457. [120, 230, 210, 120, 213, 180, 200, 180, 79, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 82, 64, 43, 60, 19, 34],
  458. [40, 64, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 9, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 82, 64, 79, 82, 64, 4]
  459. ]
  460. },
  461. ];
  462. var xData = function() {
  463. var data = [];
  464. for (var i = 1; i < 31; i++) {
  465. data.push(i);
  466. }
  467. return data;
  468. }();
  469. // 1. 实例化对象
  470. var myChart = echarts.init(document.querySelector("#divergenceChart4"));
  471. // 2.指定配置
  472. var option = {
  473. color: [{
  474. colorStops: [{
  475. offset: 0,
  476. color: '#F9860C' // 0% 处的颜色
  477. }, {
  478. offset: 1,
  479. color: '#fff' // 100% 处的颜色
  480. }],
  481. },
  482. {
  483. colorStops: [{
  484. offset: 0,
  485. color: '#07E1F1' // 0% 处的颜色
  486. }, {
  487. offset: 1,
  488. color: '#0456CB' // 100% 处的颜色
  489. }],
  490. },
  491. {
  492. colorStops: [{
  493. offset: 0,
  494. color: '#11F90C' // 0% 处的颜色
  495. }, {
  496. offset: 1,
  497. color: '#3FC713' // 100% 处的颜色
  498. }],
  499. }
  500. ],
  501. tooltip: {
  502. trigger: "axis",
  503. textStyle: {
  504. align: 'left' //图例左对齐
  505. },
  506. backgroundColor: '#12DFE0',
  507. formatter: '{a0}: {c0}<br />{a1}: {c1}<br />{a2}: {c2}<br />时间:2021年3月{b}日'
  508. },
  509. legend: {
  510. // 如果series 对象有name 值,则 legend可以不用写data
  511. itemGap: 20,
  512. itemHeight: 2,
  513. itemWidth: 15,
  514. icon: 'rect',
  515. textStyle: {
  516. color: "#aaa"
  517. },
  518. top: "bottom",
  519. },
  520. grid: {
  521. top: "0%",
  522. left: "1%",
  523. right: "1%",
  524. bottom: "15%",
  525. show: true, // 显示边框
  526. borderWidth: '0', //去除边框
  527. containLabel: true // 包含刻度文字在内
  528. },
  529. xAxis: {
  530. type: "category",
  531. boundaryGap: false,
  532. data: xData,
  533. axisTick: {
  534. show: false // 去除刻度线
  535. },
  536. axisLabel: {
  537. color: "#AADDFF" // 文本颜色
  538. },
  539. axisLine: {
  540. lineStyle: {
  541. color: 'rgba(255,255,255,.3)'
  542. }
  543. },
  544. splitNumber: 8,
  545. splitLine: {
  546. show: false
  547. },
  548. splitArea: {
  549. show: true,
  550. areaStyle: {
  551. color: ["rgba(250,250,250,0.05)", "rgba(250,250,250,0.0)"]
  552. }
  553. }
  554. },
  555. yAxis: {
  556. type: "value",
  557. axisTick: {
  558. show: false // 去除刻度线
  559. },
  560. axisLabel: {
  561. show: false // 去除文本
  562. },
  563. axisLine: {
  564. show: false // 去除轴线
  565. },
  566. splitLine: {
  567. lineStyle: {
  568. color: "#012f4a", // 分割线颜色
  569. opacity: .2
  570. }
  571. }
  572. },
  573. series: [{
  574. symbol: "none",
  575. name: "方差",
  576. type: "line",
  577. data: sortData[0].data[0]
  578. },
  579. {
  580. symbol: "none",
  581. name: "标准差",
  582. type: "line",
  583. data: sortData[0].data[1]
  584. }, {
  585. symbol: "none",
  586. name: "平均值",
  587. type: "line",
  588. data: sortData[0].data[2]
  589. }
  590. ]
  591. };
  592. myChart.setOption(option);
  593. //echarts赋值到src
  594. var img1 = document.getElementById('divergenceChart4_img');
  595. setTimeout(function() {
  596. img1.src = myChart.getDataURL();
  597. }, 1000)
  598. })();
  599. // 电老化分析1
  600. (function() {
  601. var sortData = [{
  602. sortName: "异常设备",
  603. data: [
  604. // 两个数组是因为有两条线
  605. [24, 52, 26, 27, 30, 35, 36, 40, 120, 230, 210, 120, 213, 180, 200, 180, 79, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 82, 64, 43, 60, 19, 34],
  606. [40, 64, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 9, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 82, 64, 79, 82, 64, 4]
  607. ]
  608. },
  609. ];
  610. var xData = function() {
  611. var data = [];
  612. for (var i = 1; i < 31; i++) {
  613. data.push(i);
  614. }
  615. return data;
  616. }();
  617. // 1. 实例化对象
  618. var myChart = echarts.init(document.querySelector("#oldAnalysisChart1"));
  619. // 2.指定配置
  620. var option = {
  621. color: ["#FF9C00", "#0096FF"], // 通过这个color修改两条线的颜色
  622. tooltip: {
  623. trigger: "axis",
  624. textStyle: {
  625. align: 'left' //图例左对齐
  626. },
  627. backgroundColor: '#12DFE0',
  628. formatter: '{a0}: {c0}<br />{a1}: {c1}<br />时间:2021年3月{b}日'
  629. },
  630. legend: {
  631. // 如果series 对象有name 值,则 legend可以不用写data
  632. itemGap: 20,
  633. itemHeight: 2,
  634. itemWidth: 15,
  635. icon: 'rect',
  636. textStyle: {
  637. color: "#aaa"
  638. },
  639. top: "bottom",
  640. },
  641. grid: {
  642. top: "0%",
  643. left: "1%",
  644. right: "1%",
  645. bottom: "15%",
  646. show: true, // 显示边框
  647. borderWidth: '0', //去除边框
  648. containLabel: true // 包含刻度文字在内
  649. },
  650. xAxis: {
  651. type: "category",
  652. boundaryGap: false,
  653. data: xData,
  654. axisTick: {
  655. show: false // 去除刻度线
  656. },
  657. axisLabel: {
  658. color: "#AADDFF" // 文本颜色
  659. },
  660. axisLine: {
  661. show: false // 去除轴线
  662. }
  663. },
  664. yAxis: {
  665. type: "value",
  666. axisTick: {
  667. show: false // 去除刻度线
  668. },
  669. axisLabel: {
  670. show: false // 去除文本
  671. },
  672. axisLine: {
  673. show: false // 去除轴线
  674. },
  675. splitLine: {
  676. lineStyle: {
  677. color: "#012f4a", // 分割线颜色
  678. opacity: .2
  679. }
  680. }
  681. },
  682. series: [{
  683. symbol: "none",
  684. name: "电流",
  685. type: "line",
  686. smooth: true, // true 可以让我们的折线显示带有弧度
  687. areaStyle: {
  688. normal: {
  689. color: new echarts.graphic.LinearGradient(
  690. 0,
  691. 0,
  692. 0,
  693. 1, [{
  694. offset: 0,
  695. color: "rgba(255,156,0, 0.4)"
  696. },
  697. {
  698. offset: 0.8,
  699. color: "rgba(255,156,0, 0.3)"
  700. }
  701. ],
  702. false
  703. ),
  704. shadowColor: "rgba(0, 0, 0, 0.1)"
  705. }
  706. },
  707. data: sortData[0].data[0]
  708. },
  709. {
  710. symbol: "none",
  711. name: "电压",
  712. type: "line",
  713. smooth: true,
  714. areaStyle: {
  715. normal: {
  716. color: new echarts.graphic.LinearGradient(
  717. 0,
  718. 0,
  719. 0,
  720. 1, [{
  721. offset: 0,
  722. color: "rgba(0,150,255,0.5)"
  723. },
  724. {
  725. offset: 0.8,
  726. color: "rgba(0,150,255, 0.1)"
  727. }
  728. ],
  729. false
  730. ),
  731. shadowColor: "rgba(0, 0, 0, 0.1)"
  732. }
  733. },
  734. data: sortData[0].data[1]
  735. }
  736. ]
  737. };
  738. myChart.setOption(option);
  739. var img1 = document.getElementById('oldAnalysisChart1_img');
  740. setTimeout(function() {
  741. img1.src = myChart.getDataURL();
  742. }, 1000)
  743. })();
  744. // 电老化分析2
  745. (function() {
  746. var sortData = [{
  747. sortName: "漏电告警",
  748. data: [
  749. // 两个数组是因为有两条线
  750. [123, 175, 112, 197, 121, 67, 98, 21, 43, 64, 76, 38, 24, 52, 26, 27, 30, 35, 36, 40, 120, 230, 210, 120, 213, 180, 200, 180, 79, 191, 324, ],
  751. [143, 131, 165, 123, 178, 21, 82, 64, 43, 60, 19, 34, 40, 64, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 9, 191, 324, 290, 330, 310, 213, 180, ]
  752. ]
  753. }];
  754. var xData = function() {
  755. var data = [];
  756. for (var i = 1; i < 31; i++) {
  757. data.push(i);
  758. }
  759. return data;
  760. }();
  761. // 1. 实例化对象
  762. var myChart = echarts.init(document.querySelector("#oldAnalysisChart2"));
  763. // 2.指定配置
  764. var option = {
  765. color: ["#FF9C00", "#0096FF"], // 通过这个color修改两条线的颜色
  766. tooltip: {
  767. trigger: "axis",
  768. textStyle: {
  769. align: 'left' //图例左对齐
  770. },
  771. backgroundColor: '#12DFE0',
  772. formatter: '{a0}: {c0}<br />{a1}: {c1}<br />时间:2021年3月{b}日'
  773. },
  774. legend: {
  775. // 如果series 对象有name 值,则 legend可以不用写data
  776. itemGap: 20,
  777. itemHeight: 2,
  778. itemWidth: 15,
  779. icon: 'rect',
  780. textStyle: {
  781. color: "#aaa"
  782. },
  783. top: "bottom",
  784. },
  785. grid: {
  786. top: "0%",
  787. left: "1%",
  788. right: "1%",
  789. bottom: "15%",
  790. show: true, // 显示边框
  791. borderWidth: '0', //去除边框
  792. containLabel: true // 包含刻度文字在内
  793. },
  794. xAxis: {
  795. type: "category",
  796. boundaryGap: false,
  797. data: xData,
  798. axisTick: {
  799. show: false // 去除刻度线
  800. },
  801. axisLabel: {
  802. color: "#AADDFF" // 文本颜色
  803. },
  804. axisLine: {
  805. show: false // 去除轴线
  806. }
  807. },
  808. yAxis: {
  809. type: "value",
  810. axisTick: {
  811. show: false // 去除刻度线
  812. },
  813. axisLabel: {
  814. show: false // 去除文本
  815. },
  816. axisLine: {
  817. show: false // 去除轴线
  818. },
  819. splitLine: {
  820. lineStyle: {
  821. color: "#012f4a", // 分割线颜色
  822. opacity: .2
  823. }
  824. }
  825. },
  826. series: [{
  827. symbol: "none",
  828. name: "电流",
  829. type: "line",
  830. smooth: true, // true 可以让我们的折线显示带有弧度
  831. areaStyle: {
  832. normal: {
  833. color: new echarts.graphic.LinearGradient(
  834. 0,
  835. 0,
  836. 0,
  837. 1, [{
  838. offset: 0,
  839. color: "rgba(255,156,0, 0.4)"
  840. },
  841. {
  842. offset: 0.8,
  843. color: "rgba(255,156,0, 0.3)"
  844. }
  845. ],
  846. false
  847. ),
  848. shadowColor: "rgba(0, 0, 0, 0.1)"
  849. }
  850. },
  851. data: sortData[0].data[0]
  852. },
  853. {
  854. symbol: "none",
  855. name: "电压",
  856. type: "line",
  857. smooth: true,
  858. areaStyle: {
  859. normal: {
  860. color: new echarts.graphic.LinearGradient(
  861. 0,
  862. 0,
  863. 0,
  864. 1, [{
  865. offset: 0,
  866. color: "rgba(0,150,255,0.5)"
  867. },
  868. {
  869. offset: 0.8,
  870. color: "rgba(0,150,255, 0.1)"
  871. }
  872. ],
  873. false
  874. ),
  875. shadowColor: "rgba(0, 0, 0, 0.1)"
  876. }
  877. },
  878. data: sortData[0].data[1]
  879. }
  880. ]
  881. };
  882. myChart.setOption(option);
  883. var img1 = document.getElementById('oldAnalysisChart2_img');
  884. setTimeout(function() {
  885. img1.src = myChart.getDataURL();
  886. }, 1000)
  887. })();
  888. // 热老化分析
  889. (function() {
  890. var sortData = [{
  891. data: [
  892. // 三个数组是因为有3条线
  893. [123, 175, 112, 197, 121, 67, 98, 21, 43, 64, 76, 38, 24, 52, 26, 27, 30, 35, 36, 40, 120, 230, 210, 120, 213, 180, 200, 180, 79, 191, 324, ],
  894. [24, 52, 26, 27, 30, 35, 36, 40, 120, 230, 210, 120, 213, 180, 200, 180, 79, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 82, 64, 43, 60, 19, 34],
  895. [40, 64, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 9, 191, 324, 290, 330, 310, 213, 180, 200, 180, 79, 82, 64, 79, 82, 64, 4]
  896. ]
  897. }];
  898. var xData = function() {
  899. var data = [];
  900. for (var i = 1; i < 31; i++) {
  901. data.push(i);
  902. }
  903. return data;
  904. }();
  905. // 1. 实例化对象
  906. var myChart = echarts.init(document.querySelector("#hotAnalysisChart1"));
  907. // 2.指定配置
  908. var option = {
  909. color: ["#05EEE7", "#9999FF", "#FE92B3"], // 通过这个color修改三条线的颜色
  910. tooltip: {
  911. trigger: "axis",
  912. textStyle: {
  913. align: 'left' //图例左对齐
  914. },
  915. backgroundColor: '#12DFE0',
  916. formatter: '{a0}: {c0}°C<br />{a1}: {c1}°C<br />{a2}: {c2}°C<br />时间:2021年3月{b}日'
  917. },
  918. legend: {
  919. // 如果series 对象有name 值,则 legend可以不用写data
  920. itemGap: 20,
  921. itemHeight: 2,
  922. itemWidth: 15,
  923. icon: 'rect',
  924. textStyle: {
  925. color: "#aaa"
  926. },
  927. top: "bottom",
  928. },
  929. grid: {
  930. top: "0%",
  931. left: "1%",
  932. right: "1%",
  933. bottom: "15%",
  934. show: true, // 显示边框
  935. borderWidth: '0', //去除边框
  936. containLabel: true // 包含刻度文字在内
  937. },
  938. xAxis: {
  939. type: "category",
  940. boundaryGap: false,
  941. data: xData,
  942. axisTick: {
  943. show: false // 去除刻度线
  944. },
  945. axisLabel: {
  946. color: "#AADDFF" // 文本颜色
  947. },
  948. axisLine: {
  949. show: false // 去除轴线
  950. }
  951. },
  952. yAxis: {
  953. type: "value",
  954. axisTick: {
  955. show: false // 去除刻度线
  956. },
  957. axisLabel: {
  958. show: false // 去除文本
  959. },
  960. axisLine: {
  961. show: false // 去除轴线
  962. },
  963. splitLine: {
  964. lineStyle: {
  965. color: "#012f4a", // 分割线颜色
  966. opacity: .2
  967. }
  968. }
  969. },
  970. series: [{
  971. symbol: "none",
  972. name: "线缆产生的温度",
  973. type: "line",
  974. smooth: true, // true 可以让我们的折线显示带有弧度
  975. areaStyle: {
  976. normal: {
  977. color: new echarts.graphic.LinearGradient(
  978. 0,
  979. 0,
  980. 0,
  981. 1, [{
  982. offset: 0,
  983. color: "rgba(5,238,231,.6)"
  984. },
  985. {
  986. offset: 0.8,
  987. color: "rgba(5,238,231, 0.4)"
  988. }
  989. ],
  990. false
  991. ),
  992. }
  993. },
  994. data: sortData[0].data[0]
  995. },
  996. {
  997. symbol: "none",
  998. name: "环境温度",
  999. type: "line",
  1000. smooth: true,
  1001. areaStyle: {
  1002. normal: {
  1003. color: new echarts.graphic.LinearGradient(
  1004. 0,
  1005. 0,
  1006. 0,
  1007. 1, [{
  1008. offset: 0,
  1009. color: "rgba(153,153,255,.6)"
  1010. },
  1011. {
  1012. offset: 0.8,
  1013. color: "rgba(153,153,255, 0.4)"
  1014. }
  1015. ],
  1016. false
  1017. ),
  1018. }
  1019. },
  1020. data: sortData[0].data[1]
  1021. },
  1022. {
  1023. symbol: "none",
  1024. name: "线缆温度",
  1025. type: "line",
  1026. smooth: true,
  1027. areaStyle: {
  1028. normal: {
  1029. color: new echarts.graphic.LinearGradient(
  1030. 0,
  1031. 0,
  1032. 0,
  1033. 1, [{
  1034. offset: 0,
  1035. color: "rgba(255,147,180,.6)"
  1036. },
  1037. {
  1038. offset: 0.8,
  1039. color: "rgba(255,147,180, 0.4)"
  1040. }
  1041. ],
  1042. false
  1043. ),
  1044. }
  1045. },
  1046. data: sortData[0].data[2]
  1047. }
  1048. ]
  1049. };
  1050. myChart.setOption(option);
  1051. var img1 = document.getElementById('hotAnalysisChart1_img');
  1052. setTimeout(function() {
  1053. img1.src = myChart.getDataURL();
  1054. }, 1000)
  1055. })();
  1056. // 打印
  1057. (function() {
  1058. $("#btnPrint").click(function() {
  1059. print_detail()
  1060. });
  1061. var print_detail = function() {
  1062. //打印前echarts图表转换成图片 start
  1063. $('#divergenceChart1_img,#divergenceChart2_img,#divergenceChart3_img,#divergenceChart4_img').show()
  1064. $('#divergenceChart1,#divergenceChart2,#divergenceChart3,#divergenceChart4').hide()
  1065. $('#oldAnalysisChart1_img,#oldAnalysisChart2_img').show()
  1066. $('#oldAnalysisChart1,#oldAnalysisChart2').hide()
  1067. $('#hotAnalysisChart1_img').show()
  1068. $('#hotAnalysisChart1').hide()
  1069. // end
  1070. var div1_label1 = document.getElementById('printArea').innerHTML;
  1071. var hkey_key;
  1072. var hkey_root = 'HKEY_CURRENT_USER';
  1073. var hkey_path = '\\Software\\Micorsoft\\Internet Explorer\\PageSetup\\';
  1074. var print_win = window.open('打印窗口', '_blank');
  1075. var div = document.createElement('div');
  1076. div.setAttribute('width', '100%');
  1077. div.setAttribute('height', '100%');
  1078. var div_print = document.createElement('div');
  1079. div_print.setAttribute('style', 'width:595px;height:842px;padding:50px 20px;margin:0px auto 0px auto');
  1080. div_print.innerHTML = div1_label1;
  1081. div.appendChild(div_print);
  1082. print_win.document.write(div.innerHTML);
  1083. print_win.document.close();
  1084. try {
  1085. var RegWsh = new ActiveXObject('WScript.Shell');
  1086. hkey_key = 'header';
  1087. RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, '');
  1088. hkey_key = 'footer';
  1089. RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, '');
  1090. } catch (e) {}
  1091. print_win.print();
  1092. print_win.close();
  1093. }
  1094. })()