123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572 |
- <template>
- <div class="main-contain">
- <div class="position">
- <bread-crumb :crumbs="crumbs"></bread-crumb>
- </div>
- <div class="app-container">
- <div class="cell clearfix">
- <label class="title">
- <span class="name">转归状态</span> :
- </label>
- <div class="time">
- <ul class>
- <li
- :class="item.state == stateType ? 'active' : ''"
- @click="selectLapseTo(item.state)"
- v-for="item in month"
- :key="item.value"
- >{{ item.label }}</li>
- </ul>
- </div>
- <label class="title">
- <span class="name">日期查询</span> :
- </label>
- <el-date-picker
- v-model="listQuery.start_time"
- prefix-icon="el-icon-date"
- @change="changeTime"
- :editable="false"
- style="width: 196px;"
- type="date"
- placeholder="选择日期时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- ></el-date-picker>
- <span class>-</span>
- <el-date-picker
- v-model="listQuery.end_time"
- prefix-icon="el-icon-date"
- @change="changeEndTime"
- :editable="false"
- style="width: 196px;"
- type="date"
- placeholder="选择日期时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- ></el-date-picker>
- </div>
- <div class="cell clearfix" style="align-items:normal">
- <div style="float:left">
- <div class="infoBox">
- <div class="infoOne">
- <div class="titleBox">
- <span class="point"></span>
- <p class="infoTitle">透析总量({{total}}次)</p>
- </div>
-
- <div class="borderBox">
- <div v-for="(item,index) in modetype" :key="index">
- <p>{{item.mode_id}}:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
- </div>
- <p>HD:64次(64%)</p>
- <el-progress :percentage="70"></el-progress>
- </div>
- </div>
- <div class="infoOne">
- <div class="titleBox">
- <span class="point2"></span>
- <p class="infoTitle">传染病统计</p>
- </div>
- <div class="borderBox2">
- <div v-for="(item,i) in this.InfectiousList" :key="i">
- <span v-if="item.disease_id == 2">
- <p>乙肝:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
- </span>
- <span v-if="item.disease_id == 3">
- <p>丙肝:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
- </span>
- <span v-if="item.disease_id == 4">
- <p>艾滋病:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
- </span>
- <span v-if="item.disease_id == 5">
- <p>肺结核:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
- </span>
- <span v-if="item.disease_id == 6">
- <p>梅毒:{{item.count}}人({{(item.count/InfectiousTotal*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
- </span>
- <span v-if="item.disease_id == 1">
- <p>其他:{{item.count + otherTotal}}人({{((item.count+otherTotal)/InfectiousTotal*100).toFixed(1)}}%)</p>
- <el-progress :percentage="((item.count+otherTotal)/InfectiousTotal*100).toFixed(1)"></el-progress>
- </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div style="float:left">
- <div class="infoBox">
- <div class="infoOne">
- <div class="titleBox">
- <span class="point1"></span>
- <p class="infoTitle">转归统计(总人数{{patientCount}}人)</p>
- </div>
- <div class="borderBox1">
- <p>留治:{{RetentionCount}}人({{(RetentionCount/patientCount*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(RetentionCount/patientCount*100).toFixed(1)"></el-progress>
- <p>转出:{{rollOut}}人({{(rollOut/patientCount*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(rollOut/patientCount*100).toFixed(1)"></el-progress>
- </div>
- </div>
- <div class="infoOne">
- <div class="titleBox">
- <span class="point2"></span>
- <p class="infoTitle">男女比例</p>
- </div>
- <div class="borderBox2">
- <p>男:{{totalMan}}人({{(totalMan/totalGender*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(totalMan/totalGender*100).toFixed(1)"></el-progress>
- <p>女:{{totalWoman}}人({{(totalWoman/totalGender*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(totalWoman/totalGender*100).toFixed(1)"></el-progress>
- </div>
- </div>
- <div class="infoOne">
- <div class="titleBox">
- <span class="point"></span>
- <p class="infoTitle">年龄统计</p>
- </div>
- <div class="borderBox">
- <div v-for="(item,j) in ageCount" :key="j">
- <span v-if="item.age == 20">
- <p>年龄≤20:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
- </span>
- <span v-if="item.age == 40">
- <p>20<年龄≤40:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
- </span>
- <span v-if="item.age == 60">
- <p>40<年龄≤60:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
- </span>
- <span v-if="item.age == 80">
- <p>60<年龄≤80:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
- </span>
- <span v-if="item.age ==150">
- <p>大于80:{{item.count}}人({{(item.count/ageTotal*100).toFixed(1)}}%)</p>
- <el-progress :percentage="(item.count/ageTotal*100).toFixed(1)"></el-progress>
- </span>
- </div>
- </div>
- </div>
- <div class="infoOne">
- <div class="titleBox">
- <span class="point1"></span>
- <p class="infoTitle">透龄统计</p>
- </div>
- <div class="borderBox1">
- <p>透析龄≤12:64人(64%)</p>
- <el-progress :percentage="70"></el-progress>
- <p>12<透析龄≤36:64人(64%)</p>
- <el-progress :percentage="70"></el-progress>
- <p>36≤透析龄≤60:64人(64%)</p>
- <el-progress :percentage="70"></el-progress>
- <p>透析龄 ≥60:64人(64%)</p>
- <el-progress :percentage="70"></el-progress>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
-
-
-
- <script>
- const moment = require('moment')
- import { GetOICData } from "@/api/qcd";
- import PieChart from "../qcd/components/BarChart";
- import { uParseTime } from "@/utils/tools";
- import BreadCrumb from "@/xt_pages/components/bread-crumb";
- import {getDialysisModeType,getTotalLapseCount,getTotalSexCount,getTotalInfectiousCount,getTotalAgeCount,getTotalDialysisCount} from "@/api/common/common"
- export default {
- name: "dialysisTotal",
- components: {
- PieChart,
- BreadCrumb
- },
- data() {
- return {
- crumbs: [
- { path: false, name: "科室质控" },
- { path: false, name: "基本信息统计" }
- ],
- listQuery: {
- start_time: "",
- end_time: "",
- page: 1,
- limit: 10
- },
- stateType: 0,
- month: [
- { value: 0, label: "本月", state: 0 },
- { value: 1, label: "近三个月", state: 1 },
- { value: 2, label: "近半年", state: 2 },
- { value: 3, label: "近一年", state: 3 }
- ],
- modetype:[],
- total:0,
- patientCount:0,
- rollOut:0,
- RetentionCount:0,
- totalMan:0,
- totalWoman:0,
- totalGender:0,
- InfectiousList:[],
- InfectiousTotal:0,
- ageCount:[],
- ageTotal:0,
- otherTotal:0,
- };
- },
- methods: {
- getTimestamp(time) {
- // 把时间日期转成时间戳
- return new Date(time).getTime() / 1000;
- },
- changeTime() {},
- changeEndTime(val) {
- var time =
- this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
- if (time < 0) {
- this.$message.error("结束时间不能小于开始时间");
- this.listQuery.end_time = "";
- } else {
- }
- },
- selectLapseTo(state) {
- this.stateType = state;
- this.listQuery.state = state;
- },
- getDialysisModeType(startDate,endDate){
- getDialysisModeType(startDate,endDate).then(response=>{
- if(response.data.state == 1){
- var modetype = response.data.data.modetype
- console.log("mode---",modetype)
- var total = response.data.data.total
- console.log("total",total)
- this.total = total
- for(let i=0;i<modetype.length;i++){
- if(modetype[i].mode_id == 1){
- modetype[i].mode_id = "HD"
- }
- if(modetype[i].mode_id == 2){
- modetype[i].mode_id = "HDF"
- }
- if(modetype[i].mode_id == 3){
- modetype[i].mode_id = "HD+HP"
- }
- if(modetype[i].mode_id == 4){
- modetype[i].mode_id = "HP"
- }
- if(modetype[i].mode_id == 5){
- modetype[i].mode_id = "HF"
- }
- if(modetype[i].mode_id == 6){
- modetype[i].mode_id = "SCUF"
- }
- if(modetype[i].mode_id == 7){
- modetype[i].mode_id = "IUF"
- }
- if(modetype[i].mode_id == 8){
- modetype[i].mode_id = "HFHD"
- }
- if(modetype[i].mode_id == 9){
- modetype[i].mode_id = "HFHD+HP"
- }
- if(modetype[i].mode_id == 10){
- modetype[i].mode_id = "PHF"
- }
- if(modetype[i].mode_id == 11){
- modetype[i].mode_id = "HFR"
- }
- if(modetype[i].mode_id == 12){
- modetype[i].mode_id = "HDF+HP"
- }
- if(modetype[i].mode_id == 13){
- modetype[i].mode_id = "HFHD+HP"
- }
- if(modetype[i].mode_id == 14){
- modetype[i].mode_id = "腹水回输"
- }
- if(modetype[i].mode_id == 19){
- modetype[i].mode_id = "IUF+HD"
- }
- }
- this.modetype = modetype
- console.log("modetype",modetype)
-
- }
- })
- },
- //统计转归
- getTotalLapseCount(startDate,endDate){
- getTotalLapseCount(startDate,endDate).then(response=>{
- if(response.data.state == 1){
- var patients = response.data.data.patients
- var total = response.data.data.total
- this.rollOut = total
- var count = response.data.data.count
- this.patientCount = count
- this.RetentionCount = count-total
- }
- })
- },
- //统计男女比例
- getTotalSexCount(timeStar,timeEnd){
- getTotalSexCount(timeStar,timeEnd).then(response=>{
- if(response.data.state === 1){
- var total = response.data.data.total
- // console.log("总人数",total)
- this.totalGender = total
- var totalMan = response.data.data.totalSex
- // console.log("男人",totalMan)
- this.totalMan = totalMan
- var totalWoman = total - totalMan
- this.totalWoman = totalWoman
- }
- })
- },
- //统计传染病
- getTotalInfectiousCount(timeStar,timeEnd){
- getTotalInfectiousCount(timeStar,timeEnd).then(response=>{
- if(response.data.state === 1){
- this.InfectiousTotal = response.data.data.total
- var infectious = response.data.data.count
- this.InfectiousList = infectious
- // for(let i=0;i<infectious.length;i++){
- // if(infectious[i].disease_id == 1){
- // infectious[i].disease_id = "其他"
- // }
- // if(infectious[i].disease_id == 2){
- // infectious[i].disease_id = "乙肝"
- // }
- // if(infectious[i].disease_id == 3){
- // infectious[i].disease_id = "丙肝"
- // }
- // if(infectious[i].disease_id == 4){
- // infectious[i].disease_id = "艾滋病"
- // }
- // if(infectious[i].disease_id == 5){
- // infectious[i].disease_id = "肺结核"
- // }
- // if(infectious[i].disease_id == 6){
- // infectious[i].disease_id = "梅毒"
- // }
-
- // }
- var otherTotal = response.data.data.otherTotal
- this.otherTotal = otherTotal
- // console.log("infectious-----------",otherTotal)
- }
- })
- },
- getTotalAgeCount(timeStar,timeEnd){
- getTotalAgeCount(timeStar,timeEnd).then(response=>{
- if(response.data.state == 1){
- var ageCount = response.data.data.ageCount
- this.ageCount = ageCount
- // console.log("ageCount",ageCount)
- this.ageTotal = response.data.data.total
- // var two = response.data.data.two
- // console.log("two",two)
-
- }
- })
- },
- //统计透析年龄
- getTotalDialysisCount(timeStar,timeEnd){
- getTotalDialysisCount(timeStar,timeEnd).then(response=>{
- if(response.data.state == 1){
- var patients = response.data.data.patients
- var now = new Date()
- var nowMonth = now.getMonth(); //当前月
- var nowYear = now.getFullYear(); //当前年
- var notime = moment(new Date()).format('YYYY-MM-DD')
- var nowdataunix = Date.parse(notime)/1000
- console.log("档期是---------------",nowdataunix)
- for(let i=0;i<patients.length;i++){
- if(patients[i].first_dialysis_date){
- }
- }
- console.log("patients",patients)
- var date = new Date(1212508800)
- console.log("date",date)
-
- }
- })
- }
- },
- created() {
- //获取本月当前机构的透析模式
- const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
- console.log("开始时间",startDate)
- const endDate = moment(new Date()).format('YYYY-MM-DD')
- // console.log("结束时间",endDate)
- var now = new Date()
- var nowMonth = now.getMonth(); //当前月
- var nowYear = now.getFullYear(); //当前年
- //本月的开始时间
- var monthStartDate = new Date(nowYear, nowMonth, 1);
- var timeStar=Date.parse(monthStartDate)/1000;//s
- // console.log("本月第一天",timeStar)
- //本月的结束时间
- var monthEndDate = new Date(nowYear, nowMonth+1, 0);
- var timeEnd=Date.parse(monthEndDate)/1000-1;//s
- // console.log("本月最后一天",timeEnd)
- //统计透析总量
- this.getDialysisModeType(startDate,endDate)
- //统计转归状态
- this.getTotalLapseCount(timeStar,timeEnd)
- //统计男女比例
- this.getTotalSexCount(timeStar,timeEnd)
- //统计传染病
- this.getTotalInfectiousCount(timeStar,timeEnd)
- //统计年龄
- this.getTotalAgeCount(timeStar,timeEnd)
- //统计透析年龄
- this.getTotalDialysisCount(timeStar,timeEnd)
- },
- };
- </script>
-
- <style rel="stylesheet/scss" lang="scss" scoped>
- .infoBox {
- display: flex;
- flex-wrap: wrap;
- .infoOne {
- margin-right: 30px;
- margin-top: 30px;
- .titleBox {
- display: flex;
- align-items: center;
- }
- .point {
- display: inline-block;
- width: 7px;
- height: 7px;
- background: linear-gradient(
- 90deg,
- rgba(169, 224, 243, 1),
- rgba(159, 189, 252, 1)
- );
- border-radius: 50%;
- }
- .point1 {
- width: 7px;
- height: 7px;
- background: linear-gradient(
- 90deg,
- rgba(255, 215, 192, 1),
- rgba(255, 153, 148, 1)
- );
- border-radius: 50%;
- }
- .point2 {
- width: 7px;
- height: 7px;
- background: linear-gradient(
- 90deg,
- rgba(215, 195, 253, 1),
- rgba(179, 168, 247, 1)
- );
- border-radius: 50%;
- }
- .infoTitle {
- font-size: 16px;
- font-weight: bold;
- margin-left: 5px;
- color: #000;
- }
- .borderBox {
- width: 340px;
- min-height: 140px;
- background: rgba(255, 255, 255, 1);
- border: 1px solid rgba(229, 229, 229, 1);
- border-radius: 10px;
- padding: 0 14px 20px;
- margin-top: 10px;
- p {
- font-size: 14px;
- color: #000;
- margin: 10px 0 3px;
- }
- }
- .borderBox1 {
- width: 340px;
- min-height: 140px;
- background: rgba(255, 255, 255, 1);
- border: 1px solid rgba(229, 229, 229, 1);
- border-radius: 10px;
- padding: 0 14px 20px;
- margin-top: 10px;
- p {
- font-size: 14px;
- color: #000;
- margin: 10px 0 3px;
- }
- }
- .borderBox2 {
- width: 340px;
- min-height: 140px;
- background: rgba(255, 255, 255, 1);
- border: 1px solid rgba(229, 229, 229, 1);
- border-radius: 10px;
- padding: 0 14px 20px;
- margin-top: 10px;
- p {
- font-size: 14px;
- color: #000;
- margin: 10px 0 3px;
- }
- }
- }
- }
- </style>
-
- <style lang="scss">
- .infoBox {
- .infoOne {
- .borderBox {
- .el-progress-bar__inner {
- background: linear-gradient(
- 90deg,
- rgba(169, 224, 243, 1),
- rgba(159, 189, 252, 1)
- );
- }
- }
- .borderBox1 {
- .el-progress-bar__inner {
- background: linear-gradient(
- 90deg,
- rgba(255, 215, 192, 1),
- rgba(255, 153, 148, 1)
- );
- }
- }
- .borderBox2 {
- .el-progress-bar__inner {
- background: linear-gradient(
- 90deg,
- rgba(215, 195, 253, 1),
- rgba(179, 168, 247, 1)
- );
- }
- }
- }
- }
- </style>
-
-
|