B_Mode_1.js 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430
  1. $(window).load(function () {
  2. $(".loading").fadeOut()
  3. // 返回上一级 视图处理
  4. C_keys_list = C_keys.split(",")
  5. if (C_keys_list.length <= 1){
  6. $("#v_back").hide();
  7. }else {
  8. $("#v_back").show();
  9. }
  10. })
  11. /****/
  12. $(document).ready(function () {
  13. var whei = $(window).width()
  14. $("html").css({fontSize: whei / 20})
  15. $(window).resize(function () {
  16. var whei = $(window).width()
  17. $("html").css({fontSize: whei / 20})
  18. });
  19. });
  20. // 返回
  21. function f_v_back() {
  22. C_keys_list = C_keys.split(",")
  23. C_keys_list.pop()
  24. hrefurl = "?T_key="+C_keys_list.join(",")
  25. if (false != C_modex){
  26. hrefurl += "&T_mode="+C_modex
  27. }
  28. document.location.href = hrefurl
  29. }
  30. var V_kf_yd = 1
  31. function f_kf_open() {
  32. $("#map_kf").css("opacity", 1);
  33. $("#v_trail").css("opacity", 0);
  34. $("#R_KF_Column").show();
  35. $("#R_YD_Column").hide();
  36. V_kf_yd = 1
  37. f_view()
  38. }
  39. function f_yd_open() {
  40. $("#map_kf").css("opacity", 0);
  41. $("#v_trail").css("opacity", 1);
  42. $("#R_KF_Column").hide();
  43. $("#R_YD_Column").show();
  44. V_kf_yd = 2
  45. f_view()
  46. }
  47. // 视图数据改变
  48. function f_view() {
  49. // 地图加载
  50. if (V_kf_yd == 1) {
  51. f_v_map();
  52. }
  53. // 轨迹加载
  54. if (C_json.Device.T_移动总数 > 0 && V_kf_yd == 2) {
  55. f_v_trail()
  56. }
  57. // 屏蔽按钮
  58. if(C_json.Device.T_库房总数 == 0){
  59. $("#v_open_KF").hide();
  60. }
  61. if(C_json.Device.T_移动总数 == 0){
  62. $("#v_open_YD").hide();
  63. }
  64. $("#T_公司名称").html(C_json.Company_name + "-冷链药品质量安全智慧中台")
  65. $("title").html(C_json.Company_name + "-冷链药品质量安全智慧中台")
  66. // 设备类
  67. $("#T_终端总数").html(C_json.Device.T_库房总数 + C_json.Device.T_移动总数)
  68. $("#T_库房总数").html(C_json.Device.T_库房总数)
  69. $("#T_移动总数").html(C_json.Device.T_移动总数)
  70. $("#T_移动总数s").html(C_json.Device.T_移动总数)
  71. $("#T_移动离线总数").html(C_json.Device.T_移动离线总数)
  72. $("#T_移动监控总数").html(C_json.Device.T_移动监控总数)
  73. // 报警类
  74. // $("#T_库房报警总数").html(C_json.Warning.T_库房报警总数)
  75. $("#T_库房未处理总数").html(C_json.Warning.T_库房未处理总数)
  76. $("#T_库房设备报警数_今天").html(C_json.Warning.T_库房设备报警数_今天)
  77. $("#T_库房报警设备数_今天").html(C_json.Warning.T_库房报警设备数_今天)
  78. // $("#T_库房设备报警数_昨天").html(C_json.Warning.T_库房设备报警数_昨天)
  79. // $("#T_库房设备报警数_近7天").html(C_json.Warning.T_库房设备报警数_近7天)
  80. // $("#T_库房设备报警数_本月").html(C_json.Warning.T_库房设备报警数_本月)
  81. // $("#T_库房设备报警数_上一月").html(C_json.Warning.T_库房设备报警数_上一月)
  82. // $("#T_移动警数总数").html(C_json.Warning.T_移动警数总数)
  83. $("#T_移动未处理总数").html(C_json.Warning.T_移动未处理总数)
  84. $("#T_移动设备报警数_今天").html(C_json.Warning.T_移动设备报警数_今天)
  85. $("#T_移动设备报警数_今天s").html(C_json.Warning.T_移动设备报警数_今天)
  86. // $("#T_移动设备报警数_昨天").html(C_json.Warning.T_移动设备报警数_昨天)
  87. // $("#T_移动设备报警数_近7天").html(C_json.Warning.T_移动设备报警数_近7天)
  88. // $("#T_移动设备报警数_本月").html(C_json.Warning.T_移动设备报警数_本月)
  89. // $("#T_移动设备报警数_上一月").html(C_json.Warning.T_移动设备报警数_上一月)
  90. w_x_ = parseInt(C_json.Warning.T_库房报警设备数_今天)
  91. if (w_x_ != 0) {
  92. w_x_ = w_x_ / (C_json.Device.T_库房总数)
  93. w_x_ *= 100
  94. }
  95. $("#T_今日库房报警率").html(w_x_.toFixed(1) + "%")
  96. $("#T_今日报警总数").html(parseInt(C_json.Warning.T_库房设备报警数_今天) + parseInt(C_json.Warning.T_移动设备报警数_今天))
  97. w_x_ = parseInt(C_json.Warning.T_库房报警设备数_今天) + parseInt(C_json.Warning.T_移动报警设备数_今天)
  98. if (w_x_ != 0) {
  99. w_x_ = w_x_ / (C_json.Device.T_库房总数 + C_json.Device.T_移动总数)
  100. w_x_ *= 100
  101. }
  102. $("#T_今日报警率").html(w_x_.toFixed(1) + "%")
  103. // $("#T_今日报警率").html(parseInt(w_x_) + "%")
  104. $("#T_今日未处理总数").html(parseInt(C_json.Warning.T_库房未处理总数) + parseInt(C_json.Warning.T_移动未处理总数))
  105. // 任务类
  106. $("#T_任务总数_今天").html(C_json.Task.T_任务总数_今天)
  107. $("#T_任务总数_今天s").html(C_json.Task.T_任务总数_今天)
  108. // $("#T_任务总数_昨天").html(C_json.Task.T_任务总数_昨天)
  109. // $("#T_任务总数_近7天").html(C_json.Task.T_任务总数_近7天)
  110. // $("#T_任务总数_本月").html(C_json.Task.T_任务总数_本月)
  111. // $("#T_任务总数_上一月").html(C_json.Task.T_任务总数_上一月)
  112. $("#T_任务设备数_今天").html(C_json.Task.T_任务设备数_今天)
  113. // $("#T_任务设备数_昨天").html(C_json.Task.T_任务设备数_昨天 )
  114. // $("#T_任务设备数_近7天").html(C_json.Task.T_任务设备数_近7天)
  115. // $("#T_任务设备数_本月").html(C_json.Task.T_任务设备数_本月 )
  116. // $("#T_任务设备数_上一月").html(C_json.Task.T_任务设备数_上一月)
  117. w_x_ = parseInt(C_json.Task.T_任务设备数_今天)
  118. if (w_x_ != 0) {
  119. w_x_ = w_x_ / C_json.Device.T_移动总数
  120. w_x_ *= 100
  121. }
  122. $("#T_今日闲置设备").html(w_x_.toFixed(1) + "%")
  123. $("#T_今日闲置设备s").html(w_x_.toFixed(1) + "%")
  124. // 报警统计
  125. try {
  126. $('#Company_Next_WarningG').liMarquee('destroy'); // 清除滚动
  127. }
  128. catch (e) {
  129. alert(e);
  130. }
  131. $("#Company_Next_WarningG").html("<ul id=\"Company_Next_WarningL\"></ul>")// 清除内容
  132. Company_Next_W_l = []
  133. f_Company_Next_报警统计(C_json)
  134. Company_Next_W_l = Company_Next_W_l.filter((value, index, self) => {
  135. return self.findIndex(p => p.name === value.name) === index;
  136. });
  137. Company_Next_W_l_r = Company_Next_W_l.sort((a, b) => b.Warning - a.Warning);
  138. for (var C_key in Company_Next_W_l_r){
  139. C_b = Company_Next_W_l_r[C_key]
  140. $("#Company_Next_WarningL").append("<li><p><span>" + C_b.name + "</span><span>" + (C_b.Device) + "</span><span>" + C_b.Warning + "%</span></p></li>")
  141. }
  142. // 开始滚动
  143. $('#Company_Next_WarningG').liMarquee({
  144. direction: 'up',//身上滚动
  145. runshort: false,//内容不足时不滚动
  146. scrollamount: 20//速度
  147. });
  148. // console.log("Company_Next_W_l:", Company_Next_W_l)
  149. // 图表
  150. echarts_报警设备数近7天曲线图()
  151. echarts_设备报警率排名()
  152. if (V_kf_yd == 1) {
  153. echarts_库房端报警类型统计()
  154. } else {
  155. echarts_移动端任务曲线图()
  156. }
  157. // 任务统计
  158. $('#Company_Next_TaskG').liMarquee('destroy'); // 清除滚动
  159. $("#Company_Next_TaskG").html("<ul id=\"Company_Next_TaskL\"></ul>")// 清除内容
  160. Company_Next_T_l = []
  161. f_Company_Next_任务统计(C_json)
  162. Company_Next_T_l = Company_Next_T_l.filter((value, index, self) => {
  163. return self.findIndex(p => p.name === value.name) === index;
  164. });
  165. Company_Next_T_l_r = Company_Next_T_l.sort((a, b) => b.Task - a.Task);
  166. for (var C_key in Company_Next_T_l_r){
  167. C_b = Company_Next_T_l_r[C_key]
  168. $("#Company_Next_TaskL").append("<li><p><span>" + C_b.name + "</span><span>" + (C_b.Task) + "</span><span>" + C_b.DeviceT + "%</span></p></li>")
  169. }
  170. $('#Company_Next_TaskG').liMarquee({
  171. direction: 'up',//身上滚动
  172. runshort: false,//内容不足时不滚动
  173. scrollamount: 20//速度
  174. });
  175. // 中间 视图显示
  176. if (V_kf_yd === 1) {
  177. // 库房端
  178. $("#T_C_1").html(Company_Next_T_l.length)// 公司下一级统计
  179. $("#T_C_2").html(C_json.Warning.T_库房设备报警数_今天)// 公司下一级统计
  180. w_x_ = parseInt(C_json.Warning.T_库房报警设备数_今天)
  181. if (w_x_ != 0) {
  182. w_x_ = w_x_ / C_json.Device.T_库房总数
  183. w_x_ *= 100
  184. }
  185. $("#T_C_3").html(w_x_.toFixed(1) + "%")// 公司下一级统计
  186. $("#T_Cn_1").html("公司/门店 数量")
  187. $("#T_Cn_2").html("今日库房报警次数")
  188. $("#T_Cn_3").html("今日库房报警率")
  189. } else {
  190. // 移动端
  191. $("#T_C_1").html(Company_Next_T_l.length)// 公司下一级统计
  192. $("#T_C_2").html(C_json.Device.T_移动监控总数)// 公司下一级统计
  193. w_x_ = parseInt(C_json.Warning.T_移动报警设备数_今天)
  194. if (w_x_ != 0) {
  195. w_x_ = w_x_ / C_json.Device.T_移动总数
  196. w_x_ *= 100
  197. }
  198. $("#T_C_3").html(w_x_.toFixed(1) + "%")// 公司下一级统计
  199. $("#T_Cn_1").html("公司/门店 数量")
  200. $("#T_Cn_2").html("监控总数")
  201. $("#T_Cn_3").html("今日移动端报警率")
  202. }
  203. let isKf =true
  204. document.getElementById('transportButton').addEventListener('click', function (){
  205. console.log("点击了按钮")
  206. if (V_kf_yd === 1) {
  207. if (isKf){
  208. isKf = false
  209. document.getElementById('kf_Column').style.display="none"
  210. document.getElementById('yd_Column').style.display="block"
  211. document.getElementById('transportButton').innerText = '库房端'
  212. document.getElementById('title').innerText= "移动端汇总统计"
  213. }else{
  214. isKf = true
  215. document.getElementById('yd_Column').style.display="none"
  216. document.getElementById('kf_Column').style.display="block"
  217. document.getElementById('transportButton').innerText = '移动端'
  218. document.getElementById('title').innerText= "库房端汇总统计"
  219. }
  220. }
  221. })
  222. }
  223. // 公司下一级统计
  224. Company_Next_W_l = []
  225. function f_Company_Next_报警统计(C_j) {
  226. for (var C_key in C_j.Children) {
  227. C_b = C_j.Children[C_key]
  228. f_Company_Next_报警统计(C_b)
  229. if (C_b.Children.length != 0) continue;
  230. Warning = 0
  231. if (C_b.Warning.T_库房报警设备数_今天 > 0) {
  232. Warning = parseInt((C_b.Device.T_库房总数 + C_b.Device.T_移动总数) / C_b.Warning.T_库房报警设备数_今天)
  233. }
  234. // console.log({"name":C_b.Company_name,"Device":C_b.Device.T_库房总数+C_b.Device.T_移动总数,"Warning": Warning})
  235. Company_Next_W_l.push({
  236. "name": C_b.Company_name,
  237. "Device": C_b.Device.T_库房总数 + C_b.Device.T_移动总数,
  238. "Warning": Warning
  239. })
  240. }
  241. }
  242. // 公司下一级任务统计
  243. Company_Next_T_l = []
  244. function f_Company_Next_任务统计(C_j) {
  245. for (var C_key in C_j.Children) {
  246. C_b = C_j.Children[C_key]
  247. f_Company_Next_任务统计(C_b)
  248. if (C_b.Children.length != 0) continue;
  249. // console.log({"name":C_b.Company_name,"Device":C_b.Device.T_库房总数+C_b.Device.T_移动总数,"Warning": Warning})
  250. T_x_ = C_b.Task.T_任务设备数_今天
  251. if(T_x_ != 0){
  252. T_x_ = T_x_ / C_json.Device.T_移动总数
  253. T_x_ *= 100
  254. }
  255. Company_Next_T_l.push({
  256. "name": C_b.Company_name,
  257. "Task": C_b.Task.T_任务总数_今天,
  258. "DeviceT": T_x_.toFixed(1)
  259. })
  260. }
  261. }
  262. // 公司下一级统计
  263. function f_Company_Next_公司下一级统计(C_j) {
  264. var Company_Next_num = 0
  265. for (var C_key in C_j.Children) {
  266. C_b = C_j.Children[C_key]
  267. Company_Next_num += f_Company_Next_公司下一级统计(C_b)
  268. if (C_b.Children.length != 0) continue;
  269. Company_Next_num += 1
  270. }
  271. return Company_Next_num
  272. }
  273. // 设备报警率占比
  274. function echarts_报警设备数近7天曲线图() {
  275. var myChart = echarts.init(document.getElementById('echarts_报警设备数近7天曲线图'));
  276. xAxis_data = []
  277. yAxis_data = []
  278. xAxis_data30 = []
  279. yAxis_data30 = []
  280. xAxis_data90 = []
  281. yAxis_data90 = []
  282. for (var C_key in C_json.Warning.T_报警设备数_近7天) {
  283. C_b = C_json.Warning.T_报警设备数_近7天[C_key]
  284. xAxis_data.push(C_key)
  285. yAxis_data.push(C_b)
  286. }
  287. for (var C_key in C_json.Warning.T_报警设备数_近30天) {
  288. C_b = C_json.Warning.T_报警设备数_近30天[C_key]
  289. xAxis_data30.push(C_key)
  290. yAxis_data30.push(C_b)
  291. }
  292. for (var C_key in C_json.Warning.T_报警设备数_近90天) {
  293. C_b = C_json.Warning.T_报警设备数_近90天[C_key]
  294. xAxis_data90.push(C_key)
  295. yAxis_data90.push(C_b)
  296. }
  297. let option = {
  298. // legend: {
  299. // icon:"circle",
  300. // top: "0",
  301. // width:'100%',
  302. // right: 'center',
  303. // itemWidth: 10,
  304. // itemHeight: 10,
  305. // data: ['库房端'],
  306. // textStyle: {
  307. // color: "rgba(255,255,255,.5)" },
  308. // },
  309. tooltip: {
  310. trigger: 'axis',
  311. axisPointer: {
  312. lineStyle: {
  313. color: '#dddc6b'
  314. }
  315. }
  316. },
  317. grid: {
  318. left: '0',
  319. top: '5',
  320. right: '15',
  321. bottom: '0',
  322. containLabel: true
  323. },
  324. xAxis: [{
  325. type: 'category',
  326. boundaryGap: false,
  327. axisLabel: {
  328. textStyle: {
  329. color: "rgba(255,255,255,.5)",
  330. // fontSize:10
  331. },
  332. },
  333. axisLine: {
  334. lineStyle: {
  335. color: 'rgba(255,255,255,.1)'
  336. }
  337. },
  338. data: xAxis_data
  339. }, {
  340. axisPointer: {show: false},
  341. axisLine: {show: false},
  342. position: 'bottom',
  343. offset: 20,
  344. }],
  345. yAxis: [{
  346. type: 'value',
  347. axisTick: {show: false},
  348. splitNumber: 4,
  349. axisLine: {
  350. lineStyle: {
  351. color: 'rgba(255,255,255,.1)'
  352. }
  353. },
  354. axisLabel: {
  355. textStyle: {
  356. color: "rgba(255,255,255,.5)",
  357. //fontSize:10
  358. },
  359. },
  360. splitLine: {
  361. lineStyle: {
  362. color: 'rgba(255,255,255,.1)',
  363. type: 'dotted',
  364. }
  365. }
  366. }],
  367. series: [
  368. {
  369. name: '库房端',
  370. type: 'line',
  371. smooth: true,
  372. symbol: 'circle',
  373. symbolSize: 5,
  374. showSymbol: false,
  375. lineStyle: {
  376. normal: {
  377. color: 'rgba(31, 174, 234, 1)',
  378. width: 2
  379. }
  380. },
  381. areaStyle: {
  382. normal: {
  383. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  384. offset: 0,
  385. color: 'rgba(31, 174, 234, 0.4)'
  386. }, {
  387. offset: 0.8,
  388. color: 'rgba(31, 174, 234, 0.1)'
  389. }], false),
  390. shadowColor: 'rgba(0, 0, 0, 0.1)',
  391. }
  392. },
  393. itemStyle: {
  394. normal: {
  395. color: '#1f7eea',
  396. borderColor: 'rgba(31, 174, 234, .1)',
  397. borderWidth: 5
  398. }
  399. },
  400. data: yAxis_data
  401. },
  402. // {
  403. // name: '移动端',
  404. // type: 'line',
  405. // smooth: true,
  406. // symbol: 'circle',
  407. // symbolSize: 5,
  408. // showSymbol: false,
  409. // lineStyle: {
  410. //
  411. // normal: {
  412. // color: '#6bdd9b',
  413. // width: 2
  414. // }
  415. // },
  416. // areaStyle: {
  417. // normal: {
  418. // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  419. // offset: 0,
  420. // color: 'rgba(107, 221, 155, 0.4)'
  421. // }, {
  422. // offset: 0.8,
  423. // color: 'rgba(107, 221, 155, 0.1)'
  424. // }], false),
  425. // shadowColor: 'rgba(0, 0, 0, 0.1)',
  426. // }
  427. // },
  428. // itemStyle: {
  429. // normal: {
  430. // color: '#6bdd9b',
  431. // borderColor: 'rgba(107, 221, 155, .1)',
  432. // borderWidth: 5
  433. // }
  434. // },
  435. // data: [ 5, 3, 7, 1, 8, 3, 5]
  436. //
  437. // },
  438. ]
  439. };
  440. let option1 = {
  441. // legend: {
  442. // icon:"circle",
  443. // top: "0",
  444. // width:'100%',
  445. // right: 'center',
  446. // itemWidth: 10,
  447. // itemHeight: 10,
  448. // data: ['库房端'],
  449. // textStyle: {
  450. // color: "rgba(255,255,255,.5)" },
  451. // },
  452. tooltip: {
  453. trigger: 'axis',
  454. axisPointer: {
  455. lineStyle: {
  456. color: '#dddc6b'
  457. }
  458. }
  459. },
  460. grid: {
  461. left: '0',
  462. top: '5',
  463. right: '15',
  464. bottom: '0',
  465. containLabel: true
  466. },
  467. xAxis: [{
  468. type: 'category',
  469. boundaryGap: false,
  470. axisLabel: {
  471. textStyle: {
  472. color: "rgba(255,255,255,.5)",
  473. // fontSize:10
  474. },
  475. },
  476. axisLine: {
  477. lineStyle: {
  478. color: 'rgba(255,255,255,.1)'
  479. }
  480. },
  481. data: xAxis_data30
  482. }, {
  483. axisPointer: {show: false},
  484. axisLine: {show: false},
  485. position: 'bottom',
  486. offset: 20,
  487. }],
  488. yAxis: [{
  489. type: 'value',
  490. axisTick: {show: false},
  491. splitNumber: 4,
  492. axisLine: {
  493. lineStyle: {
  494. color: 'rgba(255,255,255,.1)'
  495. }
  496. },
  497. axisLabel: {
  498. textStyle: {
  499. color: "rgba(255,255,255,.5)",
  500. //fontSize:10
  501. },
  502. },
  503. splitLine: {
  504. lineStyle: {
  505. color: 'rgba(255,255,255,.1)',
  506. type: 'dotted',
  507. }
  508. }
  509. }],
  510. series: [
  511. {
  512. name: '库房端',
  513. type: 'line',
  514. smooth: true,
  515. symbol: 'circle',
  516. symbolSize: 5,
  517. showSymbol: false,
  518. lineStyle: {
  519. normal: {
  520. color: 'rgba(31, 174, 234, 1)',
  521. width: 2
  522. }
  523. },
  524. areaStyle: {
  525. normal: {
  526. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  527. offset: 0,
  528. color: 'rgba(31, 174, 234, 0.4)'
  529. }, {
  530. offset: 0.8,
  531. color: 'rgba(31, 174, 234, 0.1)'
  532. }], false),
  533. shadowColor: 'rgba(0, 0, 0, 0.1)',
  534. }
  535. },
  536. itemStyle: {
  537. normal: {
  538. color: '#1f7eea',
  539. borderColor: 'rgba(31, 174, 234, .1)',
  540. borderWidth: 5
  541. }
  542. },
  543. data: yAxis_data30
  544. },
  545. // {
  546. // name: '移动端',
  547. // type: 'line',
  548. // smooth: true,
  549. // symbol: 'circle',
  550. // symbolSize: 5,
  551. // showSymbol: false,
  552. // lineStyle: {
  553. //
  554. // normal: {
  555. // color: '#6bdd9b',
  556. // width: 2
  557. // }
  558. // },
  559. // areaStyle: {
  560. // normal: {
  561. // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  562. // offset: 0,
  563. // color: 'rgba(107, 221, 155, 0.4)'
  564. // }, {
  565. // offset: 0.8,
  566. // color: 'rgba(107, 221, 155, 0.1)'
  567. // }], false),
  568. // shadowColor: 'rgba(0, 0, 0, 0.1)',
  569. // }
  570. // },
  571. // itemStyle: {
  572. // normal: {
  573. // color: '#6bdd9b',
  574. // borderColor: 'rgba(107, 221, 155, .1)',
  575. // borderWidth: 5
  576. // }
  577. // },
  578. // data: [ 5, 3, 7, 1, 8, 3, 5]
  579. //
  580. // },
  581. ]
  582. };
  583. let option2 = {
  584. // legend: {
  585. // icon:"circle",
  586. // top: "0",
  587. // width:'100%',
  588. // right: 'center',
  589. // itemWidth: 10,
  590. // itemHeight: 10,
  591. // data: ['库房端'],
  592. // textStyle: {
  593. // color: "rgba(255,255,255,.5)" },
  594. // },
  595. tooltip: {
  596. trigger: 'axis',
  597. axisPointer: {
  598. lineStyle: {
  599. color: '#dddc6b'
  600. }
  601. }
  602. },
  603. grid: {
  604. left: '0',
  605. top: '5',
  606. right: '15',
  607. bottom: '0',
  608. containLabel: true
  609. },
  610. xAxis: [{
  611. type: 'category',
  612. boundaryGap: false,
  613. axisLabel: {
  614. textStyle: {
  615. color: "rgba(255,255,255,.5)",
  616. // fontSize:10
  617. },
  618. },
  619. axisLine: {
  620. lineStyle: {
  621. color: 'rgba(255,255,255,.1)'
  622. }
  623. },
  624. data: xAxis_data90
  625. }, {
  626. axisPointer: {show: false},
  627. axisLine: {show: false},
  628. position: 'bottom',
  629. offset: 20,
  630. }],
  631. yAxis: [{
  632. type: 'value',
  633. axisTick: {show: false},
  634. splitNumber: 4,
  635. axisLine: {
  636. lineStyle: {
  637. color: 'rgba(255,255,255,.1)'
  638. }
  639. },
  640. axisLabel: {
  641. textStyle: {
  642. color: "rgba(255,255,255,.5)",
  643. //fontSize:10
  644. },
  645. },
  646. splitLine: {
  647. lineStyle: {
  648. color: 'rgba(255,255,255,.1)',
  649. type: 'dotted',
  650. }
  651. }
  652. }],
  653. series: [
  654. {
  655. name: '库房端',
  656. type: 'line',
  657. smooth: true,
  658. symbol: 'circle',
  659. symbolSize: 5,
  660. showSymbol: false,
  661. lineStyle: {
  662. normal: {
  663. color: 'rgba(31, 174, 234, 1)',
  664. width: 2
  665. }
  666. },
  667. areaStyle: {
  668. normal: {
  669. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  670. offset: 0,
  671. color: 'rgba(31, 174, 234, 0.4)'
  672. }, {
  673. offset: 0.8,
  674. color: 'rgba(31, 174, 234, 0.1)'
  675. }], false),
  676. shadowColor: 'rgba(0, 0, 0, 0.1)',
  677. }
  678. },
  679. itemStyle: {
  680. normal: {
  681. color: '#1f7eea',
  682. borderColor: 'rgba(31, 174, 234, .1)',
  683. borderWidth: 5
  684. }
  685. },
  686. data: yAxis_data90
  687. },
  688. // {
  689. // name: '移动端',
  690. // type: 'line',
  691. // smooth: true,
  692. // symbol: 'circle',
  693. // symbolSize: 5,
  694. // showSymbol: false,
  695. // lineStyle: {
  696. //
  697. // normal: {
  698. // color: '#6bdd9b',
  699. // width: 2
  700. // }
  701. // },
  702. // areaStyle: {
  703. // normal: {
  704. // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  705. // offset: 0,
  706. // color: 'rgba(107, 221, 155, 0.4)'
  707. // }, {
  708. // offset: 0.8,
  709. // color: 'rgba(107, 221, 155, 0.1)'
  710. // }], false),
  711. // shadowColor: 'rgba(0, 0, 0, 0.1)',
  712. // }
  713. // },
  714. // itemStyle: {
  715. // normal: {
  716. // color: '#6bdd9b',
  717. // borderColor: 'rgba(107, 221, 155, .1)',
  718. // borderWidth: 5
  719. // }
  720. // },
  721. // data: [ 5, 3, 7, 1, 8, 3, 5]
  722. //
  723. // },
  724. ]
  725. };
  726. myChart.setOption(option);
  727. window.addEventListener("resize", function () {
  728. myChart.resize();
  729. });
  730. document.getElementById('days7').addEventListener('click', function (){
  731. myChart.setOption(option);
  732. document.getElementById('deviceWarning').innerText = '周设备报警曲线图';
  733. })
  734. document.getElementById('days30').addEventListener('click', function (){
  735. myChart.setOption(option1);
  736. document.getElementById('deviceWarning').innerText = '月设备报警曲线图';
  737. })
  738. document.getElementById('days120').addEventListener('click', function (){
  739. myChart.setOption(option2);
  740. document.getElementById('deviceWarning').innerText = '季度设备报警曲线图';
  741. })
  742. $(".sebtn a").click(function () {
  743. $(this).addClass("active").siblings().removeClass("active")
  744. })
  745. $(".sebtn a").eq(0).click(function () {
  746. myChart.setOption(option1);
  747. })
  748. $(".sebtn a").eq(1).click(function () {
  749. myChart.setOption(option2);
  750. })
  751. $(".sebtn a").eq(2).click(function () {
  752. myChart.setOption(option3);
  753. })
  754. }
  755. // 设备报警率占比
  756. function echarts_设备报警率排名() {
  757. var myChart = echarts.init(document.getElementById('echarts_设备报警率排名'));
  758. // option = {
  759. // legend: {
  760. // icon:"circle",
  761. // top: "0",
  762. // width:'100%',
  763. // right: 'center',
  764. // itemWidth: 10,
  765. // itemHeight: 10,
  766. // data: ['库房端', '移动端'],
  767. // textStyle: {
  768. // color: "rgba(255,255,255,.5)" },
  769. // },
  770. //
  771. // tooltip: {
  772. // trigger: 'axis',
  773. // axisPointer: {
  774. // lineStyle: {
  775. // color: '#dddc6b'
  776. // }
  777. // }
  778. // },
  779. // grid: {
  780. // left: '0',
  781. // top: '30',
  782. // right: '10',
  783. // bottom: '-15',
  784. // containLabel: true
  785. // },
  786. //
  787. // xAxis: [{
  788. // type: 'category',
  789. // boundaryGap: false,
  790. // axisLabel: {
  791. // textStyle: {
  792. // color: "rgba(255,255,255,.5)",
  793. // // fontSize:10
  794. // },
  795. // },
  796. // axisLine: {
  797. // lineStyle: {
  798. // color: 'rgba(255,255,255,.1)'
  799. // }
  800. // },
  801. // data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
  802. //
  803. // }, {
  804. //
  805. // axisPointer: {show: false},
  806. // axisLine: { show: false},
  807. // position: 'bottom',
  808. // offset: 20,
  809. //
  810. //
  811. //
  812. // }],
  813. //
  814. // yAxis: [{
  815. // type: 'value',
  816. // axisTick: {show: false},
  817. // splitNumber: 4,
  818. // axisLine: {
  819. // lineStyle: {
  820. // color: 'rgba(255,255,255,.1)'
  821. // }
  822. // },
  823. // axisLabel: {
  824. // textStyle: {
  825. // color: "rgba(255,255,255,.5)",
  826. // //fontSize:10
  827. // },
  828. // },
  829. //
  830. // splitLine: {
  831. // lineStyle: {
  832. // color: 'rgba(255,255,255,.1)',
  833. // type: 'dotted',
  834. // }
  835. // }
  836. // }],
  837. // series: [
  838. // {
  839. // name: '库房端',
  840. // type: 'line',
  841. // smooth: true,
  842. // symbol: 'circle',
  843. // symbolSize: 5,
  844. // showSymbol: false,
  845. // lineStyle: {
  846. //
  847. // normal: {
  848. // color: 'rgba(31, 174, 234, 1)',
  849. // width: 2
  850. // }
  851. // },
  852. // areaStyle: {
  853. // normal: {
  854. // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  855. // offset: 0,
  856. // color: 'rgba(31, 174, 234, 0.4)'
  857. // }, {
  858. // offset: 0.8,
  859. // color: 'rgba(31, 174, 234, 0.1)'
  860. // }], false),
  861. // shadowColor: 'rgba(0, 0, 0, 0.1)',
  862. // }
  863. // },
  864. // itemStyle: {
  865. // normal: {
  866. // color: '#1f7eea',
  867. // borderColor: 'rgba(31, 174, 234, .1)',
  868. // borderWidth: 5
  869. // }
  870. // },
  871. // data: [3, 6, 3, 6, 3, 9, 3]
  872. //
  873. // },
  874. // {
  875. // name: '移动端',
  876. // type: 'line',
  877. // smooth: true,
  878. // symbol: 'circle',
  879. // symbolSize: 5,
  880. // showSymbol: false,
  881. // lineStyle: {
  882. //
  883. // normal: {
  884. // color: '#6bdd9b',
  885. // width: 2
  886. // }
  887. // },
  888. // areaStyle: {
  889. // normal: {
  890. // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  891. // offset: 0,
  892. // color: 'rgba(107, 221, 155, 0.4)'
  893. // }, {
  894. // offset: 0.8,
  895. // color: 'rgba(107, 221, 155, 0.1)'
  896. // }], false),
  897. // shadowColor: 'rgba(0, 0, 0, 0.1)',
  898. // }
  899. // },
  900. // itemStyle: {
  901. // normal: {
  902. // color: '#6bdd9b',
  903. // borderColor: 'rgba(107, 221, 155, .1)',
  904. // borderWidth: 5
  905. // }
  906. // },
  907. // data: [ 5, 3, 7, 1, 8, 3, 5]
  908. //
  909. // },
  910. // ]
  911. //
  912. // };
  913. yAxis_data = []
  914. series_data = []
  915. Company_Next_W_l_ = Company_Next_W_l.sort((a, b) => a.Warning - b.Warning).slice(-10);
  916. for (var C_key in Company_Next_W_l_) {
  917. C_b = Company_Next_W_l_[C_key]
  918. if(C_b.Warning > 0){
  919. yAxis_data.push(C_b.name)
  920. series_data.push(C_b.Warning)
  921. }
  922. }
  923. option = {
  924. // title: {
  925. // text: 'World Population'
  926. // },
  927. tooltip: {
  928. trigger: 'axis',
  929. axisPointer: {
  930. type: 'shadow'
  931. }
  932. },
  933. // legend: {},
  934. grid: {
  935. top: '0%',
  936. left: '0%',
  937. right: '0%',
  938. bottom: '0%',
  939. containLabel: true
  940. },
  941. xAxis: {
  942. type: 'value',
  943. boundaryGap: [0, 0.01],
  944. show: false
  945. },
  946. yAxis: {
  947. type: 'category',
  948. data: yAxis_data
  949. },
  950. series: [
  951. {
  952. name: '报警率',
  953. type: 'bar',
  954. itemStyle: {
  955. color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [
  956. { offset: 0, color: '#596db0' },
  957. { offset: 0.5, color: '#4a63b4' },
  958. { offset:1, color: '#435eb7' }
  959. ])
  960. },
  961. data: series_data
  962. }
  963. ]
  964. };
  965. // option = {
  966. // legend: {
  967. // icon: "circle",
  968. // top: "0",
  969. // width: '100%',
  970. // right: 'center',
  971. // itemWidth: 10,
  972. // itemHeight: 10,
  973. // // textStyle: {
  974. // // color: "rgba(255,255,255,.5)"
  975. // // },
  976. // },
  977. //
  978. // tooltip: {
  979. // trigger: 'axis',
  980. // axisPointer: {
  981. // lineStyle: {
  982. // color: '#dddc6b'
  983. // }
  984. // }
  985. // },
  986. // grid: {
  987. // left: '0',
  988. // top: '30',
  989. // right: '0',
  990. // bottom: '-15',
  991. // containLabel: true
  992. // },
  993. //
  994. // dataset: [
  995. // {
  996. // dimensions: ['name', 'Device', "Warning"],
  997. // // source: [
  998. // // ['11111111', 41],
  999. // // ['22222222', 241],
  1000. // // ['333333333', 341],
  1001. // // ['4444444444', 141],
  1002. // // ['555555555', 421],
  1003. // // ['666666666', 141],
  1004. // // ['77777777', 241],
  1005. // // ['8888888888', 411],
  1006. // // ['9999999', 421],
  1007. // // ['123123123', 414],
  1008. // // ['456456456', 431],
  1009. // //
  1010. // // ]
  1011. // source: Company_Next_W_l,
  1012. // },
  1013. // {
  1014. // transform: {
  1015. // type: 'sort',
  1016. // config: {dimension: 'Warning', order: 'desc'}
  1017. // }
  1018. // }
  1019. // ],
  1020. // xAxis: {
  1021. // type: 'category',
  1022. // axisLabel: {interval: 0, rotate: 30},
  1023. // max: 6 // only the largest 3 bars will be displayed
  1024. // },
  1025. // yAxis: {},
  1026. // series: {
  1027. // type: 'bar',
  1028. // encode: {x: 'name', y: 'Warning'},
  1029. // datasetIndex: 1
  1030. // }
  1031. // };
  1032. myChart.setOption(option);
  1033. window.addEventListener("resize", function () {
  1034. myChart.resize();
  1035. });
  1036. $(".sebtn a").click(function () {
  1037. $(this).addClass("active").siblings().removeClass("active")
  1038. })
  1039. $(".sebtn a").eq(0).click(function () {
  1040. myChart.setOption(option1);
  1041. })
  1042. $(".sebtn a").eq(1).click(function () {
  1043. myChart.setOption(option2);
  1044. })
  1045. $(".sebtn a").eq(2).click(function () {
  1046. myChart.setOption(option3);
  1047. })
  1048. }
  1049. // 移动端任务曲线图
  1050. function echarts_移动端任务曲线图() {
  1051. var myChart = echarts.init(document.getElementById('echarts_移动端任务曲线图'));
  1052. xAxis_data = []
  1053. yAxis_data = []
  1054. for (var C_key in C_json.Task.T_任务总数_近7天) {
  1055. xAxis_data.push(C_key)
  1056. yAxis_data.push(C_json.Task.T_任务总数_近7天[C_key])
  1057. }
  1058. option = {
  1059. // legend: {
  1060. // icon:"circle",
  1061. // top: "0",
  1062. // width:'100%',
  1063. // right: 'center',
  1064. // itemWidth: 10,
  1065. // itemHeight: 10,
  1066. // textStyle: {
  1067. // color: "rgba(255,255,255,.5)" },
  1068. // },
  1069. tooltip: {
  1070. trigger: 'axis',
  1071. axisPointer: {
  1072. lineStyle: {
  1073. color: '#dddc6b'
  1074. }
  1075. }
  1076. },
  1077. grid: {
  1078. left: '0',
  1079. top: '5',
  1080. right: '17',
  1081. bottom: '0',
  1082. containLabel: true
  1083. },
  1084. xAxis: [{
  1085. type: 'category',
  1086. boundaryGap: false,
  1087. axisLabel: {
  1088. textStyle: {
  1089. color: "rgba(255,255,255,.5)",
  1090. // fontSize:10
  1091. },
  1092. },
  1093. axisLine: {
  1094. lineStyle: {
  1095. color: 'rgba(255,255,255,.1)'
  1096. }
  1097. },
  1098. data: xAxis_data // ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
  1099. }, {
  1100. axisPointer: {show: false},
  1101. axisLine: {show: false},
  1102. position: 'bottom',
  1103. offset: 20,
  1104. }],
  1105. yAxis: [{
  1106. type: 'value',
  1107. axisTick: {show: false},
  1108. splitNumber: 4,
  1109. axisLine: {
  1110. lineStyle: {
  1111. color: 'rgba(255,255,255,.1)'
  1112. }
  1113. },
  1114. axisLabel: {
  1115. textStyle: {
  1116. color: "rgba(255,255,255,.5)",
  1117. //fontSize:10
  1118. },
  1119. },
  1120. splitLine: {
  1121. lineStyle: {
  1122. color: 'rgba(255,255,255,.1)',
  1123. type: 'dotted',
  1124. }
  1125. }
  1126. }],
  1127. series: [
  1128. {
  1129. // radius: ['40%', '70%'],
  1130. // center: ['50%', '74%'],
  1131. name: '任务次数',
  1132. type: 'line',
  1133. smooth: true,
  1134. symbol: 'circle',
  1135. symbolSize: 5,
  1136. showSymbol: false,
  1137. containLabel: true,
  1138. lineStyle: {
  1139. normal: {
  1140. color: 'rgba(31, 174, 234, 1)',
  1141. width: 2
  1142. }
  1143. },
  1144. areaStyle: {
  1145. normal: {
  1146. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1147. offset: 0,
  1148. color: 'rgba(31, 174, 234, 0.4)'
  1149. }, {
  1150. offset: 0.8,
  1151. color: 'rgba(31, 174, 234, 0.1)'
  1152. }], false),
  1153. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1154. }
  1155. },
  1156. itemStyle: {
  1157. normal: {
  1158. color: '#1f7eea',
  1159. borderColor: 'rgba(31, 174, 234, .1)',
  1160. borderWidth: 5
  1161. }
  1162. },
  1163. data: yAxis_data // [3, 6, 3, 6, 3, 9, 3]
  1164. },
  1165. ]
  1166. };
  1167. myChart.setOption(option);
  1168. window.addEventListener("resize", function () {
  1169. myChart.resize();
  1170. });
  1171. $(".sebtn a").click(function () {
  1172. $(this).addClass("active").siblings().removeClass("active")
  1173. })
  1174. $(".sebtn a").eq(0).click(function () {
  1175. myChart.setOption(option1);
  1176. })
  1177. $(".sebtn a").eq(1).click(function () {
  1178. myChart.setOption(option2);
  1179. })
  1180. $(".sebtn a").eq(2).click(function () {
  1181. myChart.setOption(option3);
  1182. })
  1183. }
  1184. // 库房端报警类型统计
  1185. function echarts_库房端报警类型统计() {
  1186. const myChart = echarts.init(document.getElementById('echarts_库房端报警类型统计'));
  1187. data = []
  1188. datas = []
  1189. data_num = 0
  1190. data_nums = 0
  1191. for (var C_key in C_json.Warning.T_库房报警类型统计) {
  1192. data_num += C_json.Warning.T_库房报警类型统计[C_key]
  1193. data.push({value: C_json.Warning.T_库房报警类型统计[C_key], name: C_key})
  1194. console.log("C_json.Warning.T_库房报警类型统计",C_json.Warning.T_库房报警类型统计)
  1195. }
  1196. for (var C_key in C_json.Warning.T_移动报警类型统计) {
  1197. data_nums += C_json.Warning.T_移动报警类型统计[C_key]
  1198. datas.push({value: C_json.Warning.T_移动报警类型统计[C_key], name: C_key})
  1199. console.log("C_json.Warning.T_移动报警类型统计",data_nums)
  1200. }
  1201. data.push({
  1202. // make an record to fill the bottom 50%
  1203. value: data_num,
  1204. itemStyle: {
  1205. // stop the chart from rendering this piece
  1206. color: 'none',
  1207. decal: {
  1208. symbol: 'none'
  1209. }
  1210. },
  1211. label: {
  1212. show: false
  1213. }
  1214. })
  1215. let option = {
  1216. tooltip: {
  1217. trigger: 'item'
  1218. },
  1219. // legend: {
  1220. // top: '5%',
  1221. // left: 'center',
  1222. // // doesn't perfectly work with our tricks, disable it
  1223. // selectedMode: false
  1224. // },
  1225. color: ['#45C2E0', '#C1EBDD', '#c0a9fa', '#75bef3', '#FF9393', '#e9aaff', '#ffc1a7'],
  1226. series: [
  1227. {
  1228. name: '报警类型',
  1229. type: 'pie',
  1230. radius: ['40%', '70%'],
  1231. center: ['50%', '74%'],
  1232. // adjust the start angle
  1233. startAngle: 180,
  1234. label: {
  1235. color: "#C1EBDD",
  1236. show: true,
  1237. formatter(param) {
  1238. // correct the percentage
  1239. return param.name + ' (' + param.percent * 2 + '%)';
  1240. }
  1241. },
  1242. data: data
  1243. }
  1244. ]
  1245. };
  1246. let option2 = {
  1247. tooltip: {
  1248. trigger: 'item'
  1249. },
  1250. color: ['#0f7dec', '#07c5ea', '#e3378d', '#ff0000', '#FF9393', '#e9aaff', '#ffc1a7'],
  1251. series: [
  1252. {
  1253. name: '报警类型',
  1254. type: 'pie',
  1255. radius: ['40%', '70%'],
  1256. center: ['50%', '74%'],
  1257. // adjust the start angle
  1258. startAngle: 360,
  1259. label: {
  1260. color: "#C1EBDD",
  1261. show: true,
  1262. formatter(param) {
  1263. // correct the percentage
  1264. return param.name + ' (' + param.percent * 2 + '%)';
  1265. }
  1266. },
  1267. data: [{
  1268. value: data_nums,
  1269. itemStyle: {
  1270. color: 'none',
  1271. decal: {
  1272. symbol: 'none'
  1273. }
  1274. },
  1275. label: {
  1276. show: false
  1277. }
  1278. }, ...datas]
  1279. }
  1280. ]
  1281. }
  1282. myChart.setOption(option);
  1283. window.addEventListener("resize", function () {
  1284. myChart.resize();
  1285. });
  1286. //添加按钮点击切换
  1287. let isoption = true
  1288. document.getElementById('transportChartButton').addEventListener('click', function (){
  1289. if (isoption===true){
  1290. myChart.setOption(option2);
  1291. document.getElementById('transportChartButton').innerText = '库房端'
  1292. document.getElementById('kftitle').innerText = '移动端报警类型统计'
  1293. isoption=false
  1294. }else{
  1295. myChart.setOption(option);
  1296. document.getElementById('transportChartButton').innerText = '移动端'
  1297. document.getElementById('kftitle').innerText = '库房端报警类型统计'
  1298. isoption = true
  1299. }
  1300. })
  1301. $(".sebtn a").click(function () {
  1302. $(this).addClass("active").siblings().removeClass("active")
  1303. })
  1304. $(".sebtn a").eq(0).click(function () {
  1305. myChart.setOption(option1);
  1306. })
  1307. $(".sebtn a").eq(1).click(function () {
  1308. myChart.setOption(option2);
  1309. })
  1310. $(".sebtn a").eq(2).click(function () {
  1311. myChart.setOption(option3);
  1312. })
  1313. }