Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

basicInformationAnalysis.vue 51KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <div class="cell clearfix">
  8. <label class="title">
  9. <span class="name">日期查询</span> :
  10. </label>
  11. <div class="time">
  12. <ul class>
  13. <li
  14. :class="item.state == stateType ? 'active' : ''"
  15. @click="selectLapseTo(item.state)"
  16. v-for="item in month"
  17. :key="item.value"
  18. >{{ item.label }}</li>
  19. </ul>
  20. </div>
  21. <label class="title">
  22. <span class="name">查看范围</span> :
  23. </label>
  24. <div class="time">
  25. <ul class>
  26. <li
  27. :class="item.state == way ? 'active' : ''"
  28. @click="selectWay(item.state)"
  29. v-for="item in wayArr"
  30. :key="item.value"
  31. >{{ item.label }}</li>
  32. </ul>
  33. </div>
  34. <label class="title">
  35. <span class="name">日期查询</span> :
  36. </label>
  37. <el-date-picker
  38. v-model="listQuery.start_time"
  39. prefix-icon="el-icon-date"
  40. @change="changeTime"
  41. :editable="false"
  42. style="width: 196px;"
  43. type="date"
  44. placeholder="选择日期时间"
  45. align="right"
  46. format="yyyy-MM-dd"
  47. value-format="yyyy-MM-dd"
  48. :picker-options="pickerOptions"
  49. ></el-date-picker>
  50. <span class>-</span>
  51. <el-date-picker
  52. v-model="listQuery.end_time"
  53. prefix-icon="el-icon-date"
  54. @change="changeEndTime"
  55. :editable="false"
  56. style="width: 196px;"
  57. type="date"
  58. placeholder="选择日期时间"
  59. align="right"
  60. format="yyyy-MM-dd"
  61. value-format="yyyy-MM-dd"
  62. :picker-options="pickerOptions"
  63. ></el-date-picker>
  64. </div>
  65. <!-- <div class="cell clearfix">
  66. <label class="title"><span class="name">转归情况</span> : </label>
  67. <div class="time ">
  68. <ul class="">
  69. <li
  70. :class="item.lapseto == lapsetoType ? 'active' : ''"
  71. @click="selectLapseTo(item.lapseto)"
  72. v-for="item in lapsetoArr"
  73. :key="item.value"
  74. >
  75. {{ item.label }}
  76. </li>
  77. </ul>
  78. </div>
  79. </div> -->
  80. <!-- <div class="cell clearfix">
  81. <label class="title"><span class="name">病人来源</span> : </label>
  82. <div class="time ">
  83. <ul class="">
  84. <li
  85. :class="item.source == sourceType ? 'active' : ''"
  86. @click="selectSource(item.source)"
  87. v-for="item in sourceArr"
  88. :key="item.value"
  89. >
  90. {{ item.label }}
  91. </li>
  92. </ul>
  93. </div>
  94. </div> -->
  95. <div class="cell clearfix" v-show="treatShow">
  96. <label class="title">
  97. <span class="name">透析模式</span> :
  98. </label>
  99. <div class="time">
  100. <ul class>
  101. <li
  102. :class="item.state == stateMode ? 'active' : ''"
  103. @click="selectTreatMode(item.state)"
  104. v-for="item in treatmentMode"
  105. :key="item.mode_id"
  106. >{{ item.name }}</li>
  107. </ul>
  108. </div>
  109. </div>
  110. <div v-if="way == 0" class="cell clearfix" style="align-items:normal">
  111. <div style="float:left">
  112. <div class="infoBox" style="width:370px;">
  113. <div class="infoOne">
  114. <div class="titleBox">
  115. <span class="point"></span>
  116. <p class="infoTitle">透析总量({{total}}次)</p>
  117. </div>
  118. <div class="borderBox">
  119. <div v-for="(item,index) in modetype" :key="index">
  120. <span v-if="item.mode_id == 'HD'">
  121. <p>HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  122. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  123. </span>
  124. <span v-if="item.mode_id == 'HDF'">
  125. <p>HDF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  126. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  127. </span>
  128. <span v-if="item.mode_id == 'HD+HP'">
  129. <p>HD+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  130. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  131. </span>
  132. <span v-if="item.mode_id == 'HP'">
  133. <p>HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  134. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  135. </span>
  136. <span v-if="item.mode_id == 'HF'">
  137. <p>HF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  138. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  139. </span>
  140. <span v-if="item.mode_id == 'SCUF'">
  141. <p>SCUF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  142. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  143. </span>
  144. <span v-if="item.mode_id == 'IUF'">
  145. <p>IUF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  146. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  147. </span>
  148. <span v-if="item.mode_id == 'HFHD'">
  149. <p>HFHD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  150. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  151. </span>
  152. <span v-if="item.mode_id == 'HFHD+HP'">
  153. <p>HFHD+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  154. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  155. </span>
  156. <span v-if="item.mode_id == 'PHF'">
  157. <p>PHF:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  158. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  159. </span>
  160. <span v-if="item.mode_id == 'HFR'">
  161. <p>HFR:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  162. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  163. </span>
  164. <span v-if="item.mode_id == 'HDF+HP'">
  165. <p>HDF+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  166. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  167. </span>
  168. <span v-if="item.mode_id == 'HFHD+HP'">
  169. <p>HFHD+HP:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  170. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  171. </span>
  172. <span v-if="item.mode_id == '腹水回输'">
  173. <p>腹水回输:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  174. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  175. </span>
  176. <span v-if="item.mode_id == 'HD前置换'">
  177. <p>HD前置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  178. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  179. </span>
  180. <span v-if="item.mode_id == 'HD后置换'">
  181. <p>HD后置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  182. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  183. </span>
  184. <span v-if="item.mode_id == 'HDF前置换'">
  185. <p>HDF前置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  186. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  187. </span>
  188. <span v-if="item.mode_id == 'HDF后置换'">
  189. <p>HDF后置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  190. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  191. </span>
  192. <span v-if="item.mode_id == 'IUF+HD'">
  193. <p>IUF+HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  194. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  195. </span>
  196. </div>
  197. </div>
  198. </div>
  199. <div class="infoOne">
  200. <div class="titleBox">
  201. <span class="point2"></span>
  202. <p class="infoTitle">传染病统计</p>
  203. </div>
  204. <div class="borderBox2">
  205. <div v-for="(item,i) in this.InfectiousList" :key="i">
  206. <span v-if="item.disease_id == 2">
  207. <p>乙肝:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
  208. <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
  209. </span>
  210. <span v-if="item.disease_id == 3">
  211. <p>丙肝:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
  212. <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
  213. </span>
  214. <span v-if="item.disease_id == 4">
  215. <p>艾滋病:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
  216. <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
  217. </span>
  218. <span v-if="item.disease_id == 5">
  219. <p>肺结核:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
  220. <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
  221. </span>
  222. <span v-if="item.disease_id == 6">
  223. <p>梅毒:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
  224. <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
  225. </span>
  226. <span v-if="item.disease_id == 1">
  227. <p>其他:{{item.count}}人({{((item.count)/InfectiousTotal*100).toFixed(1)}}%)</p>
  228. <el-progress :percentage="((item.count)/InfectiousTotal*100).toFixed(1)"></el-progress>
  229. </span>
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. </div>
  235. <div style="float:left">
  236. <div class="infoBox">
  237. <div class="infoOne">
  238. <div class="titleBox">
  239. <span class="point1"></span>
  240. <p class="infoTitle">转归统计(总人数{{patientCount}}人)</p>
  241. </div>
  242. <div class="borderBox1">
  243. <p>留治:{{rollOutTotal}}人({{(rollOutTotal/patientCount*100).toFixed(1)}}%)</p>
  244. <el-progress :percentage="(rollOutTotal/patientCount*100).toFixed(1)"></el-progress>
  245. <p>转出:{{outTotal}}人({{(outTotal/patientCount*100).toFixed(1)}}%)</p>
  246. <el-progress :percentage="(outTotal/patientCount*100).toFixed(1)"></el-progress>
  247. </div>
  248. </div>
  249. <div class="infoOne">
  250. <div class="titleBox">
  251. <span class="point2"></span>
  252. <p class="infoTitle">男女比例</p>
  253. </div>
  254. <div class="borderBox2">
  255. <p>男:{{totalMan}}人({{(totalMan/totalGender*100).toFixed(1)}}%)</p>
  256. <el-progress :percentage="(totalMan/totalGender*100).toFixed(1)"></el-progress>
  257. <p>女:{{totalWoman}}人({{(totalWoman/totalGender*100).toFixed(1)}}%)</p>
  258. <el-progress :percentage="(totalWoman/totalGender*100).toFixed(1)"></el-progress>
  259. </div>
  260. </div>
  261. <div class="infoOne">
  262. <div class="titleBox">
  263. <span class="point"></span>
  264. <p class="infoTitle">年龄统计</p>
  265. </div>
  266. <div class="borderBox">
  267. <div v-for="(item,j) in ageCount" :key="j">
  268. <span v-if="item.age == 20">
  269. <p>年龄≤20:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
  270. <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
  271. </span>
  272. <span v-if="item.age == 40">
  273. <p>20&lt;年龄≤40:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
  274. <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
  275. </span>
  276. <span v-if="item.age == 60">
  277. <p>40&lt;年龄≤60:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
  278. <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
  279. </span>
  280. <span v-if="item.age == 80">
  281. <p>60&lt;年龄≤80:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
  282. <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
  283. </span>
  284. <span v-if="item.age ==150">
  285. <p>大于80:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
  286. <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
  287. </span>
  288. </div>
  289. </div>
  290. </div>
  291. <div class="infoOne">
  292. <div class="titleBox">
  293. <span class="point1"></span>
  294. <p class="infoTitle">透龄统计</p>
  295. </div>
  296. <div class="borderBox1">
  297. <div v-for="(item,index) in dialysisAge" :key="index">
  298. <span v-if="item.age== 1">
  299. <p>透析龄≤12:{{item.count}}人({{(item.count/patientCount*100).toFixed(1)}}%)</p>
  300. <el-progress :percentage="(item.count/patientCount*100).toFixed(1)"></el-progress>
  301. </span>
  302. <span v-if="item.age == 2">
  303. <p>12&lt;透析龄≤36:{{item.count}}人({{(item.count/patientCount*100).toFixed(1)}}%)</p>
  304. <el-progress :percentage="(item.count/patientCount*100).toFixed(1)"></el-progress>
  305. </span>
  306. <span v-if="item.age == 3">
  307. <p>36≤透析龄≤60:{{item.count}}/人({{(item.count/patientCount*100).toFixed(1)}}%)</p>
  308. <el-progress :percentage="(item.count/patientCount*100).toFixed(1)"></el-progress>
  309. </span>
  310. <span v-if="item.age == 4">
  311. 透析龄 ≥60:{{item.count}}人({{((item.count)/patientCount*100).toFixed(1)}}%)
  312. <el-progress :percentage="((item.count)/patientCount*100).toFixed(1)"></el-progress>
  313. </span>
  314. </div>
  315. </div>
  316. </div>
  317. </div>
  318. </div>
  319. </div>
  320. <div v-else>
  321. <div style="margin-bottom:20px;">
  322. <p style="font-size: 16px;font-weight: bold;color: #000;">透析总量</p>
  323. <line-chart :options="chart"></line-chart>
  324. </div>
  325. <div>
  326. <div class="cell clearfix" v-show="treatShow">
  327. <label class="title">
  328. <span class="name">转归状态</span> :
  329. </label>
  330. <div class="time">
  331. <ul class>
  332. <li
  333. :class="item.state == lapseMode ? 'active' : ''"
  334. @click="selectLapsetoMode(item.state)"
  335. v-for="item in lapsetoMode"
  336. :key="item.value"
  337. >{{ item.label }}</li>
  338. </ul>
  339. </div>
  340. </div>
  341. <p style="font-size: 16px;font-weight: bold;color: #000;">转归统计</p>
  342. <line-chart :options="bar"></line-chart>
  343. </div>
  344. </div>
  345. </div>
  346. </div>
  347. </template>
  348. <script>
  349. const moment = require('moment')
  350. import echarts from "echarts";
  351. import { GetOICData } from "@/api/qcd";
  352. import PieChart from "../qcd/components/BarChart";
  353. import { uParseTime } from "@/utils/tools";
  354. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  355. import LineChart from "../qcd/components/LineChart";
  356. import {getDialysisModeType,getTotalLapseCount,getTotalSexCount,getTotalInfectiousCount,getTotalAgeCount,getTotalDialysisCount,getTreatModeList,getCountModeId,getRolloutCount} from "@/api/common/common"
  357. export default {
  358. name: "dialysisTotal",
  359. components: {
  360. PieChart,
  361. BreadCrumb,
  362. LineChart
  363. },
  364. data() {
  365. return {
  366. pickerOptions: {
  367. disabledDate(time) {
  368. let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
  369. return time.getTime() > Date.now() || time.getTime() < threeMonths;;
  370. }
  371. },
  372. crumbs: [
  373. { path: false, name: "质控管理" },
  374. { path: false, name: "基本信息统计" }
  375. ],
  376. listQuery: {
  377. start_time: "",
  378. end_time: "",
  379. page: 1,
  380. limit: 10
  381. },
  382. stateType: 0,
  383. month: [
  384. { value: 0, label: "本月", state: 0 },
  385. { value: 1, label: "近三月", state: 1 },
  386. { value: 2, label: "近半年", state: 2 },
  387. { value: 3, label: "近一年", state: 3 }
  388. // { value:4,label:"自定义",state:4}
  389. ],
  390. modetype:[],
  391. total:0,
  392. patientCount:0,
  393. rollOut:0,
  394. RetentionCount:0,
  395. totalMan:0,
  396. totalWoman:0,
  397. totalGender:0,
  398. InfectiousList:[],
  399. InfectiousTotal:0,
  400. ageCount:[],
  401. ageTotal:0,
  402. otherTotal:0,
  403. totalone:0,
  404. totaltwo:0,
  405. totalthree:0,
  406. rollOutTotal:0,
  407. outTotal:0,
  408. dialysisAge:[],
  409. start:0,
  410. end:0,
  411. lapsetoType: 0,
  412. lapsetoArr: [
  413. { value: 0, label: '全部', source: 0, lapseto: 0 },
  414. { value: 1, label: '转出', source: 0, lapseto: 2 },
  415. { value: 2, label: '留治', source: 0, lapseto: 1 },
  416. { value: 3, label: '死亡', source:0, lapseto: 3 },
  417. ],
  418. sourceType: 0,
  419. sourceArr: [
  420. { value: 0, label: '全部', source: 0, lapseto: 0 },
  421. { value: 3, label: '门诊', source: 1, lapseto: 1 },
  422. { value: 4, label: '住院', source: 2, lapseto: 1 }
  423. ],
  424. way: 0,
  425. wayArr: [
  426. { value: 0, label: "统计图", state: 0 },
  427. { value: 1, label: "趋势图", state: 1 }
  428. ],
  429. modesData: {
  430. xAxis: [],
  431. series: []
  432. },
  433. modesDataTwo:{
  434. xAxis:[],
  435. series:[]
  436. },
  437. chart: {
  438. title: {
  439. text: "ECharts 入门示例"
  440. },
  441. tooltip: {},
  442. legend: {
  443. data: [],
  444. left: 0
  445. },
  446. xAxis: {
  447. data: []
  448. },
  449. yAxis: {
  450. axisLabel: {
  451. formatter: "{value} %"
  452. },
  453. show: false
  454. },
  455. series: [
  456. {
  457. name: "",
  458. type: "line",
  459. data: [],
  460. barWidth: 30,
  461. label: {
  462. normal: {
  463. show: true,
  464. position: "top",
  465. formatter: "{c}次"
  466. }
  467. },
  468. //配置样式
  469. itemStyle: {
  470. //通常情况下:
  471. //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
  472. normal: {
  473. color: function(params) {
  474. //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
  475. var colorList = [
  476. ["#A9E0F3", "#9FBDFC"],
  477. ["#FFD7C0", "#FF9994"]
  478. ];
  479. var index = params.dataIndex;
  480. if (params.dataIndex >= colorList.length) {
  481. index = params.dataIndex % colorList.length;
  482. }
  483. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  484. { offset: 0, color: colorList[index][0] },
  485. // { offset: 0.5, color: colorList[index][1] },
  486. { offset: 1, color: colorList[index][1] }
  487. ]);
  488. },
  489. barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
  490. },
  491. //鼠标悬停时:
  492. emphasis: {
  493. shadowBlur: 10,
  494. shadowOffsetX: 0,
  495. shadowColor: "rgba(0, 0, 0, 0.2)"
  496. }
  497. }
  498. }
  499. ],
  500. dataZoom: [
  501. {
  502. // Y轴固定,让内容滚动
  503. type: 'slider',
  504. show: false,
  505. xAxisIndex: [0],
  506. start: 1,
  507. end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
  508. zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
  509. },
  510. {
  511. type: 'inside',
  512. xAxisIndex: [0],
  513. start: 1,
  514. end: 20,
  515. zoomLock: true // 锁定区域禁止缩放
  516. }
  517. ],
  518. },
  519. bar: {
  520. title: {
  521. text: "ECharts 入门示例"
  522. },
  523. tooltip: {},
  524. legend: {
  525. data: [],
  526. left: 0
  527. },
  528. xAxis: {
  529. data: []
  530. },
  531. yAxis: {
  532. axisLabel: {
  533. formatter: "{value} %"
  534. },
  535. show: false
  536. },
  537. series: [
  538. {
  539. name: "",
  540. type: "line",
  541. data: [],
  542. barWidth: 30,
  543. label: {
  544. normal: {
  545. show: true,
  546. position: "top",
  547. formatter: "{c}次"
  548. }
  549. },
  550. //配置样式
  551. itemStyle: {
  552. //通常情况下:
  553. //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
  554. normal: {
  555. color: function(params) {
  556. //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
  557. var colorList = [
  558. ["#A9E0F3", "#9FBDFC"],
  559. ["#FFD7C0", "#FF9994"]
  560. ];
  561. var index = params.dataIndex;
  562. if (params.dataIndex >= colorList.length) {
  563. index = params.dataIndex % colorList.length;
  564. }
  565. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  566. { offset: 0, color: colorList[index][0] },
  567. // { offset: 0.5, color: colorList[index][1] },
  568. { offset: 1, color: colorList[index][1] }
  569. ]);
  570. },
  571. barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
  572. },
  573. //鼠标悬停时:
  574. emphasis: {
  575. shadowBlur: 10,
  576. shadowOffsetX: 0,
  577. shadowColor: "rgba(0, 0, 0, 0.2)"
  578. }
  579. }
  580. }
  581. ],
  582. dataZoom: [
  583. {
  584. // Y轴固定,让内容滚动
  585. type: 'slider',
  586. show: false,
  587. xAxisIndex: [0],
  588. start: 1,
  589. end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
  590. zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
  591. },
  592. {
  593. type: 'inside',
  594. xAxisIndex: [0],
  595. start: 1,
  596. end: 20,
  597. zoomLock: true // 锁定区域禁止缩放
  598. }
  599. ],
  600. },
  601. treatmentMode:[],
  602. stateMode:1,
  603. lapseMode:0,
  604. treatShow:false,
  605. mode_id:0,
  606. lapsetoMode:[
  607. { value: 0, label: "留治", state: 0 },
  608. { value: 1, label: "转出", state: 1}
  609. ],
  610. lapseid:0,
  611. startDate:"",
  612. endDate:"",
  613. };
  614. },
  615. methods: {
  616. getTimestamp(time) {
  617. // 把时间日期转成时间戳
  618. return new Date(time).getTime() / 1000;
  619. },
  620. changeTime(val) {
  621. this.stateType = 4
  622. var timeStar=Date.parse(val)/1000
  623. var timeEnd =Date.parse(this.listQuery.end_time)/1000
  624. var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
  625. if (time > 0) {
  626. this.$message.error("结束时间不能小于开始时间");
  627. this.start_time = "";
  628. } else {
  629. //统计透析总量
  630. this.getDialysisModeType(val,this.listQuery.end_time,this.lapsetoType,this.sourceType)
  631. //统计转归状态
  632. this.getTotalLapseCount(this.listQuery.start_time,this.listQuery.end_time,this.lapsetoType,this.sourceType)
  633. //统计男女比例
  634. this.getTotalSexCount(timeStar,timeEnd)
  635. //统计传染病
  636. this.getTotalInfectiousCount(this.listQuery.start_time,this.listQuery.end_time,this.lapsetoType,this.sourceType)
  637. //统计年龄
  638. this.getTotalAgeCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
  639. //统计透析年龄
  640. this.getTotalDialysisCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
  641. this.start = timeStar
  642. this.end =timeEnd
  643. this.getCountModeId()
  644. this.getRolloutCount(timeStar,timeEnd)
  645. }
  646. },
  647. changeEndTime(val) {
  648. this.stateType = 4
  649. var timeEnd=Date.parse(val)/1000
  650. var timeStar =Date.parse(this.listQuery.start_time)/1000
  651. var time =
  652. this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
  653. if (time < 0) {
  654. this.$message.error("结束时间不能小于开始时间");
  655. this.listQuery.end_time = "";
  656. } else {
  657. //统计透析总量
  658. this.getDialysisModeType(this.listQuery.start_time,val,this.lapsetoType,this.sourceType)
  659. //统计转归状态
  660. this.getTotalLapseCount(this.listQuery.start_time,this.listQuery.end_time,this.lapsetoType,this.sourceType)
  661. //统计男女比例
  662. this.getTotalSexCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
  663. //统计传染病
  664. this.getTotalInfectiousCount(this.listQuery.start_time,this.listQuery.end_time,this.lapsetoType,this.sourceType)
  665. //统计年龄
  666. this.getTotalAgeCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
  667. //统计透析年龄
  668. this.getTotalDialysisCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
  669. this.start = timeStar
  670. this.end =timeEnd
  671. this.getCountModeId()
  672. this.getRolloutCount(timeStar,timeEnd)
  673. }
  674. },
  675. selectLapseTo(state) {
  676. this.stateType = state;
  677. this.listQuery.state = state;
  678. //获取本月当前机构的透析模式
  679. const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
  680. const endDate = moment(new Date()).format('YYYY-MM-DD')
  681. var now = new Date()
  682. var nowMonth = now.getMonth(); //当前月
  683. var nowYear = now.getFullYear(); //当前年
  684. //本月的开始时间
  685. var monthStartDate = new Date(nowYear, nowMonth, 1);
  686. var timeStar=Date.parse(monthStartDate)/1000;//s
  687. // console.log("本月第一天",timeStar)
  688. //本月的结束时间
  689. var monthEndDate = new Date(nowYear, nowMonth+1, 0);
  690. var timeEnd=Date.parse(monthEndDate)/1000-1;//s
  691. console.log("本月最后一天",timeEnd)
  692. //本月
  693. if(state == 0){
  694. //统计透析总量
  695. this.getDialysisModeType(startDate,endDate,this.lapsetoType,this.sourceType)
  696. //统计转归状态
  697. this.getTotalLapseCount(startDate,endDate,this.lapsetoType,this.sourceType)
  698. //统计男女比例
  699. this.getTotalSexCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
  700. //统计传染病
  701. this.getTotalInfectiousCount(startDate,endDate,this.lapsetoType,this.sourceType)
  702. //统计年龄
  703. this.getTotalAgeCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
  704. //统计透析年龄
  705. this.getTotalDialysisCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
  706. this.start = timeStar
  707. this.end = timeEnd
  708. this.getCountModeId()
  709. this.getRolloutCount(timeStar,timeEnd)
  710. }
  711. //近三月
  712. if(state == 1){
  713. this.listQuery.start_time = ""
  714. this.listQuery.end_time = ""
  715. const startDate = moment().subtract('month', 3).format('YYYY-MM-DD')
  716. var startunitx = Date.parse(startDate)/1000
  717. // console.log("开始时间搓",startunitx)
  718. const endDate = moment(new Date()).format('YYYY-MM-DD')
  719. // console.log("结束时间",endDate)
  720. var endunitx = Date.parse(endDate)/1000
  721. // console.log("日期时间搓",endunitx)
  722. //统计透析总量
  723. this.getDialysisModeType(startDate,endDate,this.lapsetoType,this.sourceType)
  724. //统计转归状态
  725. this.getTotalLapseCount(startDate,endDate,this.lapsetoType,this.sourceType)
  726. //统计男女比例
  727. this.getTotalSexCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
  728. //统计传染病
  729. this.getTotalInfectiousCount(startDate,endDate,this.lapsetoType,this.sourceType)
  730. //统计年龄
  731. this.getTotalAgeCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
  732. //统计透析年龄
  733. this.getTotalDialysisCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
  734. this.start = startunitx
  735. this.end = endunitx
  736. this.getCountModeId()
  737. this.getRolloutCount(startunitx,endunitx)
  738. }
  739. //近半年
  740. if(state == 2){
  741. this.listQuery.start_time = ""
  742. this.listQuery.end_time = ""
  743. const startDate = moment().subtract('month', 6).format('YYYY-MM-DD')
  744. // console.log("6月前",startDate)
  745. var startunitx = Date.parse(startDate)/1000
  746. // console.log("开始时间搓",startunitx)
  747. const endDate = moment(new Date()).format('YYYY-MM-DD')
  748. // console.log("结束时间",endDate)
  749. var endunitx = Date.parse(endDate)/1000
  750. // console.log("日期时间搓",endunitx)
  751. //统计透析总量
  752. this.getDialysisModeType(startDate,endDate,this.lapsetoType,this.sourceType)
  753. //统计转归状态
  754. this.getTotalLapseCount(startDate,endDate,this.lapsetoType,this.sourceType)
  755. //统计男女比例
  756. this.getTotalSexCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
  757. //统计传染病
  758. this.getTotalInfectiousCount(startDate,endDate,this.lapsetoType,this.sourceType)
  759. //统计年龄
  760. this.getTotalAgeCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
  761. //统计透析年龄
  762. this.getTotalDialysisCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
  763. this.start = startunitx
  764. this.end = endunitx
  765. this.getCountModeId()
  766. this.getRolloutCount(startunitx,endunitx)
  767. }
  768. //近一年
  769. if(state == 3){
  770. this.listQuery.start_time = ""
  771. this.listQuery.end_time = ""
  772. const startDate = moment().subtract('month', 12).format('YYYY-MM-DD')
  773. // console.log("6月前",startDate)
  774. var startunitx = Date.parse(startDate)/1000
  775. // console.log("开始时间搓",startunitx)
  776. const endDate = moment(new Date()).format('YYYY-MM-DD')
  777. // console.log("结束时间",endDate)
  778. var endunitx = Date.parse(endDate)/1000
  779. // console.log("日期时间搓",endunitx)
  780. //统计透析总量
  781. this.getDialysisModeType(startDate,endDate,this.lapsetoType,this.sourceType)
  782. //统计转归状态
  783. this.getTotalLapseCount(startDate,endDate,this.lapsetoType,this.sourceType)
  784. //统计男女比例
  785. this.getTotalSexCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
  786. //统计传染病
  787. this.getTotalInfectiousCount(startDate,endDate,this.lapsetoType,this.sourceType)
  788. //统计年龄
  789. this.getTotalAgeCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
  790. //统计透析年龄
  791. this.getTotalDialysisCount(startunitx,endunitx,this.lapsetoType,this.sourceType)
  792. this.start = startunitx
  793. this.end = endunitx
  794. this.getCountModeId()
  795. this.getRolloutCount(startunitx,endunitx)
  796. }
  797. },
  798. selectTreatMode(state){
  799. this.mode_id = state
  800. this.stateMode = state;
  801. this.getCountModeId()
  802. },
  803. selectLapsetoMode(state){
  804. this.lapseid = state
  805. this.lapseMode = state
  806. this.getRolloutCount(this.start,this.end)
  807. },
  808. getDialysisModeType(startDate,endDate,lapsetoType,sourceType){
  809. this.modesData.series = []
  810. this.modesData.xAxis = []
  811. getDialysisModeType(startDate,endDate,lapsetoType,sourceType).then(response=>{
  812. if(response.data.state == 1){
  813. var modetype = response.data.data.modetype
  814. this.modetype = modetype
  815. var total = response.data.data.total
  816. // this.total = total.count
  817. this.total = total
  818. // console.log("数据",this.modetype)
  819. var modedate = response.data.data.modetype
  820. for(let i=0;i<modedate.length;i++){
  821. if(modedate[i].mode_id == 1){
  822. modedate[i].mode_id = "HD"
  823. }
  824. if(modedate[i].mode_id == 2){
  825. modedate[i].mode_id = "HDF"
  826. }
  827. if(modedate[i].mode_id == 3){
  828. modedate[i].mode_id = "HD+HP"
  829. }
  830. if(modedate[i].mode_id == 4){
  831. modedate[i].mode_id = "HP"
  832. }
  833. if(modedate[i].mode_id == 5){
  834. modedate[i].mode_id = "HF"
  835. }
  836. if(modedate[i].mode_id == 6){
  837. modedate[i].mode_id = "SCUF"
  838. }
  839. if(modedate[i].mode_id == 7){
  840. modedate[i].mode_id = "IUF"
  841. }
  842. if(modedate[i].mode_id == 8){
  843. modedate[i].mode_id = "HFHD"
  844. }
  845. if(modedate[i].mode_id == 9){
  846. modedate[i].mode_id = "HFHD+HP"
  847. }
  848. if(modedate[i].mode_id == 10){
  849. modedate[i].mode_id = "PHF"
  850. }
  851. if(modedate[i].mode_id == 11){
  852. modedate[i].mode_id = "HFR"
  853. }
  854. if(modedate[i].mode_id == 12){
  855. modedate[i].mode_id = "HDF+HP"
  856. }
  857. if(modedate[i].mode_id == 13){
  858. modedate[i].mode_id = "CRRT"
  859. }
  860. if(modedate[i].mode_id == 14){
  861. modedate[i].mode_id = "腹水回输"
  862. }
  863. if(modedate[i].mode_id == 15){
  864. modedate[i].mode_id = "HD前置换"
  865. }
  866. if(modedate[i].mode_id == 16){
  867. modedate[i].mode_id = "HD后置换"
  868. }
  869. if(modedate[i].mode_id == 17){
  870. modedate[i].mode_id = "HDF前置换"
  871. }
  872. if(modedate[i].mode_id == 18){
  873. modedate[i].mode_id = "HDF后置换"
  874. }
  875. if(modedate[i].mode_id == 19){
  876. modedate[i].mode_id = "IUF+HD"
  877. }
  878. // this.modesData.xAxis.push(modedate[i].mode_id)
  879. // this.modesData.series.push(((modedate[i].count/total)*100).toFixed(1))
  880. }
  881. // this.chart.series[0].data = this.modesData.series
  882. // this.chart.xAxis.data = this.modesData.xAxis
  883. // this.getArrLength1(this.chart.xAxis.data)
  884. }
  885. })
  886. },
  887. //统计转归
  888. getTotalLapseCount(startDate,endDate){
  889. this.modesDataTwo.series = []
  890. this.modesDataTwo.xAxis = []
  891. getTotalLapseCount(startDate,endDate).then(response=>{
  892. if(response.data.state == 1){
  893. var arr = [
  894. {name:"留治",count:0},
  895. {name:"转出",count:0}
  896. ]
  897. var patients = response.data.data.patients
  898. this.rollOutTotal = patients.length
  899. var patienttwo = response.data.data.patienttwo
  900. this.outTotal = patienttwo.length
  901. var count = response.data.data.count
  902. this.patientCount = count
  903. var rollout = response.data.data.rollout
  904. console.log("rollout",rollout)
  905. for(let i=0;i<arr.length;i++){
  906. arr[0].count = this.rollOutTotal
  907. arr[1].count = this.outTotal
  908. }
  909. // for(let j=0;j<arr.length;j++){
  910. // this.modesDataTwo.xAxis.push(arr[j].name)
  911. // this.modesDataTwo.series.push(((arr[j].count/count)*100).toFixed(1))
  912. // }
  913. // this.bar.series[0].data = this.modesDataTwo.series
  914. // this.bar.xAxis.data = this.modesDataTwo.xAxis
  915. // this.getArrLength(this.bar.xAxis.data)
  916. }
  917. })
  918. },
  919. //统计男女比例
  920. getTotalSexCount(timeStar,timeEnd){
  921. getTotalSexCount(timeStar,timeEnd).then(response=>{
  922. if(response.data.state === 1){
  923. var total = response.data.data.total
  924. // console.log("总人数",total)
  925. this.totalGender = total
  926. var totalMan = response.data.data.totalSex
  927. // console.log("男人",totalMan)
  928. this.totalMan = totalMan
  929. var totalWoman = total - totalMan
  930. this.totalWoman = totalWoman
  931. }
  932. })
  933. },
  934. //统计传染病
  935. getTotalInfectiousCount(timeStar,timeEnd){
  936. getTotalInfectiousCount(timeStar,timeEnd).then(response=>{
  937. if(response.data.state === 1){
  938. this.InfectiousTotal = response.data.data.total
  939. var infectious = response.data.data.count
  940. var otherTotal = response.data.data.otherTotal
  941. this.otherTotal = otherTotal
  942. var arr = [
  943. {count:0,disease_id:2},
  944. {count:0,disease_id:3},
  945. {count:0,disease_id:4},
  946. {count:0,disease_id:5},
  947. {count:0,disease_id:6},
  948. ]
  949. if(infectious.length == 0){
  950. this.InfectiousList = arr
  951. return false
  952. }
  953. this.InfectiousList = infectious
  954. }
  955. })
  956. },
  957. getTotalAgeCount(timeStar,timeEnd){
  958. getTotalAgeCount(timeStar,timeEnd).then(response=>{
  959. if(response.data.state == 1){
  960. var ageCount = response.data.data.ageCount
  961. // console.log("ageCount",ageCount)
  962. var arr = []
  963. arr = ageCount.sort(this.compare('age'))
  964. this.ageCount = arr
  965. this.ageTotal = response.data.data.total
  966. }
  967. })
  968. },
  969. compare:function (k) {
  970. return function (a, b) {
  971. var M = a[k];
  972. var N = b[k];
  973. return M - N; // 从低向高排
  974. // return N - M; // 从高向低排
  975. }
  976. },
  977. //统计透析年龄
  978. getTotalDialysisCount(timeStar,timeEnd){
  979. getTotalDialysisCount(timeStar,timeEnd).then(response=>{
  980. if(response.data.state == 1){
  981. var dataage = response.data.data.dataage
  982. // console.log("dataage",dataage)
  983. this.dialysisAge = dataage
  984. }
  985. })
  986. },
  987. getTreatModeList(timeStar,timeEnd){
  988. const params = {
  989. start_time:timeStar,
  990. end_time:timeEnd
  991. }
  992. getTreatModeList(params).then(response=>{
  993. if(response.data.state == 1){
  994. var list = response.data.data.list
  995. this.mode_id = list[0].mode_id
  996. for(let i=0;i<list.length;i++){
  997. if(list[i].mode_id == 1){
  998. list[i].name = "HD"
  999. list[i].state = 1
  1000. }
  1001. if(list[i].mode_id == 2){
  1002. list[i].name = "HDF"
  1003. list[i].state = 2
  1004. }
  1005. if(list[i].mode_id == 3){
  1006. list[i].name = "HD+HP"
  1007. list[i].state = 3
  1008. }
  1009. if(list[i].mode_id == 4){
  1010. list[i].name = "HP"
  1011. list[i].state = 4
  1012. }
  1013. if(list[i].mode_id == 5){
  1014. list[i].name = "HF"
  1015. list[i].state = 5
  1016. }
  1017. if(list[i].mode_id == 6){
  1018. list[i].name = "SCUF"
  1019. list[i].state = 6
  1020. }
  1021. if(list[i].mode_id == 7){
  1022. list[i].name = "IUF"
  1023. list[i].state = 7
  1024. }
  1025. if(list[i].mode_id == 8){
  1026. list[i].name="HFHD"
  1027. list[i].state = 8
  1028. }
  1029. if(list[i].mode_id == 9){
  1030. list[i].name ="HFHD+HP"
  1031. list[i].state = 9
  1032. }
  1033. if(list[i].mode_id == 10){
  1034. list[i].name = "PHF"
  1035. list[i].state = 10
  1036. }
  1037. if(list[i].mode_id == 11){
  1038. list[i].name = "HFR"
  1039. list[i].state = 11
  1040. }
  1041. if(list[i].mode_id == 12){
  1042. list[i].name = "HDF+HP"
  1043. list[i].state = 12
  1044. }
  1045. if(list[i].mode_id == 13){
  1046. list[i].name = "CRRT"
  1047. list[i].state = 13
  1048. }
  1049. if(list[i].mode_id == 14){
  1050. list[i].name = "腹水回输"
  1051. list[i].state = 14
  1052. }
  1053. if(list[i].mode_id == 15){
  1054. list[i].name = "HD前置换"
  1055. list[i].state = 15
  1056. }
  1057. if(list[i].mode_id == 16){
  1058. list[i].name = "HD后置换"
  1059. list[i].state = 16
  1060. }
  1061. if(list[i].mode_id == 17){
  1062. list[i].name = "HDF前置换"
  1063. list[i].state = 17
  1064. }
  1065. if(list[i].mode_id == 18){
  1066. list[i].name = "HDF后置换"
  1067. list[i].state = 18
  1068. }
  1069. if(list[i].mode_id == 19) {
  1070. list[i].name = "IUF+HD"
  1071. list[i].state = 19
  1072. }
  1073. }
  1074. this.treatmentMode = list
  1075. }
  1076. })
  1077. },
  1078. selectWay(index){
  1079. this.way = index
  1080. if(index == 0){
  1081. this.treatShow = false
  1082. }
  1083. if(index == 1){
  1084. this.treatShow = true
  1085. this.getCountModeId()
  1086. }
  1087. },
  1088. getArrLength(result){
  1089. if(result.length > 10){
  1090. var dataZoom_end = (10/result.length)*100;
  1091. this.bar.dataZoom[0].end = dataZoom_end
  1092. }else{
  1093. var dataZoom_end = 100;
  1094. this.bar.dataZoom[0].end = dataZoom_end
  1095. }
  1096. },
  1097. getArrLength1(result){
  1098. if(result.length > 10){
  1099. var dataZoom_end = (10/result.length)*100;
  1100. this.chart.dataZoom[0].end = dataZoom_end
  1101. }else{
  1102. var dataZoom_end = 100;
  1103. this.chart.dataZoom[0].end = dataZoom_end
  1104. }
  1105. },
  1106. getCountModeId(){
  1107. const params = {
  1108. start_time:this.start,
  1109. end_time:this.end,
  1110. mode_id:this.mode_id
  1111. }
  1112. this.modesData.series = []
  1113. this.modesData.xAxis = []
  1114. getCountModeId(params).then(response=>{
  1115. if(response.data.state == 1){
  1116. var modeCount = response.data.data.modeCount
  1117. for(let i=0;i<modeCount.length;i++){
  1118. this.modesData.xAxis.push(moment(new Date(modeCount[i].dialysis_date*1000)).format('YYYY-MM-DD'))
  1119. this.modesData.series.push(modeCount[i].Count)
  1120. this.chart.series[0].data = this.modesData.series
  1121. this.chart.xAxis.data = this.modesData.xAxis
  1122. this.getArrLength1(this.chart.xAxis.data)
  1123. }
  1124. }
  1125. })
  1126. },
  1127. getRolloutCount(){
  1128. this.modesDataTwo.series = []
  1129. this.modesDataTwo.xAxis = []
  1130. const params = {
  1131. start_time:this.start,
  1132. end_time:this.end
  1133. }
  1134. getRolloutCount(params).then(response=>{
  1135. if(response.data.state == 1){
  1136. var rollout = response.data.data.rollout
  1137. var arr = []
  1138. var arrOne = []
  1139. for(let i=0;i<rollout.length;i++){
  1140. if(rollout[i].lapseto_type == 1){
  1141. arr.push(rollout[i])
  1142. }
  1143. if(rollout[i].lapseto_type == 2){
  1144. arrOne.push(rollout[i])
  1145. }
  1146. }
  1147. if(this.lapseid == 0){
  1148. this.modesDataTwo.xAxis = []
  1149. this.modesDataTwo.series = []
  1150. for(let i=0;i<arr.length;i++){
  1151. this.modesDataTwo.xAxis.push(moment(new Date(arr[i]. lapseto_time*1000)).format('YYYY-MM-DD'))
  1152. this.modesDataTwo.series.push(arr[i].Count)
  1153. }
  1154. this.bar.series[0].data = this.modesDataTwo.series
  1155. this.bar.xAxis.data = this.modesDataTwo.xAxis
  1156. this.getArrLength(this.bar.xAxis.data)
  1157. }
  1158. if(this.lapseid == 1){
  1159. this.modesDataTwo.xAxis = []
  1160. this.modesDataTwo.series = []
  1161. for(let i=0;i<arrOne.length;i++){
  1162. this.modesDataTwo.xAxis.push(moment(new Date(arrOne[i].lapseto_time*1000)).format('YYYY-MM-DD'))
  1163. this.modesDataTwo.series.push(arrOne[i].Count)
  1164. }
  1165. this.bar.series[0].data = this.modesDataTwo.series
  1166. this.bar.xAxis.data = this.modesDataTwo.xAxis
  1167. this.getArrLength(this.bar.xAxis.data)
  1168. }
  1169. }
  1170. })
  1171. },
  1172. selectSource(source) {
  1173. this.sourceType = source
  1174. this.getDialysisModeType(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
  1175. this.getTotalLapseCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
  1176. this.getTotalSexCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
  1177. this.getTotalInfectiousCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
  1178. this.getTotalAgeCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
  1179. this.getTotalDialysisCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
  1180. },
  1181. selectLapseTo(lapseto) {
  1182. this.lapsetoType = lapseto
  1183. this.getDialysisModeType(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
  1184. this.getTotalLapseCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
  1185. this.getTotalSexCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
  1186. this.getTotalInfectiousCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
  1187. this.getTotalAgeCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
  1188. this.getTotalDialysisCount(this.startDate,this.endDate,this.lapsetoType,this.sourceType)
  1189. },
  1190. },
  1191. created() {
  1192. //获取本月当前机构的透析模式
  1193. const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
  1194. const endDate = moment(new Date()).format('YYYY-MM-DD')
  1195. var now = new Date()
  1196. var nowMonth = now.getMonth(); //当前月
  1197. var nowYear = now.getFullYear(); //当前年
  1198. //本月的开始时间
  1199. var monthStartDate = new Date(nowYear, nowMonth, 1);
  1200. var timeStar=Date.parse(monthStartDate)/1000;//s
  1201. //本月的结束时间
  1202. var monthEndDate = new Date(nowYear, nowMonth+1, 0);
  1203. var timeEnd=Date.parse(monthEndDate)/1000-1;//s
  1204. this.startDate = startDate
  1205. this.endDate = endDate
  1206. //统计透析总量
  1207. this.getDialysisModeType(startDate,endDate,this.lapsetoType,this.sourceType)
  1208. //统计转归状态
  1209. this.getTotalLapseCount(startDate,endDate,this.lapsetoType,this.sourceType)
  1210. //统计男女比例
  1211. this.getTotalSexCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
  1212. //统计传染病
  1213. this.getTotalInfectiousCount(startDate,endDate,this.lapsetoType,this.sourceType)
  1214. //统计年龄
  1215. this.getTotalAgeCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
  1216. //统计透析年龄
  1217. this.getTotalDialysisCount(timeStar,timeEnd,this.lapsetoType,this.sourceType)
  1218. //获取当前选中时间所有的透析模式
  1219. this.getTreatModeList(timeStar,timeEnd)
  1220. this.start = timeStar
  1221. this.end = timeEnd
  1222. this.getRolloutCount(timeStar,timeEnd)
  1223. },
  1224. };
  1225. </script>
  1226. <style rel="stylesheet/scss" lang="scss" scoped>
  1227. .infoBox {
  1228. display: flex;
  1229. flex-wrap: wrap;
  1230. .infoOne {
  1231. margin-right: 30px;
  1232. margin-top: 20px;
  1233. .titleBox {
  1234. display: flex;
  1235. align-items: center;
  1236. }
  1237. .point {
  1238. display: inline-block;
  1239. width: 7px;
  1240. height: 7px;
  1241. background: linear-gradient(
  1242. 90deg,
  1243. rgba(169, 224, 243, 1),
  1244. rgba(159, 189, 252, 1)
  1245. );
  1246. border-radius: 50%;
  1247. }
  1248. .point1 {
  1249. width: 7px;
  1250. height: 7px;
  1251. background: linear-gradient(
  1252. 90deg,
  1253. rgba(255, 215, 192, 1),
  1254. rgba(255, 153, 148, 1)
  1255. );
  1256. border-radius: 50%;
  1257. }
  1258. .point2 {
  1259. width: 7px;
  1260. height: 7px;
  1261. background: linear-gradient(
  1262. 90deg,
  1263. rgba(215, 195, 253, 1),
  1264. rgba(179, 168, 247, 1)
  1265. );
  1266. border-radius: 50%;
  1267. }
  1268. .infoTitle {
  1269. font-size: 16px;
  1270. font-weight: bold;
  1271. margin-left: 5px;
  1272. color: #000;
  1273. }
  1274. .borderBox {
  1275. width: 340px;
  1276. min-height: 140px;
  1277. background: rgba(255, 255, 255, 1);
  1278. border: 1px solid rgba(229, 229, 229, 1);
  1279. border-radius: 10px;
  1280. padding: 0 14px 20px;
  1281. margin-top: 10px;
  1282. p {
  1283. font-size: 14px;
  1284. color: #000;
  1285. margin: 10px 0 3px;
  1286. }
  1287. }
  1288. .borderBox1 {
  1289. width: 340px;
  1290. min-height: 140px;
  1291. background: rgba(255, 255, 255, 1);
  1292. border: 1px solid rgba(229, 229, 229, 1);
  1293. border-radius: 10px;
  1294. padding: 0 14px 20px;
  1295. margin-top: 10px;
  1296. p {
  1297. font-size: 14px;
  1298. color: #000;
  1299. margin: 10px 0 3px;
  1300. }
  1301. }
  1302. .borderBox2 {
  1303. width: 340px;
  1304. min-height: 140px;
  1305. background: rgba(255, 255, 255, 1);
  1306. border: 1px solid rgba(229, 229, 229, 1);
  1307. border-radius: 10px;
  1308. padding: 0 14px 20px;
  1309. margin-top: 10px;
  1310. p {
  1311. font-size: 14px;
  1312. color: #000;
  1313. margin: 10px 0 3px;
  1314. }
  1315. }
  1316. }
  1317. }
  1318. </style>
  1319. <style lang="scss">
  1320. .infoBox {
  1321. .infoOne {
  1322. .el-progress-bar__outer{
  1323. height:10px !important;
  1324. }
  1325. .borderBox {
  1326. .el-progress-bar__inner {
  1327. background: linear-gradient(
  1328. 90deg,
  1329. rgba(169, 224, 243, 1),
  1330. rgba(159, 189, 252, 1)
  1331. );
  1332. }
  1333. .el-progress-bar{
  1334. margin-right: -59px;
  1335. padding-right: 60px;
  1336. }
  1337. }
  1338. .borderBox1 {
  1339. .el-progress-bar__inner {
  1340. background: linear-gradient(
  1341. 90deg,
  1342. rgba(255, 215, 192, 1),
  1343. rgba(255, 153, 148, 1)
  1344. );
  1345. }
  1346. .el-progress-bar{
  1347. margin-right: -59px;
  1348. padding-right: 60px;
  1349. }
  1350. }
  1351. .borderBox2 {
  1352. .el-progress-bar__inner {
  1353. background: linear-gradient(
  1354. 90deg,
  1355. rgba(215, 195, 253, 1),
  1356. rgba(179, 168, 247, 1)
  1357. );
  1358. }
  1359. .el-progress-bar{
  1360. margin-right: -59px;
  1361. padding-right: 60px;
  1362. }
  1363. }
  1364. }
  1365. }
  1366. </style>