quota.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. $(function(){
  2. init();
  3. })
  4. function init(){
  5. var myColor = ['#1089E7', '#F57474', '#56D0E3', '#F8B448', '#8B78F6'];
  6. //各医院门诊人次
  7. var histogramChart1 = echarts.init(document.getElementById('histogramChart1'));
  8. histogramChart1.setOption({
  9. grid: {
  10. top: '20%',
  11. left: '32%'
  12. },
  13. xAxis: {
  14. show: false
  15. },
  16. yAxis: [{
  17. show: true,
  18. data: ['厦门第一医院','厦门中山医院','厦门中医院','厦门第五医院',],
  19. inverse: true,
  20. axisLine: {
  21. show: false
  22. },
  23. splitLine: {
  24. show: false
  25. },
  26. axisTick: {
  27. show: false
  28. },
  29. axisLabel: {
  30. color: '#fff',
  31. formatter: (value, index) => {
  32. return [
  33. `{lg|${index+1}} ` + '{title|' + value + '} '
  34. ].join('\n')
  35. },
  36. rich: {
  37. lg: {
  38. backgroundColor: '#339911',
  39. color: '#fff',
  40. borderRadius: 15,
  41. // padding: 5,
  42. align: 'center',
  43. width: 15,
  44. height: 15
  45. },
  46. }
  47. },
  48. }, {
  49. show: true,
  50. inverse: true,
  51. data: [4000, 3000, 2000, 1000],
  52. axisLabel: {
  53. textStyle: {
  54. fontSize: 12,
  55. color: '#fff',
  56. },
  57. },
  58. axisLine: {
  59. show: false
  60. },
  61. splitLine: {
  62. show: false
  63. },
  64. axisTick: {
  65. show: false
  66. },
  67. }],
  68. series: [{
  69. name: '条',
  70. type: 'bar',
  71. yAxisIndex: 0,
  72. data: [40, 30, 20, 10],
  73. barWidth: 10,
  74. itemStyle: {
  75. normal: {
  76. barBorderRadius: 20,
  77. color: function(params) {
  78. var num = myColor.length;
  79. return myColor[params.dataIndex % num]
  80. },
  81. }
  82. },
  83. label: {
  84. normal: {
  85. show: true,
  86. position: 'inside',
  87. formatter: '{c}%'
  88. }
  89. },
  90. }, {
  91. name: '框',
  92. type: 'bar',
  93. yAxisIndex: 1,
  94. barGap: '-100%',
  95. data: [100, 100, 100, 100],
  96. barWidth: 15,
  97. itemStyle: {
  98. normal: {
  99. color: 'none',
  100. borderColor: '#00c1de',
  101. borderWidth: 3,
  102. barBorderRadius: 15,
  103. }
  104. }
  105. }, ]
  106. })
  107. //各医院住院人次
  108. var histogramChart2 = echarts.init(document.getElementById('histogramChart2'));
  109. histogramChart2.setOption({
  110. grid: {
  111. top: '20%',
  112. left: '32%'
  113. },
  114. xAxis: {
  115. show: false
  116. },
  117. yAxis: [{
  118. show: true,
  119. data: ['厦门第一医院','厦门中山医院','厦门中医院','厦门第五医院',],
  120. inverse: true,
  121. axisLine: {
  122. show: false
  123. },
  124. splitLine: {
  125. show: false
  126. },
  127. axisTick: {
  128. show: false
  129. },
  130. axisLabel: {
  131. color: '#fff',
  132. formatter: (value, index) => {
  133. return [
  134. `{lg|${index+1}} ` + '{title|' + value + '} '
  135. ].join('\n')
  136. },
  137. rich: {
  138. lg: {
  139. backgroundColor: '#339911',
  140. color: '#fff',
  141. borderRadius: 15,
  142. // padding: 5,
  143. align: 'center',
  144. width: 15,
  145. height: 15
  146. },
  147. }
  148. },
  149. }, {
  150. show: true,
  151. inverse: true,
  152. data: [2200, 2400, 2600, 2800],
  153. axisLabel: {
  154. textStyle: {
  155. fontSize: 12,
  156. color: '#fff',
  157. },
  158. },
  159. axisLine: {
  160. show: false
  161. },
  162. splitLine: {
  163. show: false
  164. },
  165. axisTick: {
  166. show: false
  167. },
  168. }],
  169. series: [{
  170. name: '条',
  171. type: 'bar',
  172. yAxisIndex: 0,
  173. data: [22, 24, 26, 28],
  174. barWidth: 10,
  175. itemStyle: {
  176. normal: {
  177. barBorderRadius: 20,
  178. color: function(params) {
  179. var num = myColor.length;
  180. return myColor[params.dataIndex % num]
  181. },
  182. }
  183. },
  184. label: {
  185. normal: {
  186. show: true,
  187. position: 'inside',
  188. formatter: '{c}%'
  189. }
  190. },
  191. }, {
  192. name: '框',
  193. type: 'bar',
  194. yAxisIndex: 1,
  195. barGap: '-100%',
  196. data: [100, 100, 100, 100],
  197. barWidth: 15,
  198. itemStyle: {
  199. normal: {
  200. color: 'none',
  201. borderColor: '#00c1de',
  202. borderWidth: 3,
  203. barBorderRadius: 15,
  204. }
  205. }
  206. }, ]
  207. })
  208. //手术工作量
  209. var pieChart1 = echarts.init(document.getElementById('pieChart1'));
  210. pieChart1.setOption({
  211. color:["#87cefa","#ff7f50","#32cd32","#da70d6",],
  212. tooltip : {
  213. trigger: 'item',
  214. formatter: "{a}<br/>{b}<br/>{c}台"
  215. },
  216. calculable : true,
  217. series : [
  218. {
  219. name:'手术工作量',
  220. type:'pie',
  221. radius : [30, 110],
  222. center : ['50%', '50%'],
  223. roseType : 'area',
  224. x: '50%',
  225. max: 40,
  226. sort : 'ascending',
  227. data:[
  228. {value:10, name:'厦门第一医院'},
  229. {value:5, name:'厦门中山医院'},
  230. {value:15, name:'厦门中医院'},
  231. {value:25, name:'厦门第五医院'},
  232. ]
  233. }
  234. ]
  235. })
  236. //医疗费用
  237. var lineChart1 = echarts.init(document.getElementById('lineChart1'));
  238. lineChart1.setOption( {
  239. color:["#87cefa","#ff7f50","#32cd32","#da70d6",],
  240. tooltip : {
  241. trigger: 'item',
  242. formatter: "{a}<br/>{b}<br/>{c}元"
  243. },
  244. legend: {
  245. data:['厦门第一医院','厦门中山医院','厦门中医院','厦门第五医院',],
  246. y: 'bottom',
  247. x:'center',
  248. textStyle:{
  249. color:'#fff',
  250. fontSize:12
  251. }
  252. },
  253. grid:{
  254. left: '5%',
  255. right: '5%',
  256. bottom: '10%',
  257. containLabel: true
  258. },
  259. calculable : true,
  260. xAxis : [
  261. {
  262. type : 'category',
  263. boundaryGap : false,
  264. data : ['周一','周二','周三','周四','周五','周六','周日'],
  265. axisLine:{
  266. lineStyle:{
  267. color: '#87cefa'
  268. },
  269. },
  270. axisLabel : {
  271. interval:0,
  272. rotate:40,
  273. textStyle: {
  274. color: '#fff',
  275. fontSize:13
  276. }
  277. }
  278. }
  279. ],
  280. yAxis : [
  281. {
  282. type : 'value',
  283. axisLine:{
  284. lineStyle:{
  285. color: '#87cefa'
  286. },
  287. },
  288. splitLine: {
  289. "show": false
  290. },
  291. axisLabel: {
  292. textStyle: {
  293. color: '#fff'
  294. },
  295. formatter: function (value) {
  296. return value + "元"
  297. },
  298. },
  299. }
  300. ],
  301. series : [
  302. {
  303. name:'厦门第一医院',
  304. type:'line',
  305. smooth:true,
  306. itemStyle: {normal: {areaStyle: {type: 'default'}}},
  307. data:[10, 12, 21, 54, 260, 830, 710]
  308. },
  309. {
  310. name:'厦门中山医院',
  311. type:'line',
  312. smooth:true,
  313. itemStyle: {normal: {areaStyle: {type: 'default'}}},
  314. data:[30, 182, 434, 791, 390, 30, 10]
  315. },
  316. {
  317. name:'厦门中医院',
  318. type:'line',
  319. smooth:true,
  320. itemStyle: {normal: {areaStyle: {type: 'default'}}},
  321. data:[1320, 1132, 601, 234, 120, 90, 20]
  322. },
  323. {
  324. name:'厦门第五医院',
  325. type:'line',
  326. smooth:true,
  327. itemStyle: {normal: {areaStyle: {type: 'default'}}},
  328. data:[320, 132, 61, 34, 20, 9, 2]
  329. }
  330. ]
  331. })
  332. //体检人次
  333. var lineChart2 = echarts.init(document.getElementById('lineChart2'));
  334. lineChart2.setOption( {
  335. color:["#87cefa","#ff7f50","#32cd32","#da70d6",],
  336. tooltip : {
  337. trigger: 'item',
  338. formatter: "{a}<br/>{b}<br/>{c}人"
  339. },
  340. legend: {
  341. data:['厦门第一医院','厦门中山医院','厦门中医院','厦门第五医院',],
  342. y: 'bottom',
  343. x:'center',
  344. textStyle:{
  345. color:'#fff',
  346. fontSize:12
  347. }
  348. },
  349. grid:{
  350. left: '5%',
  351. right: '5%',
  352. bottom: '10%',
  353. containLabel: true
  354. },
  355. calculable : true,
  356. xAxis : [
  357. {
  358. type : 'category',
  359. boundaryGap : false,
  360. data : ['周一','周二','周三','周四','周五','周六','周日'],
  361. axisLine:{
  362. lineStyle:{
  363. color: '#87cefa'
  364. },
  365. },
  366. axisLabel : {
  367. interval:0,
  368. rotate:40,
  369. textStyle: {
  370. color: '#fff',
  371. fontSize:13
  372. }
  373. }
  374. }
  375. ],
  376. yAxis : [
  377. {
  378. type : 'value',
  379. axisLine:{
  380. lineStyle:{
  381. color: '#87cefa'
  382. },
  383. },
  384. splitLine: {
  385. "show": false
  386. },
  387. axisLabel: {
  388. textStyle: {
  389. color: '#fff'
  390. },
  391. formatter: function (value) {
  392. return value + "人"
  393. },
  394. },
  395. }
  396. ],
  397. series : [
  398. {
  399. name:'厦门第一医院',
  400. type:'line',
  401. smooth:true,
  402. itemStyle: {normal: {areaStyle: {type: 'default'}}},
  403. data:[120, 122, 221, 524, 460, 530, 610]
  404. },
  405. {
  406. name:'厦门中山医院',
  407. type:'line',
  408. smooth:true,
  409. itemStyle: {normal: {areaStyle: {type: 'default'}}},
  410. data:[130, 682, 534, 691, 490, 130, 110]
  411. },
  412. {
  413. name:'厦门中医院',
  414. type:'line',
  415. smooth:true,
  416. itemStyle: {normal: {areaStyle: {type: 'default'}}},
  417. data:[320, 132, 161, 134, 112, 190, 120]
  418. },
  419. {
  420. name:'厦门第五医院',
  421. type:'line',
  422. smooth:true,
  423. itemStyle: {normal: {areaStyle: {type: 'default'}}},
  424. data:[320, 132, 461, 34, 202, 93, 222]
  425. }
  426. ]
  427. })
  428. //床位数量分布
  429. var pieChart2 = echarts.init(document.getElementById('pieChart2'));
  430. pieChart2.setOption({
  431. color:["#87cefa","#ff7f50","#32cd32","#da70d6",],
  432. tooltip : {
  433. trigger: 'item',
  434. formatter: "{a}<br/>{b}<br/>{c}床"
  435. },
  436. calculable : true,
  437. series : [
  438. {
  439. name:'床位数量分布',
  440. type:'pie',
  441. radius : [30, 110],
  442. center : ['45%', '50%'],
  443. roseType : 'area',
  444. x: '50%',
  445. max: 40,
  446. sort : 'ascending',
  447. data:[
  448. {value:700, name:'厦门第一医院'},
  449. {value:500, name:'厦门中山医院'},
  450. {value:105, name:'厦门中医院'},
  451. {value:250, name:'厦门第五医院'},
  452. ]
  453. }
  454. ]
  455. })
  456. //药占比
  457. var histogramChart3 = echarts.init(document.getElementById('histogramChart3'));
  458. histogramChart3.setOption( {
  459. color:['#87cefa'],
  460. grid:{
  461. left: '5%',
  462. right: '5%',
  463. bottom: '5%',
  464. containLabel: true
  465. },
  466. tooltip : {
  467. trigger: 'item',
  468. formatter: "{a}<br/>{b}<br/>{c}%"
  469. },
  470. calculable : true,
  471. xAxis : [
  472. {
  473. type : 'category',
  474. data : ['厦门第一医院','厦门中山医院','厦门中医院','厦门第五医院',],
  475. axisLine:{
  476. lineStyle:{
  477. color: '#87cefa'
  478. },
  479. },
  480. axisLabel : {
  481. interval:0,
  482. rotate:40,
  483. textStyle: {
  484. color: '#fff',
  485. fontSize:13
  486. }
  487. }
  488. }
  489. ],
  490. yAxis : [
  491. {
  492. type : 'value',
  493. axisLine:{
  494. lineStyle:{
  495. color: '#87cefa'
  496. },
  497. },
  498. splitLine: {
  499. "show": false
  500. },
  501. axisLabel: {
  502. textStyle: {
  503. color: '#fff'
  504. },
  505. formatter: function (value) {
  506. return value + "%"
  507. },
  508. },
  509. }
  510. ],
  511. series : [
  512. {
  513. name:'药占比',
  514. type:'bar',
  515. barWidth:30,
  516. data:[60,80,70,50],
  517. },
  518. ]
  519. });
  520. //平均住院天数
  521. var histogramChart4 = echarts.init(document.getElementById('histogramChart4'));
  522. histogramChart4.setOption( {
  523. color:['#87cefa'],
  524. grid:{
  525. left: '5%',
  526. right: '5%',
  527. bottom: '5%',
  528. containLabel: true
  529. },
  530. tooltip : {
  531. trigger: 'item',
  532. formatter: "{a}<br/>{b}<br/>{c}天"
  533. },
  534. calculable : true,
  535. xAxis : [
  536. {
  537. type : 'category',
  538. data : ['厦门第一医院','厦门中山医院','厦门中医院','厦门第五医院',],
  539. axisLine:{
  540. lineStyle:{
  541. color: '#87cefa'
  542. },
  543. },
  544. axisLabel : {
  545. interval:0,
  546. rotate:40,
  547. textStyle: {
  548. color: '#fff',
  549. fontSize:13
  550. }
  551. }
  552. }
  553. ],
  554. yAxis : [
  555. {
  556. type : 'value',
  557. axisLine:{
  558. lineStyle:{
  559. color: '#87cefa'
  560. },
  561. },
  562. splitLine: {
  563. "show": false
  564. },
  565. axisLabel: {
  566. textStyle: {
  567. color: '#fff'
  568. },
  569. formatter: function (value) {
  570. return value + "天"
  571. },
  572. },
  573. }
  574. ],
  575. series : [
  576. {
  577. name:'平均住院天数',
  578. type:'bar',
  579. barWidth:30,
  580. data:[6,8,7,5],
  581. },
  582. ]
  583. });
  584. }