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

basicInformationAnalysis.vue 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  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. <el-date-picker
  25. v-model="listQuery.start_time"
  26. prefix-icon="el-icon-date"
  27. @change="changeTime"
  28. :editable="false"
  29. style="width: 196px;"
  30. type="date"
  31. placeholder="选择日期时间"
  32. align="right"
  33. format="yyyy-MM-dd"
  34. value-format="yyyy-MM-dd"
  35. ></el-date-picker>
  36. <span class>-</span>
  37. <el-date-picker
  38. v-model="listQuery.end_time"
  39. prefix-icon="el-icon-date"
  40. @change="changeEndTime"
  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. ></el-date-picker>
  49. </div>
  50. <div class="cell clearfix" style="align-items:normal">
  51. <div style="float:left">
  52. <div class="infoBox">
  53. <div class="infoOne">
  54. <div class="titleBox">
  55. <span class="point"></span>
  56. <p class="infoTitle">透析总量({{total}}次)</p>
  57. </div>
  58. <div class="borderBox">
  59. <div v-for="(item,index) in modetype" :key="index">
  60. <p>{{item.mode_id}}:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
  61. <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
  62. </div>
  63. <p>HD:64次(64%)</p>
  64. <el-progress :percentage="70"></el-progress>
  65. </div>
  66. </div>
  67. <div class="infoOne">
  68. <div class="titleBox">
  69. <span class="point2"></span>
  70. <p class="infoTitle">传染病统计</p>
  71. </div>
  72. <div class="borderBox2">
  73. <div v-for="(item,i) in this.InfectiousList" :key="i">
  74. <span v-if="item.disease_id == 2">
  75. <p>乙肝:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
  76. <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
  77. </span>
  78. <span v-if="item.disease_id == 3">
  79. <p>丙肝:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
  80. <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
  81. </span>
  82. <span v-if="item.disease_id == 4">
  83. <p>艾滋病:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
  84. <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
  85. </span>
  86. <span v-if="item.disease_id == 5">
  87. <p>肺结核:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
  88. <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
  89. </span>
  90. <span v-if="item.disease_id == 6">
  91. <p>梅毒:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
  92. <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
  93. </span>
  94. <span v-if="item.disease_id == 1">
  95. <p>其他:{{item.count + otherTotal}}人({{((item.count+otherTotal)/InfectiousTotal*100).toFixed(1)}}%)</p>
  96. <el-progress :percentage="((item.count+otherTotal)/InfectiousTotal*100).toFixed(1)"></el-progress>
  97. </span>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. <div style="float:left">
  104. <div class="infoBox">
  105. <div class="infoOne">
  106. <div class="titleBox">
  107. <span class="point1"></span>
  108. <p class="infoTitle">转归统计(总人数{{patientCount}}人)</p>
  109. </div>
  110. <div class="borderBox1">
  111. <p>留治:{{RetentionCount}}人({{(RetentionCount/patientCount*100).toFixed(1)}}%)</p>
  112. <el-progress :percentage="(RetentionCount/patientCount*100).toFixed(1)"></el-progress>
  113. <p>转出:{{rollOut}}人({{(rollOut/patientCount*100).toFixed(1)}}%)</p>
  114. <el-progress :percentage="(rollOut/patientCount*100).toFixed(1)"></el-progress>
  115. </div>
  116. </div>
  117. <div class="infoOne">
  118. <div class="titleBox">
  119. <span class="point2"></span>
  120. <p class="infoTitle">男女比例</p>
  121. </div>
  122. <div class="borderBox2">
  123. <p>男:{{totalMan}}人({{(totalMan/totalGender*100).toFixed(1)}}%)</p>
  124. <el-progress :percentage="(totalMan/totalGender*100).toFixed(1)"></el-progress>
  125. <p>女:{{totalWoman}}人({{(totalWoman/totalGender*100).toFixed(1)}}%)</p>
  126. <el-progress :percentage="(totalWoman/totalGender*100).toFixed(1)"></el-progress>
  127. </div>
  128. </div>
  129. <div class="infoOne">
  130. <div class="titleBox">
  131. <span class="point"></span>
  132. <p class="infoTitle">年龄统计</p>
  133. </div>
  134. <div class="borderBox">
  135. <div v-for="(item,j) in ageCount" :key="j">
  136. <span v-if="item.age == 20">
  137. <p>年龄≤20:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
  138. <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
  139. </span>
  140. <span v-if="item.age == 40">
  141. <p>20<年龄≤40:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
  142. <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
  143. </span>
  144. <span v-if="item.age == 60">
  145. <p>40<年龄≤60:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
  146. <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
  147. </span>
  148. <span v-if="item.age == 80">
  149. <p>60<年龄≤80:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
  150. <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
  151. </span>
  152. <span v-if="item.age ==150">
  153. <p>大于80:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
  154. <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
  155. </span>
  156. </div>
  157. </div>
  158. </div>
  159. <div class="infoOne">
  160. <div class="titleBox">
  161. <span class="point1"></span>
  162. <p class="infoTitle">透龄统计</p>
  163. </div>
  164. <div class="borderBox1">
  165. <p>透析龄≤12:64人(64%)</p>
  166. <el-progress :percentage="70"></el-progress>
  167. <p>12<透析龄≤36:64人(64%)</p>
  168. <el-progress :percentage="70"></el-progress>
  169. <p>36≤透析龄≤60:64人(64%)</p>
  170. <el-progress :percentage="70"></el-progress>
  171. <p>透析龄 ≥60:64人(64%)</p>
  172. <el-progress :percentage="70"></el-progress>
  173. </div>
  174. </div>
  175. </div>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. </template>
  181. <script>
  182. const moment = require('moment')
  183. import { GetOICData } from "@/api/qcd";
  184. import PieChart from "../qcd/components/BarChart";
  185. import { uParseTime } from "@/utils/tools";
  186. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  187. import {getDialysisModeType,getTotalLapseCount,getTotalSexCount,getTotalInfectiousCount,getTotalAgeCount,getTotalDialysisCount} from "@/api/common/common"
  188. export default {
  189. name: "dialysisTotal",
  190. components: {
  191. PieChart,
  192. BreadCrumb
  193. },
  194. data() {
  195. return {
  196. crumbs: [
  197. { path: false, name: "科室质控" },
  198. { path: false, name: "基本信息统计" }
  199. ],
  200. listQuery: {
  201. start_time: "",
  202. end_time: "",
  203. page: 1,
  204. limit: 10
  205. },
  206. stateType: 0,
  207. month: [
  208. { value: 0, label: "本月", state: 0 },
  209. { value: 1, label: "近三个月", state: 1 },
  210. { value: 2, label: "近半年", state: 2 },
  211. { value: 3, label: "近一年", state: 3 }
  212. ],
  213. modetype:[],
  214. total:0,
  215. patientCount:0,
  216. rollOut:0,
  217. RetentionCount:0,
  218. totalMan:0,
  219. totalWoman:0,
  220. totalGender:0,
  221. InfectiousList:[],
  222. InfectiousTotal:0,
  223. ageCount:[],
  224. ageTotal:0,
  225. otherTotal:0,
  226. };
  227. },
  228. methods: {
  229. getTimestamp(time) {
  230. // 把时间日期转成时间戳
  231. return new Date(time).getTime() / 1000;
  232. },
  233. changeTime() {},
  234. changeEndTime(val) {
  235. var time =
  236. this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
  237. if (time < 0) {
  238. this.$message.error("结束时间不能小于开始时间");
  239. this.listQuery.end_time = "";
  240. } else {
  241. }
  242. },
  243. selectLapseTo(state) {
  244. this.stateType = state;
  245. this.listQuery.state = state;
  246. },
  247. getDialysisModeType(startDate,endDate){
  248. getDialysisModeType(startDate,endDate).then(response=>{
  249. if(response.data.state == 1){
  250. var modetype = response.data.data.modetype
  251. console.log("mode---",modetype)
  252. var total = response.data.data.total
  253. console.log("total",total)
  254. this.total = total
  255. for(let i=0;i<modetype.length;i++){
  256. if(modetype[i].mode_id == 1){
  257. modetype[i].mode_id = "HD"
  258. }
  259. if(modetype[i].mode_id == 2){
  260. modetype[i].mode_id = "HDF"
  261. }
  262. if(modetype[i].mode_id == 3){
  263. modetype[i].mode_id = "HD+HP"
  264. }
  265. if(modetype[i].mode_id == 4){
  266. modetype[i].mode_id = "HP"
  267. }
  268. if(modetype[i].mode_id == 5){
  269. modetype[i].mode_id = "HF"
  270. }
  271. if(modetype[i].mode_id == 6){
  272. modetype[i].mode_id = "SCUF"
  273. }
  274. if(modetype[i].mode_id == 7){
  275. modetype[i].mode_id = "IUF"
  276. }
  277. if(modetype[i].mode_id == 8){
  278. modetype[i].mode_id = "HFHD"
  279. }
  280. if(modetype[i].mode_id == 9){
  281. modetype[i].mode_id = "HFHD+HP"
  282. }
  283. if(modetype[i].mode_id == 10){
  284. modetype[i].mode_id = "PHF"
  285. }
  286. if(modetype[i].mode_id == 11){
  287. modetype[i].mode_id = "HFR"
  288. }
  289. if(modetype[i].mode_id == 12){
  290. modetype[i].mode_id = "HDF+HP"
  291. }
  292. if(modetype[i].mode_id == 13){
  293. modetype[i].mode_id = "HFHD+HP"
  294. }
  295. if(modetype[i].mode_id == 14){
  296. modetype[i].mode_id = "腹水回输"
  297. }
  298. if(modetype[i].mode_id == 19){
  299. modetype[i].mode_id = "IUF+HD"
  300. }
  301. }
  302. this.modetype = modetype
  303. console.log("modetype",modetype)
  304. }
  305. })
  306. },
  307. //统计转归
  308. getTotalLapseCount(startDate,endDate){
  309. getTotalLapseCount(startDate,endDate).then(response=>{
  310. if(response.data.state == 1){
  311. var patients = response.data.data.patients
  312. var total = response.data.data.total
  313. this.rollOut = total
  314. var count = response.data.data.count
  315. this.patientCount = count
  316. this.RetentionCount = count-total
  317. }
  318. })
  319. },
  320. //统计男女比例
  321. getTotalSexCount(timeStar,timeEnd){
  322. getTotalSexCount(timeStar,timeEnd).then(response=>{
  323. if(response.data.state === 1){
  324. var total = response.data.data.total
  325. // console.log("总人数",total)
  326. this.totalGender = total
  327. var totalMan = response.data.data.totalSex
  328. // console.log("男人",totalMan)
  329. this.totalMan = totalMan
  330. var totalWoman = total - totalMan
  331. this.totalWoman = totalWoman
  332. }
  333. })
  334. },
  335. //统计传染病
  336. getTotalInfectiousCount(timeStar,timeEnd){
  337. getTotalInfectiousCount(timeStar,timeEnd).then(response=>{
  338. if(response.data.state === 1){
  339. this.InfectiousTotal = response.data.data.total
  340. var infectious = response.data.data.count
  341. this.InfectiousList = infectious
  342. // for(let i=0;i<infectious.length;i++){
  343. // if(infectious[i].disease_id == 1){
  344. // infectious[i].disease_id = "其他"
  345. // }
  346. // if(infectious[i].disease_id == 2){
  347. // infectious[i].disease_id = "乙肝"
  348. // }
  349. // if(infectious[i].disease_id == 3){
  350. // infectious[i].disease_id = "丙肝"
  351. // }
  352. // if(infectious[i].disease_id == 4){
  353. // infectious[i].disease_id = "艾滋病"
  354. // }
  355. // if(infectious[i].disease_id == 5){
  356. // infectious[i].disease_id = "肺结核"
  357. // }
  358. // if(infectious[i].disease_id == 6){
  359. // infectious[i].disease_id = "梅毒"
  360. // }
  361. // }
  362. var otherTotal = response.data.data.otherTotal
  363. this.otherTotal = otherTotal
  364. // console.log("infectious-----------",otherTotal)
  365. }
  366. })
  367. },
  368. getTotalAgeCount(timeStar,timeEnd){
  369. getTotalAgeCount(timeStar,timeEnd).then(response=>{
  370. if(response.data.state == 1){
  371. var ageCount = response.data.data.ageCount
  372. this.ageCount = ageCount
  373. // console.log("ageCount",ageCount)
  374. this.ageTotal = response.data.data.total
  375. // var two = response.data.data.two
  376. // console.log("two",two)
  377. }
  378. })
  379. },
  380. //统计透析年龄
  381. getTotalDialysisCount(timeStar,timeEnd){
  382. getTotalDialysisCount(timeStar,timeEnd).then(response=>{
  383. if(response.data.state == 1){
  384. var patients = response.data.data.patients
  385. var now = new Date()
  386. var nowMonth = now.getMonth(); //当前月
  387. var nowYear = now.getFullYear(); //当前年
  388. var notime = moment(new Date()).format('YYYY-MM-DD')
  389. var nowdataunix = Date.parse(notime)/1000
  390. console.log("档期是---------------",nowdataunix)
  391. for(let i=0;i<patients.length;i++){
  392. if(patients[i].first_dialysis_date){
  393. }
  394. }
  395. console.log("patients",patients)
  396. var date = new Date(1212508800)
  397. console.log("date",date)
  398. }
  399. })
  400. }
  401. },
  402. created() {
  403. //获取本月当前机构的透析模式
  404. const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
  405. console.log("开始时间",startDate)
  406. const endDate = moment(new Date()).format('YYYY-MM-DD')
  407. // console.log("结束时间",endDate)
  408. var now = new Date()
  409. var nowMonth = now.getMonth(); //当前月
  410. var nowYear = now.getFullYear(); //当前年
  411. //本月的开始时间
  412. var monthStartDate = new Date(nowYear, nowMonth, 1);
  413. var timeStar=Date.parse(monthStartDate)/1000;//s
  414. // console.log("本月第一天",timeStar)
  415. //本月的结束时间
  416. var monthEndDate = new Date(nowYear, nowMonth+1, 0);
  417. var timeEnd=Date.parse(monthEndDate)/1000-1;//s
  418. // console.log("本月最后一天",timeEnd)
  419. //统计透析总量
  420. this.getDialysisModeType(startDate,endDate)
  421. //统计转归状态
  422. this.getTotalLapseCount(timeStar,timeEnd)
  423. //统计男女比例
  424. this.getTotalSexCount(timeStar,timeEnd)
  425. //统计传染病
  426. this.getTotalInfectiousCount(timeStar,timeEnd)
  427. //统计年龄
  428. this.getTotalAgeCount(timeStar,timeEnd)
  429. //统计透析年龄
  430. this.getTotalDialysisCount(timeStar,timeEnd)
  431. },
  432. };
  433. </script>
  434. <style rel="stylesheet/scss" lang="scss" scoped>
  435. .infoBox {
  436. display: flex;
  437. flex-wrap: wrap;
  438. .infoOne {
  439. margin-right: 30px;
  440. margin-top: 30px;
  441. .titleBox {
  442. display: flex;
  443. align-items: center;
  444. }
  445. .point {
  446. display: inline-block;
  447. width: 7px;
  448. height: 7px;
  449. background: linear-gradient(
  450. 90deg,
  451. rgba(169, 224, 243, 1),
  452. rgba(159, 189, 252, 1)
  453. );
  454. border-radius: 50%;
  455. }
  456. .point1 {
  457. width: 7px;
  458. height: 7px;
  459. background: linear-gradient(
  460. 90deg,
  461. rgba(255, 215, 192, 1),
  462. rgba(255, 153, 148, 1)
  463. );
  464. border-radius: 50%;
  465. }
  466. .point2 {
  467. width: 7px;
  468. height: 7px;
  469. background: linear-gradient(
  470. 90deg,
  471. rgba(215, 195, 253, 1),
  472. rgba(179, 168, 247, 1)
  473. );
  474. border-radius: 50%;
  475. }
  476. .infoTitle {
  477. font-size: 16px;
  478. font-weight: bold;
  479. margin-left: 5px;
  480. color: #000;
  481. }
  482. .borderBox {
  483. width: 340px;
  484. min-height: 140px;
  485. background: rgba(255, 255, 255, 1);
  486. border: 1px solid rgba(229, 229, 229, 1);
  487. border-radius: 10px;
  488. padding: 0 14px 20px;
  489. margin-top: 10px;
  490. p {
  491. font-size: 14px;
  492. color: #000;
  493. margin: 10px 0 3px;
  494. }
  495. }
  496. .borderBox1 {
  497. width: 340px;
  498. min-height: 140px;
  499. background: rgba(255, 255, 255, 1);
  500. border: 1px solid rgba(229, 229, 229, 1);
  501. border-radius: 10px;
  502. padding: 0 14px 20px;
  503. margin-top: 10px;
  504. p {
  505. font-size: 14px;
  506. color: #000;
  507. margin: 10px 0 3px;
  508. }
  509. }
  510. .borderBox2 {
  511. width: 340px;
  512. min-height: 140px;
  513. background: rgba(255, 255, 255, 1);
  514. border: 1px solid rgba(229, 229, 229, 1);
  515. border-radius: 10px;
  516. padding: 0 14px 20px;
  517. margin-top: 10px;
  518. p {
  519. font-size: 14px;
  520. color: #000;
  521. margin: 10px 0 3px;
  522. }
  523. }
  524. }
  525. }
  526. </style>
  527. <style lang="scss">
  528. .infoBox {
  529. .infoOne {
  530. .borderBox {
  531. .el-progress-bar__inner {
  532. background: linear-gradient(
  533. 90deg,
  534. rgba(169, 224, 243, 1),
  535. rgba(159, 189, 252, 1)
  536. );
  537. }
  538. }
  539. .borderBox1 {
  540. .el-progress-bar__inner {
  541. background: linear-gradient(
  542. 90deg,
  543. rgba(255, 215, 192, 1),
  544. rgba(255, 153, 148, 1)
  545. );
  546. }
  547. }
  548. .borderBox2 {
  549. .el-progress-bar__inner {
  550. background: linear-gradient(
  551. 90deg,
  552. rgba(215, 195, 253, 1),
  553. rgba(179, 168, 247, 1)
  554. );
  555. }
  556. }
  557. }
  558. }
  559. </style>