home.js 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. toastr.options = {
  2. "closeButton": true,
  3. "positionClass": "toast-top-center",
  4. "preventDuplicates": true
  5. }
  6. new Vue({
  7. el: '#main',
  8. data: {
  9. leftChart1:null,
  10. city:'贵港市',
  11. town: [
  12. {
  13. "townName": "港北区",
  14. "result": "26531"
  15. },
  16. {
  17. "townName": "港南区",
  18. "result": "25634"
  19. },
  20. {
  21. "townName": "覃塘区",
  22. "result": "12587"
  23. },
  24. {
  25. "townName": "平南县",
  26. "result": "74128"
  27. },
  28. {
  29. "townName": "桂平市",
  30. "result": "113485"
  31. }
  32. ],
  33. },
  34. mounted: function() {
  35. },
  36. methods: {
  37. setCity(item){
  38. this.city = item.townName
  39. }
  40. }
  41. });
  42. //高发疾病
  43. var gaoFaChart = echarts.init(document.getElementById('div-gaofa-disease-chart'));
  44. var gaofaOption = {
  45. "tooltip": {
  46. "trigger": "axis"
  47. },
  48. grid: {top: 40, bottom: 30, left: 80},
  49. "yAxis": [{
  50. "type": "category",
  51. "name": "人次",
  52. "data": [
  53. "大肠杆菌性肠炎",
  54. "感染性腹泻",
  55. "胃肠炎",
  56. "糖尿病",
  57. "高血压病",
  58. "脑结核瘤",
  59. "骨结核",
  60. "肾结核",
  61. "心脏病",
  62. "急性脑膜炎球菌血症"
  63. ],
  64. axisPointer: {
  65. type: 'shadow'
  66. },
  67. axisTick: {
  68. show: false
  69. },
  70. axisLine: {
  71. lineStyle: {
  72. color: '#095f8e'
  73. }
  74. },
  75. axisLabel: {
  76. color: '#b5e1fc'
  77. },
  78. nameTextStyle:{color: '#b5e1fc'}
  79. }],
  80. "xAxis": [{
  81. "type": "value",
  82. axisPointer: {
  83. type: 'shadow'
  84. },
  85. axisTick: {
  86. show: false
  87. },
  88. axisLine: {
  89. lineStyle: {
  90. color: '#095f8e'
  91. }
  92. },
  93. axisLabel: {
  94. color: '#fff'
  95. },
  96. splitLine: {
  97. show: false // 不显示坐标轴刻度
  98. }
  99. }],
  100. "series": [{
  101. "smooth": true,
  102. "name": "门急诊疾病情况",
  103. "type": "bar",
  104. stack: '广告',
  105. barWidth: 20,
  106. "label": {
  107. show: false,
  108. position: "right"
  109. },
  110. "itemStyle": {
  111. "normal": {
  112. "lineStyle": {
  113. "shadowColor": "rgba(0,0,0,0.4)"
  114. },
  115. color: '#6576e0'
  116. }
  117. },
  118. "data": [
  119. "100",
  120. "2435",
  121. "1102",
  122. "544",
  123. "520",
  124. "446",
  125. "408",
  126. "315",
  127. "225",
  128. "101"
  129. ]
  130. },
  131. {
  132. "smooth": true,
  133. "name": "住院疾病情况",
  134. "type": "bar",
  135. stack: '广告',
  136. "label": {
  137. show: true,
  138. position: "right"
  139. },
  140. "itemStyle": {
  141. "normal": {
  142. "lineStyle": {
  143. "shadowColor": "rgba(0,0,0,0.4)"
  144. },
  145. barBorderRadius: [0, 8, 8, 0],
  146. color: '#00e6f3'
  147. }
  148. },
  149. "data": [
  150. "200",
  151. "3435",
  152. "1302",
  153. "684",
  154. "600",
  155. "546",
  156. "521",
  157. "463",
  158. "325",
  159. "301"
  160. ]
  161. }
  162. ]
  163. }
  164. gaoFaChart.setOption(gaofaOption);
  165. //死亡率
  166. var myChart = echarts.init(document.getElementById('div-shiwang-echart'));
  167. var option = {
  168. // "title": {
  169. // "text": "性别分布",
  170. // "subtext": "性别分布",
  171. // "x": "center"
  172. // },
  173. "tooltip": {
  174. "trigger": "item"
  175. },
  176. "series": [{
  177. "center": [
  178. "50%",
  179. "50%"
  180. ],
  181. radius: ['50%', '70%'],
  182. "name": "",
  183. "type": "pie",
  184. "itemStyle": {
  185. "normal": {
  186. "label": {
  187. "show": false
  188. },
  189. "labelLine": {
  190. "show": false
  191. }
  192. }
  193. },
  194. "data": [{
  195. "name": "恶性肿瘤",
  196. "value": "21365"
  197. },
  198. {
  199. "name": "脑血管疾病",
  200. "value": "188524"
  201. },
  202. {
  203. "name": "心脏病",
  204. "value": "14578"
  205. },
  206. {
  207. "name": "呼吸系统疾病",
  208. "value": "12635"
  209. },
  210. {
  211. "name": "损伤和中毒",
  212. "value": "15503"
  213. },
  214. {
  215. "name": "消化系统疾病",
  216. "value": "45621"
  217. },
  218. {
  219. "name": "内分泌、营养和代谢疾病",
  220. "value": "63215"
  221. },
  222. {
  223. "name": "必尿生殖系统疾病",
  224. "value": "32542"
  225. },
  226. {
  227. "name": "其他疾病",
  228. "value": "84523"
  229. }
  230. ]
  231. }]
  232. }
  233. myChart.setOption(option);
  234. //重点人群
  235. var zhongdianChart = echarts.init(document.getElementById('div-zhongidan-echart'));
  236. var zhongdianOption = {
  237. tooltip: {
  238. trigger: 'axis',
  239. axisPointer: {
  240. type: 'item',
  241. crossStyle: {
  242. color: '#fff'
  243. }
  244. }
  245. },
  246. grid: {top: 50, bottom: 30, left: 30,right:80},
  247. legend: {
  248. data:['平均床日数','环比'],
  249. textStyle: {
  250. color: '#b5e1fc'
  251. }
  252. },
  253. xAxis: [
  254. {
  255. type: 'category',
  256. data: ['1月','2月','3月','4月','5月','6月'],
  257. axisPointer: {
  258. type: 'shadow'
  259. },
  260. axisTick: {
  261. show: false
  262. },
  263. axisLine: {
  264. lineStyle: {
  265. color: '#095f8e'
  266. }
  267. },
  268. axisLabel: {
  269. color: '#b5e1fc'
  270. }
  271. }
  272. ],
  273. yAxis: [
  274. {
  275. type: 'value',
  276. name: '平均床日数',
  277. min: 0,
  278. max: 250,
  279. nameTextStyle: {
  280. color: '#b5e1fc' // 坐标轴名称颜色
  281. },
  282. splitLine: {
  283. show: false
  284. },
  285. axisLine: {
  286. lineStyle: {
  287. color: '#095f8e'
  288. }
  289. },
  290. axisLabel: {
  291. color: '#b5e1fc'
  292. }
  293. },
  294. {
  295. type: 'value',
  296. name: '环比',
  297. min: 0,
  298. max: 4,
  299. nameTextStyle: {
  300. color: '#b5e1fc' // 坐标轴名称颜色
  301. },
  302. splitLine: {
  303. show: false // 不显示坐标轴刻度
  304. },
  305. axisLine: {
  306. lineStyle: {
  307. color: '#095f8e' // 坐标轴轴线颜色
  308. }
  309. },
  310. axisLabel: {
  311. color: '#b5e1fc' // 坐标轴刻度标签文本颜色
  312. },
  313. show: false
  314. }
  315. ],
  316. series: [
  317. {
  318. name:'平均床日数',
  319. type:'bar',
  320. data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7],
  321. barWidth: 20,
  322. label: {
  323. normal: {
  324. show: true,
  325. position: 'top', // 在柱状图上方显示
  326. color: '#fff' // 柱状图上方显示的数值颜色
  327. }
  328. },
  329. itemStyle: {
  330. barBorderRadius: [8,8,0,0],
  331. color: '#00e6f3'
  332. }
  333. },
  334. {
  335. name:'环比',
  336. type:'line',
  337. yAxisIndex: 1,
  338. data:[2.0, 1, 3.3, 2,1.5, 3],
  339. itemStyle: {
  340. color: '#03fa6d'
  341. }
  342. }
  343. ]
  344. };
  345. zhongdianChart.setOption(zhongdianOption);